qwerty Posted April 11, 2012 Report Share Posted April 11, 2012 Hi, I have a small UVM test cases. I have defined the interface and instantiated it in my top.sv as: inf vif(); My env class is as under. I tried to connect the interface in the two differnt ways using connect and assign_vi but non of them is working. class simple_env extends uvm_env; `uvm_component_utils(simple_env) simple_agent agent; //virtual interface inf vif; function new (string name = "simple_env", uvm_component parent); super.new(); endfunction: new function void build(); super.build(); agent= simple_agent::type_id::create("Simple_agent", this); endfunction //function void assign_vi(virtual interface inf vif); // this.vif = vif; // agent.assign_vi(vif); //endfunction function void connect(); agent.assign_vi(top.vif); endfunction endclass Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.