15 control-computer organization and archietecture-co-coa
TRANSCRIPT
![Page 1: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/1.jpg)
Chapter 16
Control Unit Implemntation
![Page 2: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/2.jpg)
A Basic Computer Model
![Page 3: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/3.jpg)
Example Simple Processor & Data Paths
![Page 4: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/4.jpg)
MIPS Data Paths with Generation of Control Signals
Note: This figure does not show J (jump) type instruction Data Paths
![Page 5: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/5.jpg)
A Simple Computer & its Control Unit
![Page 6: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/6.jpg)
Control Signal Sources
• Clock—One micro-instruction (or set of parallel micro-
instructions) per clock cycle
• Instruction Register—Op-code for current instruction—Determines which micro-instructions are performed
• Flags—State of CPU—Results of previous operations
• From Control Bus—Interrupts / Bus Requests—Acknowledgements
![Page 7: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/7.jpg)
Control Signals Outputs
• Within CPU—Cause data movement—Activate specific functions
• Via Main Bus—To memory—To I/O modules
![Page 8: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/8.jpg)
Control Signals
![Page 9: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/9.jpg)
The Internal Bus ?
![Page 10: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/10.jpg)
Example Simple Processor & Data Paths
![Page 11: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/11.jpg)
Example Simple Processor & Data Paths
![Page 12: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/12.jpg)
State Machine for Example Simple Processor
http://highered.mcgraw-hill.com/sites/dl/premium/0072467509/instructor/104653/figurec9.xls
![Page 13: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/13.jpg)
Control Unit with Decoded Inputs
![Page 14: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/14.jpg)
MIPS Instruction Formats
![Page 15: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/15.jpg)
MIPS Data Paths with Generation of Control Signals
Note: This figure does not show J (jump) type instruction Data Paths
![Page 16: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/16.jpg)
MIPs Pipelined Machine with Controls IF | ID | EX | MEM | WB
(64 bits)
(142 bits)
(107 bits)
(71 bits)
![Page 17: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/17.jpg)
Problems With Hard Wired Designs
• Sequencing & micro-operation logic gets complex
• Difficult to design, prototype, and test
• Resultant design is inflexible, and difficult to build upon
(Pipeline, multiple computation units, etc.)
• Adding new instructions requires major design and adds complexity quickly
![Page 18: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/18.jpg)
Chapter 17
Micro-Programmed Control
![Page 19: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/19.jpg)
Example Simple Processor Micro-Programed Control
![Page 20: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/20.jpg)
Control Unit Organization
Tasks of Control Unit:• Microinstruction sequencing• Microinstruction execution
The Control Memory contains sequences of microinstructions that provide the control signals to execute instruction cycles, e.g. Fetch, Indirect, Execute, and Interrupt.
May be expected to complete instruction execution in “1” clock cycle. How is this possible?
![Page 21: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/21.jpg)
Recall: Micro-sequencing
![Page 22: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/22.jpg)
Example of Control Memory Organization
Microinstructions:• Generate Control Signals• Provide Branching
![Page 23: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/23.jpg)
Horizontal vs Vertical Microprogramming
Horizontal Microprogrammed or— Unpacked— Hard— Direct
Vertical Microprogrammed or— Packed— Soft— Indirect
![Page 24: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/24.jpg)
Microinstruction Encoding - Direct Encoding
![Page 25: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/25.jpg)
Microinstruction Encoding - Indirect Encoding
![Page 26: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/26.jpg)
Horizontal Micro-programming
• Wide control memory word
• High degree of parallel operations possible
• Little encoding of control information
• Faster
![Page 27: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/27.jpg)
Vertical Micro-programming
• Width can be much narrower
• Control signals encoded into function codes – need to be decoded
• More complex, more complicated to program, less flexibility
• More difficult to modify
• Slower
![Page 28: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/28.jpg)
Typical Microinstruction Formats
![Page 29: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/29.jpg)
Example Microprogramming Formats
• MicroProgram Counter• Subroutines• Stack• Control Register (MicroProgram Format)
![Page 30: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/30.jpg)
Next Address Decision
• Depending on ALU flags and control buffer register:
— Get next instruction– Add 1 to control address register
— Jump to new routine based on jump microinstruction– Load address field of control buffer register into control address
register
— Jump to machine instruction routine– Load control address register based on opcode in IR
![Page 31: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/31.jpg)
Microprogrammed Control Unit
![Page 32: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/32.jpg)
Design Considerations
• Necessity of speed• Size of Microinstructions• Address generation
—Branches– Both conditional and unconditional– Based on current microinstruction, condition flags,
contents of IR– Based on format of address information
+ Two address fields+ Single address field+ Variable format
![Page 33: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/33.jpg)
Branch Control: Two Address Fields
Branch based upon:• Instruction Opcode• Address 1• Address 2
Does require a wide microinstruction, but no address calculation is needed
![Page 34: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/34.jpg)
Branch Control: Single Address Field
Branch based upon:• Next instruction• Address• Opcode
Does require more circuitry, e.g. adder
![Page 35: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/35.jpg)
Branch Control: Variable Format
One bit determines microinstruction format: • Control signal format• Branch format
Does require even more circuitry, and is slowest.
![Page 36: 15 control-computer organization and archietecture-CO-COA](https://reader035.vdocument.in/reader035/viewer/2022081514/588af8b01a28abf8548b5b0f/html5/thumbnails/36.jpg)
Advantages and Disadvantages of Microprogramming
Advantage:• Simplifies design of control unit
— Cheaper to design— Less error-prone— Much easier to modify— Supports having multiple versions / models
Disadvantage:• Slower• More expensive to produce in quantities