mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 06:07:52 -04:00
[cpu] fix hart id configuration
This commit is contained in:
parent
126fc2b547
commit
b064046091
3 changed files with 4 additions and 4 deletions
|
@ -110,7 +110,7 @@ The generic type "suv(x:y)" represents a `std_ulogic_vector(x downto y)`.
|
|||
[options="header",grid="rows"]
|
||||
|=======================
|
||||
| Name | Type | Description
|
||||
| `HART_ID` | suv(31:0) | Value for the <<_mhartid>> CSR.
|
||||
| `HART_ID` | natural | Value for the <<_mhartid>> CSR.
|
||||
| `VENDOR_ID` | suv(31:0) | Value for the <<_mvendorid>> CSR.
|
||||
| `BOOT_ADDR` | suv(31:0) | CPU reset address. See section <<_address_space>>.
|
||||
| `DEBUG_PARK_ADDR` | suv(31:0) | "Park loop" entry address for the <<_on_chip_debugger_ocd>>, has to be 4-byte aligned.
|
||||
|
|
|
@ -22,7 +22,7 @@ use neorv32.neorv32_package.all;
|
|||
entity neorv32_cpu is
|
||||
generic (
|
||||
-- General --
|
||||
HART_ID : std_ulogic_vector(31 downto 0); -- hardware thread ID
|
||||
HART_ID : natural; -- hardware thread ID
|
||||
VENDOR_ID : std_ulogic_vector(31 downto 0); -- vendor's JEDEC ID
|
||||
BOOT_ADDR : std_ulogic_vector(31 downto 0); -- cpu boot address
|
||||
DEBUG_PARK_ADDR : std_ulogic_vector(31 downto 0); -- cpu debug mode parking loop entry address
|
||||
|
|
|
@ -29,7 +29,7 @@ use neorv32.neorv32_package.all;
|
|||
entity neorv32_cpu_control is
|
||||
generic (
|
||||
-- General --
|
||||
HART_ID : std_ulogic_vector(31 downto 0); -- hardware thread ID
|
||||
HART_ID : natural; -- hardware thread ID
|
||||
VENDOR_ID : std_ulogic_vector(31 downto 0); -- vendor's JEDEC ID
|
||||
BOOT_ADDR : std_ulogic_vector(31 downto 0); -- cpu boot address
|
||||
DEBUG_PARK_ADDR : std_ulogic_vector(31 downto 0); -- cpu debug-mode parking loop entry address, 4-byte aligned
|
||||
|
@ -1803,7 +1803,7 @@ begin
|
|||
when csr_mvendorid_c => csr.rdata <= VENDOR_ID; -- vendor's JEDEC ID
|
||||
when csr_marchid_c => csr.rdata(4 downto 0) <= "10011"; -- architecture ID - official RISC-V open-source arch ID
|
||||
when csr_mimpid_c => csr.rdata <= hw_version_c; -- implementation ID -- NEORV32 hardware version
|
||||
when csr_mhartid_c => csr.rdata <= HART_ID; -- hardware thread ID
|
||||
when csr_mhartid_c => csr.rdata(9 downto 0) <= std_ulogic_vector(to_unsigned(HART_ID, 10)); -- hardware thread ID
|
||||
-- when csr_mconfigptr_c => csr.rdata <= (others => '0'); -- machine configuration pointer register - hardwired to zero
|
||||
|
||||
-- --------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue