DGD 8 Sol
DGD 8 Sol
CEG3155: DGD 8
Question 1
Let the propagation delay of an xor cell be 4 ns, and the setup time and clock-to-q delay of the
register be 2 and 3 ns respectively. Determine the maximum clock frequency of a 4-bit LFSR.
Solution
Solution
The critical path of the next-state logic consists of the incrementor and multiplexer (the
comparator run in parallel with the incrementor and thus has no effect on the critical path).
Solution
a)
𝑡𝑙𝑜𝑔𝑖𝑐 = 𝑡𝑖𝑛𝑐 + 𝑡𝑚𝑢𝑥 = 5 + 0.75 = 5.75 𝑛𝑠
𝑡𝑐𝑙𝑘 = 𝑡𝑙𝑜𝑔𝑖𝑐 + 𝑡𝑐𝑞 + 𝑡𝑠𝑒𝑡𝑢𝑝 = 5.75 + 1 + 0.5 = 7.25 𝑛𝑠
1
𝑓𝑐𝑙𝑘 = = 138 𝑀𝐻𝑧
𝑡𝑐𝑙𝑘
b)
𝑡𝑙𝑜𝑔𝑖𝑐 = 𝑡𝑖𝑛𝑐 + 𝑡𝑐𝑜𝑚𝑝 + 𝑡𝑚𝑢𝑥 = 5 + 3 + 0.75 = 8.75 𝑛𝑠
𝑡𝑐𝑙𝑘 = 𝑡𝑙𝑜𝑔𝑖𝑐 + 𝑡𝑐𝑞 + 𝑡𝑠𝑒𝑡𝑢𝑝 = 8.75 + 1 + 0.5 = 10.25 𝑛𝑠
1
𝑓𝑐𝑙𝑘 = = 97 𝑀𝐻𝑧
𝑡𝑐𝑙𝑘
Question 4
Odd/Even Parity Detector
Consider a logic circuit that counts the number of ones in a bit serial input stream. If the circuit
asserts its output when the input contains an odd number of ones, it is called odd parity. If it asserts
its output when the input contains an even number of ones, it is called even parity. Use FSM to
design an odd parity detector circuit.
CEG3155: Digital Systems II Medhat Elsayed
Solution
FSM Design Process:
1. Draw the state diagram.
2. Translate the state diagram into a state transition table.
3. Write the logic expressions for next-state and output logic using the state transition
table.
4. Implement the circuit using logic gates.
a=1
a=0
a=1
Encoded Table Present state (PS) Input (a) Next state (NS) Output (y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 0 1
3. Logic expressions
𝑁𝑆 = 𝑎 ⊕ 𝑃𝑆
𝑦 = 𝑃𝑆
CEG3155: Digital Systems II Medhat Elsayed
4. Implementation
D Q
a
D-FF
CLK CLK
Question 5
Blinking light
This problem concerns a circuit that must turn a light on and off, remaining on during T1 clock
periods and off during T2 clock periods. An important desired feature is that when the circuit is
enabled it must start from a state with the light on (to prevent the user from thinking that the
circuit is not working when large transition times are involved).
a) Design the FSM.
b) Write a VHDL to describe the operation of the circuit.
Solution
CEG3155: Digital Systems II Medhat Elsayed
CEG3155: Digital Systems II Medhat Elsayed