Verilog Interview Questions and Answers
Ques 1. What is Verilog?
Verilog is a hardware description language (HDL) used to model electronic systems at various levels of abstraction.
Example:
module and_gate(output Y, input A, B); assign Y = A & B; endmodule
Is it helpful?
Add Comment
View Comments
Ques 2. Explain the difference between blocking and non-blocking assignments in Verilog.
Blocking assignments occur sequentially, whereas non-blocking assignments allow concurrent execution.
Example:
Blocking: A = B; Non-blocking: A <= B;
Is it helpful?
Add Comment
View Comments
Ques 3. What is the difference between 'reg' and 'wire' in Verilog?
'reg' is used for variables that can be assigned values inside an always block, while 'wire' is used for connecting different modules.
Example:
reg [7:0] data; wire [7:0] bus;
Is it helpful?
Add Comment
View Comments
Ques 4. Explain the 'always' block in Verilog.
'always' block represents a continuous loop that executes whenever there is a change in its sensitivity list.
Example:
always @(posedge clk) begin ... end
Is it helpful?
Add Comment
View Comments
Ques 5. What is the purpose of the 'initial' block in Verilog?
'initial' block is used to execute code only once at the beginning of simulation.
Example:
initial $display("Hello, Verilog!");
Is it helpful?
Add Comment
View Comments
Most helpful rated by users: