ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_npu_regs.h
Go to the documentation of this file.
1
47
48#pragma once
49
50#include <stdint.h>
51
52#include "ra8_attributes.h"
53#include "ra8_device.h"
54
55#ifndef RA8_HAS_NPU
56#error "ra8_npu_regs.h included on a device without an NPU (RA8P1-only)."
57#endif
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
75typedef enum : uintptr_t {
76 k_ra8_npu_base_addr = 0x40140000U,
78
111
139
153typedef enum : uint32_t {
157
178
204
222
236typedef enum : uint16_t {
239
269static inline volatile uint32_t* ra8_npu_reg(uint32_t byte_off)
270{
271 return (volatile uint32_t*)(k_ra8_npu_base_addr + (uintptr_t)byte_off);
272}
273
274#ifdef __cplusplus
275}
276#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_HW_REGISTER_ACCESS
Mark an MMIO accessor function (returns volatile register pointer).
Compile-time device selection for the RA8 multi-chip build (RA8D2 / RA8P1).
static volatile uint32_t * ra8_npu_reg(uint32_t byte_off)
Compute a volatile pointer to an NPU register by byte offset.
ra8_npu_region_idx_t
Base-pointer region indices (Ethos-U55 has eight AXI region bases).
@ k_ra8_npu_region_2
AXI region 2.
@ k_ra8_npu_region_6
AXI region 6.
@ k_ra8_npu_region_0
AXI region 0 (weights/biases by convention).
@ k_ra8_npu_region_5
AXI region 5.
@ k_ra8_npu_region_3
AXI region 3.
@ k_ra8_npu_region_1
AXI region 1.
@ k_ra8_npu_region_7
AXI region 7.
@ k_ra8_npu_region_4
AXI region 4.
@ k_ra8_npu_region_count
Number of BASEPn region base-pointer pairs.
ra8_npu_status_bit_t
Bit positions in the NPU_STATUS register.
@ k_ra8_npu_status_cmd_parse_bit
Command-stream parse error.
@ k_ra8_npu_status_ecc_fault_bit
Internal SRAM ECC fault.
@ k_ra8_npu_status_pmu_irq_bit
Performance-counter IRQ.
@ k_ra8_npu_status_cmd_end_bit
Command stream fully consumed.
@ k_ra8_npu_status_state_bit
1 = running, 0 = stopped.
@ k_ra8_npu_status_irq_raised_bit
IRQ asserted by the NPU.
@ k_ra8_npu_status_bus_error_bit
AXI bus error latched.
@ k_ra8_npu_status_wd_fault_bit
Weight-decoder fault.
@ k_ra8_npu_status_reset_bit
Reset in progress.
ra8_npu_layout_t
Byte offsets of the Ethos-U55 APB registers within the window.
@ k_ra8_npu_off_basep0_lo
BASEP0 bits [31:0] (region 0 base).
@ k_ra8_npu_off_regioncfg
REGIONCFG (per-region AXI attributes).
@ k_ra8_npu_off_qsize
QSIZE (cmd-stream length in bytes).
@ k_ra8_npu_off_id
NPU_ID (Arm Ethos-U arch id/revision).
@ k_ra8_npu_off_qbase_lo
QBASE bits [31:0] (cmd-stream address).
@ k_ra8_npu_off_qconfig
QCONFIG (cmd-stream AXI region config).
@ k_ra8_npu_off_prot
NPU_PROT (privilege/security, RO).
@ k_ra8_npu_off_cmd
NPU_CMD (run / clear-irq / q-enables).
@ k_ra8_npu_off_config
NPU_CONFIG (build-time macs/rev, RO).
@ k_ra8_npu_off_status
NPU_STATUS (state + fault flags, RO).
@ k_ra8_npu_off_qread
QREAD (cmd-stream read offset, RO).
@ k_ra8_npu_off_qbase_hi
QBASE bits [63:32].
@ k_ra8_npu_window_bytes
4 KiB register window.
@ k_ra8_npu_off_reset
NPU_RESET (software reset request).
ra8_npu_addr_t
Ethos-U55 register-window base and extent on the RA8P1.
@ k_ra8_npu_base_addr
R_NPU register window base (Ethos-U55).
ra8_npu_event_t
ICU/ELC event number for the NPU interrupt.
@ k_ra8_npu_event_irq
NPU_IRQ event (RA8P1 elc_event_t).
ra8_npu_cmd_bit_t
Bit positions in the NPU_CMD register.
@ k_ra8_npu_cmd_clock_q_bit
clock_q_enable.
@ k_ra8_npu_cmd_clear_irq_bit
clear_irq (write 1 to acknowledge IRQ).
@ k_ra8_npu_cmd_run_bit
transition_to_running_state (start job).
@ k_ra8_npu_cmd_power_q_bit
power_q_enable.
ra8_npu_reset_bit_t
Bit positions in the NPU_RESET register.
@ k_ra8_npu_reset_pending_csl_bit
Security level adopted after reset.
@ k_ra8_npu_reset_pending_cpl_bit
Privilege level adopted after reset.
ra8_npu_geom_t
Geometry of the 64-bit register pairs (QBASE, BASEPn).
@ k_ra8_npu_basep_stride_bytes
Bytes between BASEPn pairs (lo+hi).
@ k_ra8_npu_reg_hi_offset
Low->high word gap in a 64-bit reg.