mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 04:47:25 -04:00
Add assertions for instruction and data address alignment
This commit is contained in:
parent
b7919a7bd3
commit
6306436465
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue