Skip to content
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

Merge from CV32E40X #491

Conversation

silabs-oysteink
Copy link
Contributor

No description provided.

silabs-oivind and others added 30 commits August 31, 2023 11:24
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
…nd without CLIC.

Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Add todo:xif tag on xif related assertions.

Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Add assertion a_jalr_stable_target.

Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
mcause.minhv only set when taking an exception for a CLIC pointer or mret pointer restart.
When jumping due to an mret, mcause.minhv is checked regardless of mcause.mpp.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
…its fan-in. The signal clic_ptr_in_wb is used by RVFI but not by the controller.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
Added assert for checking that mepc is always written when mcause.minhv is changed.
Refactored some code in controller_fsm.

SEC clean.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
…ates-aug23

Updates for CLIC spec (august 23)
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Add missing parenthesis in property p_jalr_stable_target
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
…of the LSU.

Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
…mevent_we is a single bit in RTL.

Signed-off-by: Oivind Ekelund <oivind.ekelund@silabs.com>
Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
…k_merge-w36.23-1

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
…emoval

Remove mscratchcsw register from manual
…te a pointer fetch (ID stage).

SEC clean

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
…23-2

Removed dependency on mcause.mpp when checking if an mret will genera…
Silabs-ArjanB and others added 3 commits September 6, 2023 14:08
…to change privilege level.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
…k_merge-w36.23-1

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
$display("[cv32e40s_core]: PMP_MSECCFG_RV.rlb = %-1d", PMP_MSECCFG_RV.rlb);
$display("[cv32e40s_core]: PMP_MSECCFG_RV.mmwp = %-1d", PMP_MSECCFG_RV.mmwp);
$display("[cv32e40s_core]: PMP_MSECCFG_RV.mml = %-1d", PMP_MSECCFG_RV.mml);
$display("[cv32e40s_core]: LFSR0_CFG.coeffs = %-1d", LFSR0_CFG.coeffs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFSR parameters should be printed as hex (0x%8h). %-1d results in a left justified single digit decimal number.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Contributor

@silabs-oivind silabs-oivind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix printout format in cv32e40s_core_log.


// Check that register used for JALR target calculation is stable from the jump is taken from ID until the JALR retires from WB.
// Secure jumps write the link register twice, only checking when the first half (!ex_wb_pipe_i.last_sec_op) is in WB.
// Excluding rs == x0, as dummies and hints implement actual flops (rf_mem_i[0] would give non-zero value).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add separate assertion for rs == x0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added assertion

@@ -521,11 +520,15 @@ end


// Check priviledge level consistency accross the pipeline.
// The only scenario where priv_lvl_if_q and priv_lvl are allowed to differ is when there's an MRET in the pipe
// The only scenario where priv_lvl_if_q and priv_lvl are allowed to differ is when there's an MRET or mret pointer in the pipe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why that is okay and why mret code refers to ID/EX/WB whereas mret_ptr code refers only to EX/WB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated comments

Updated comments and added assertion for jalr with rs1==x0.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@Silabs-ArjanB Silabs-ArjanB added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Sep 7, 2023
@Silabs-ArjanB Silabs-ArjanB merged commit c743288 into openhwgroup:master Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants