The ARM Architecture. With a focus on v7a and Cortex-A8



Similar documents
ARM Microprocessor and ARM-Based Microcontrollers

THUMB Instruction Set

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

ARM Instruction Set. ARM7TDMI-S Data Sheet. Final - Open Access

ARM Architecture. ARM history. Why ARM? ARM Ltd developed by Acorn computers. Computer Organization and Assembly Languages Yung-Yu Chuang

An Introduction to the ARM 7 Architecture

A Choices Hypervisor on the ARM architecture

Cortex-A9 MPCore Software Development

Exception and Interrupt Handling in ARM

Software based Finite State Machine (FSM) with general purpose processors

Developer Suite ARM. Assembler Guide. Version 1.2. Copyright 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Compilation Tools. RealView. Developer Guide. Version 4.0. Copyright ARM. All rights reserved. ARM DUI 0203J (ID101213)

A Survey on ARM Cortex A Processors. Wei Wang Tanima Dey

ARM Cortex-M3 Introduction. ARM University Relations

ARM Accredited Engineer AAE Syllabus. Document number: ARM AEG 0052C Copyright ARM Limited 2012

StrongARM** SA-110 Microprocessor Instruction Timing

ARM, the ARM Powered logo, BlackICE and ICEbreaker are trademarks of Advanced RISC Machines Ltd.

ARM Cortex-R Architecture

ARM. The ARM Instruction Set. Advanced RISC Machines. The ARM Instruction Set - ARM University Program - V1.0 1

Overview of the Cortex-M3

An Introduction to Assembly Programming with the ARM 32-bit Processor Family

BEAGLEBONE BLACK ARCHITECTURE MADELEINE DAIGNEAU MICHELLE ADVENA

Interrupt handling. Andrew N. Sloss

Which ARM Cortex Core Is Right for Your Application: A, R or M?

Cortex -A15. Technical Reference Manual. Revision: r2p0. Copyright 2011 ARM. All rights reserved. ARM DDI 0438C (ID102211)

ARM VIRTUALIZATION FOR THE MASSES. Christoffer Dall

ARM Webinar series. ARM Based SoC. Abey Thomas

Hardware accelerated Virtualization in the ARM Cortex Processors

World-wide University Program

CSE597a - Cell Phone OS Security. Cellphone Hardware. William Enck Prof. Patrick McDaniel

Intel StrongARM SA-110 Microprocessor

ARM7TDMI-S. Technical Reference Manual. (Rev 3) Copyright ARM Limited All rights reserved. ARM DDI 0084F

ARM Processors and the Internet of Things. Joseph Yiu Senior Embedded Technology Specialist, ARM

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Architectures, Processors, and Devices

ARM Cortex-M3 Assembly Language

Computer Organization and Architecture

Get Better Code Density than 8/16 bit MCU s NXP LPC1100 Cortex M0. Oct 2009

Instruction Set Architecture

The Future of the ARM Processor in Military Operations

The ARM Cortex-A9 Processors

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

STM32 F-2 series High-performance Cortex-M3 MCUs

Mobile and Embedded/IoT market Overview and Trends. June 2014

Cortex -M3. Technical Reference Manual. Revision: r1p1. Copyright 2005, 2006 ARM Limited. All rights reserved. ARM DDI 0337E

Introduction to RISC Processor. ni logic Pvt. Ltd., Pune

Instruction Set Design

AVR32. Architecture Document. Feature Summary

Exploring the Design of the Cortex-A15 Processor ARM s next generation mobile applications processor. Travis Lanier Senior Product Manager

CPU Organization and Assembly Language

Cortex -A Series. Programmer s Guide. Version: 2.0. Copyright 2011 ARM. All rights reserved. ARM DEN0013B (ID082411)

UNIT 4 Software Development Flow

Architecture and Implementation of the ARM Cortex -A8 Microprocessor

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Application Note 195. ARM11 performance monitor unit. Document number: ARM DAI 195B Issued: 15th February, 2008 Copyright ARM Limited 2007

SOC architecture and design

Dongwoo Kim : Hyeon-jeong Lee s Husband

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

Applications Development on the ARM Cortex -M0+ Free On-line Development Tools Presented by William Antunes

CHAPTER 7: The CPU and Memory

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

Cortex -A7 Floating-Point Unit

System Design Issues in Embedded Processing

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

How To Port From The Ark7Tdmi To The Corporum3 Processor

Programming Techniques

Five Families of ARM Processor IP

PROBLEMS #20,R0,R1 #$3A,R2,R4

Instruction Set Architecture (ISA)

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Embedded Development Tools

An Overview of Stack Architecture and the PSC 1000 Microprocessor

Cortex -M0 Devices. Generic User Guide. Copyright 2009 ARM Limited. All rights reserved. ARM DUI 0497A (ID112109)

ARMv8 Technology Preview. By Richard Grisenthwaite Lead Architect and Fellow. ARM

Building A RISC Microcontroller in an FPGA

Virtualization in the ARMv7 Architecture Lecture for the Embedded Systems Course CSD, University of Crete (May 20, 2014)

Cortex -A7 MPCore. Technical Reference Manual. Revision: r0p5. Copyright ARM. All rights reserved. ARM DDI 0464F (ID080315)

LSN 2 Computer Processors

Microprocessor & Assembly Language

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

Towards A Unified Hardware Abstraction Layer Architecture for Embedded Systems

MICROPROCESSOR AND MICROCOMPUTER BASICS

VLIW Processors. VLIW Processors

The ARM Processor Architecture

MACHINE ARCHITECTURE & LANGUAGE

M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Microprocessor and Microcontroller Architecture

PART B QUESTIONS AND ANSWERS UNIT I

EECS 427 RISC PROCESSOR

Design of Pipelined MIPS Processor. Sept. 24 & 26, 1997

picojava TM : A Hardware Implementation of the Java Virtual Machine

A case study of mobile SoC architecture design based on transaction-level modeling

8051 hardware summary

Programming the ARM Microprocessor for Embedded Systems

Pentium vs. Power PC Computer Architecture and PCI Bus Interface

Transcription:

The ARM Architecture With a focus on v7a and Cortex-A8 1

Agenda Introduction to ARM Ltd ARM Processors Overview ARM v7a Architecture/Programmers Model Cortex-A8 Memory Management Cortex-A8 Pipeline 2

ARM Ltd Founded in November 1990 Spun out of Acorn Computers Initial funding from Apple, Acorn and VLSI Designs the ARM range of RISC processor cores Licenses ARM core designs to semiconductor partners who fabricate and sell to their customers ARM does not fabricate silicon itself Also develop technologies to assist with the designin of the ARM architecture Software tools, boards, debug hardware Application software Bus architectures Peripherals, etc 3

ARM s Activities Connected Community Development Tools Software IP Processors memory System Level IP: Data Engines Fabric 3D Graphics Physical IP 4 SoC

Huge Range of Applications Intelligent toys Utility Meters IR Fire Detector Exercise Machines Energy Efficient Appliances Tele-parking Equipment Adopting 32-bit ARM Microcontrollers 5 Intelligent Vending

Agenda Introduction to ARM Ltd ARM Processors Overview ARM v7a Architecture/Programmers Model Cortex-A8 Memory Management Cortex-A8 Pipeline 6

ARM Cortex Processors (v7) ARM Cortex-A family (v7-a): Applications processors for full OS and 3rd party applications ARM Cortex-R family (v7-r): Cortex-A15...2.5GHz x1-4 Cortex-A9 Cortex-A8 x1-4 Embedded processors for real-time signal processing, control applications ARM Cortex-M family (v7-m): x1-4 Microcontroller-oriented processors for MCU and SoC applications Cortex-A5 1-2 R Heron Cortex-R4 Cortex-M4 Cortex -M3 SC300 Cortex-M1 Cortex-M0 12k gates... 7

Relative Performance* 2500 Max Frequency (Mhz) 2000 1500 1000 500 0 Max Freq (MHz) Min Power (mw/mhz) CortexM0 CortexM3 ARM7 ARM926 ARM1026 ARM1136 ARM1176 Cortex-A8 Cortex-A9 Dual-core 50 150 184 470 540 610 750 1100 2000 0.012 0.06 0.35 0.235 0.36 0.335 0.568 0.43 0.5 *Represents attainable speeds in 130, 90, 65, or 45nm processes 8

Cortex family Cortex-A8 Cortex-R4 Cortex-M3 Architecture v7m MPU (optional) AHB Lite & APB 9 Architecture v7a MMU AXI VFP & NEON support Architecture v7r MPU (optional) AXI Dual Issue

Agenda Introduction to ARM Ltd ARM Processors Overview ARM v7a Architecture/Programmers Model Cortex-A8 Memory Management Cortex-A8 Pipeline 10

Cortex-A8 Block Diagram Instruction Fetch Unit L1 I Cache Instruction Decode Unit Instruction Execute & Load/Store NEON Media Processor L1 D Cache L2 Memory System Cortex-A8 AXI Level 3 Memory Interface 11

ARM Cortex-A Architecture Cortex A Base Architecture Cortex-A8 Extensions Thumb-2 technology for power efficient execution TrustZoneTM for secure applications v6 SIMD for compatibility with ARM11 media acceleration applications 12 Jazelle-RCT for efficient acceleration of execution environments such as Java and Microsoft.NET NEON technology accelerating multimedia gaming and signal processing applications VFPv3 supports full IEEE 754 specification and has been expanded to support 32 registers

Data Sizes and Instruction Sets The ARM is a 32-bit architecture. When used in relation to the ARM: Byte means 8 bits Halfword means 16 bits (two bytes) Word means 32 bits (four bytes) Most ARM s implement two instruction sets 32-bit ARM Instruction Set 16-bit Thumb Instruction Set Jazelle cores can also execute Java bytecode 13

ARM and Thumb Performance 30000 25000 Dhrystone 2.1/sec @ 20MHz 20000 15000 ARM Thumb 10000 5000 0 32-bit 16-bit 16-bit with 32-bit stack Memory width (zero wait state) 14

The Thumb-2 instruction set Variable-length instructions ARM instructions are a fixed length of 32 bits Thumb instructions are a fixed length of 16 bits Thumb-2 instructions can be either 16-bit or 32-bit Thumb-2 gives approximately 26% improvement in code density over ARM Thumb-2 gives approximately 25% improvement in performance over Thumb 15

Cortex-A8 Processor Modes User - used for executing most application programs FIQ - used for handling fast interrupts IRQ - used for general-purpose interrupt handling Supervisor - a protected mode for the Operating System Undefined - entered upon Undefined Instruction exceptions Abort - entered after Data or Pre-fetch Aborts System - privileged user mode for the Operating System Monitor - a secure mode for TrustZone 16

Cortex-A8 Register File User/Sys FIQ IRQ SVC User mode r0-r12 User mode r0-r12 Undef Abort Mon User mode r0-r12 User mode r0-r12 User mode r0-r12 r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 (sp) r14 (lr) r15 (pc) r8 r9 r10 r11 r12 r13 (sp) r14 (lr) r15 (pc) r13 (sp) r14 (lr) r15 (pc) r13 (sp) r14 (lr) r15 (pc) r13 (sp) r14 (lr) r15 (pc) r13 (sp) r14 (lr) r15 (pc) r13 (sp) r14 (lr) r15 (pc) cpsr spsr spsr spsr spsr spsr spsr User mode r0-r7 Note: System mode uses the User mode register set 17

Cortex-A8 Exception Handling When an exception occurs, the ARM: Copies CPSR into SPSR_<mode> Sets appropriate CPSR bits Change to ARM state Change to exception mode Disable interrupts (if appropriate) 0x1C* 0x18* 0x14* 0x10* Stores the return address in LR_<mode> 0x0C* 0x08* Sets PC to vector address 0x04* To return, exception handler needs to:0x00* Restore CPSR from SPSR_<mode> Restore PC from LR_<mode> This can only be done in ARM state. 18 FIQ IRQ (Reserved) Data Abort Prefetch Abort SVC or SMC Undefined Instruction Reset Vector Table * Represents an offset, as vector table can moved to different base addresses

Cortex-A8 Program Status Register 31 27 26 25 24 23 Flags 20 19 IT1:0 J Reserved 16 15 GE3:0 New IT field in Program Status Registers 10 9 IT7:2 5 4 E A I F T 0 M4:0 Bits 7:5 indicate base condition Bits 4:0 indicate the number of instructions and condition/inverse condition Updated by IT, BX, BLX, BXJ instructions Loads to PC (except in User mode) New execution state (CPSR/SPSR) J bit 0 0 1 1 T bit 0 1 0 1 State ARM Thumb Jazelle-DBX Thumb2-EE EnterX / LeaveX instructions 19

Conditional Execution and Flags ARM instructions can be made to execute conditionally by postfixing them with the appropriate condition code field. This improves code density and performance by reducing the number of forward branch instructions. CMP r3,#0 CMP r3,#0 BEQ skip ADDNE r0,r1,r2 ADD r0,r1,r2 skip By default, data processing instructions do not affect the condition code flags but the flags can be optionally set by using S. CMP does not need S. loop decrement r1 and set flags SUBS r1,r1,#1 BNE loop if Z flag clear then branch 20

16-bit Conditional Execution If Then (IT) instruction added (16 bit) Up to 3 additional then or else conditions maybe specified (T or E) Makes up to 4 following instructions conditional ITTET EQ Inst 1 Inst 2 Inst 3 Inst 4 21 MOVEQ ADDEQ SUBNE ORREQ Any normal ARM condition code can be used 16-bit instructions in block do not affect condition code flags Apart from comparison instruction 32 bit instructions may affect flags (normal rules apply) Current if-then status stored in CPSR Conditional block maybe safely interrupted and returned to Must NOT branch into or out of if-then block

Branch instructions Branch : B{<cond>} label Branch with Link : BL{<cond>} subroutine_label 31 28 27 Cond 25 24 23 0 1 0 1 L Offset Link bit 0 = Branch 1 = Branch with link Condition field The processor core shifts the offset field left by 2 positions, sign-extends it and adds it to the PC 22 ± 32 Mbyte range How to perform longer branches?

Data processing Instructions Consist of : Arithmetic: Logical: Comparisons: Data movement: ADD AND CMP MOV ADC ORR CMN MVN SUB EOR TST SBC BIC TEQ RSB These instructions only work on registers, NOT memory. Syntax: <Operation>{<cond>}{S} Rd, Rn, Operand2 23 Comparisons set flags only - they do not specify Rd Data movement does not specify Rn Second operand is sent to the ALU via barrel shifter. RSC

Using a Barrel Shifter:The 2nd Operand Operand 1 Operand 2 Register, optionally with shift operation Shift value can be either be: 5 bit unsigned integer Barrel Shifter Specified in bottom byte of another register. Used for multiplication by constant Immediate value ALU Result 24 8 bit number, with a range of 0-255. Rotated right through even number of positions Allows increased range of 32-bit constants to be loaded directly into registers

Single register data transfer LDR LDRB LDRH STR Word STRB Byte STRH Halfword LDRSB Signed byte load LDRSH Signed halfword load Memory system must support all access sizes Syntax: LDR{<cond>}{<size>} Rd, <address> STR{<cond>}{<size>} Rd, <address> e.g. LDREQB 25

Agenda Introduction to ARM Ltd ARM Processors Overview ARM v7a Architecture/Programmers Model Cortex-A8 Memory Management Cortex-A8 Pipeline 26

Memory Protection Physical Memory Privileged Mode OS Code + Data OS User Mode Application Code 27 Application Code + Data

Memory Allocation Physical Memory Privileged Mode Virtual Address Physical Address OS Code + Data OS Memory Management Unit User Mode Application Code User Mode Application Code 28 Application Code + Data Application Code + Data

Memory Management Memory Management Unit (MMU) Controls accesses to and from external memory Assigns access permissions to memory regions Performs virtual to physical address translation Instruction and Data Translation Look-Aside Buffers (TLB) Contains recent virtual to physical address translations Associates an ASID with each entry ASID identifies which process is currently active DTLB MMU Control logic ITLB cp15 Data Cache Cortex-A8 Core L2 Cache Control and RAM 29 Instruction Cache

Agenda Introduction to ARM Ltd ARM Processors Overview ARM v7a Architecture/Programmers Model Cortex-A8 Memory Management Cortex-A8 Pipeline 30

Full Cortex-A8 Pipeline Diagram 13-Stage Integer Pipeline NEON register file Architectural register file 31 10-Stage NEON Pipeline

Security - TrustZone Security Property of the System which ensures resources of value cannot be copied, damaged or made un-available to genuine users Security cannot be foolproof so focus should be on Assets to protect Attacks against which it has to be protected Goal: Attack A on Asset B will take Y days at Z dollars cost Need for Security Embedded devices are handling data of increasing value such as Banking data 32 Different market sectors have need different needs. Ex Mobile Sector, Consumer electronics

Cellular Handset SoC Design 33

TrustZone 34

35

Cortex-A8 References Cortex-A8 Technical Reference Manual ARM Architecture Reference Manual v7-ar RealView Compilation Tools Compiler Reference Guide RealView Compilation Tools Compiler User Guide http://infocenter.arm.com 36

ARM University Program Resources http://www.arm.com/support/university/ University@arm.com 37

Fin 38