SV Interview Book
SV Interview Book
5. What is a class?
Ans: Class is composed of set of members that describe how an instance of class or object is
constructed and how it behaves.
Eg: class class name{
member1;
---------------}
object name;
7. What is a mailbox?
Ans: Mailbox is communication mechanism that allows the exchange of the messages between
the processes. Mailboxes are helpful in the transmission and receiving of the data in a
systematic way.
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
9. Why is reactive scheduler used?
Ans: Code specified in program blocks and pass/fail code from property expressions are
scheduled in reactive scheduler.
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
19. Why are assertions used?
Ans: Assertions are mainly used to check the behavior of the design whether it is working
correctly or not. They are useful in providing thefunctional coverage information .i.e. how
good the test is and whether the design meets all the requirements for testing. There are
mainly two types of assertions in systemverilog. They are: immediate assertions and
concurrent assertions.
20. Explain the difference between data type?s logic and reg and wire.
Ans: Wire is basic data type which does not drive strength
a) wire is used for designing combinational logic. We can assign a single value to a wire by
using the assign statement. Wire cannot store any data.
b) reg data type can be used for storage purpose. reg is used for designing both sequential and
combinational circuits. reg data types can be driven from initial and always block .
c) logic data types are similar to reg data types .
22. What are the ways to avoid race condition between testbench and RTL using
SystemVerilog?
Ans: Using program block and clocking block.
28. What is the difference between code coverage and functional coverage?
Ans: Functional coverage: Functional coverage determines how much functionality of the
design has been exercised. Functional assertions areused to check whether each and every
corner of the design is explored and functions properly. Code coverage: This will give
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
information about how many lines are executed, how many times each expression is executed.
It describes the level up to which the code has been tested.
29. If the functional coverage is more that code coverage, what does it means?
Ans: code: High functional: High - You are most likely done
code: High functional: Low - Still need to run more simulation or improve test bench
code: Low functional: High - Probably missing functional coverage points
code: Low functional: Low - Still need to run more simulation or improve test bench
30. How we can have #delay which is independent of time scale in system verilog?
Ans: We can mention it as #5ns.
34. What is inheritance and give the basic syntax for it?
Ans: A derived class by default has the properties and methods of the base class or parent
class. This is called inheritance.
Syntax: class Derived extends BaseClass;
// method declarations.
endclass
Copyright : www.vlsiforall.com
Legal Action will be taken for any misus
VLSI FOR ALL
38. What is an abstract class?
Ans: Abstract classes are those which can be used for creation of handles. Their methods and
constructors and can be used by the class orextended class. They are used to generalize the
super class from which child classes can share its methods.
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
48. Mention the purpose of dividing time slots in systemverilog?
Ans: The main purpose of dividing the time slots in systemverilog is to provide interaction
between the design and the testbench.
50. In simulation environment under what condition the simulation should end?
Ans: 1) Packet count match
2) Error
3) Error count
4) Interface idle count
5) Global Time out
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
Command layer ? Driver, Assertions, Monitor
Signal layer ? DUT
62. What are the features added in systemverilog for function and task?
Ans: Begin and end not required.Function can have any number of input, output and inouts
including none. Return can be used in task. Function return can have void return type.
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
68. What is covergroup?
Ans: Captures result from a random stimulation.
Encapsulates the coverage specification.
Ex: enum { red, green, blue } color;
bit [3:0] pixel;
covergroupg1 @ (posedgeclk);
coverpoint color;
coverpoint pixel;
AxC: cross color, pixel;
endgroup
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
Used for large memories. Value is assigned to dynamic array at run time. New constructor is
used to initilize the size of dynamic array.
82. What are Assertion severity system level task? What happens if we won?t specify these
tasks?
Ans : When we set property and if we wont specify failure case of the property, then by
default language dictates simulator should give error as$error severity level.
$fatal - Run time fatal (quit Simulation)
$error - Run time error. Default according to LRM 3.1a. Vendor specific line commands can
change this behavior.
$warning ? Run time warning
$info ? Means this assertion carries no specific severity.
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
84. In which event region concurrent assertions will be evaluated?
Ans: The variables used in a concurrent assertion are sampled in the Preponed region of a time
slot and the assertions are evaluated during theObserve region. Both these regions occur
immediately before a clock edge.
1. Overlapping ( )
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse
VLSI FOR ALL
2. Non Overlapping ( )
Copyright : www.vlsiforall.com
Legal Action will be taken for any misuse