wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

UT- 2 (Quiz on verilog)

Total questions: 20

Worksheet time: 15mins

Name
Class
Date
1.

The input and output ports should be declared inside the ________

a)

Module

b)

Case

c)

wire

d)

None of the above

2.

Which of the following loops are

supported by verilog?

a)

if-else loop

b)

for loop

c)

while loop

d)

All the above

3.

The designers of Verilog wanted a language with syntax similar to the ________, which was already widely used in engineering software development

a)

Pointer

b)

python

c)

C Programming

d)

None of the above

4.

VHDL uses an ___________declaration to

describe how a component or block should perform

a)

Architectural

b)

Behavioral

c)

Module

d)

None of the above

5.

The "structural"style of programming in Verilog _________the designer to use sequential semantics to define the behavior of a hardware component or block

a)

does not allow

b)

allows

c)

allows with condition

d)

None of the above

6.

One particular pitfall is the accidental production of ________ rather than D-type flip-flops as storage elements.

a)

Integrated circuit

b)

Latch (electronics)

c)

NAND gate

d)

Logic gate

7.

Which level of abstraction level is available in Verilog but not in VHDL?

a)

Behavioral level

b)

Structural level

c)

Dataflow level

d)

Switch level

8.

Which logic level is not supported by

verilog?

a)

U

b)

X

c)

Z

d)

None of the above

9.

Variable and signal which will be updated first?

a)

variable

b)

signal

c)

can't say

d)

None of the above

10.

Which of the following is true about parameters?

a)

The default size of a parameter in most synthesizers is the size of an integer, 32 bits

b)

Parameters enable Verilog code to be compatible with VHDL

c)

Parameters cannot accept a default value

d)

All of the above

11.

Which of the following is a difference between a Function and a Task?

a)

A Function can call another function; a Task cannot

b)

A Function cannot call a task; a Task can call another task

c)

A Function has one or more inputs; a Task has no inputs

d)

A Function argument may be an output; a Task’s argument may only be an input

12.

Which of the following is used for Verilog-based synthesis tools?

a)

Intra-statement delay statements can be synthesized, but inter- statement delays cannot

b)

Inter-statement delay statements can be synthesized, but intra- statement delays cannot

c)

Initial values on wires are almost always ignored

d)

Synthesized results are identical for “if” and “case” statements

13.

Which directive is used to include

entire content of Verilog source Into another file?

a)

'include

b)

'ifdef

c)

'indef

d)

None

14.

In most synthesis tools, what will happen when a signal that is needed in a sensitivity list is not included?

a)

An error will be generated and the code cannot be synthesized

b)

A warning message will be generated and the code will be synthesized but the resulting netlist will not provide the desired results

c)

The synthesis tool will ignore the sensitivity list since all objects that are read as part of a procedural assignment statement are considered to be sensitive

d)

There will be no effect on the design and pre-synthesis simulation will be consistent with post-synthesis simulation

15.

The keyword @posedge means

a)

Transition from 0 to 1,x or z

b)

Transition from x to 1

c)

Transition from z to 1,x

d)

All the above

16.

Verilog may be written at the

a)

Behavioral level

b)

Structural level

c)

dataflow level

d)

All the above

17.

What is wrong with following piece of code

int a, b;

initial

begin

forever

begin

a=a+1; b=b+1;

end

end

a)

Nothing wrong

b)

incorrect a and b can overflow as it is incremented in an infinite loop

c)

Simulation may not advance since forever doesn't have any timing control

d)

A forever block cannot be used inside an initial block

18.

Which of the following are true with respect to arrays?

a)

Dynamic arrays are useful for contiguous collection of variables whose number keeps varying

b)

Associative arrays can be used when size of an array is not known as it can be built as key/value pairs

c)

Dynamic arrays can be re-sized after size is allocated once

d)

All of above

19.

Both tasks and functions can be coded in a way to take ________inputs and return _____ outputs in System Verilog

a)

Multiple, Single

b)

Single, Multiple

c)

Multiple, Multiple

d)

Single, Single

20.

If a variable is not assigned in all possible executions of an always statement then

a)

A don’t care is inferred

b)

A latch is inferred

c)

The variable is set to 0

d)

The synthesis process will fail