Jump to content

Recommended Posts

Posted

When a driver returns a response to the sequence, it calls 'set_id_info()' to set the identifiers of the transactions returned. This way, the originating sequence can correlate the response and the originating transaction, by matching the 2 fields sequence_id and transaction_id.

 

 

This has a couple of drawbacks :

  1. the sequence writer must set this field 'transaction_id' by hand
  2. the transanction_id may not be unique - a bug can be introduced (sequence/driver) and go unnnoticed when the wrong matching occurs - worst scenario is when a user simply forgets to set it, and the matching still occurs, but is wrong !

 

An improvement/fix to address these 2 issues would be to use field 'inst_id' (which is unique) instead of 'transaction_id' (user defined).

It looks to me the original intention was to use this field rather than 'transaction_id'.

 

The code change would be :

 

  function void set_id_info(uvm_sequence_item item);
    if (item == null) begin
      uvm_report_fatal(get_full_name(), "set_id_info called with null parameter", UVM_NONE);
    end
  /* this.set_transaction_id(item.get_transaction_id()); */
    this.set_transaction_id(item.get_inst_id());

    this.set_sequence_id(item.get_sequence_id());
  endfunction

 

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