Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move assertion statement outside of always_comb block #2552

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/cache_subsystem/tag_cmp.sv
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@
if (req_i[i]) break;
end

end

`ifndef SYNTHESIS
`ifndef VERILATOR
// assert that cache only hits on one way

Check warning on line 88 in core/cache_subsystem/tag_cmp.sv

View workflow job for this annotation

GitHub Actions / format

[verible-verilog-format] reported by reviewdog 🐶 Raw Output: core/cache_subsystem/tag_cmp.sv:88:- // assert that cache only hits on one way core/cache_subsystem/tag_cmp.sv:89:- // this only needs to be checked one cycle after all ways have been requested core/cache_subsystem/tag_cmp.sv:90:- onehot : core/cache_subsystem/tag_cmp.sv:91:- assert property (@(posedge clk_i) disable iff (!rst_ni) &req_i |=> $onehot0(hit_way_o)) core/cache_subsystem/tag_cmp.sv:92:- else begin core/cache_subsystem/tag_cmp.sv:93:- $fatal(1, "Hit should be one-hot encoded"); core/cache_subsystem/tag_cmp.sv:94:- end core/cache_subsystem/tag_cmp.sv:88:+ // assert that cache only hits on one way core/cache_subsystem/tag_cmp.sv:89:+ // this only needs to be checked one cycle after all ways have been requested core/cache_subsystem/tag_cmp.sv:90:+ onehot : core/cache_subsystem/tag_cmp.sv:91:+ assert property (@(posedge clk_i) disable iff (!rst_ni) &req_i |=> $onehot0(hit_way_o)) core/cache_subsystem/tag_cmp.sv:92:+ else begin core/cache_subsystem/tag_cmp.sv:93:+ $fatal(1, "Hit should be one-hot encoded"); core/cache_subsystem/tag_cmp.sv:94:+ end
// this only needs to be checked one cycle after all ways have been requested
onehot :
assert property (@(posedge clk_i) disable iff (!rst_ni) &req_i |=> $onehot0(hit_way_o))
Expand All @@ -92,7 +94,6 @@
end
`endif
`endif
end

always_ff @(posedge clk_i or negedge rst_ni) begin
if (~rst_ni) begin
Expand Down
Loading