Skip to content

Commit

Permalink
plru_tree: Assert output is onehot (#206)
Browse files Browse the repository at this point in the history
* plru_tree: Assert output is onehot

* plru_tree: Use system function for onehot assertion

* plru_tree: Add missing closing parenthesis

Co-authored-by: Nils Wistoff <[email protected]>
  • Loading branch information
michael-platzer and niwis authored Dec 14, 2023
1 parent 145e3be commit 69d40a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plru_tree.sv
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ module plru_tree #(
initial begin
assert (ENTRIES == 2**LogEntries) else $error("Entries must be a power of two");
end

output_onehot : assert property(
@(posedge clk_i) disable iff (~rst_ni) ($onehot0(plru_o)))
else $fatal (1, "More than one bit set in PLRU output.");
`endif
// pragma translate_on

Expand Down

0 comments on commit 69d40a5

Please sign in to comment.