Hi Cadence,
I use irun(64): 15.20-s029 to run some SV files I fetched from the internet.
I am getting this error but it seems those are correct syntax in Verilog 2001 and later.
How do I fix those?
Thank you!
file: ../tb/tnoc/rtl/bcm/tbcm_counter.sv
localparam int WIDTH = $clog2(MAX_COUNT + 1)
|
ncvlog: *E,LOCALP (../tb/tnoc/rtl/bcm/tbcm_counter.sv,6|11): illegal localparam in list of parameters [12.2(IEEE-2001)].
module gncorelib.tbcm_counter:sv
errors: 1, warnings: 0
module tbcm_counter #(
parameter int MAX_COUNT = 3,
parameter int MIN_COUNT = 0,
parameter int INITIAL_COUNT = MIN_COUNT,
parameter bit WRAP_AROUND = 1,
localparam int WIDTH = $clog2(MAX_COUNT + 1)
)(
input logic clk,
input logic rst_n,
input logic i_clear,
input logic i_set,
input logic [WIDTH-1:0] i_set_value,
input logic i_up,
input logic i_down,
output logic [WIDTH-1:0] o_count,
output logic [WIDTH-1:0] o_count_next
);
localparam bit [WIDTH-1:0] INITIAL = INITIAL_COUNT;
localparam bit [WIDTH-1:0] MAX = MAX_COUNT;
localparam bit [WIDTH-1:0] MIN = MIN_COUNT;
logic [WIDTH-1:0] count;
logic [WIDTH-1:0] count_next;