Explain about Virtual Sequence and virtual sequencer?
A virtual sequencer is a sequencer that is not connected to a driver itself, but contains handles for sequencers in the test-bench hierarchy.
A sequence which controls stimulus generation across more than one sequencer, Usually the top level of the sequence hierarchy. Virtual sequences do not need their own sequencer, as they do not link directly to drivers.
Why Virtual Sequence and Virtual sequencer?
Consider a scenario of verifying a simple protocol; In this case, we can live with just one sequencer sending the stimulus to the driver. The top-level test will use this sequencer to process the sequences.
But when we are trying to integrate 2-4 block at Cluster level, at that time we surely want to reuse block level scenarios (sequences) to verify cluster level scenarios. For example we are integrating 2 blocks, so here two block level sequencers are driving two blocks. At top level test we need to find a way to control these two sequencers.
This can be achieved by using Virtual Sequencer and Virtual Sequence.
Other way of doing it is to call sequence’s start method explicitly from top-level test by passing sequencer.
But this is not a efficient way to do this. By doing this, we cannot reuse these cluster level complex scenarios further to develop more complex scenarios at SoC level where multiple Cluster level environments are integrated.
What is the difference between
uvm_component and uvm_object?
OR
We already have uvm_object, why do we need
uvm_component which is actually derived class of uvm_object?
1) uvm_components are "static" in that
they are created during build_phase() and persist throughout the simulation.
uvm_objects are transient, such as
transactions that are created when needed and disappear when not used anymore.
2) There is an extra argument for
"uvm_component - new" function for which we need to define the parent
class name. so, uvm_component is a part of uvm hierarchy while uvm_object does not.
3) uvm_component has phases while
uvm_object doesn't.
Difference
between export and import:
Basically,
both exports and imps provide the implementations of whatever methods your TLM
port requires. The difference is an export is an indirect connection to an
implementation. It normally used when there is component hierarchy involved.
Advantages
of TLM over mailbox:
Let's
say you have two components: A and B. Component A has a thread doing puts and
component B has a thread doing gets. They are both connected through a common
mailbox which means they both must declare handles to a matching mailbox type.
This creates an unwanted dependency. At some point, I might want some other
component other than a mailbox to connect to, like some kind of arbitrator. So
I would have to modify the handles types in the components.
What
is the difference between early randomization and late randomization of
sequences?
To
send a sequence_item to a driver there are four steps that need to occur in
sequence:
Step
1 – Creation
Step
2 - Ready - start_item()
Step
3 – Set (randomize or assign direct values to variables of sequence_item)
Step
4 - Go - finish_item()
Steps
2 and 3 could be done in any order. However, leaving the randomization of the
sequence_item until just before the finish_item() method allow the
sequence_item to be randomized according to conditions true at the time of
generation. This is sometimes referred to as late randomization.
The alternative
approach is to generate the sequence_item before the start_item() call, in this
case the item is generated before it is necessarily clear how it is going to be
used. This is referred as early randomization.
What
is the difference between creating an object using new() and create()?
create()
is a factory method which construct an object. To override an object you need
to construct it using create(). If you use set_type_override before run then, factory
replaces constructed object with derived object (specified in override). If
you use new() then you can’t override.
You
should always use create() rather than using new() for classes registered with
the factory.
What is the difference between sequence_item, sequence and sequencer with respect to UVM?
sequence_item:
A sequence item is an object that models a piece of information being transmitted between two components (sometimes it's called a "transaction"). It can be can be directed, constrained randomized or fully randomized.
sequence:
Sequences are objects whose body() method is used to generate sequence_items, optionally randomize it and sent to the driver through sequencer.
UVM Sequences can be transient or persistent means it may drive stimulus for the duration of the simulation, or anywhere in-between.
UVM Sequences are not part of the component hierarchy.
sequencer:
UVM Sequencer controls the flow of UVM Sequence Items (transactions) generated by one or more UVM Sequences.
get_next_item(), item_done() is implemented in uvm_sequencer.
When multiple sequences are running in parallel, then sequencer is responsible for arbitrating between the parallel sequences.
lock(), unlock(), grab(), ungrab() is implemented in uvm_sequencer.
sub-sequence:
sequences can call other sequences (via sequence.start()). A sequence that is started from another sequence (as opposed to from a test) is called a sub-sequence.
sequence_item:
A sequence item is an object that models a piece of information being transmitted between two components (sometimes it's called a "transaction"). It can be can be directed, constrained randomized or fully randomized.
sequence:
Sequences are objects whose body() method is used to generate sequence_items, optionally randomize it and sent to the driver through sequencer.
UVM Sequences can be transient or persistent means it may drive stimulus for the duration of the simulation, or anywhere in-between.
UVM Sequences are not part of the component hierarchy.
sequencer:
UVM Sequencer controls the flow of UVM Sequence Items (transactions) generated by one or more UVM Sequences.
get_next_item(), item_done() is implemented in uvm_sequencer.
When multiple sequences are running in parallel, then sequencer is responsible for arbitrating between the parallel sequences.
lock(), unlock(), grab(), ungrab() is implemented in uvm_sequencer.
sub-sequence:
sequences can call other sequences (via sequence.start()). A sequence that is started from another sequence (as opposed to from a test) is called a sub-sequence.
No comments:
Post a Comment