36typedef enum : uint32_t {
42typedef enum : uint64_t {
55typedef enum : uint32_t {
83 return (uint32_t)(inst_off >> 2U);
103 const uint64_t off = addr - (uint64_t)
k_dac_base;
104 const uint32_t inst = (uint32_t)(off / (uint64_t)
k_dac_stride);
132 const uint64_t off = addr - (uint64_t)
k_dac_base;
133 const uint32_t inst = (uint32_t)(off / (uint64_t)
k_dac_stride);
143 const uint16_t code = (uint16_t)((uint32_t)value & (uint32_t)
k_dac_dadr_mask);
144 s_dac[inst].last = code;
145 if (code >
s_dac[inst].peak) {
146 s_dac[inst].peak = code;
148 s_dac[inst].writes++;
152 bool should_report = (
s_dac[inst].writes == 1U);
154 should_report =
true;
160 "DAC%u code=%u (n=%u)",
163 (
unsigned)
s_dac[inst].writes);
182 for (uint32_t i = 0U; i < (uint32_t)
k_dac_count; i++) {
197 for (uint32_t i = 0U; i < (uint32_t)
k_dac_count; i++) {
198 if (
s_dac[i].writes == 0U) {
202 " DAC_B%u : writes=%u last=%u peak=%u enabled=%s\n",
Multi-channel console log store backing the board view's tabbed console.
void board_console_push(board_console_ch_t ch, const char *line)
Append one completed line to a channel ring and the ALL ring.
@ k_board_console_ch_dac
DAC_B output summaries.
Decentralized peripheral-block registry for the board emulator core.
void board_periph_register_block(const board_periph_block_t *block)
Register a peripheral block's descriptor with the core registry.
@ k_block_order_i2c
I3C/I2C + GT911 (no tick today).
bool board_periph_trace(void)
Whether –trace is active (blocks log transitions when true).
static RA8_INTERNAL void internal_dac_write(uc_engine *uc, uint64_t addr, unsigned size, uint64_t value)
MMIO write inside the DAC window: latch the value; track DADR.
static RA8_INTERNAL void internal_dac_reset(void)
Clear both DAC_B instances' registers and observability state.
static RA8_INTERNAL uint32_t internal_dac_word(uint64_t inst_off)
Word index into an instance's backing store for an in-instance offset.
static RA8_INTERNAL uint64_t internal_dac_read(uc_engine *uc, uint64_t addr, unsigned size)
MMIO read inside the DAC window: read back the latched register.
static RA8_INTERNAL void internal_board_periph_dac_register(void)
Self-register the DAC_B block before main runs (decentralized).
dac_console_t
Console-tap sizing for DAC output summaries.
@ k_dac_console_every
Push 1 line per N updates (anti-flood).
@ k_dac_console_line_cap
Max chars in a "DAC.. code=.." line.
dac_map_t
DAC_B block geometry (ra8_dac_b_regs.h, FSP R_DAC_B0_Type).
@ k_dac_off_dacr0
DACR0 control (DACEN/DAE/DAOUTDIS).
@ k_dac_off_dacr1
DACR1 control (DPSEL).
@ k_dac_count
DAC_B0 / DAC_B1.
@ k_dac_span
Both instances (2 x 0x100 stride).
@ k_dac_off_dadr
DADR 12-bit data (16-bit reg).
@ k_dac_stride
Bytes between DAC_B0 and DAC_B1.
@ k_dac_inst_words
Backing words per instance.
@ k_dac_off_dacr2
DACR2 control (OFSSEL).
static RA8_INTERNAL void internal_dac_report(void)
Print one line per DAC_B instance that the firmware drove.
dac_field_t
DAC_B field masks.
@ k_dac_dacen_mask
DACR0.DACEN channel-enable bit.
@ k_dac_dadr_mask
12-bit DADR data field.
static const board_periph_block_t s_k_dac_block
This block's descriptor (static lifetime; the core keeps the pointer).
static dac_inst_t s_dac[k_dac_count]
Bounded raw-descriptor I/O seam for the RA8 emulator.
emu_io_result_t priv_emu_io_errf(const char *format,...)
Format bounded text and write it to the injected error descriptor.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
A modelled peripheral block's self-description for the core registry.
One DAC_B instance: register backing store + write observability.
uint16_t last
Last DADR code written.
uint16_t peak
Largest DADR code seen.
uint32_t writes
DADR write count.
uint32_t reg[k_dac_inst_words]
Word-addressed register backing.