mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-01 01:14:31 +00:00
Fixed lint errors on zero and pop count. All of regression passes
This commit is contained in:
parent
6b047065ef
commit
67f83cda7f
@ -79,9 +79,12 @@ module cnt #(parameter WIDTH = 32) (
|
||||
end
|
||||
end
|
||||
|
||||
//NOTE: Signal width mistmatch from log2(WIDTH) to WIDTH but deal with that later.
|
||||
lzc #(WIDTH) lzc(.num(lzcA), .ZeroCnt(czResult));
|
||||
popcnt #(WIDTH) popcntw(.num(popcntA), .PopCnt(cpopResult));
|
||||
|
||||
lzc #(WIDTH) lzc(.num(lzcA), .ZeroCnt(czResult[$clog2(WIDTH):0]));
|
||||
popcnt #(WIDTH) popcntw(.num(popcntA), .PopCnt(cpopResult[$clog2(WIDTH):0]));
|
||||
// zero extend these results to fit into width *** There may be a more elegant way to do this
|
||||
assign czResult[WIDTH-1:$clog2(WIDTH)+1] = {(WIDTH-$clog2(WIDTH)-1){1'b0}};
|
||||
assign cpopResult[WIDTH-1:$clog2(WIDTH)+1] = {(WIDTH-$clog2(WIDTH)-1){1'b0}};
|
||||
|
||||
assign CntResult = (B[1]) ? cpopResult : czResult;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user