Skip to content

Commit

Permalink
Update src/onehot_to_bin.sv
Browse files Browse the repository at this point in the history
Co-authored-by: Nils Wistoff <[email protected]>
  • Loading branch information
rsharanesh and niwis authored Dec 9, 2023
1 parent b7cf876 commit f3337e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/onehot_to_bin.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module onehot_to_bin #(
logic [ONEHOT_WIDTH-1:0] tmp_mask;
for (genvar i = 0; i < ONEHOT_WIDTH; i++) begin : gen_il
logic [BIN_WIDTH-1:0] tmp_i;
assign tmp_i = i[BIN_WIDTH-1:0];
assign tmp_i = BIN_WIDTH'(i);
assign tmp_mask[i] = tmp_i[j];
end
assign bin[j] = |(tmp_mask & onehot);
Expand Down

0 comments on commit f3337e1

Please sign in to comment.