Skip to content

Commit

Permalink
plru_tree: Assert output is onehot
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-platzer authored Dec 14, 2023
1 parent 145e3be commit 8e7db89
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) ((plru_o & (plru_o - 1)) == '0))
else $fatal (1, "More than one bit set in PLRU output.");
`endif
// pragma translate_on

Expand Down

0 comments on commit 8e7db89

Please sign in to comment.