Comp Arch Overview

  • Upload
    rwezioo

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

  • 8/4/2019 Comp Arch Overview

    1/17

    Why Study Computer Architecture?

    The computer lies at the heart of computing. Without it most of the computing

    disciplines today would be a branch of theoretical mathematics. To be aprofessional in anyfield of computing today, one should not regard thecomputer as a just a black box that executes programs by magic. All studentsof computing should acquire some understanding and appreciation of acomputer systems functional components, their characteristics, theirperformance, and their interactions. Students need to understand computerarchitecture in order to structure a program so that it runs more efficiently on areal machine. In selecting a system to use, they should be able to understandthe tradeoffs among various components, such as CPU clock speed versusmemory size.

  • 8/4/2019 Comp Arch Overview

    2/17

    Computer System Components

    In most generalizations of computers, there are

    essentially fiveclassic components that are designed: Input Systems (e.g. keyboard, mouse)

    Output Systems (e.g. Monitor display, printer)

    Memory (contains stored programs and memory)

    Control (component that controls memory, I/O, datapath) Datapath (component that performs arithmetic operations)

  • 8/4/2019 Comp Arch Overview

    3/17

    Computer System Components

    Some Terminology & General Definitions:

    Because of the binary nature of computers, we typically use

    powers of 2 to represent large and small numbers. However,normal usage requires powers of 10 expressions. Forexample, we often use powers of 2 for describing memorycapacities and powers of 10 for clock frequencies.

  • 8/4/2019 Comp Arch Overview

    4/17

    Computer System Components

    Abyterefers to 8 bits. Anibbleis half a byte or 4 bits.

    Awordis a group of bits that is processedsimultaneously. Typical words sizes are 8, 16, and 32.

    Bits in a word can be numbered from left to right (littleendian) or from right to left (big endian).

    The leftmostbit is called the Most Significant Bit (MSB).

    The rightmostbit is called the Least Significant Bit(LSB).

    Other terms UNITS: seconds (s), bits (b), bytes (B),words (w). For example, Gb/s; ns; MB; Mb

    Reciprocal seconds are called Hertz (Hz), so a clockperiod of 100ns corresponds to a clock rate of 10 MHz.

  • 8/4/2019 Comp Arch Overview

    5/17

    Bits are used to represent both instructions anddata.

    Initially only binary numbers are used to design andprogram computers, however this became tedious.Hence, the development ofassembly languageandhigh-level programming languages.

    The notion of low-level and high-level programming is acommon approach to hardware and software systemdesign.

    A system that consists of hierarchical layers with eachlower layer hiding the details from the layer above it isknown as abstraction.

    Computer System Components

  • 8/4/2019 Comp Arch Overview

    6/17

    Levels or layers of Abstractioncan be though of as thehighest user level to the lowest level (transistor level).

    Separabilityis the key to effective computer abstraction.For example, if you run Microsoft Word or some other

    word processing program, you dont need to knowanything about the inner-workings of its programming.

    Exploiting separability supports the development ofupwardly-compatiblemachines (allows a user to upgrade

    to a faster, more capable machine without rewriting thesoftware the runs on the less capable machine)

    Computer System Components

  • 8/4/2019 Comp Arch Overview

    7/17

    User Level

    Applications Programs

    High-level Languages

    Assembly Language/Machine Code

    Mircoprogrammed/Hardwired Control

    Functional Units (memory, ALU, etc.)

    Logic Gates

    Transistors and Wires

    Highest Level

    Lowest Level

    Computer System Components

  • 8/4/2019 Comp Arch Overview

    8/17

    Computer System Components

    To understand and appreciate computer systems, we

    must study the computer from several different aspects:

    USER Perspective+ User Level and Applications; High-level Languages

    Machine Language ProgrammersPerspective+Assembly Language/Machine Coding

    Computer Architects Perspective

    + Hardwired Control and Functional Units; Performance

    Computer Logic Designers Perspective+ Logic Gates, Transistors and Wires

  • 8/4/2019 Comp Arch Overview

    9/17

    Computer System Components

    Lets continue our discussion of the computer from a

    USERS PERSEPECTIVE:

    The useris the person who is using the computer to perform

    useful work.

    - The useris not concerned about the internal structure of themachine. Only that it is capable of performing applications suchword processing, spreadsheets, programming, etc.

    - The useris interested in the operating system and the applicationsoftware.

    - This perspective is only aware of:- Computer Speed(how fast will the computer run my programs)

    - Storage Capacity(how much data can I store in computer)

    - Behavior of peripheral devices(can I send data to a printer, etc.)

  • 8/4/2019 Comp Arch Overview

    10/17

    Computer System Components

    Consider the MACHINE LANGUAGE PROGRAMMERS

    PERSEPECTIVE:

    The machine language programmer is concerned with the

    behavior and performance of the computer system when it isprogrammed at the lowest level (machine language).

    - To fully understand this perspective, we must definesome terms:

    - Machine Language:The collection of all the fundamentalinstructions that the machine can execute, expressed as a patternof 1s and 0s.

    - Assembly Language:The alphanumeric equivalent of the machinelanguage. Alphanumeric mnemonics are used as an aid to theprogrammer, instead of 1s and 0s.

    - Assembler: A computer program that converts assembly languageto machine language.

  • 8/4/2019 Comp Arch Overview

    11/17

    Computer System Components

    Lets examine some assembly language instructions:

    The first instruction adds the contents of 32-bit register $s2 to the contentsof register $s3 and places the sum in register $t0. Aregister is a storageunit capable of holding a collection of bits. Registers $s2, $s3, and $t0 areknown as operands.

    The corresponding machine language is shown. The first field is known as

    the operational code (a.k.a opcode). The opcode specifies the particularoperation to be performed.

    We will learn more about assembly language programming and codinglater when we discuss instruction set architectures.

    Assembly languages and machine codes are specific to the architecture

    that is being used.

    MIPS AssemblyLanguage

    Machine Language

    ADD $t0, $s2, $s3 000000 10010 10011 01000 00000 100000

    LW $s1, 100($s2) 100011 10010 10001 00000 00001 100100

  • 8/4/2019 Comp Arch Overview

    12/17

    Computer System Components

    The collection of all the operations in a machines

    language is its instruction set.

    A programmer is concerned with the machine andassembly language instruction set, as well as themachine resources that can be managed with thoseinstructions.

    The collection of instructions and resources is known asthe Instruction Set Architecture(ISA) of a computer,

    which includes: Instruction Set

    Machines memory

    All programmer-accessible registers in the CPU

  • 8/4/2019 Comp Arch Overview

    13/17

    Computer System Components

    The tools of the tradefor the machine language

    programmers perspective are the following:

    1. ASSEMBLER translates assembly language statements totheir binary equivalent.

    2. LINKER links separately assembled modules into a singlemodule suitable for loading and execution. Essentially,translating high-level languages (e.g. C++, FORTRAN) intoprograms capable of execution.

    3. DEBUGGER Low-level programs that perform error-checkingof assembly language programs allowing programmer toperform step-by-step troubleshooting techniques.

    4. DEVELOPMENT SYSTEMS collection of hardware andsoftware tools that is used to support system development.

  • 8/4/2019 Comp Arch Overview

    14/17

    Computer System Components

    Consider the COMPUTER ARCHITECTS PERSEPECTIVE:

    The computer architect is concerned with the design andperformance of the computer system as a whole.

    - The architectsjob is to design a system that will provideoptimum performance in the context of its users. This is

    essentially known as the constrained optimizationproblem.

    - The constraints may include:- Cost

    - System Size

    - Memory Capacity- Thermal or mechanical durability

    - Availability of components

    - Immunity static charge

    - Time to completion

  • 8/4/2019 Comp Arch Overview

    15/17

    Computer System Components

    From given constraints, performance specifications are defined such

    as processing speed, memory size, networkability, graphicsresolution, etc.

    Architects use performance measurement tools to determinewhether systems meet to specs identified. Usually these includebenchmarks, simulations, etc. These are the tools of the tradefor

    architects. Key Concepts:

    The architect is responsible for the overall system design andperformance.

    Performance must be measured against quantifiable specifications.

    The architect is likely to become involved in low-level details of ofthe computer design.

    The architect often uses formal description languages (e.g. RTL) toconvey details of the design to other parts of the design team.

    The architect strives for harmony and balance in system design.

  • 8/4/2019 Comp Arch Overview

    16/17

    Computer System Components

    Consider the COMPUTER LOGIC DESIGNERS

    PERSEPECTIVE:

    The computer logic designer is concerned about the machine

    at the logic gate level. Usually the computer architect takesthe role of the logic designer because their functions overlap.

    - The logic designer deals with the implementationdomain, which is a collection of hardware devices thatmake up a machine.

    - The logic gate implementation domain may be- VLSI on silicon

    - Transistor-transistor logic (TTL) chips

    - Emitter-coupled logic (ECL)

    - Programmable logic arrays (PLAs)

    - Optical switches, etc.

  • 8/4/2019 Comp Arch Overview

    17/17

    Computer System Components

    The implementation domain is important because of the

    translation of the abstract level of logic gates to theconcrete or practical domain.

    How can we most efficiently implement the logic gatedesign needed for the system using the hardware

    available?

    For example, if a designer is implementing a systemusing VLSI on silicon, the number and size of theprocessors registers may be affected by the amount ofsilicon is available on the chip.

    Tools of the trade for the designer include CAD toolsand IC designtools.