Jump to content

quanghong

Members
  • Content Count

    2
  • Joined

  • Last visited

About quanghong

  • Rank
    Member

Profile Information

  • Gender
    Male
  1. You can use the polymorphism in UVM as following example: class driver extends uvm_driver; class my_driver extends driver; module test; .... driver dr; initial begin // polymorphism: wait until run-time to bind the object type // You can override either by type or instance. factory.set_type_override_by_type(driver::get_type(), my_driver::get_type()); // It is important to use factory before create dr = driver::type_id::create("driver", null); run_test(); end endmodule Hope it helps. Quang
  2. The interface UVC and module UVC is difference in this way: Interface UVC -- develop for designated PROTOCOL and can be used in verification of any device which uses that protocol. Module UVC -- Designs for Device Specific verification logic. Now, let me try to answer part of this question which I think David and apfitch miss. uvm_analysis_port #(dataObject) mon_coll_port; umv_analysis_port #(dataObject) mon_rest_port; YES. You can use these ports if the implemented write() function is in two separate classes e.g: myclass_mon_coll_port and myclass_rest_port Let's say that in the run_phase() you have these lines: mon_coll_port.write(dataObject); // use write() func in myclass_mon_coll_port mon_rest_port.write(dataObject); // use write() func in myclass_mon_rest_port If your purpose is to have the implemented write() in the same class then refer to the answers from David and apfitch. Regards, Quang
×
×
  • Create New...