System Verilog Interview questions from http://www.edaboard.com/ftopic315416.html. I don't know answers to all of the questions, but will try to find out their answer from internet (thanks to the all powerful Google) and post the answers in this blog (one by one most likely). If you know answers to any of these then you are well come to share the same by commenting to this post.
- What is callback ?
- What is factory pattern ?
- Explain the difference between data types logic and reg and wire
- What is the need of clocking blocks ?
- What are the ways to avoid race condition between testbench and RTL using SystemVerilog?
- Explain Event regions in SV.
- What are the types of coverages available in SV ?
- What is OOPS?
- What is inheritance and polymorphism?
- What is the need of virtual interfaces ?
- Explain about the virtual task and methods .
- What is the use of the abstract class?
- What is the difference between mailbox and queue?
- What data structure you used to build scoreboard
- What are the advantages of linkedlist over the queue ?
- How parallel case and full cases problems are avoided in SV
- What is the difference between pure function and cordinary function ?
- What is the difference between $random and $urandom?
- What is scope randomization
- List the predefined randomization methods.
- What is the dfference between always_combo and always@(*)?
- What is the use of packagess?
- What is the use of $cast?
- How to call the task which is defined in parent object into derived class ?
- What is the difference between rand and randc?
- What is $root?
- What is $unit?
- What are bi-directional constraints?
- What is solve...before constraint ?
- Without using randomize method or rand,generate an array of unique values?
- Explain about pass by ref and pass by value?
- What is the difference between bit[7:0] sig_1; and byte sig_2;
- What is the difference between program block and module ?
- What is final block ?
- How to implement always block logic in program block ?
- What is the difference between fork/joins, fork/join_none fork/join_any ?
- What is the use of modports ?
- Write a clock generator without using always block.
- What is forward referencing and how to avoid this problem?
- What is circular dependency and how to avoid this problem ?
- What is cross coverage ?
- Describe the difference between Code Coverage and Functional Coverage Which is more important and Why we need them
- How to kill a process in fork/join?
- Difference between Associative array and Dynamic array ?
- Difference b/w Procedural and Concurrent Assertions?
- What are the advantages of SystemVerilog DPI?
- How to randomize dynamic arrays of objects?
- What is randsequence and what is its use?
- What is bin?
- Why always block is not allowed in program block?
- Which is best to use to model transaction? Struct or class ?
- How SV is more random stable then Verilog?
- Difference between assert and expect statements?
- How to add a new processs with out disturbing the random number generator state ?
- What is the need of alias in SV?
- What is the need to implement explicitly a copy() method inside a transaction , when we can simple assign one object to other ?
- How different is the implementation of a struct and union in SV.
- What is "this"?
- What is tagged union ?
- What is "scope resolution operator"?
- What is the difference between Verilog Parameterized Macros and SystemVerilog Parameterized Macros?
- What is the difference between
logic data_1; var logic data_2; wire logic data_3j; bit data_4; var bit data_5;
- What is the difference between bits and logic?
- Write a Statemechine in SV styles.
- What is the difference between $rose and posedge?
- What is advantage of program block over clockcblock w.r.t race condition?
- How to avoid the race condition between programblock ?
- What is the difference between assumes and assert?
- What is coverage driven verification?
- What is layered architecture ?
- What are the simulation phases in your verification environment?
- How to pick a element which is in queue from random index?
- What data structure is used to store data in your environment and why ?
- What is casting? Explain about the various types of casting available in SV.
- How to import all the items declared inside a package ?
- Explain how the timescale unit and precision are taken when a module does not have any timescalerdeclaration in RTL?
- What is streaming operator and what is its use?
- What are void functions ?
- How to make sure that a function argument passed has ref is not changed by the function?
- What is the use of "extern"?
- What is the difference between initial block and final block?
- How to check weather a handles is holding object or not ?
- How to disable multiple threads which are spawned by fork...join
4 comments:
79. How to make sure that a function argument passed has ref is not changed by the function?
By using “const ref” type. With this, the compiler checks that your routine does not modify the array.
Eg:
function void print_sum (const ref int a[]);
int sum = 0;
for (int i=0; i<a.size; i++) begin
sum += a[i];
$display("The sum of the arrays is ", sum);
endfunction
76. Explain how the timescale unit and precision are taken when a module does not have any timescale declaration in RTL?
If a timeunit is not specified in the module, program, package, or interface definition, then the time unit shall be determined using the following rules of precedence:
a) If the module or interface definition is nested, then the time unit shall be inherited from the enclosing module or interface (programs and packages cannot be nested).
b) Else, if a ‘timescale directive has been previously specified (within the compilation unit), then the time unit shall be set to the units of the last ‘timescale directive.
c) Else, if the compilation-unit scope specifies a time unit (outside all other declarations), then the time unit shall be set to the time units of the compilation unit.
d) Else, the default time unit shall be used.
77. What is streaming operator and what is its use?
The streaming operators (pack/unpack) can be used to translate to and from a series of discrete variables, such as a set of class properties, and a stream of physical-level values. The streaming operators perform packing of bit-stream types into a sequence of bits in a user-specified order (OR) unpack a stream of bits into one or more variables. The stream operator determines the order in which data are streamed: >> causes data to be streamed in left-to-right order, while << causes data to be streamed in right-to-left order.
71. What are the simulation phases in your verification environment?
Prepone (sample) : Sampling signals before design activity. For testbench input.
Active (design) : Simulation of design code in modules
Observed (assertions) : Evaluation of System Verilog Assertions
Reactive(testbench) : Execution of testbench code in programs
Post a Comment