ao_sys_pcache.h
System prefetch cache

Include

xc.h

Functions

ao_sys_pfm_ws_set

#define ao_sys_pfm_ws_set(ws)                                           \
{                                                                       \
    PRECONSET = _PRECON_PFMWS_MASK;                                     \
    PRECONCLR = _PRECON_PFMWS_MASK & ~((ws) << _PRECON_PFMWS_POSITION); \
}

Sets the program flash memory (PFM) access time defined in terms of SYSCLK wait states.

ao_sys_pref_disable

#define ao_sys_pref_disable()        \
{                                    \
    PRECONCLR = _PRECON_PREFEN_MASK; \
}

Disables predictive prefetch.

ao_sys_pref_enable_any

#define ao_sys_pref_enable_any()     \
{                                    \
    PRECONSET = _PRECON_PREFEN_MASK; \
}

Enables predictive prefetch for any address.

ao_sys_pref_enable_instructions

#define ao_sys_pref_enable_instructions()                             \
{                                                                     \
    PRECONCLR = _PRECON_PREFEN_MASK;                                  \
    PRECONSET = _PRECON_PREFEN_MASK & (1 << _PRECON_PREFEN_POSITION); \
}

Enables predictive prefetch for CPU instructions only.

ao_sys_pref_enable_instructions_and_data

#define ao_sys_pref_enable_instructions_and_data()                    \
{                                                                     \
    PRECONCLR = _PRECON_PREFEN_MASK;                                  \
    PRECONSET = _PRECON_PREFEN_MASK & (2 << _PRECON_PREFEN_POSITION); \
}

Enables predictive prefetch for CPU instructions and CPU data.