The library implements some public API beyond what is documented in 1800.2.
uvm_sequencer_base | ||||||
The library implements some public API beyond what is documented in 1800.2. | ||||||
Class Hierarchy | ||||||
| ||||||
Class Declaration | ||||||
| ||||||
Variables | ||||||
wait_for_sequences_count | Controls the number of wait_for_sequences calls when selecting next sequence. | |||||
Each successively lower sequencer in a stack will require a higher wait_for_sequences_count | value in order to absorb all potential wait_for_sequences() counts in each higher level of the stack. | |||||
Increasing this value will decrease the efficiency of the sequencer | in the event of a get/get_next_item/peek/try_next_item call when no items are actually available. | |||||
Methods | ||||||
execute_item | Executes the given transaction item directly on this sequencer. | |||||
start_phase_sequence | Start the default sequence for this phase, if any. | |||||
stop_phase_sequence | Stop the default sequence for this phase, if any exists, and it is still executing. | |||||
wait_for_grant | This task issues a request for the specified sequence. | |||||
wait_for_sequences | Waits for a sequence to have a new item available. | |||||
send_request | Derived classes implement this function to send a request item to the sequencer, which will forward it to the driver. | |||||
Macros | ||||||
UVM_DISABLE_AUTO_ITEM_RECORDING | Performs the same function as the 1800.2 define UVM_DISABLE_RECORDING, globally turning off automatic item recording when defined by the user. | |||||
Methods | ||||||
disable_auto_item_recording | Disables auto_item_recording | |||||
is_auto_item_recording_enabled | Returns 1 is auto_item_recording is enabled, otherwise 0 |
Controls the number of wait_for_sequences calls when selecting next sequence.
By default, the sequencers will wait for 1 wait_for_sequences call when selecting a new sequence. When stacking sequencers, this will cause a problem as the single call in a low level sequencer is absorbed by the next call in the higher level sequencer(s). This problem can be avoided by setting the value of “wait_for_sequences_count” to a value higher than 1 for the lower level sequencer(s) using the config database, e.g.:
uvm_config_db#(int)::set(this, "path.to.sequencer", "wait_for_sequences_count", 4);
Setting wait_for_sequences_count less than 1 will be ignored.
value in order to absorb all potential wait_for_sequences() counts in each higher level of the stack.
in the event of a get/get_next_item/peek/try_next_item call when no items are actually available. As such, care should be taken to avoid unnecessarily increasing the value.
@uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2
virtual task execute_item( uvm_sequence_item item )
Executes the given transaction item directly on this sequencer. A temporary parent sequence is automatically created for the item. There is no capability to retrieve responses. If the driver returns responses, they will accumulate in the sequencer, eventually causing response overflow unless uvm_sequence_base::set_response_queue_error_report_enabled is called.
virtual function void start_phase_sequence( uvm_phase phase )
Start the default sequence for this phase, if any. The default sequence is configured via resources using either a sequence instance or sequence type (object wrapper). If both are used, the sequence instance takes precedence. When attempting to override a previous default sequence setting, you must override both the instance and type (wrapper) resources, else your override may not take effect.
When setting the resource using set, the 1st argument specifies the context pointer, usually this for components or null when executed from outside the component hierarchy (i.e. in module). The 2nd argument is the instance string, which is a path name to the target sequencer, relative to the context pointer. The path must include the name of the phase with a “_phase” suffix. The 3rd argument is the resource name, which is “default_sequence”. The 4th argument is either an object wrapper for the sequence type, or an instance of a sequence.
Configuration by instances allows pre-initialization, setting rand_mode, use of inline constraints, etc.
myseq_t myseq = new("myseq"); myseq.randomize() with { ... }; uvm_config_db #(uvm_sequence_base)::set(null, "top.agent.myseqr.main_phase", "default_sequence", myseq);
Configuration by type is shorter and can be substituted via the factory.
uvm_config_db #(uvm_object_wrapper)::set(null, "top.agent.myseqr.main_phase", "default_sequence", myseq_type::type_id::get());
The uvm_resource_db can similarly be used.
myseq_t myseq = new("myseq"); myseq.randomize() with { ... }; uvm_resource_db #(uvm_sequence_base)::set({get_full_name(), ".myseqr.main_phase", "default_sequence", myseq, this);
uvm_resource_db #(uvm_object_wrapper)::set({get_full_name(), ".myseqr.main_phase", "default_sequence", myseq_t::type_id::get(), this );
virtual function void stop_phase_sequence( uvm_phase phase )
Stop the default sequence for this phase, if any exists, and it is still executing.
virtual task wait_for_grant( uvm_sequence_base sequence_ptr, int item_priority = -1, bit lock_request = 0 )
This task issues a request for the specified sequence. If item_priority is not specified, then the current sequence priority will be used by the arbiter. If a lock_request is made, then the sequencer will issue a lock immediately before granting the sequence. (Note that the lock may be granted without the sequence being granted if is_relevant is not asserted).
When this method returns, the sequencer has granted the sequence, and the sequence must call send_request without inserting any simulation delay other than delta cycles. The driver is currently waiting for the next item to be sent via the send_request call.
virtual task wait_for_sequences()
Waits for a sequence to have a new item available. Uses uvm_wait_for_nba_region to give a sequence as much time as possible to deliver an item before advancing time.
virtual function void send_request( uvm_sequence_base sequence_ptr, uvm_sequence_item t, bit rerandomize = 0 )
Derived classes implement this function to send a request item to the sequencer, which will forward it to the driver. If the rerandomize bit is set, the item will be randomized before being sent to the driver.
This function may only be called after a wait_for_grant call.
Performs the same function as the 1800.2 define UVM_DISABLE_RECORDING, globally turning off automatic item recording when defined by the user. Provided for backward compatibility.
@uvm-contrib This API is being considered for potential contribution to 1800.2
virtual function void disable_auto_item_recording()
Disables auto_item_recording
This function is the implementation of the uvm_sqr_if_base::disable_auto_item_recording() method detailed in IEEE1800.2 section 15.2.1.2.10
This function is implemented here to allow uvm_push_sequencer#(REQ,RSP) and uvm_push_driver#(REQ,RSP) access to the call.
virtual function bit is_auto_item_recording_enabled()
Returns 1 is auto_item_recording is enabled, otherwise 0
This function is the implementation of the uvm_sqr_if_base::is_auto_item_recording_enabled() method detailed in IEEE1800.2 section 15.2.1.2.11
This function is implemented here to allow uvm_push_sequencer#(REQ,RSP) and uvm_push_driver#(REQ,RSP) access to the call.
The uvm_void class is the base class for all UVM classes.
virtual class uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
virtual class uvm_object extends uvm_void
The uvm_report_object provides an interface to the UVM reporting facility.
class uvm_report_object extends uvm_object
The library implements the following public API beyond what is documented in 1800.2.
virtual class uvm_component extends uvm_report_object
The library implements some public API beyond what is documented in 1800.2.
virtual class uvm_sequencer_base extends uvm_component
Executes the given transaction item directly on this sequencer.
virtual task execute_item( uvm_sequence_item item )
Start the default sequence for this phase, if any.
virtual function void start_phase_sequence( uvm_phase phase )
Stop the default sequence for this phase, if any exists, and it is still executing.
virtual function void stop_phase_sequence( uvm_phase phase )
This task issues a request for the specified sequence.
virtual task wait_for_grant( uvm_sequence_base sequence_ptr, int item_priority = -1, bit lock_request = 0 )
Waits for a sequence to have a new item available.
virtual task wait_for_sequences()
Derived classes implement this function to send a request item to the sequencer, which will forward it to the driver.
virtual function void send_request( uvm_sequence_base sequence_ptr, uvm_sequence_item t, bit rerandomize = 0 )
Disables auto_item_recording
virtual function void disable_auto_item_recording()
Returns 1 is auto_item_recording is enabled, otherwise 0
virtual function bit is_auto_item_recording_enabled()
By default, if the internal response queue overflows, an error is reported.
function void set_response_queue_error_report_enabled( bit value )
This task will block until SystemVerilog’s NBA region (or Re-NBA region if called from a program context).
task uvm_wait_for_nba_region
class uvm_push_sequencer #( type REQ = uvm_sequence_item, RSP = REQ ) extends uvm_sequencer_param_base #(REQ, RSP)
Base class for a driver that passively receives transactions, i.e.
class uvm_push_driver #( type REQ = uvm_sequence_item, type RSP = REQ ) extends uvm_component