Skip to content

Commit

Permalink
Add preprocessor ifndef around RTL assertions to allow exclusion. #104
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Dec 18, 2024
1 parent ceb1f9b commit faa57c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/peakrdl_regblock/module_tmpl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ module {{ds.module_name}}
end else begin
if(external_req & ~external_wr_ack & ~external_rd_ack) external_pending <= '1;
else if(external_wr_ack | external_rd_ack) external_pending <= '0;
assert(!external_wr_ack || (external_pending | external_req))
else $error("An external wr_ack strobe was asserted when no external request was active");
assert(!external_rd_ack || (external_pending | external_req))
else $error("An external rd_ack strobe was asserted when no external request was active");
`ifndef SYNTHESIS
assert(!external_wr_ack || (external_pending | external_req))
else $error("An external wr_ack strobe was asserted when no external request was active");
assert(!external_rd_ack || (external_pending | external_req))
else $error("An external rd_ack strobe was asserted when no external request was active");
`endif
end
end
{%- endif %}
Expand Down

0 comments on commit faa57c9

Please sign in to comment.