Microcoded CCU (Central Control Unit)

Slides:



Advertisements
Similar presentations
CS1104: Computer Organisation School of Computing National University of Singapore.
Advertisements

Tuan Tran. What is CISC? CISC stands for Complex Instruction Set Computer. CISC are chips that are easy to program and which make efficient use of memory.
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
Computer Systems. Computer System Components Computer Networks.
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,
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
GCSE Computing - The CPU
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Chapter 5 Basic Processing Unit
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
EXECUTION OF COMPLETE INSTRUCTION
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
Microprogrammed Control Chapter11:. Two methods for generating the control signals are: 1)Hardwired control o Sequential logic circuit that generates.
PART 6: (1/2) Enhancing CPU Performance CHAPTER 16: MICROPROGRAMMED CONTROL 1.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
MICROPROGRAMMED CONTROL
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Copyright © 2005 – Curt Hill MicroProgramming Programming at a different level.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Basic Concepts Microinstructions The control unit seems a reasonably simple device. Nevertheless, to implement a control unit as an interconnection of.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
GCSE Computing - The CPU
Basic Computer Organization and Design
Computer Organization and Architecture + Networks
Control Unit Operation
Assembly language.
Control Unit Lecture 6.
Micro-programmed Control
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Introduction to microprocessor (Continued) Unit 1 Lecture 2
Assembly Language for Intel-Based Computers, 5th Edition
Introduction of microprocessor
Overview Control Memory Comparison of Implementations
Micro-programmed Control Unit
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Central Processing Unit
Computer Organization “Central” Processing Unit (CPU)
Program Flow on ADSP2106X SHARC Pipeline issues
Computer Organization and Design
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Overview of SHARC processor ADSP Program Flow and other stuff
Control Unit Introduction Types Comparison Control Memory
Processor Organization and Architecture
Comparing 68k (CISC) with 21k (Superscalar RISC DSP)
* From AMD 1996 Publication #18522 Revision E
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
Computer Architecture
Mastering Memory Modes
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
GCSE Computing - The CPU
William Stallings Computer Organization and Architecture
Computer Architecture Assembly Language
* M. R. Smith 07/16/96 This presentation will probably involve audience discussion, which will create action items. Use PowerPoint.
Presentation transcript:

Microcoded CCU (Central Control Unit) This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during your presentation In Slide Show, click on the right mouse button Select “Meeting Minder” Select the “Action Items” tab Type in action items as they come up Click OK to dismiss this box This will automatically create an Action Item slide at the end of your presentation with your points entered. Microcoded CCU (Central Control Unit) 11/20/2018 Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary.ca

What will this talk cover? Look at what a “microcoded” processor means Difference between microcoding and assembly code Development of ever increasing complexity in CCU for different control tasks Advantages of pipelining -- in context of CCU Comparision of a microcoded CCU and the branch control logic of 21k 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

4 Basic Phases of an Instruction Fetch -- Bring the instruction to the instruction register over the instruction data bus Decode -- Bring in the necessary operands into the processing unit Execute -- Perform the necessary processing operation Writeback -- Store the results of the process Question is -- what controls the action 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

What are signals from CCU controlling? 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Block diagram of Motorola 68332 CISC microcontroller 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Presence of MicroProgrammed Central Control Unit 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

With a microcoded machine With a microcoded machine, I can change instructions by changing the microcode Can make it operate as ANY processor Vax-780 -- Dr. Rao used to run a program in BASIC (interpreter) that used a microcode simulation of a non-780 machine Build very fancy DSP array processors Hardware features (and other concepts) can be found inside most DSP processors 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Reference Material Most of the slides are taken from a book by Dommanie White Bit Slice Design Used the LSI bit slice products AMD2901 and AMD2911 for custom DSP array processor development. Still available as chips and as VLSI library components Used as ENEL515 textbook in 1983-87 but concepts are now relevant again 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Real life ALU with multiple registers Where do control signals come from and go to? 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Simplest “dedicated computer” CCU Central control unit generates timing signals Just logic 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Control signals would look like this ALU FUNCTION CONTROL REG LOAD 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Could generate from a hardwired CCU NEXT ADDRESS INFO HARDWARE CONTROL 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Control signal pattern stored in PROM as microcode Hardware interpreter of Machine Level instructions 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Control signal pattern stored in PROM as microcode 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Control signals strobed out like this 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Lots of wasted logic Discrete Logic bad -- difficult to update PROM -- can be blasted during design (of chip or board) If next address of microcode instruction is always specified then can unravel the code into a simple consecutive sequence of addresses 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Reduce PROM size by using counter 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Now need to add the ability to move to different parts of the control logic MICRO code in response to different Macro (assembly) code instructions coming in to system At the END of the FETCH phase, switch a bit in microcode to cause counter to be loaded for part of the IR register CONTROL SEQUENCES FETCH CODE ADD CODE SUB CODE 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Start microcode from ASSEMBLY CODE INSTRUCTION by loading counter Loaded from external memory during Fetch INSTRUCTION REGISTER Loaded last part of Fetch CONTROL SEQUENCES FETCH ADD SUB 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Remember relationship between microcode and assembly language 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Microprogrammed processor capable of handling ADD and STORE CONTROL SEQUENCES FETCH ADD SUB STORE 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Same microcode control sequence used in many ways During FETCH phase FETCH item from Memory IF FETCH phrase -- send item to IR During DECODE phase IF MOVE.L #2, D0 -- send item to ALU IF MOVE.L 2, D0 -- send item to AddReg During WRITEBACK phase FETCH item from Memory to be used as address in MOVE.L #2, 2 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Explains control from opcode Opcode describes 2 registers 1 1 Q Q Q S S D D D d d d Source Control Destination Control Constant Value 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Handling Conditional Microcode based on internal condition Need conditional microcode branch capability Note that this is NOT the same as handling a branch in Assembly code That needs different control logic of conditional microcode based on external conditions 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Examples when might branch based on internal conditions Handle all the control sequences needed to respond to the different effective addresses when trying to decode a 68K or 21K instruction NOTE 21K is not microcoded, BUR something equivalent must be happening 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Macro Code branch as microcode sequence Fetch Microcode branch to FETCH control signals to get IR value Decode Microcode branch to FETCH control signals to get address offset value Execute Microcode branch to FETCH control signals to get NZCV flag value Microcode branch to either add PC to offset (do branch) or not Writeback Microcode branch to FETCH control signals to store PC value Microcode branch to FETCH phase 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Branch on Internal Conditions 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Branch on External Conditions - I 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Branch on External Conditions - II Status register is actually a “pipeline” register (see later) 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Clock ticks must take into account the full time for We are “interpreting” the assembly code How fast can you do this type of control? Clock ticks must take into account the full time for Control signals fetched from microcode memory (not macromemory) Time for signal to get to ALU Time for ALU to operate Time for ALU status flags to be generated Time for ALU status flags to be used Time for muxes to switch 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Look at the control signal data paths 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Timing if no microcode branch occurs 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Timing for conditional microcode branch 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Actual timing -- fastest allowed clock Note -- by “pipelining” ALU flags via status register and accessing them in next cycle for testing we have decreased maximum time for MOST instructions 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Speed things by adding another pipeline register 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Timing diagram with CCU pipeline register 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Comparison of timings Not pipelined Pipelined 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Problems however if Branch while pipelined 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

In this case -- modify hardware to overcome the stalls 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Improved pipeline -- no branch 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Improved pipeline -- branch 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Need to add other things Add a microcode hardware stack so that do microcode subroutines to cut down on amount of microROM code size NOTE -- This is NOT assembly code subroutine handling on 68K/21K used to handle “C” (on the memory stack) HOWEVER the hardware is very similar to 21K hardware for loop control and subroutine (limited) 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

AM2911 Microsequencer chip/library 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Things to note Register/counter near top Micro-sequencer stack Handle the counting of loop iterations Micro-sequencer stack hardware stack to handle hardware control loops (starting address) or subroutines (return addresses) Maximum depth is ???? Maximum depth on 21K is 6 nested loops or subroutines which is why can’t use hardware stack for “C” 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

21K Program Sequencer 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary

Note other capabilities Ability to handle interrupts (VECT) Jump to special microcode Ability to determine when to handle assembly code instructions (MAP) Ability to manipulate and break out of microcode loops and microcode subroutines 11/20/2018 ENEL515 -- Microcoded CCU (68K) and SHARC loop/subroutine unit Copyright M. Smith smith@enel.ucalgary