Hello Forum,
I am writing the functional coverage subscriber and while writing the constructor as given below, i am facing an issue.
The class is given below:
class fc_subs extends uvm_subscriber#(trans);
`uvm_component_utils(fc_subs)
trans tx;
covergroup cg;
one: coverpoint tx.in;
two: coverpoint tx.id;
three:coverpoint tx.reset;
cross one,two,three;
endgroup:cg
function new(string name = "fc_subs", uvm_component parent = null);
super.new(name,parent);
cg = new;
endfunction:new
function void write(trans t);
tx = t;
cg.sample();
endfunction
endclass
It is giving error in new function in super.new line:
# ** Error: (vsim-8754) C:/questasim_10.2c/win32/../verilog_src/uvm-1.1d/src/base/uvm_registry.svh(66): Actual input arg. of type 'class mtiUvm.uvm_pkg::uvm_component' for formal 'name' of 'new' is not compatible with the formal's type 'string'.
#
# Region: /uvm_pkg::uvm_component_registry #(pkg::fc_subs, fc_subs)
# ** Error: (vsim-3046) C:/questasim_10.2c/win32/../verilog_src/uvm-1.1d/src/base/uvm_registry.svh(66): Too many arguments to 'new'. Expected 1, found 2.
Please help and suggest some workaround.
Thanks and Regards
Sunil S.