|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
The replacement-policy DIP seam (the eventual firmware Layer-2 seam). More...
#include <cache_bench.h>
Data Fields | |
| const char * | name |
| Policy name for the report table. | |
| size_t | meta_bytes |
| Per-frame metadata actually used (RAM cost). | |
| size_t | state_base_bytes |
| Fixed policy workspace bytes. | |
| size_t | state_frame_bytes |
| Additional bytes per frame. | |
| int(* | init )(cb_cache_t *c) |
| Allocate + init policy state for a cb_cache_t. | |
| void(* | deinit )(cb_cache_t *c) |
| Release policy state. | |
| void(* | on_access )(cb_cache_t *c, uint32_t frame) |
A resident key was just hit at frame (update recency/freq). | |
| void(* | on_insert )(cb_cache_t *c, uint32_t frame) |
frame was just (re)populated with a freshly-loaded key. | |
| uint32_t(* | pick_victim )(cb_cache_t *c, uint32_t *scanned) |
| Choose a live frame to evict. | |
The replacement-policy DIP seam (the eventual firmware Layer-2 seam).
Every callback is bounded and side-effects only cb_frame_t ::meta and cb_cache_t ::policy_data. pick_victim must return a live frame index; the harness evicts it, inserts the new key there, then calls on_insert.
Definition at line 75 of file cache_bench.h.
| void(* cache_policy_t::deinit) (cb_cache_t *c) |
| int(* cache_policy_t::init) (cb_cache_t *c) |
Allocate + init policy state for a cb_cache_t.
Returns 0 ok.
Definition at line 81 of file cache_bench.h.
Referenced by cb_replay().
| size_t cache_policy_t::meta_bytes |
Per-frame metadata actually used (RAM cost).
Definition at line 77 of file cache_bench.h.
| const char* cache_policy_t::name |
Policy name for the report table.
Definition at line 76 of file cache_bench.h.
Referenced by internal_report_trace_row().
| void(* cache_policy_t::on_access) (cb_cache_t *c, uint32_t frame) |
A resident key was just hit at frame (update recency/freq).
Definition at line 85 of file cache_bench.h.
Referenced by internal_replay_stream().
| void(* cache_policy_t::on_insert) (cb_cache_t *c, uint32_t frame) |
frame was just (re)populated with a freshly-loaded key.
Definition at line 87 of file cache_bench.h.
Referenced by internal_replay_stream().
| uint32_t(* cache_policy_t::pick_victim) (cb_cache_t *c, uint32_t *scanned) |
Choose a live frame to evict.
| [out] | scanned | Receives frames examined this call (WCET proxy). |
Definition at line 93 of file cache_bench.h.
Referenced by internal_replay_take_frame().
| size_t cache_policy_t::state_base_bytes |
Fixed policy workspace bytes.
Definition at line 78 of file cache_bench.h.
Referenced by cb_replay(), cb_replay_workspace_required(), and internal_replay_open().
| size_t cache_policy_t::state_frame_bytes |
Additional bytes per frame.
Definition at line 79 of file cache_bench.h.
Referenced by cb_replay(), cb_replay_workspace_required(), and internal_replay_open().