mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 10:15:19 +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
|
||||
// Excluded from coverage b/c it is untestable without varying NUMWAYS.
|
||||
function integer log2 (integer value);
|
||||
for (log2=0; value>0; log2=log2+1)
|
||||
value = value>>1;
|
||||
int val;
|
||||
val = value;
|
||||
for (log2 = 0; val > 0; log2 = log2+1)
|
||||
val = val >> 1;
|
||||
return log2;
|
||||
endfunction // log2
|
||||
// coverage on
|
||||
|
Loading…
Reference in New Issue
Block a user