Presentation is loading. Please wait.

Presentation is loading. Please wait.

Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.

Similar presentations


Presentation on theme: "Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems."— Presentation transcript:

1 Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems Fundamentals Lecture 26 – Hardwired and Microprogrammed Control

2 Chapter 8 2 Overview  Hardwired Control One flip-flop per state Sequence register and decoder  Microprogrammed control

3 Chapter 8 3 Datapath and Control  Datapath - performs data transfer and processing operations  Control Unit - Determines the enabling and sequencing of the operations  The control unit receives: External control inputs Status signals  The control unit sends: Control signals Control outputs Control inputs Data inputs Data outputs Datapath Control outputs Control signals Status signals Control unit

4 Chapter 8 4 Control Unit Types  Two distinct classes: Non-programmable or hard-wired Programmable or microprogrammable  A hard-wired control units does not fetch or sequence instructions from a memory  A programmable control unit has: A program counter (PC) or other sequencing register with contents that points to the next instruction to be executed An external ROM or RAM array for storing instructions and control information Decision logic for determining the sequence of operations and logic to interpret the instructions

5 Chapter 8 5 Multiplier Example: Block Diagram C out n n n 2 1 Counter P Zero detect Control unit G (Go) log 2 n Q o Z Parallel adder Multiplicand Register B Shift register A 0 CShift register Q Multiplier Product OUT IN Control signals n nn 4

6 Chapter 8 6 Multiplier Example: Control Signal Table Control Signals for BinaryMultiplier Block Diagram ModuleMicrooperation Control Signal Name Control Expression RegisterA:A ← 0InitializeG A ← A + BLoad MUL0 · Q C ||A Q srC ||A QShift_decMUL1 RegisterB:B ←INLoad_BLOADB Flip-FlopC: C ← 0Clear_CIDLE · G +MUL1 C ←C out Load— RegisterQ: Q ←INLoad_QLOADQ C ||A Q ← srC ||A QShift_dec— CounterP:P ←n – 1Initialize— P ← P – 1Shift_dec— IDLE · ←

7 Chapter 8 7 Multiplier Example: ASM Chart 01 G IDLE MUL0 01 Z MUL1 01 0C ←0, A ← P ←P ← n –1 A ←A +B, C ←C out P ←P ←P – 1 C ← 0, C || A || Q ← sr C || A || Q, Q 0

8 Chapter 8 8  Control Design Methods Will follow procedure from Chapter 6  Procedure specializations that use a single signal to represent each state One Flip-flop per State Flip-flop outputs as “state,” e. g., 0001, 0010, 0100, 1000. Map directly from ASM chart (previous lecture) Sequence Register and Decoder  Sequence register with encoded states, e.g., 00, 01, 10, 11.  Decoder outputs produce “state” signals, e.g., 0001, 0010, 0100, 1000. Hardwired Control

9 Chapter 8 9 Multiplier Example: Sequencer and Decoder Design  Use sequential circuit design techniques from Chapter 4.  First, define: States: IDLE, MUL0, MUL1 Input Signals: G, Z, Q 0 ( Q 0 affects outputs, not next state) Output Signals: Initialize, LOAD, Shift_Dec, Clear_C State Transition Diagram (Use ASM on Slide 7) Output Function: Use Table on Slide 6  Second, find State Assignments (two bits required) We will use two state bits to encode the three state IDLE, MUL0, and MUL1.

10 Chapter 8 10  Assuming that state variables M1 and M0 are decoded into states, the next state part of the state table is: Multiplier Example: Sequencer and Decoder Design (continued)

11 Chapter 8 11 Multiplier Example: Sequencer and Decoder Design (continued)  Finding the equations for M1 and M0 is easier due to the decoded states: M1 = MUL0 M0 = IDLE · G + MUL1 · Z  The output equations using the decoded states: Initialize = IDLE · G Load = MUL0 · Q 0 Clear_C = IDLE · G + MUL1 Shift_dec = MUL1

12 Chapter 8 12 Multiplier Example: Sequencer and Decoder Design (continued)  Doing multiple level optimization, extract IDLE · G: START = IDLE · G M1 = MUL0 M0 = START + MUL1 · Z Initialize = START Load = MUL0 · Q 0 Clear_C = START + MUL1 Shift_dec = MUL1  The resulting circuit using flip-flops, a decoder, and the above equations is shown on the next slide.

13 Chapter 8 13 Multiplier Example: Sequencer and Decoder Design (continued) IDLE MUL0 MUL1 Initialize Clear_C Shift_dec M 0 Load M 1 G Z Q 0 DECODER A0 A1 0 3 2 1 D C D C START

14 Chapter 8 14 ASM Solution (from Lec. 25) D C IDLE D C MUL0 D C MUL1 Initialize Clear _C Load Shift_dec Clock Z Q 0 4 1 G 2 5 4 5 1 15 DEMUX D 0 D 1 A 0 EN 2 DEMUX D 0 D 1 A 0 EN START

15 Chapter 8 15 Speeding Up the ASM Multiplier  In processing each bit of the multiplier, the circuit visits states MUL0 and MUL1 in sequence.  By redesigning the multiplier, is it possible to visit only a single state per bit processed?

16 Chapter 8 16 Speeding Up Multiply (continued)  Examining the operations in MUL0 and MUL1: In MUL0, a conditional add of B is performed, and In MUL1, a right shift of C || A || Q in a shift register, the decrementing of P, and a test for P = 0 (on the old value of P) are all performed in MUL1  Any solution that uses one state must combine all of the operations listed into one state  The operations involving P are already done in a single state, so are not a problem.  The right shift, however, depends on the result of the conditional addition. So these two operations must be combined!

17 Chapter 8 17 Speeding Up Multiply (continued)  By replacing the shift register with a combinational shifter and combining the adder and shifter, the states can be merged.  The C-bit is no longer needed.  The ASM chart: G IDLE MUL 00 01 10 11 01 Z || Q 0 A || Q sr C out || (A +0) || Q A || Q sr C out || (A +0) || Q A || Q sr C out || (A +B) || Q A || Q sr C out || (A+B) || Q P P – 1 0A P n – 1

18 Chapter 8 18 Microprogrammed Control  Microprogrammed Control — a control unit with binary control values stored as words in memory.  Microinstructions — words in the control memory.  Microprogram — a sequence of microinstructions.  Control Memory — RAM or ROM memory holding the microinstructions.  Writeable Control Memory — RAM Memory into which microinstructions may be written Control signalsRegister transfersNext uaddress

19 Chapter 8 19 Microprogrammed Control (continued)

20 Chapter 8 20 Summary  Hardwired Control One flip-flop per state Sequence register and decoder  Microprogrammed control

21 Chapter 8 21 Terms of Use  © 2004 by Pearson Education,Inc. All rights reserved.  The following terms of use apply in addition to the standard Pearson Education Legal Notice.Legal Notice  Permission is given to incorporate these materials into classroom presentations and handouts only to instructors adopting Logic and Computer Design Fundamentals as the course text.  Permission is granted to the instructors adopting the book to post these materials on a protected website or protected ftp site in original or modified form. All other website or ftp postings, including those offering the materials for a fee, are prohibited.  You may not remove or in any way alter this Terms of Use notice or any trademark, copyright, or other proprietary notice, including the copyright watermark on each slide.  Return to Title Page Return to Title Page


Download ppt "Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems."

Similar presentations


Ads by Google