sample questions
1. Fix a mistake in UVM code
build_phase called in new is wrong
2. what is data type of rsp in UVM code
rsp will be same as parameter passed to the uvm_sequence#(seqItem)
answer is seqItem
3. the starting phase is built in property of ?
uvm_sequence
4. In a code where $sformatf is called directly inside `uvm_fatal,with fewer arguments, what error do we get?
compilation error
5. some function defined in class, what is missing
extern keyword is missing
endfunction missing for function new
6. There is cross coverage of a Coverpoint, what is wrong in it?
a : needs to be defined as coverpoint
we can’t mix variable and coverpint in cross coverage
7. declare an array for string based initialization
array has 2 arrays, each having 2 strings
string data [2][3]
8. For loop with bit [1:0] i, i < 4, some display statement, what is the output
output will be infinite execution of the loop since i never reaches 4 values, following statement never printed
9. some questions on class inheritance
10. question on constraint
– answer: data between [20:70] and constraint as data%5 && data%9 == 0
11. map.first(s), what is map data type?
– Associative array
12. how to shrink existing dynamic array
DA = new[20], DA doesn’t have a method by name shrink
13. What code represents shift register code?
y3<=x3; z3 <= y3; is answer
14.blocking and non-blocking statement in same code, what is output
b=0;
b<=1;
$display(b);
answer: b is 0