mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-24 14:09:08 -04:00
Add RV32E assertion warning
This commit is contained in:
parent
e76d5b44a6
commit
d83a6d8813
2 changed files with 14 additions and 0 deletions
10
decoder.sv
10
decoder.sv
|
@ -31,6 +31,10 @@ import riscv_defines::*;
|
|||
|
||||
module riscv_decoder
|
||||
(
|
||||
// CONFIG_REGION: RV32E
|
||||
`ifdef RV32E
|
||||
input logic clk,
|
||||
`endif
|
||||
// singals running to/from controller
|
||||
input logic deassert_we_i, // deassert we, we are stalled or not active
|
||||
// CONFIG_REGION: ONLY_ALIGNED
|
||||
|
@ -1324,4 +1328,10 @@ module riscv_decoder
|
|||
|
||||
assign jump_in_dec_o = jump_in_id;
|
||||
|
||||
// CONFIG_REGION: RV32E
|
||||
`ifdef RV32E
|
||||
// the instruction delivered to the ID stage should always be valid
|
||||
assert property (
|
||||
@(posedge clk) (illegal_insn_o) |-> (~illegal_reg_addr) ) else $warning("Register address in instruction is out of bounds (RV32E)!!!");
|
||||
`endif
|
||||
endmodule // controller
|
||||
|
|
|
@ -1071,6 +1071,10 @@ module riscv_id_stage
|
|||
|
||||
riscv_decoder decoder_i
|
||||
(
|
||||
// CONFIG_REGION: RV32E
|
||||
`ifdef RV32E
|
||||
.clk ( clk ),
|
||||
`endif
|
||||
// controller related signals
|
||||
.deassert_we_i ( deassert_we ),
|
||||
// CONFIG_REGION: ONLY_ALIGNED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue