Module 4 - ECE3014 Introduction To Embedded System and ARM-1
Module 4 - ECE3014 Introduction To Embedded System and ARM-1
• The ARM processor is a key component of many successful 32 bit embedded system
ARM Powered Products
The RISC Design Philosophy
• The ARM core uses a RISC architecture.
RISC CISC
Reduced Instruction Set Computer Complex Instruction Set Computer
Reduced number of instructions Large number of instructions
Single clock cycle instructions Instructions may take several clock cycles
Heavy use of RAM More efficient use of RAM
Emphasis on software Emphasis on hardware
Multiple registers Single register
Low Power Consumption High Power Consumption
Small code size Large code size
Average clock cycle per instruction is 1.5 Average clock cycle per instruction varies between 2 and 15
The RISC Design Philosophy
The RISC design philosophy is implemented with four major design rules:
• Instructions:
• RISC processors have a reduced number of instruction classes
• These classes provide simple operations that can each execute in a single clock cycle
• The compiler or the programmer synthesizes complex operations (for example, a divide operation)
by combining several simple instructions.
• Each instruction is a fixed length to allow the pipeline to fetch future instructions before decoding
the current instruction
• Pipeline
• The processing of instructions is broken down into smaller units that can be executed in parallel by
pipelines.
• Ideally the pipeline advances by one step on each cycle for maximum throughput
The RISC Design Philosophy
• Registers:
• Register act as the fast local memory store for all data processing operations.
• Separate load and store instructions transfer data between the register bank and external memory
Over the past few years, ARM has extended its product portfolio by diversifying its CPU development,
which resulted in the new processor family name “Cortex.”
• In this Cortex processor range, the processors are divided into three profiles
• T Bit
• Architecture xT only
• T = 0: Processor in ARM state
Figure Courtesy: ARM System Developer’s Guide,
• T = 1: Processor in Thumb state Andrew Sloss
• Mode bits
• Specify the processor mode
Processor Modes
• The processor mode determines which register are active and the access rights to the cpsr register itself.
• Each processor mode is either privileged or unprivileged
• A privileged mode allows full read – write access to cpsr.
• An unprivileged mode only allows read access to the control field in the cpsr, but still allows read –
write access to the conditional flags
• There are seven modes in total :
• Six privileged modes
• Abort
• Fast interrupt request
• Interrupt request
• Supervisor
• System
• Undefined
• One unprivileged mode
• User
Processor Modes
• A processor enters the abort mode when there is a failed attempt to access the memory
• Fast interrupt request and interrupt request modes corresponds to two interrupt levels available
• System mode is a special version of user mode that allows full read – write access to cpsr.
• Undefined mode is used when the processor encounters an instruction that is undefined or not
supported
• Example:
• When the processor is in the interrupt request
mode, the instructions that you execute still
access registers and .
• But these registers are the banked registers
and .
• The user mode registers and are not affected
by the instruction referencing these registers.
• A program has normal access to the other
registers r0 to r12
• Using a pipeline speeds up execution by fetching the next instruction while other instructions are being
Cycle 1 ADD
e
Tim