mirror of
https://github.com/lowRISC/ibex.git
synced 2025-06-27 17:00:41 -04:00
Here's a high-level overview of what this commit does: - Compiles Sail into SystemVerilog including patchin compiler bugs - Create a TCL file that tells JasperGold what to prove and assume - Check memory operations modelling the LSU Most of these properties now prove without time-bound on the response from memory due to alternative LSUs - Check memory even with Smepmp errors: Continues on top of https://github.com/riscv/sail-riscv/pull/196 - CSR verification - Checks for instruction types such as B-Type, I-Type, R-Type - Check illegal instructions and WFI instructions - Using psgen language for proof generation - Documentation on how to use the setup - Wrap around proof that proves instructions executed in a row still match the specification. - Liveness proof to guarantee instructions will retire within a upper bound of cycles. All of these proofs make heavy use of the concept of k-induction. All the different properties and steps are necessary to help the tool get the useful properties it needs to prove the next step. The instruction correctness, wrap-around and liveness all give us increased confidence that Ibex is trace-equivalent to Sail. Throughout this process an issue was found in Ibex where the pipeline was not flushing properly on changing PMP registers using clear: #2193 Alternative LSUs: This makes all top level memory properties prove quickly and at a low proof effort (1 or 2-induction). Three 'alternative LSUs' representing three stages of memory instructions: 1. Before the first response is received, in the EX stage 2. After the first response is received, but not the second grant, also in the EX stage 3. Before the last response is received in the WB stage. In each case we ask 'if the response came now, would the result be correct?'. Similar is applied for CSRs/PC though less directly. This is particularly interesting (read: ugly) in the case of a PMP error wbexc_exists makes Wrap properties fast to prove. The bottleneck becomes SpecPastNoWbexcPC, which fails only due to a bug. See the comment in riscv.proof. Co-authored-by: Marno van der Maas <mvdmaas+git@lowrisc.org> Signed-off-by: Louis-Emile Ploix <louis-emile.ploix@lowrisc.org>
33 lines
1 KiB
Diff
33 lines
1 KiB
Diff
diff --git a/rtl/ibex_top.sv b/rtl/ibex_top.sv
|
|
index 81e49633..17b36c17 100644
|
|
--- a/rtl/ibex_top.sv
|
|
+++ b/rtl/ibex_top.sv
|
|
@@ -142,7 +142,7 @@ module ibex_top import ibex_pkg::*; #(
|
|
);
|
|
|
|
localparam bit Lockstep = SecureIbex;
|
|
- localparam bit ResetAll = Lockstep;
|
|
+ localparam bit ResetAll = 1;
|
|
localparam bit DummyInstructions = SecureIbex;
|
|
localparam bit RegFileECC = SecureIbex;
|
|
localparam bit RegFileWrenCheck = SecureIbex;
|
|
@@ -236,12 +236,13 @@ module ibex_top import ibex_pkg::*; #(
|
|
|
|
assign core_sleep_o = ~clock_en;
|
|
|
|
- prim_clock_gating core_clock_gate_i (
|
|
- .clk_i (clk_i),
|
|
- .en_i (clock_en),
|
|
- .test_en_i(test_en_i),
|
|
- .clk_o (clk)
|
|
- );
|
|
+ assign clk = clk_i;
|
|
+ // prim_clock_gating core_clock_gate_i (
|
|
+ // .clk_i (clk_i),
|
|
+ // .en_i (clock_en),
|
|
+ // .test_en_i(test_en_i),
|
|
+ // .clk_o (clk)
|
|
+ // );
|
|
|
|
////////////////////////
|
|
// Core instantiation //
|