SlideShare a Scribd company logo
1 of 17
ARM PROCESSOR ARCHITECTUR-4
01-08-2020 yayavaram@yahoo.com 1
• ARM7TDMI (ARM v4) Processor works in two
operating states .One is ARM state and the other is
Thumb state.
• In ARM state instructions are 32 bit wide, and in
Thumb state instructions are 16 bit wide.
• Thumb mode allows for code to be smaller, and can
potentially be faster if the target has slow memory.
INTRODUCTION
• The Nintendo Game Boy Advance (GBA) is a
portable games console which first used this thumb
instruction of ARM7TDMI CPU.Later it was used in
PDAs,music players and other gaming applications
where memory is very critical.
Contd
Why Thumb ?
• Except in the high speed embedded devices, the cost
of memory is much more critical than the execution
speed of the processor.
• But all the embedded applications do not need these
high speed and memory requirements.
• So, to reduce memory requirements and cost, the
ARM company has created the Thumb instruction
set as an option for their RISC processor cores.
• The most well-known chip that includes the Thumb
instruction set is the ARM7TDMI. The “T” in the
core's full name specifies Thumb.
01-08-2020 yayavaram@yahoo.com 4
contd
• The Thumb instruction set consists of 16-bit
instructions that act as a compact shorthand for a
subset of the 32-bit instructions of the standard
ARM.
• Every Thumb instruction could instead be executed
via the equivalent 32-bit ARM instruction.
• But the limitation is not all ARM instructions are
available in the Thumb subset , for example, there's
no way to access status or coprocessor registers.
01-08-2020 yayavaram@yahoo.com 5
contd
01-08-2020 yayavaram@yahoo.com 6
contd
• The difference between two equivalent instructions
lies in how the instructions are fetched and
interpreted prior to execution, not in how they
function.
• Since the expansion from 16-bit to 32-bit instruction
is accomplished via dedicated hardware within the
chip, it doesn't slow execution even a bit.
• But the narrower 16-bit instructions do offer memory
advantages.
01-08-2020 yayavaram@yahoo.com 7
Block Diagram of ARM7ARM & THUMB states
• Upon power on reset , ARM processors always start
in ARM state.
• To enter to Thumb state the user must explicitly
change to Thumb state using a BX (Branch and
exchange instruction set) instruction.
• The Thumb instruction set is a subset of the 32bit
ARM instruction set.
• Some of the of 32 bit ARM instructions are not
available when operating in THUMB state.
CPSR Register
• The T bit of the CPSR 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.
• There are also other methods to switch between
these state.
contd
• A comparison between the two states is given
below.
• From the table it is clear that no of core
instructions is less in Thumb mode.
Thumb State Registers
The Thumb state provides a subset of the ARM state,
registers: •Eight general purpose registers r0 to r7
(also known as the low registers)
• SP register (banked in all modes)
• LR register (banked in all modes)
• PC register & • CPSR register
• SPSR (banked for the privileged modes) .
The high registers r8 to r15 are generally not
accessible when in the Thumb state (except for the
three instructions MOV , ADD, and CMP).
Stack in Thumb State
• The biggest register difference involves 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.
Methods of Switching the states.
• On power on reset the ARM processor starts up in
ARM state .
• When an exception occurs, the processor
automatically begins executing in ARM state at the
address of the exception vector.
• So another way to change state is to placing the 32-
bit code in an exception handler.
• In addition, a simple execution of the branch and
Exchange (BX ) instruction can also do this.
Simple program
mov R0,#5 ;Argument to
function is in R0
add R1,PC,#1 ;Load address of
SUB_BRANCH, Set
for THUMB by
adding 1
BX R1
01-08-2020 yayavaram@yahoo.com 14
This example first switches to Thumb state, then calls
a subroutine that was written in Thumb code.
• Upon return from the subroutine, the system again
switches back to ARM state.
Thumb Code Density
• Here the comparison between ARM and Thumb
code is shown for the Division program.It proves
that the Thumb code density is higher than ARM
code
contd
• Another important point is that there are no MSR
(ARM register to system coprocessor register) and
MRS(general-purpose register to PSR) equivalent
Thumb instructions.
• To alter the CPSR or SPSR , one must switch into
ARM state to use MSR and MRS. Similarly, there
are no coprocessor instructions in Thumb state.
• You need to be in ARM state to access the
coprocessor for configuring cache and memory
management.
01-08-2020 yayavaram@yahoo.com 17

More Related Content

What's hot

Arm processors' architecture
Arm processors'   architectureArm processors'   architecture
Arm processors' architectureDr.YNM
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture IIDr.YNM
 
Arm cortex-m4 programmer model
Arm cortex-m4 programmer modelArm cortex-m4 programmer model
Arm cortex-m4 programmer modelMohammed Gomaa
 
Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionDr. Pankaj Zope
 
Arm modes
Arm modesArm modes
Arm modesabhi165
 
ARM architcture
ARM architcture ARM architcture
ARM architcture Hossam Adel
 
Microprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answersMicroprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answersMathankumar S
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architectureZakaria Gomaa
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingNilesh Bhaskarrao Bahadure
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controllerNirbhay Singh
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
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
 
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
 EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj... EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...D Y PATIL COLLEGE OF ENGINEERING PUNE
 
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
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architectureJamia Hamdard
 

What's hot (20)

Arm processors' architecture
Arm processors'   architectureArm processors'   architecture
Arm processors' architecture
 
Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture II
 
Arm cortex-m4 programmer model
Arm cortex-m4 programmer modelArm cortex-m4 programmer model
Arm cortex-m4 programmer model
 
Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb Instruction
 
Arm modes
Arm modesArm modes
Arm modes
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
 
Microprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answersMicroprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answers
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controller
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
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
 
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
 EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj... EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furber
 
ARM- Programmer's Model
ARM- Programmer's ModelARM- Programmer's Model
ARM- Programmer's Model
 
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...
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
Viva
VivaViva
Viva
 
8085
80858085
8085
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 

Similar to Lect 4 ARM PROCESSOR ARCHITECTURE

Similar to Lect 4 ARM PROCESSOR ARCHITECTURE (20)

Unit ii arm7 thumb
Unit ii arm7 thumbUnit ii arm7 thumb
Unit ii arm7 thumb
 
06. thumb instructions
06. thumb instructions06. thumb instructions
06. thumb instructions
 
Unitii armarchitecture-130305014346-phpapp01
Unitii armarchitecture-130305014346-phpapp01Unitii armarchitecture-130305014346-phpapp01
Unitii armarchitecture-130305014346-phpapp01
 
Arm
ArmArm
Arm
 
Unit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptxUnit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptx
 
MPU Chp2.pptx
MPU Chp2.pptxMPU Chp2.pptx
MPU Chp2.pptx
 
ARM_Thumb mode
ARM_Thumb modeARM_Thumb mode
ARM_Thumb mode
 
mod 4-2.pptx
mod 4-2.pptxmod 4-2.pptx
mod 4-2.pptx
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
ARM Processor ppt.pptx
ARM Processor ppt.pptxARM Processor ppt.pptx
ARM Processor ppt.pptx
 
armcortexinsructionsetupdated (2).pptx
armcortexinsructionsetupdated (2).pptxarmcortexinsructionsetupdated (2).pptx
armcortexinsructionsetupdated (2).pptx
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
 
unit IV ARM processor instruction set.ppt
unit IV ARM processor instruction set.pptunit IV ARM processor instruction set.ppt
unit IV ARM processor instruction set.ppt
 
ARM Introduction
ARM IntroductionARM Introduction
ARM Introduction
 
arm-intro.ppt
arm-intro.pptarm-intro.ppt
arm-intro.ppt
 
002079
002079002079
002079
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 
Arm
ArmArm
Arm
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
LPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptLPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.ppt
 

More from 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
 
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
 
Why system verilog ?
Why system verilog ? Why system verilog ?
Why system verilog ? Dr.YNM
 
VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments Dr.YNM
 

More from 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
 
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
 
Why system verilog ?
Why system verilog ? Why system verilog ?
Why system verilog ?
 
VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments VERILOG HDL :: Blocking & NON- Blocking assignments
VERILOG HDL :: Blocking & NON- Blocking assignments
 

Recently uploaded

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 

Lect 4 ARM PROCESSOR ARCHITECTURE

  • 2. • ARM7TDMI (ARM v4) Processor works in two operating states .One is ARM state and the other is Thumb state. • In ARM state instructions are 32 bit wide, and in Thumb state instructions are 16 bit wide. • Thumb mode allows for code to be smaller, and can potentially be faster if the target has slow memory. INTRODUCTION
  • 3. • The Nintendo Game Boy Advance (GBA) is a portable games console which first used this thumb instruction of ARM7TDMI CPU.Later it was used in PDAs,music players and other gaming applications where memory is very critical. Contd
  • 4. Why Thumb ? • Except in the high speed embedded devices, the cost of memory is much more critical than the execution speed of the processor. • But all the embedded applications do not need these high speed and memory requirements. • So, to reduce memory requirements and cost, the ARM company has created the Thumb instruction set as an option for their RISC processor cores. • The most well-known chip that includes the Thumb instruction set is the ARM7TDMI. The “T” in the core's full name specifies Thumb. 01-08-2020 yayavaram@yahoo.com 4
  • 5. contd • The Thumb instruction set consists of 16-bit instructions that act as a compact shorthand for a subset of the 32-bit instructions of the standard ARM. • Every Thumb instruction could instead be executed via the equivalent 32-bit ARM instruction. • But the limitation is not all ARM instructions are available in the Thumb subset , for example, there's no way to access status or coprocessor registers. 01-08-2020 yayavaram@yahoo.com 5
  • 7. contd • The difference between two equivalent instructions lies in how the instructions are fetched and interpreted prior to execution, not in how they function. • Since the expansion from 16-bit to 32-bit instruction is accomplished via dedicated hardware within the chip, it doesn't slow execution even a bit. • But the narrower 16-bit instructions do offer memory advantages. 01-08-2020 yayavaram@yahoo.com 7
  • 8. Block Diagram of ARM7ARM & THUMB states • Upon power on reset , ARM processors always start in ARM state. • To enter to Thumb state the user must explicitly change to Thumb state using a BX (Branch and exchange instruction set) instruction. • The Thumb instruction set is a subset of the 32bit ARM instruction set. • Some of the of 32 bit ARM instructions are not available when operating in THUMB state.
  • 9. CPSR Register • The T bit of the CPSR 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. • There are also other methods to switch between these state.
  • 10. contd • A comparison between the two states is given below. • From the table it is clear that no of core instructions is less in Thumb mode.
  • 11. Thumb State Registers The Thumb state provides a subset of the ARM state, registers: •Eight general purpose registers r0 to r7 (also known as the low registers) • SP register (banked in all modes) • LR register (banked in all modes) • PC register & • CPSR register • SPSR (banked for the privileged modes) . The high registers r8 to r15 are generally not accessible when in the Thumb state (except for the three instructions MOV , ADD, and CMP).
  • 12. Stack in Thumb State • The biggest register difference involves 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.
  • 13. Methods of Switching the states. • On power on reset the ARM processor starts up in ARM state . • When an exception occurs, the processor automatically begins executing in ARM state at the address of the exception vector. • So another way to change state is to placing the 32- bit code in an exception handler. • In addition, a simple execution of the branch and Exchange (BX ) instruction can also do this.
  • 14. Simple program mov R0,#5 ;Argument to function is in R0 add R1,PC,#1 ;Load address of SUB_BRANCH, Set for THUMB by adding 1 BX R1 01-08-2020 yayavaram@yahoo.com 14 This example first switches to Thumb state, then calls a subroutine that was written in Thumb code. • Upon return from the subroutine, the system again switches back to ARM state.
  • 15. Thumb Code Density • Here the comparison between ARM and Thumb code is shown for the Division program.It proves that the Thumb code density is higher than ARM code
  • 16. contd • Another important point is that there are no MSR (ARM register to system coprocessor register) and MRS(general-purpose register to PSR) equivalent Thumb instructions. • To alter the CPSR or SPSR , one must switch into ARM state to use MSR and MRS. Similarly, there are no coprocessor instructions in Thumb state. • You need to be in ARM state to access the coprocessor for configuring cache and memory management.