|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Hardware-free driver for the ra8_cache_store on-media cache demo (#257). More...
Go to the source code of this file.
Data Structures | |
| struct | cache_store_demo_result_t |
| Outcome + observable facts of one demo run (for the banner / asserts). More... | |
| struct | cache_store_demo_cfg_t |
| Injected dependencies + caller-owned buffers for cache_store_demo_run. More... | |
Enumerations | |
| enum | cache_store_demo_stage_t : uint8_t { k_cache_store_demo_stage_none = 0U , k_cache_store_demo_stage_mounted = 1U , k_cache_store_demo_stage_seeded = 2U , k_cache_store_demo_stage_evicted = 3U , k_cache_store_demo_stage_reused = 4U , k_cache_store_demo_stage_closed = 5U , k_cache_store_demo_stage_remounted = 6U , k_cache_store_demo_stage_persisted = 7U } |
| Furthest sequence stage the demo reached (for diagnostics on failure). More... | |
| enum | cache_store_demo_status_t : uint8_t { k_cache_store_demo_ok = 0U , k_cache_store_demo_err_arg = 1U , k_cache_store_demo_err_mount = 2U , k_cache_store_demo_err_seed = 3U , k_cache_store_demo_err_evict = 4U , k_cache_store_demo_err_reuse = 5U , k_cache_store_demo_err_close = 6U , k_cache_store_demo_err_remount = 7U , k_cache_store_demo_err_persist = 8U } |
| Granular verdict for one cache_store_demo_run. More... | |
Functions | |
| ra8_err_t | cache_store_demo_run (const cache_store_demo_cfg_t *cfg, cache_store_demo_result_t *out) |
| Run the full ra8_cache_store on-media cache demonstration, end to end. | |
Hardware-free driver for the ra8_cache_store on-media cache demo (#257).
Factors the whole ra8_cache_store demonstration – mount, put/get several keyed blobs, pin one, force an eviction, re-put into the reclaimed space, close, then remount and confirm on-media persistence – into a single pure function that touches NO hardware. It takes the injected LevelX NOR driver-initialise callback (ra8_cache_store_nor_init_fn) plus all caller-owned buffers, so the identical logic runs in two places: the ARM example's main.c binds a RAM-backed NOR driver over SRAM, and the host unit test binds the same driver on the x86_64 host. That shared core is what makes the ra8_emulator gate and the host test exercise byte-identical behaviour.
Definition in file cache_store_demo.h.
| enum cache_store_demo_stage_t : uint8_t |
Furthest sequence stage the demo reached (for diagnostics on failure).
Recorded in cache_store_demo_result_t::last_stage so a failing run reports exactly which step broke.
Definition at line 44 of file cache_store_demo.h.
| enum cache_store_demo_status_t : uint8_t |
Granular verdict for one cache_store_demo_run.
k_cache_store_demo_ok means every stage passed; any other value names the stage that failed.
Definition at line 62 of file cache_store_demo.h.
|
nodiscard |
Run the full ra8_cache_store on-media cache demonstration, end to end.
Executes, in order, over the injected NOR driver:
| [in] | cfg | Injected dependencies + buffers (see the struct). |
| [out] | out | Receives the verdict + observable facts. |
| k_ra8_ok | Every stage passed (out->status == ok). |
| k_ra8_err_null_ptr | cfg, out, or a required buffer was NULL. |
| k_ra8_err_invalid_state | A stage failed; out->status / out->last_stage name it. |
Definition at line 479 of file cache_store_demo.c.
References internal_demo_build_cfg(), internal_demo_phase_evict(), internal_demo_phase_remount(), internal_demo_phase_seed(), internal_demo_put_and_verify(), k_cache_store_demo_err_arg, k_cache_store_demo_err_close, k_cache_store_demo_err_evict, k_cache_store_demo_err_mount, k_cache_store_demo_err_reuse, k_cache_store_demo_err_seed, k_cache_store_demo_ok, k_cache_store_demo_stage_closed, k_cache_store_demo_stage_evicted, k_cache_store_demo_stage_mounted, k_cache_store_demo_stage_none, k_cache_store_demo_stage_persisted, k_cache_store_demo_stage_reused, k_cache_store_demo_stage_seeded, k_demo_key_tile_b, k_demo_key_tile_d, k_demo_len_tile_d, k_demo_seed_tile_d, k_ra8_err_invalid_state, k_ra8_ok, cache_store_demo_result_t::last_stage, ra8_cache_store_close(), ra8_cache_store_init(), RA8_CHECK_NULL_PTR, and cache_store_demo_result_t::status.
Referenced by main().