L2 Cache RTOS Driver

This driver can be used to instantiate a software defined L2 Cache for code and data.

Initialization API

The following structures and functions are used to initialize and start an L2 cache driver instance.

typedef struct rtos_l2_cache_struct rtos_l2_cache_t

Typedef to the RTOS l2 cache driver instance struct.

void rtos_l2_cache_start(rtos_l2_cache_t *ctx)

Starts the RTOS l2 cache memory driver.

void rtos_l2_cache_init(rtos_l2_cache_t *ctx, l2_cache_setup_fn setup_fn, l2_cache_thread_fn thread_fn, l2_cache_swmem_read_fn read_func, uint32_t io_core_mask, void *cache_buffer)

Initializes the l2 cache for use by the RTOS l2 cache memory driver.

Cache buffer must be dword aligned

RTOS_L2_CACHE_DIRECT_MAP

Convenience macro that may be used to specify the direct map cache to rtos_l2_cache_init() in place of setup_fn and thread_fn.

RTOS_L2_CACHE_TWO_WAY_ASSOCIATIVE

Convenience macro that may be used to specify the two way associative cache to rtos_l2_cache_init() in place of setup_fn and thread_fn.

RTOS_L2_CACHE_BUFFER_WORDS_DIRECT_MAP

Convenience macro that may be used to specify the size of the cache buffer for a direct map cache. A pointer to the buffer of size RTOS_L2_CACHE_BUFFER_WORDS_DIRECT_MAP should be passed to the cache_buffer argument of rtos_l2_cache_init().

RTOS_L2_CACHE_BUFFER_WORDS_TWO_WAY

Convenience macro that may be used to specify the size of the cache buffer for a two way associative cache. A pointer to the buffer of size RTOS_L2_CACHE_BUFFER_WORDS_TWO_WAY should be passed to the cache_buffer argument of rtos_l2_cache_init().

struct rtos_l2_cache_struct
#include <rtos_l2_cache.h>

Struct representing an RTOS l2 cache driver instance.

The members in this struct should not be accessed directly.