-
Notifications
You must be signed in to change notification settings - Fork 665
Description
Bug Description
The documented power-on-reset value of the mstatus CSR (0x300) is 0x0000_1800. The actual PoR value is 0x0000_0080.
I believe that the documented PoR value is the proper one, but the coded PoR has been in the Ibex code for three years so this is as much a question as it is a bug report.
Observed Behavior
In simulations of our fork of Ibex, coming out of reset, the read value of mstatus is 0x0000_0080. This is matches the coded PoR in the RTL:
localparam status_t MSTATUS_RST_VAL = '{mie: 1'b0,
mpie: 1'b1,
mpp: PRIV_LVL_U,
mprv: 1'b0,
tw: 1'b0};
Given that PRIV_LVL_U is 2'b00, this yields a PoR of 0x0000_0080.
Expected Behavior
Coming out of reset, the read value of mstatus should be 0x0000_1800. The RTL definition should look like this:
localparam status_t MSTATUS_RST_VAL = '{mie: 1'b0,
mpie: 1'b0,
mpp: PRIV_LVL_M,
mprv: 1'b0,
tw: 1'b0};
Steps to reproduce the issue
I have a test-program in CORE-V-VERIF for the CVE2, but do not have an Ibex test for this. Having said that, visual inspection easily supports what we are seeing in simulation.
My Environment
The OpenHW Group has created a fork of the Ibex which we are branding as the CVE2. The first release of this project will be the CV32E20.
EDA tool and version:
Questasim 2021.4_4
Operating system:
CentOS 7.9.2009
Version of the Ibex source code:
The current head as of 2023-06-22 @ 10:35 EDT: a784583.