In reply to dave_59:
thanks a lot, dave.
when I try
//include param_if out of top_tb ,it works fine
`include "param_if.sv"
module top_tb
....
endmoduel
or
//it works too
//not include param_if in top_tb file
vlog -timescale “10ps/10ps”
+incdir+./…
…/test_pkg.sv
./param_pkg.sv
./param_if.sv
./rst_agent_pkg.sv
./dut.sv
./top_tb.sv
But I still confused why it will be error with
** Error: (vsim-13216) Illegal assignment to type ‘virtual param_if’ from type ‘interface param_if #()’: Vir. ‘param_if’ interface must be assigned a matching interface or virtual interface.
Time: 0 ps Iteration: 0 Instance: /top_tb File: ./top_tb.sv Line: 59
it is very similar when you deal with parameterized interface.
Line 59:
uvm_config_db #(virtual param_if)::set(null, “uvm_test_top”, “vif”, my_param_if);