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.

Slides:



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

Machine Instructions Operations 1 ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson Slides4-1.ppt Modification date: March 18, 2015.
1 ITCS 3181 Logic and Computer Systems B. Wilkinson Slides9.ppt Modification date: March 30, 2015 Processor Design.
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Computer Architecture
Microprogramming. S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Microprogramming Main Points/Terminology Difference.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
Chapter 6 Microlevel of H1 and V1. We start with some concepts from Chapter 5 that are essential for this chapter.
Execution of an instruction
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.
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Chapter 7. Basic Processing Unit
Specifying the Actions Internal Architecture of a Simple Processor
Implementation of a Stored Program Computer
ITCS 3181 Logic and Computer Systems 2014 B. Wilkinson Slides6.ppt Modification date: Oct 30, Processor Design Specifying the Actions Internal Architecture.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
Computer Organization and Architecture
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Lecture 16 Today’s topics: –MARIE Instruction Decoding and Control –Hardwired control –Micro-programmed control 1.
Implementation of a Stored Program Computer ITCS 3181 Logic and Computer Systems 2014 B. Wilkinson Slides2.ppt Modification date: Oct 16,
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
Execution of an instruction
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.
Microprogrammed Control Chapter11:. Two methods for generating the control signals are: 1)Hardwired control o Sequential logic circuit that generates.
EECS 322: Computer Architecture
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.
PART 6: (1/2) Enhancing CPU Performance CHAPTER 16: MICROPROGRAMMED CONTROL 1.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson Slides4-2.ppt Modification date: March 23, Procedures Essential ingredient of high level.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
MICROPROGRAMMED CONTROL
GROUP 2 CHAPTER 16 CONTROL UNIT Group Members ๏ Evelio L. Hernandez ๏ Ashwin Soerdien ๏ Andrew Keiper ๏ Hermes Andino.
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.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
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.
Basic Concepts Microinstructions The control unit seems a reasonably simple device. Nevertheless, to implement a control unit as an interconnection of.
Design a MIPS Processor (II)
Computer Organization and Architecture + Networks
Control Unit Lecture 6.
Micro-programmed Control
Micro-programmed Control Unit
The Processor and Machine Language
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
Controller Implementation--Part II
Processor Organization and Architecture
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
ECE 352 Digital System Fundamentals
Basic components Instruction processing
William Stallings Computer Organization and Architecture
Presentation transcript:

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 is called a random logic approach and is a complicated logic design exercise. Each design is unique and depends upon the instruction set and the internal arrangements. The method does not lend itself to modifications afterwards.

2 Microprogrammed Approach Wilkes (in 1951) suggested an alternative approach for control unit design called microprogramming. Each elementary step is encoded into a binary pattern in much the same way as machine instructions, and held in a memory within the control unit. Not widely adopted until the 1960’s but particularly convenient for complex instruction sets. Generally not used in simple RISC designs. Wilkes, Maurice (1951). "The Best Way to Design an Automatic Computing Machine". Report of Manchester University Computer Inaugural Conference. pp. 16–18. Confident! Note This material is now historical and given for completeness.

3 Microprogrammed Control Unit Design Operations for each state encoded in binary in an instruction known as a microinstruction (a small instruction) Each microinstruction will cause the signals necessary to transfer data from one place to another in the processor, and activates functional units if necessary for the operation. Microprogram – A list of microinstructions for each machine instruction. Microprogram held in a very high speed memory called the control memory within the control unit of the processor.

4 Microprogrammed Control Unit - Basic Concept

5 Microinstruction Formats 1. Horizontal Microinstruction Format One bit for each possible signal that might need to be generated by any microinstruction - leads to the fastest execution: Example MAR  PC Requires d bits if there are d possible destinations plus s bits if there are s possible sources.

6 2. Vertical Microinstruction Format Mutually exclusive operations grouped together and encoded in binary. Reduces number of bits in microinstruction. Each vertically encoded field needs a decoder:

7 Example Suppose there were up to 15 possible sources and destinations (PC, MAR, MDR, IR....). Four bits needed to specify which one: EncodingDestinationSource 0000NoneNone 0001RdRs Rs2 0011IR IR IR (zero) 0111R314 (constant) 1000PCPC 1001MDRMDR 1010MARMAR... This is just an example of how it could be encoded, but this will be used later. One pattern for no signals Various parts of IR Used in Branch Used to increment PC

8 Vertical Format Microinstruction Encoding Example MAR  PC

9 More Complex Operations Vertical encoding typically used to select arithmetic functions, etc. Example PC  PC + IR 25-0 Need two sources, destination and arithmetic operation specified in microinstruction:

10 Possible ALU function Encoding EncodingALU function 0000None (ALU out = ALU in1 ) 0001Add 0010Subtract 0011Multiply 0100Divide 0101AND 0110OR 0111Shift left 1000Shift right Again this is just an example of how it could be encoded, but it will be used later.

11 Example Encoded Microinstruction PC  PC + IR 25-0

12 Microinstruction Sequencing Need a mechanism to specify next microinstruction to be executed. Original (Wilkes) method was to hold the address of the next microinstruction in a field within the microinstruction (so-called four- address instruction format):

13 Microprogram counter More convenient approach for microinstructron sequencing is to use a microprogram counter to hold the address of the next microinstruction just as machine instruction sequencing uses a program counter. Then simply increment the microprogram counter after each microinstruction is fetched in preparation for fetching the next microinstruction.

14 Branch Microinstructions Needed for implementing branch machine instructions. Also useful for implementing a complex machine instruction with microinstructions. Original Wilkes method: Used a microinstruction with two “next microinstruction” addresses, one for identifying state if condition true and one for identifying the state if the condition is false. In our case with a microprogram counter: - Only need to hold branch target in the “next microinstruction” address field in microinstruction. The microprogram counter holds the address of next sequential microinstruction. In either case, logic to select one address depending upon whether the condition had been met.

15 Branch Microinstructions In our design, need to implement:

16 BL instruction State 21 Rs1 - 0 (compare Rs1 against zero) if (negative) goto state 22 else goto state 0 This can be simplified by arranging state 22 to be immediately after state 21 in the microprogram. Then state 21 reads: Rs1 - 0 (compare Rs1 against zero) if (positive) goto state 0 where condition is the opposite to that previously. All branch sequences are similar.

17 Microinstruction with Conditional Branch Operations Example Again this is just an example of how it could be encoded, but it will be used later.

18 Conditional Branch Microinstruction Example Rs1 - 0; if (negative) goto branch location Using previous encoding. Number of bits in branch address depends upon maximum size of the control memory. Can also use two different formats, one for non-branch and one for branch to reduce wasted space in microinstruction (first bit specifies format).

19 Other Operations Other operations include: Memory Read/Write Could have one bit for either:

20 Memory Write [MAR]  MDR Memory Read MDR  [MAR]

21 Fetch Cycle Could be done in microcode or by special hardwired logic. Suppose done in microcode starting at location 0 in control memory: Control memoryMicroprogram locationDestFnSrc1Src2WRCond Br addr. T 0 :MAR  PC T 1 :MDR  [MAR] T 2 :IR  MDR T 3 :PC  PC Subsequently, we will assume step T 3 done using separate logic at same time as step T 2. Final Microprogram

22 Execute Cycle Selecting Execute Microcode At the end of fetch cycle, need to select the start of the microprogram (microcode) for the specific fetched machine instruction. Generally, the op-code of the machine instruction can be used. The fetched machine instruction will be in the instruction register (IR) at this time.

23 Fetch Mapping ROM Convenient to use a read-only memory (ROM). Opcode used to select location in mapping ROM. Contents of addressed location holds address of microinstruction in control memory:

24 Example Suppose opcode pattern is , and location 120 in control memory holds first microinstruction of microprogram to execute machine instruction.

25 Selecting Execute Microcode Need to have the step: “branch to location specified by op-code mapping ROM” at the end of fetch cycle. We shall choose to provide new field called here select, defined as follows: select 00Next address given by microprogram counter (i.e. default for sequential execution) 01Next address given by op-code mapping ROM 10Next address given by branch address field of microinstruction if condition exists (i.e. for branch microinstructions) Pattern 11 available and could be used to implement microinstruction subroutines, see later.

26 Next Address Select Field Final microinstruction format for our design. There could be other miscellaneous operations.

27 Microprogrammed Control Unit Design

28

29

30 Alternative Designs -- Clearly there are many alternative designs. We have used mainly vertical encoding but this does lead to slower operation. Often horizontal encoding is used with very long microinstruction lengths (100 bits or more).

31 Questions