You are on page 1of 34

Captulo 1

Introduo
Orlando Loques
setembro 2006

Referncia:
Captulo 1, Structured Computer Organization, A.S. Tanenbaum,
(c) 2006 Pearson Education Inc

Linguagens, Nveis, Mquinas Virtuais (i)

Mquina multi-nvel

Linguagens, Nveis, Mquinas Virtuais (ii)




Computadores executam instrues

Programa: sequncia de instrues descrevendo como executar uma tarefa

Em geral, as instrues no so mais complicadas que:

Somar dois nmeros


Verificar se o nmero zero
Copia um dado de um lugar na memria para outro

O conjunto (bsico) de instrues define uma linguagem de mquina

Podemos dizer que um computador constitudo de vrios nveis: cada nvel


representa uma mquina virtual

Uma mquina define uma linguagem: ou seja, o conjunto de instrues que a


mquina pode executar

Nos nveis baixos, a linguagem no deve ser complicada, seno a mquina ser
muito complexa para ser construda, considerando a tecnologia atual

O projetista tem que decidir que instrues incluir na mquina

Linguagens, Nveis, Mquinas Virtuais (ii)




Pessoas querem fazer X, mas computadores fazem somente Y (utilizando L0)

Soluo: projetar um conjunto de instrues (linguagem L1) mais adequado para o


suporte de X; duas possiblidades:

Traduo (compilao): substituir cada instruo de L1 por uma sequncia


equivalente em L0

Interpretao: escrever um programa (interpretador) em L0, que pegue as instrues


em L1 e as execute atravs de sequncias de instrues equivalentes em L0

Na prtica traduo e interpretao podem ser combinadas

O programador de um nvel no se preocupa com os nveis inferiores

Uma mquina para uma linguagem tipo C++ ou COBOL seria muito complicada,
mas poderia ser construda com a tecnologia atual

Custo e flexibilidade

Mquinas Multi-nveis atuais

Computador com seis nveis (existe mais um: componentes das portas lgicas)

ISA Level

The ISA level is the interface between the compilers and the hardware.

Mquinas Multi-nveis atuais




Digital logic level: portas, registros, decodificadores, multiplexadores, etc

Microarchitecture Level: Registros, ULA, vias de dados -> UCP

Microprogramao controle das operaes das unidades da UCP


Controle fixo (hardwired)

Instruction Set Architecture Level (ISA level): linguagem de mquina

Operating System machine level: (hbrido) inclui as instrues do nvel anterior e


suporte para organizao de memria, concorrncia, interrupo

Usado por systems programmers

Assembly Language Level: linguagem simblica (substitui os bits das linguagens


dos nveis inferiores)

assembler: programa tradutor

Problem-oriented Language Level: linguagens de alto nvel

BASIC, C, C++, Java, LISP, Prolog, etc


Traduo / interpretao / mista

Arquitetura de Computadores


Cada nvel representa uma abstrao distinta, com diferentes objetos e


operaes. Isso permite que os detalhes irrelevantes sejam suprimidos,
reduzindo a complexidade e facilitando o entendimento

O conjunto de tipos de dados, operaes e caractersticas de cada nvel


define sua arquitetura, que mostra os detalhes visveis ao usurio
daquele nvel, eg, espao de memria, registros
A tecnologia do chip no faz parte da arquitetura

O estudo de como projetar as partes de um computador visveis para o


programador se chama Arquitetura de Computadores

Architecture & Organization


 Architecture is those attributes visible to the
programmer
Instruction set, number of bits used for data representation,
I/O mechanisms, addressing techniques.
e.g. Is there a multiply instruction?

 Organization is how features are implemented


Control signals, interfaces, memory technology.
e.g. Is there a hardware multiply unit or is it done by
repeated addition?

Evoluo das Mquinas Multi-nveis (i)




Invention of microprogramming 1951/Wilkes




Invention of operating system 1960





reduzir o tempo intil / otimizar o uso dos recursos


batch system / timesharing

Migration of functionality to microcode - 1970






simplificar o hardware / instrues mais poderosas

instrues complexas - CISC


lentido, flexibilidade
Exagero: DEC-VAX com centenas de instrues

Elimination of microprogramming
 reduo de nmero e execuo direta das instrues RISC
 arquiteturas hbridas

Tarefas do Sistema Operacional

A sample job for the FMS (FORTRAN Monitor


System) operating system
automatiza as tarefas feitas pelo operador
cartes especiais usados para instruir o sistema operacional
definiam uma mquina virtual

Evoluo das Mquinas Multi-nveis (ii)





Hardware: circuitos eletrnicos e dispositivos de E/S


Software: algoritmos (instrues detalhadas sobre
como fazer algo) e suas representaes em termos de
computador (programas)

Hardware e Software so logicamente equivalentes

qualquer operao feita por software pode ser feita


diretamente por hardware (depois de ser entendida)
hardware is just petrified software

Software is a gas. It expands to fill the container holding it

Troff ocupa dezenas de kilobytes de memria


Processadores de texto atuais ocupam dezenas de megabytes
de memria

Milestones in Computer Architecture (1)


Pascal: com 19 anos (1642) soma e subtrao
Leibniz: +,-,*,/ (1672)

Some milestones in the development of the modern digital


computer.

Milestones in Computer Architecture (2)

Some milestones in the development of the modern digital


computer.

Computer Generations

Zeroth Generation
Mechanical Computers (1642 1945)

First Generation
Vacuum Tubes (1945 1955)

Second Generation
Transistors (1955 1965)

Third Generation
Integrated Circuits (1965 1980)

Fourth Generation
Very Large Scale Integration (1980 ?)

Von Neumann Machine

The original Von Neumann machine.

Structure of IAS - Von Neumann


Central Processing Unit
Arithmetic and Logic Unit
Accumulator

MQ

Arithmetic & Logic Circuits


MBR

Input
Output
Equipment

Instructions
Main
& Data
Memory
PC

IBR

MAR
IR

Control
Circuits

Program Control Unit

Address

IAS - details
 1000 x 40 bit words
Binary numbers
2 x 20 bit instructions

 Set of registers (storage in CPU)

Memory Buffer Register


Memory Address Register
Instruction Register
Instruction Buffer Register
Program Counter
Accumulator
Multiplier Quotient

Instruction Execution Steps




Fetch next instruction from memory into Instruction Register

Change Program Counter to point to next instruction

Determine type of instruction just fetched





If instructions uses word in memory, determine where

Execute the instruction

Go to step 1 to begin executing following instruction

Fetch word, if needed, into CPU register

PDP-8 Innovation Single Bus

The PDP-8 omnibus

DEC PDP-8






1964
First minicomputer (after miniskirt!)
Did not need air conditioned room
Small enough to sit on a lab bench
$16,000
$100k+ for IBM 360

 Embedded applications & OEM


 BUS STRUCTURE

CPU Chips

The logical pinout of a generic CPU


The arrows indicate input signals and output signals
The short diagonal lines indicate that multiple pins are used
For a specific CPU, a number will be given to tell how many.

Modern Computer Buses: PCI, ISA

IBM 360

The initial offering of the IBM product line.

Technological and Economic Forces

Moores law predicts a 60-percent annual increase in the number of transistors


that can be put on a chip (should hold up to 2020); the data points given in this
figure are memory sizes, in bits
Cria um circulo virtuoso: produtos bons, baratos, novas aplicaes, novos
mercados, novas empresas, mais competio, melhoria na tecnologia

The Computer Spectrum

The current spectrum of computers available. The prices should


be taken with a grain (or better yet, a metric ton) of salt.

Personal Computer
1. Pentium 4 socket
2. 875P Support chip
3. Memory sockets
4. AGP connector
5. Disk interface
6. Gigabit Ethernet
7. Five PCI slots
8. USB 2.0 ports
9. Cooling technology
10. BIOS

A printed circuit board is at the heart of every personal computer. This figure
is a photograph of the Intel D875PBZ board
The photograph is copyrighted by the Intel Corporation, 2003 and is used by
permission

Example Computer Families

Pentium 4 by Intel

UltraSPARC III by Sun Microsystems

The 8051 chip by Intel, used for embedded systems

Intel Computer Family (1)

The Intel CPU family. Clock speeds are measured in MHz


(megahertz) where 1 MHZ is 1 million cycles/sec.

Intel Computer Family (2)

The Pentium 4 chip


The photograph is copyrighted by the Intel Corporation, 2003 and is used by permission

Intel Computer Family (3)

Moores law for (Intel) CPU chips.

MCS-51 Family

members of the MCS-51 family

The 8051 Instruction Formats

The 8051 instruction formats.

Metric Units

The principal metric prefixes.

You might also like