ovm_callback_defines.svh | |
Callback Macros | |
`ovm_do_callbacks | Calls the given METHOD of all callbacks of type CB registered with the calling object (i.e. |
`ovm_do_obj_callbacks | Calls the given METHOD of all callbacks based on type CB registered with the given object, OBJ, which is or is based on type T. |
`ovm_do_callbacks_exit_on | Calls the given METHOD of all callbacks of type CB registered with the calling object (i.e. |
`ovm_do_obj_callbacks_exit_on | Calls the given METHOD of all callbacks of type CB registered with the given object OBJ, which must be or be based on type T, and returns upon the first callback that returns the bit value given by VAL. |
`ovm_do_task_callbacks | Calls the given METHOD of all callbacks of type CB registered with the calling object (i.e. |
`ovm_do_ext_task_callbacks | This macro is identical to <ovm_do_task_callbacks> macro except there is an additional OBJ argument that allows the user to execute callbacks associated with an external object instance OBJ instead of the calling (this) object. |
Calls the given METHOD of all callbacks of type CB registered with the calling object (i.e. this object), which is or is based on type T.
This macro executes all of the callbacks associated with the calling object (i.e. this object). The macro takes three arguments:
virtual class mycb extends ovm_cb; pure function void my_function (mycomp comp, int addr, int data); endclass
A component would invoke the macro as
task mycomp::run(); int curr_addr, curr_data; ... `ovm_do_callbacks(mycb, mycomp, my_function(this, curr_addr, curr_data) ... endtask
Calls the given METHOD of all callbacks based on type CB registered with the given object, OBJ, which is or is based on type T.
This macro is identical to <ovm_do_callbacks (CB,T,METHOD)> macro, but it has an additional OBJ argument to allow the specification of an external object to associate the callback with. For example, if the callbacks are being applied in a sequence, OBJ could be specified as the associated sequencer or parent sequence.
Calls the given METHOD of all callbacks of type CB registered with the calling object (i.e. this object), which is or is based on type T, returning upon the first callback returning the bit value given by VAL.
This macro executes all of the callbacks associated with the calling object (i.e. this object). The macro takes three arguments:
virtual class mycb extends ovm_cb; pure function bit drop_trans (mycomp comp, my_trans trans); endclass
A component would invoke the macro as
task mycomp::run(); my_trans trans; forever begin get_port.get(trans); if (`ovm_do_callbacks_exit_on(mycb, mycomp, extobj, drop_trans(this,trans), 1) ovm_report_info("DROPPED",{"trans dropped: %s",trans.convert2string()}); // execute transaction end endtask
Calls the given METHOD of all callbacks of type CB registered with the given object OBJ, which must be or be based on type T, and returns upon the first callback that returns the bit value given by VAL.
Calls the given METHOD of all callbacks of type CB registered with the calling object (i.e. this object), which is or is based on type T.
This macro is the same as the <ovm_do_callbacks> macro except that each callback is executed inside of its own thread. The threads are concurrent, but the execution order of the threads is simulator dependent. The macro does not return until all forked callbacks have completed.
virtual class mycb extends ovm_cb; pure task my_task(mycomp, int addr, int data); endclass
task mycomp::run(); int curr_addr, curr_data; ... `ovm_callback(mycb, mycomp, my_task(this, curr_addr, curr_data)) ... endtask
This macro is identical to <ovm_do_task_callbacks> macro except there is an additional OBJ argument that allows the user to execute callbacks associated with an external object instance OBJ instead of the calling (this) object.