Yan Posted March 28, 2021 Report Share Posted March 28, 2021 Hi, I would like to start a watchdog timer on an item sent to the scoreboard from one monitor, and remove watchdog when another transaction from another monitors comes in. If the watchdog exiered issue a dut_error. I cannot add watchdog to the item itself and seems like not in the scoreboard too. It completely separated interfaces so assertions cannot be applied here. Can anyone assist me here? Quote Link to comment Share on other sites More sharing options...
chr_sue Posted March 28, 2021 Report Share Posted March 28, 2021 The scoreboard and the sequence item do not know anything about the timing, like clock cycles or absolute time. On the transaction level only the order of the items counts. What you can do is to count your items. Any timing is only related to so called transactors, i.e. drivers and monitors. Quote Link to comment Share on other sites More sharing options...
David Black Posted March 28, 2021 Report Share Posted March 28, 2021 Consider using a uvm_event from the uvm_event pool and possibly a uvm_event_callback. Monitor 1 sends a delayed event: task monitor1::run_phase( uvm_phase phase); My_transaction sent_txn; uvm_event sent_evt = uvm_event_pool::get_global_pool().get("my_timed_event"); uvm_event rcvd_evt = uvm_event_pool::get_global_pool().get("my_received_event"); forever begin ... collect transaction ... timeout: fork begin received_evt.wait_trigger(); disable timeout; #timeout evt.trigger( sent_txn ); join_none end endtask: monitor1 Monitor 2 sends received transaction: task monitor2::run_phase( uvm_phase phase); My_transaction rcvd_txn; uvm_event rcvd_evt = uvm_event_pool::get_global_pool().get("my_received_event"); forever begin ... collect transaction ... rcvd_evt.trigger( rcvd_txn ); ... end endtask: monitor2 Scoreboard waits for either: task My_scoreboard::run_phase(uvm_phase); My_transaction txn; uvm_event sent_evt = uvm_event_pool::get_global_pool().get("my_timed_event"); uvm_event rcvd_evt = uvm_event_pool::get_global_pool().get("my_received_event"); forever begin bit timeout = 0; get_data: fork timed_out: begin sent_evt.wait_trigger(); $cast( txn, sent_evt.get_trigger_data() ); timeout = 1; disable received; end received: begin rcvd_evt.wait_trigger(); $cast( txn, rcvd_evt.get_trigger_data() ); disable timed_out; end join_any ... end endtask: My_scoreboard::run_phase You might need the callback to disable an event in flight. Quote Link to comment Share on other sites More sharing options...
Yan Posted March 28, 2021 Author Report Share Posted March 28, 2021 Thanks, Is there any periodic event that i can trigger in the SB, then i can go through the items and see if the current time - creation time is large? Quote Link to comment Share on other sites More sharing options...
Yan Posted March 28, 2021 Author Report Share Posted March 28, 2021 Oh thanks, just what i was looking for. I'll try it on my environment Quote Link to comment Share on other sites More sharing options...
David Black Posted March 29, 2021 Report Share Posted March 29, 2021 You should also take a look at uvm_heartbeat. It might be appropriate. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.