ARM7TDMI Architecture
ARM7TDMI Architecture
ARM7TDMI Architecture
– The cpsr is a dedicated 32-bit register and resides in the register file.
– The cpsr is divided into four fields, each 8 bits wide: flags, status, extension, and control.
– In current designs the extension and status fields are reserved for future use.
– The control field contains the processor mode, state, and interrupt mask bits.
– the J bit, which can be found in the flags field, is only available on Jazelle-enabled processors, which
execute 8 bit instructions
• Saved program status register (spsr), which stores the previous mode’s cpsr.
Processor Modes
• The processor mode determines which registers are active and has the access rights to the cpsr register itself.
• Each processor mode is either privileged or nonprivileged:
• A privileged mode allows full read-write access to the cpsr.
• A nonprivileged mode only allows read access to the control field in the cpsr but still allows read-write access to
the condition flags.
• There are seven processor modes in total:
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.
• one nonprivileged mode User mode is used for programs and applications.
Condition Flags
Banked Registers
• When an exception or interrupt occurs, the processor sets the pc to a specific memory address.
• The address is within a special address range called the vector table.
• The memory map address 0x00000000 is reserved for the vector table, a set of 32-bit words.
• On some processors the vector table can be optionally located at a higher address
• When an exception or interrupt occurs, the processor suspends normal execution and starts loading instructions
from the exception vector table.
• Each vector table entry contains a form of branch instruction pointing to the start of a specific routine
• Reset vector: is location of the first instruction executed by the processor when power is applied. This instruction
branches to the initialization code.
• Undefined instruction vector: is used when the processor cannot decode an instruction.
• Software interrupt vector: is called when you execute a SWI instruction. The SWI instruction is frequently used
as the mechanism to invoke an operating system routine.
• Prefetch abort vector: occurs when the processor attempts to fetch an instruction from an address without the
correct access permissions. The actual abort occurs in the decode stage.
• Data abort vector: is similar to a prefetch abort but is raised when an instruction attempts to access data memory
without the correct access permissions.
• Interrupt request vector: is used by external hardware to interrupt the normal execution flow of the processor. It
can only be raised if IRQs are not masked in the cpsr.
• Fast interrupt request vector : is similar to the interrupt request but is reserved for hardware requiring faster
response times. It can only be raised if FIQs are not masked in the cpsr.