Questions
Questions
Introduction :
A fresh graduate faces some tough questions in his first job interview. The questions themselves are
simple but require practical and innovative approach to solve them. I started collecting some questions
from my own experience and from my friends. Answers to most questions are not given. Spend some
time to solve these and let me know if you have some more interesting ones.
Please do not send me emails asking for solutions. You are not supposed to answer these questions in
10 seconds like some university multiple choice questions. Some questions may have more than correct
answers and some may not even have correct answer :)
What matters is your approach to solution and understanding of basic hardware design principles.
Q. Design a logic which mimics a infinite width register. It takes input serially 1 bit at a time. Output is
asserted high when this register holds a value which is divisible by 5.
For example:
Q. What's the difference between a latch and a flip-flop? Write Verilog RTL code for each. (This is one
of the most common questions but still some EE's don't know how to explain it correctly!)
Q. Design a black box whose input clock and output relationship as shown in diagram.
__ __ __ __ __ __ __ __ __
clk __| |__| |__| |__| |__| |__| |__| |__| |__| |__
__ __ __ __ __
Output __| |________| |________| |________| |________| |__
Questions:
Q1.
The digital circuit is shown with logic delay (dly3) and two clock buffer delays (dly1, dly2).
Q2.
Q3
Optical sensors A and B are positioned at 90 degrees to each other as shown in Figure. Half od
the disc is white and remaining is black. When black portion is under sensor it generates logic 0
and logic 1 when white portion is under sensor.
Design Direction finder block using digital components (flip flops and gates) to indicate speed.
Logic 0 for clockwise and Logic 1 for counter clockwise.
Q4
• What are the advantages / disadvantages of each coding style shown above?
• How Synthesis tool will give result for above codes?
• What happens if default statement is removed in case statement?
• What happens if combination 11 and default statement is removed? (Hint Latch inference)
(Comments : Though this questions looks simple and out of text books, the answers to
supporting questions can come only after some experience / experimentation.)
Design a FSM (Finite State Machine) to detect more than one "1"s in last 3 samples.
For example: If the input sampled at clock edges is 0 1 0 1 0 1 1 0 0 1
then output should be 0 0 0 1 0 1 1 1 0 0 as shown in timing diagram.
And yes, you have to design this FSM using not more than 4 states!!
4. Design a state machine to divide the clock by 3/2.
7. Design a RZ (return to zero )circuit. Design a clock to pulse circuit in Verilog / hardware gates.
8. Miscellaneous Basic Verilog Questions:
• How to synchronize control signals and data between two different clock domains?