added config.vh
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
`include "VX_define.v"
|
||||
`include "VX_define.vh"
|
||||
module VX_priority_encoder_w_mask
|
||||
#(
|
||||
parameter N = 10
|
||||
@@ -7,8 +7,8 @@ module VX_priority_encoder_w_mask
|
||||
input wire[N-1:0] valids,
|
||||
output reg [N-1:0] mask,
|
||||
//output reg[$clog2(N)-1:0] index,
|
||||
output reg[(`CLOG2(N))-1:0] index,
|
||||
//output reg[`CLOG2(N):0] index, // eh
|
||||
output reg[(`LOG2UP(N))-1:0] index,
|
||||
//output reg[`LOG2UP(N):0] index, // eh
|
||||
output reg found
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ module VX_priority_encoder_w_mask
|
||||
for (i = 0; i < N; i=i+1) begin
|
||||
if (valids[i]) begin
|
||||
//index = i[$clog2(N)-1:0];
|
||||
index = i[(`CLOG2(N))-1:0];
|
||||
index = i[(`LOG2UP(N))-1:0];
|
||||
found = 1;
|
||||
// mask[index] = (1 << i);
|
||||
// $display("%h",(1 << i));
|
||||
|
||||
Reference in New Issue
Block a user