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

One Ethos-U55 inference job: a command stream plus its tensor arenas. More...

#include <ra8_npu.h>

Data Fields

const void * cmd_stream
 Vela command stream base in SRAM.
uint32_t cmd_stream_bytes
 Command stream length in bytes (> 0).
uint8_t region_count
 Number of region_base[] entries in use.
uint64_t region_base [k_ra8_npu_region_count]
 AXI base of each BASEPn arena.

Detailed Description

One Ethos-U55 inference job: a command stream plus its tensor arenas.

cmd_stream / cmd_stream_bytes describe the Vela-produced command stream in SRAM that ra8_npu_submit() points QBASE/QSIZE at. region_base[i] is the AXI base address programmed into BASEPi, for the first region_count regions the command stream references (region 0 is the weight/bias arena by Vela convention). Unused entries are ignored.

Invariant
cmd_stream != nullptr and cmd_stream_bytes > 0.
region_count <= k_ra8_npu_region_count.
Example:
ra8_npu_job_t job = {};
job.cmd_stream = g_vela_cmd_stream;
job.cmd_stream_bytes = sizeof(g_vela_cmd_stream);
job.region_count = 3U;
job.region_base[k_ra8_npu_region_0] = (uint64_t)(uintptr_t)g_weights;
job.region_base[k_ra8_npu_region_1] = (uint64_t)(uintptr_t)g_scratch;
job.region_base[k_ra8_npu_region_2] = (uint64_t)(uintptr_t)g_io_arena;
@ k_ra8_npu_region_2
AXI region 2.
@ k_ra8_npu_region_0
AXI region 0 (weights/biases by convention).
@ k_ra8_npu_region_1
AXI region 1.
One Ethos-U55 inference job: a command stream plus its tensor arenas.
Definition ra8_npu.h:87
uint8_t region_count
Number of region_base[] entries in use.
Definition ra8_npu.h:90
uint32_t cmd_stream_bytes
Command stream length in bytes (> 0).
Definition ra8_npu.h:89
uint64_t region_base[k_ra8_npu_region_count]
AXI base of each BASEPn arena.
Definition ra8_npu.h:91
const void * cmd_stream
Vela command stream base in SRAM.
Definition ra8_npu.h:88
See also
ra8_npu_submit
Since
0.1.0

Definition at line 87 of file ra8_npu.h.

Field Documentation

◆ cmd_stream

const void* ra8_npu_job_t::cmd_stream

Vela command stream base in SRAM.

Definition at line 88 of file ra8_npu.h.

Referenced by internal_npu_infer_run_job_irq(), internal_npu_smoke_run_job(), internal_npu_vela_cmd_word(), and main().

◆ cmd_stream_bytes

uint32_t ra8_npu_job_t::cmd_stream_bytes

Command stream length in bytes (> 0).

Definition at line 89 of file ra8_npu.h.

Referenced by internal_npu_infer_run_job_irq(), and internal_npu_smoke_run_job().

◆ region_base

uint64_t ra8_npu_job_t::region_base[k_ra8_npu_region_count]

AXI base of each BASEPn arena.

Definition at line 91 of file ra8_npu.h.

Referenced by internal_npu_infer_run_job_irq(), internal_npu_smoke_run_job(), and internal_npu_vela_verify().

◆ region_count

uint8_t ra8_npu_job_t::region_count

Number of region_base[] entries in use.

Definition at line 90 of file ra8_npu.h.

Referenced by internal_npu_infer_run_job_irq(), and internal_npu_smoke_run_job().


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