SlideShare una empresa de Scribd logo
1 de 18
ARM PROCESSOR ARCHITECTURE-3
Block Diagram of ARM7MODES OF OPERATION
• ARM processor operates in two modes. One is
Privileged mode and the other is unprivileged
mode.
• Privileged mode means full read /write access will
be provided. So the user can access all the hardware
resources and can change their status.
• Unprivileged mode is one which gives only read
access and not write access to any hardware and
user can’t change the operating mode .Also user
tasks can’t interfere with hardware.
• These modes of operation can be understood from
the CPSR register in ARM.
CPSR
• This is a 32 bit dedicated register , called CPSR
(Current Program Status Register) which monitor
and control internal operations.
• CPSR is a part of register file and is divided into
four fields, each of 8 bits wide :
• Flags, Status, Extension, and Control.
• The extension and status fields are reserved for
future use. (not used in ARM7 core)
• The control field contains the Processor mode,
State, and Interrupt mask bits.
CPSR Register
The first 5 bits [M0-M4]of CPSR denotes the
Processor Modes.In fact there are a total of 25 =32
options.But ARM7 supports only 7 processor modes.
contd
The bits and the corresponding modes are given
below.
M4 M3 M2 M1 M0 Mode
1 0 0 0 0 User mode
1 0 0 0 1 FIRQ mode
1 0 0 1 0 IRQ mode
1 0 0 1 1 Supervisor
1 0 1 1 1 Abort mode
1 1 0 1 1 Undefined mode
1 1 1 1 1 System mode
contd
• Among them six are privileged modes and one is
unprivileged mode.
• The six privileged modes are Abort , Fast interrupt
request, Interrupt request, Supervisor, System, and
Undefined.
• The only un-privileged mode is user mode.
i.Abort mode: The processor enters abort mode when
it attempts to fetch either data or instruction from a
memory address that do not physically exist .
ii.Fast Interrupt Request (FIR) &
iii. Interrupt Request modes correspond to the two
interrupt levels available on the ARM processor.
contd
iv.Supervisor mode : Upon reset the ARM will be in
Supervisor mode. It is generally the mode that an
operating system kernel operates in.
Let us understand some thing more about ARM
here.
• Upon reset ,the program counter of ARM is loaded
with the address 0x00000000 and the CPSR is
loaded with 0x000000D3.
• This value of CPSR will configure the processor to
work in ARM state ,with interrupts (FIQ &IRQ)
disabled and switches to Supervisory mode.
contd
• In the supervisory mode after executing some basic
tasks like setting up of various stack pointers, the
boot code usually enters into the user mode.
• In this mode the processor allows the user to enter
the program code in the memory or one can
understand that the processor is ready for the user.
contd
System mode :It is a special version of user mode that
allows full read-write access to the CPSR.
vi. Undefined mode : The processor will switch to
this mode, when it does not recognize an instruction in
the pipeline or encounters an instruction that is
undefined or not supported by the implementation.
For ex: Try to execute a co-processor instruction when
it is not ready etc.
vii. User mode : It is the mode under which most
applications /OS tasks run. But it is an unprivileged
mode.
contd
• The T bit Decides whether the processor is 16 bit
Thumb state or 32 bit ARM state.
• When the T bit is 1, the processor is in Thumb state.
• To change states the core executes a specialized
branch instruction .Or when T= 0 the processor is in
ARM state and executes ARM instructions.
• FIQ denotes the Fast Interupt Request mode. Here
the processor is interrupted at a faster Non-
maskable mode. As more registers are banked in
FIQ mode (r8-r14) implementation is fast.
contd
• IRQ : It denotes the Interrupt request mode.This is a
normal Interrupt which is banked (associated ) with
only two registers(r13-r14).
• The bits 8-27 are reserved and hence not defined for
ARM7 Core.
• The bits 28-32 are similar to normal microprocessor
status flags.
These are V, C , Z , N Condition flags .
• Before we understand these flgas,let us consider
some details of FIQ & IRQ.
contd
• At the CPU level, the ARM FIQ signal is very similar to
the x86 non-maskable interrupt (NMI), but its role within
the system architecture has different .
• ARM FIQs were, as the name suggests, designed to rapidly
service demanding peripherals or even to allow software to
replace hardware (for example in synchronous serial
communication).
contd
• The IRQ exception is a normal interrupt caused by a
LOW level on the IRQ input.
• IRQ has a lower priority than FIQ, and is masked
on entry to an FIQ sequence.
• It must ensured that the IRQ input is held LOW
until the processor acknowledges the interrupt
request.
contd
• V (oVerflow) : This bit is Set if the result causes a
signed overflow.
That is this flag is set whenever the result of a signed number
operation is too large, causing the MSB bit to overflow into
the sign bit.
To understand this ,let us consider the addition of two simple
signed numbers. -2 & -127 = -129.
All of us know that the maximum value of 8-bit signed
number is -128. So, addition of the two numbers is
contd
• Generally carry flag is used to detect errors in
unsigned arithmetic operations while the overflow
is used to detect errors in signed arithmetic
operations.
• C (Carry) : This flag bit is set when the result
causes an unsigned carry.
• Let us add 2 unsigned numbers.
• FF & F5 .From the addition operation it is clear ,
that there is a carry bit C .
Z (Zero) : This bit is set when the result after an
arithmetic operation is zero, frequently used to
indicate equality
• N (Negative): It is the sign bit used to represent the
binary signed .
• This bit is set when the bit 31 of the result (32 bit
data) is 1.Binary representation of signed numbers
uses D31 as the sign bit.
If the D31 bit of the result is zero ,then N=0 and the
result is positive. If D31 bit is one ,then N=1 and the
result is negative.
• The negative and V flag are used for the signed
number arithmetic operations .
NOTE !
• The biggest register difference involves is the SP
register.
• The Thumb state has unique stack mnemonics
(PUSH, POP) that don't exist in the ARM state.
• These instructions assume the existence of a stack
pointer, for which R13 is used. They translate into
load and store instructions in the ARM state.
28-07-2020 yayavaram@yahoo.com 18

Más contenido relacionado

La actualidad más candente

Introduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorIntroduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorDarling Jemima
 
Unit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptxUnit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptxVijayKumar201823
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberasodariyabhavesh
 
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Shrishail Bhat
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 IntroductionDr. Pankaj Zope
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architectureDr.YNM
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral InterfaceAnurag Tomar
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSDr.YNM
 
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armPrashant Ahire
 
ARM Architecture Instruction Set
ARM Architecture Instruction SetARM Architecture Instruction Set
ARM Architecture Instruction SetDwight Sabio
 
8086 modes
8086 modes8086 modes
8086 modesPDFSHARE
 
Arm Processors Architectures
Arm Processors ArchitecturesArm Processors Architectures
Arm Processors ArchitecturesMohammed Hilal
 

La actualidad más candente (20)

ARM Micro-controller
ARM Micro-controllerARM Micro-controller
ARM Micro-controller
 
Introduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorIntroduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM Processor
 
Arm processor
Arm processorArm processor
Arm processor
 
Unit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptxUnit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptx
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furber
 
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORS
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
 
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_arm
 
ARM Architecture Instruction Set
ARM Architecture Instruction SetARM Architecture Instruction Set
ARM Architecture Instruction Set
 
8086 modes
8086 modes8086 modes
8086 modes
 
Arm Processors Architectures
Arm Processors ArchitecturesArm Processors Architectures
Arm Processors Architectures
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
06. thumb instructions
06. thumb instructions06. thumb instructions
06. thumb instructions
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 

Similar a ARM Processor Modes and CPSR Register

Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTUREDr.YNM
 
Unitii armarchitecture-130305014346-phpapp01
Unitii armarchitecture-130305014346-phpapp01Unitii armarchitecture-130305014346-phpapp01
Unitii armarchitecture-130305014346-phpapp01mannepalli Srinivasulu
 
Comparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARCComparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARCApurv Nerlekar
 
Arm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_modelArm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_modelGanesh Naik
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandotascmandota
 
Arm architecture
Arm architectureArm architecture
Arm architectureMinYeop Na
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)guptakrishns23
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
ARM Processor ppt.pptx
ARM Processor ppt.pptxARM Processor ppt.pptx
ARM Processor ppt.pptxjayesh205437
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecturesreea4
 

Similar a ARM Processor Modes and CPSR Register (20)

MPU Chp2.pptx
MPU Chp2.pptxMPU Chp2.pptx
MPU Chp2.pptx
 
Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURE
 
Unitii armarchitecture-130305014346-phpapp01
Unitii armarchitecture-130305014346-phpapp01Unitii armarchitecture-130305014346-phpapp01
Unitii armarchitecture-130305014346-phpapp01
 
Arm
ArmArm
Arm
 
Comparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARCComparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARC
 
ARM7TDMI-S_CPU.ppt
ARM7TDMI-S_CPU.pptARM7TDMI-S_CPU.ppt
ARM7TDMI-S_CPU.ppt
 
Arm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_modelArm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_model
 
ARM Introduction
ARM IntroductionARM Introduction
ARM Introduction
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandota
 
Arm
ArmArm
Arm
 
8255.pdf
8255.pdf8255.pdf
8255.pdf
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
arm-intro.ppt
arm-intro.pptarm-intro.ppt
arm-intro.ppt
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)
 
002079
002079002079
002079
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Introduction to ARM Architecture
Introduction to ARM ArchitectureIntroduction to ARM Architecture
Introduction to ARM Architecture
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
 
ARM Processor ppt.pptx
ARM Processor ppt.pptxARM Processor ppt.pptx
ARM Processor ppt.pptx
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 

Más de Dr.YNM

Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.pptDr.YNM
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.pptDr.YNM
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.pptDr.YNM
 
Crystalstructure-.ppt
Crystalstructure-.pptCrystalstructure-.ppt
Crystalstructure-.pptDr.YNM
 
Basics of OS & RTOS.ppt
Basics of OS & RTOS.pptBasics of OS & RTOS.ppt
Basics of OS & RTOS.pptDr.YNM
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxDr.YNM
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.pptDr.YNM
 
Introduction to ASICs.pptx
Introduction to ASICs.pptxIntroduction to ASICs.pptx
Introduction to ASICs.pptxDr.YNM
 
VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptDr.YNM
 
Basics of data communications.pptx
Basics of data communications.pptxBasics of data communications.pptx
Basics of data communications.pptxDr.YNM
 
CPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxCPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxDr.YNM
 
Transient response of RC , RL circuits with step input
Transient response of RC , RL circuits  with step inputTransient response of RC , RL circuits  with step input
Transient response of RC , RL circuits with step inputDr.YNM
 
CISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESCISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESDr.YNM
 
Microprocessor Architecture 4
Microprocessor Architecture  4Microprocessor Architecture  4
Microprocessor Architecture 4Dr.YNM
 
Microprocessor Architecture-III
Microprocessor Architecture-IIIMicroprocessor Architecture-III
Microprocessor Architecture-IIIDr.YNM
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture IIDr.YNM
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test BenchDr.YNM
 
Microprocessor architecture-I
Microprocessor architecture-IMicroprocessor architecture-I
Microprocessor architecture-IDr.YNM
 
Verilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSVerilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSDr.YNM
 
Microprocessors basics
Microprocessors basicsMicroprocessors basics
Microprocessors basicsDr.YNM
 

Más de Dr.YNM (20)

Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.ppt
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.ppt
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
Crystalstructure-.ppt
Crystalstructure-.pptCrystalstructure-.ppt
Crystalstructure-.ppt
 
Basics of OS & RTOS.ppt
Basics of OS & RTOS.pptBasics of OS & RTOS.ppt
Basics of OS & RTOS.ppt
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptx
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Introduction to ASICs.pptx
Introduction to ASICs.pptxIntroduction to ASICs.pptx
Introduction to ASICs.pptx
 
VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.ppt
 
Basics of data communications.pptx
Basics of data communications.pptxBasics of data communications.pptx
Basics of data communications.pptx
 
CPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptxCPLD & FPGA Architectures and applictionsplications.pptx
CPLD & FPGA Architectures and applictionsplications.pptx
 
Transient response of RC , RL circuits with step input
Transient response of RC , RL circuits  with step inputTransient response of RC , RL circuits  with step input
Transient response of RC , RL circuits with step input
 
CISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURESCISC & RISC ARCHITECTURES
CISC & RISC ARCHITECTURES
 
Microprocessor Architecture 4
Microprocessor Architecture  4Microprocessor Architecture  4
Microprocessor Architecture 4
 
Microprocessor Architecture-III
Microprocessor Architecture-IIIMicroprocessor Architecture-III
Microprocessor Architecture-III
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture II
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test Bench
 
Microprocessor architecture-I
Microprocessor architecture-IMicroprocessor architecture-I
Microprocessor architecture-I
 
Verilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSVerilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONS
 
Microprocessors basics
Microprocessors basicsMicroprocessors basics
Microprocessors basics
 

Último

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Último (20)

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

ARM Processor Modes and CPSR Register

  • 2. Block Diagram of ARM7MODES OF OPERATION • ARM processor operates in two modes. One is Privileged mode and the other is unprivileged mode. • Privileged mode means full read /write access will be provided. So the user can access all the hardware resources and can change their status. • Unprivileged mode is one which gives only read access and not write access to any hardware and user can’t change the operating mode .Also user tasks can’t interfere with hardware. • These modes of operation can be understood from the CPSR register in ARM.
  • 3. CPSR • This is a 32 bit dedicated register , called CPSR (Current Program Status Register) which monitor and control internal operations. • CPSR is a part of register file and is divided into four fields, each of 8 bits wide : • Flags, Status, Extension, and Control. • The extension and status fields are reserved for future use. (not used in ARM7 core) • The control field contains the Processor mode, State, and Interrupt mask bits.
  • 4. CPSR Register The first 5 bits [M0-M4]of CPSR denotes the Processor Modes.In fact there are a total of 25 =32 options.But ARM7 supports only 7 processor modes.
  • 5. contd The bits and the corresponding modes are given below. M4 M3 M2 M1 M0 Mode 1 0 0 0 0 User mode 1 0 0 0 1 FIRQ mode 1 0 0 1 0 IRQ mode 1 0 0 1 1 Supervisor 1 0 1 1 1 Abort mode 1 1 0 1 1 Undefined mode 1 1 1 1 1 System mode
  • 6. contd • Among them six are privileged modes and one is unprivileged mode. • The six privileged modes are Abort , Fast interrupt request, Interrupt request, Supervisor, System, and Undefined. • The only un-privileged mode is user mode. i.Abort mode: The processor enters abort mode when it attempts to fetch either data or instruction from a memory address that do not physically exist . ii.Fast Interrupt Request (FIR) & iii. Interrupt Request modes correspond to the two interrupt levels available on the ARM processor.
  • 7. contd iv.Supervisor mode : Upon reset the ARM will be in Supervisor mode. It is generally the mode that an operating system kernel operates in. Let us understand some thing more about ARM here. • Upon reset ,the program counter of ARM is loaded with the address 0x00000000 and the CPSR is loaded with 0x000000D3. • This value of CPSR will configure the processor to work in ARM state ,with interrupts (FIQ &IRQ) disabled and switches to Supervisory mode.
  • 8. contd • In the supervisory mode after executing some basic tasks like setting up of various stack pointers, the boot code usually enters into the user mode. • In this mode the processor allows the user to enter the program code in the memory or one can understand that the processor is ready for the user.
  • 9. contd System mode :It is a special version of user mode that allows full read-write access to the CPSR. vi. Undefined mode : The processor will switch to this mode, when it does not recognize an instruction in the pipeline or encounters an instruction that is undefined or not supported by the implementation. For ex: Try to execute a co-processor instruction when it is not ready etc. vii. User mode : It is the mode under which most applications /OS tasks run. But it is an unprivileged mode.
  • 10. contd • The T bit Decides whether the processor is 16 bit Thumb state or 32 bit ARM state. • When the T bit is 1, the processor is in Thumb state. • To change states the core executes a specialized branch instruction .Or when T= 0 the processor is in ARM state and executes ARM instructions. • FIQ denotes the Fast Interupt Request mode. Here the processor is interrupted at a faster Non- maskable mode. As more registers are banked in FIQ mode (r8-r14) implementation is fast.
  • 11. contd • IRQ : It denotes the Interrupt request mode.This is a normal Interrupt which is banked (associated ) with only two registers(r13-r14). • The bits 8-27 are reserved and hence not defined for ARM7 Core. • The bits 28-32 are similar to normal microprocessor status flags. These are V, C , Z , N Condition flags . • Before we understand these flgas,let us consider some details of FIQ & IRQ.
  • 12. contd • At the CPU level, the ARM FIQ signal is very similar to the x86 non-maskable interrupt (NMI), but its role within the system architecture has different . • ARM FIQs were, as the name suggests, designed to rapidly service demanding peripherals or even to allow software to replace hardware (for example in synchronous serial communication).
  • 13. contd • The IRQ exception is a normal interrupt caused by a LOW level on the IRQ input. • IRQ has a lower priority than FIQ, and is masked on entry to an FIQ sequence. • It must ensured that the IRQ input is held LOW until the processor acknowledges the interrupt request.
  • 14. contd • V (oVerflow) : This bit is Set if the result causes a signed overflow. That is this flag is set whenever the result of a signed number operation is too large, causing the MSB bit to overflow into the sign bit. To understand this ,let us consider the addition of two simple signed numbers. -2 & -127 = -129. All of us know that the maximum value of 8-bit signed number is -128. So, addition of the two numbers is
  • 15. contd • Generally carry flag is used to detect errors in unsigned arithmetic operations while the overflow is used to detect errors in signed arithmetic operations. • C (Carry) : This flag bit is set when the result causes an unsigned carry. • Let us add 2 unsigned numbers. • FF & F5 .From the addition operation it is clear , that there is a carry bit C .
  • 16. Z (Zero) : This bit is set when the result after an arithmetic operation is zero, frequently used to indicate equality • N (Negative): It is the sign bit used to represent the binary signed . • This bit is set when the bit 31 of the result (32 bit data) is 1.Binary representation of signed numbers uses D31 as the sign bit. If the D31 bit of the result is zero ,then N=0 and the result is positive. If D31 bit is one ,then N=1 and the result is negative. • The negative and V flag are used for the signed number arithmetic operations .
  • 17. NOTE ! • The biggest register difference involves is the SP register. • The Thumb state has unique stack mnemonics (PUSH, POP) that don't exist in the ARM state. • These instructions assume the existence of a stack pointer, for which R13 is used. They translate into load and store instructions in the ARM state.