Welcome ! This website will help YOU (recent graduates/professionals) learn verification languages like SystemVerilog and UVM. Register for free and access more content !
1 minute reading time (165 words)
Featured 

what is the m_sequencer ?

what is the m_sequencer ?

There are primarily two ways to start a sequence : use a `uvm_do macro, or use the start() method. If you have read How to execute sequences via `uvm_do macros ?, you might already know that `uvm_do macros eventually call the start() method, and the macros act as a wrapper to execute both data items and sequences on the default sequencer "m_sequencer".

All uvm_sequence_item objects have a uvm_sequencer_base handle called m_sequencer, to which a different sequencer can be assigned. This can be achieved in the following ways:

  • provide a sequencer handle in start() method
  • use the sequencer of the parent sequence
  • provide a sequencer via set_sequencer() method

virtual task start ( uvm_sequencer_base  sequencer,
                     uvm_sequence_base   parent_sequence = null,
                     int                 this_priority = -1,
                     bit                 call_pre_post = 1
                   );
 
virtual function void set_sequencer (uvm_sequencer_base sequencer);
 

A sequence is always executed by the default sequencer. It's just that the default sequencer is made to point to the sequencer on which we want the sequence to execute on.

$deposit - Put a value onto any net/register
how to disable file name and line numbers in repor...
 

Comments 3

Shrikant saxena on Tuesday, 16 August 2016 05:44

Hello sir,
I have read your blog on sequencer and it is very helpful for me. but i have an doubt that can be not use TLM get/put like methods instead of seq_item_port.get_next_item/seq_item_port.item_done to communicate between sequencer and driver ?


thank you

Hello sir, I have read your blog on sequencer and it is very helpful for me. but i have an doubt that can be not use TLM get/put like methods instead of seq_item_port.get_next_item/seq_item_port.item_done to communicate between sequencer and driver ? thank you
Admin on Thursday, 18 August 2016 14:49

What makes uvm_driver different from a uvm_component is that it contains a port called seq_item_port of type uvm_seq_item_pull_port. This port is specially developed for use in sequencer-driver communication, and a call to get_next_item() will result in the sequencer to provide a new item to the driver. Also, there are cases where the driver can send a response back to the sequencer, and the RSP serves well for the purpose.

What makes [b]uvm_driver[/b] different from a [i]uvm_component[/i] is that it contains a port called [i]seq_item_port[/i] of type [b]uvm_seq_item_pull_port[/b]. This port is specially developed for use in sequencer-driver communication, and a call to [i]get_next_item()[/i] will result in the sequencer to provide a new item to the driver. Also, there are cases where the driver can send a response back to the sequencer, and the RSP serves well for the purpose.
Rahul Marotkar on Wednesday, 22 March 2017 04:12

we can use TLM get/put methods instead of seq_item_port.get_next_item/seq_item_port.item_done() methods. for example, we are having one driver (initiator) and one sequencer (target) and have to complete handshake process between them, then we will have to declare uvm_blocking_get_port() in driver and uvm_blocking_get_imp() in sequencer with get task. In driver's run_phase, call that get task for generating transactions which has defined in sequencer. In agent's connect_phase, connect both ports which are declared in driver and sequencer using connect method. since TLM get/put methods are blocking methods and has capability to complete the driver-sequencer handshake process by itself. get_next_item() is also a blocking method but it needs item_done() which is a non-blocking method to complete the handshake process and by using this method no need to declare any other ports in driver and sequencer, we can simply connect both components in agent's connect phase.

we can use TLM get/put methods instead of seq_item_port.get_next_item/seq_item_port.item_done() methods. for example, we are having one driver (initiator) and one sequencer (target) and have to complete handshake process between them, then we will have to declare [b]uvm_blocking_get_port()[/b] in driver and [b]uvm_blocking_get_imp()[/b] in sequencer with [b]get[/b] task. In driver's run_phase, call that [b]get[/b] task for generating transactions which has defined in sequencer. In agent's connect_phase, connect both ports which are declared in driver and sequencer using [b]connect[/b] method. since TLM get/put methods are blocking methods and has capability to complete the driver-sequencer handshake process by itself. [b]get_next_item()[/b] is also a blocking method but it needs [b]item_done()[/b] which is a non-blocking method to complete the handshake process and by using this method no need to declare any other ports in driver and sequencer, we can simply connect both components in agent's connect phase.
Already Registered? Login Here
Guest
Monday, 18 June 2018

We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. You consent to our cookies if you continue to use our website. To find out more about the cookies we use and how to delete them, see our privacy policy.

  I accept cookies from this site.
Agree
EU Cookie Directive plugin by www.channeldigital.co.uk