added monitor for misaligned via assert

This commit is contained in:
Pasquale Davide Schiavone 2017-01-31 15:23:50 +01:00
parent 4ee57c2772
commit 1c7464551b
2 changed files with 6 additions and 0 deletions

View file

@ -740,6 +740,11 @@ module littleriscv_id_stage
assert property (
@(posedge clk) (branch_in_ex_o) |-> (branch_decision_i !== 1'bx) ) else $display("Branch decision is X");
`ifdef CHECK_MISALIGNED
assert property (
@(posedge clk) (~data_misaligned_i) ) else $display("Misaligned memory access at %x",pc_id_i);
`endif
// the instruction delivered to the ID stage should always be valid
assert property (
@(posedge clk) (instr_valid_i & (~illegal_c_insn_i)) |-> (!$isunknown(instr_rdata_i)) ) else $display("Instruction is valid, but has at least one X");

View file

@ -31,6 +31,7 @@
//`define SIMCHECKER
`endif
//`define CHECK_MISALIGNED
// littleRISCV configuration.