Jump to content

Transaction timer expired (WDT)


Yan

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
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...