Hi All
I encounter an error ( Error TMAFTC Too many arguments to function/task call) when compile the following code
`include "uvm_macros.svh"
module test; // not work
import uvm_pkg::*;
class env extends uvm_env;
`uvm_component_utils(env)
function new(string name = "env");
super.new(name);
$display("HELLO",);
endfunction
task run_phase(uvm_phase phase);
phase.raise_objection(this);
#1000;
phase.drop_objection(this);
endtask
endclass
initial begin
run_test("env");
end
endmodule
But if i change to this, it works.
`include "uvm_macros.svh"
module test; // it works
import uvm_pkg::*;
class env extends uvm_env;
function new(string name = "env");
super.new(name);
$display("HELLO",);
endfunction
task run_phase(uvm_phase phase);
phase.raise_objection(this);
#1000;
phase.drop_objection(this);
endtask
endclass
env e;
initial begin
e = new();
run_test();
end
endmodule
I don’t know why i use uvm_component_utils and run_test(“env”),then it will happen compile error.
would you explain it to me ? Thanks a lot!!