5-1 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Chapter.

Slides:



Advertisements
Similar presentations
Control Unit Implemntation
Advertisements

Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Processor Design Computer Architecture CS 215. CPU Design  Control Unit Generates the control signals in the correct order to effect the correct data.
PART 5: (2/2) Processor Internals CHAPTER 15: CONTROL UNIT OPERATION 1.
Computer Architecture
1 ITCS 3181 Logic and Computer Systems 2014 B. Wilkinson Slides8.ppt Modification date: Nov 3, 2014 Random Logic Approach The approach described so far.
Microprogramming. S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Microprogramming Main Points/Terminology Difference.
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
The Processor Data Path & Control Chapter 5 Part 3 - Microprogrammed Control Unit N. Guydosh 3/1/04+
CS364 CH17 Micro-programmed Control
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Chapter 7. Basic Processing Unit
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
Computer Organization and Architecture
Computer Architecture Lecture 12 Fasih ur Rehman.
Chapter 5 Basic Processing Unit
Lec 5 Introduction to CPU Design. Introduction to CPU Design Computer Organization & Assembly Language Programming slide 2 Outline  Introduction  Data.
Lecture 16 Today’s topics: –MARIE Instruction Decoding and Control –Hardwired control –Micro-programmed control 1.
Introduction to Computer Organization and Architecture Micro Program ภาษาเครื่อง ไมโครโปรแกรม.
Multiple-bus organization
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Chapter 16 Micro-programmed Control
MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.
1 Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag.
Microprogrammed Control Chapter11:. Two methods for generating the control signals are: 1)Hardwired control o Sequential logic circuit that generates.
1 Computer Organization & Design Microcode for Control Sec. 5.7 (CDROM) Appendix C (CDROM) / / pdf / lec_3a_notes.pdf.
25/05/12 1 Lecture 3: CPUs; The SHC1, Simple Hypothetical CPU #1 Ian McCrumRoom 5B18,
PART 6: (1/2) Enhancing CPU Performance CHAPTER 16: MICROPROGRAMMED CONTROL 1.
Computer architecture
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Chapter 3 Basic Processing Unit.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
MICROPROGRAMMED CONTROL
Control Unit Operations Chapter10:. What is Control Unit (CU)?(1)  Part of a CPU or other device that directs its operation.  Tells the rest of the.
Chapter 10 Control Unit Operation “Controls the operation of the processor”
S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Chapter 4 Topics The Design Process A 1-bus Microarchitecture for.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Chapter 7 Microsequencer Control Unit Design.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Computer Organization and Architecture + Networks
Block diagram of a Microcoded Control unit
CS161 – Design and Architecture of Computer Systems
Micro-programmed Control
Computer Organization & Design Microcode for Control Sec. 5
Processor Organization and Architecture
Processor: Finite State Machine & Microprogramming
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
Chapter 5: Processor Design—Advanced Topics
Some Fundamental Concepts
Control Unit Introduction Types Comparison Control Memory
The Processor Lecture 3.1: Introduction & Logic Design Conventions
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Basic Processing Unit UNIT-5.
William Stallings Computer Organization and Architecture
Processor Organization and Architecture
Presentation transcript:

5-1 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Chapter 5: Processor Design— Advanced Topics Topics 5.3 Microprogramming Control store and microbranching Horizontal and vertical microprogramming

5-2 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Control Unit Implemented as Hardware - Hardwired Control Unit. Fig 4.11 Control Unit Detail with Inputs and Outputs

5-3 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Microprogramming: Basic Idea Control unit job is to generate the sequence of control signals Hardwired approach uses an FSM implemented in hardware to generate these sequences An alternate solution is to build a smaller “computer” to perform this function - microcode engine StepConcrete RTNControl Sequence T0MA  PC: C  PC + 4;PC out, MA in, INC4, C in, Read T1MD  M[MA]: PC  C;C out, PC in, Wait T2IR  MD;MD out, IR in T3A  R[rb];Grb, R out, A in T4C  A + R[rc];Grc, R out, ADD, C in T5R[ra]  C;C out, Gra, R in, End Recall control sequence for 1-bus SRC

5-4 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan The Microcode Engine A computer to generate control signals is much simpler than an ordinary computer At the simplest, it just reads the control signals in order from a read-only memory The memory is called the control store A control store word, or microinstruction, contains a bit pattern telling which control signals are true in a specific step The major issue is determining the order in which microinstructions are read

5-5 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Microcode Engine: Basic Implementation Generated Control Signals... PC out PC in C in ANDORGra MA in Microstore (memory) Microsequence generator (computer) microaddress microinstructions (data from memory) Microcoded Control Unit microbranch information (if needed) Decoder (optional) Some information in microstore can be used to alter control flow of microsequence generator (microbranches) Optional decoder can be used to expand microcode to control larger number of control points (horizontal vs. vertical microcode)

5-6 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Microcode Engine: More Details Microinstruction has branch control, branch address, and control signal fields Microprogram counter can be set from several sources to do the required sequencing Fig 5.16 Block Diagram of Microcoded Control Unit

5-7 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Parts of the Microprogrammed Control Unit Since the control signals are just read from memory, the main function is sequencing This is reflected in the several ways the  PC can be loaded Output of incrementer—  PC + 1 PLA output—start address for a macroinstruction Branch address from  instruction External source—say for exception or reset Micro conditional branches can depend on condition codes, data path state, external signals, etc.

5-8 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Contents of a Microinstruction Main component is list of 1/0 control signal values There is a branch address in the control store There are branch control bits to determine when to use the branch address and when to use  PC + 1. Branch control Control signals Branch address PC out MA in PC in C out A in End Microinstruction format

5-9 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Fig 5.17 The Control Store Common instruction fetch sequence Separate sequences for each (macro) instruction Wide words

5-10 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Tbl 5.2 Control Signals for the add Instruction Addresses 101–103 are the instruction fetch Addresses 200–202 do the add Change of  control from 103 to 200 uses a kind of  branch.

5-11 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Uses for  branching in the Microprogrammed Control Unit (1) Branch to start of  code for a specific inst. (2) Conditional control signals, e.g. CON  PC in (3) Looping on conditions, e.g. n  0 ... Goto6 Conditions will control  branches instead of being ANDed with control signals Microbranches are frequent and control store addresses are short, so it is reasonable to have a  branch address field in every  instruction

5-12 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Illustration of  branching Control Logic We illustrate a  branching control scheme by a machine having condition code bits N and Z Branch control has 2 parts: (1) selecting the input applied to the  PC and (2) specifying whether this input or  PC + 1 is used We allow 4 possible inputs to  PC The incremented value  PC + 1 The PLA lookup table for the start of a macroinstruction An externally supplied address The branch address field in the  instruction word

5-13 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Fig 5.18 Branching Controls in the Microcoded Control Unit 5 branch conditions NotN N NotZ Z Unconditional To 1 of 4 places Next  instruction PLA External address Branch address

5-14 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Some Possible  branches Using the Illustrated Logic (Refer to Tbl 5.3) If the control signals are all zero, the  instruction only does a test Otherwise test is combined with data path activity

5-15 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan In horizontal microcode, each control signal is represented by a bit in the  instruction In vertical microcode, a set of true control signals is represented by a shorter code The name horizontal implies fewer control store words of more bits per word Vertical  code only allows RTs in a step for which there is a vertical  instruction code Thus vertical  code may take more control store words of fewer bits Horizontal versus Vertical Microcode Schemes

5-16 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Fig 5.19 A Somewhat Vertical Encoding Scheme would save (16 + 7) - (4 + 3) = 16 bits/word in the case illustrated 4–16 decoder3–8 decoder 16 ALU7 Reg out control signals control signals F5F8 ALU ops field Register-out field  IR 43

5-17 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Fig 5.20 Completely Horizontal and Vertical Microcoding

5-18 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Saving Control Store Bits with Horizontal Microcode Some control signals cannot possibly be true at the same time One and only one ALU function can be selected Only one register out gate can be true with a single bus Memory read and write cannot be true at the same step A set of m such signals can be encoded using log 2 m bits (log 2 (m + 1) to allow for no signal true) The raw control signals can then be generated by a k to 2 k decoder, where 2 k  m (or 2 k  m + 1) This is a compromise between horizontal and vertical encoding

5-19 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan A Microprogrammed Control Unit for the 1-Bus SRC Using the 1-bus SRC data path design gives a specific set of control signals There are no condition codes, but data path signals CON and n = 0 will need to be tested We will use  branches BrCON, Brn = 0, and Brn  0 We adopt the clocking logic of Fig Logic for exception and reset signals is added to the microcode sequencer logic Exception and reset are assumed to have been synchronized to the clock

5-20 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Tbl 5.4 The add Instruction Microbranching to the output of the PLA is shown at 102 Microbranch to 100 at 202 starts next fetch. 

5-21 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Getting the PLA Output in Time for the Microbranch For the input to the PLA to be correct for the  branch in 102, it has to come from MD, not IR An alternative is to use see-through latches for IR so the opcode can pass through IR to PLA before the end of the clock cycle

5-22 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan See-Through Latch Hardware for IR So  PC Can Load Immediately Data must have time to get from MD across Bus, through IR, through the PLA, and satisfy  PC set up time before trailing edge of S

5-23 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Fig 5.21 SRC Microcode Sequencer

5-24 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Tbl 5.6 Somewhat Vertical Encoding of the SRC Microinstruction

5-25 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Other Microprogramming Issues Multiway branches: often an instruction can have 4–8 cases, say address modes Could take 2–3 successive  branches, i.e. clock pulses The bits selecting the case can be ORed into the branch address of the  instruction to get a several way branch Say if 2 bits were ORed into the 3rd and 4th bits from the low end, 4 possible addresses ending in 0000, 0100, 1000, and 1100 would be generated as branch targets Advantage is a multiway branch in one clock A hardware push-down stack for the  PC can turn repeated  sequences into  subroutines Vertical  code can be implemented using a horizontal  engine, sometimes called nanocode