The Instruction Set Architecture
Document Sample


The Instruction Set Architecture
Hardware – Software boundary
Java Program C Program Ada Program
Compiler Compiler Compiler
Instruction Set Architecture
Microcode
Hardware
Data types
The ISA defines the data types native to a
particular machine. Some examples of numeric
data types that may or may not be present on the
machine:
– Signed integer
– Unsigned integer
– Floating point
– Binary Coded Decimal (BCD) integers
– Packed numeric representations
Java does not support unsigned, BCD, or packed
integer representations.
Instruction Format
The ISA defines the instruction format(s) for the
machine
– Fixed or variable length instructions
– 0, 1, 2, or 3 operand instructions
– Addressing modes
The Java Virtual Machine
– 9 instruction formats
– Variable length
– Little in the way of addressing modes; immediate,
indexed
Examples
See handout of IBM System 360 ISA
– 5 instruction formats
– A long list of instructions
– Condition codes
This is a CISC (Complex Instruction Set
Computer) Architecture
Addressing modes
Why more than one type?
– Short is good, but not sufficient for all purposes
– Immediate address – the data is in the same memory
word as the instruction
– Register – the data is in one of the registers, memory
locations on the processor chip itself
– Absolute – specify the exact memory location in use
– Indexed – Data is specified by a base and displacement
– Indirect – address specified contains an address, rather
than data
ISA and Microarchitecture
So, you have this wonderful idea for improving
performance of your processor
– Will all the existing software still run?
– Will the same operating system work?
The microarchitecture separates the actual
hardware from the ISA.
– Do the hardware improvements.
– Modify the microcode to match the existing ISA to the
new hardware. All existing applications continue to
run. New applications can take advantage of new
features.
Language Levels
Higher level images of the computer:
Spreadsheets, Word processors, databases –
closer to the problem
C, Java, etc.: designed for representing
a problem solution; independent of the machine
ISA: instruction set, addressing modes of
a specific line of computers
Microarchitecture: bit settings that
activate specific data flows
Hardware: understands voltages
Access to the hardware
Programs that can manipulate the hardware
can be dangerous.
Hardware is protected by providing several
classes of access rights.
Operating system has complete access
User programs are limited.
Users can access the hardware by invoking
operating system functions.
Why many high level languages?
Notice the position of the high level
languages in our chart
– They exist to make it easier to express the
problem
– Different application areas have different needs
in terms of expressing problems.
Ex. APL – single instruction to multiply two
matrices
Compiler
A compiler is a program
Its input is the text of a program in a
particular language, say c
The compiler translates the c code into the
instruction set understood by the computer
The translation is not a line by line
transliteration. Optimization.
Instructions and Data
Two distinct kinds of things
– The machine understands a finite subset of
possible bit patterns as instructions.
– Data can take any bit pattern.
Usually stored separately. Data accessed
when an instruction calls for it.
Black boxes
To reduce complexity, we sometimes show
only the input and output of an operation
without the details of how it gets done. We
call it a black box, because the content of
the box is hidden.
a, b Turing machine that adds a+b
We can combine the boxes and use them any way we want.
Turing Machines
Mathematical model of a machine
Turing was interested in understanding what could
be computed and what could not be computed.
The general purpose computers of today are
implementations of the Turing model
That’s why all computers can do the same things,
given enough time and memory – because they are
all Turing machines.
Get documents about "