ARM 1v
ARM 1v
ARM 1v
ARM
Difference Between Computer Architecture & Computer
Organization
Driving Force:
Slower secondary memories
Earlier Trend to bridge semantic gap using complex
instructions*.
Characteristics/Peculiarities of CISC:
-- Processor control Unit is using micro code ROM,
-- Instructions take more than one clock cycles.
-- Abundant Memory addressing modes
available.
*Compiler bridges the semantic gap between HLL & low level language.
Reduced Instruction Set Computers( RISC)
Instruction Usage
• Driving Force:
Data Movement 43%
Dynamic Instruction Usage
Control Flow 23%
Pecularities:
-- Hard wired Instruction decode logic
Arithmetic 15%
-- Pipelined execution Operations
-- Single cycle execution comparison 13%
--Load Store architecture
-- Several general Purpose registers & Logical 5%
large cache Operations
-- Delayed jump Other 1%
Advantages of RISC
Drawbacks of RISC
• Poor code density compared to CISC*
• They Don’t execute x86 code.
*ARM have THUMB mode for compact code generation
ARM Introduction
• Version 2: Obsolete
-- MAC instructions for DSP operations
-- Coprocessor support
-- More banked registers for FIQ (Fast Int. Request)
-- Atomic load store instructions added.
• Version 3: Obsolete
-- Extended the design to 32 bit address range architecture
-- CPSR & SPSR are added, leading to add new instructions to access these
registers
ARM Introduction Cont..
• Version 4: In force
-- Half word load store instruction added
-- Instructions to load & sign extend byte & half word added.
-- Thumb concept for optimal code density
-- New privileged access mode which uses user mode registers.
-- Undefined S/W interrupt provision made
• Version 5: In force
-- Improvement in ARM THUMB mode interworking
-- added count leading zero instructions for efficient integer divide
-- Adds S/W break point Instructions
Naming convention
• The string ‘ARM’ is concatenated
• The next letter instruction set version ex. ARM7/ARM9
• The ‘T’ reads for THUMB mode support of that core.
• The ‘M’ letter stands for support for Long Multiply instruction support
-- These can do 32x32 64 muliplication & 32x32+64 64 Multiply
accumulate operations.
• The ‘E’ letter stands for enhanced performance of ARM processors for DSP
algorithms.
-- several new MAC instructions to operate on 16 bit data also add & sub
instructions acting on saturated signed arithmatics. Also support cache
preload instructions
• The letter ‘I’ stands for built in support for embedded on chip ICE-RT logic
for debuggin.
• The ‘D’ stands for on chip Debug channel to interface with target debugger.
• So The ARM7TDMI will read as ARM processor Version 7 having T:
THUMB extension, D: On chip Debugger, ‘M’: Long multiply supported,
‘I’: Built in embedded ICE-RT logic
*processor Core Version is somehing Diff.
Registers
• N Bit: Negative Flag, is set to bit 31 of result, N=1 for negative number & N=0
for positive or zero.
• V Bit: Overflow flag, used in signed add/sub to indicate the overflow. (All
operands & result in twos’ compliment form)
• Q Bit: This flag is used to indicate the overflow or saturation occurred in some
of the DSP related instructions.
Program status register cont..
• M4-M0 Bits: These bits are used to determine the mode in which the
processor operates.
• Other bits are reserved & S/W should not modify these bits, to maintain
future compatibility.
Program status register cont..
Exceptions
• ARM supports Seven types of exceptions.
• Exception vector address can be moved from normal address range
0x00000000 to 0x0000001C & at the bottom of 32 bit address space
0xFFFF0000-0xFFFF001C The H/W config I/P selects normal or High vector
Exception handling
• Actions on SWI
– R14_svc = address of Inst. Next to SWI
– SPSR_svc = CPSR
– CPSR[4:0] = 0b10011; enter in SWI exc. State
– CPSR[5] = 0 enter in ARM state
– CPSR[7] = 1 Disable normal interrupt
– Jump to vectored location
• Exception Priorities
• Undefined instruction &
SWI can no occur at the
same time so they have
the same priority.
• Also the data abort
handle have higher
priority than the FIQ this
ensures that data abort
are resolved before the
FIQ compleates
Memory & Memory mapped I/O
• If certain rules in memory mapped I/O are broken then
– It might make memory system implementation difficult
– Might cause difficulty in porting system
– Standard S/W (compiler/Linker/Assemblers) might not work with rule
breaking system
• Basic Rules
– ARM architecture considers the address space as 2^30 32 bit flat
address space, with Word aligned boundary
– Address Calculations are performed by normally Integer arithmetic, so
that if any overflow or underflow occurs, the address simply wraps
around
– Most branches are relative (addr_of_curr_inst) + 8 + offset so if any
overflow or underflow occurs results are unpredictable.
– Always match the H/W endianness select I/P with the memory mapped
I/O’s endianness. (by default ARM is configured for little endian format)
– If memory system is configured for one type of access & actual memory
is configured for other type of access then only word access can be
relied on, other half word & byte access would have unpredictable
results
Memory & Memory mapped I/O