function new (string str="pmc_svt_i2c_system_configuration");
super.new(str);
num_slaves = 128; // 128 new slaves
int i;
/** Create port configurations */
create_sub_cfgs(num_masters, num_slaves);
for(i=32'h20 ; i < 32'h60 ; i ++) begin
slave_cfg[i].is_active = 0;
slave_cfg[i].slave_address = i[9:0]; // `SVT_I2C_SLAVE0_ADDRESS;
slave_cfg[i].bus_speed = HIGHSPEED_MODE;
slave_cfg[i].enable_10bit_addr = 0;
end
endfunction
On compiling the above code, the following error is thrown.
Error-[SE] Syntax error
Following verilog source has syntax error :
"/nfs/fm/disks/001/config.sv",
22: token is 'int'
int i;
^
System verilog keyword 'int' is not expected to be used in this context.
Why can't we use the variable int or bit in the function new?