wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Assessment 1

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.
SystemVerilog is standardized by which IEEE standard?
a)
IEEE 1076
b)
IEEE 1364
c)
IEEE 754
d)
IEEE 1800
2.
Which best describes SystemVerilog?
a)
A pure analog simulation language
b)
A PCB schematic editor
c)
A hardware description and verification language extending Verilog
d)
A software-only scripting language
3.
Why was SystemVerilog preferred over Verilog for complex testbenches?
a)
SV removes all timing constructs
b)
SV relies exclusively on gate-level descriptions
c)
SV is only for synthesis
d)
Complex testbenches are more like programming tasks; SV adds OOP, randomization, and assertions
4.
In verification, a testbench primarily does what?
a)
Synthesizes the DUT
b)
Generates layout of the DUT
c)
Applies stimulus to the DUT and checks results
d)
Performs RTL linting only
5.
Which SV component groups DUT I/O signals to simplify connections?
a)
Scoreboard
b)
Generator
c)
Monitor
d)
Interface
6.
Which component drives values onto DUT via tasks in the interface?
a)
Monitor
b)
Environment
c)
Scoreboard
d)
Driver
7.
Which component creates transactions to be driven to the DUT?
a)
Monitor
b)
Driver
c)
Generator
d)
Coverage
8.
Which component observes DUT outputs and sends them to the scoreboard?
a)
Driver
b)
Sequencer
c)
Monitor
d)
Interface
9.
Which component compares DUT output with reference model?
a)
Scoreboard
b)
Generator
c)
Driver
d)
Interface
10.
Which element configures and controls the verification environment?
a)
Driver
b)
Interface
c)
Test
d)
Monitor
11.
Which element provides flexibility and scalability to plug components?
a)
Monitor
b)
Scoreboard
c)
Sequencer
d)
Environment
12.
Which statement about nets in SV is true?
a)
Nets are only used inside classes
b)
Nets are always 4-state variables
c)
Nets store the last procedural assignment
d)
Nets do not store a value; value is determined by drivers
13.
Which statement about variables in SV is true?
a)
Variables cannot be synthesized
b)
Variables cannot be assigned in procedures
c)
Variables store a value from one assignment to the next
d)
Variables are resolved by multiple drivers
14.
Which is a 2-state type in SystemVerilog?
a)
reg
b)
wire
c)
logic
d)
bit
15.
Which are typical 2-state integer types?
a)
byte, shortint, int, longint (signed)
b)
integer and time
c)
real and shortreal
d)
logic and reg
16.
Which values can 4-state types represent?
a)
0 to 9 digits
b)
0, 1, X (unknown), Z (high-impedance)
c)
Only X and Z
d)
Only 0 and 1
17.
Which type is commonly used as a 4-state vector in SV?
a)
byte
b)
time
c)
shortreal
d)
logic
18.
What is the size of shortint?
a)
8-bit signed
b)
64-bit unsigned
c)
16-bit signed
d)
32-bit signed
19.
What is the size of int?
a)
8-bit signed
b)
64-bit signed
c)
16-bit signed
d)
32-bit signed
20.
What is the size of longint?
a)
64-bit signed
b)
32-bit unsigned
c)
16-bit signed
d)
8-bit signed
21.
What is the typical size of byte in SV?
a)
8-bit signed integer or ASCII character
b)
32-bit unsigned
c)
64-bit signed
d)
16-bit signed
22.
Which 4-state integral type is 32-bit signed?
a)
integer
b)
bit
c)
longint
d)
int
23.
Which 4-state integral type is 64-bit unsigned time value?
a)
longint
b)
byte
c)
shortint
d)
time
24.
Which maps to C 'double' and is 64-bit?
a)
realtime
b)
integer
c)
real
d)
shortreal
25.
Which maps to C 'float' and is 32-bit?
a)
byte
b)
shortreal
c)
real
d)
time
26.
Which type is used for simulation time and intervals?
a)
shortreal
b)
logic
c)
realtime
d)
bit
27.
What does 'void' indicate in SV functions?
a)
Function returns a time value
b)
Function returns a pointer
c)
Function returns X/Z
d)
Function does not return a value
28.
Strings in SV are:
a)
Fixed-length and non-indexable
b)
Only compile-time constants
c)
Dynamic and indexable; each character is a byte
d)
Always 4-state bits
29.
str.len() returns:
a)
String capacity
b)
ASCII code of first character
c)
Number of characters in the string
d)
Index of last non-zero char
30.
str.getc(i) returns:
a)
ASCII code of the i-th character
b)
Substring from i
c)
Character count up to i
d)
Lowercased character
31.
str.putc(i, c) does:
a)
Deletes i-th character
b)
Replaces the i-th character with c
c)
Converts to uppercase
d)
Inserts a character at end
32.
Which comparison is case-insensitive?
a)
str.icompare(s)
b)
str.substr(i,j)
c)
str.len()
d)
str.compare(s)
33.
Which method converts string to integer?
a)
str.atoi()
b)
str.atoreal()
c)
str.bintoa(i)
d)
str.hextoa(i)
34.
Which method interprets string as hexadecimal?
a)
str.atobin()
b)
str.itoa(i)
c)
str.atohex()
d)
str.hextoa(i)
35.
Which method stores ASCII decimal of i into str?
a)
str.atoi()
b)
str.bintoa(i)
c)
str.itoa(i)
d)
str.atoreal()
36.
Which operator concatenates strings?
a)
Str1 + Str2 (SV operator)
b)
Str1 & Str2
c)
Str1 || Str2
d)
{Str1, Str2}
37.
An event in SV is used for:
a)
Declaring arrays dynamically
b)
Synchronization between concurrent processes
c)
Formatting output strings
d)
Randomizing variables
38.
Blocking assignment operator is:
a)
=
b)
:=
c)
<=
39.
Non-blocking assignment operator is:
a)
=
b)
<=
c)
->
40.
Non-blocking assignments schedule updates to LHS:
a)
Only on posedge clock
b)
Immediately
c)
At start of simulation
d)
At end of the time-step
41.
Default enum values when unspecified are:
a)
Randomized at runtime
b)
1,2,3 starting at one
c)
0,1,2,... in declaration order
d)
Based on ASCII codes
42.
Which enum method returns number of elements?
a)
last()
b)
name()
c)
num()
d)
first()
43.
Which enum method returns string for current value?
a)
prev()
b)
num()
c)
next()
d)
name()
44.
Which enum method advances to next member?
a)
last()
b)
next()
c)
first()
d)
prev()
45.
An array in SV is a collection of:
a)
Mixed-type objects with names
b)
Variables of same type accessed via indices
c)
Modules
d)
Random values only
46.
Static arrays in SV:
a)
Require explicit new[] to allocate
b)
Have fixed size determined at compile time
c)
Are always packed
d)
Can only grow at runtime
47.
Packed dimensions are declared:
a)
With $ size
b)
After the identifier
c)
Inside a class only
d)
Before the identifier
48.
Unpacked dimensions are declared:
a)
Before the identifier
b)
Between type keywords
c)
After the identifier
d)
Using { } braces
49.
A one-dimensional packed array is also called:
a)
A dynamic array
b)
A vector
c)
A queue
d)
An associative array
50.
Which built-in returns number of elements in a packed vector?
a)
vector.len()
b)
size()
c)
num()
d)
$size(vector)
51.
Dynamic arrays are declared using:
a)
Associative index types
b)
Braces {} only
c)
$ size specifier
d)
Empty brackets [] and allocated with new[]
52.
Which dynamic array method returns current size?
a)
.len()
b)
.count()
c)
.num()
d)
.size()
53.
Which dynamic array method empties the array?
a)
.delete()
b)
.reset()
c)
.remove_all()
d)
.clear()
54.
Associative arrays allocate storage:
a)
Only when elements are used
b)
Only at compile time
c)
Never freed
d)
At declaration time
55.
Valid associative array declaration with string index:
a)
logic a_array[#]
b)
bit [31:0] a_array[string];
c)
byte a_array[$];
d)
int a_array[*];
56.
Which method checks if an index exists?
a)
exists(index)
b)
delete(index)
c)
num()
d)
first(var)
57.
Which method assigns first index to a variable?
a)
first(var)
b)
last(var)
c)
next(var)
d)
prev(var)
58.
Queues are declared with size:
a)
% for size
b)
[] empty for dynamic arrays
c)
* for associative arrays
d)
$ to denote variable size
59.
In queues, index 0 refers to:
a)
Second element
b)
Invalid element
c)
Last element
d)
First element
60.
In queues, index $ refers to:
a)
Queue size
b)
Last element
c)
Middle element
d)
First element
61.
Which method inserts at front?
a)
push_back(value)
b)
insert(index,value)
c)
pop_front()
d)
push_front(value)
62.
Which method removes and returns last element?
a)
push_back(value)
b)
delete(index)
c)
pop_back()
d)
pop_front()
63.
Which method returns number of items in a queue?
a)
len()
b)
num()
c)
size()
d)
count()
64.
A bounded queue example is:
a)
byte q[$:7];
b)
byte q[$];
c)
bit q[7:0]
d)
int q[*];
65.
Which locator method returns all elements matching expression?
a)
unique()
b)
find()
c)
find_first()
d)
find_index()
66.
Which locator method returns indices of matching elements?
a)
find_last()
b)
find()
c)
find_index()
d)
max()
67.
Which locator method returns first matching element?
a)
find_last()
b)
find_first_index()
c)
find_first()
d)
min()
68.
Which locator method returns last matching element?
a)
sum()
b)
find()
c)
find_last_index()
d)
find_last()
69.
Which locator method returns index of first match?
a)
find_first_index()
b)
rsort()
c)
find_index()
d)
find_last_index()
70.
Which locator method returns index of last match?
a)
find_last()
b)
find_last_index()
c)
find_first()
d)
reverse()
71.
Which method returns element with maximum value?
a)
unique()
b)
min()
c)
sort()
d)
max()
72.
Which method returns element with minimum value?
a)
max()
b)
rsort()
c)
min()
d)
unique_index()
73.
Which method returns elements with unique values?
a)
shuffle()
b)
sum()
c)
unique()
d)
unique_index()
74.
Which method returns indices of unique values?
a)
min()
b)
unique_index()
c)
reverse()
d)
find_index()
75.
Which method reverses order of elements?
a)
find()
b)
reverse()
c)
rsort()
d)
shuffle()
76.
Which method sorts in ascending order?
a)
reverse()
b)
shuffle()
c)
rsort()
d)
sort()
77.
Which method sorts in descending order?
a)
sort()
b)
max()
c)
reverse()
d)
rsort()
78.
Which method randomizes order of elements (no with-clause allowed)?
a)
sort()
b)
rsort()
c)
reverse()
d)
shuffle()
79.
Which reduction method returns sum of all elements?
a)
sum()
b)
and()
c)
product()
d)
xor()
80.
Which reduction method returns product of all elements?
a)
or()
b)
product()
c)
unique()
d)
sum()
81.
Which reduction method performs bitwise AND of all elements?
a)
xor()
b)
and()
c)
min()
d)
or()
82.
Which reduction method performs bitwise OR of all elements?
a)
or()
b)
xor()
c)
and()
d)
max()
83.
Which reduction method performs XOR of all elements?
a)
xor()
b)
reverse()
c)
and()
d)
sum()
84.
Which is a packed array declaration?
a)
int my_data[];
b)
bit my_data[$]
c)
logic [9:0] my_data;
d)
byte my_data[9:0];
85.
Which is an unpacked array declaration?
a)
int array1[$]
b)
bit [7:0][2:0] array1;
c)
bit [7:0] array1[2:0];
d)
logic [7:0]
86.
Which shows a two-dimensional packed array?
a)
byte my_data[3:0][7:0];
b)
bit my_data[$]
c)
bit [3:0][7:0] my_data;
d)
int my_data[];
87.
Which built-in iterates over all indices of an array?
a)
for(i in array)
b)
foreach (array[i])
c)
iterate(array)
d)
loop(array)
88.
Which statement assigns a 32'h value to a packed vector?
a)
my_data.push_back(32'hFACE_CAFE);
b)
my_data.delete();
c)
my_data.new[32];
d)
my_data = 32'hFACE_CAFE;
89.
Which converts string to real?
a)
str.bintoa(i)
b)
str.hextoa(i)
c)
str.atoreal()
d)
str.atoi()
90.
Which stores ASCII hex of i into str?
a)
str.octtoa(i)
b)
str.hextoa(i)
c)
str.bintoa(i)
d)
str.atohex()
91.
Which method replicates a string N times?
a)
Str<<N
b)
{N{Str}}
c)
Str*N
d)
Str.repeat(N)
92.
Setting duplicate enum values like red=0, green=0 leads to:
a)
Automatic renumbering
b)
Valid shadowing
c)
Runtime warning only
d)
Syntax error
93.
In enum datatype, if the index of the color blue is 4 and the yellow is declared after blue with no explicit value, then yellow becomes:
a)
0
b)
4
c)
5
d)
6
94.
Which expression concatenates an extra element at end of a queue?
a)
q = {q, new_item};
b)
q = q[1:$-1];
c)
q.pop_back();
d)
q.push_front(new_item);
95.
Which slice removes first and last elements from queue q?
a)
q = q[1:$-1];
b)
q = q[$:0];
c)
q.delete(0,$);
d)
q = q[0:$];
96.
delete(index) on associative array does:
a)
Converts to dynamic array
b)
Deletes entry at index (or all if no index)
c)
Clears only first element
d)
Sorts the keys
97.
Array locator methods like find() require:
a)
A class method only
b)
Clocking block
c)
No condition allowed
d)
with clause with item/x to specify condition
98.
In non-blocking, RHS is captured and LHS updated:
a)
Before any blocking statements
b)
Only at end of simulation
c)
Immediately per statement
d)
After evaluating all non-blocking in the time-step
99.
Which built-in displays time?
a)
$display
b)
$size
c)
$time
d)
$random
100.
Which statement triggers an event?
a)
<-@my_event
b)
<= my_event
c)
@(my_event)
d)
-> my_event