Add assertions for instruction and data address alignment

This commit is contained in:
Pirmin Vogel 2019-06-24 19:07:47 +01:00 committed by Philipp Wagner
parent b7919a7bd3
commit 6306436465
2 changed files with 10 additions and 0 deletions

View file

@ -266,6 +266,11 @@ module ibex_if_stage #(
assert property (
@(posedge clk_i) (instr_gnt_i) |-> (instr_req_o) )
else $warning("There was a grant without a request");
// assert that the address is word aligned when request is sent
assert property (
@(posedge clk_i) (instr_req_o) |-> (instr_addr_o[1:0] == 2'b00) ) else
$display("Instruction address not word aligned");
`endif
endmodule

View file

@ -482,5 +482,10 @@ module ibex_load_store_unit (
// assert that the address does not contain X when request is sent
assert property ( @(posedge clk_i) (data_req_o) |-> (!$isunknown(data_addr_o)) );
// assert that the address is word aligned when request is sent
assert property (
@(posedge clk_i) (data_req_o) |-> (data_addr_o[1:0] == 2'b00) ) else
$display("Data address not word aligned");
`endif
endmodule