Skip to content

Commit 69d40a5

Browse files
plru_tree: Assert output is onehot (#206)
* 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]>
1 parent 145e3be commit 69d40a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/plru_tree.sv

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ module plru_tree #(
123123
initial begin
124124
assert (ENTRIES == 2**LogEntries) else $error("Entries must be a power of two");
125125
end
126+
127+
output_onehot : assert property(
128+
@(posedge clk_i) disable iff (~rst_ni) ($onehot0(plru_o)))
129+
else $fatal (1, "More than one bit set in PLRU output.");
126130
`endif
127131
// pragma translate_on
128132

0 commit comments

Comments
 (0)