[rtl/cpu] added flag to mzext csr to check if physical memory protection is implemented

This commit is contained in:
stnolting 2020-10-16 20:11:33 +02:00
parent ca4b9200f5
commit cfd0b7bcef
2 changed files with 2 additions and 1 deletions

View file

@ -1853,6 +1853,7 @@ begin
when csr_mzext_c => -- R/-: mzext
csr.rdata(0) <= bool_to_ulogic_f(CPU_EXTENSION_RISCV_Zicsr); -- RISC-V.Zicsr CPU extension
csr.rdata(1) <= bool_to_ulogic_f(CPU_EXTENSION_RISCV_Zifencei); -- RISC-V.Zifencei CPU extension
csr.rdata(2) <= bool_to_ulogic_f(PMP_USE); -- RISC-V physical memory protection
-- undefined/unavailable --
when others =>

View file

@ -41,7 +41,7 @@ package neorv32_package is
-- Architecture Constants -----------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
constant data_width_c : natural := 32; -- data width - do not change!
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01040501"; -- no touchy!
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01040502"; -- no touchy!
constant pmp_max_r_c : natural := 8; -- max PMP regions - FIXED!
constant archid_c : natural := 19; -- official NEORV32 architecture ID - hands off!