Add files via upload
ICache_In_Place
This commit is contained in:
committed by
GitHub Enterprise
parent
7e62e02b7c
commit
b0f685c2e2
@@ -1,10 +1,14 @@
|
||||
`include "../VX_define.v"
|
||||
|
||||
module VX_generic_priority_encoder
|
||||
#(
|
||||
parameter N = 1
|
||||
)
|
||||
(
|
||||
input wire[N-1:0] valids,
|
||||
output reg[$clog2(N)-1:0] index,
|
||||
//output reg[$clog2(N)-1:0] index,
|
||||
output reg[(`CLOG2(N))-1:0] index,
|
||||
//output reg[`CLOG2(N):0] index, // eh
|
||||
output reg found
|
||||
);
|
||||
|
||||
@@ -14,7 +18,8 @@ module VX_generic_priority_encoder
|
||||
found = 0;
|
||||
for (i = N-1; i >= 0; i = i - 1) begin
|
||||
if (valids[i]) begin
|
||||
index = i[$clog2(N)-1:0];
|
||||
//index = i[$clog2(N)-1:0];
|
||||
index = i[(`CLOG2(N))-1:0];
|
||||
found = 1;
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user