v_frmbuf_rd
Vitis Drivers API Documentation
platform.c File Reference

Functions

void enable_caches ()
 Enables instruction and data caches based on the target processor architecture. More...
 
void disable_caches ()
 Disables both the data cache and instruction cache. More...
 
void init_uart ()
 Initializes the UART peripheral based on the platform configuration. More...
 
void init_platform ()
 Initializes the platform hardware and peripherals. More...
 
void cleanup_platform ()
 Cleans up the platform by disabling CPU caches. More...
 

Function Documentation

void cleanup_platform ( )

Cleans up the platform by disabling CPU caches.

This function is typically called during the shutdown or cleanup phase of an embedded application to ensure that all CPU 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 Xil_DCacheDisable() and Xil_ICacheDisable() functions to turn off the data and instruction caches, respectively. It is typically used in bare-metal embedded systems where cache coherency is not required or before performing operations that require caches to be disabled.

Referenced by cleanup_platform().

void enable_caches ( )

Enables instruction and data caches based on the target processor architecture.

This function enables the instruction and data caches for either PowerPC or MicroBlaze processors. 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 for the detected processor architecture.

Referenced by init_platform().

void init_platform ( )

Initializes the platform hardware and peripherals.

This function performs platform-specific initialization steps, such as enabling processor caches and initializing the UART for standard output. If running outside of the SDK, PS7 initialization can be enabled by uncommenting the relevant lines and including the required files.

References enable_caches(), and init_uart().

Referenced by main().

void init_uart ( )

Initializes the UART peripheral based on the platform configuration.

This function configures the UART for standard output. If the platform uses the 16550 UART, it sets the baud rate and line control register. If the platform uses the PS7 UART, it assumes the bootrom or BSP has already configured it to 115200 bps.

Platform-specific macros (STDOUT_IS_16550, STDOUT_IS_PS7_UART) determine which initialization steps are performed.

Referenced by init_platform().