Você está na página 1de 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 a professional in any field of computing today, one should not regard the computer as a just a black box that executes programs by magic. All students of computing should acquire some understanding and appreciation of a computer systems functional components, their characteristics, their performance, and their interactions. Students need to understand computer architecture in order to structure a program so that it runs more efficiently on a real machine. In selecting a system to use, they should be able to understand the tradeoffs among various components, such as CPU clock speed versus memory size.

Computer System Components


In most generalizations of computers, there are essentially five classic 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)

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. For example, we often use powers of 2 for describing memory capacities and powers of 10 for clock frequencies.

Computer System Components


A byte refers to 8 bits. A nibble is half a byte or 4 bits. A word is a group of bits that is processed simultaneously. Typical words sizes are 8, 16, and 32. Bits in a word can be numbered from left to right (little endian) or from right to left (big endian). The leftmost bit is called the Most Significant Bit (MSB). The rightmost bit 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 clock period of 100ns corresponds to a clock rate of 10 MHz.

Computer System Components


Bits are used to represent both instructions and data. Initially only binary numbers are used to design and program computers, however this became tedious. Hence, the development of assembly language and

high-level programming languages.

The notion of low-level and high-level programming is a common approach to hardware and software system design.
A system that consists of hierarchical layers with each lower layer hiding the details from the layer above it is known as abstraction.

Computer System Components


Levels or layers of Abstraction can be though of as the highest user level to the lowest level (transistor level). Separability is the key to effective computer abstraction. For example, if you run Microsoft Word or some other word processing program, you dont need to know anything about the inner-workings of its programming. Exploiting separability supports the development of upwardly-compatible machines (allows a user to upgrade

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

Computer System Components


Highest Level

User Level Applications Programs

High-level Languages
Assembly Language/Machine Code

Mircoprogrammed/Hardwired Control
Functional Units (memory, ALU, etc.)

Logic Gates
Lowest Level

Transistors and Wires

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 Programmers

Perspective

+ Assembly Language/Machine Coding

Computer Architects Perspective


+ Hardwired Control and Functional Units; Performance

Computer Logic Designers Perspective


+ Logic Gates, Transistors and Wires

Computer System Components


Lets continue our discussion of the computer from a USERS PERSEPECTIVE:
The user is the person who is using the computer to perform useful work.
- The user is not concerned about the internal structure of the machine. Only that it is capable of performing applications such word processing, spreadsheets, programming, etc. - The user is interested in the operating system and the application software. - 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.)

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 is programmed at the lowest level (machine language).

- To fully understand this perspective, we must define some terms:


- Machine Language: The collection of all the fundamental instructions that the machine can execute, expressed as a pattern of 1s and 0s. - Assembly Language: The alphanumeric equivalent of the machine language. Alphanumeric mnemonics are used as an aid to the programmer, instead of 1s and 0s. - Assembler: A computer program that converts assembly language to machine language.

Computer System Components


Lets examine some assembly language instructions:
MIPS Assembly Language ADD LW $t0, $s2, $s3 $s1, 100($s2) Machine Language 000000 10010 10011 01000 00000 100000 100011 10010 10001 00000 00001 100100

The first instruction adds the contents of 32-bit register $s2 to the contents of register $s3 and places the sum in register $t0. A register is a storage unit capable of holding a collection of bits. Registers $s2, $s3, and $t0 are known 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 particular operation to be performed. We will learn more about assembly language programming and coding later when we discuss instruction set architectures. Assembly languages and machine codes are specific to the architecture that is being used.

Computer System Components


The collection of all the operations in a machines language is its instruction set.

A programmer is concerned with the machine and assembly language instruction set, as well as the machine resources that can be managed with those instructions.
The collection of instructions and resources is known as the Instruction Set Architecture (ISA) of a computer, which includes:
Instruction Set Machines memory All programmer-accessible registers in the CPU

Computer System Components


The tools of the trade for the machine language programmers perspective are the following:
1. ASSEMBLER translates assembly language statements to their binary equivalent. 2. LINKER links separately assembled modules into a single module suitable for loading and execution. Essentially, translating high-level languages (e.g. C++, FORTRAN) into programs capable of execution. 3. DEBUGGER Low-level programs that perform error-checking of assembly language programs allowing programmer to perform step-by-step troubleshooting techniques. 4. DEVELOPMENT SYSTEMS collection of hardware and software tools that is used to support system development.

Computer System Components


Consider the COMPUTER ARCHITECTS PERSEPECTIVE:
The computer architect is concerned with the design and performance of the computer system as a whole.

- The architects job is to design a system that will provide optimum performance in the context of its users. This is essentially known as the constrained optimization problem. - The constraints may include:
Cost System Size Memory Capacity Thermal or mechanical durability Availability of components Immunity static charge Time to completion

Computer System Components


From given constraints, performance specifications are defined such as processing speed, memory size, networkability, graphics

resolution, etc.

Architects use performance measurement tools to determine whether systems meet to specs identified. Usually these include benchmarks, simulations, etc. These are the tools of the trade for architects. Key Concepts:
The architect is responsible for the overall system design and performance. Performance must be measured against quantifiable specifications. The architect is likely to become involved in low-level details of of the computer design. The architect often uses formal description languages (e.g. RTL) to convey details of the design to other parts of the design team. The architect strives for harmony and balance in system design.

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 takes the role of the logic designer because their functions overlap.

- The logic designer deals with the implementation domain, which is a collection of hardware devices that make 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.

Computer System Components


The implementation domain is important because of the translation of the abstract level of logic gates to the concrete or practical domain. How can we most efficiently implement the logic gate design needed for the system using the hardware available? For example, if a designer is implementing a system using VLSI on silicon, the number and size of the processors registers may be affected by the amount of silicon is available on the chip. Tools of the trade for the designer include CAD tools and IC design tools.

Você também pode gostar