Mic-1: Microarchitecture University of Fribourg, Switzerland System I: Introduction to Computer Architecture WS 2005-2006 20 December 2006 Béat Hirsbrunner,

Slides:



Advertisements
Similar presentations
Fetch-Execute cycle. Memory Read operation Read from memory.
Advertisements

Central Processing Unit
Chapter 4 - MicroArchitecture
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
PART 5: (2/2) Processor Internals CHAPTER 15: CONTROL UNIT OPERATION 1.
ARITHMETIC LOGIC SHIFT UNIT
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.
Chapter 6 Microlevel of H1 and V1. We start with some concepts from Chapter 5 that are essential for this chapter.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
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,
Computer Architecture I - Class 9
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Microarchitecture Level.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Mic-1: Microarchitecture University of Fribourg, Switzerland System I: Introduction to Computer Architecture WS January 2006
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
The Microarchitecture Level The level above the digital logic level is the microarchitecture level.  Its job is to implement the ISA (Instruction Set.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
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.
1 Computer Organization Today: First Hour: Computer Organization –Section 11.3 of Katz’s Textbook –In-class Activity #1 Second Hour: Test Review.
Lecture 16 Today’s topics: –MARIE Instruction Decoding and Control –Hardwired control –Micro-programmed control 1.
TDC 311 The Microarchitecture. Introduction As mentioned earlier in the class, one Java statement generates multiple machine code statements Then one.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Computer Design Basics
Microarchitecture Level 1 Introduction to Computer Architecture, Bachelor Course, 1st Semester, University of Fribourg, Switzerland © Béat Hirsbrunner.
Chapter 8: The Very Simple Computer
The Microarchitecture Level
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Computer Organization CSC 405 (VSC) Very Simple Computer.
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.
Fetch-execute cycle.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Microarchitecture Level.
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.
The Micro Architecture Level
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
More on Pipelining 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
GROUP 2 CHAPTER 16 CONTROL UNIT Group Members ๏ Evelio L. Hernandez ๏ Ashwin Soerdien ๏ Andrew Keiper ๏ Hermes Andino.
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
More on Pipelining 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Jeremy R. Johnson William M. Mongan
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
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.
CS161 – Design and Architecture of Computer Systems
CE 454 Computer Architecture
Systems Architecture I
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
The Processor and Machine Language
A Multiple Clock Cycle Instruction Implementation
MARIE: An Introduction to a Simple Computer
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
Systems Architecture I
CDCA 2203 Elements of Computer Architecture Open University Malaysia
William Stallings Computer Organization and Architecture 8th Edition
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Computer Architecture
Processor: Datapath and Control
Presentation transcript:

Mic-1: Microarchitecture University of Fribourg, Switzerland System I: Introduction to Computer Architecture WS December 2006 Béat Hirsbrunner, Amos Brocco, Fulvio Frapolli (1)

Mic-1: Microarchitecture (1) (2)

Mic-1: Microarchitecture (2) (3) Data path Control section

The data path (4) 32-bit registers (with exception of MBR, which is a 8 bit register) B bus to drive data to the ALU C bus to drive data from the ALU to registers H register as A-input of the ALU ALU with 6 control signals (and 2 outputs, N to test for Negative numbers and Z to test for Zero) From/ To Memory

ALU Control Signals (5) 1

The data path (6) Registers have control signals to enable/disable reading from them (put value on the B bus) and writing to them (store value from the C bus) It is possible to read only from one register at time: so we can use a 4 -> 16 bit decoder It is possible to write to one or more registers at the same time: so we need 9 control signals for the C bus.

Data path synchronization (1) (7) 1. Control signals stabilize 2. A register value is put on the B bus 3. ALU and shifter operate 4. Result propagate on the C bus 5. Result is written in the registers on the raising edge of the next clock pulse

Data path synchronization (2) (8) 1. Control signals stabilize 2. Register's value is put on the B bus 3. ALU and shifter operate 4. Result propagate on the C bus 5. Result is written in the registers on the raising edge of the next clock pulse

Data path synchronization (3) (9) 1. Control signals stabilize 2. Register's value is put on the B bus 3. ALU and shifter operate 4. Result propagate on the C bus 5. Result is written in the registers on the raising edge of the next clock pulse

Data path synchronization (4) (10) 1. Control signals stabilize 2. Register's value is put on the B bus 3. ALU and shifter operate 4. Result propagate on the C bus 5. Result is written in the registers on the raising edge of the next clock pulse

Data path synchronization (4) (11) 1. Control signals stabilize 2. Register's value is put on the B bus 3. ALU and shifter operate 4. Result propagate on the C bus 5. Result is written in the registers on the raising edge of the next clock pulse

MAR and MDR (1) (12) 32 bit registers connected to the main memory MAR = Memory Address Register MDR = Memory Data Register MAR has only one control signal (input from C) Two memory operations: read and write

MAR and MDR (2) (13) Data is word (4*8bit = 32bit in our ISA) addressed! =>MAR addresses are shifted 2bit left ( = * 4)

Memory Access (14) A memory read initiated at cycle k delivers data that can be used only in cycle k+2 or later! 1. MAR is loaded 2. Memory access 3. MDR is loaded with data read from memory 4. Data in MDR is available

Memory Access (15) A memory read initiated at cycle k delivers data that can be used only in cycle k+2 or later! 1. MAR is loaded 2. Memory access 3. MDR is loaded with data read from memory 4. Data in MDR is available

Memory Access (16) A memory read initiated at cycle k delivers data that can be used only in cycle k+2 or later! 1. MAR is loaded 2. Memory access 3. MDR is loaded with data read from memory 4. Data in MDR is available

Memory Access (17) A memory read initiated at cycle k delivers data that can be used only in cycle k+2 or later! 1. MAR is loaded 2. Memory access 3. MDR is loaded with data read from memory 4. Data in MDR is available

Memory Access (18) A memory read initiated at cycle k delivers data that can be used only in cycle k+2 or later! 1. MAR is loaded 2. Memory access 3. MDR is loaded with data read from memory 4. Data in MDR is available

Memory Access (2) (19) Until start of cycle k+2 the MDR register contains old data It is possible to issue consecutive requests, for example at time k and k+1: corresponding results will be available at k+2 and k+3

PC and MBR (20) 8 bit registers connected to the main memory used to read (fetch) ISA instructions PC = Program Counter MBR = Memory Buffer Register Access also requires one clock cycle (k -> k+2) MBR has two control signals for the B bus, for signed or unsigned operations One memory operation: fetch

H register (21) Is the A-input of the ALU Has only one control signal; output to the ALU is always enabled

ISA, IJVM, Microarchitecture (22) ISA = Instruction Set Architecture (defines instructions, memory model, available registers,...) IJVM = An example ISA (it's stack based architecture) The IJVM (Integer Java Virtual Machine) level executes the IJVM Instruction set The IJVM is (in this case) implemented by the Mic-1 Microarchitecture

Mic-1 implementation (23) The Mic-1 is a microprogrammed architecture: each IJVM instruction (Macroinstruction) is divided one or more steps. In each step, a microinstruction is executed by the Mic-1. Microinstructions are simpler than ISA macroinstructions.

Control section (24) MicroProgram Counter (MPC) Control store holding microinstructions MicroInstruction Register (MIR) containing current microinstruction

Microinstructions (25) 36bit wide microinstructions Microinstructions are “executed” in the control section (“a CPU in the CPU”) Microinstructions basically drive control signals for the data path. To avoid the need for a real (micro)Program Counter each microinstruction specifies the address of the following one. Microinstruction addresses are 9-bit wide

Microinstruction format (1) (26)

Microinstruction format (2) (27) Addr: Address of the next microinstruction

Microinstruction format (3) (28) JAM: Determines how to choose next microinstruction

Microinstruction format (4) (29) ALU: Control signals to choose ALU operations

Microinstruction format (5) (30) C: Enables writing from C bus to the selected registers

Microinstruction format (6) (31) Mem: Controls memory read/write/fetch operations

Microinstruction format (7) (32) B: Controls which register can write to the B bus

Driving control signals (33) MIR is loaded on the falling edge of the clock based on the MPC address, control signals propagate 1. ALU Operation: N and Z values available and saved

Driving control signals (34) MIR is loaded on the falling edge of the clock based on the MPC address, control signals propagate 1. ALU Operation: N and Z values available and saved

Driving control signals (35) MIR is loaded on the falling edge of the clock based on the MPC address, control signals propagate 1. ALU Operation: N and Z values available and saved

Next microinstruction (1) (36) Addr (the address of the next microinstruction coded in the current microinstruction) is copied in the MPC (lower 8 bits, high bit is 0) If J is 000 the next address is in the MPC and the next microinstruction can be read from the control store (Note: microinstruction are not stored in the same order as Figure 4-17) If J is not 000 it is necessary to compute the next microaddress depending on the values of J, N and Z (whose value has been saved in flip-flop because the ALU returns correct result as long as data is passing through it) Addr[8]

Next microinstruction (2) (37) If JAMN or JAMZ are set to 1, the 'High bit' function computes the value of the high bit of the MPC as follows: F = (JAMZ and Z) or (JAMN and N) or Addr[8] (To avoid confusion: Addr[8] is in fact the 9 th bit, the highest, of Addr, as bits count start from 0) So the MPC can assume either the value of Addr or the value of Addr with the high bit ORred with 1 Addr[8]

Next microinstruction (3) (38) F = (JAMZ and Z) or (JAMN and N) or Addr[8] An example: Let Addr <= 0xFF (or we would get the same value, 0xFF in either case) Let JAMZ = 1 (or JAMN = 1) Let Z=1 (or N=1) in this case MPC is Addr + 0x100 (for example: if Addr=0x92, MPC = 0x92 + 0x100 = 0x192) Note: 0x100 = 256 Addr[8]

Microinstructions (4) (39)...but why is all that stuff required to determine the next microinstruction ? Reason: efficiency In case of conditional jumps (if..then..else) we normally need two jump addresses as parameter. To uniform the microinstruction format we want all instruction to have the same length: either we make all microinstruction contain two addresses (-> waste of space) or (better solution) we specify only one address and compute the second one as Addr + Constant Value (in Mic-1 Constant Value = 0x100)

Next microinstruction (5) (40) If JMPC = 0, Addr is copied to MPC If JMPC = 1, the lower 8-bits of Addr are ORred with the MBR value, and the result is put in the MPC Normally when JMPC = 1, Addr is set to either 0x000 or 0x100 JMPC is used to jump to the address specified by the MBR, which, as we will see, contains the opcode of the ISA instruction: in fact, microinstruction for each macroinstruction are stored starting from the position determined by the opcode of the latter. Addr[8]

Next microinstruction (6) (41) Example ISA instruction: BIPUSHopcode is 0x10 corresponding microinstructions starts at address 0x10 in the control store For the reasons explained in the previous slides, it is clear that the next microinstruction can be determined only when the MBR, N and Z are ready, i.e. starting from the successive clock pulse) Addr[8]