Jump to content

UVM events with data.

Recommended Posts



In UVM 1.2, the UVM event class is declared as follows:


class uvm_event#(type T=uvm_object) extends uvm_event_base;
The trigger function has the following line of code:
uvm_event_callback#(T) tmp=callbacks;
The assignment to callbacks, refers to the uvm_event_base member callbacks[$].
The uvm_event_base is not parameterized, and callbacks[$] is declared in uvm_event_base  as:
protected uvm_event_callback  callbacks[$];
Thus, making the parameterized type of callbacks[$] the default of callbacks[$], which is uvm_object.


How can the uvm_event be parameterized to a non uvm_object? There is no casting done in the trigger function. Lets say that I tried following:


class uvm_object_extend extends uvm_object;





uvm_event#(uvm_object_extend ) my_event;


My compiler generates and error indicating that in the trigger function, the assignment of:


uvm_event_callback#(T) tmp=callbacks;
in the trigger function is not valid, since callbacks  in the uvm_event_base is of parameterized type uvm_object, but uvm_event_callback#(T) is of parameterized type uvm_object_extend.
This seems to be an issue in UVM, or am I not using this correctly? Does anyone have experience with uvm_events which use extended uvm_objects for data passing?


Link to post
Share on other sites
  • 2 years later...

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...