Architecture Advanced S3

Embed Size (px)

Citation preview

  • 7/27/2019 Architecture Advanced S3

    1/26

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 000

    Advanced Computer Architecture S1

    Anant Gopal Joshi

    Session 3

    July 2012

  • 7/27/2019 Architecture Advanced S3

    2/26

    Problem 1.6

    Program Computer A Computer B Computer C

    Program 1 1000 100 50

    Program 2 1 10 50

    Program 3 2 1 20

    Program 4 10 1.25 10

    Average 253.25 28.0625 32.5

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 001

    MIPS = (Number of Instructions / Time of Execution) / 1000000

    For Program 1, Computer A MIPS = (1000000000 / 1 ) / 1000000

    = 1000

    For a Instruction mix of Program 1 Computer A performs best Average MIPS ranking is Computer A , Computer C and Computer B

    Computer C gives a uniform performance, Computer B comes next

    Computer A is some special purpose machine

  • 7/27/2019 Architecture Advanced S3

    3/26

    Problem 1.7

    SIMD is a vector processor while MIMD is multiprocessor organization

    SIMD executes one program MIMD executes multiple programs

    UMA All the processors have Uniform memory to the memory in the system - all memory is global

    NUMA the processors have a local memory that is also part of shared global memory

    COMA is NUMA with all the memory as a cache memory

    NORMA is a multicomputer system. The processors do not have a global memory

    Feature Multiprocessor Multicomputer

    Structure Close coupledShare Bus and Clock Loosely coupledSeparate systems

    Resource sharing Share all the resources

    physically

    Share the resources

    logically

    Inter Process Com Shared memory Message passing

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 002

  • 7/27/2019 Architecture Advanced S3

    4/26

    Problem 2.3

    Part A and B

    See Table 2.1 on page 76

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 003

  • 7/27/2019 Architecture Advanced S3

    5/26

    Problem 2.3

    Graph and string reduction

    Consider the expression E = (A + B) + (C + D)

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 004

    = +

    E + +

    A B C D

    Write the string as

    = (E, + ( + (A, B), + (C, D)))

  • 7/27/2019 Architecture Advanced S3

    6/26

    Problem 2.4

    S1 S2 S3 S4

    A = B + D C = A * 3 A = A + C E = A/2

    Statement Inputs Outputs

    S1 B, D A

    S2 A, 3 C

    S3 A, C A

    S4 A, 2 E

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 005

  • 7/27/2019 Architecture Advanced S3

    7/26

    Problem 2.4

    S1 S2 S4 S3

    X = Sin (Y) Z = X + W X = Cos (Z) Y = -2.5 * W

    Statement Inputs Outputs

    S1 Y X

    S2 X, W Z

    S3 W, 2.5 Y

    S4 Z X

    S1 S2 || S3 S4

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 006

  • 7/27/2019 Architecture Advanced S3

    8/26

    Problem 2.4

    For I = 1

    A2 = B0 + C1 B1 = A1 * K C1 = B1 - 1

    For I = 2

    A3 = B1 + C2 B2 = A2 * K C2 = B2 - 1

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 007

  • 7/27/2019 Architecture Advanced S3

    9/26

    Problem 3.4

    Speedup Sn = (W1 + Wn) / (W1 + Wn / N)

    = Work done by one machine / Work done by all

    = ( + (1 - )*K) / ( + (1 - ))

    = K - C*(K-1)

    For = 0 Sn = K

    For = 1 Sn = 1

    For calculating the mean = I do not know

    Average will be the integral of the speedup equation from a to b divided

    by the range (b-a)

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 008

  • 7/27/2019 Architecture Advanced S3

    10/26

    Problem 3.13

    Problem for me. The concepts Ra, Rh, R1, R2

    etc. are not known to me at this moment.

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 009

  • 7/27/2019 Architecture Advanced S3

    11/26

    Instruction pipeline

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 010

    Fetch Decode Execute Write

    0 1 2 3 4 5 6 7

  • 7/27/2019 Architecture Advanced S3

    12/26

    Instruction pipeline

    Instruction pipeline cycle

    Instruction issue latency

    Instruction issue rate

    Instruction execution time

    Base scalar machine

    IIL = 1, IIR = 1, IET = 1

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 011

  • 7/27/2019 Architecture Advanced S3

    13/26

    Instruction pipeline

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 012

    Fetch Decode Execute Write

    0 1 2 3 4 5 6 7 8

    Resource conflicts will prevent issuing of instructions reducing pipeline

    effect

  • 7/27/2019 Architecture Advanced S3

    14/26

    Instruction pipeline

    Address PC

    Data IR

    ALU

    Control Unit PSW

    Register file

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 013

  • 7/27/2019 Architecture Advanced S3

    15/26

    Instructionssome definitions

    Instruction codes

    Memory references

    Address modes

    GPR General Purpose Registers HLL High Level Language

    HLL Features in Instructions

    Interrupts

    ISR Interrupt Service Routine

    Stack Pointer SP, Base Register BR

    JSR Jump to Sub Routine

    RTS Return from Subroutine

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 014

  • 7/27/2019 Architecture Advanced S3

    16/26

    Instructions

    CISC Complex Instruction Set Computer

    RISC Reduced Instruction Set Computer

    Complex instructions take chip space andmay be used occasionally

    Complex tasks done by series of simple

    instructions

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 015

  • 7/27/2019 Architecture Advanced S3

    17/26

    Instructions

    Simplify processor design

    Simplify compiler design

    Fixed instruction format

    Simple addressing modes

    Larger register sets

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 016

  • 7/27/2019 Architecture Advanced S3

    18/26

    Instructions

    Hardwired

    Microprogrammed

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 017

  • 7/27/2019 Architecture Advanced S3

    19/26

    CISC

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 018

    Control Unit Instruction and Data Path

    Micro programmed

    Control Memory

    Cache

    Main Memory

  • 7/27/2019 Architecture Advanced S3

    20/26

    RISC

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 019

    Hardware Control Unit Data Path

    Instruction Cache Data Cache

    Main Memory

  • 7/27/2019 Architecture Advanced S3

    21/26

    RISC Vs CISC

    CISC Architecture RISC Architecture

    Large set of instructions

    variable formats

    Small set of instructions

    fixed format

    Many Addressing Modes Limited Addressing Modes

    Less number of GPRs Large number of GPRs

    Larger and variableCycles Per Instruction Smaller and uniformCycles Per Instruction

    Micro coded Instruction Set Hardware Instruction set

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 020

  • 7/27/2019 Architecture Advanced S3

    22/26

    VAX 8600 Architecture

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 021

    Main Memory

    8 MB

    I/O Subsystem

    Memory and

    I/O Control

    TLB

    Cache

    16KB

    Instruction

    Unit

    16 GPRs

    Control

    Memory

    Floating

    Point Unit

    Execution

    Unit ALU

    ConsoleConsole Bus

    Virtual Address Bus

    GPR General Purpose Registers

    TLB Translation Look aside Buffer

  • 7/27/2019 Architecture Advanced S3

    23/26

    MC68040 Microprocessor

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 022

    BusController

    Address bus

    32 bits

    Data bus

    32 bits

    Bus control

    signals

    ATC Cache

    MMU Controller

    Instruction Memory Unit

    MMU Controller

    ATC Cache

    Data Memory Unit

    Floating

    Point Unit

    Instruction

    Fetch

    Integer Unit

    Write back

    Execute

    EA

    Calculation

    Decode

    EA Fetch

    Execute

    Write back

    Convert

    Data Bus

    Instruction Bus

  • 7/27/2019 Architecture Advanced S3

    24/26

    RISC advantages

    Simple instructions

    Faster Instruction issue rate better pipeline effect

    Uses lesser resources

    Uses register files One memory operation at a time (Load or Store instructions)

    Lesser and simpler addressing modes

    Lesser chip density and area

    Better Cycles Per Instruction

    Simple instruction set helps optimizing compilers

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 023

  • 7/27/2019 Architecture Advanced S3

    25/26

    RISC disadvantages

    Larger program size

    Complex operations are performed by use of software functions

    Good compiler support and standard function library required

    Compiler must be a good optimizing compiler

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 024

  • 7/27/2019 Architecture Advanced S3

    26/26

    RISC compiler specialities

    Concept of cooperating procedures

    Concept of context frames

    Stacking of context and nesting of frames

    Sharing of registers in cooperating procedures In, Out, and Local registers of procedures and their sharing

    Concept of context switching and stack operations

    Advanced Computer Architecture July 2012 Anant Gopal Joshi 025