1 / 13

CS 140 Lecture 19 Sequential Modules

CS 140 Lecture 19 Sequential Modules. Professor CK Cheng CSE Dept. UC San Diego. Standard Sequential Modules. Register Shift Register Counter. Counter. Applications?. Counter: Applications. Program Counter Address Keeper: FIFO, LIFO Clock Divider Sequential Machine. Counter.

malo
Download Presentation

CS 140 Lecture 19 Sequential Modules

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 140 Lecture 19Sequential Modules Professor CK Cheng CSE Dept. UC San Diego

  2. Standard Sequential Modules • Register • Shift Register • Counter

  3. Counter • Applications?

  4. Counter: Applications • Program Counter • Address Keeper: FIFO, LIFO • Clock Divider • Sequential Machine

  5. Counter • Modulo-n Counter • Modulo Counter (m<n) • Counter (a-to-b) • Counter of an Arbitrary Sequence • Cascade Counter

  6. Modulo-n Counter D CNT TC LD Clk CLR Q Q (t+1) = (0, 0, .. , 0) if CLR = 1 = D if LD = 1 and CLR = 0 = (Q(t)+1)mod n if LD = 0, CNT = 1 and CLR = 0 = Q (t) if LD = 0, CNT = 0 and CLR = 0 TC = 1 if Q (t) = n-1 and CNT = 1 = 0 otherwise

  7. Q3 Q2 Q1 Q0 3 2 1 0 CLR CLK CNT X D3 D2 D1 D0 LD Q2 0 0 0 0 Q0 Modulo-m Counter (m< n) Given a mod 16 counter, construct a mod-m counter (0 < m < 16) with AND, OR, NOT gates m = 6 Set LD = 1 when X = 1 and (Q3Q2Q1Q0) = (0101), ie m-1

  8. Counter (a-to-b) Given a mod 16 counter, construct an a-to-b counter (0 < a < b < 15) A 5-to-11 Counter Q3 Q2 Q1 Q0 CLR Clk CNT X D3 D2 D1 D0 LD Q3 (b) Q1 0 1 0 1 (a) Q0 Set LD = 1 when X = 1 and (Q3Q2Q1Q0) = b (in this case, 1011)

  9. Q2 Q1 Q0 CLR Clk CNT X D2 D1 D0 LD Q2’ Q0 Q0 Q1 Q0 Q2 Q0’ Counter of an Arbitrary Sequence Given a mod 8 counter, construct a counter with sequence 0 1 5 6 2 3 7 When Q = 1, load D = 5 When Q = 6, load D = 2 When Q = 3, load D = 7

  10. Counter of an Arbitrary Sequence Given a mod 8 counter, construct a counter with sequence 0 1 5 6 2 3 7 K Mapping LD and D, we get LD = Q2’ Q0 + Q2Q0’ D2 = Q0 D1 = Q1 D0 = Q0

  11. Counter of an Arbitrary Sequence Example: Count in sequence 0 2 3 4 5 7 6 LD = 1 D = 2 When Q(t) = 0 LD = 1 D = 7 When Q(t) = 5 LD = 1 D = 6 When Q(t) = 7 LD = 1 D = 0 When Q(t) = 6 Through K-map, we derive LD = Q2’ Q1’ + Q2Q0 + Q2 Q1 D2 = Q0 D1 = Q1’ + Q0 D0 = Q1’Q0

  12. Cascade Counter A Cascade Modulo 256 Counter Q7,Q6,Q5,Q4 Q3,Q2,Q1,Q0 TC0 CNT LD CNT LD X TC TC Clk Clk D7,D6,D5,D4 D3,D2,D1,D0

  13. Cascade Counter TC = 1 when (Q3,Q2,Q1,Q0 )=(1,1,1,1) and X=1 (Q7 (t+1)Q6 (t+1) Q5 (t+1) Q4 (t+1)) = (Q7 (t)Q6 (t) Q5 (t) Q4 (t)) + 1 mod 16 when TC0 = 1 The circuit functions as a modulo 256 counter.

More Related