PicoRV32 wrapper – openenoc_picorv32
Wraps the bundled RISC-V processor with the project memory-bus adapter.
Source: openenoc_picorv32.sv.
Parameters
Name |
Default value |
Allowed values |
Description |
|---|---|---|---|
|
|
0 or 1 |
Enables instruction/cycle counter instructions. |
|
|
0 or 1 |
Enables upper counter words when counters are enabled. |
|
|
0 or 1 |
Includes the upper sixteen integer registers. |
|
|
0 or 1 |
Uses a dual-read-port integer register file. |
|
|
0 or 1 |
Uses the core two-stage shift implementation. |
|
|
0 or 1 |
Selects the barrel-shifter implementation. |
|
|
0 or 1 |
Adds a cycle to comparisons for timing. |
|
|
0 or 1 |
Adds a cycle to the ALU path for timing. |
|
|
0 or 1 |
Enables compressed RISC-V instructions. |
|
|
0 or 1 |
Traps misaligned memory accesses. |
|
|
0 or 1 |
Traps unsupported instructions. |
|
|
0 or 1 |
Enables the external coprocessor interface. |
|
|
0 or 1 |
Enables the iterative multiplication unit. |
|
|
0 or 1 |
Enables the fast multiplication unit. |
|
|
0 or 1 |
Enables the division unit. |
|
|
0 or 1 |
Enables PicoRV32 interrupt support. |
|
|
0 or 1 |
Uses the core interrupt context registers. |
|
|
0 or 1 |
Enables the interrupt timer. |
|
|
0 or 1 |
Enables execution trace output. |
|
|
0 or 1 |
Initializes integer registers to zero. |
|
|
32-bit mask |
Permanently masks the selected interrupt sources. |
|
|
32-bit mask |
Selects edge-latched interrupts; cleared bits use level-sensitive inputs. |
|
|
32-bit instruction address; aligned to enabled ISA |
Processor reset vector. |
|
|
32-bit instruction address; aligned to enabled ISA |
Processor interrupt vector. |
|
|
32-bit address; 0xffffffff disables initialization |
Initial stack pointer value. |
Signals
Name |
Type |
Direction / role |
Description |
|---|---|---|---|
|
|
input |
Clock for this component or interface domain. |
|
|
input |
Active-low processor/adapter reset. |
|
|
output |
Processor entered a trap state. |
|
|
output |
Write-address channel is valid. |
|
|
input |
Write-address channel acceptance. |
|
|
output |
Write byte address. |
|
|
output |
Write access attributes. |
|
|
output |
Write-data channel is valid. |
|
|
input |
Write-data channel acceptance. |
|
|
output |
Write data word. |
|
|
output |
Write-byte enables. |
|
|
input |
Write response is valid. |
|
|
output |
Write-response acceptance. |
|
|
output |
Read-address channel is valid. |
|
|
input |
Read-address channel acceptance. |
|
|
output |
Read byte address. |
|
|
output |
Read attributes; instruction fetch sets bit 2. |
|
|
input |
Read response is valid. |
|
|
output |
Read-response acceptance. |
|
|
input |
Read data word. |
|
|
output |
Coprocessor instruction request is valid. |
|
|
output |
Instruction presented to the coprocessor. |
|
|
output |
First coprocessor operand. |
|
|
output |
Second coprocessor operand. |
|
|
input |
Coprocessor result writes the destination register. |
|
|
input |
Coprocessor result word. |
|
|
input |
Coprocessor is processing the instruction. |
|
|
input |
Coprocessor instruction completed. |
|
|
input |
Processor interrupt input bitmap; sources 0..2 include core internal events. |
|
|
output |
Core end-of-interrupt indication bitmap. |
|
|
output |
Retirement observation is valid. Only with RISCV_FORMAL. |
|
|
output |
Retired instruction order. Only with RISCV_FORMAL. |
|
|
output |
Retired instruction bits. Only with RISCV_FORMAL. |
|
|
output |
Retired instruction trapped. Only with RISCV_FORMAL. |
|
|
output |
Retirement halt indication. Only with RISCV_FORMAL. |
|
|
output |
Retirement interrupt indication. Only with RISCV_FORMAL. |
|
|
output |
First source register index. Only with RISCV_FORMAL. |
|
|
output |
Second source register index. Only with RISCV_FORMAL. |
|
|
output |
First source register value. Only with RISCV_FORMAL. |
|
|
output |
Second source register value. Only with RISCV_FORMAL. |
|
|
output |
Destination register index. Only with RISCV_FORMAL. |
|
|
output |
Destination register value. Only with RISCV_FORMAL. |
|
|
output |
Program counter before retirement. Only with RISCV_FORMAL. |
|
|
output |
Program counter after retirement. Only with RISCV_FORMAL. |
|
|
output |
Observed memory byte address. Only with RISCV_FORMAL. |
|
|
output |
Observed memory-read byte mask. Only with RISCV_FORMAL. |
|
|
output |
Observed memory-write byte mask. Only with RISCV_FORMAL. |
|
|
output |
Observed memory-read value. Only with RISCV_FORMAL. |
|
|
output |
Observed memory-write value. Only with RISCV_FORMAL. |
|
|
output |
Execution trace word is valid. |
|
|
output |
Execution trace payload from the processor. |
The rvfi_* ports exist only when RISCV_FORMAL is defined.
Architecture and operation
The wrapper combines the bundled PicoRV32 core with the project’s AXI4-Lite
adapter. Its flattened mem_axi_* master connects to the endpoint memory
interconnect. clk and active-low resetn drive processor state; trap,
PCPI, IRQ/EOI, trace, and optional RISCV_FORMAL ports expose processor
integration signals.
Parameters pass through the PicoRV32 feature choices: counters, register-file
options, shifts and ALU timing, compressed instructions, exception checks,
PCPI/multiply/divide, IRQ features, trace, and initial register values.
PROGADDR_RESET, PROGADDR_IRQ, STACKADDR, MASKED_IRQ, and
LATCHED_IRQ define boot/interrupt configuration. The vendor core under
libs/picorv32 remains the source for its instruction/feature semantics.
Firmware boot, memory accesses, and interrupt handling are illustrated in the full endpoint reference. Adapter timing is described in PicoRV32 AXI4-Lite adapter – openenoc_picorv32_axil_adapter.