mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 21:07:34 -04:00
Check for invalid branch decision when performing a branch as an
assertion
This commit is contained in:
parent
06cf9f1dfe
commit
4d2280bc3c
2 changed files with 6 additions and 1 deletions
2
alu.sv
2
alu.sv
|
@ -536,7 +536,7 @@ module riscv_alu
|
|||
shift_left = 1'b0;
|
||||
shift_amt = operand_b_i;
|
||||
result_o = 'x;
|
||||
flag_o = 1'b0;
|
||||
flag_o = 1'bx;
|
||||
|
||||
unique case (operator_i)
|
||||
// Standard Operations
|
||||
|
|
|
@ -539,4 +539,9 @@ module riscv_controller
|
|||
assign perf_jr_stall_o = jr_stall_o;
|
||||
assign perf_ld_stall_o = load_stall_o;
|
||||
|
||||
|
||||
// Assertions
|
||||
assert property (
|
||||
@(posedge clk) (pc_mux_sel_o == `PC_BRANCH) |-> (branch_decision_i !== 1'bx) );
|
||||
|
||||
endmodule // controller
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue