System Verilog Interview Questions and Answers
System Verilog Interview Questions and Answers
1 of 6
http://asic-verification-questions.blogspot.in/2013/06/systemverilog-impo...
6/6/2013 11:00 AM
2 of 6
http://asic-verification-questions.blogspot.in/2013/06/systemverilog-impo...
ming explicit. The clocking block is a key element in a cycle-based methodology, which enables
users to write testbenches at a higher level of abstrac on. Rather than focusing on signals and
transi ons in me, the test can be dened in terms of cycles and transac ons. The clocking block
separates the ming and synchroniza on details from the structural, func onal, and procedural
elements of a testbench.
Q. What is the dierence between mailbox and queue?
A mailbox is a communica on mechanism that allows messages to be exchanged between
processes. Data can be sent to a mailbox by one process and retrieved by another.
A queue is a variable-size, ordered collec on of homogeneous elements. A queue supports
constant me access to all its elements as well as constant me inser on and removal at the
beginning or the end of the queue.
Mailbox are FIFO queue, which allows only atomic opera ons. They can be bounded/unbounded.
A bounded mailbox can suspend the thread (while wri ng if full, while reading if empty) via
get/put task. Thats why mailbox is well suited for communica on between threads.
Q. What are the ways to avoid race condi on between testbench and RTL using SystemVerilog?
Program block
Clocking block
Enforcement of design signals being driven in non-blocking fashion from program block
Q. What data structure you used to build scoreboard?
mailboxes
Q. Explain Event regions in SV?
6/6/2013 11:00 AM
3 of 6
http://asic-verification-questions.blogspot.in/2013/06/systemverilog-impo...
int UniqVal[10];
foreach(UniqVal[i]) UniqVal[i] = i;
UniqVal.shue();
Q. Explain about pass by ref and 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 pass by reference functions and tasks
directly access the specified variables passed as arguments.Its like passing pointer of the variable.
Program blocks get executed in the re-ac ve region of scheduling queue, module blocks
get executed in the ac ve region
A program can call a task or func on in modules or other programs. But a module can not
call a task or func on in a program.
6/6/2013 11:00 AM
4 of 6
http://asic-verification-questions.blogspot.in/2013/06/systemverilog-impo...
join_any
disable fork
end
Q. Write a clock generator without using always block.
Use forever within an ini al block.
Q. What is cross coverage?
Cross allows keeping track of information which is received simultaneous on
more than one cover point. Cross coverage is specified using the cross
construct.
Q. Describe the dierence between Code Coverage and Func onal Coverage Which is more
important and Why we need them?
Code Coverage indicates the how much of RTL has been exercised. The Func onal Coverage
indicates which features or func ons has been executed. Both of them are very important. With
only Code Coverage, it may not present the real features coverage. On the other hand, the
func onal coverage may miss some unused RTL coverage.
Q. How to kill a process in fork/join?
The kill() task terminates the given process and all its sub-processes, that is, processes spawned
using fork statements by the process being killed. If the process to be terminated is not blocked
wai ng on some other condi on, such as an event, wait expression, or a delay then the process
shall be terminated at some unspecied me in the current me step.
Q. Dierence between Associa ve array and Dynamic array?
Dynamic arrays are useful for dealing with contiguous collections of variables whose number changes
dynamically. e.g. int array[];
When the size of the collection is unknown or the data space is sparse, an associative array is a
better option. In associative array, it uses the transaction names as the keys in associative array.
6/6/2013 11:00 AM
5 of 6
http://asic-verification-questions.blogspot.in/2013/06/systemverilog-impo...
1.
2.
3.
6/6/2013 11:00 AM
6 of 6
http://asic-verification-questions.blogspot.in/2013/06/systemverilog-impo...
6/6/2013 11:00 AM