64typedef enum : uint32_t {
69typedef enum : uint64_t {
75typedef enum : uint64_t {
86typedef enum : uint32_t {
93typedef enum : uint32_t {
213 uint32_t sta =
s_ipc.sta[ch];
249 if (f->
count == 0U) {
253 const uint32_t w = f->
word[f->
rd];
277 const uint64_t off = addr - (uint64_t)
k_ipc_base;
371 const uint64_t off = addr - (uint64_t)
k_ipc_base;
382 s_ipc.sta[ch] |= bits;
387 const uint16_t
event =
Decentralized peripheral-block registry for the board emulator core.
void board_periph_icu_raise_event(uc_engine *uc, uint16_t event)
Raise a peripheral ELC event through the core's ICU -> NVIC path.
void board_periph_register_block(const board_periph_block_t *block)
Register a peripheral block's descriptor with the core registry.
bool board_periph_trace(void)
Whether –trace is active (blocks log transitions when true).
static RA8_INTERNAL void internal_ipc_write(uc_engine *uc, uint64_t addr, unsigned size, uint64_t value)
Write an IPC register: ISET latches + raises, TXD pushes, CLR clears.
static RA8_INTERNAL void internal_ipc_clr_write(uint32_t ch, uint32_t value)
Apply a CLR write: W1C IRQ lines, FIFO reset, error-latch clears.
static RA8_INTERNAL uint32_t internal_ipc_fifo_pop(uint32_t ch)
Pop the oldest word off a channel's message FIFO (RXD read).
ipc_geom_t
IPC register window geometry (ra8_ipc_regs.h).
@ k_ipc_span
Semaphores + NMI + four channel windows.
@ k_ipc_base
IPC unit base (Secure alias).
static RA8_INTERNAL uint64_t internal_ipc_read(uc_engine *uc, uint64_t addr, unsigned size)
Read an IPC register: STA composes live status, RXD pops the FIFO.
static RA8_INTERNAL void internal_ipc_reset(void)
Clear the IPC channel shadows and the run counters.
static RA8_INTERNAL void internal_board_periph_ipc_register(void)
Self-register the IPC window before main runs (decentralised).
static ipc_state_t s_ipc
Single shared IPC model instance (both engines dispatch into it).
static const board_periph_block_t s_k_ipc_block
IPC register window + reset / report (no tick: event-driven only).
ipc_order_t
Per-tick order slot for the IPC block.
@ k_ipc_block_order
IPC reset / report order slot.
static RA8_INTERNAL void internal_ipc_fifo_push(uint32_t ch, uint32_t value)
Push one word onto a channel's message FIFO (TXD write).
static RA8_INTERNAL bool internal_ipc_decode(uint64_t off, uint32_t *ch, uint32_t *reg)
Decode a window offset to its channel index and register offset.
ipc_chan_t
Channel-count, unit-split and FIFO-depth constants.
@ k_ipc_unit_split
Channels < split are IPC0, the rest IPC1.
@ k_ipc_fifo_depth
4-stage message FIFO (HUM Ch 3.1 p 204).
@ k_ipc_ch_count
IPC0_0, IPC0_1, IPC1_0, IPC1_1.
static RA8_INTERNAL uint32_t internal_ipc_sta_value(uint32_t ch)
Compose one channel's live STA value from its shadows.
ipc_status_t
Status-register masks and the receiving-core ELC event ids.
@ k_ipc0_irq_event
ELC_EVENT_IPC_IRQ0 -> CPU0/M85.
@ k_ipc_sta_rdy
STA.RDY: receive FIFO non-empty.
@ k_ipc_sta_rerr
STA.RERR: read-while-empty sticky.
@ k_ipc_clr_fclr
CLR.FCLR: drop the FERR sticky.
@ k_ipc1_irq_event
ELC_EVENT_IPC_IRQ1 -> CPU1/M33.
@ k_ipc_clr_rclr
CLR.RCLR: drop the RERR sticky.
@ k_ipc_sta_ferr
STA.FERR: write-while-full sticky.
@ k_ipc_sta_irq_mask
Eight maskable IRQ-line bits.
@ k_ipc_clr_rst
CLR.RST: reset the message FIFO.
@ k_ipc_sta_full
STA.FULL: message FIFO full.
static RA8_INTERNAL void internal_ipc_report(void)
Print the IPC send / wake / FIFO totals when the path was exercised.
ipc_reg_off_t
Channel-window layout within the IPC register block.
@ k_ipc_ch_stride
Stride between consecutive channels.
@ k_ipc_reg_rxd
RXD FIFO receive register (read).
@ k_ipc_reg_txd
TXD FIFO transmit register (write).
@ k_ipc_reg_clr
CLR clear register (W1C).
@ k_ipc_reg_sta
STA pending-IRQ register (read).
@ k_ipc_reg_iset
ISET set-IRQ register (write).
@ k_ipc_ch0_off
IPC0 channel 0 (FIFO00) window base.
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 channel's 4-stage message FIFO plus its sticky error latches.
uint32_t word[k_ipc_fifo_depth]
Ring storage (oldest at rd).
bool rerr
Read-while-empty sticky latch.
uint32_t rd
Index of the oldest queued word.
uint32_t count
Queued words (0..depth).
bool ferr
Write-while-full sticky latch.
Modelled IPC state: per-channel IRQ bits + FIFOs plus run counters.
ipc_fifo_t fifo[k_ipc_ch_count]
Per-channel 4-stage message FIFO.
uint32_t wakes
Receiving-core ELC events raised.
uint32_t pops
RXD words drained from a FIFO.
uint32_t sta[k_ipc_ch_count]
Per-channel STA pending-IRQ shadow.
uint32_t pushes
TXD words accepted into a FIFO.
uint32_t sends
ISET writes that latched IRQ bits.