Any use of this material without specific permission of Arrow Devices is strictly prohibited
May 2015
UVM:	
  Basic	
  Sequences	
  
	
  
	
  
	
  
Chandra	
  Bhushan	
  Singh	
  
Topics	
  Covered	
  
•  Sequence Item
•  Sequencer
•  Sequences
2
Arrow Devices Pvt Ltd
Sequence Item
Arrow Devices Pvt Ltd
Sequence Item Content
Sequence Item consists of the following
Ø  Control : What type of transfer, what size
Ø  Payload : The main data content of the transfer
Ø  Configuration : Setting up a new mode of operation,
error behavior etc
Ø  Analysis : Convenience fields which aid analysis - time
stamps, rolling checksums etc
Arrow Devices Pvt Ltd
 
	
  
	
  	
  
Arrow Devices Pvt Ltd
Randomiza7on	
  Considera7ons	
  
Ø  Request properties should be rand
Ø  Response properties should not be rand
Example:	
  Sequence	
  Item	
  
Arrow Devices Pvt Ltd
	
  	
  
Arrow Devices Pvt Ltd
Sequence	
  Item	
  Methods	
  
 
	
  
	
  
	
  
Sequencer	
  
	
  
	
  	
  
Arrow Devices Pvt Ltd
Arrow Devices Pvt Ltd
Sequencer	
  Characteris7cs	
  
Sequencer has the following characteristics:
Ø  Provides coordination between sequence
and driver
Ø  Sends transactions to driver
Ø  Gets the response from the driver
Ø  Responsible for arbitrating between the
parallel sequences
Arrow Devices Pvt Ltd
Sequencer-­‐Driver	
  Connec7on	
  
 	
  	
  
Arrow Devices Pvt Ltd
UVM	
  Sequencer	
  API	
  
API’s Supported by UVM Sequencer
Ø  get_next_item
Ø  try_next_item
Ø  item done
Ø  peek
Ø  get
Ø  put
Arrow Devices Pvt Ltd
Recommended	
  Driver-­‐Sequencer	
  
API	
  
Ø  get_next_item() followed by item_done()
Ø  get(req) followed by put(rsp)
1
2
 	
  
Arrow Devices Pvt Ltd
“get_next_item()”	
  followed	
  by	
  
“item_done()”	
  
1
Arrow Devices Pvt Ltd
“get(req)”	
  followed	
  by	
  “put(rsp)”	
  2
Arrow Devices Pvt Ltd
Sequences	
  
 
	
  
	
  
Arrow Devices Pvt Ltd
Sequences	
  
Ø  Derived from an uvm_sequence_item
Ø  Parameterized with the type of seq_item
Ø  Body method
Ø  m_sequencer handle
Sequences have the following characteristics:
Arrow Devices Pvt Ltd
Example:	
  Sequences	
  
Arrow Devices Pvt Ltd
Running	
  a	
  Sequence	
  
Ø  Step 1: Create Sequence
Ø  Step 2: Configure Sequence
Ø  Step 3: Start the Sequence
Arrow Devices Pvt Ltd
	
  Step	
  1:	
  Create	
  Sequence	
  
Arrow Devices Pvt Ltd
Step	
  2:	
  Configure	
  Sequence	
  
Ø  Set up start values
Ø  Set up generation loop variables
Ø  Set up pointers to test-bench
resources
Arrow Devices Pvt Ltd
Step	
  3:	
  Start	
  Sequence	
  	
  
•  Call	
  to	
  its	
  start()	
  method	
  
Arrow Devices Pvt Ltd
Sequence	
  Item	
  To	
  A	
  Driver:	
  	
  
The	
  Flow	
  
Ø  Creation of seq item
Ø  Ready - start_item()
Ø  Set - Randomization
Ø  Go - finish_item()
Ø  Response - get_response()
Arrow Devices Pvt Ltd
Sequence	
  Execu7on	
  Flow	
  
Sequences have two types of execution
Ø  Linear Execution Flow
Ø  Parallel Execution Flow
Arrow Devices Pvt Ltd
Coding	
  Guideline	
  
Ø  Do not use fork, join_any, disable fork
Ø  Do not use fork join_none to exit a body
method
Ø  Do not fork join a sequence which
contains a forever loop without
terminating condition
Arrow Devices Pvt Ltd
Sequences	
  Overrides	
  
Two types of overrides:
Ø  Sequence Type Factory Override
Ø  Sequence Instance Factory Override
Arrow Devices Pvt Ltd
Sequence	
  Type	
  Factory	
  Override	
  
Arrow Devices Pvt Ltd
Sequence	
  Instance	
  Factory	
  
Override	
  
Thank	
  you	
  
Arrow Devices Pvt Ltd

UVM: Basic Sequences

  • 1.
    Any use ofthis material without specific permission of Arrow Devices is strictly prohibited May 2015 UVM:  Basic  Sequences         Chandra  Bhushan  Singh  
  • 2.
    Topics  Covered   • Sequence Item •  Sequencer •  Sequences 2 Arrow Devices Pvt Ltd
  • 3.
  • 4.
    Sequence Item Content SequenceItem consists of the following Ø  Control : What type of transfer, what size Ø  Payload : The main data content of the transfer Ø  Configuration : Setting up a new mode of operation, error behavior etc Ø  Analysis : Convenience fields which aid analysis - time stamps, rolling checksums etc Arrow Devices Pvt Ltd
  • 5.
            Arrow Devices Pvt Ltd Randomiza7on  Considera7ons   Ø  Request properties should be rand Ø  Response properties should not be rand
  • 6.
    Example:  Sequence  Item   Arrow Devices Pvt Ltd    
  • 7.
    Arrow Devices PvtLtd Sequence  Item  Methods  
  • 8.
            Sequencer         Arrow Devices Pvt Ltd
  • 9.
    Arrow Devices PvtLtd Sequencer  Characteris7cs   Sequencer has the following characteristics: Ø  Provides coordination between sequence and driver Ø  Sends transactions to driver Ø  Gets the response from the driver Ø  Responsible for arbitrating between the parallel sequences
  • 10.
    Arrow Devices PvtLtd Sequencer-­‐Driver  Connec7on  
  • 11.
          ArrowDevices Pvt Ltd UVM  Sequencer  API   API’s Supported by UVM Sequencer Ø  get_next_item Ø  try_next_item Ø  item done Ø  peek Ø  get Ø  put
  • 12.
    Arrow Devices PvtLtd Recommended  Driver-­‐Sequencer   API   Ø  get_next_item() followed by item_done() Ø  get(req) followed by put(rsp) 1 2
  • 13.
        Arrow DevicesPvt Ltd “get_next_item()”  followed  by   “item_done()”   1
  • 14.
    Arrow Devices PvtLtd “get(req)”  followed  by  “put(rsp)”  2
  • 15.
    Arrow Devices PvtLtd Sequences  
  • 16.
          ArrowDevices Pvt Ltd Sequences   Ø  Derived from an uvm_sequence_item Ø  Parameterized with the type of seq_item Ø  Body method Ø  m_sequencer handle Sequences have the following characteristics:
  • 17.
    Arrow Devices PvtLtd Example:  Sequences  
  • 18.
    Arrow Devices PvtLtd Running  a  Sequence   Ø  Step 1: Create Sequence Ø  Step 2: Configure Sequence Ø  Step 3: Start the Sequence
  • 19.
    Arrow Devices PvtLtd  Step  1:  Create  Sequence  
  • 20.
    Arrow Devices PvtLtd Step  2:  Configure  Sequence   Ø  Set up start values Ø  Set up generation loop variables Ø  Set up pointers to test-bench resources
  • 21.
    Arrow Devices PvtLtd Step  3:  Start  Sequence     •  Call  to  its  start()  method  
  • 22.
    Arrow Devices PvtLtd Sequence  Item  To  A  Driver:     The  Flow   Ø  Creation of seq item Ø  Ready - start_item() Ø  Set - Randomization Ø  Go - finish_item() Ø  Response - get_response()
  • 23.
    Arrow Devices PvtLtd Sequence  Execu7on  Flow   Sequences have two types of execution Ø  Linear Execution Flow Ø  Parallel Execution Flow
  • 24.
    Arrow Devices PvtLtd Coding  Guideline   Ø  Do not use fork, join_any, disable fork Ø  Do not use fork join_none to exit a body method Ø  Do not fork join a sequence which contains a forever loop without terminating condition
  • 25.
    Arrow Devices PvtLtd Sequences  Overrides   Two types of overrides: Ø  Sequence Type Factory Override Ø  Sequence Instance Factory Override
  • 26.
    Arrow Devices PvtLtd Sequence  Type  Factory  Override  
  • 27.
    Arrow Devices PvtLtd Sequence  Instance  Factory   Override  
  • 28.
    Thank  you   ArrowDevices Pvt Ltd