mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 18:25:27 +00:00
Modified log2 coding to avoid synthesis warning
This commit is contained in:
parent
8f717c3254
commit
6e7c0547a1
6
src/cache/cacheLRU.sv
vendored
6
src/cache/cacheLRU.sv
vendored
@ -70,8 +70,10 @@ module cacheLRU
|
|||||||
// coverage off
|
// coverage off
|
||||||
// Excluded from coverage b/c it is untestable without varying NUMWAYS.
|
// Excluded from coverage b/c it is untestable without varying NUMWAYS.
|
||||||
function integer log2 (integer value);
|
function integer log2 (integer value);
|
||||||
for (log2=0; value>0; log2=log2+1)
|
int val;
|
||||||
value = value>>1;
|
val = value;
|
||||||
|
for (log2 = 0; val > 0; log2 = log2+1)
|
||||||
|
val = val >> 1;
|
||||||
return log2;
|
return log2;
|
||||||
endfunction // log2
|
endfunction // log2
|
||||||
// coverage on
|
// coverage on
|
||||||
|
Loading…
Reference in New Issue
Block a user