Verilog Interview Questions - 3

1. How are blocking and non-blocking statements executed?

2. How do you model a synchronous and asynchronous reset in Verilog?

3. What happens if there is connecting wires width mismatch?

4. What are different options that can be used with $display statement in Verilog?

5. Give the precedence order of the operators in Verilog.

6. Should we include all the inputs of a combinational circuit in the sensitivity list? Give reason.

7. Give 10 commonly used Verilog keywords.

8. Is it possible to optimize a Verilog code such that we can achieve low power design?

9. How does the following code work?
wire [3:0] a;
always @(*)
case (1'b1)
a[0]: $display("Its a[0]");
a[1]: $display("Its a[1]");
a[2]: $display("Its a[2]");
a[3]: $display("Its a[3]");
default: $display("Its default")

10. Which is updated first: signal or variable?


Anonymous said...

I think last example will throw an error since a is wire. Can it be used inside always block?

raja said...

yes in the last example , it gives an error as illegal reference to net like that.... inside always block LHS should be a regester type.

Anonymous said...

@Raja and person above him:

it's not an error, there is no assignment in question 9's example. Case statements reads the values, hence "a" is used as good as it is used in RHS side of an assignment. Hence there will not be any error.

Even in the $display statement it is just read.

Anonymous said...

On question 6, in case of incomplete sensitivity list, there will simulation and synthesis mismatch.

Raghavendra.S said...

On question 6: Sensitivity list can affect simulation but not synthesis.

srikanth cheekoti said...

In question no 10 the answer is variable not signal... because signal will be scheduled for assignment but not variable

KS said...

Raghvendra and Srikanth I agree with you both on the correction.

joecoles222 said...

Tks very much for your post.

Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

You also find all interview questions at link at the end of this post.

Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

Best rgs

Unknown said...

Can anyone give me the answer of question 9

Harsha Jain said...

Can anyone give me the answer of question 9

 Save and Share: Digg Reddit Facebook Mixx Google YahooMyWeb blogmarks Blue Dot StumbleUpon Bumpzee Furl Sphinn Ma.gnolia MisterWong Propeller Simpy TwitThis Wikio BlinkList NewsVine