import uvm_pkg::*;
`include “uvm_macros.svh”
class pkt extends uvm_sequence_item;
`uvm_object_utils(pkt)
function new(string path);
super.new(path);
endfunction
endclass
The following code gives the error
MESSAGE_SP VCP2124 “Package uvm_pkg found in library uvm_1_2.”
ERROR VCP2890 “Unspecified argument is used for an argument that does not have a default value: path.” “testbench.sv” 5 413
ERROR VCP2890 “Unspecified argument is used for an argument that does not have a default value: path.” “/usr/share/Riviera-PRO/vlib/uvm-1.2/src/base/uvm_registry.svh” 207 30
It gets resolved if I change the new function as follows
function new(string path = “”);
Why do we need to have default args for the new constructor ?