The Micro Architecture Level

Slides:



Advertisements
Similar presentations
Exemple dexécution dun programme IADD Jeux dinstructions de la machine Traduction en hexa 0x60.
Advertisements

Exemple dexécution dun programme ISTORE 1 Jeux dinstructions de la machine Traduction en hexa 0x36 0x01.
CPU Structure and Function
The CPU The Central Presentation Unit What is the CPU?
Instruction Set Design
Chapter 4 - MicroArchitecture
1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10.
Computer Organization and Architecture
1 COSC 3P92 Cosc 3P92 Week 5 Lecture slides Voters quickly forget what a man says. Richard M. Nixon ( ) Former U.S. President.
Shannon Tauro/Jerry Lebowitz Computer Organization Design of MicroArchitecture Level Tannenbaum 4.4.
Chapter 12 CPU Structure and Function. CPU Sequence Fetch instructions Interpret instructions Fetch data Process data Write data.
Computer Organization and Architecture
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
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Microarchitecture Level.
Procedure calls (1) The fact: Most programming languages support the concept of procedures (methods). Each method has its own local variables that are.
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
Chapter 12 CPU Structure and Function. Example Register Organizations.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Consider With x = 10 we may proceed as (10-1) = 9 (10-7) = 3 (9*3) = 27 (10-11) = -1 27/(-1) = -27 Writing intermediates on paper.
An Example Implementation
The Microarchitecture Level The level above the digital logic level is the microarchitecture level.  Its job is to implement the ISA (Instruction Set.
CH12 CPU Structure and Function
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4: IT Students.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4:
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Processor Structure & Operations of an Accumulator Machine
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
The Instruction Set Architecture Level Dept. of Computer Science Virginia Commonwealth University.
ITEC 352 Lecture 20 JVM Intro. Functions + Assembly Review Questions? Project due today Activation record –How is it used?
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
An Example Implementation  In principle, we could describe the control store in binary, 36 bits per word.  We will use a simple symbolic language to.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Microarchitecture Level 1 Introduction to Computer Architecture, Bachelor Course, 1st Semester, University of Fribourg, Switzerland © Béat Hirsbrunner.
The Central Processing Unit (CPU) and the Machine Cycle.
The Microarchitecture Level
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Mic-1: Microarchitecture University of Fribourg, Switzerland System I: Introduction to Computer Architecture WS December 2006 Béat Hirsbrunner,
Fetch-execute cycle.
More on MIPS programs n SPIM does not support everything supported by a general MIPS assembler. For example, –.end doesn’t work Use j $ra –.macro doesn’t.
8086 Internal Architecture
Computer Organization 1 Instruction Fetch and Execute.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Microarchitecture Level.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Structure and Role of a Processor
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
1 CE 454 Computer Architecture Lecture 8 Ahmed Ezzat The Microarchitecture Level, Ch-4.4, 4.5,
Performance improvements ( 1 ) How to improve performance ? Reduce the number of cycles per instruction and/or Simplify the organization so that the clock.
Computer Architecture Instruction Set Architecture
CE 454 Computer Architecture
Computer Architecture and Organization Miles Murdocca and Vincent Heuring Chapter 4 – The Instruction Set Architecture.
William Stallings Computer Organization and Architecture 8th Edition
Computer Science 210 Computer Organization
The Processor and Machine Language
Computer Science 210 Computer Organization
Computer Organization and ASSEMBLY LANGUAGE
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
The Little Man Computer
Computer Architecture
Computer Architecture Assembly Language
Presentation transcript:

The Micro Architecture Level Mic-1 architecture on Tanenbaum’s book Dept. of Computer Science Virginia Commonwealth University

Mic-1 block diagram

1. Why the C bus is represented as a bit map? while B bus register is encoded in a 4 bit field Only one register can be loaded onto B bus, yet more than one register can be selected to be loaded from C bus

2. Give a circuit diagram for “High bit”. Simple answer? F =(JAMZ AND Z) OR (JAMN AND N) OR NEXT_ADDRESS[8]

Calculation of Next Address Z JAMZ N JAMN Addr8 MPC8 JAMC MBR7 Addr7 MPC7 MBR0 Addr0 MPC0 

Calculation of Next address MPC points to the next microinstruction. it is computed from Next_Address JAM fields the ALU status N and Z, the MBR If JMPC MPC[0:7] = Addr[0:7] Else Addr[0:7] OR MBR[0:7]. MPC[8] = Addr[8] or (JAMZ and Z) or (JAMN and Z)

Calculation of Next Address

3. Next address = 0x1FF and use JMPC? Does it make sense? What if Next address is 0xFF? 111111111 (Next Address) bbbbbbbb (MBR) No, Meaningless Next address is usually, 0x00 or 0x100 Why?

4. What if add k=5 after IF? K = 5 BIPUSH 5 ISTORE k

5 IJVM translation of i= k + n + 5 ILOAD k ILOAD n IADD BIOUSH 5 ISTORE i ILOAD k ILOAD n BIOUSH 5 IADD ISTORE i 5 n n+5 k k k k+n+5 n 5 k k k+n k+n k+n+5

6. Give the JAVA statement ILOAD j ILOAD n ISUB BIPUSH 7 DUP IADD ISTORE i i = j-n-7 + j-n-7 n 7 j-n-7 j j j-n j-n j-n-7 j-n-7 2(j-n-7)

7. Is it possible? If (Z) go to L1; else go to L2 // on page 259 0x75 Z : upper half or lower half

8.Why not: if_cmpeq3 Z = TOS-MDR;rd If_icmpeq1 MAR=Sp=Sp-1; rd If_icmpeq2 MAR=SP=SP-1 If_icmpeq3 H=MDR; rd If_icmpeq4 OPC = TOS If_icmpeq5 TOS = MDR If_icmpeq6 Z=OPC-H; if (Z) go to T; else go to F The only possible subtrahend is H

9. How long it will takes? i = j+ k; w/ 2.tGHz Mic1 Main PC = PC +1; fetch; go to (MBR) Iload1 H=LV Iload2 MAR=MBRU+H; rd Iload3 MAR=SP=SP+1 Iload4 PC = PC +; fetch; wr Iload5 TOS = MDR; go to main ILOAD j ILOAD k IADD ISTORE Main PC = PC +1; fetch; go to (MBR) ISTORE1 H=LV ISTORE2 MAR=MBRU+H ISTORE3 MDR=TOS; wr ISTORE4 SP=MAR=SP-1; wr ISTORE5 PC = PC +1; fetch ISTORE6 TOS = MDRT; goto main Main PC = PC +1; fetch; go to (MBR) IADD1 MAR=SP = SP-1; rd; IADD2 H=TOS IADD3 MDR = TOS+MDR-H;wr; goto main ILOAD(6) IADD(4) ISTORE(7) 23microinstructions *0.4nsec = 9.2 nsec 2.5GHz means 1 cycle / (1 / 2.5* G)sec = 0.4nanosec

Microinstruction

Microinstruction

Microinstruction: load k ILOAD K 0x15 0x03

Microinstruction: iadd IADD 0x60

Microinstruction: istore ISTORE I 0x36 0x01

Microinstruction: Homework by Nov 28

10 speed with Mic-2 Mic1 : 2 bus architecture Mic2 : simplified decoding, 3 bus, IFU Mic3 : 4 stage pipeline Mic4 : 7 state pipeline What is common? PC is passed through the CPU and incremented PC is used to fetch next byte Operands are read from memory Operand are written to memory ALU does computation and results are stored back IFU (Instruction Fetch Unit) Independently increment PC and fetch next byte (assemble 8 and 16 bit operands) Depends on the opcode make available the next 8 or 16 bit whether or not doing so makes sense.

Mic-2

How to design IFU? Fetch 4 bytes and load into shifter Feed into MBR1 and MBR2 Whenever PC is changed, IFU must be changed

14 instn*0.4 = 5.6 nanosec 5.6/9.2 = x/100 x = 60.87sec ILOAD(6) IADD(4) ISTORE(7) 23microinstructions *0.4nsec = 9.2 nsec 2.5GHz means 1 cycle / (1 / 2.5* G)sec = 0.4nanosec Main PC = PC +1; fetch; go to (MBR) Iload1 H=LV Iload2 MAR=MBRU+H; rd Iload3 MAR=SP=SP+1 Iload4 PC = PC +; fetch; wr Iload5 TOS = MDR; go to main Iload1 MAR = LV + MBR1U;rd Iload2 MAR=SP=SP+1 Iload3 TOS=MDR;wr;goto(MBR1) as in Fig. 4-30 pp282-283 ILOAD(3) IADD(3) ISTORE(5) 23microinstructions *0.4nsec = 9.2 nsec 2.5GHz means 1 cycle / (1 / 2.5* G)sec = 0.4nanosec 14 instn*0.4 = 5.6 nanosec 5.6/9.2 = x/100 x = 60.87sec

11 Write microcode for POPTWO Pop1 MAR = SP -1; rd Pop2 Pop3 TOS = MDR; goto Main PopTwo1 SP=SP−1 PopTwo2 MAR=SP=SP−1; rd PopTwo3 PopTwo4 TOS=MDR; gotoMain1

12 loading locals 0- through 4 Special 1 byte opcodes for loading locals 0 to 3 onto the stack instead of ILOAD. How should modify IJVM to make the best use of it. Local 0 is the link pointer, (rarely used) Let LV point first local variables as an offset( -1)

13 ISHR (Arithmetic Shit Right) Use top two values, replacing with one value, Second word is operand to be shifted. It should be shifted between o-31 depending on the value of first Opcode for ISHR is 122 (0x7A) What is the arithmetic operation equivalent to shit right with a count of 2? Write microcode. Extra: due Nov. 29th ? 00000…1101 000000…110 0000000…11 00000000…1 13 3 Floor(fisrst)/2second

14 ISHL Fisrst*2second

It needs to know how many parameters. Why? 15 INVOKRVIRTUAL It needs to know how many parameters. Why? Compute the base address of the new local variable frame by subtracting off the number of parameters from the stack pointer and setting LV to point to OBJREF

16 DLOAD in Mic-2 dload1 MAR = LV + MBR1U; rd dload2 H = MAR + 1 dload3 MAR = SP = SP +1; wr dload4 MAR = H; rd dload5 MAR = SP = SP + 1; wr dlaod6 TOS = MDR; goto (MBR)

17 finite state machine

18 equivalents?

19 finite state machine

20 IFU with a 5 byte shifter register

21 larger shifter for IFU

22 Mic 2 : go to

23 speed with Mic-2

24 Mic-4

25 two level cache

26 3 way cache?

27 pipeline

28 prefetch

29 cycle 6

30 dependency in pipeline

31 Rewrite Mic-1 intepreter

32 write simulator