UNIT-2 Embedded Processors: ISA Architecture Models
UNIT-2 Embedded Processors: ISA Architecture Models
Embedded Processors
• Processors are the main functional units of an
embedded board, and are primarily responsible for
processing instructions and data.
• An electronic device contains at least one master
processor, acting as the central controlling device, and
can have additional slave processors that work with and
are controlled by the master processor.
• These slave processors may either extend the
instruction set of the master processor or act to manage
memory, buses, and I/O (input/output) devices.
• There are literally hundreds of embedded processors
available
• embedded processors can be separated into various
“groups” called architectures
• What differentiates one processor group’s architecture
from another is the set of machine code instructions
that the processors within the architecture group can
execute.
• Processors are considered to be of the same
architecture when they can execute the same set of
machine code instructions
ISA Architecture Models
• An instruction set architecture (ISA) is an abstract
model of a computer. It is also referred to
as architecture or computer architecture.
• A realization of an ISA is called an implementation. An
ISA permits multiple implementations that may vary
in performance, physical size, and monetary cost
(among other things); because the ISA serves as the
interface between software and hardware.
• Software that has been written for an ISA can run on
different implementations of the same ISA.
• The ISA defines such features as the operations that can
be used by programmers to create programs for that
architecture, the operands (data) that are accepted and
processed by an architecture, storage, addressing
modes used to gain access to and process operands, and
the handling of interrupts.
• ISA implementation is a determining factor in defining
important characteristics of an embedded design, such
as performance, design time, available functionality, and
cost.
• An ISA defines everything a machine
language programmer needs to know in order to
program a computer
Operations
• Operations are made up of one or more instructions
that execute certain commands
Types of Operations
Operations are the functions that can be performed on the
data, and they typically include
• computations (math operations)
• movement (moving data from one memory
location/register to another)
• branches conditional/unconditional moves to another
area of code to process)
• input/output operations (data transmitted between I/O
components and master processor)
• context switching operations (where location register
information is temporarily stored when switching to
some routine to be executed and after execution, by the
recovery of the
temporarily stored information, there is a switch back to
executing the original instruction
stream).
Sample ISA operations:
Operation Formats
• The format of an operation is the actual number and
combination of bits (1’s and 0’s) that represent the
operation, and is commonly referred to as the operation
code or opcode.
Operands
• Operands are the data that operations manipulate. An
ISA defines the types and formats of operands for a
particular architecture.
• For example, in the case of the MPC823
(Motorola/Freescale PowerPC), SA-1110 (Intel
StrongARM), and many other architectures, the ISA
defines simple operand types of bytes (8 bits), halfwords
(16 bits), and words (32 bits).
• An ISA also defines the operand formats (how the data
looks) that a particular architecture can support, such as
binary, decimal and hexadecimal.
Example:
MOV registerX, 10d ; Move decimal value 10 into
register X
MOV registerX, $0Ah ; Move hexadecimal value A
(decimal 10) to register X
MOV registerX, 00001010b ; Move binary value
00001010 (decimal 10 ) to register X
Storage:
• The ISA specifies the features of the programmable
storage used to store the data being operated on,
primarily:
1. The organization of memory used to store operands.
Memory is simply an array of programmable storage,
that stores data, including operations, operands, and so
on.
• The indices of this array are locations referred to as
memory addresses, where each location is a unit of
memory that can be addressed separately.
• The actual physical or virtual range of addresses
available to a processor is referred to as the address
space.
• An ISA defines specific characteristics of the address
space, such as whether it is:
• Linear. A linear address space is one in which specific
memory locations are represented incrementally,
typically starting at “0”.
Segmented
• A segmented address space is a portion of memory that
is divided into sections called segments.
• Specific memory locations can only be accessed by
specifying a segment identifier, a segment number that
can be explicitly defined or implicitly obtained from a
register, and specifying the offset within a specific
segment within the segmented address space.
• The offset within the segment contains a base address
and a limit, which map to another portion of memory
that is set up as a linear address space. If the offset is
less than or equal to the limit, the offset is added to the
base address, giving the unsegmented address within
the linear address space.
• An important note regarding ISAs and memory is that
different ISAs not only define where data is stored, but
also how data is stored in memory—specifically in what
order the bits (or bytes) that make up the data is stored,
or byte ordering.
• The two byte-ordering approaches are big-endian, in
which the most significant byte or bit is stored first, and
little-endian, in which the least significant bit or byte is
stored first.
Example:
• 68000 and SPARC are big-endian
• x86 is little-endian
2. Register Set
• A register is simply fast programmable memory
normally used to store operands that are immediately or
frequently used.
• A processor’s set of registers is commonly referred to as
the register set or the register file.
• Different processors have different register sets, and the
number of registers in their sets vary between very few
to several hundred (even over a thousand).
3. How Registers Are Used:
• An ISA defines which registers can be used for what
transactions, such as special purpose, floating point, and
which can be used by the programmer in a general
fashion (general purpose registers).
• Addressing Modes
Addressing modes define how the processor can
access operand storage. In fact, the
usage of registers is partly determined by the ISA’s
Memory Addressing Modes.
The two most common types of addressing mode
models are:
• Load-Store Architecture, which only allows operations
to process data in registers, not anywhere else in
memory. For example, the PowerPC architecture has
only one addressing mode for load and store
instructions: register plus displacement (supporting
register indirect with immediate index, register indirect
with index, etc.).
• Register-Memory Architecture, which allows operations
to be processed both within registers and other types of
memory. Intel’s i960 Jx processor is an example of an
addressing mode architecture that is based upon the
register-memory model (supporting absolute, register
indirect, etc.).
Interrupts and Exception Handling:
• Interrupts (also referred to as exceptions or traps
depending on the type) are mechanisms that stop the
standard flow of the program in order to execute
another set of code in response to some event, such as
problems with the hardware, resets, and so forth.
• The ISA defines what if any type of hardware support a
processor has for interrupts.
There are several different ISA models that architectures.
1. Application-Specific ISA Models
• Controller Model
• Datapath Model
• Finite State Machine with Datapath (FSMD) Model
• Java Virtual Machine (JVM) Model
2. General-Purpose ISA models
• Complex Instruction Set Computing (CISC) Model
Reduced Instruction Set Computing (RISC) Model
3. Instruction-Level Parallelism ISA Models
• Single Instruction Multiple Data (SIMD) Model
• Superscalar Machine Model
• Very Long Instruction Word Computing (VLIW) Model
Internal Processor Design:
Internal processor components consists of
• CPU
• Memory
• Input components
• Output components
• Buses
These internal components are the basis of the von
Neumann model
Fig a.
Fig b.
Fig c.
Processor Buses:
• Like the CPU buses, the processor’s buses interconnect
the processor’s major internal components (in this case
the CPU, memory and I/O as shown in Figure 4-70)
together, carrying signals between the different
components
• In the case of the MPC860, the processor buses include
the U-bus interconnecting the system interface unit(SIU),
the communications processor module (CPM), and the
PowerPC core. Within the CPM, there is a peripheral bus,
as well. Of course, this includes the buses within the
CPU.
Processor Performance
• There are several measures of processor performance,
but are all based upon the processor’s behavior over a
given length of time. One of the most common
definitions of processor performance is a processor’s
throughput, the amount of work the CPU completes in a
given period of time.
• CPU throughput (in bytes/sec or MB/sec) = 1 / CPU
execution time = CPU performance
• CPU execution time in seconds per program = (total
number of instructions per program or instruction count)
* (CPI in number of cycle cycles/instruction) * (clock
period in seconds per cycle) = ((instruction count) * (CPI
in number of cycle cycles/instruction)) / (clock rate in
MHz)
• CPI (average number of clock cycles per instruction) can
be determined CPI =∑ (CPI per instruction * instruction
frequency)
Other definitions of performance besides throughput
include:
• A processor’s responsiveness, or latency, which is the
length of elapsed time a processor takes to respond to
some event.
• A processor’s availability,which is the amount of time
the processor runs normally without failure; reliability,
the average time between failures or MTBF (mean time
between failures); and recoverability, the average time
the CPU takes to recover from failure or MTTR (mean
time to recover).
• One of the most common performance measures used
for processors in the embedded market is millions of
instructions per seconds or MIPS.
• MIPS = Instruction Count / (CPU execution time * 106) =
Clock Rate / (CPI * 106)
• The MIPS performance measure gives the impression
that faster processors have higher MIPS values, since
part of the MIPS formula is inversely proportional to the
CPU’s execution time.
• MIPS = Instruction Count / (CPU execution time * 106)
= Clock Rate / (CPI * 106)
Board Memory:
**Note: Types of on-chip memory that can be
integrated into a processor were introduced in page
No.9.
Board memory, which is memory connected directly to
or integrated in the processor such as ROM, RAM, and
level-1 cache.
It is memory that is typically located outside of the
processor, or that can both be either integrated into the
processor or located outside the processor..
This includes other types of primary memory, such as
ROM, level-2+ cache, and main memory, and
secondary/tertiary memory, which is memory that is
connected to the board but not the master processor
directly, such as CD-ROM, floppy drives, hard drives, and
tape.
• Primary memory is typically a part of a memory
subsystem shown in below Figure made up of three
components:
• The memory IC
• An address bus
• A data bus
A memory IC is made up of three units: the memory
array, the address decoder, and the data interface.
The memory array is actually the physical memory that
stores the data bits. While the master processor, and
programmers, treat memory as a one-dimensional
array,where each cell of the array is a row of bytes and
the number of bits per row can vary, in reality physical
memory is a two-dimensional array made up of memory
cells addressed by aunique row and column, in which
each cell can store 1 bit .
The locations of each of the cells within the two-
dimensional memory array are commonly referred to as
the physical memory addresses, made up of the column
and row parameters.
Memory Management of External Memory
There are several different types of memory that can be
integrated into a system, and there are also differences in how
software running on the CPU views logical/virtual memory
addresses and the actual physical memory addresses—the
two-dimensional array or row and column. Memory
managers are ICs designed to manage these issues.