wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Verilog Fundamentals Assessment

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the basic syntax for defining a module in Verilog?

a)

define module_name (input port_list, output port_list) { // module body }

b)

module_name (output port_list, input port_list); begin // module body endmodule

c)

module module_name (input port_list, output port_list); begin // module body endmodule

d)

module module_name; input port_list; output port_list; endmodule

2.

How do you declare a wire and a reg in Verilog?

a)

wire myWire reg myReg;

b)

wire myWire; reg myReg;

c)

wire myReg; reg myWire;

d)

reg myWire; wire myReg;

3.

What is the difference between combinational and sequential logic?

a)

Sequential logic has no memory and depends only on current inputs; combinational logic has memory.

b)

Combinational logic is slower than sequential logic due to its complexity.

c)

Combinational logic uses past states; sequential logic uses only current inputs.

d)

Combinational logic has no memory and depends only on current inputs; sequential logic has memory and depends on current inputs and past states.

4.

Describe how a multiplexer can be implemented in Verilog.

a)

module mux2to1(input wire a, input wire b, input wire sel); output wire y; assign y = (b) ? a : sel; endmodule

b)

module mux2to1(input wire a, input wire b, input wire sel, output wire y); assign y = (sel) ? b : a; endmodule

c)

module mux2to1(input wire a, input wire b, input wire sel, output wire y); y = a & b; endmodule

d)

module mux4to1(input wire a, input wire b, input wire sel, output wire y); assign y = (a) ? b : sel; endmodule

5.

What is a flip-flop and how is it represented in Verilog?

a)

A flip-flop is a digital memory circuit represented in Verilog using an 'always' block triggered by a clock signal.

b)

A flip-flop is an analog circuit represented in Verilog using a 'module' declaration.

c)

A flip-flop is a type of resistor used in digital circuits.

d)

A flip-flop is a memory device that operates without a clock signal.

6.

Explain the concept of a finite state machine (FSM).

a)

A finite state machine (FSM) is a type of algorithm that only processes numerical data.

b)

A finite state machine (FSM) is a computational model with a finite number of states and transitions based on input.

c)

A finite state machine (FSM) is a graphical representation of a computer's hardware components.

d)

A finite state machine (FSM) is a model that can have an infinite number of states.

7.

How do you define states and transitions in a Verilog FSM?

a)

States are defined in a separate module; transitions are managed through function calls.

b)

States are defined as boolean values; transitions are handled with for loops.

c)

States are defined using integers; transitions are implemented with if statements.

d)

States are defined as unique identifiers; transitions are implemented using case statements in an always block.

8.

What is the purpose of a testbench in Verilog?

a)

To optimize the design for better performance.

b)

The purpose of a testbench in Verilog is to simulate and verify the functionality of a design.

c)

To create a graphical user interface for the design.

d)

To generate random input data for the design.

9.

How do you simulate a Verilog design using a testbench?

a)

Instantiate the design in a testbench, apply stimulus, and run the simulation.

b)

Use a simulation tool without any code

c)

Only apply stimulus without instantiation

d)

Run the design without a testbench

10.

What are some common simulation techniques used in Verilog?

a)

Testbenches, behavioral modeling, structural modeling.

b)

Code optimization methods

c)

Debugging techniques

d)

Synthesis tools