wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Re-Assessment

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

What does an assertion do during simulation?

a)

Synthesizes logic

b)

Checks expected behavior

c)

Generates waveform

d)

Optimizes code

2.

Which of the following is a type of assertion in SystemVerilog?

a)

immediate

b)

static

c)

dynamic

d)

soft

3.

Which construct is used to define temporal behavior in assertions?

a)

assert property (a && b);

b)

assert property (a |-> b);

c)

assert (a == b);

d)

assert sequence (a ##1 b);

4.

What does ## represent in a sequence?

a)

Delay operator

b)

Bitwise AND

c)

Logical AND

d)

Concatenation

5.

What does |-> denote in a property definition?

a)

Conjunction

b)

Implication

c)

Delay

d)

Equality

6.

Which assertion type is evaluated in procedural code blocks?

a)

Temporal

b)

Concurrent

c)

Immediate

d)

Static

7.

Which operator allows repetition in a sequence?

a)

[*]

b)

|->

c)

##

d)

==

8.

Which keyword is used to define a reusable assertion block?

a)

property

b)

function

c)

sequence

d)

module

9.

Which system task immediately terminates the simulation upon invocation?

a)

$info

b)

$warning

c)

$fatal

d)

$error

10.

What is the primary purpose of $warning?

a)

To stop simulation

b)

To log non-critical issues

c)

To display debug info

d)

To raise fatal errors

11.

Which task is best used for general informational messages during simulation?

a)

$error

b)

$info

c)

$warning

d)

$fatal

12.

Which of the following does not affect simulation control flow?

a)

$fatal

b)

$warning

c)

$info

d)

$error

13.

What happens when $error is triggered during simulation?

a)

Message is printed and simulation continues

b)

Simulation halts immediately

c)

A warning is issued

d)

All assertions are disabled

14.

Which task is least severe in terms of simulation impact?

a)

$warning

b)

$error

c)

$info

d)

$fatal

15.

What is the primary purpose of functional coverage in SystemVerilog?

a)

To generate waveform data

b)

To measure simulation performance

c)

To track which scenarios have been exercised

d)

To verify timing constraints

16.

Which construct is used to define functional coverage?

a)

coverpoint

b)

cover

c)

covergroup

d)

assert

17.

What does coverpoint represent?

a)

A sequence of events

b)

A sampled variable or expression

c)

A testbench module

d)

A simulation time marker

18.

What is the purpose of bins in a coverpoint?

a)

To group simulation cycles

b)

To store waveform data

c)

To define assertion conditions

d)

To define value ranges or sets to track

19.

Which type of bin is automatically created by the simulator?

a)

explicit

b)

illegal

c)

default

d)

ignore

20.

Which bin type is used to mark invalid or undesired values?

a)

default

b)

cross

c)

ignore

d)

illegal

21.

Which of the following can be used inside a covergroup definition?

a)

coverpoint

b)

cover

c)

initial

d)

always

22.

Which of the following is true about coverage reports?

a)

They show which bins were hit

b)

They are part of synthesis output

c)

They are generated only for assertions

d)

They display all the input combinations

23.

Which keyword is used to define transition bins?

a)

bins with |->

b)

transitions

c)

trans bin

d)

bins with =>

24.

Which of the following is NOT a valid bin type?

a)

default

b)

illegal

c)

ignore

d)

valid

25.

Which of the following can cause cross coverage bins to remain unhit?

a)

Disabled covergroup

b)

All of the above

c)

Missing combinations in stimulus

d)

Incorrect sampling

26.

What is the primary use of a mailbox in SystemVerilog?

a)

Signal routing

b)

Clock generation

c)

Memory allocation

d)

Inter-process communication

27.

What does the get() method do in a mailbox?

a)

Sends a message

b)

Retrieves and removes a message

c)

Deletes the mailbox

d)

Checks mailbox size

28.

Which method checks if a mailbox has messages without removing them?

a)

scan()

b)

peek()

c)

get()

d)

try_get()

29.

What is the primary use of a semaphore in SystemVerilog?

a)

Data storage

b)

Message passing

c)

Clock control

d)

Synchronization

30.

What happens if a process calls get(n) and fewer than n keys are available?

a)

it creates the sufficient number of keys

b)

It blocks until keys are available

c)

It returns immediately

d)

it throws an error

31.

Which method allows non-blocking retrieval from a mailbox?

a)

sample()

b)

try_get()

c)

peek()

d)

get()

32.

Which of the following is true about peek() in mailboxes?

a)

It blocks if mailbox is empty

b)

It removes the message

c)

It reads without removing

d)

It deletes the mailbox

33.

What happens if you try to put an incompatible type into a parameterized mailbox?

a)

Compilation error

b)

It is silently ignored

c)

It is automatically cast

d)

Runtime warning

34.

Which of the following statements about covergroup is true?

a)

It can only track one variable

b)

It cannot be used with assertions

c)

It is mandatory for all simulations

d)

It is used for functional coverage

35.

What does the sample() method do in the context of a covergroup?

a)

It triggers the covergroup to record data

b)

It displays the coverage report

c)

It retrieves the last sampled value

d)

It resets the covergroup

36.

What is the result of calling put() on a full mailbox?

a)

It throws an error

b)

It returns null

c)

It overwrites the oldest message

d)

It blocks until space is available

37.

Which of the following is a valid way to define a covergroup in SystemVerilog?

a)

cover my_group { coverpoint a; }

b)

covergroup my_group; coverpoint a; endgroup;

c)

group my_group { coverpoint a; }

d)

covergroup my_group { coverpoint a; }

38.

Two threads call sem.get(1) simultaneously. What happens?

a)

One thread blocks

b)

Simulation fails

c)

Semaphore resets

d)

Both threads proceed

39.

You define a cross coverage: "cross mode, enable;" After simulation, some cross bins are unhit. What’s the best explanation?

a)

mode is constant

b)

enable is never high

c)

Cross coverage is disabled

d)

Certain combinations never occur

40.

You define a covergroup but forget to call sample(). What happens?

a)

All bins are ignored

b)

Coverage is collected automatically

c)

Coverage report shows zero hits

d)

Simulation fails

41.

You define a covergroup to track values of a 2-bit signal: "covergroup cg @(posedge clk); coverpoint mode; endgroup" After simulation, bin[2] is never hit. What’s the best debugging step?

a)

Check if mode is randomized

b)

Replace coverpoint with assert

c)

Use disable iff

d)

Add assert(mode!=2)

42.

Which loop guarantees at least one execution of the loop body?

a)

do...while

b)

while

c)

for

d)

repeat

43.

Which SystemVerilog loop is typically used when the number of iterations is known beforehand?

a)

do...while

b)

while

c)

forever

d)

for

44.

What does the forever statement do?

a)

Continuously repeats the body indefinitely until simulation stops or a break

b)

Repeats body until a timeout

c)

Executes body zero or more times depending on condition

d)

Executes body exactly once

45.

Which control-flow statement in SystemVerilog selects a branch based on a single expression's value?

a)

repeat

b)

if-else

c)

case

d)

fork-join

46.

Which statement best describes unique if?

a)

Forces synthesis-friendly behavior only

b)

A synonym for if

c)

Like if, but requires exactly one branch to evaluate true — else simulation error if none or multiple true.

d)

Prevents else-if chaining

47.

What is the difference between unique and unique0 on an if?

a)

unique0 reports an error if exactly one condition true.

b)

unique reports an error if zero or multiple conditions true; unique0 allows zero true but errors on multiple true.

c)

They are identical.

d)

unique allows multiple true branches; unique0 does not.

48.

What is a priority if used for?

a)

Ensures mutually exclusive priority encoding — later conditions checked only if earlier ones false; suppresses uniqueness checking.

b)

Optimizes performance in simulation only

c)

Forces parallel evaluation of conditions

d)

Declares a sequence of concurrent statements

49.

Which keyword helps the simulator check that if/else if branches are mutually exclusive and flags an assertion if they are not?

a)

unique

b)

parallel

c)

exclusive

d)

priority

50.

In a SystemVerilog task, which of these is allowed?

a)

Returning a value like a function

b)

Containing timing controls such as #, @(posedge ...)

c)

Being used in constant expressions

d)

Being called inside an expression context

51.

Which of the following is TRUE about SystemVerilog function?

a)

A function can contain timing controls like # and @.

b)

A function must return a value (or be declared void) and cannot use timing controls.

c)

A function can return multiple values.

d)

A function call spawns a new thread.

52.

Which statement is true: tasks vs functions?

a)

Both must return a value.

b)

Functions may contain delays; tasks cannot.

c)

Both can contain @ event controls.

d)

Tasks may consume simulation time (delays); functions cannot.

53.

What does an automatic task or function do?

a)

Allocates local variables statically once for entire simulation.

b)

Runs in a separate process automatically.

c)

Prevents the use of fork inside the task.

d)

Allocates local variables per invocation (reentrant).

54.

Which SystemVerilog method of argument passing allows you to specify arguments by their parameter names in any order?

a)

By position

b)

By value only

c)

By reference

d)

By name (.arg(expr))

55.

If a task has prototype task t(int a, int b); which call uses positional argument passing?

a)

t(b:2, a:1);

b)

t(.b(2), .a(1));

c)

t(1, 2);

d)

t(.a(1), .b(2));

56.

Which of the following is a correct description of inout port?

a)

It is the same as input

b)

It creates a new local variable unrelated to the caller

c)

It only passes values out of the task

d)

It allows both input and output usage; the task may read and write the argument

57.

In SystemVerilog, pass-by-position and pass-by-name differ how?

a)

They are identical.

b)

Position matches parameters by order; name matches parameters by explicit parameter names.

c)

Position passes by reference; name passes by value.

d)

Position uses .name() syntax; name uses order-only.

58.

Which statement about fork...join in SystemVerilog is TRUE?

a)

fork...join_none waits for the first child to finish.

b)

fork...join is equivalent to sequential execution.

c)

fork...join spawns parallel threads and join waits for all to complete.

d)

fork...join_any waits for none of the children to finish.

59.

What does fork ... join_any do?

a)

Kills all other threads when one finishes.

b)

Waits for all spawned threads to finish.

c)

Waits for the first spawned thread to finish, then continues; other threads continue running.

d)

Does not wait for any thread; returns immediately.

60.

Which SystemVerilog construct groups signal declarations and procedural code to bundle ports — used for connecting modules?

a)

Interface

b)

Task

c)

Package

d)

Class

61.

What is a modport inside an interface used for?

a)

To instantiate multiple copies of an interface.

b)

A method to declare clocking blocks only.

c)

Declaring different views (directions & signals) of the interface for modules or classes.

d)

Synthesis only directive.

62.

What is a virtual interface in SystemVerilog?

a)

An interface that is synthesized differently.

b)

A purely simulation-only net type that cannot be used in UVM.

c)

A handle (class-like pointer) that allows classes to reference an interface instance at runtime.

d)

A special interface for virtual clocking only.

63.

Which of these best describes a SystemVerilog class instance?

a)

A value type stored in registers like logic

b)

A handle (reference) to an object allocated in dynamic memory via new

c)

Always synthesized into hardware

d)

Only useful for testbench; cannot contain methods

64.

What does static mean when applied to a class variable?

a)

Each object gets its own copy.

b)

The variable is shared across all class instances (class-level).

c)

The variable is read-only.

d)

The variable is virtual.

65.

Which keyword is used in a class to indicate a method is virtual (can be overridden)?

a)

virtual

b)

override

c)

dynamic

d)

polymorphic

66.

What is the scope resolution operator in SystemVerilog?

a)

::

b)

->

c)

.

d)

:

67.

Which of these is a correct use of typedef?

a)

typedef is not supported in SystemVerilog.

b)

typedef class { } MyClass;

c)

typedef int myint; — creates an alias myint for int.

d)

typedef myint int;

68.

In SystemVerilog randomization, what does the rand qualifier do?

a)

Makes a variable read-only.

b)

Marks a variable to be considered by randomize() for value assignment.

c)

Forces a deterministic value.

d)

Indicates the variable is constant.

69.

Which randomize usage allows local constraints for that invocation only?

a)

randomize() with { ... } — the with clause supplies temporary constraints for that call.

b)

rand_mode()

c)

randomize() only

d)

randomize_local()

70.

Which of these fork variants causes the parent process to wait until every child process completes before continuing?

a)

fork ... join_first

b)

fork ... join

c)

fork ... join_any

d)

fork ... join_none

71.

Which keyword marks a class method as not tied to an instance (i.e., callable on the class itself)?

a)

static

b)

local

c)

automatic

d)

virtual

72.

What does the super keyword allow you to do in a derived class?

a)

Refer to the package-level class.

b)

Convert object to parent type.

c)

Access methods and fields of the parent class (call parent constructor or parent method).

d)

Access private members only.

73.

What is an external method in class context?

a)

A method declared in the class with extern and defined outside.

b)

Not supported in SystemVerilog.

c)

A method declared with import.

d)

A method that cannot access class members.

74.

Which SystemVerilog construct allows multiple processes to run concurrently inside a module or initial block?

a)

always only

b)

fork ... join

c)

begin ... end

d)

function only

75.

Which is a correct description of unique0 case?

a)

Errors if zero matches.

b)

Checks uniqueness and allows zero matches but errors on multiple matches.

c)

Not supported.

d)

Same as unique.

76.

Which keyword makes class members only visible to derived classes and the class itself?

a)

local

b)

protected

c)

export

d)

public

77.

How do you declare a typedef for an array type?

a)

typedef int my_arr_t[8];

b)

int typedef my_arr_t[8];

c)

typedef int my_arr_t{8};

d)

Not allowed in SystemVerilog

78.

Where would you use virtual interfaces mainly?

a)

To declare interface templates.

b)

To avoid using import.

c)

For synthesis only.

d)

To permit runtime binding of an interface instance to a class-based testbench component (e.g., driver/monitor).

79.

For constrained random fields, how do you temporarily add a constraint for a single randomize() call?

a)

obj.randomize_inside(x > 10);

b)

Not possible to add temporary constraints.

c)

obj.randomize() with { x > 10; }

d)

obj.randomize_local({x>10});

80.

How are pure virtual methods declared for tasks?

a)

Tasks cannot be virtual.

b)

pure virtual task mytask(); — analogous to functions, tasks can be declared pure virtual to force derived classes to implement them.

c)

task mytask() pure;

d)

Use virtual pure only for functions.

81.

Which statement about the logic data type is correct?

a)

Logic can only be used in continuous assignments

b)

Logic is deprecated in SystemVerilog

c)

Logic can only be used in procedural assignments

d)

Logic can be used in both continuous and procedural assignments

82.

What is the primary advantage of using logic over wire and reg?

a)

Logic uses less memory

b)

Logic supports more bit widths

c)

Logic unifies wire and reg functionality

d)

Logic is faster in simulation

83.

What is the size of a shortint data type in SystemVerilog?

a)

8 bits

b)

32 bits

c)

64 bits

d)

16 bits

84.

What is the precision of shortreal data type?

a)

128-bit quad precision

b)

32-bit single precision

c)

16-bit half precision

d)

64-bit double precision

85.

How are strings stored internally in SystemVerilog?

a)

As unpacked arrays of characters

b)

As dynamic arrays of bytes

c)

As packed arrays of bits

d)

As fixed-size character arrays

86.

What happens when you assign a shorter string to a longer string variable?

a)

The string is truncated

b)

Compilation error occurs

c)

The string is padded with null characters

d)

The string variable resizes automatically

87.

Which of the following is a valid use of void?

a)

void my_var;

b)

function void display_msg();

c)

parameter void PARAM = 5;

d)

void array[10];

88.

What is the default value of the first enumerated constant if not explicitly specified?

a)

1

b)

X

c)

Z

d)

0

89.

Which syntax correctly defines an enumerated type with typedef?

a)

typedef enum {RED, GREEN, BLUE} color_t;

b)

enum color_t {RED, GREEN, BLUE} typedef;

c)

enum typedef {RED, GREEN, BLUE} color_t;

d)

typedef {RED, GREEN, BLUE} enum color_t;

90.

Which array type uses a hash table for storage?

a)

Dynamic array

b)

Associative array

c)

Fixed array

d)

Queue

91.

What symbol is used to declare a queue in SystemVerilog?

a)

[#]

b)

[]

c)

[*]

d)

[$]

92.

Which method adds an element to the front of a queue?

a)

insert()

b)

push_front()

c)

add()

d)

push_back()

93.

When should non-blocking assignments be used?

a)

In sequential logic

b)

In function definitions

c)

In continuous assignments

d)

In combinational logic

94.

What is the difference between packed and unpacked structures?

a)

Packed structures use more memory

b)

Packed structures are slower

c)

There is no difference

d)

Packed structures are stored as contiguous bits

95.

What is the key characteristic of a union in SystemVerilog?

a)

Members must be of the same data type

b)

All members have separate memory locations

c)

All members share the same memory location

d)

Members are accessed sequentially

96.

What is the purpose of the 'initial' block in SystemVerilog?

a)

To create a testbench

b)

To initialize variables at simulation start

c)

To define a module

d)

To define a clock signal

97.

Which array method returns a new array with elements sorted in ascending order?

a)

sort()

b)

shuffle()

c)

reverse()

d)

rsort()

98.

Which method is used to randomize the order of array elements?

a)

reverse()

b)

sort()

c)

rsort()

d)

shuffle()

99.

Which ordering method modifies the array elements in place rather than returning a new array?

a)

rsort()

b)

All of the above

c)

sort()

d)

reverse()

100.

If an enum is declared as: typedef enum {A=1, B=4, C=7} enum_t; What will enum_t.first() and enum_t.last() return?

a)

1 and 7

b)

B and C

c)

A and C

d)

Undefined