-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rtl] Guard against false memory responses for secure configurations
With this change all memory responses are only acted on if Ibex is expecting them for all secure configurations. Previously an error response that was injected onto the bus would trigger an exception that shouldn't occur (in particular breaking the functioning of the multiply state machine). In addition for configurations without the writeback stage an injected load data response could trigger an incorrect write to the register file. This is only applied to the secure configurations, non-secure configurations assume correct adherence to the bus protocol meaning a response will only be seen if a request is outstanding.
- Loading branch information
Showing
6 changed files
with
110 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,4 +196,22 @@ module ibex_ex_block #( | |
// final cycle of ALU operation). | ||
assign ex_valid_o = multdiv_sel ? multdiv_valid : ~(|alu_imd_val_we); | ||
|
||
`ifdef INC_ASSERT | ||
// This is intended to be accessed via hierarchal references so isn't output from this module nor | ||
// used in any logic in this module | ||
logic sva_multdiv_fsm_idle; | ||
|
||
if (RV32M == RV32MSlow) begin : gen_multdiv_sva_idle_slow | ||
assign sva_multdiv_fsm_idle = gen_multdiv_slow.multdiv_i.sva_fsm_idle; | ||
end else if (RV32M == RV32MFast || RV32M == RV32MSingleCycle) begin : gen_multdiv_sva_idle_fast | ||
assign sva_multdiv_fsm_idle = gen_multdiv_fast.multdiv_i.sva_fsm_idle; | ||
end else begin | ||
Check warning on line 208 in rtl/ibex_ex_block.sv GitHub Actions / verible-lint
|
||
assign sva_multdiv_fsm_idle = 1'b1; | ||
end | ||
|
||
// Mark the sva_multduv_fsm_idle as unused to avoid lint issues | ||
logic unused_sva_multdiv_fsm_idle; | ||
assign unused_sva_multdiv_fsm_idle = sva_multdiv_fsm_idle; | ||
`endif | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters