Pages

Thursday 23 May 2013

Dear Readers



Posting some more Q&A i  was asked during the interviews.Please feel free to add anything to make this better


-Happy Reading
Hash

Q) Why do we use/advantages of  Virtual Sequencers in UVM?


Ans :


To run Virtual Sequence

Virtual sequences are required when more than one interfaces are required to drive sequence items. 
When there is dependencies on various interfaces   its always better to write a virtual sequence.


 In verif Env, there are always one or more interfaces. Every sequence-sequncer-driver flow is attached/refer to one interface.  Generally we can sequences form testcase, if there are more than one interface, we can use fork-join to trigger them parallel, but in case we need to generate some sequence/scenario  of  individual sequences it will be helpful to use virtual sequencer, which will have instances of various interface sequencers , which then can be controlled form virtual sequencer as per the requirement. For example, if some interface used to configure the  register & rest of traffic happens through another  interface, such controlling of sequences can be easily done through  virtual sequencer. Alternatively we can also use virtual sequences.


Q) Why  is the run phase in UVM again divided into Sub phases?

     What is the advantage of the sub phases (run) in UVM?

Ans:

          Run phases are sub divided in 4 phases.
          Mainly used in asynchronous reset condition.
          Abnormal run_phase termination.


Run phase is only task & consumes time. It actually starts the individual sequences & generates traffic. Within run phase it may require to play around with reset/clk ,which generally happens in tb_top initial begin-end (clk generation/reset generation), or in run phase we may need to reprogram some registers. To do so either we need to write/use sequences to do so rst/clk/register programming, but having run phase divided in to various barriers or phases, which can go back and re do things will save efforts or writing sequences.  So before starting your normal traffic sequences one can use reset an other sub phases. But somehow those are not RECOMMENDED .  



Q) what are the layers in the UVM ?


Ans:

    
   Generally in networking domain, there are protocol layers i.e. one protocol above the other. In verif testbench ,  the main interface agent's sequence  has another layer above it, meaning instead of actual interface  sequence, there is another  form of it, then we can build layering of sequencers, translators sequence , which  converts upper level protocol to actual bub interface sequence and has instance of upper layer sequencer, and sends the translated sequence to lower bus protocol, so in short, layers of sequencers are used to achieve layering of protocol  implementation

   May be Interface Layer, Signal Layer (Driver), Application Layer (Test/Generator).


Q)Do do you enable objections from the command line from any simulation tool?


Ans: 


     NO, I don't think so , as it should be done explicitly in the code


Q) Why do we need objections in UVM?



Ans:


    In UVM, end of test or end of simulation is controller by raising & dropping objections. For example in run phase or sub phases had build in mechanism called as phase_done. The objection mechanism tried to end phase instantly. A sequence must raise the objection when it starts & drop it when it finishes.
 That way end of simulation is closely controlled by user  

Sunday 12 May 2013

Some more information which may be useful

1)What is the difference between the Push/Pull interfaces in TLM communication

    with the Push interface control and data go in the same direction
    with the pull interface control and data go in the opposite direction

2)In the Sequence items do we randomize the input/output properties

In the Sequence item, we randomize the input properties which contain address/data

3) What does a clone do?

       A clone returns uvm_object

4)Advantage of Virtual interface

Through the Virtual interface classes connect to Physical pins in System Verilog

5)Analysis port & the difference between the regular ports

Analysis port is a regular port which supports broadcast mechanism
It can be connected to a single export /no export/multiple exports also called subscribers
Regular ports are 1:1 where as analysis port are 1:many or none

6)Sequences and the transactions are customizable via the factory pattern
  Sequences, Transactions,Sequence _items are dynamic and created at run time where as Sequencer/driver are static like components 

Friday 3 May 2013


 I feel the mentor cookbook very good ,hope you also find it useful
https://verificationacademy.com/cookbook

Fantastic (free )UVM online training from Aldec
http://www.aldec.com/en/onlinetraining/1/1/2


Found these links helpful in learning about UVM
http://cluelogic.com/category/uvm/
http://www.youtube.com/watch?v=2ZkoiuxUvls

There are a lot of(~24 Videos) short UVM Videos on Youtube , i find this good

http://www.youtube.com/watch?v=V-pekia4SPM

Good Video on TLM

https://verificationacademy.com/sessions/how-tlm-works/video/246?play=1

Very good paper on Factory patterns, best explained here

The OVM/UVM Factory & Factory Overrides How ... - Sunburst Design

Thursday 2 May 2013

Dear Readers

Posting more information on UVM which would/may be useful for the interviews
Feel free to add any questions which may be helpful, this is  just a small effort from my side

-Happy Reading
Hash


1)Factory

uvm_factory is used to manufacture (create) UVM objects and components.
factory is a oops coding pattern
Allows test to change the type of a desired component or object
Typically set up at start of simulation

2)Virtual Interface

In SystemVerilog, a virtual interface is a handle variable that contains a reference to a static interface instance.

 Virtual interfaces allow the class-based portion of a verification environment to connect to physical interfaces containing signal definitions in the static module hierarchy.

3)Virtual Sequence

A sequence which controls stimulus generation across more than one sequencer, co-ordinate the stimulus across different interfaces and the interactions between them.

Usually the top level of the sequence hierarchy. AKA 'master sequence' or 'co-ordinator sequence'.

Virtual sequences do not need their own sequencer, as they do not link directly to drivers. When they have one it is called a virtual sequencer.

4)Virtual Sequencer

A virtual sequencer is a sequencer that is not connected to a driver itself, but contains handles for sequencers in the testbench hierarchy.

 It is an optional component for running of virtual sequences - optional because they need no driver hookup, instead calling other sequences which run on real sequencers.

5)Sequence


A class-based representation of one or more stimulus items (Sequence Items) which are executed on a driver.
Can collaborate in a hierarchy for successive abstraction of stimulus and can participate in constrained random setup to enable highly variable sets of stimulus above the randomization possible in an individual transaction.
Sequences can represent temporal succession of stimulus, or parallel tracks of competing or independent stimulus on more than one interface.
They can be built up into comprehensive stress test stimulus or real world stimulus particular to the needs of the protocol. UVM has comprehensive support the automated definition and application of sequences.

In its simplest form, a sequence is a function call (a functor), which may request permission to communicate with a driver using a sequence item.
 This complicated sounding interaction is not so complicated.
A sequence asks for permission to send a transaction (sequence item) to the driver.
Once it has been granted permission by the sequencer, then the transaction is passed to the driver.

6)Sequence Item

A class-based abstract transaction representing the lowest level of stimulus passed from a sequence to a driver. Also known as a Transaction.

7)Sequencer

A component responsible for co-ordinating the execution of stimulus in the form of sequences and sequence items from a parent sequence, ultimately feeding a driver component with transactions.
UVM/OVM provide a standard sequencer component with preset arbitration and locking methods for complex sequence stimulus.
 At its simplest, a sequencer can be thought of as s fancy arbiter.
 It arbitrates who gets access to the driver, which represents who gets access to the interface.