Merge branch 'main' into linty_test
Some checks failed
Documentation / SW Framework (push) Has been cancelled
Documentation / Datasheet (push) Has been cancelled
Linty / Linty (push) Has been cancelled
Processor / Software (push) Has been cancelled
Processor / Simple testbench (push) Has been cancelled
Processor / VUnit (push) Has been cancelled
Documentation / Deploy to Releases and Pages (push) Has been cancelled

This commit is contained in:
stnolting 2024-10-17 22:32:57 +02:00
commit 3df089c077
18 changed files with 166 additions and 231 deletions

View file

@ -97,7 +97,6 @@ jobs:
- name: '🚀 Deploy to GitHub-Pages'
run: |
ls -al
cd public
git init
cp ../.git/config ./.git/config

View file

@ -29,7 +29,8 @@ mimpid = 0x01040312 -> Version 01.04.03.12 -> v1.4.3.12
| Date | Version | Comment | Ticket |
|:----:|:-------:|:--------|:------:|
| 11.10.2024 | 1.10.5.5 | :sparkles: :lock: add optional support for on-chip debugger authentication; :warning: rename OCD-related top generics | [#](https://github.com/stnolting/neorv32/pull/1053) |
| 12.10.2024 | 1.10.5.6 | :warning: remove legacy support for on-chip debugger DM version v0.13; now only supporting DM v1.0 (removing `OCD_DM_LEGACY_MODE` generic) | [#1056](https://github.com/stnolting/neorv32/pull/1056) |
| 11.10.2024 | 1.10.5.5 | :sparkles: :lock: add support for optional on-chip debugger authentication; :warning: rename OCD-related top generics | [#1053](https://github.com/stnolting/neorv32/pull/1053) |
| 06.10.2024 | 1.10.5.4 | :warning: rework PWM module | [#1049](https://github.com/stnolting/neorv32/pull/1049) |
| 05.10.2024 | 1.10.5.3 | upgrade neoTRNG to version 3.2 | [#1048](https://github.com/stnolting/neorv32/pull/1048) |
| 03.10.2024 | 1.10.5.2 | :warning: remove `A` ISA extensions; replaced by new `Zalrsc` ISA extension | [#1047](https://github.com/stnolting/neorv32/pull/1047) |

View file

@ -3,9 +3,8 @@ message: "If you are using this project, please cite it as below."
authors:
- family-names: "Nolting"
given-names: "Stephan"
- family-names: "All the Awesome Contributors"
- family-names: "All The Awesome Contributors"
given-names: ""
title: "The NEORV32 RISC-V Processor"
doi: 10.5281/zenodo.5018888
date-released: 2023-08-06
doi: 10.5281/zenodo.13872735
url: "https://github.com/stnolting/neorv32"

View file

@ -1,3 +1,5 @@
:author: The NEORV32 Community and Stephan Nolting
:email: stnolting@gmail.com
:keywords: neorv32, risc-v, riscv, rv32, fpga, soft-core, vhdl, microcontroller, cpu, soc, processor, gcc, openocd, gdb, verilog, rtl, asip, asic, safety
:description: A size-optimized, customizable and highly extensible MCU-class 32-bit RISC-V soft-core CPU and microcontroller-like SoC written in platform-independent VHDL.
:revnumber: v1.10.5
@ -8,4 +10,4 @@
:listing-caption: Listing
:toclevels: 3
:title-logo-image: neorv32_logo_riscv.png[pdfwidth=6.25in,align=center]
:favicon: img/icon.png
:favicon: img/icon.png

View file

@ -158,8 +158,7 @@ single hart and provides the following architectural core features:
.DM Spec. Version
[TIP]
By default, the OCD's debug module supports version 1.0 of the RISC-V debug spec. However, for backwards compatibility the
DM can be downgraded back to version 0.13 via the see <<_processor_top_entity_generics, `OCD_DM_LEGACY_MODE`>> top generic.
The NEORV32 DM complies to the RISC-V DM spec version 1.0.
From the DTM's point of view, the DM implements a set of <<_dm_registers>> that are used to control and monitor the
debugging session. From the CPU's point of view, the DM implements several memory-mapped registers that are used for
@ -192,8 +191,7 @@ to these registers will always return zero.
| 0x20 | <<_progbuf, `progbuf0`>> | Program buffer 0
| 0x21 | <<_progbuf, `progbuf1`>> | Program buffer 1
| 0x30 | <<_authdata>> | Data to/from the authentication module
| 0x38 | `sbcs` | System bus access control and status; reads as zero to indicate there is **no** direct system bus access
| 0x40 | <<_haltsum0>> | Halted harts
| 0x38 | `sbcs` | System bus access control and status; reads as zero to indicate there is **no** system bus access
|=======================
@ -269,7 +267,7 @@ are configured as "zero" and are read-only. Writing '1' to these bits/fields wil
| 6 | `authbusy` | set if authentication is busy, see <<_debug_authentication>>
| 5 | `hasresethaltreq` | `0`: halt-on-reset is not supported (directly)
| 4 | `confstrptrvalid` | `0`: no configuration string available
| 3:0 | `version` | debug spec. version; `0011` (v1.0) or `0010` (v0.13); configured via the <<_processor_top_entity_generics, `OCD_DM_LEGACY_MODE`>> top generic
| 3:0 | `version` | `0011`: DM compatible to debug spec. version v1.0
|=======================
@ -412,27 +410,6 @@ hart's GPRs x0 - x15/31 (abstract command register index `0x1000` - `0x101f`).
|======
:sectnums!:
===== **`haltsum0`**
[cols="4,27,>7"]
[frame="topbot",grid="none"]
|======
| 0x408 | **Halted harts status** | `haltsum0`
3+| Reset value: `0x00000000`
3+| Hart has halted when according bit is set.
|======
.`haltsum0` Register Bits
[cols="^1,^2,^1,<8"]
[options="header",grid="rows"]
|=======================
| Bit | Name [RISC-V] | R/W | Description
| 0 | `haltsum0[0]` | r/- | Hart is halted when set.
|=======================
:sectnums:
==== DM CPU Access

View file

@ -210,7 +210,6 @@ The generic type "`suv(x:y)`" is an abbreviation for "`std_ulogic_vector(x downt
| `JEDEC_ID` | suv(10:0) | 0b00000000000 | JEDEC ID; continuation codes plus vendor ID (passed to <<_mvendorid>> CSR and to the <<_debug_transport_module_dtm>>).
4+^| **<<_on_chip_debugger_ocd>>**
| `OCD_EN` | boolean | false | Implement the on-chip debugger and the CPU debug mode.
| `OCD_DM_LEGACY_MODE` | boolean | false | Debug module spec. version: `false` = v1.0, `true` = v0.13 (legacy mode).
| `OCD_AUTHENTICATION` | boolean | false | Implement <<_debug_authentication>> module.
4+^| **CPU <<_instruction_sets_and_extensions>>**
| `RISCV_ISA_C` | boolean | false | Enable <<_c_isa_extension>> (compressed instructions).

View file

@ -1,6 +1,7 @@
## :copyright: Image License and Copyright Notifications
Figures are own work if not otherwise stated; see the [project's license](https://github.com/stnolting/neorv32/blob/main/LICENSE).
Figures are own work if not otherwise stated; see the
[project's license](https://github.com/stnolting/neorv32/blob/main/LICENSE).
No copyright infringement intended.
- `SPI_timing_diagram2.wikimedia.png`
@ -11,10 +12,6 @@ No copyright infringement intended.
- source: https://riscv.org/risc-v-logo/
- license: https://riscv.org/about/risc-v-branding-guidelines/
- `oshw_logo.png`
- source: https://www.oshwa.org/open-source-hardware-logo/
- license: Creative Commons Attribution-ShareAlike 4.0 International License
- `neorv32_logo_smcard.jpg`
- source: background image by https://pixabay.com
- license: Pixabay license

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

@ -11,7 +11,7 @@
https://github.com/stnolting/neorv32 +
Stephan Nolting, M.Sc. +
🇪🇺 European Union +
`stnolting[ät]gmail[d0t]com`
stnolting@gmail.com
==========================

View file

@ -2,9 +2,9 @@
-- NEORV32 SoC - RISC-V-Compatible Authentication Module for the On-Chip Debugger --
-- -------------------------------------------------------------------------------- --
-- Note that this module (in its default state) just provides a very simple and --
-- UNSECUR authentication mechanism that is meant as an example to showcase the --
-- interface. Users should replace this module to implement a custom authentication --
-- (and SECURE) mechanism. --
-- UNSECURE authentication mechanism that is meant as an example to showcase the --
-- interface. Users should replace this module to implement a custom (and SECURE) --
-- authentication mechanism. --
-- -------------------------------------------------------------------------------- --
-- The NEORV32 RISC-V Processor - https://github.com/stnolting/neorv32 --
-- Copyright (c) NEORV32 contributors. --
@ -15,6 +15,7 @@
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library neorv32;
use neorv32.neorv32_package.all;
@ -44,7 +45,7 @@ begin
-- Warn about Default Authenticator -------------------------------------------------------
-- -------------------------------------------------------------------------------------------
assert false report "[NEORV32] OCD: using DEFAULT authenticator. Replace by custom module." severity warning;
assert false report "[NEORV32] using DEFAULT on-chip debugger authenticator. Replace by custom module." severity warning;
-- Exemplary Authentication Mechanism -----------------------------------------------------

View file

@ -20,7 +20,6 @@ use neorv32.neorv32_package.all;
entity neorv32_debug_dm is
generic (
CPU_BASE_ADDR : std_ulogic_vector(31 downto 0); -- base address for the memory-mapped CPU interface registers
LEGACY_MODE : boolean; -- false = spec. v1.0, true = spec. v0.13
AUTHENTICATOR : boolean -- implement authentication module when true
);
port (
@ -66,12 +65,11 @@ architecture neorv32_debug_dm_rtl of neorv32_debug_dm is
constant addr_abstractcs_c : std_ulogic_vector(6 downto 0) := "0010110";
constant addr_command_c : std_ulogic_vector(6 downto 0) := "0010111";
constant addr_abstractauto_c : std_ulogic_vector(6 downto 0) := "0011000";
constant addr_nextdm_c : std_ulogic_vector(6 downto 0) := "0011101";
--constant addr_nextdm_c : std_ulogic_vector(6 downto 0) := "0011101"; -- hardwired to zero
constant addr_progbuf0_c : std_ulogic_vector(6 downto 0) := "0100000";
constant addr_progbuf1_c : std_ulogic_vector(6 downto 0) := "0100001";
constant addr_authdata_c : std_ulogic_vector(6 downto 0) := "0110000";
constant addr_sbcs_c : std_ulogic_vector(6 downto 0) := "0111000";
constant addr_haltsum0_c : std_ulogic_vector(6 downto 0) := "1000000";
--constant addr_sbcs_c : std_ulogic_vector(6 downto 0) := "0111000"; -- hardwired to zero
-- DMI access --
signal dmi_wren, dmi_wren_auth, dmi_rden, dmi_rden_auth : std_ulogic;
@ -106,8 +104,7 @@ architecture neorv32_debug_dm_rtl of neorv32_debug_dm is
-- ----------------------------------------------------------
-- DM configuration --
constant dataaddr_c : std_ulogic_vector(11 downto 0) := dm_data_base_c(11 downto 0); -- signed base address of data registers in memory/CSR space
constant dm_version_c : std_ulogic_vector(3 downto 0) := cond_sel_suv_f(LEGACY_MODE, "0010", "0011"); -- version: v0.13 / v1.0
constant dataaddr_c : std_ulogic_vector(11 downto 0) := dm_data_base_c(11 downto 0); -- signed base address of data registers in memory/CSR space
-- debug module controller --
type dm_ctrl_state_t is (CMD_IDLE, CMD_CHECK, CMD_PREPARE, CMD_TRIGGER, CMD_BUSY, CMD_ERROR);
@ -192,13 +189,6 @@ architecture neorv32_debug_dm_rtl of neorv32_debug_dm is
begin
-- Configuration Info ---------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
assert not (LEGACY_MODE = true) report "[NEORV32] OCD: DM compatible to debug spec. version 0.13" severity note;
assert not (LEGACY_MODE = false) report "[NEORV32] OCD: DM compatible to debug spec. version 1.0" severity note;
assert not (AUTHENTICATOR = false) report "[NEORV32] OCD: authentication enabled." severity note;
-- DMI Access -----------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- any access --
@ -227,7 +217,6 @@ begin
dm_ctrl.ldsw_progbuf <= instr_sw_c;
dci.execute_req <= '0';
dm_ctrl.pbuf_en <= '0';
--
dm_ctrl.illegal_cmd <= '0';
dm_ctrl.illegal_state <= '0';
dm_ctrl.cmderr <= (others => '0');
@ -273,7 +262,7 @@ begin
when CMD_PREPARE => -- setup program buffer
-- ------------------------------------------------------------
if (dm_reg.command(17) = '1') then -- "transfer"
if (dm_reg.command(17) = '1') then -- "transfer" (GPR <-> DM.data0)
if (dm_reg.command(16) = '0') then -- "write" = 0 -> read from GPR
dm_ctrl.ldsw_progbuf <= instr_sw_c;
dm_ctrl.ldsw_progbuf(31 downto 25) <= dataaddr_c(11 downto 5); -- destination address
@ -347,8 +336,7 @@ begin
dm_ctrl.hart_resume_ack <= '0';
dm_ctrl.hart_reset <= '0';
elsif rising_edge(clk_i) then
-- HALTED ACK --
-- halted ACK --
if (dm_reg.dmcontrol_ndmreset = '1') then
dm_ctrl.hart_halted <= '0';
elsif (dci.halt_ack = '1') then
@ -356,8 +344,7 @@ begin
elsif (dci.resume_ack = '1') then
dm_ctrl.hart_halted <= '0';
end if;
-- RESUME REQ --
-- resume REQ --
if (dm_reg.dmcontrol_ndmreset = '1') then
dm_ctrl.hart_resume_req <= '0';
elsif (dm_reg.resume_req = '1') then
@ -365,8 +352,7 @@ begin
elsif (dci.resume_ack = '1') then
dm_ctrl.hart_resume_req <= '0';
end if;
-- RESUME ACK --
-- resume ACK --
if (dm_reg.dmcontrol_ndmreset = '1') then
dm_ctrl.hart_resume_ack <= '0';
elsif (dci.resume_ack = '1') then
@ -374,14 +360,12 @@ begin
elsif (dm_reg.resume_req = '1') then
dm_ctrl.hart_resume_ack <= '0';
end if;
-- hart has been RESET --
-- reset ACK --
if (dm_reg.dmcontrol_ndmreset = '1') then -- explicit RESET triggered by DM
dm_ctrl.hart_reset <= '1';
elsif (dm_reg.reset_ack = '1') then
dm_ctrl.hart_reset <= '0';
end if;
end if;
end process hart_status;
@ -489,7 +473,7 @@ begin
cpu_ndmrstn_o <= '0' when (dm_reg.dmcontrol_ndmreset = '1') and (dm_reg.dmcontrol_dmactive = '1') and ((not AUTHENTICATOR) or (auth.valid = '1')) else '1';
-- construct program buffer array for CPU access --
cpu_progbuf(0) <= dm_ctrl.ldsw_progbuf; -- pseudo program buffer for GPR access
cpu_progbuf(0) <= dm_ctrl.ldsw_progbuf; -- pseudo program buffer for GPR<->DM.data0 transfer
cpu_progbuf(1) <= instr_nop_c when (dm_ctrl.pbuf_en = '0') else dm_reg.progbuf(0);
cpu_progbuf(2) <= instr_nop_c when (dm_ctrl.pbuf_en = '0') else dm_reg.progbuf(1);
cpu_progbuf(3) <= instr_ebreak_c; -- implicit ebreak instruction
@ -530,9 +514,9 @@ begin
dmi_rsp_o.data(5) <= '0'; -- hasresethaltreq (r/-): halt-on-reset not implemented
dmi_rsp_o.data(4) <= '0'; -- confstrptrvalid (r/-): no configuration string available
end if;
dmi_rsp_o.data(7) <= auth.valid; -- authenticated (r/-): authentication successful when set
dmi_rsp_o.data(6) <= auth.busy; -- authbusy (r/-): wait for authenticator operation when set
dmi_rsp_o.data(3 downto 0) <= dm_version_c; -- version (r/-): DM spec. version
dmi_rsp_o.data(7) <= auth.valid; -- authenticated (r/-): authentication successful when set
dmi_rsp_o.data(6) <= auth.busy; -- authbusy (r/-): wait for authenticator operation when set
dmi_rsp_o.data(3 downto 0) <= "0011"; -- version (r/-): DM spec. version v1.0
-- debug module control --
when addr_dmcontrol_c =>
@ -589,34 +573,18 @@ begin
dmi_rsp_o.data <= dci.data_reg;
end if;
-- program buffer 0 --
when addr_progbuf0_c =>
if (not AUTHENTICATOR) or (auth.valid = '1') then -- authenticated?
if LEGACY_MODE then
dmi_rsp_o.data <= dm_reg.progbuf(0);
end if;
end if;
-- program buffer 1 --
when addr_progbuf1_c =>
if (not AUTHENTICATOR) or (auth.valid = '1') then -- authenticated?
if LEGACY_MODE then
dmi_rsp_o.data <= dm_reg.progbuf(1);
end if;
end if;
-- authentication --
when addr_authdata_c =>
dmi_rsp_o.data <= auth.rdata;
-- halt summary 0 --
when addr_haltsum0_c =>
if (not AUTHENTICATOR) or (auth.valid = '1') then -- authenticated?
dmi_rsp_o.data(0) <= dm_ctrl.hart_halted; -- hart 0 is halted
end if;
-- -- halt summary 0 (not required for DM spec. v1.0 if there is only a single hart) --
-- when "1000000" => -- haltsum0
-- if (not AUTHENTICATOR) or (auth.valid = '1') then -- authenticated?
-- dmi_rsp_o.data(0) <= dm_ctrl.hart_halted; -- hart 0 is halted
-- end if;
-- not implemented or read-only-zero --
when others => -- addr_sbcs_c, addr_nextdm_c, addr_command_c
when others => -- addr_sbcs_c, addr_progbuf0_c, addr_progbuf1_c, addr_nextdm_c, addr_command_c
dmi_rsp_o.data <= (others => '0');
end case;
@ -627,7 +595,7 @@ begin
((dmi_req_i.addr = addr_data0_c) or (dmi_req_i.addr = addr_progbuf0_c) or (dmi_req_i.addr = addr_progbuf1_c)) then
dm_reg.rd_acc_err <= '1';
else
dm_reg.rd_acc_err <= '0';
dm_reg.rd_acc_err <= '0';
end if;
-- auto execution trigger --

View file

@ -29,7 +29,7 @@ package neorv32_package is
-- Architecture Constants -----------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01100505"; -- hardware version
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01100506"; -- hardware version
constant archid_c : natural := 19; -- official RISC-V architecture ID
constant XLEN : natural := 32; -- native data path width
@ -123,7 +123,6 @@ package neorv32_package is
-- -------------------------------------------------------------------------------------------
-- bus request --
type bus_req_t is record
-- in-band signals --
addr : std_ulogic_vector(31 downto 0); -- access address
data : std_ulogic_vector(31 downto 0); -- write data
ben : std_ulogic_vector(3 downto 0); -- byte enable
@ -132,8 +131,7 @@ package neorv32_package is
src : std_ulogic; -- access source (1=instruction fetch, 0=data access)
priv : std_ulogic; -- set if privileged (machine-mode) access
rvso : std_ulogic; -- set if reservation set operation (atomic LR/SC)
-- out-of-band signals --
fence : std_ulogic; -- set if fence(.i) operation, single-shot
fence : std_ulogic; -- set if fence(.i) operation, single-shot (out-of-band)
end record;
-- bus response --
@ -677,7 +675,6 @@ package neorv32_package is
INT_BOOTLOADER_EN : boolean := false;
-- On-Chip Debugger (OCD) --
OCD_EN : boolean := false;
OCD_DM_LEGACY_MODE : boolean := false;
OCD_AUTHENTICATION : boolean := false;
-- RISC-V CPU Extensions --
RISCV_ISA_C : boolean := false;

View file

@ -38,7 +38,7 @@ entity neorv32_sysinfo is
XIP_CACHE_EN : boolean; -- implement execute in place cache?
XIP_CACHE_NUM_BLOCKS : natural; -- number of blocks (min 1), has to be a power of 2
XIP_CACHE_BLOCK_SIZE : natural; -- block size in bytes (min 4), has to be a power of 2
ON_CHIP_DEBUGGER_EN : boolean; -- implement OCD?
OCD_EN : boolean; -- implement OCD?
OCD_AUTHENTICATION : boolean; -- implement OCD authenticator?
IO_GPIO_EN : boolean; -- implement general purpose IO port (GPIO)?
IO_MTIME_EN : boolean; -- implement machine system timer (MTIME)?
@ -74,6 +74,7 @@ architecture neorv32_sysinfo_rtl of neorv32_sysinfo is
constant int_dmem_en_c : boolean := MEM_INT_DMEM_EN and boolean(MEM_INT_DMEM_SIZE > 0);
constant xcache_en_c : boolean := XBUS_EN and XBUS_CACHE_EN;
constant xip_cache_en_c : boolean := XIP_EN and XIP_CACHE_EN;
constant ocd_auth_en_c : boolean := OCD_EN and OCD_AUTHENTICATION;
-- system information memory --
type sysinfo_t is array (0 to 3) of std_ulogic_vector(31 downto 0);
@ -106,38 +107,38 @@ begin
sysinfo(1)(31 downto 24) <= (others => '0'); -- reserved
-- SYSINFO(2): SoC Configuration --
sysinfo(2)(0) <= '1' when INT_BOOTLOADER_EN else '0'; -- processor-internal bootloader implemented?
sysinfo(2)(1) <= '1' when XBUS_EN else '0'; -- external bus interface implemented?
sysinfo(2)(2) <= '1' when int_imem_en_c else '0'; -- processor-internal instruction memory implemented?
sysinfo(2)(3) <= '1' when int_dmem_en_c else '0'; -- processor-internal data memory implemented?
sysinfo(2)(4) <= '1' when ON_CHIP_DEBUGGER_EN else '0'; -- on-chip debugger implemented?
sysinfo(2)(5) <= '1' when ICACHE_EN else '0'; -- processor-internal instruction cache implemented?
sysinfo(2)(6) <= '1' when DCACHE_EN else '0'; -- processor-internal data cache implemented?
sysinfo(2)(7) <= '1' when CLOCK_GATING_EN else '0'; -- enable clock gating when in sleep mode
sysinfo(2)(8) <= '1' when xcache_en_c else '0'; -- external bus interface cache implemented?
sysinfo(2)(9) <= '1' when XIP_EN else '0'; -- execute in-place module implemented?
sysinfo(2)(10) <= '1' when xip_cache_en_c else '0'; -- execute in-place cache implemented?
sysinfo(2)(11) <= '1' when OCD_AUTHENTICATION else '0'; -- on-chip debugger authentication implemented?
sysinfo(2)(12) <= '0'; -- reserved
sysinfo(2)(13) <= '0'; -- reserved
sysinfo(2)(14) <= '1' when IO_DMA_EN else '0'; -- direct memory access controller (DMA) implemented?
sysinfo(2)(15) <= '1' when IO_GPIO_EN else '0'; -- general purpose input/output port unit (GPIO) implemented?
sysinfo(2)(16) <= '1' when IO_MTIME_EN else '0'; -- machine system timer (MTIME) implemented?
sysinfo(2)(17) <= '1' when IO_UART0_EN else '0'; -- primary universal asynchronous receiver/transmitter (UART0) implemented?
sysinfo(2)(18) <= '1' when IO_SPI_EN else '0'; -- serial peripheral interface (SPI) implemented?
sysinfo(2)(19) <= '1' when IO_TWI_EN else '0'; -- two-wire interface (TWI) implemented?
sysinfo(2)(20) <= '1' when IO_PWM_EN else '0'; -- pulse-width modulation unit (PWM) implemented?
sysinfo(2)(21) <= '1' when IO_WDT_EN else '0'; -- watch dog timer (WDT) implemented?
sysinfo(2)(22) <= '1' when IO_CFS_EN else '0'; -- custom functions subsystem (CFS) implemented?
sysinfo(2)(23) <= '1' when IO_TRNG_EN else '0'; -- true random number generator (TRNG) implemented?
sysinfo(2)(24) <= '1' when IO_SDI_EN else '0'; -- serial data interface (SDI) implemented?
sysinfo(2)(25) <= '1' when IO_UART1_EN else '0'; -- secondary universal asynchronous receiver/transmitter (UART1) implemented?
sysinfo(2)(26) <= '1' when IO_NEOLED_EN else '0'; -- NeoPixel-compatible smart LED interface (NEOLED) implemented?
sysinfo(2)(27) <= '1' when IO_XIRQ_EN else '0'; -- external interrupt controller (XIRQ) implemented?
sysinfo(2)(28) <= '1' when IO_GPTMR_EN else '0'; -- general purpose timer (GPTMR) implemented?
sysinfo(2)(29) <= '1' when IO_SLINK_EN else '0'; -- stream link interface (SLINK) implemented?
sysinfo(2)(30) <= '1' when IO_ONEWIRE_EN else '0'; -- 1-wire interface (ONEWIRE) implemented?
sysinfo(2)(31) <= '1' when IO_CRC_EN else '0'; -- cyclic redundancy check unit (CRC) implemented?
sysinfo(2)(0) <= '1' when INT_BOOTLOADER_EN else '0'; -- processor-internal bootloader implemented?
sysinfo(2)(1) <= '1' when XBUS_EN else '0'; -- external bus interface implemented?
sysinfo(2)(2) <= '1' when int_imem_en_c else '0'; -- processor-internal instruction memory implemented?
sysinfo(2)(3) <= '1' when int_dmem_en_c else '0'; -- processor-internal data memory implemented?
sysinfo(2)(4) <= '1' when OCD_EN else '0'; -- on-chip debugger implemented?
sysinfo(2)(5) <= '1' when ICACHE_EN else '0'; -- processor-internal instruction cache implemented?
sysinfo(2)(6) <= '1' when DCACHE_EN else '0'; -- processor-internal data cache implemented?
sysinfo(2)(7) <= '1' when CLOCK_GATING_EN else '0'; -- enable clock gating when in sleep mode
sysinfo(2)(8) <= '1' when xcache_en_c else '0'; -- external bus interface cache implemented?
sysinfo(2)(9) <= '1' when XIP_EN else '0'; -- execute in-place module implemented?
sysinfo(2)(10) <= '1' when xip_cache_en_c else '0'; -- execute in-place cache implemented?
sysinfo(2)(11) <= '1' when ocd_auth_en_c else '0'; -- on-chip debugger authentication implemented?
sysinfo(2)(12) <= '0'; -- reserved
sysinfo(2)(13) <= '0'; -- reserved
sysinfo(2)(14) <= '1' when IO_DMA_EN else '0'; -- direct memory access controller (DMA) implemented?
sysinfo(2)(15) <= '1' when IO_GPIO_EN else '0'; -- general purpose input/output port unit (GPIO) implemented?
sysinfo(2)(16) <= '1' when IO_MTIME_EN else '0'; -- machine system timer (MTIME) implemented?
sysinfo(2)(17) <= '1' when IO_UART0_EN else '0'; -- primary universal asynchronous receiver/transmitter (UART0) implemented?
sysinfo(2)(18) <= '1' when IO_SPI_EN else '0'; -- serial peripheral interface (SPI) implemented?
sysinfo(2)(19) <= '1' when IO_TWI_EN else '0'; -- two-wire interface (TWI) implemented?
sysinfo(2)(20) <= '1' when IO_PWM_EN else '0'; -- pulse-width modulation unit (PWM) implemented?
sysinfo(2)(21) <= '1' when IO_WDT_EN else '0'; -- watch dog timer (WDT) implemented?
sysinfo(2)(22) <= '1' when IO_CFS_EN else '0'; -- custom functions subsystem (CFS) implemented?
sysinfo(2)(23) <= '1' when IO_TRNG_EN else '0'; -- true random number generator (TRNG) implemented?
sysinfo(2)(24) <= '1' when IO_SDI_EN else '0'; -- serial data interface (SDI) implemented?
sysinfo(2)(25) <= '1' when IO_UART1_EN else '0'; -- secondary universal asynchronous receiver/transmitter (UART1) implemented?
sysinfo(2)(26) <= '1' when IO_NEOLED_EN else '0'; -- NeoPixel-compatible smart LED interface (NEOLED) implemented?
sysinfo(2)(27) <= '1' when IO_XIRQ_EN else '0'; -- external interrupt controller (XIRQ) implemented?
sysinfo(2)(28) <= '1' when IO_GPTMR_EN else '0'; -- general purpose timer (GPTMR) implemented?
sysinfo(2)(29) <= '1' when IO_SLINK_EN else '0'; -- stream link interface (SLINK) implemented?
sysinfo(2)(30) <= '1' when IO_ONEWIRE_EN else '0'; -- 1-wire interface (ONEWIRE) implemented?
sysinfo(2)(31) <= '1' when IO_CRC_EN else '0'; -- cyclic redundancy check unit (CRC) implemented?
-- SYSINFO(3): Cache Configuration --
sysinfo(3)(3 downto 0) <= std_ulogic_vector(to_unsigned(index_size_f(ICACHE_BLOCK_SIZE), 4)) when ICACHE_EN else (others => '0'); -- i-cache: log2(block_size_in_bytes)

View file

@ -30,7 +30,6 @@ entity neorv32_top is
-- On-Chip Debugger (OCD) --
OCD_EN : boolean := false; -- implement on-chip debugger
OCD_DM_LEGACY_MODE : boolean := false; -- debug module spec version: false = v1.0, true = v0.13
OCD_AUTHENTICATION : boolean := false; -- implement on-chip debugger authentication
-- RISC-V CPU Extensions --
@ -253,7 +252,6 @@ architecture neorv32_top_rtl of neorv32_top is
constant io_pwm_en_c : boolean := boolean(IO_PWM_NUM_CH > 0);
constant cpu_smpmp_c : boolean := boolean(PMP_NUM_REGIONS > 0);
constant io_sysinfo_en_c : boolean := not IO_DISABLE_SYSINFO;
constant ocd_auth_en_c : boolean := OCD_EN and OCD_AUTHENTICATION;
-- convert JEDEC ID to mvendorid CSR --
constant vendorid_c : std_ulogic_vector(31 downto 0) := x"00000" & "0" & JEDEC_ID;
@ -360,8 +358,7 @@ begin
cond_sel_string_f(IO_SLINK_EN, "SLINK ", "") &
cond_sel_string_f(IO_CRC_EN, "CRC ", "") &
cond_sel_string_f(io_sysinfo_en_c, "SYSINFO ", "") &
cond_sel_string_f(OCD_EN, "OCD ", "") &
cond_sel_string_f(ocd_auth_en_c, "OCD-AUTH ", "") &
cond_sel_string_f(OCD_EN, cond_sel_string_f(OCD_AUTHENTICATION, "OCD-AUTH ", "OCD "), "") &
""
severity note;
@ -1573,8 +1570,8 @@ begin
XIP_CACHE_EN => XIP_CACHE_EN,
XIP_CACHE_NUM_BLOCKS => XIP_CACHE_NUM_BLOCKS,
XIP_CACHE_BLOCK_SIZE => XIP_CACHE_BLOCK_SIZE,
ON_CHIP_DEBUGGER_EN => OCD_EN,
OCD_AUTHENTICATION => ocd_auth_en_c,
OCD_EN => OCD_EN,
OCD_AUTHENTICATION => OCD_AUTHENTICATION,
IO_GPIO_EN => io_gpio_en_c,
IO_MTIME_EN => IO_MTIME_EN,
IO_UART0_EN => IO_UART0_EN,
@ -1641,7 +1638,6 @@ begin
neorv32_debug_dm_inst: entity neorv32.neorv32_debug_dm
generic map (
CPU_BASE_ADDR => base_io_dm_c,
LEGACY_MODE => OCD_DM_LEGACY_MODE,
AUTHENTICATOR => OCD_AUTHENTICATION
)
port map (

View file

@ -11,7 +11,6 @@
# -- SPDX-License-Identifier: BSD-3-Clause --
# -- ================================================================================ --
# **************************************************************
# Global configuration
# **************************************************************
@ -21,7 +20,6 @@ set ip_logo docs/figures/neorv32_logo_riscv_small.png
set outputdir neorv32_vivado_ip_work
set cur_dir [file normalize .]
# **************************************************************
# Create empty (!) output/working directory
# **************************************************************
@ -32,14 +30,12 @@ if {[llength $files] != 0} {
file delete -force {*}[glob -directory $outputdir *];
}
# **************************************************************
# Create Vivado project
# **************************************************************
create_project "neorv32-ip" $outputdir
#set_property target_language VHDL [current_project]
# **************************************************************
# Import HDL source files
# **************************************************************
@ -58,20 +54,20 @@ set_property top $ip_top [current_fileset]
update_compile_order -fileset sources_1
# **************************************************************
# Package as IP block
# **************************************************************
ipx::package_project -root_dir $outputdir/packaged_ip -vendor NEORV32 -library user -taxonomy /UserIP -import_files -set_current true -force
set_property display_name "NEORV32" [ipx::current_core]
set_property vendor_display_name "Stephan Nolting" [ipx::current_core]
set_property company_url https://github.com/stnolting/neorv32 [ipx::current_core]
set_property description "The NEORV32 RISC-V Processor" [ipx::current_core]
# **************************************************************
# Set configuration dependencies: Interfaces
# Interfaces: Configuration Dependencies
# **************************************************************
set_property enablement_dependency {$axi4_stream_en = true} [ipx::get_ports s0_axis_* -of_objects [ipx::current_core]]
set_property enablement_dependency {$axi4_stream_en = true} [ipx::get_ports s1_axis_* -of_objects [ipx::current_core]]
set_property enablement_dependency {$axi4_stream_en = true} [ipx::get_bus_interfaces s0_axis -of_objects [ipx::current_core]]
set_property enablement_dependency {$axi4_stream_en = true} [ipx::get_bus_interfaces s1_axis -of_objects [ipx::current_core]]
set_property enablement_dependency {$ocd_en = true} [ipx::get_ports jtag_* -of_objects [ipx::current_core]]
set_property enablement_dependency {$xip_en = true} [ipx::get_ports xip_* -of_objects [ipx::current_core]]
set_property enablement_dependency {$io_gpio_en = true} [ipx::get_ports gpio_* -of_objects [ipx::current_core]]
@ -126,7 +122,6 @@ ipgui::move_param -component [ipx::current_core] -order 9 [ipgui::get_guiparams
ipgui::move_param -component [ipx::current_core] -order 10 [ipgui::get_guiparamspec -name "IO_SLINK_RX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "General" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 11 [ipgui::get_guiparamspec -name "IO_SLINK_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "General" -component [ipx::current_core]]
# **************************************************************
# Configuration GUI: CPU
# **************************************************************
@ -224,7 +219,6 @@ ipgui::move_param -component [ipx::current_core] -order 28 [ipgui::get_guiparams
ipgui::move_param -component [ipx::current_core] -order 29 [ipgui::get_guiparamspec -name "PMP_TOR_MODE_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "CPU Configuration" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 30 [ipgui::get_guiparamspec -name "PMP_NAP_MODE_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "CPU Configuration" -component [ipx::current_core]]
# **************************************************************
# Configuration GUI: Memory System
# **************************************************************
@ -268,89 +262,87 @@ ipgui::move_param -component [ipx::current_core] -order 12 [ipgui::get_guiparams
ipgui::move_param -component [ipx::current_core] -order 13 [ipgui::get_guiparamspec -name "XIP_CACHE_BLOCK_SIZE" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Memory System" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 14 [ipgui::get_guiparamspec -name "INT_BOOTLOADER_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Memory System" -component [ipx::current_core]]
# **************************************************************
# Configuration GUI: Peripherals
# **************************************************************
set_property display_name {External interrupt controller (XIRQ)} [ipgui::get_guiparamspec -name "XIRQ_EN" -component [ipx::current_core]]
set_property display_name {External interrupt controller (XIRQ) channels} [ipgui::get_guiparamspec -name "XIRQ_NUM_CH" -component [ipx::current_core]]
set_property display_name {General-Purpose Input/Output (GPIO) controller} [ipgui::get_guiparamspec -name "IO_GPIO_EN" -component [ipx::current_core]]
set_property display_name {General-purpose (GPIO) inputs} [ipgui::get_guiparamspec -name "IO_GPIO_IN_NUM" -component [ipx::current_core]]
set_property display_name {General-purpose (GPIO) outputs} [ipgui::get_guiparamspec -name "IO_GPIO_OUT_NUM" -component [ipx::current_core]]
set_property display_name {Machine timer (MTIME)} [ipgui::get_guiparamspec -name "IO_MTIME_EN" -component [ipx::current_core]]
set_property display_name {Primary UART (UART0)} [ipgui::get_guiparamspec -name "IO_UART0_EN" -component [ipx::current_core]]
set_property display_name {Primary UART (UART0) RX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART0_RX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART0_RX_FIFO" -component [ipx::current_core]]
set_property display_name {Primary UART (UART0) TX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART0_TX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART0_TX_FIFO" -component [ipx::current_core]]
set_property display_name {Secondary UART (UART1)} [ipgui::get_guiparamspec -name "IO_UART1_EN" -component [ipx::current_core]]
set_property display_name {Secondary UART (UART1) RX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART1_RX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART1_RX_FIFO" -component [ipx::current_core]]
set_property display_name {Secondary UART (UART1) TX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART1_TX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART1_TX_FIFO" -component [ipx::current_core]]
set_property display_name {SPI host controller (SPI)} [ipgui::get_guiparamspec -name "IO_SPI_EN" -component [ipx::current_core]]
set_property display_name {SPI host controller (SPI) FIFO depth} [ipgui::get_guiparamspec -name "IO_SPI_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_SPI_FIFO" -component [ipx::current_core]]
set_property display_name {SPI device controller (SDI)} [ipgui::get_guiparamspec -name "IO_SDI_EN" -component [ipx::current_core]]
set_property display_name {SPI device controller (SDI) FIFO depth} [ipgui::get_guiparamspec -name "IO_SDI_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_SDI_FIFO" -component [ipx::current_core]]
set_property display_name {Two-Wire/I2C Interface (TWI)} [ipgui::get_guiparamspec -name "IO_TWI_EN" -component [ipx::current_core]]
set_property display_name {Two-Wire/I2C Interface (TWI) FIFO depth} [ipgui::get_guiparamspec -name "IO_TWI_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_TWI_FIFO" -component [ipx::current_core]]
set_property display_name {Pulse-Width Moduleation (PWM) controller} [ipgui::get_guiparamspec -name "IO_PWM_EN" -component [ipx::current_core]]
set_property display_name {Pulse-Width Moduleation (PWM) channels} [ipgui::get_guiparamspec -name "IO_PWM_NUM_CH" -component [ipx::current_core]]
set_property display_name {Watchdog timer (WDT)} [ipgui::get_guiparamspec -name "IO_WDT_EN" -component [ipx::current_core]]
set_property display_name {True-Random-Number Generator (TRNG)} [ipgui::get_guiparamspec -name "IO_TRNG_EN" -component [ipx::current_core]]
set_property display_name {True-Random-Number Generator (TRNG) FIFO depth} [ipgui::get_guiparamspec -name "IO_TRNG_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_TRNG_FIFO" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS)} [ipgui::get_guiparamspec -name "IO_CFS_EN" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS) configuration word} [ipgui::get_guiparamspec -name "IO_CFS_CONFIG" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS) input port width} [ipgui::get_guiparamspec -name "IO_CFS_IN_SIZE" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS) output port width} [ipgui::get_guiparamspec -name "IO_CFS_OUT_SIZE" -component [ipx::current_core]]
set_property display_name {Smart LED Interface (NEOLED)} [ipgui::get_guiparamspec -name "IO_NEOLED_EN" -component [ipx::current_core]]
set_property display_name {Smart LED Interface (NEOLED) FIFO depth} [ipgui::get_guiparamspec -name "IO_NEOLED_TX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_NEOLED_TX_FIFO" -component [ipx::current_core]]
set_property display_name {General Purpose Timer (GPTMR)} [ipgui::get_guiparamspec -name "IO_GPTMR_EN" -component [ipx::current_core]]
set_property display_name {1-Wire (ONEWIRE) controller} [ipgui::get_guiparamspec -name "IO_ONEWIRE_EN" -component [ipx::current_core]]
set_property display_name {Direct Memory Access (DMA) controller} [ipgui::get_guiparamspec -name "IO_DMA_EN" -component [ipx::current_core]]
set_property display_name {Cyclic Redundancy Check (CRC) Unit} [ipgui::get_guiparamspec -name "IO_CRC_EN" -component [ipx::current_core]]
set_property display_name {External interrupt controller (XIRQ)} [ipgui::get_guiparamspec -name "XIRQ_EN" -component [ipx::current_core]]
set_property display_name {External interrupt controller (XIRQ) channels} [ipgui::get_guiparamspec -name "XIRQ_NUM_CH" -component [ipx::current_core]]
set_property display_name {General-Purpose Input/Output (GPIO) controller} [ipgui::get_guiparamspec -name "IO_GPIO_EN" -component [ipx::current_core]]
set_property display_name {General-purpose (GPIO) inputs} [ipgui::get_guiparamspec -name "IO_GPIO_IN_NUM" -component [ipx::current_core]]
set_property display_name {General-purpose (GPIO) outputs} [ipgui::get_guiparamspec -name "IO_GPIO_OUT_NUM" -component [ipx::current_core]]
set_property display_name {Machine timer (MTIME)} [ipgui::get_guiparamspec -name "IO_MTIME_EN" -component [ipx::current_core]]
set_property display_name {Primary UART (UART0)} [ipgui::get_guiparamspec -name "IO_UART0_EN" -component [ipx::current_core]]
set_property display_name {Primary UART (UART0) RX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART0_RX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART0_RX_FIFO" -component [ipx::current_core]]
set_property display_name {Primary UART (UART0) TX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART0_TX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART0_TX_FIFO" -component [ipx::current_core]]
set_property display_name {Secondary UART (UART1)} [ipgui::get_guiparamspec -name "IO_UART1_EN" -component [ipx::current_core]]
set_property display_name {Secondary UART (UART1) RX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART1_RX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART1_RX_FIFO" -component [ipx::current_core]]
set_property display_name {Secondary UART (UART1) TX FIFO depth} [ipgui::get_guiparamspec -name "IO_UART1_TX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_UART1_TX_FIFO" -component [ipx::current_core]]
set_property display_name {SPI host controller (SPI)} [ipgui::get_guiparamspec -name "IO_SPI_EN" -component [ipx::current_core]]
set_property display_name {SPI host controller (SPI) FIFO depth} [ipgui::get_guiparamspec -name "IO_SPI_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_SPI_FIFO" -component [ipx::current_core]]
set_property display_name {SPI device controller (SDI)} [ipgui::get_guiparamspec -name "IO_SDI_EN" -component [ipx::current_core]]
set_property display_name {SPI device controller (SDI) FIFO depth} [ipgui::get_guiparamspec -name "IO_SDI_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_SDI_FIFO" -component [ipx::current_core]]
set_property display_name {Two-Wire/I2C Interface (TWI)} [ipgui::get_guiparamspec -name "IO_TWI_EN" -component [ipx::current_core]]
set_property display_name {Two-Wire/I2C Interface (TWI) FIFO depth} [ipgui::get_guiparamspec -name "IO_TWI_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_TWI_FIFO" -component [ipx::current_core]]
set_property display_name {Pulse-Width Moduleation (PWM) controller} [ipgui::get_guiparamspec -name "IO_PWM_EN" -component [ipx::current_core]]
set_property display_name {Pulse-Width Moduleation (PWM) channels} [ipgui::get_guiparamspec -name "IO_PWM_NUM_CH" -component [ipx::current_core]]
set_property display_name {Watchdog timer (WDT)} [ipgui::get_guiparamspec -name "IO_WDT_EN" -component [ipx::current_core]]
set_property display_name {True-Random-Number Generator (TRNG)} [ipgui::get_guiparamspec -name "IO_TRNG_EN" -component [ipx::current_core]]
set_property display_name {True-Random-Number Generator (TRNG) FIFO depth} [ipgui::get_guiparamspec -name "IO_TRNG_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_TRNG_FIFO" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS)} [ipgui::get_guiparamspec -name "IO_CFS_EN" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS) configuration word} [ipgui::get_guiparamspec -name "IO_CFS_CONFIG" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS) input port width} [ipgui::get_guiparamspec -name "IO_CFS_IN_SIZE" -component [ipx::current_core]]
set_property display_name {Custom Functions Subsystem (CFS) output port width} [ipgui::get_guiparamspec -name "IO_CFS_OUT_SIZE" -component [ipx::current_core]]
set_property display_name {Smart LED Interface (NEOLED)} [ipgui::get_guiparamspec -name "IO_NEOLED_EN" -component [ipx::current_core]]
set_property display_name {Smart LED Interface (NEOLED) FIFO depth} [ipgui::get_guiparamspec -name "IO_NEOLED_TX_FIFO" -component [ipx::current_core]]
set_property tooltip {Number of entries (use a power of two)} [ipgui::get_guiparamspec -name "IO_NEOLED_TX_FIFO" -component [ipx::current_core]]
set_property display_name {General Purpose Timer (GPTMR)} [ipgui::get_guiparamspec -name "IO_GPTMR_EN" -component [ipx::current_core]]
set_property display_name {1-Wire (ONEWIRE) controller} [ipgui::get_guiparamspec -name "IO_ONEWIRE_EN" -component [ipx::current_core]]
set_property display_name {Direct Memory Access (DMA) controller} [ipgui::get_guiparamspec -name "IO_DMA_EN" -component [ipx::current_core]]
set_property display_name {Cyclic Redundancy Check (CRC) Unit} [ipgui::get_guiparamspec -name "IO_CRC_EN" -component [ipx::current_core]]
ipgui::add_group -name {Peripherals} -component [ipx::current_core] -parent [ipgui::get_pagespec -name "Page 0" -component [ipx::current_core]] -display_name {Peripherals}
ipgui::move_group -component [ipx::current_core] -order 3 [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]] -parent [ipgui::get_pagespec -name "Page 0" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 0 [ipgui::get_guiparamspec -name "IO_GPIO_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 1 [ipgui::get_guiparamspec -name "IO_GPIO_IN_NUM" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 2 [ipgui::get_guiparamspec -name "IO_GPIO_OUT_NUM" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 3 [ipgui::get_guiparamspec -name "IO_MTIME_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 4 [ipgui::get_guiparamspec -name "IO_UART0_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 5 [ipgui::get_guiparamspec -name "IO_UART0_RX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 6 [ipgui::get_guiparamspec -name "IO_UART0_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 7 [ipgui::get_guiparamspec -name "IO_UART1_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 8 [ipgui::get_guiparamspec -name "IO_UART1_RX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 9 [ipgui::get_guiparamspec -name "IO_UART1_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 10 [ipgui::get_guiparamspec -name "IO_SPI_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 11 [ipgui::get_guiparamspec -name "IO_SPI_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 12 [ipgui::get_guiparamspec -name "IO_SDI_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 13 [ipgui::get_guiparamspec -name "IO_SDI_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 14 [ipgui::get_guiparamspec -name "IO_TWI_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 15 [ipgui::get_guiparamspec -name "IO_TWI_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 16 [ipgui::get_guiparamspec -name "IO_PWM_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 17 [ipgui::get_guiparamspec -name "IO_PWM_NUM_CH" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 18 [ipgui::get_guiparamspec -name "IO_WDT_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 19 [ipgui::get_guiparamspec -name "IO_TRNG_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 20 [ipgui::get_guiparamspec -name "IO_TRNG_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 21 [ipgui::get_guiparamspec -name "IO_CFS_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 22 [ipgui::get_guiparamspec -name "IO_CFS_CONFIG" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 23 [ipgui::get_guiparamspec -name "IO_CFS_IN_SIZE" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 24 [ipgui::get_guiparamspec -name "IO_CFS_OUT_SIZE" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 25 [ipgui::get_guiparamspec -name "IO_NEOLED_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 26 [ipgui::get_guiparamspec -name "IO_NEOLED_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 27 [ipgui::get_guiparamspec -name "IO_GPTMR_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 28 [ipgui::get_guiparamspec -name "IO_ONEWIRE_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 29 [ipgui::get_guiparamspec -name "IO_DMA_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 30 [ipgui::get_guiparamspec -name "XIRQ_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 31 [ipgui::get_guiparamspec -name "XIRQ_NUM_CH" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 32 [ipgui::get_guiparamspec -name "IO_CRC_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_group -component [ipx::current_core] -order 3 [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]] -parent [ipgui::get_pagespec -name "Page 0" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 0 [ipgui::get_guiparamspec -name "IO_GPIO_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 1 [ipgui::get_guiparamspec -name "IO_GPIO_IN_NUM" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 2 [ipgui::get_guiparamspec -name "IO_GPIO_OUT_NUM" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 3 [ipgui::get_guiparamspec -name "IO_MTIME_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 4 [ipgui::get_guiparamspec -name "IO_UART0_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 5 [ipgui::get_guiparamspec -name "IO_UART0_RX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 6 [ipgui::get_guiparamspec -name "IO_UART0_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 7 [ipgui::get_guiparamspec -name "IO_UART1_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 8 [ipgui::get_guiparamspec -name "IO_UART1_RX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 9 [ipgui::get_guiparamspec -name "IO_UART1_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 10 [ipgui::get_guiparamspec -name "IO_SPI_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 11 [ipgui::get_guiparamspec -name "IO_SPI_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 12 [ipgui::get_guiparamspec -name "IO_SDI_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 13 [ipgui::get_guiparamspec -name "IO_SDI_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 14 [ipgui::get_guiparamspec -name "IO_TWI_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 15 [ipgui::get_guiparamspec -name "IO_TWI_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 16 [ipgui::get_guiparamspec -name "IO_PWM_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 17 [ipgui::get_guiparamspec -name "IO_PWM_NUM_CH" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 18 [ipgui::get_guiparamspec -name "IO_WDT_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 19 [ipgui::get_guiparamspec -name "IO_TRNG_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 20 [ipgui::get_guiparamspec -name "IO_TRNG_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 21 [ipgui::get_guiparamspec -name "IO_CFS_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 22 [ipgui::get_guiparamspec -name "IO_CFS_CONFIG" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 23 [ipgui::get_guiparamspec -name "IO_CFS_IN_SIZE" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 24 [ipgui::get_guiparamspec -name "IO_CFS_OUT_SIZE" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 25 [ipgui::get_guiparamspec -name "IO_NEOLED_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 26 [ipgui::get_guiparamspec -name "IO_NEOLED_TX_FIFO" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 27 [ipgui::get_guiparamspec -name "IO_GPTMR_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 28 [ipgui::get_guiparamspec -name "IO_ONEWIRE_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 29 [ipgui::get_guiparamspec -name "IO_DMA_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 30 [ipgui::get_guiparamspec -name "XIRQ_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 31 [ipgui::get_guiparamspec -name "XIRQ_NUM_CH" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
ipgui::move_param -component [ipx::current_core] -order 32 [ipgui::get_guiparamspec -name "IO_CRC_EN" -component [ipx::current_core]] -parent [ipgui::get_groupspec -name "Peripherals" -component [ipx::current_core]]
# **************************************************************
# Configuration GUI: IP logo
@ -365,7 +357,6 @@ ipx::add_file ../../$neorv32_home/$ip_logo [ipx::get_file_groups xilinx_coreguii
set_property type image [ipx::get_files ../../$neorv32_home/$ip_logo -of_objects [ipx::get_file_groups xilinx_coreguiicon -of_objects [ipx::current_core]]]
set_property type LOGO [ipx::get_files ../../$neorv32_home/$ip_logo -of_objects [ipx::get_file_groups xilinx_coreguiicon -of_objects [ipx::current_core]]]
# **************************************************************
# Finalize and add to IP repository
# **************************************************************

View file

@ -309,7 +309,6 @@ begin
INT_BOOTLOADER_EN => INT_BOOTLOADER_EN,
-- On-Chip Debugger --
OCD_EN => OCD_EN,
OCD_DM_LEGACY_MODE => false,
OCD_AUTHENTICATION => OCD_AUTHENTICATION,
-- RISC-V CPU Extensions --
RISCV_ISA_C => RISCV_ISA_C,

View file

@ -125,15 +125,23 @@ void neorv32_xirq_global_disable(void) {
**************************************************************************/
int neorv32_xirq_get_num(void) {
uint32_t mask;
uint32_t prev_mie, prev_xirq_eie, mask;
int i, cnt;
if (neorv32_xirq_available()) {
// save previous registers
prev_mie = neorv32_cpu_csr_read(CSR_MIE);
prev_xirq_eie = NEORV32_XIRQ->EIE;
neorv32_cpu_csr_clr(CSR_MIE, 1 << XIRQ_FIRQ_ENABLE); // make sure XIRQ cannot fire
NEORV32_XIRQ->EIE = 0xffffffffU; // try to set all enable bits
mask = NEORV32_XIRQ->EIE; // read back actually set flags
// restore previous registers
NEORV32_XIRQ->EIE = prev_xirq_eie;
neorv32_cpu_csr_write(CSR_MIE, prev_mie);
// count set bits
cnt = 0;
for (i=0; i<32; i++) {