v_frmbuf_wr
Vitis Drivers API Documentation
platform.c File Reference

Functions

void enable_caches ()
 Enables instruction and data caches based on the processor architecture. More...
 
void disable_caches ()
 Disables both the data cache and instruction cache. More...
 
void init_uart ()
 Initializes the UART peripheral for standard output. More...
 
void init_platform ()
 Initializes the platform hardware and enables necessary features. More...
 
void cleanup_platform ()
 Cleans up the platform by disabling caches. More...
 

Function Documentation

void cleanup_platform ( )

Cleans up the platform by disabling caches.

This function is typically called during the shutdown or cleanup phase of the application to ensure that all processor caches are properly disabled before exiting or resetting the system.

References disable_caches().

void disable_caches ( )

Disables both the data cache and instruction cache.

This function calls the appropriate Xilinx library functions to disable the data cache (DCache) and instruction cache (ICache) on the processor. Disabling caches may be necessary for certain hardware operations or debugging scenarios where cache coherency is not managed automatically.

Referenced by cleanup_platform().

void enable_caches ( )

Enables instruction and data caches based on the processor architecture.

This function enables the instruction and data caches for either PowerPC or MicroBlaze architectures. For PowerPC, it enables cache regions specified by CACHEABLE_REGION_MASK. For MicroBlaze, it checks if instruction and data caches are configured and enables them accordingly.

Conditional compilation is used to ensure the correct cache enabling functions are called depending on the target processor.

Referenced by init_platform().

void init_platform ( )

Initializes the platform hardware and enables necessary features.

This function performs platform-specific initialization steps required before running the main application. It optionally calls ps7_init() for Zynq platforms if running outside of the SDK, enables instruction and data caches, and initializes the UART for standard output.

  • For Zynq: Optionally calls ps7_init() if needed (see comments).
  • Enables processor caches.
  • Initializes UART for console output.

References enable_caches(), and init_uart().

Referenced by main().

void init_uart ( )

Initializes the UART peripheral for standard output.

This function configures the UART hardware for standard output depending on the platform-specific macros defined at compile time. If STDOUT_IS_16550 is defined, it sets the baud rate and line control register for the 16550 UART. If STDOUT_IS_PS7_UART is defined, it assumes the PS7 UART is already configured by the bootrom or BSP.

Platform-specific configuration:

  • For 16550 UART: Sets baud rate and data bits.
  • For PS7 UART: No action required (pre-configured).

Referenced by init_platform().