Interview Questions
Interview Questions
Scope: SoC verification involves verifying the entire system that includes multiple
IP blocks interconnected through buses, protocols, and other interfaces.
1.AHB: Has 1 address channel, 1 read data channel, 1 write data channel.
3.Burst Lengths are fixed i.e 1, 2, 6, 16 except for INCR types, where it can be
anything as long as it does not cross 4K boundary.
AXI:
1.Has 1 read address channel, 1 write address channel, 1 read data channel, 1 write
data channel. 1 write response channel That is altogether it has 5 parallel
channels. (The first AXI version had just 1 address channel)
3.Burst lengths can be anything, from 1-16 for AXI3, and 1-256 for AXI4.
Interleaving : It is like dividing a big task into smaller pieces and working on
them at the same time.
Out of order:
3.What is polymorphism?
A.Polymorphism means having many forms. A base class handle can invoke methods of
its child class which has the same name. Hence, an object can take many forms.
(Or)
A) Any extended class object can be assigned to base class handle ,vise-versa not
possible.
On declaring a method as a virtual method, a base class handle can call the method
of its child class.
Class parent;
bit[31:0]data;
Int id;
Virtual function void display();
Endfunction
Endclass
endfunction
endclass
endfunction
endclass
endfunction
endclass
What is difference between class and module?
A. modules are used to describe a hardware, so hardware is static~
classes are used to describe a testbench and as testbench can be changed, hence
they are dynamic.
A. Pass by value : Pass by value is the default method through which arguments are
passed into functions and tasks. Each subroutine retains a local copy of the
argument. If the arguments are changed within the subroutine declaration, the
changes do not affect the caller.
In verilog, method arguments takes as pass by value.The inputs are copyed when the
method is called and the outputs are assigned to outputs when exiting the method.
(or)
Pass by value: if we update the value it will not update the value in the main
program.the reason behind is we have separate local copies for the variable
Pass by reference:
In pass by reference functions and tasks directly access the specified variables
passed as arguments.Its like passing pointer of the variable.
In System Verilog ,methods can have pass by reference.Arguments passed by reference
are not copied into the subroutine area, rather, a reference to the original
argument is passed to the subroutine.
module tb;
//////pass by value
//////pass by reference
task automatic swap ( ref bit [1:0] a, [1:0] b); /// function automatic bit [1:0]
add (arguments);
bit [1:0] temp;
temp = a;
a = b;
b = temp;
temp = a;
// a = b;
b = temp;
bit [1:0] a;
bit [1:0] b;
initial begin
a = 1;
b = 2;
swap(a,b);
endmodule
Static array
Dynamic array
Associative array
Queues
Array: An array is a collection of variables, all of the same type, and accessed
using the same name plus.
Static array:
Static arrays are further categorized into packed and un packed array.
Packed array: A packed array is used to refer to dimensions declared before the
variable name.
bit[3:0] data;
Dynamic array:
A dynamic is an unpacked array whose size can be set or changed at the run time.
2.New[]
Associative Arrays:
When size of a collection is unknown an associative array is a better
option .Associative array do not have any storage allocated until it is used.
QUEUES:
With burst transactions, the CPU can initiate a single read command, specitying the
starting address of the block and the number of data items it needs to read. The
memory controller then automatically sends a
A A deadlock condition can occur if the slave is waiting for WVALID before
asserting AWREADY.
What is super keyword?
A. With in a subclass to refer properties and methods of base class it is
mandatory to use super keyboard to access properties and methods.
P_sequencer:
All sequences have a m_sequencer handle but they do not have a p_sequencer handle.
14.How will you use UVM and integrate it with c based test case?
15.difference between SRAM and DRAM, bloacking and non blocking statement
A. SRAM (Static Random Access Memory) is faster, more expensive, and consumes more
power than DRAM (Dynamic Random Access Memory).
SRAM stores data in a flip-flop circuit, while DRAM stores data in a capacitor.
SRAM does not need to be refreshed, while DRAM requires periodic refreshing.
Setup time is the amount of time data must be stable before the clock edge for it
to be reliably captured.
Hold time is the amount of time data must be stable after the clock edge for it to
be reliably captured.
In asynchronous reset, reset is sampled independent of clk. That means, when reset
is enabled it will be effective immediately and will not check or wait for the
clock edges.
An extern method provides a facility for class methods to define them outside of
the class body.
Set_type_override_by_type
Set_type_override_by_name
Set_inst_override_by_type
set_inst_override_by_name
UVM_monitor- Monitor
UVM_agent
uvm_object is the base class in UVM from which all other UVM components and objects
are derived. Uvm_object itself is derived from uvm_void.
Define methods for common operations like copy, compare and print,
Clone,Record,Pack,Unpack,Convert2String. Typically used to build testbench and
testcase configurations.
UVM_Component: All testbench components like driver, monitor, scoreboards, etc are
indirectly derived from this class
UVM_Sequence: All sequences that define the stimulus or testcase are extended from
this class
When we buy UVC from IP vendor they will also provide stimulus
initial
repeat(2)
begin
fork
functio_n;
join
end
function functio_n;
tas_k;
endfunction
task tas_k;
endtask
endmodule
In UVM, the handshake between a driver and a sequencer is established through the
`get_next_item` and `item_done` methods.
The main difference between the two operators is how they compare values. The ==
operator compares the values of two variables after performing type conversion if
necessary. On the other hand, the === operator compares the values of two variables
without performing type conversion.
In fork-join, all processes start simultaneously and join will wait for all
processes to be completed.
In fork-join_any, all processes start simultaneously and join_any will wait for any
one process to be completed.
In fork-join_none, all processes start simultaneously and join_none will not wait
for any process to be completed.
So, we can say that fork-join and fork-join_any is blocked due to process execution
time, whereas fork-join_none is not blocked due to any process
Structure
Class
A structure can contain different members of different data types.
Classes allow objects to create and delete dynamically.
Does not supports inheritance, polymorphism
Supports inheritance, polymorphism
Data members of structure are visible to everyone
Data members of class can be protected and will not be visible outside of class.
Supports data abstraction
Supports only grouping of data.
28.Difference between new[ ] and new()
new[ ] – To create a memory. It can also be used to resize or copy a dynamic array.
new() – To create an object for the class, commonly known as ‘class constructor’.
Stores multiple data types of different sizes in an ordered group. Each data object
in a structure is a field or member, and all members can be accessed at any
time. Structures are declared using the struct keyword.
Stores multiple data types of the same size in the same location in
memory. However, only one member of a union can be accessed at a time. Unions are
declared using the union keyword, and only space is allocated for the largest
member.
A. 1 set_type_override_by_type
2. set_type_override_by_name
Add
Add_by_name
Delete
delete_by_name
What is difference between Config_db and TLM ports?
A.
Create a custom class inherited from Uvm_scoreboard,register with factory and call
function new
Add necessary TLM exports to receive transactions from other components and
instantiat them in build phase
Define the action to be taken when data is received from the analysis port
Perform checks : It is not required to perform checks in the check_phase.Real
checkers can also actively check during the run_phase
Connect analysis ports of scoreboard with other components in the environment
After a scoreboard has been defined, you also need to instantiate it in the
environment and connect it with the appropriate analysis port.
Create is addition on used in UVM which is used to return object type which we
want.
A.’uvm_do: Marco will automatically creates a new object randomize and sends it to
sequencers
‘uvm_send: when object is already created and randomised and need to be executed on
sequencer
Is it possible to have a user defined phase in UVM?
A. Yes,You can define your own phase and insert it in between the existing phases
which is inherited from Uvm_task_phase and implement the Exc_phase.