SlideShare uma empresa Scribd logo
1 de 35
ARM
Advanced RISC Machine
Kelompok 1
IF5130 – Sistem Komputer
Are you using this ?
                       Windows Phone
great performance ,
GREAT (computing) power
Low computing power, great performance
History
 Developed in 1985 at Acorn Computers Ltd for the 1st
  time
 Established a new company named Advanced RISC
  Machine
 Continuation of the architecture enchancements from
  the original architecture
ARM features

 A large register file
 A load/store architecture
 Uniform and fixed length instruction field
 Simple addressing mode
Data Sizes & Instruction Sets

 A 32-bit architecture
 Byte,halfword,Word relation to ARM
 Implement
    32-bit ARM IS
    16-bit Thumb IS
 Jazell to execute Java bytecode
Processor Mode

   User
   FIQ
   IRQ
   Supervisor
   Abort
   Undef
   System
New features

 Control over both ALU & shifter
 Auto-increment & decrement
 Load / Store Multiple Instructions
 Conditional execution
More Control
               Windows Phone
Data Processing – Dataflow Model
Data Processing – Component
Data Processing - Instructions
Contains:
• Arithmetic instructions
• Comparisons instructions (no results - just set condition
   codes)
 Multipy Instructions
• Logical operations
• Data movement between registers
Data Processing – Instruction
Data Processing – LSL Example
Data processing ARM != pure RISC
Load & Store Instruction
Load/Store Instruction
Load/Store Instruction (2)
   3 type transfer
      Single register data transfer (LDR/STR)
      Block data transfer (LDM/STM)
      Single Data Swap (SWP)
Single Data Transfer
r0   Source
                                        Memory
                                                 0x5   Register
                    Offset                             for STR
                     12         0x20c    0x5
              r1
 Base       0x200               0x200
Register


                                        Memory

  Updated    r1        Offset                     r0   Source
   Base    0x20c        12      0x20c            0x5   Register
  Register                                             for STR
                                0x200    0x5
              r1
 Original
  Base      0x200
 Register
Block Data Transfer
Stack
Block Data Transfer
• Block Copying Modes
       Increment – After
       Increment – Before                         r13


       Decrement – After                          r14     Increasing
                                                          Memory
       Decrement – Before
                                                  r12
loop   LDMIA   r12!, {r0-r11}   ;   load 48 bytes
       STMIA   r13!, {r0-r11}   ;   and store them
       CMP     r12, r14         ;   check for the end
       BNE     loop             ;   and loop until done
Conditional Execution
                        Windows Phone
Conditional Execution
Conditional Execution
Conditional flags
   N   : Negative
   Z   : Zero
   C   : Carry
   V   : Overflow
Conditional Execution
Who’s reading flags?
EQ   : Equal            HI   : Higher
NE   : Not equal        LS   : Lower than or same
VS   : Overflow set     GE   : Greater than or equal
VC   : Overflow clear   LT   : Less than
MI   : Minus            GT   : Greater than
PL   : Plus             LE   : Less than or equal
CS   : Carry set
CC   : Carry clear
Conditional Execution
C programing language
   While (i != j) {
        if (i > j) {
                i -= j;
        } else {
                j -= i;
        }
   }
Conditional Execution
RISC     loop:
                    CMP   Ri, Rj
                    BEQ   done
                    BGT   bigger
                    BLT   smaller
         bigger:
                    SUB   Ri, Ri, Rj
                    BNE   loop
         smaller:
                    SUB   Rj, Rj, Ri
                    BNE   loop
Conditional Execution
ARM
   loop:
           CMP            Ri, Rj
           SUBGT   Ri, Ri, Rj
           SUBLT   Rj, Rj, Ri
           BNE     loop
Let’s recap
              Windows Phone
Reference
   [ZHU09 ]Dr Yifeng Zhu, The ARM Assembly, 2009,
    (http://arch.eece.maine.edu/ece471/images/8/8b/Lecture_05_
    ARM_ISA.pdf)
   [ARM11] ARM Ltd., ARM Architecture Reference Manual,
    2011, www.arm.com
   [ROK11] Rokov, Josko , ARM Architecture and Multimedia
    Applications
    (http://www.fer.unizg.hr/_download/repository/Kvalifikacijski-
    Rokov.pdf)
Reference
 The ARM Instructions Set – ARM University Program v1.0
 [ARM11] ARM Ltd., ARM Architecture Reference Manual,
  2011, www.arm.com
 www.ida.liu.se/~TDTS51/lectures/lectures5-6.pdf
 ARM7-TDMI-manual-pt2
ARM
Advanced RISC Machine
Kelompok 1
IF5130 – Sistem Komputer

Mais conteúdo relacionado

Mais procurados

2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
satish1jisatishji
 

Mais procurados (20)

ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Risc processors
Risc processorsRisc processors
Risc processors
 
Arm processor
Arm processorArm processor
Arm processor
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Lect 3 ARM PROCESSOR ARCHITECTURE
Lect 3  ARM PROCESSOR ARCHITECTURE Lect 3  ARM PROCESSOR ARCHITECTURE
Lect 3 ARM PROCESSOR ARCHITECTURE
 
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
 
Advanced Pipelining in ARM Processors.pptx
Advanced Pipelining  in ARM Processors.pptxAdvanced Pipelining  in ARM Processors.pptx
Advanced Pipelining in ARM Processors.pptx
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
Introduction to ARM Architecture
Introduction to ARM ArchitectureIntroduction to ARM Architecture
Introduction to ARM Architecture
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
ARM Micro-controller
ARM Micro-controllerARM Micro-controller
ARM Micro-controller
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORS
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 

Semelhante a Introduction to ARM

Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
John Williams
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2
Khaja Dileef
 
how to generate sms
how to generate smshow to generate sms
how to generate sms
sumant reddy
 

Semelhante a Introduction to ARM (20)

Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Unit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptxUnit 4 _ ARM Processors .pptx
Unit 4 _ ARM Processors .pptx
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
 
Arm
ArmArm
Arm
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
 
swrp141.pdf
swrp141.pdfswrp141.pdf
swrp141.pdf
 
ARM.ppt
ARM.pptARM.ppt
ARM.ppt
 
arm-intro.ppt
arm-intro.pptarm-intro.ppt
arm-intro.ppt
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.ppt
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM Architecture
 
Lec02
Lec02Lec02
Lec02
 
Lecture8
Lecture8Lecture8
Lecture8
 
LPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptLPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.ppt
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2
 
how to generate sms
how to generate smshow to generate sms
how to generate sms
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
Armsim (simualtor)
Armsim (simualtor)Armsim (simualtor)
Armsim (simualtor)
 
Lecture9
Lecture9Lecture9
Lecture9
 
Microcontroller part 4
Microcontroller part 4Microcontroller part 4
Microcontroller part 4
 

Mais de Puja Pramudya

Mais de Puja Pramudya (20)

Building High Outcome Engineering Organization for Tech Startup
Building High Outcome Engineering Organization for Tech StartupBuilding High Outcome Engineering Organization for Tech Startup
Building High Outcome Engineering Organization for Tech Startup
 
Building High Outcome Engineering Organization for Tech Startup.pptx
Building High Outcome Engineering Organization for Tech Startup.pptxBuilding High Outcome Engineering Organization for Tech Startup.pptx
Building High Outcome Engineering Organization for Tech Startup.pptx
 
Professional software engineers
Professional software engineersProfessional software engineers
Professional software engineers
 
Kuliah umum intro to programming @ feb unpad
Kuliah umum intro to programming @ feb unpadKuliah umum intro to programming @ feb unpad
Kuliah umum intro to programming @ feb unpad
 
Platform as a Service for Your App Development
Platform as a Service for Your App DevelopmentPlatform as a Service for Your App Development
Platform as a Service for Your App Development
 
Public speaking for tech conference puja pramudya
Public speaking for tech conference   puja pramudyaPublic speaking for tech conference   puja pramudya
Public speaking for tech conference puja pramudya
 
Introduction to ASPNET Core
Introduction to ASPNET CoreIntroduction to ASPNET Core
Introduction to ASPNET Core
 
Build intelligent chatbot with bot framework
Build intelligent chatbot with bot frameworkBuild intelligent chatbot with bot framework
Build intelligent chatbot with bot framework
 
How is AI driving mobile app development
How is AI driving mobile app developmentHow is AI driving mobile app development
How is AI driving mobile app development
 
Xamarin and azure iot
Xamarin and azure iotXamarin and azure iot
Xamarin and azure iot
 
Intelligent Mobile App with Azure Cognitive Services
Intelligent Mobile App with Azure Cognitive ServicesIntelligent Mobile App with Azure Cognitive Services
Intelligent Mobile App with Azure Cognitive Services
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
Unlocking digital opportunity in Southeast Asia
Unlocking digital opportunity in Southeast AsiaUnlocking digital opportunity in Southeast Asia
Unlocking digital opportunity in Southeast Asia
 
Platform as a Service for Rapid Development
Platform as a Service for Rapid DevelopmentPlatform as a Service for Rapid Development
Platform as a Service for Rapid Development
 
Running Web & Mobile App on Azure App Service
Running Web & Mobile App on Azure App ServiceRunning Web & Mobile App on Azure App Service
Running Web & Mobile App on Azure App Service
 
Launching Aplikasi Biru Dongker 2006
Launching Aplikasi Biru Dongker 2006Launching Aplikasi Biru Dongker 2006
Launching Aplikasi Biru Dongker 2006
 
Samosir
SamosirSamosir
Samosir
 
Intro to Product Development
Intro to Product DevelopmentIntro to Product Development
Intro to Product Development
 
Bandung Developer Day - Simple Analytic
Bandung Developer Day - Simple AnalyticBandung Developer Day - Simple Analytic
Bandung Developer Day - Simple Analytic
 
Build modern web & api
Build modern web & apiBuild modern web & api
Build modern web & api
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Introduction to ARM

Notas do Editor

  1. After achieving success with the BBC Micro computer, Acorn Computers Ltd considered how to move on from the relatively simple MOS Technology 6502 processor to address business markets like the one that would soon be dominated by the IBM PC, launched in 1981. The Acorn Business Computer (ABC) plan required a number of second processors to be made to work with the BBC Micro platform, but processors such as the Motorola 68000 and National Semiconductor 32016 were unsuitable, and the 6502 was not powerful enough for a graphics based user interface.[citation needed]Acorn would need a new architecture, having tested all of the available processors and found them wanting. Acorn then seriously considered designing its own processor, and their engineers came across papers on the Berkeley RISC project. They felt it showed that if a class of graduate students could create a competitive 32-bit processor, then Acorn would have no problem. A trip to the Western Design Center in Phoenix, where the 6502 was being updated by what was effectively a single-person company, showed Acorn engineers Steve Furber[5] and Sophie Wilson that they did not need massive resources and state-of-the-art R&D facilities.Wilson set about developing the instruction set, writing a simulation of the processor in BBC Basic that ran on a BBC Micro with a second 6502 processor. It convinced the Acorn engineers that they were on the right track. Before they could go any further, however, they would need more resources. It was time for Wilson to approach Acorn's CEO, Hermann Hauser, and explain what was afoot. Once the go-ahead had been given, a small team was put together to implement Wilson's model in hardware.
  2. The cause of confusion here is the term “word” which will mean 16-bits to people with a 16-bit background.In the ARM world 16-bits is a “halfword” as the architecture is a 32-bit one, whereas “word” means 32-bits.Java bytecodes are 8-bit instructions designed to be architecture independent. Jazelle transparently executes most bytecodes in hardware and some in highly optimized ARM code. This is due to a tradeoff between hardware complexity (power consumption & silicon area) and speed.60 % bytecode di hardware
  3. The ARM has seven basic operating modes:User : unprivileged mode under which most tasks runFIQ : entered when a high priority (fast) interrupt is raisedIRQ : entered when a low priority (normal) interrupt is raisedSupervisor : entered on reset and when a Software Interrupt instruction is executedAbort : used to handle memory access violationsUndef : used to handle undefined instructionsSystem : privileged mode using the same registers as user modeThe Programmers Model can be split into two elements - first of all, the processor modes and secondly, the processor registers. So let’s start by looking at the modes.Now the typical application will run in an unprivileged mode know as “User” mode, whereas the various exception types will be dealt with in one of the privileged modes : Fast Interrupt, Supervisor, Abort, Normal Interrupt and Undefined (and we will look at what causes each of the exceptions later on).NB - spell out the word FIQ, otherwise you are saying something rude in German!One question here is what is the difference between the privileged and unprivileged modes? Well in reality very little really - the ARM core has an output signal (nTRANS on ARM7TDMI, InTRANS, DnTRANS on 9, or encoded as part of HPROT or BPROT in AMBA) which indicates whether the current mode is privileged or unprivileged, and this can be used, for instance, by a memory controller to only allow IO access in a privileged mode. In addition some operations are only permitted in a privileged mode, such as directly changing the mode and enabling of interrupts.All current ARM cores implement system mode (added in architecture v4). This is simply a privileged version of user mode. Important for re-entrant exceptions because no exceptions can cause system mode to be entered.
  4. Prosesnya :1. Data basukmelaluiData bus2. Data dapatmerupakanInstruction yang harusdieksekusiatauData Item3. Instruction decoder mentranslasiinstruksisebelumdieksekusi4. Load instructions copy data dari memory ke register dansebaliknya instructions copy data from register ke memory (gaada data processing instructions 5. yang secaralangsungmemanipulasi data dalam memory6. Data Item ditempatkandiregister file. Dua register sumberadalah (RndanRm), dan single result register Rd. Rmbisadi preprocessed dalam barrel shifter sebelummasukke ALU.7. Bersamasama barrel shifter dan ALU bisamengkalkulasikanekspresidanpengalamatannya.8. Setelahmelewati ALU, hasilnyadituliskedalam Rd dandikembalikanke register menggunakanResult bus.
  5. The Barrel ShifterA barrel shifter is a digital circuit that can shift a data word by a specified number of bits in one clock cycle* The ARM doesn’t have actual shift instructions.* Instead it has a barrel shifter which provides a mechanism to carry out shifts as part of other instructions.So what operations does the barrel shifter support?LOGICAL SHIFTS LEFT (LSL) – LOGICAL SHIFTS RIGHT (LSR) – ROTATE RIGHT (RR) - Rotate Right Extended (RRX)
  6. Arithmetic Operations* Operations are:• ADD operand1 + operand2• ADC operand1 + operand2 + carry• SUB operand1 - operand2• SBC operand1 - operand2 + carry -1 • RSB operand2 - operand1• RSC operand2 - operand1 + carry - 1* Syntax:• <Operation>{<cond>}{S} Rd, Rn, Operand2* Examples• ADD r0, r1, r2• SUBGT r3, r3, #1• RSBLES r4, r5, #5Comparisons* The only effect of the comparisons is to• UPDATE THE CONDITION FLAGS. Thus no need to set S bit.* Operations are:• CMP operand1 - operand2, but result not written• CMN operand1 + operand2, but result not written• TST operand1 AND operand2, but result not written• TEQ operand1 EOR operand2, but result not written* Syntax:• <Operation>{<cond>} Rn, Operand2* Examples:• CMP r0, r1• TSTEQ r2, #5Logical Operations* Operations are:• AND operand1 AND operand2• EOR operand1 EOR operand2• ORR operand1 OR operand2• BIC operand1 AND NOT operand2 [ie bit clear]* Syntax:• <Operation>{<cond>}{S} Rd, Rn, Operand2* Examples:• AND r0, r1, r2• BICEQ r2, r3, #7• EORS r1,r3,r0Data Movement* Operations are:• MOV operand2• MVN NOT operand2Note that these make no use of operand1.* Syntax:• <Operation>{<cond>}{S} Rd, Operand2* Examples:• MOV r0, r1• MOVS r2, #10• MVNEQ r1,#0
  7. Variable cycle execution for certain instructions—Not every ARM instruction executesin a single cycle. For example, load-store-multiple instructions vary in the numberof execution cycles depending upon the number of registers being transferred. Thetransfer can occur on sequentialmemory addresses, which increases performance sincesequential memory accesses are often faster than random accesses. Code density is alsoimproved since multiple register transfers are common operations at the start and endof functions.
  8. Arithmetic Operations* Operations are:• ADD operand1 + operand2• ADC operand1 + operand2 + carry• SUB operand1 - operand2• SBC operand1 - operand2 + carry -1 • RSB operand2 - operand1• RSC operand2 - operand1 + carry - 1* Syntax:• <Operation>{<cond>}{S} Rd, Rn, Operand2* Examples• ADD r0, r1, r2• SUBGT r3, r3, #1• RSBLES r4, r5, #5Comparisons* The only effect of the comparisons is to• UPDATE THE CONDITION FLAGS. Thus no need to set S bit.* Operations are:• CMP operand1 - operand2, but result not written• CMN operand1 + operand2, but result not written• TST operand1 AND operand2, but result not written• TEQ operand1 EOR operand2, but result not written* Syntax:• <Operation>{<cond>} Rn, Operand2* Examples:• CMP r0, r1• TSTEQ r2, #5Logical Operations* Operations are:• AND operand1 AND operand2• EOR operand1 EOR operand2• ORR operand1 OR operand2• BIC operand1 AND NOT operand2 [ie bit clear]* Syntax:• <Operation>{<cond>}{S} Rd, Rn, Operand2* Examples:• AND r0, r1, r2• BICEQ r2, r3, #7• EORS r1,r3,r0Data Movement* Operations are:• MOV operand2• MVN NOT operand2Note that these make no use of operand1.* Syntax:• <Operation>{<cond>}{S} Rd, Operand2* Examples:• MOV r0, r1• MOVS r2, #10• MVNEQ r1,#0
  9. The Barrel ShifterA barrel shifter is a digital circuit that can shift a data word by a specified number of bits in one clock cycle* The ARM doesn’t have actual shift instructions.* Instead it has a barrel shifter which provides a mechanism to carry out shifts as part of other instructions.So what operations does the barrel shifter support?LOGICAL SHIFTS LEFT (LSL) – LOGICAL SHIFTS RIGHT (LSR) – ROTATE RIGHT (RR) - Rotate Right Extended (RRX)
  10. ARM = RISC, load-store architectures, maksudnyaprosesorhanyaberinteraksidengan memory sebatas load,dan store, tidak support memory untukoperasipemrosesan data memory, harusmemindahkannilai data ke register sebelumdigunakanLoad data values dari memory ke register, data diproses di register menggunakansejumlahinstruksi data processing (nggakdiperlambat memory access), store hasildari register ke memorySingle register data transfer (LDR/STR), block data transfer (LDM/STM), Single Data Swap (SWP)Throughput : jumlah proses yang dapatterjadidalamsatu periodARM = RISC, load-store architectures, maksudnyaprosesorhanyaberinteraksidengan memory sebatas load,dan store, tidak support memory untukoperasipemrosesan data memory, harusmemindahkannilai data ke register sebelumdigunakanLoad data values dari memory ke register, data diproses di register menggunakansejumlahinstruksi data processing (nggakdiperlambat memory access), store hasildari register ke memorySingle register data transfer (LDR/STR), block data transfer (LDM/STM), Single Data Swap (SWP)Throughput : jumlah proses yang dapatterjadidalamsatu period
  11. Instruksiiniyaitu load/store satu word atau byte dari/kememoridari/ke registerInstruksi : LDR / STR / LDRB / STRB<LDR|STR>{cond}{B}{T} Rd,<Address>Base register berfungsiuntukmenyimpanlokasimemori yang akandiaksesSelagiakseslokasi yang aktual, instruksidapatmengakses offset lokasidari pointerOffset : bisa unsigned 12bit immediate value atau registerPrefix ‘+’ : add. ‘-’ : substractPre-indexed addressing dan post-indexed addressing
  12. STR r0, [r1, #12]
  13. Instruksiiniyaitu load/store banyak register dari/kememoridalamsatuwaktu. Dengan kata lain membolehkanantara 1 hingga 16 registers untukditransfer.Instruksi : LDM / STM <LDM|STM>{cond}<FD|ED|FA|EA|IA|IB|DA|DB> Rn{!},<Rlist>{^}Register yang ditransferdapatberupa subset dari current bank of registers atau user mode bank of registersMode direct copy dan stack
  14. Stack Modes Full DescendingFull AscendingEmpty DescendingEmpty AscendingStack adalah areamemori yang berkembangketika data barudipushke top-nya, danmenyusutketikadipopBatas stack ditentukanoleh base pointer dan stack pointerNilai stack pointer dapatberupa last occupied address atau next occupied address
  15. Menggunakan r12, r13 + r14 sebagai pointer meninggalkan r0-r11 untukpenggunaandalam block copyAkan membutuhkanpenyimpanan r0-r12 + r14 kedalamtumpukan (sehinggadapatmerestorenilaiasliketika copy berakhir). Menyimpan r13 pada word yang diketahuidalam memory jugadapatmenyebabkanhaltersebut (restore).Menggunakaninkremensetelah addressing4 bytes per register (12 registers) => 48 bytes per iteration LDM - 14 cycles STM - 13 cycles CMP - 1 cycle BNE - 3 cycles Total = 31 cycles to move 48 bytes