Digital Logic Recitation
Digital Logic Recitation
A
x D Q y1
Q’
B
D Q y2
Q’
clk
a. Obtain the next state and output equations, and the state table.
Present State Input Next State Output
A B x A(t+1) B(t+1) y1 y2
0 0 0 0 1 0 0
0 0 1 1 1 0 0
0 1 0 1 0 0 1
0 1 1 0 0 0 1
1 0 0 1 1 1 0
1 0 1 0 1 1 0
1 1 0 0 0 1 1
1 1 1 1 0 1 1
Fall 2020
CS303 – Logic & Digital System Design
2) A sequential circuit has two inputs (A1,A0) and one output (B). The output B=1 every time the
input pattern “312” (11/01/10) is observed. Otherwise B is 0.
a. Assuming the circuit is implemented as a Moore machine, draw the corresponding state
diagram. (Also, implement using Mealy machine for exercise)
State encoding: S0: (00), S1: (01), S2: (10), S3: (11)
Fall 2020
CS303 – Logic & Digital System Design
00 0 0 0 0 00 0 0 1 0 00 0 0 0 0
01 0 1 0 0 01 0 0 1 0 01 0 0 0 0
11 0 0 0 0 11 0 0 1 0 11 1 1 1 1
10 0 0 0 1 10 0 0 1 1 10 0 0 0 0
Fall 2020
CS303 – Logic & Digital System Design
3) Consider the following two sequential circuits:
1 T y0 count T z0
clock
k
y1
T T z1
clock
k
The propagation delay of T flip-flop is tP,FF = 10 ps. The propagation delay of AND gate is tP,AND = 10 ps. Two
circuits are using the same clock. Fill the following timing diagram.
Fall 2020
CS303 – Logic & Digital System Design
Answer:
4) Determine the minimum clock period and maximum clock frequency for the circuit given below.
The propagation delay of D flip-flop is tP,FF = 3 ns. The setup time of D flip-flop is ts = 1 ns. The
propagation delay of NAND gate is tP,NAND = 3 ns. The propagation delay of NOT gate is tP,NOT = 1 ns.
D Q D Q D Q
clock
Fall 2020
CS303 – Logic & Digital System Design
5) Consider the following sequential circuit and the timing values tP,FF = tP,XOR = 200.0ps, tP,AND = ts =
100.0 ps and th = 150.0 ps.
a. Find the maximum clock frequency that can be applied to the circuit.
There are two path we need to evaluate (red and blue given below).
Time for red path → tP,FF + tP,AND + ts = 200 ps + 100 ps + 100 ps = 400 ps
Time for blue path → tP,FF + ts = 200 ps + 100 ps = 300 ps
For determining clock frequency, we need to take longest path which is red.
b. Is hold time violated in the circuit? Why or why not? Express the hold time violation
condition.
Hold time should meet the condition: tP;FF + tP;COMB (for shortest path) > th
In the circuit above, we need to satisfy tP,FF > th (200 ps > 150 ps) which si satisfied. So, there
is NO hold time violation.
Fall 2020
CS303 – Logic & Digital System Design
5) Design a counter with D flip-flops that goes through the following repeated sequence: 0, 1, 2, 4, 5,
6, 0, 1, 2, ... Treat unused states 011 and 111 as don’t care conditions, i.e. we don’t care what their
next states are. Draw its logic diagram.
Q2 00 01 11 10 Q2 00 01 11 10 Q2 00 01 11 10
0 0 0 X 1 0 0 1 X 0 0 1 0 X 0
1 1 1 X 0 1 0 1 X 0 1 1 0 X 0
D2 = Q1 ⊕ Q2 D1 = Q0 D0 = Q0’.Q1’
Fall 2020
CS303 – Logic & Digital System Design
6) Draw logic diagram of the circuit that would result from synthesizing the following Verilog
module.
Circuit:
Fall 2020