# uvm_sequencer #(REQ,RSP)

Summary

uvm_sequencer #(REQ,RSP)
Class Hierarchy
uvm_void
uvm_object
uvm_report_object
uvm_component
uvm_sequencer_base
uvm_sequencer_param_base#(REQ,RSP)
uvm_sequencer#(REQ,RSP)
Class Declaration
> class uvm_sequencer #(
> | type | REQ | = | uvm_sequence_item,
> |  | RSP | = | REQ
> ) extends uvm_sequencer_param_base #(REQ, RSP)
new | Standard component constructor that creates an instance of this class using the given name and parent, if any.
stop_sequences | Tells the sequencer to kill all sequences and child sequences currently operating on the sequencer, and remove all requests, locks and responses that are currently queued.
Sequencer Interface | This is an interface for communicating with sequencers.
seq_item_export | This export provides access to this sequencer’s implementation of the sequencer interface.
get_next_item | Retrieves the next available item from a sequence.
try_next_item | Retrieves the next available item from a sequence if one is available.
item_done | Indicates that the request is completed.
put | Sends a response back to the sequence that issued the request.
get | Retrieves the next available item from a sequence.
peek | Returns the current request item if one is in the FIFO.
wait_for_sequences | Waits for a sequence to have a new item available.
has_do_available | Returns 1 if any sequence running on this sequencer is ready to supply a transaction, 0 otherwise.

### new

> function new (
> | string | name, |  |
> | uvm_component | parent | = | null
> )

Standard component constructor that creates an instance of this class using the given name and parent, if any.

### stop_sequences

> virtual function void stop_sequences()

Tells the sequencer to kill all sequences and child sequences currently operating on the sequencer, and remove all requests, locks and responses that are currently queued. This essentially resets the sequencer to an idle state.

### Sequencer Interface

This is an interface for communicating with sequencers.

#### The interface is defined as

>     Requests:
>      virtual task          get_next_item      (output REQ request);
>      virtual task          try_next_item      (output REQ request);
>      virtual task          get                (output REQ request);
>      virtual task          peek               (output REQ request);
>     Responses:
>      virtual function void item_done          (input RSP response=null);
>      virtual task          put                (input RSP response);
>     Sync Control:
>      virtual task          wait_for_sequences ();
>      virtual function bit  has_do_available   ();

See uvm_sqr_if_base #(REQ,RSP) for information about this interface.

### seq_item_export

> uvm_seq_item_pull_imp #(
> | REQ,
> | RSP,
> | this_type
> ) seq_item_export

This export provides access to this sequencer’s implementation of the sequencer interface.

### get_next_item

> virtual task get_next_item (
> | output | REQ | t
> )

Retrieves the next available item from a sequence.

### try_next_item

> virtual task try_next_item (
> | output | REQ | t
> )

Retrieves the next available item from a sequence if one is available.

### item_done

> virtual function void item_done (
> | RSP | item | = | null
> )

Indicates that the request is completed.

### put

> virtual task put (
> | RSP | t
> )

Sends a response back to the sequence that issued the request.

### get

> task get (
> | output | REQ | t
> )

Retrieves the next available item from a sequence.

### peek

> task peek (
> | output | REQ | t
> )

Returns the current request item if one is in the FIFO.

### wait_for_sequences

Waits for a sequence to have a new item available.

### has_do_available

Returns 1 if any sequence running on this sequencer is ready to supply a transaction, 0 otherwise.

> virtual class uvm_void

The uvm_void class is the base class for all UVM classes.

> virtual class uvm_object extends uvm_void

The uvm_object class is the base class for all UVM data and hierarchical classes.

> class uvm_report_object extends uvm_object

The uvm_report_object provides an interface to the UVM reporting facility.

> virtual class uvm_component extends uvm_report_object

The uvm_component class is the root base class for UVM components.

> class uvm_sequencer_base extends uvm_component

Controls the flow of sequences, which generate the stimulus (sequence item transactions) that is passed on to drivers for execution.

> class uvm_sequencer_param_base #(
> | type | REQ | = | uvm_sequence_item,
> | type | RSP | = | REQ
> ) extends uvm_sequencer_base

Extends uvm_sequencer_base with an API depending on specific request (REQ) and response (RSP) types.

> class uvm_sequencer #(
> | type | REQ | = | uvm_sequence_item,
> |  | RSP | = | REQ
> ) extends uvm_sequencer_param_base #(REQ, RSP)

> function new (
> | string | name, |  |
> | uvm_component | parent | = | null
> )

Standard component constructor that creates an instance of this class using the given name and parent, if any.

> virtual function void stop_sequences()

Tells the sequencer to kill all sequences and child sequences currently operating on the sequencer, and remove all requests, locks and responses that are currently queued.

> uvm_seq_item_pull_imp #(
> | REQ,
> | RSP,
> | this_type
> ) seq_item_export

This export provides access to this sequencer’s implementation of the sequencer interface.

> virtual task get_next_item (
> | output | REQ | t
> )

Retrieves the next available item from a sequence.

> virtual task try_next_item (
> | output | REQ | t
> )

Retrieves the next available item from a sequence if one is available.

> virtual function void item_done (
> | RSP | item | = | null
> )

Indicates that the request is completed.

> virtual task put (
> | RSP | t
> )

Sends a response back to the sequence that issued the request.

> task get (
> | output | REQ | t
> )

Retrieves the next available item from a sequence.

> task peek (
> | output | REQ | t
> )

Returns the current request item if one is in the FIFO.

> virtual class uvm_sqr_if_base #(
> | type | T1 | = | uvm_object,
> |  | T2 | = | T1
> )

This class defines an interface for sequence drivers to communicate with sequencers.