Jump to content


  • Posts

  • Joined

  • Last visited

mwolf's Achievements


Member (1/2)



  1. Thanks Alan. I previously attempted to use your approach, but I mistakenly thought that I need to create/construct an object before I can use it (temp_obj =new()) which is obviously not allowed on abstract classes. In your example, why am I allowed to use a 'null' value for a class reference handle to temp_object without creating it in the first place with temp_obj=new()? The alternative solution which eliminates a need for the base uvm_object class is the following: ================================== event_object event_object_h; .. event_object_h = event_object::type_id::create("event_object_h", null); tm_clk_ev.wait_trigger; $cast(event_object_h, tm_clk_ev.get_trigger_data());
  2. I am trying to pass a trigger-specific information to my testbench. My triggers work correctly, but I am unable to get data using wait_trigger_data. I extended "event_object" from UVM_OBJECT, but when I try to capture it in wait_trigger_data, I get error ”Types are not assignment compatible”. /testcases/tests/test_dsp.svh(87): Arg. 'data' of 'wait_ptrigger_data': Illegal assignment to type 'class dsp_cfg_pkg.event_object' from type 'class uvm_pkg.uvm_object': Types are not assignment compatible. ========================================================= class event_object extends uvm_object; `uvm_object_utils(event_object) bit [10:0] addr; int pos; endclass : event_object =========================================================== in my test: event_object event_object_h; .. event_object_h = event_object::type_id::create("event_object_h", null); .. tm_clk_ev.wait_ptrigger_data(event_object_h); ================================================================ in module: uvm_event tm_clk_ev; event_object event_object_h; .. event_object_h = event_object::type_id::create("event_object_h"); event_object_h.addr = a; event_object_h.pos = corrupt_bit; tm_clk_ev.trigger(event_object_h);
  • Create New...