Jump to content
wszhong631

Disable auto_item recording don't apply to uvm_reg_map

Recommended Posts

Hi,

when I comile my testbench, automatic item recording has been turned off by defining UVM_DISABLE_AUTO_ITEM_RECORDING.

a) set  m_auto_item_recording to 0 in uvm_sequencer_base.svh, if call the function of is_auto_item_recording_enabled(),it return  0

`ifdef UVM_DISABLE_AUTO_ITEM_RECORDING
  local bit m_auto_item_recording = 0;
`else
  local bit m_auto_item_recording = 1;
`endif

  // Access to following internal methods provided via seq_item_export

  virtual function void disable_auto_item_recording();
    m_auto_item_recording = 0;
  endfunction

  virtual function bit is_auto_item_recording_enabled();
    return m_auto_item_recording;
  endfunction

b)the follow code should be bypassed  in finish_item task,if not , sequencer.end_tr(item)  can  triggger  end_event 。

    if (sequencer.is_auto_item_recording_enabled()) begin
      sequencer.end_tr(item);
    en

c)In  uvm_reg_map.svh, such as do_bus_write()  method,after finish_item is called, the access  proccess will be suspended  all the way, except that  end_event emitted,

    bus_req.set_sequencer(sequencer);
      rw.parent.start_item(bus_req,rw.prior);

      if (rw.parent != null && i == 0)
        rw.parent.mid_do(rw);

      rw.parent.finish_item(bus_req);
      bus_req.end_event.wait_on();

d)   automatic item recording has been turned off by defining UVM_DISABLE_AUTO_ITEM_RECORDING ,The  user must  call  the  end_tr function  of the uvm_driver to  trigger end_event ?

Share this post


Link to post
Share on other sites

This is a catch-22 in the library.  There's no guarantee that finish_item() actually indicates that the driver has completed processing the item, and there's no guarantee that the driver is going to trigger the appropriate events. 

 

Ideally, if the driver detects that seq_item_port.is_auto_item_recording_enabled() returns '0', then the driver should manually call accept/begin/end_tr.  These calls will cause the appropriate events to trigger inside of the item. 

Share this post


Link to post
Share on other sites

This is a catch-22 in the library.  There's no guarantee that finish_item() actually indicates that the driver has completed processing the item, and there's no guarantee that the driver is going to trigger the appropriate events. 

 

Ideally, if the driver detects that seq_item_port.is_auto_item_recording_enabled() returns '0', then the driver should manually call accept/begin/end_tr.  These calls will cause the appropriate events to trigger inside of the item. 

 

thank you ,that is , when one user  turn off  automatic item recording ,  and if the user want to  use register model  to access some dut registers,  that will be impossible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×