MODULE_4.doc
MODULE_4.doc
Textbook2:Chapter1,2
ARMEmbeddedSystems:
Introduction
TheRISCdesignphilosophy
Real World
CurrentProgramStatusRegister
ProcessorModes
• Each processor mode is either privileged or
nonprivileged:
A privileged mode allows full read-write access to
the cpsr.
A non privileged mode only allows read access to
the control field in the cpsr but still allows read-
write access to the condition flags.
• Therearesevenprocessormodesintotal:
1. Six privileged modes (abort, fast interrupt request,
interrupt request, supervisor, system, and
undefined)
2. One non privileged mode(user).
2.2.1ProcessorModes
• The processorenters abort mode when there is a failed
attempt to access memory.
• Fast interrupt request and interrupt request modes
Correspond to the two interrupt levels available on the
ARM processor.
• Supervisor mode is the mode that the processor is in after
reset and is generally the mode that an operating system
kernel operates in.
• System mode is a special version of user mode that allows
Full read-write access to the cpsr.
• Undefined mode is used when the processor encounters
an instruction that is undefined or not supported by the
implementation.
• Usermode is used for programs and applications.
ProcessorModes
Banked Registers
State and Instruction Sets
• The state of the core determines which instruction set is being
executed. There are three instruction sets: ARM, Thumb, and
Jazelle.
• The ARM instruction set is only active when the processor is in
ARM state.
• The JazelleJ andThumbT bits in the cpsr reflect the state of the
processor.
• When both JandT bits are 0,the processor is in ARM state and
executes ARM instructions.
• When theT bit is1,then the processor is inThumb state.
• Table2.2 compares the ARM and Thumb instruction set features.
• The ARM designers introduced a third instruction set called Jazelle.
Jazelle executes 8-bit instructions and is a hybrid mix of software
and hardware designed to speed up the execution of Java byte
codes.
StateandInstructionSets
Interrupt Masks
• Interrupt masks are used to stop specific
interrupt requests from interrupting the
processor.
• There are two interrupt request levels available
on the ARM processor core—interrupt request
(IRQ) and fast interrupt request (FIQ).
• The cpsr has two interrupt maskbits,7and6(orI
and F), which control the masking of IRQ and FIQ,
respectively.
ConditionFlags
• Condition flags are updated by comparisons and the result of
ALU operations that specify the S instruction suffix.
• For example, if a SUBS subtract instruction results in a register
value of zero, then the Z flag in the cpsr is set.
• This particular subtract instruction specifically updates the
cpsr.
Conditional Execution
2.3 Pipeline
• A pipeline is the mechanism a RISC processor uses to execute
instructions.
• Using a pipeline speeds up execution by fetching the next instruction
While other instructions are being decoded and executed.
• One way to view the pipeline is to think of it as an automobile
assembly line, with each stage carrying out a particular task to
manufacture the vehicle.