-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLIC: Spec chapter 5.1 #485
CLIC: Spec chapter 5.1 #485
Conversation
…SR when SMCLIC=1. Signed-off-by: Oystein Knauserud <[email protected]>
Signed-off-by: Oystein Knauserud <[email protected]>
…tatus. Signed-off-by: Oystein Knauserud <[email protected]>
CSR_MCAUSE: begin | ||
if (SMCLIC) begin | ||
// For CLIC, the mpp and mpie bits from mstatus | ||
// are readable via mcause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add note that 'CLIC mode is assumed when SMCLIC = 1'. RTL should actually have checked on 'clic mode' instead of SMCLIC, but let's keep it like this as these two things are the same for our subset of the Smclic implementation (and your implementation is better for coverage reasons)
rtl/cv32e40x_cs_registers.sv
Outdated
default: 'b0 | ||
}; | ||
if (SMCLIC) begin | ||
// SMCLIC: A write to mcause.mpp or mcause.mpie is stored in mstatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark as above: 'CLIC mode is assumed when SMCLIC = 1'.
rtl/cv32e40x_cs_registers.sv
Outdated
mstatus_n.mpie = csr_wdata_int[MCAUSE_MPIE_BIT]; | ||
end else begin | ||
// TODO: add support for SD/XS/FS/VS | ||
mstatus_n = '{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reorganize code to avoid this code duplication. Simply first do the original mstatus_n assignment and then a if (SMCLIC) if (mcause_we)
…lication. Signed-off-by: Oystein Knauserud <[email protected]>
Making mstatus.mpie and mstatus.mpp accessible via mcause.
SEC clean with SMCLIC=0