ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
emu_mmio.h
Go to the documentation of this file.
1
22
23#pragma once
24
25#include <stdint.h>
26#include <unicorn/unicorn.h>
27
28#include "ra8_attributes.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
46typedef enum : uint64_t {
47 k_periph_base = 0x40000000UL,
48 k_periph_size = 0x10000000UL,
50
51/* GLCDC observation point. The lcd_color_cycle demo proves a live panel by
52 * re-writing BG_BGC (background colour) every frame and pulsing BG_EN.VEN to
53 * commit it. The generic model only keeps the last value per address, so the
54 * distinct colours cycled are tracked separately as the tool's success witness.
55 * GLCDC base 0x40342000 + 0x1014 = BG_BGC (HUM Ch 63). */
56typedef enum : uint64_t {
57 k_glcdc_bg_bgc = 0x40343014UL,
60
82uint64_t mmio_read(uc_engine* uc, uint64_t offset, unsigned size, void* user);
83
106void mmio_write(uc_engine* uc, uint64_t offset, unsigned size, uint64_t value, void* user);
107
131uint32_t mmio_peek(uint64_t addr);
132
146uint32_t emu_mmio_reads(void);
147
161uint32_t emu_mmio_writes(void);
162
178void emu_mmio_print_counts(void);
179
198
199#ifdef __cplusplus
200}
201#endif
void emu_mmio_print_counts(void)
Print the run-end MMIO counters line to injected error sink.
Definition emu_mmio.c:234
void mmio_write(uc_engine *uc, uint64_t offset, unsigned size, uint64_t value, void *user)
UC_MMIO write callback for the peripheral window.
Definition emu_mmio.c:187
periph_map_t
Renesas peripheral window (modelled as logged MMIO).
Definition emu_mmio.h:46
@ k_periph_size
0x40000000-0x4FFFFFFF: all Renesas peripherals.
Definition emu_mmio.h:48
@ k_periph_base
Peripheral window base.
Definition emu_mmio.h:47
uint32_t mmio_peek(uint64_t addr)
Side-effect-free read of the last value written to a peripheral reg.
Definition emu_mmio.c:177
uint32_t emu_mmio_writes(void)
Total peripheral MMIO writes this run (monotonic).
Definition emu_mmio.c:228
uint64_t mmio_read(uc_engine *uc, uint64_t offset, unsigned size, void *user)
UC_MMIO read callback for the peripheral window.
Definition emu_mmio.c:129
void emu_mmio_print_bgc_and_table(void)
Print the BG_BGC witness and the per-address MMIO table to injected error sink.
Definition emu_mmio.c:243
glcdc_obs_t
Definition emu_mmio.h:56
@ k_bgc_track_max
Distinct BG_BGC values remembered.
Definition emu_mmio.h:58
@ k_glcdc_bg_bgc
GLCDC BG.BGC background colour.
Definition emu_mmio.h:57
uint32_t emu_mmio_reads(void)
Total peripheral MMIO reads this run (monotonic).
Definition emu_mmio.c:222
Annotation-attribute framework macros for ra8-firmware.