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?
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;
It is legal code, but unfortunately this was not supported in Incisive; you could only have localparam declarations in the module body, not the parameter port list in Incisive.
If you can switch to using Xcelium then you won't have any problem with this code; Xcelium supports declaring localparm in the parameter port list.
Bear in mind that Incisive stopped being developed (no new features) since 2016!
Thank you StephenH for the response.
I think I am outdated on these tools. Is Xcelium going to replace irun/ncsim?