Professional Documents
Culture Documents
1
Basic of digital design
2
Combinational functional blocks
Combinatorial
Logic Circuit
Block of sequential
Introducing counters
– Synchronous Counters
– Ripple Counters
• Synchronous Counters:
4
Synchronous Binary Up Counter
5
Synchronous Binary Up Counter
clock
6
What good are counters?
• You may need to record how many times something has happened
7
Synch Binary Up/Down Counter
• We’ll need two flip-flops again. Here are the four possible states:
00 01
11 10
8
The complete state diagram and table
• Here’s the complete state diagram and state table for this circuit
9
D flip-flop inputs
• If we use D flip-flops, then the D inputs will just be the same as the
desired next states
10
Synchronous Binary Up/Down Counter
X Q1
Q0
clock
11
An 8-bit counter
14
Registers
15
What good are registers?
• Flip-flops are limited because they can store only one bit
16
A basic register
17
74x175 – 4-bit register
18
Adding a parallel load operation
• The input D3-D0 is copied to the output Q3-Q0 on every clock cycle
• How can we store the current value for more than one cycle?
LD Q(t+1)
0 Q(t)
1 D3-D0
19
Register with parallel load
• When LD = 0, the flip-flop inputs are Q3-Q0, so each flip-flop just keeps its
current value
• When LD = 1, the flip-flop inputs are D3-D0, and this new value is “loaded”
into the register.
20
Shift Register
• A shift register “shifts” its output once every clock cycle.
Q0(t+1) = SI
Q1(t+1) = Q0(t)
Q2(t+1) = Q1(t)
Q3(t+1) = Q2(t)
21
Shift direction
Q0(t+1) = SI
Q1(t+1) = Q0(t)
Q2(t+1) = Q1(t)
Q3(t+1) = Q2(t)
• The circuit and example make it look like the register shifts “right.”
22
Shift register with parallel load
• We can add a parallel load, just like we did for regular registers
23
Serial data transfer
• But sometimes it’s necessary to send or receive data serially, or one bit at a
time. Some examples include:
– Input devices such as keyboards and mice
– Output devices like printers
– Any serial port, USB or Firewire device transfers data serially
– Recent switch from Parallel ATA to Serial ATA in hard drives
24
Receiving serial data
• The serial device transmits one bit of data per clock cycle
• The computer then reads all four bits at once from the Q3-Q0 outputs.
serial device
computer
25
Sending data serially
• The computer first stores a four-bit word in the register, in one cycle
computer
serial device
26
Registers in Modern Hardware
28