Verilog Basics
Data Types
Operators
Sequential Logic
Testbench & Simulation
100

Which keyword is used to define a hardware module in Verilog?

module

100

Which keyword is used to end a Verilog module?

endmodule 

100

What symbol is used for single-line comments in Verilog?

//

100

Which Verilog construct is mainly used for continuous assignment?

assign

100

Write the syntax to declare a 4-bit input named A.

input [3:0] A;

200

Which data type represents physical connections in Verilog?

wire

200

Which data type stores values inside procedural blocks?

reg

200

What is the default value of an uninitialized reg variable in simulation?

x (unknown)

200

Which keyword is used to define an integer variable in Verilog?

integer

200

How do you declare an 8-bit register named data?

reg [7:0] data;

300

Which operator is used for logical AND in Verilog?

&&

300

Which operator is used for bitwise OR?

|

300

Which operator is used for equality comparison?

==

300

Which operator performs left shift operation?

<<

300

What will be the output of the following expression? 4'b1010 & 4'b1100

4'b1000

400

Which block is generally used for sequential logic?

always

400

Which edge keyword is used for positive edge triggering?

posedge

400

Write the sensitivity list for a positive-edge-triggered clock named clk.

always @(posedge clk)

400

Which assignment operator is preferred inside sequential always blocks?

Non-blocking assignment (<=)

400

What is the main difference between blocking (=) and non-blocking (<=) assignments?

Blocking assignments execute sequentially, while non-blocking assignments execute in parallel at the end of the time step.

500

Which system task is used to display output on the console?

$display

500

Which keyword is commonly used to generate simulation delays?

#

500

Which system task stops the simulation?

$stop

500

Which system task completely exits the simulation?

$finish

500

Write a statement to generate a clock that toggles every 5 time units.

always #5 clk = ~clk;