Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
1
The University of Texas at Arlington
Modular Sequential Logic
CSE 2340/2140 – Introduction to Digital LogicDr. Gergely Záruba
Modular Sequential Circuits
• Many useful sequential circuits can be b ilt f fli flbuilt from flip-flops:• Shift registers
• (left shift, right shift, parallel-in serial out, serial-in parallel out, etc.)
• Counters• (binary counters, up/down counters. Etc.)
• Modulo-N counters
• Binary rate multipliers
2
2
SHIFT REGISTERS
3
Shift Registers
• Sequential logic module, containing n flip-fl ( bit ) h l k lflops (n bits), where every clock cycle shifts the bits stored to the left or right.
• Serial-in, serial-out shift register:
4
3
Generic Shift Register
• Four modes of operation:S in S out S in P out P in S out P in P out but• S-in S-out, S-in P-out, P-in S-out, P-in P-out but shifting in between
5
Standard Shift Registers
• MSI shift registers, among others:
Device Features
7491A 8-bit, S-in-out
74164 8-bit, S-in-out,P-out, Clear
7496 5-bit, S-in-out, async-preset, P-out, Clear
74165 8-bit, S-in-out, async-load, clock inhibit
74179 4 bi S i Cl l d P
6
74179 4-bit, S-in-out, Clear, sync-load, P-out
74194 4-bit, bidirectional, S-in-out, sync-load, P-out, clock inhibit, Clear
4
7491A 8-bit, S-in-out
7
74164 S-in-out, P-out, Clear
8
5
7496 5-bit, S-in-out, async-preset, P-out, Clear
9
74165 8-bit, S-in-out, async-load, clock inhibit
10
6
74179 4-bit, S-in-out, Clear, sync-load, P-out
11
74194 4-bit, bidirectional, S-in-out, sync-load, P-out, clock inhibit, Clear
12
7
COUNTERS
13
Counters
• Input pulses make a (binary) code increment.
C b d f ti ( l i d l k )• Can be used for timers (slowing down clocks).
• Example MSI counters (among others):Device Type Features
74163 Sync, binary 4-bit, sync-load, sync-clear, enable, carry-out
74160 Sync, decade
4-bit, sync-load, async-clear, enable carry out
14
decade enable, carry-out
74191 Sync, up/down
4-bit, async-load, enable, max out, carry out
74293 Async, binary
/2, /8, /16, common clear
74177 Async, binary
/2, /8, /16, common clear, async-load
8
Synchronous Binary Counter
• J-K realization:
15
74163 Binary, Sync-load
16
9
Asynchronous Binary Counter
• Asynchronous does not refer to not needing a counting clock, it refers to the internal architectureclock, it refers to the internal architecture
17
74293 Async-Counter
18
10
Down Counter
• A.k.a. backward counter:
• Recall, the forward counter:Recall, the forward counter:
19
Up/Down Counter
20
11
Modulo-N Counters
• Counts from state 0 to state N and then resets to zero and counts onzero and counts on.
• N does not have to be a two-power!
• What is a BCD counter then?
• Can we make a counter that counts to 5, how about 6 or 12?
C t f i t di i i ! ( t• Counters perform integer division! (except very slowly, as the dividend has to feed a clock, the divisor is the “N”, and the quotient is the count of the overflows (needs a second counter) and the modulo is the (first) counter’s output. 21
Powerline Digital Timer
22
12
SHIFT REGISTERS AS COUNTERS
23
Ring Counters
• Counting to 5 (5-bit ring counter):
24
13
Twisted Ring Counter
25
Selecting Clock Impulses (Timing)
• Using a (twisted) ring counter
26
14
FRACTIONA RATE MU TIP IERSFRACTIONAL RATE MULTIPLIERS
27
Binary Rate Multiplier
• We have seen how to divide down the number of clock pulses by an integer. How do we divide (multiply) it by a fraction?
• The number of output pulses should be a (binary) fraction of the number of input pulses: No=Ni*B/2n
28
15
74167 Decade Fractional Rate Multiplier
• No=Ni*B/10
29
Fractional Rate Multiplier Cascading
• How do we get other fractions? E.g., No=Ni*63/320
• N =N *(7/10)*(18/64)• No=Ni (7/10) (18/64)
30
16
Summary
• We looked at some standard sequential d l th t t b ild i flimodules that are easy to build using flip-
flops:• Shift registers
• Counters
• Shift registers as ring countersg g
• Counters as fractional clock rate multipliers
31