Class uvm_sqr_if_base
Name |
Default value |
Description |
---|---|---|
T1 |
uvm_object |
|
T2 |
T1 |
Functions
- virtual function void item_done ( uvm_object t ) [source]
Indicates that the request is completed to the sequencer. Any uvm_sequence_base::wait_for_item_done calls made by a sequence for this item will return.
The current item is removed from the sequencer FIFO.
If a response item is provided, then it will be sent back to the requesting sequence. The response item must have its sequence ID and transaction ID set correctly, using the uvm_sequence_item::set_id_info method:
rsp.set_id_info(req);
Before item_done is called, any calls to peek will retrieve the current item that was obtained by get_next_item. After item_done is called, peek will cause the sequencer to arbitrate for a new item.
- virtual function void put_response ( uvm_object t ) [source]
Sends a response back to the sequence that issued the request. Before the response is put, it must have its sequence ID and transaction ID set to match the request. This can be done using the uvm_sequence_item::set_id_info call:
rsp.set_id_info(req);
- virtual function void disable_auto_item_recording ( ) [source]
By default, item recording is performed automatically when get_next_item() and item_done() are called. However, this works only for simple, in-order, blocking transaction execution. For pipelined and out-of-order transaction execution, the driver must turn off this automatic recording and call uvm_transaction::accept_tr, uvm_transaction::begin_tr and uvm_transaction::end_tr explicitly at appropriate points in time.
This methods be called at the beginning of the driver's run_phase() method. Once disabled, automatic recording cannot be re-enabled.
For backward-compatibility, automatic item recording can be globally turned off at compile time by defining UVM_DISABLE_AUTO_ITEM_RECORDING
Tasks
- virtual function get_next_item ( uvm_object t ) [source]
Retrieves the next available item from a sequence. The call will block until an item is available. The following steps occur on this call:
1
Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode. If no sequence is available, wait for a requesting unlocked relevant sequence, then re-arbitrate.
2
The chosen sequence will return from wait_for_grant
3
The chosen sequence uvm_sequence_base::pre_do is called
4
The chosen sequence item is randomized
5
The chosen sequence uvm_sequence_base::post_do is called
6
Return with a reference to the item
Once get_next_item is called, item_done must be called to indicate the completion of the request to the sequencer. This will remove the request item from the sequencer FIFO.
- virtual function try_next_item ( uvm_object t ) [source]
Retrieves the next available item from a sequence if one is available. Otherwise, the function returns immediately with request set to null . The following steps occur on this call:
1
Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode. If no sequence is available, return null .
2
The chosen sequence will return from wait_for_grant
3
The chosen sequence uvm_sequence_base::pre_do is called
4
The chosen sequence item is randomized
5
The chosen sequence uvm_sequence_base::post_do is called
6
Return with a reference to the item
Once try_next_item is called, item_done must be called to indicate the completion of the request to the sequencer. This will remove the request item from the sequencer FIFO.
- virtual function wait_for_sequences ( ) [source]
Waits for a sequence to have a new item available. The default implementation in the sequencer calls uvm_wait_for_nba_region. User-derived sequencers may override its wait_for_sequences implementation to perform some other application-specific implementation.
- virtual function get ( uvm_object t ) [source]
Retrieves the next available item from a sequence. The call blocks until an item is available. The following steps occur on this call:
1
Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode. If no sequence is available, wait for a requesting unlocked relevant sequence, then re-arbitrate.
2
The chosen sequence will return from uvm_sequence_base::wait_for_grant
3
The chosen sequence uvm_sequence_base::pre_do is called
4
The chosen sequence item is randomized
5
The chosen sequence uvm_sequence_base::post_do is called
6
Indicate item_done to the sequencer
7
Return with a reference to the item
When get is called, item_done may not be called. A new item can be obtained by calling get again, or a response may be sent using either put, or uvm_driver::rsp_port.write().
- virtual function peek ( uvm_object t ) [source]
Returns the current request item if one is in the sequencer FIFO. If no item is in the FIFO, then the call will block until the sequencer has a new request. The following steps will occur if the sequencer FIFO is empty:
1
Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode. If no sequence is available, wait for a requesting unlocked relevant sequence, then re-arbitrate.
2
The chosen sequence will return from uvm_sequence_base::wait_for_grant
3
The chosen sequence uvm_sequence_base::pre_do is called
4
The chosen sequence item is randomized
5
The chosen sequence uvm_sequence_base::post_do is called
Once a request item has been retrieved and is in the sequencer FIFO, subsequent calls to peek will return the same item. The item will stay in the FIFO until either get or item_done is called.
- virtual function put ( uvm_object t ) [source]
CLASS
uvm_sqr_if_base #(REQ,RSP)
This class defines an interface for sequence drivers to communicate with sequencers. The driver requires the interface via a port, and the sequencer implements it and provides it via an export.