Skip to content
Snippets Groups Projects
Commit 213b667c authored by Alban Gruin's avatar Alban Gruin
Browse files

sras: add assertions


Signed-off-by: default avatarAlban Gruin <alban.gruin@irit.fr>
parent b3811074
No related branches found
No related tags found
No related merge requests found
......@@ -95,4 +95,17 @@ module sras #(
tos_q <= tos_d;
end
end
// pragma translate_off
`ifndef VERILATOR
initial begin
assert (2 ** $clog2(SpecDepth) == SpecDepth) else $fatal(1,"[sras] SpecDepth is not a power of 2");
assert (2 ** $clog2(DEPTH) == DEPTH) else $fatal(1,"[sras] DEPTH is not a power of 2");
end
assert property (
@(posedge clk_i) disable iff (!rst_ni) push_i |-> begin_spec_i)
else $warning (1,"[sras] push_i & ~begin_spec_i");
`endif
// pragma translate_on
endmodule
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment