Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

Passing data in uvm_events.

$
0
0

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);

              


Viewing all articles
Browse latest Browse all 756

Trending Articles