ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
board_periph_block_t Struct Reference

A modelled peripheral block's self-description for the core registry. More...

#include <board_periph_block.h>

Data Fields

uint64_t base
 Absolute window base address.
uint64_t span
 Window length in bytes.
uint32_t order
 Ascending tick order (lower ticks first).
board_periph_read_fn read
 MMIO read handler (required).
board_periph_write_fn write
 MMIO write handler (required).
board_periph_tick_fn tick
 Per-chunk advance, or NULL.
board_periph_reset_fn reset
 Power-on reset, or NULL.
board_periph_report_fn report
 End-of-run summary section, or NULL.
const char * name
 Short label (diagnostics only).
bool observe
 Observe-only: snoop, do not own the MMIO.
board_block_device_t device
 Device gate: which chip(s) expose it.
bool loop_only
 Only own window when –usbhs-loop is set (else sparse).

Detailed Description

A modelled peripheral block's self-description for the core registry.

base / span give the block's absolute register window; the core dispatches an MMIO access to read / write when its address falls in [base, base + span). tick (may be NULL) advances the block once per emulation chunk and reset (may be NULL) returns it to power-on state. The descriptor must have static lifetime – the core stores the pointer, not a copy. order makes the per-tick advance deterministic regardless of registration order: blocks tick in ascending order (ties keep registration order), preserving the historical AGT/GPT-before-SCI cadence.

observe selects the block's ownership mode. A normal (observe == false) block OWNS its window: the core answers an in-range MMIO read from read and a write from write, reports the access handled, and the caller's sparse fallback never sees it. An observe-only (observe == true) block instead SNOOPS its window: the core still calls write so the block can shadow the register stream, but reports the access NOT handled so the caller's sparse model continues to serve reads and record writes. This is for a window that something outside the registry already reads back (e.g. main.c's panel compositor reads the GLCDC graphics-layer registers from the sparse shadow to build the --ppm / live frame); an owning block would divert those writes from the sparse shadow and blank the compositor, so the GLCDC model snoops instead – it decodes the active framebuffer descriptor without disturbing the existing read path. An observe block's read is never called (the sparse model answers); supply a stub for it.

Definition at line 154 of file board_periph_block.h.

Field Documentation

◆ base

uint64_t board_periph_block_t::base

Absolute window base address.

Definition at line 155 of file board_periph_block.h.

◆ device

board_block_device_t board_periph_block_t::device

Device gate: which chip(s) expose it.

Definition at line 165 of file board_periph_block.h.

◆ loop_only

bool board_periph_block_t::loop_only

Only own window when –usbhs-loop is set (else sparse).

Definition at line 166 of file board_periph_block.h.

◆ name

const char* board_periph_block_t::name

Short label (diagnostics only).

Definition at line 163 of file board_periph_block.h.

Referenced by board_periph_register_block().

◆ observe

bool board_periph_block_t::observe

Observe-only: snoop, do not own the MMIO.

Definition at line 164 of file board_periph_block.h.

Referenced by board_periph_read(), and board_periph_write().

◆ order

uint32_t board_periph_block_t::order

Ascending tick order (lower ticks first).

Definition at line 157 of file board_periph_block.h.

◆ read

board_periph_read_fn board_periph_block_t::read

MMIO read handler (required).

Definition at line 158 of file board_periph_block.h.

Referenced by board_periph_read().

◆ report

board_periph_report_fn board_periph_block_t::report

End-of-run summary section, or NULL.

Definition at line 162 of file board_periph_block.h.

◆ reset

board_periph_reset_fn board_periph_block_t::reset

Power-on reset, or NULL.

Definition at line 161 of file board_periph_block.h.

◆ span

uint64_t board_periph_block_t::span

Window length in bytes.

Definition at line 156 of file board_periph_block.h.

◆ tick

board_periph_tick_fn board_periph_block_t::tick

Per-chunk advance, or NULL.

Definition at line 160 of file board_periph_block.h.

◆ write

board_periph_write_fn board_periph_block_t::write

MMIO write handler (required).

Definition at line 159 of file board_periph_block.h.

Referenced by board_periph_write().


The documentation for this struct was generated from the following file: