Merge pull request #77 from kevindkim723/patch-1

fixed typo in LZC
This commit is contained in:
Ross Thompson 2023-02-14 13:20:55 -06:00 committed by GitHub
commit 61d4040184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,6 @@ module lzc #(parameter WIDTH = 1) (
always_comb begin
i = 0;
while (~num[WIDTH-1-i] & (i < WIDTH)) i = i+1; // search for leading one
ZeroCnt = i[$clog2(WIDTH)-1:0];
ZeroCnt = i[$clog2(WIDTH+1)-1:0];
end
endmodule