blk_top.sv:
module blk_top;
bit clk;
test_module dut(
.clk1 (clk),
.clk2 (clk)
);
// 200Mhz clock generator
initial begin
clk = 0;
forever begin
#(25) clk = ~clk;
end
end
initial begin
// Dump waves
$fsdbDumpvars(0,blk_top);
end
endmodule
blk_inf.sv:
interface test_module_if(
input bit clk_if
);
...
endinterface: i2c_data_seq2_if
blk_run.sv:
program automatic blk_run;
bind blk_top.dut test_module_if m_if(
...
);
`include "blk_env.sv"
static blk_env env;
initial begin
env = new("my_env");
uvm_resource_db#(virtual test_module_if)::set("my_env",
"test_module_if", m_if);
run_test();
end
endprogram
Error:
Error-[SE] Syntax error
Following verilog source has syntax error :
“./blk_run.sv”, 4: token is ‘blk_top’
bind blk_top.dut test_module_if m_if(
How can I bind a dut module to an interface in testbench? What’s the problem?