Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CMCC - Cortex M Cache Controller module

The Cortex M Cache Controller (CMCC) is a 4-way set associative unified cache controller.

It integrates a controller, a tag directory, data memory, metadata memory and a configuration interface.

Modules

 
 Quick Start Guide(s)
 In this section you can find a list of all Quick Start guides related to the CMCC - Cortex M Cache Controller module.
 

Data Structures

struct  cmcc_config
 CMCC Configuration structure. More...
 

Enumerations

enum  cmcc_monitor_mode {
  CMCC_CYCLE_COUNT_MODE = 0,
  CMCC_IHIT_COUNT_MODE,
  CMCC_DHIT_COUNT_MODE
}
 Cache Controller Monitor Counter Mode. More...
 

Functions

static void cmcc_disable (Cmcc *const p_cmcc)
 Disable Cache Controller. More...
 
static void cmcc_disable_monitor (Cmcc *const p_cmcc)
 Disable Cache Controller monitor. More...
 
void cmcc_enable (Cmcc *const p_cmcc)
 Enable Cache Controller. More...
 
static void cmcc_enable_monitor (Cmcc *const p_cmcc)
 Enable Cache Controller monitor. More...
 
void cmcc_get_config_defaults (struct cmcc_config *const cfg)
 Initializes a CMCC configuration structure to defaults. More...
 
static uint32_t cmcc_get_monitor_cnt (Cmcc *const p_cmcc)
 Get the Cache Controller monitor status. More...
 
static uint32_t cmcc_get_status (Cmcc *const p_cmcc)
 Get the Cache Controller status. More...
 
bool cmcc_init (Cmcc *const p_cmcc, struct cmcc_config *const cfg)
 Initialize the CMCC module. More...
 
static void cmcc_invalidate_all (Cmcc *const p_cmcc)
 Cache Controller Invalidate All. More...
 
void cmcc_invalidate_line (Cmcc *const p_cmcc, uint32_t cmcc_way, uint32_t cmcc_index)
 Cache Controller Invalidate by Line Operation. More...
 
static void cmcc_reset_monitor (Cmcc *const p_cmcc)
 Reset event counter register. More...
 
static void cmcc_set_config (Cmcc *const p_cmcc, struct cmcc_config *const cfg)
 Configure the CMCC. More...
 

Cache Controller Monitor Counter Mode.

Enumerator
CMCC_CYCLE_COUNT_MODE 
CMCC_IHIT_COUNT_MODE 
CMCC_DHIT_COUNT_MODE 

static void cmcc_disable ( Cmcc *const  p_cmcc)
inlinestatic

Disable Cache Controller.

Parameters
p_cmccPointer to an CMCC instance.

Referenced by cmcc_invalidate_line().

static void cmcc_disable_monitor ( Cmcc *const  p_cmcc)
inlinestatic

Disable Cache Controller monitor.

Parameters
p_cmccPointer to an CMCC instance.
void cmcc_enable ( Cmcc *const  p_cmcc)

Enable Cache Controller.

Parameters
p_cmccPointer to an CMCC instance.

References cmcc_get_status().

Referenced by cmcc_invalidate_line(), and main().

static void cmcc_enable_monitor ( Cmcc *const  p_cmcc)
inlinestatic

Enable Cache Controller monitor.

Parameters
p_cmccPointer to an CMCC instance.

Referenced by cmcc_init().

void cmcc_get_config_defaults ( struct cmcc_config *const  cfg)

Initializes a CMCC configuration structure to defaults.

Initializes a given CMCC configuration structure to a set of known default values. This function should be called on all new instances of these configuration structures before being modified by the user application.

The default configuration is as follows:

  • the monitor counter is activated.
  • Data hit counter mode.
Parameters
cfgConfiguration structure to initialize to default values.

References Assert, CMCC_DHIT_COUNT_MODE, cmcc_config::cmcc_mcfg_mode, and cmcc_config::cmcc_monitor_enable.

Referenced by main().

static uint32_t cmcc_get_monitor_cnt ( Cmcc *const  p_cmcc)
inlinestatic

Get the Cache Controller monitor status.

Parameters
p_cmccPointer to an CMCC instance.
Returns
the content of the status register.

Referenced by main(), and run_cache_data_hit_test().

static uint32_t cmcc_get_status ( Cmcc *const  p_cmcc)
inlinestatic

Get the Cache Controller status.

Parameters
p_cmccPointer to an CMCC instance.
Returns
the content of the status register.

Referenced by cmcc_enable(), and cmcc_invalidate_line().

bool cmcc_init ( Cmcc *const  p_cmcc,
struct cmcc_config *const  cfg 
)

Initialize the CMCC module.

Parameters
p_cmccPointer to an CMCC instance.
cfgPointer to CMCC configuration.
Return values
trueif the initialization was successful.
falseif initialization failed.

References Assert, cmcc_enable_monitor(), cmcc_config::cmcc_monitor_enable, and cmcc_set_config().

Referenced by main().

static void cmcc_invalidate_all ( Cmcc *const  p_cmcc)
inlinestatic

Cache Controller Invalidate All.

Parameters
p_cmccPointer to an CMCC instance.
void cmcc_invalidate_line ( Cmcc *const  p_cmcc,
uint32_t  cmcc_way,
uint32_t  cmcc_index 
)

Cache Controller Invalidate by Line Operation.

Parameters
p_cmccPointer to an CMCC instance.

References cmcc_disable(), cmcc_enable(), and cmcc_get_status().

static void cmcc_reset_monitor ( Cmcc *const  p_cmcc)
inlinestatic

Reset event counter register.

Parameters
p_cmccPointer to an CMCC instance.
static void cmcc_set_config ( Cmcc *const  p_cmcc,
struct cmcc_config *const  cfg 
)
inlinestatic

Configure the CMCC.

Parameters
p_cmccPointer to an CMCC instance.
cfgPointer to CMCC configuration.

References cmcc_config::cmcc_mcfg_mode.

Referenced by cmcc_init().