You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in lzc module the comment says:
/// If the input does not contain a zero, empty_o is asserted. Additionally cnt_o contains
/// the maximum number of zeros - 1.
if the WIDTH is power of 2, it works fine
but if the WIDTH is not the power of 2,i.e WIDTH is 29
when in_i is empty, cnt_o is zero instead of 29-1
because in the rtl
// if index is out of range
if (unsigned'(k) * 2 > WIDTH - 1) begin : g_out_of_range
assign sel_nodes[2 ** level - 1 + k] = 1'b0;
assign index_nodes[2 ** level - 1 + k] = '0; // why not assign index_nodes[2 ** level - 1 + k] = WIDTH-1;
end
The text was updated successfully, but these errors were encountered:
in lzc module the comment says:
/// If the input does not contain a zero,
empty_o
is asserted. Additionallycnt_o
contains/// the maximum number of zeros - 1.
if the WIDTH is power of 2, it works fine
but if the WIDTH is not the power of 2,i.e WIDTH is 29
when in_i is empty, cnt_o is zero instead of 29-1
because in the rtl
// if index is out of range
if (unsigned'(k) * 2 > WIDTH - 1) begin : g_out_of_range
assign sel_nodes[2 ** level - 1 + k] = 1'b0;
assign index_nodes[2 ** level - 1 + k] = '0; // why not assign index_nodes[2 ** level - 1 + k] = WIDTH-1;
end
The text was updated successfully, but these errors were encountered: