mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-22 12:57:23 -04:00
Modified log2 coding to avoid synthesis warning
This commit is contained in:
parent
8f717c3254
commit
6e7c0547a1
1 changed files with 4 additions and 2 deletions
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…
Add table
Add a link
Reference in a new issue