46typedef enum : uint64_t {
61typedef enum : uint32_t {
73typedef enum : uint32_t {
80typedef enum : uint32_t {
109 return (uint32_t)(off >> 2U);
124 const uint32_t stride =
144 const uint32_t vwdth =
179 if ((line_bytes == 0U) || (lines == 0U)) {
192 for (uint32_t y = 0U; y < lines; y++) {
193 for (uint32_t x = 0U; x < line_bytes; x++) {
197 (uint64_t)dst + ((uint64_t)y * (uint64_t)line_bytes),
201 const uint32_t total = line_bytes * lines;
206 s_ceu.last_bytes = total;
207 s_ceu.last_w = line_bytes;
208 s_ceu.last_h = lines;
213 "CEU frame %ux%u -> %u bytes",
214 (
unsigned)line_bytes,
219 (void)
priv_emu_io_errf(
" [trace] CEU capture %ux%u -> 0x%08X\n", line_bytes, lines, dst);
241 const uint64_t off = addr - (uint64_t)
k_ceu_base;
271 const uint64_t off = addr - (uint64_t)
k_ceu_base;
314 if (
s_ceu.frames == 0U) {
317 (void)
priv_emu_io_errf(
" CEU : frames=%u last=%ux%u (%u bytes) synth test-pattern\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_dma
DMAC + DTC transfer-complete 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_ceu_reset(void)
Clear the CEU model to power-on state.
static RA8_INTERNAL void internal_board_periph_ceu_register(void)
Self-register the CEU block before main runs (decentralized).
static RA8_INTERNAL bool internal_ceu_do_capture(uc_engine *uc)
Synthesise one frame into the CDAYR buffer and latch CETCR.CPE.
ceu_bound_t
Field shift + fill bounds.
@ k_ceu_max_line
Max modelled line width (bytes) – QVGA=640.
@ k_ceu_max_lines
Max modelled line count – QVGA=240.
@ k_ceu_shift_vert
Vertical field shift (VCYL / VWDTH).
static const board_periph_block_t s_k_ceu_block
This block's descriptor (static lifetime; the core keeps the pointer).
static RA8_INTERNAL uint32_t internal_ceu_line_count(void)
Destination line count: CAPWR.VWDTH, else CMCYR.VCYL.
ceu_console_t
Console anti-flood cadence for the CEU (DMA/transfer) tab.
@ k_ceu_console_line_cap
Max chars in a "CEU frame .." line.
static RA8_INTERNAL uint32_t internal_ceu_word(uint64_t off)
Word index into the backing store for an in-window byte offset.
static RA8_INTERNAL void internal_ceu_report(void)
Print the CEU capture summary if any frame was synthesised.
static uint8_t s_ceu_line[k_ceu_max_line]
One-line fill scratch.
static RA8_INTERNAL void internal_ceu_write(uc_engine *uc, uint64_t addr, unsigned size, uint64_t value)
MMIO write inside the CEU window: latch, then act on CAPSR.
static RA8_INTERNAL uint32_t internal_ceu_line_bytes(void)
Destination line width (bytes): CDWDR stride, else CMCYR.HCYL.
static RA8_INTERNAL uint64_t internal_ceu_read(uc_engine *uc, uint64_t addr, unsigned size)
MMIO read inside the CEU window.
ceu_map_t
CEU register-window geometry (ra8_ceu_regs.h, Plane A view).
@ k_ceu_words
Backing-store word count.
@ k_ceu_base
CEU block base (HUM Ch 60).
@ k_ceu_off_capsr
CAPSR capture start (CE / CPKIL).
@ k_ceu_off_cdwdr
CDWDR destination stride.
@ k_ceu_off_capwr
CAPWR capture width (HWDTH / VWDTH).
@ k_ceu_off_cstsr
CSTSR capture status (CPTON).
@ k_ceu_off_cetcr
CETCR event flags (CPE, ...).
@ k_ceu_off_cdayr
CDAYR destination Y address.
@ k_ceu_off_cmcyr
CMCYR interface cycle (HCYL / VCYL).
@ k_ceu_off_cdssr
CDSSR captured data byte count.
@ k_ceu_span
Plane-A register set (0x00..0x9C).
ceu_field_t
CEU register bit fields (ra8_ceu_regs.h).
@ k_ceu_field_12bit
12-bit field (CAPWR VWDTH after >>16).
@ k_ceu_capsr_cpkil
CAPSR.CPKIL: software reset.
@ k_ceu_field_14bit
14-bit field (CMCYR VCYL after >>16).
@ k_ceu_cetcr_cpe
CETCR.CPE: one-frame capture end.
@ k_ceu_capwr_hwdth
CAPWR.HWDTH[12:0] / CDWDR stride mask.
@ k_ceu_pattern_mask
Test-pattern byte modulus.
@ k_ceu_cmcyr_hcyl
CMCYR.HCYL[13:0]: byte-cycles/line.
@ k_ceu_capsr_ce
CAPSR.CE: start capture at next VD.
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.
uc_err emu_mem_write(uc_engine *uc, uint64_t address, const void *bytes, size_t count)
Write guest memory through the central access seam.
#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.
CEU model state: register backing store + capture observability.
uint32_t last_h
Last capture line count.
uint32_t reg[k_ceu_words]
Plane-A register backing store.
uint32_t last_bytes
Bytes written by the last capture.
uint32_t frames
Frames synthesised (report).
uint32_t last_w
Last capture line width (bytes).