Embedded Processor Cores. National Chiao Tung University Chun-Jen Tsai 5/30/2011
|
|
- Noreen Hutchinson
- 5 years ago
- Views:
Transcription
1 Embedded Processor Cores National Chiao Tung University Chun-Jen Tsai 5/30/2011
2 ARM History The first ARM processor was designed by Acron Computers Limited, Cambridge, England between 1983 and 1985 Based on RISC concepts at Stanford and Berkeley in 1980 First RISC processor for commercial use ARM (Advanced RISC Machine) established in 1990 ARM is not an IC vender, but a fabless design house ARM also develops tools to facilitate ARM-based system development: Software tools, boards, debug hardware, application software, bus architectures, peripherals etc 2/57
3 ARM vs. Berkeley RISC Features used Load/Store architecture Fixed-length instructions (32-bit or 16-bit) Large register banks 3-address instruction formats: Features rejected f bits n bits n bits n bits function dest. operand operand 1 operand 2 Register windows too costly, use shadow registers instead Delayed branch replaced by branch prediction Single-cycle execution load/store instructions require at least two cycles, unless data & instruction memories are separated 3/57
4 ARM vs. Intel Atom ARM Cortex-A8 TSMC 65nm process Die size: 4mm 2 with I/D- cache Clock Freq.: 1GHz Power: 0.45 W Intel Atom (Core Architecture) Intel High-k 45nm process Die size: 25mm 2 Clock Freq.: 0.8GHz~1.8GHz Power: 0.6W~2.5W 4/57
5 Generic ARM7 Architecture Register Bank 2 read ports, 1 write ports, access any register additional read and write ports for r15 (PC) Barrel Shifter Shift or rotate the operand by any number of bits Multiplier ALU Addr. register and incrementer Instruction Decode and Control Data In/Out Registers ALU BUS A[31:0] PC A BUS address register register bank (31 32-bit) incrementer 32 8 multiplier ALU barrel shifter PC B BUS control scan control instruction decode & control data out register data in register D[31:0] 5/57
6 Data Processing Instructions All operations take place in a single clock cycle address register address register increment increment Rd PC registers Rn Rm mult Rd registers Rn mult PC as ins. as ins. as instruction as instruction [7:0] data out data in i. pipe data out data in i. pipe (a) register - r egister operations (b) register - immediate operations 6/57
7 Data Transfer Instructions Address calculation is similar to a data processing instruction address register address register increment increment registers Rn PC Rn PC registers Rd mult mult lsl #0 shifter = A / A + B / A - B [11:0] = A + B / A - B data out data in i. pipe byte? data in i. pipe (a) 1st cycle - compute address (b) 2nd cycle - store data & auto-index For load instruction, the data from memory only gets as far as the data in register on the 2nd cycle and a 3rd cycle is needed to transfer the data from there to the destination register 7/57
8 Branch Instructions A branch instruction takes three cycles address register address register increment registers PC mult lsl #2 increment R14 registers PC mult shifter = A + B = A [23:0] data out data in i. pipe data out data in i. pipe (a) 1st cycle - compute branch tar get (b) 2nd cycle - save r eturn address The third cycle, which is required to complete the pipeline refilling, is also used to update the value of the link register so that it points directly at the instruction which follows the branch 8/57
9 Pipeline Organization 9/57
10 ARM9 vs. ARM7 Pipeline Operations Due to higher clock rate, there is not enough time to translate Thumb instructions into ARM instructions and then decode 10/57
11 ARM9 Forwarding Architecture Forwarding mechanism: The ALU result from the EX/MEM register is always fed back to the ALU input latches If the forwarding hardware detects that the previous ALU operation has written the register corresponding to the source for the current ALU operation, control logic selects the forwarded result as the ALU input rather than the value read from the register file 11/57
12 Data Hazards Data hazards occur when the pipeline changes the order of read/write accesses to operands so that a data is needed before it is updated Clock cycle number ADD R1,R2,R3 IF ID EX MEM WB SUB R4,R5,R1 IF ID sub EX MEM WB AND R6,R1,R7 IF ID and EX MEM WB OR R8,R1,R9 IF ID or EX MEM WB XOR R10,R1,R11 IF ID xor EX MEM WB 12/57
13 Forwarding The problem with data hazards sometimes can be solved with a simple hardware technique called data forwarding Clock cycle number ADD R1,R2,R3 IF ID EX MEM WB SUB R4,R5,R1 IF ID sub EX MEM WB AND R6,R1,R7 IF ID and EX MEM WB 13/57
14 Instruction Reshuffling The load instruction has a delay or latency that cannot be eliminated by forwarding alone LDR R1,@(R2) IF ID EX MEM WB SUB R4,R1,R5 IF ID stall EX sub MEM WB AND R6,R7,R8 IF stall ID EX MEM WB We can reshuffle the instructions to avoid the stall LDR R1,@(R2) IF ID EX MEM WB AND R6,R7,R8 IF ID EX MEM WB SUB R4,R1,R5 IF ID EX sub MEM WB 14/57
15 Co-Processor Interface ARM has a general-purpose coprocessor interface: Coprocessors use user-defined extension of ARM instructions Support for up to 16 logical coprocessors Each coprocessor can have up to 16 registers of any size Coprocessors use a load-store architecture: the LSU moves data between private registers and memory/arm registers ASEL ARM Core DIN DOUT CSEL 0 1 Memory system CPDIN CPOUT CPDRIVE Coprocessor Note: Coprocessor does not control address bus ARM generates the required addresses. 15/57
16 ARM Data Types ARM has two states of operation: Regular state: 32-bit instructions, word-aligned Thumb state: 16-bit instructions, half-word aligned ARM processor supports 6 data types 8-bits signed and unsigned bytes 16-bits signed and unsigned half-word, aligned on 2-byte boundaries 32-bits signed and unsigned words, aligned on 4-byte boundaries Un-aligned data access are void be careful with pointer arithmetic in C 16/57
17 ARM Registers ARM has 37 registers, all of which are 32 bits long 1 program counter (PC), 1 current program status register, 5 saved status registers, and 30 general purpose registers Convention: r13 as stack pointer, r14 as link register Processor mode governs which bank is accessible r0. r7 r8 r9 r10 r11 r12 r13 r14 r15 (PC) r8_fiq r9_fiq r10_fiq r11_fiq r12_fiq r13_fiq r14_fiq r13_svc r14_svc r13_abt r14_abt usable in user mode system modes only r13_irq r14_irq r13_und r14_und CPSR SPSR_fiq SPSR_svc SPSR_abt SPSR_irq SPSR_und user mode fiq mode svc mode abort mode irq mode undefined mode 17/57
18 Exception Operations Upon an exception, ARM does the following things Completes the current instruction as best as it can Departs from the current instruction sequence to handle the exception which starts from a specific location Processor performs the following sequence: Change the operating mode of the particular exception Save the return address in r14 of the new mode Save the old value of CPSR in the SPSR of the new mode Mask out further IRQ or FIQ by setting the related CPSR bit Set PC to the entry point of the exception handling routine 18/57
19 Exception Entry Point The entry points of exceptions: Exception Type Mode Vector address Priority Reset SVC 0x Undefined Instruction UND 0x Software Interrupt (SWI) SVC 0x Prefetch abort (instruction fetch memory fault) Abort 0x C 5 Data abort (data access memory fault) Abort 0x IRQ (normal interrupt) IRQ 0x FIQ (fast interrupt) FIQ 0x C 3 Note that the vector address is the ENTRY POINT of the exception handling routine This is different from the x86 interrupt vector table! Normally, the entry point contains a branch instruction to the Real interrupt handling routine 19/57
20 Exception Return Once the exception has been handled, the user task is normally resumed The code sequence is Restored modified user registers from the handler s stack Restore CPSR from the appropriate SPSR Set PC to the return address The last two steps happen atomically as part of a single instruction 20/57
21 ARM Instruction Set Features Conditional execution of every instruction If the condition is false, the instruction becomes NOP Shift, ALU operation in a single instruction Compression of immediate operands and address offset in 32-bit instructions Your high-level language coding style may have noticeable performance impact Compact instruction mode: Thumb mode 21/57
22 ARM Instruction Coding Format 22/57
23 Conditional Execution Other processors typically only allow branches to be executed conditionally ARM allows conditional execution on everything All instructions contain a condition field which determines whether the CPU will execute them or not Non-executed instructions still take up 1 cycle This greatly reduces branches which stall the pipeline Allows very dense in-line code The time penalty of not executing several conditional instructions is frequently less than that of a branch However, for a large block of conditional codes, you should still use conditional branches 23/57
24 Conditional Execution Example For short conditional sequence, it is better to exploit conditional execution than to use a branch CMP r0,#5 BEQ Bypass ;if (r0!=5) ADD r1,r1,r0 ;{r1=r1+r0} SUB r1,r1,r2 Bypass CMP r0,#5 ADDNE r1,r1,r0 SUBNE r1,r1,r2 Conditional execution can also implements short circuit expressions: if ((a==b) && (c==d)) e++; CMP r0,r1 CMPEQ r2,r3 ADDEQ r4,r4,#1 24/57
25 Using Barrel Shifter for 2 nd Operand Register with shift operation Shift value can be either 5-bit unsigned integer Specified in bottom byte of another register Example: ADD r3,r2,r1,lsl#3 ; r3 := r2 + 8*r1 Used for multiplication by constant Immediate value constant 8-bit number, with a range of 0 ~ 255 Rotated right thru. even number of positions Allows increased range of 32-bit constants 25/57
26 Multiplication by a Constant Multiplication by a constant equals to 2 n 1 can be done in a single cycle, for example: r0 = r1 5 r0 = r1 + (r1 4) ADD r0,r1,r1,lsl #2 Other type of constant multiplications can be carried out by combining several instructions: r2 = r3 119 r2 = r r2 = r3 (16 + 1) (8-1) ADD r2,r3,r3,lsl #4 ; r2 := r3*17 RSB r2,r2,r2,lsl #3 ; r2 := r2*7 26/57
27 Loading Constants (1/2) No single ARM instruction can load a 32-bit immediate constant directly into a register All ARM instructions are 32-bit long ARM instructions do not use the instruction stream as data Data processing instruction has 12 bits available for operand 2: Use 8-bit for constants, give a range of Use 4-bit to specify number of right-rotation bits This gives a much larger range of constants that can be directly loaded, though some constants will still need to be loaded from memory 27/57
28 Loading Constant (2/2) To load a constant, simply move the required value into a register the assembler will convert to the rotated form for us MOV r0,#4096 ;MOV r0,#0x1000 (0x40 ror 26) The bitwise complements can be formed using MVN: MOV r0,#&ffffffff ;MVN r0,#0 Values that cannot be generated automatically will cause an error from the assembler 28/57
29 Loading 32-bit Constants To allow larger constants to be loaded, the assembler offers a pseudo-instruction: LDR Rd,=const This will either: Produce an MOV or MVN to generate the value if possible or Generate an LDR instruction with a PC-relative address to read the constant from a literal pool (constant data area embedded in the code) For example MOV r0,=&ff LDR r0,=& ;MOV r0,#0xff ;LDR r0,[pc,#imm10] 29/57
30 Multiple Register Data Transfer The load and store multiple instructions (LDM/STM) allows between 1 and 16 registers to be transferred to/from memory Order of register can t be specified, order in the list is insignificant Lowest register number is always transferred to/form lowest memory location The transferred register can be either LDMIA r1,{r0,r2,r5} ;r0:=mem[r1] ;r2:=mem[r1+4] ;r5:=mem[r1+8] Any subset of the current bank of registers (default) Any subset of the user mode bank of registers when in a privileged mode (postfix instruction with a ^ ) 30/57
31 Stack Operations Using LDM/STM Stack pointer (SP) points to the top of stack Full stack: sp points to the data item at TOS Empty stack: sp points to the next vacant slot 31/57
32 Branch and Link Instructions For single-level function call (faster): Perform a branch, save the return address in the link register, r14 BL SUBR ;branch to SUBR... ;return here SUBR... ;subroutine entry point MOV PC,r14 ;return For nested function calls, r14 and work registers must be pushed onto a stack in memory SUBR BL SUBR... STMFD r13!,{r0-r2,r14} ;save work and link reg LDMFD r13!,{r0-r2,pc} ;return 32/57
33 Why Do We Need Assembly? Today, there are few reasons why you want to write assembly code for RISC processors Interrupt Service Routine (ISR) is one of the reasons In addition to ISRs, there are some manipulations that can still be done more efficiently in assembly than in C code key point: compilers do not understand algorithms. Example: int b, c; b = c / 2; v.s. unsigned b, c; b = c / 2; 33/57
34 Example 1: Data-Packing/Unpacking Expand an array of signed half-word into an array of words (or vise versa): ADR r1,array1 ;half-word array start ADR r2,array2 ;word array start ADR r3,endarr1 ;ARRAY1 end + 2 Loop LDRSH r0,[r1],#2 ;get signed half-word STR r0,[r2],#4 ;save word CMP r1,r3 ;check for end of array BLT Loop ;if not finished, loop Code segments for packing/unpacking is important in HW/SW codesign, but cannot be done efficiently in C 34/57
35 Example 2: Endian Swapping Swapping endians of a data stream is useful in multimedia standards and communication protocols Swapping of bytes in r0 can be done in merely 4 instructions in assembly byteswap ; R0 = A, B, C, D EOR R1, R0, R0, ROR #16 ; R1 = A^C, B^D, C^A, D^B BIC R1, R1, #0x00FF00FF ; R1 = A^C, 0, C^A, 0 MOV R0, R0, ROR #8 ; R0 = D, A, B, C EOR R0, R0, R1, LSR #8 ; R0 = D, C, B, A David Seal Ed., ARM Architecture Reference Manual, 2nd Ed., Addison-Wesley, /57
36 Thumb-mode Instr. Compression Thumb instruction set is a subset of the ARM instruction set R0 R7: fully accessible High register R8 R12: only accessible with MOV, ADD, CMP; only CMP sets the condition code flags Most Thumb instructions use unconditional execution Many Thumb data processing instructions use twoaddress format, i.e., the destination register is the same as one of the source registers Thumb instruction formats are less regular than ARM instruction formats dense encoding 36/57
37 Mixed-State Operations The code density of Thumb and its performance for narrow memory system make it ideal for the bulk of C code in embedded systems However there is still a need to switch between ARM and Thumb state within most applications: ARM state provides better performance for wide memory Some functions only provided in ARM state Access to CPSR Access to coprocessors Exception handling ARM state is automatically entered upon exception 37/57
38 Switching between States State-switching is achieved using the Branch Exchange instructions In Thumb state BX Rn In ARM state (on Thumb-aware cores only) BX<condition> Rn Where Rn can be any registers (R0 to R15) Bit 0 of Rn specifies the state to change to Bit 0 of Rn is copied into the T bit in CPSR Bit 31 1 of Rn is copied into PC Bit 0 of PC is set to 0 in both modes Bit 1 of PC is set to 0 in ARM mode 38/57
39 Review: Converged Multimedia Platform If hardware/software co-design are done correctly, the only architecture we need is possibly just: GPP core 2nd-level cache ASIP cores external memory interface Smart DMA smart interconnect interface shared RAM DSP core single-port RAM dual-port RAM 39/57
40 A Real Example: TI OMAP Open Multimedia Application Platform (OMAP): SDRAM SRAM Flash SRAM External OMAP Internal SRAM / Frame buffer DMA Traffic controller Memory I/F LCD Controller 55x DSP Subsystem DARAM SARAM DMA MPUI TI-Enhanced ARM925T Subsystem UART USB Host/Client McBSP SD/MMC Timer (x3) WDT Interrupt controller McBSP (x2) GPIO UART Mailbox Timer (x3) WDT RTC Interrupt controller I2C HOST Camera I/F Memory Stick 40/57
41 General DSP Concept DSP are special-purpose processors that are designed to provide flexibility of a CPU and the speed close to ASIC (for certain applications) DSP programs are usually stored in on-chip memory To reduce the code size, assembly programming are usually used for DSP software development Key issues for a DSP design: Speed Power consumption Code density 41/57
42 Filter: Motivating Problem for DSP DSP were originally designed to perform fast calculation of FIR filter: y(n) = k = 0..K 1 h(k) x(n k) The key architecture: Multiply-and-Accumulate (MAC) h(k) x(n-k) Multiply ADD/SUB Accumulator y(n) Each MAC operation requires two data fetches, one multiply, one accumulate, and write back 42/57
43 TI-C55x CPU Architecture 43/57
44 Register Files (1/3) 44/57
45 Register Files (2/3) 45/57
46 Register Files (3/3) 46/57
47 Memory-Mapped Registers Most C55x registers are mapped to some memory addresses. For example: Auxiliary registers are mapped to 0x10 ~ 0x17 This is very convenient for MCU DSP inter-processor communications 47/57
48 Instruction Buffer Unit (I Unit) During each CPU cycle: Receives four bytes of code from the 32-bit program bus Decodes one to six bytes of code at the head of the queue I unit passes the decoded information to the P unit, the A unit, and the D unit for execution of the instructions Great for looping block code! 48/57
49 Address Data Flow Unit (A Unit) Generates the addresses for data read/write accesses Contains all the logic and registers necessary to calculate the addresses for the three data-read address buses and the two data-write address buses Contains a general-purpose 16-bit arithmetic logic unit (ALU) with shifting capability Typically for address calculation Ref.: C55x Technical Overview, TI spru393, page /57
50 Data Computation Unit (D Unit) (1/2) Primary part of the CPU where data is processed: Three data-read buses feed the two MAC units and the 40-bit ALU The parallelism of D unit minimizes the required task cycles Ref.: TMS320C55x Technical Overview, TI spru393, page /57
51 Data Computation Unit (2/2) Dual MAC architecture: In a single cycle, each MAC unit can perform a 17-bit by 17- bit multiplication and a 40-bit addition or subtraction with optional 32-/40-bit saturation The three data-read buses can carry two data streams and a common coefficient stream to the two MAC units The results from the MAC units can be placed in any of four 40-bit accumulators within the D unit Other modules, e.g. ALU and shifter, are common in general-purpose processors (like ARM) 51/57
52 C55x Image/Video HW Extention C55x has the following hardware extension for image and video applications DCT/IDCT Pixel Interpolation Motion Estimation Ref.: TMS320C55x Hardware Extensions for Image/Video Applications Programmer s Reference, TI spru098 52/57
53 Pixel Interpolation HW Ext. (1/2) Pixel interpolation extension for video encoding Note: Rnd = 0 or 1 An instruction is provided to handle a 2x2 block 53/57
54 Pixel Interpolation HW Ext. (2/2) Pixel interpolation extension for video decoding Note: only one of U-, M-, or R-type of pixels are required for decoding; M is shown as an example here No special instruction is designed for decoding, existing architecture can perform this efficiently 54/57
55 Optimizing Data Types DSP processors natural data types are very different from RISC processors. For example, TI C55x data types are: char short int long long long float double 16 bits 16 bits 16 bits 32 bits 40 bits 32 bits 64 bits exchanging optimal data structures between RISC and DSP becomes a crucial issue 55/57
56 Coding for Compiler Optimization How do we write C code to use the 16-bit 16-bit 32-bit engine in the DSP? long res = (long)(int)src1 * (long)(int)src2; How about using the 32-bit 16-bit 32-bit MAC engine? long mult(int a, int b) { long result; result = a * b; /* incorrect */ result = (long) (a * b); /* incorrect */ result = (long)a * b; /* correct */ } return result; 56/57
57 Software Pipelining With proper hints to the compiler, you can enable software pipelining in a loop using C code: int a[8], b[8]; long e[8], f[8], c[8], d[8];... for (idx = 0; idx < 8; idx++) { e[idx] = (long) a[idx]*b[idx]; /* use MAC */ f[idx] = (long)(int)c[idx] * (long)(int)d[idx]; /* use ALU-16 */ } 57/57
Outline. ARM Introduction & Instruction Set Architecture. ARM History. ARM s visible registers
Outline ARM Introduction & Instruction Set Architecture Aleksandar Milenkovic E-mail: Web: milenka@ece.uah.edu http://www.ece.uah.edu/~milenka ARM Architecture ARM Organization and Implementation ARM Instruction
More informationVE7104/INTRODUCTION TO EMBEDDED CONTROLLERS UNIT III ARM BASED MICROCONTROLLERS
VE7104/INTRODUCTION TO EMBEDDED CONTROLLERS UNIT III ARM BASED MICROCONTROLLERS Introduction to 32 bit Processors, ARM Architecture, ARM cortex M3, 32 bit ARM Instruction set, Thumb Instruction set, Exception
More informationARM ARCHITECTURE. Contents at a glance:
UNIT-III ARM ARCHITECTURE Contents at a glance: RISC Design Philosophy ARM Design Philosophy Registers Current Program Status Register(CPSR) Instruction Pipeline Interrupts and Vector Table Architecture
More informationThe ARM instruction set
Outline: The ARM instruction set privileged modes and exceptions instruction set details system code example hands-on: system software - SWI handler 2005 PEVE IT Unit ARM System Design Instruction set
More informationCS 310 Embedded Computer Systems CPUS. Seungryoul Maeng
1 EMBEDDED SYSTEM HW CPUS Seungryoul Maeng 2 CPUs Types of Processors CPU Performance Instruction Sets Processors used in ES 3 Processors used in ES 4 Processors used in Embedded Systems RISC type ARM
More informationARM Assembly Language
ARM Assembly Language Introduction to ARM Basic Instruction Set Microprocessors and Microcontrollers Course Isfahan University of Technology, Dec. 2010 1 Main References The ARM Architecture Presentation
More informationWilliam Stallings Computer Organization and Architecture 8 th Edition. Chapter 12 Processor Structure and Function
William Stallings Computer Organization and Architecture 8 th Edition Chapter 12 Processor Structure and Function CPU Structure CPU must: Fetch instructions Interpret instructions Fetch data Process data
More informationHi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan
ARM Programmers Model Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan chanhl@maili.cgu.edu.twcgu Current program status register (CPSR) Prog Model 2 Data processing
More informationARM Processors ARM ISA. ARM 1 in 1985 By 2001, more than 1 billion ARM processors shipped Widely used in many successful 32-bit embedded systems
ARM Processors ARM Microprocessor 1 ARM 1 in 1985 By 2001, more than 1 billion ARM processors shipped Widely used in many successful 32-bit embedded systems stems 1 2 ARM Design Philosophy hl h Low power
More informationARM Instruction Set. Computer Organization and Assembly Languages Yung-Yu Chuang. with slides by Peng-Sheng Chen
ARM Instruction Set Computer Organization and Assembly Languages g Yung-Yu Chuang with slides by Peng-Sheng Chen Introduction The ARM processor is easy to program at the assembly level. (It is a RISC)
More informationProcessor Structure and Function
WEEK 4 + Chapter 14 Processor Structure and Function + Processor Organization Processor Requirements: Fetch instruction The processor reads an instruction from memory (register, cache, main memory) Interpret
More information18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture
18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture Anthony Rowe Electrical and Computer Engineering Carnegie Mellon University Basic Computer Architecture Embedded Real-Time Systems 2 Memory
More informationARM Instruction Set. Introduction. Memory system. ARM programmer model. The ARM processor is easy to program at the
Introduction ARM Instruction Set The ARM processor is easy to program at the assembly level. (It is a RISC) We will learn ARM assembly programming at the user level l and run it on a GBA emulator. Computer
More informationHercules ARM Cortex -R4 System Architecture. Processor Overview
Hercules ARM Cortex -R4 System Architecture Processor Overview What is Hercules? TI s 32-bit ARM Cortex -R4/R5 MCU family for Industrial, Automotive, and Transportation Safety Hardware Safety Features
More informationARM Assembly Programming
Introduction ARM Assembly Programming The ARM processor is very easy to program at the assembly level. (It is a RISC) We will learn ARM assembly programming at the user level and run it on a GBA emulator.
More informationWilliam Stallings Computer Organization and Architecture 10 th Edition Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+ William Stallings Computer Organization and Architecture 10 th Edition 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. 2 + Chapter 14 Processor Structure and Function + Processor Organization
More informationIntroduction to the ARM Processor Using Intel FPGA Toolchain. 1 Introduction. For Quartus Prime 16.1
Introduction to the ARM Processor Using Intel FPGA Toolchain For Quartus Prime 16.1 1 Introduction This tutorial presents an introduction to the ARM Cortex-A9 processor, which is a processor implemented
More informationCISC RISC. Compiler. Compiler. Processor. Processor
Q1. Explain briefly the RISC design philosophy. Answer: RISC is a design philosophy aimed at delivering simple but powerful instructions that execute within a single cycle at a high clock speed. The RISC
More informationIntroduction to the ARM Processor Using Altera Toolchain. 1 Introduction. For Quartus II 14.0
Introduction to the ARM Processor Using Altera Toolchain For Quartus II 14.0 1 Introduction This tutorial presents an introduction to the ARM Cortex-A9 processor, which is a processor implemented as a
More informationProcessor Status Register(PSR)
ARM Registers Register internal CPU hardware device that stores binary data; can be accessed much more rapidly than a location in RAM ARM has 13 general-purpose registers R0-R12 1 Stack Pointer (SP) R13
More informationARM Assembly Language. Programming
Outline: ARM Assembly Language the ARM instruction set writing simple programs examples Programming hands-on: writing simple ARM assembly programs 2005 PEVE IT Unit ARM System Design ARM assembly language
More informationARM Instruction Set Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
ARM Instruction Set Architecture Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Condition Field (1) Most ARM instructions can be conditionally
More informationSystems Architecture The ARM Processor
Systems Architecture The ARM Processor The ARM Processor p. 1/14 The ARM Processor ARM: Advanced RISC Machine First developed in 1983 by Acorn Computers ARM Ltd was formed in 1988 to continue development
More informationARM Architecture (1A) Young Won Lim 3/20/18
Copyright (c) 2014-2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published
More informationHi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan
Processors Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan chanhl@maili.cgu.edu.twcgu General-purpose p processor Control unit Controllerr Control/ status Datapath ALU
More information18-349: Introduction to Embedded Real- Time Systems Lecture 3: ARM ASM
18-349: Introduction to Embedded Real- Time Systems Lecture 3: ARM ASM Anthony Rowe Electrical and Computer Engineering Carnegie Mellon University Lecture Overview Exceptions Overview (Review) Pipelining
More informationARM-7 ADDRESSING MODES INSTRUCTION SET
ARM-7 ADDRESSING MODES INSTRUCTION SET Dr. P. H. Zope 1 Assistant Professor SSBT s COET Bambhori Jalgaon North Maharashtra University Jalgaon India phzope@gmail.com 9860631040 Addressing modes When accessing
More informationChapter 15. ARM Architecture, Programming and Development Tools
Chapter 15 ARM Architecture, Programming and Development Tools Lesson 4 ARM CPU 32 bit ARM Instruction set 2 Basic Programming Features- ARM code size small than other RISCs 32-bit un-segmented memory
More informationThe ARM processor. Morgan Kaufman ed Overheads for Computers as Components
The ARM processor Born in Acorn on 1983, after the success achieved by the BBC Micro released on 1982. Acorn is a really smaller company than most of the USA competitors, therefore it initially develops
More informationARM Cortex-A9 ARM v7-a. A programmer s perspective Part 2
ARM Cortex-A9 ARM v7-a A programmer s perspective Part 2 ARM Instructions General Format Inst Rd, Rn, Rm, Rs Inst Rd, Rn, #0ximm 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7
More informationARM Processors for Embedded Applications
ARM Processors for Embedded Applications Roadmap for ARM Processors ARM Architecture Basics ARM Families AMBA Architecture 1 Current ARM Core Families ARM7: Hard cores and Soft cores Cache with MPU or
More informationARM and the ARM Powered logo are trademarks of Advanced RISC Machines Ltd.
ARM 710a Proprietary Notice macrocell Preliminary Data Sheet Document Number: Issued: September 1995 Copyright Advanced RISC Machines Ltd (ARM) 1995 ARM and the ARM Powered logo are trademarks of Advanced
More informationLecture 10 Exceptions and Interrupts. How are exceptions generated?
Lecture 10 Exceptions and Interrupts The ARM processor can work in one of many operating modes. So far we have only considered user mode, which is the "normal" mode of operation. The processor can also
More information15CS44: MICROPROCESSORS AND MICROCONTROLLERS. QUESTION BANK with SOLUTIONS MODULE-4
15CS44: MICROPROCESSORS AND MICROCONTROLLERS QUESTION BANK with SOLUTIONS MODULE-4 1) Differentiate CISC and RISC architectures. 2) Explain the important design rules of RISC philosophy. The RISC philosophy
More informationThe ARM Instruction Set
The ARM Instruction Set Minsoo Ryu Department of Computer Science and Engineering Hanyang University msryu@hanyang.ac.kr Topics Covered Data Processing Instructions Branch Instructions Load-Store Instructions
More informationChapter 15. ARM Architecture, Programming and Development Tools
Chapter 15 ARM Architecture, Programming and Development Tools Lesson 5 ARM 16-bit Thumb Instruction Set 2 - Thumb 16 bit subset Better code density than 32-bit architecture instruction set 3 Basic Programming
More informationChapter 2 Instructions Sets. Hsung-Pin Chang Department of Computer Science National ChungHsing University
Chapter 2 Instructions Sets Hsung-Pin Chang Department of Computer Science National ChungHsing University Outline Instruction Preliminaries ARM Processor SHARC Processor 2.1 Instructions Instructions sets
More informationENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design
ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2016 1 ISA is the HW/SW
More informationBitwise Instructions
Bitwise Instructions CSE 30: Computer Organization and Systems Programming Dept. of Computer Science and Engineering University of California, San Diego Overview v Bitwise Instructions v Shifts and Rotates
More informationInput/Output. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Input/Output Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu mechanism I/O Devices Usually includes some non-digital component Typical digital interface
More informationECE 471 Embedded Systems Lecture 5
ECE 471 Embedded Systems Lecture 5 Vince Weaver http://www.eece.maine.edu/ vweaver vincent.weaver@maine.edu 17 September 2013 HW#1 is due Thursday Announcements For next class, at least skim book Chapter
More informationEmbedded Systems Ch 15 ARM Organization and Implementation
Embedded Systems Ch 15 ARM Organization and Implementation Byung Kook Kim Dept of EECS Korea Advanced Institute of Science and Technology Summary ARM architecture Very little change From the first 3-micron
More informationMNEMONIC OPERATION ADDRESS / OPERAND MODES FLAGS SET WITH S suffix ADC
ECE425 MNEMONIC TABLE MNEMONIC OPERATION ADDRESS / OPERAND MODES FLAGS SET WITH S suffix ADC Adds operands and Carry flag and places value in destination register ADD Adds operands and places value in
More informationARM Architecture and Instruction Set
AM Architecture and Instruction Set Ingo Sander ingo@imit.kth.se AM Microprocessor Core AM is a family of ISC architectures, which share the same design principles and a common instruction set AM does
More informationThis section covers the MIPS instruction set.
This section covers the MIPS instruction set. 1 + I am going to break down the instructions into two types. + a machine instruction which is directly defined in the MIPS architecture and has a one to one
More informationARM processor organization
ARM processor organization P. Bakowski bako@ieee.org ARM register bank The register bank,, which stores the processor state. r00 r01 r14 r15 P. Bakowski 2 ARM register bank It has two read ports and one
More informationComparison InstruCtions
Status Flags Now it is time to discuss what status flags are available. These five status flags are kept in a special register called the Program Status Register (PSR). The PSR also contains other important
More informationArm Architecture. Enrique Secanechia Santos, Kevin Mesolella
Arm Architecture Enrique Secanechia Santos, Kevin Mesolella Outline History What is ARM? What uses ARM? Instruction Set Registers ARM specific instructions/implementations Stack Interrupts Pipeline ARM
More informationARM System Design. Aim: to introduce. ARM-based embedded system design the ARM and Thumb instruction sets. the ARM software development toolkit
Aim: to introduce ARM System Design ARM-based embedded system design the ARM and Thumb instruction sets including hands-on programming sessions the ARM software development toolkit used in the hands-on
More informationARM Processor. Dr. P. T. Karule. Professor. Department of Electronics Engineering, Yeshwantrao Chavan College of Engineering, Nagpur
ARM Processor Dr. P. T. Karule Professor Department of Electronics Engineering, Yeshwantrao Chavan College of Engineering, Nagpur 441 110 1 What is ARM? Advanced RISC Machine. 32-bit architecture. ARM
More informationDHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE6008 Microcontroller based system design
DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING Year: IV EE6008 Microcontroller based system design Semester : VII UNIT IV INTRODUCTION TO ARM PROCESSOR
More informationARM Instruction Set 1
ARM Instruction Set 1 What is an embedded system? Components: Processor(s) Co-processors (graphics, security) Memory (disk drives, DRAM, SRAM, CD/DVD) input (mouse, keyboard, mic) output (display, printer)
More informationARM Cortex M3 Instruction Set Architecture. Gary J. Minden March 29, 2016
ARM Cortex M3 Instruction Set Architecture Gary J. Minden March 29, 2016 1 Calculator Exercise Calculate: X = (45 * 32 + 7) / (65 2 * 18) G. J. Minden 2014 2 Instruction Set Architecture (ISA) ISAs define
More information6x86 PROCESSOR Superscalar, Superpipelined, Sixth-generation, x86 Compatible CPU
1-6x86 PROCESSOR Superscalar, Superpipelined, Sixth-generation, x86 Compatible CPU Product Overview Introduction 1. ARCHITECTURE OVERVIEW The Cyrix 6x86 CPU is a leader in the sixth generation of high
More informationUniversität Dortmund. ARM Architecture
ARM Architecture The RISC Philosophy Original RISC design (e.g. MIPS) aims for high performance through o reduced number of instruction classes o large general-purpose register set o load-store architecture
More informationOctober, Saeid Nooshabadi. Overview COMP 3221
Overview COMP 3221 Microprocessors and Embedded Systems Lectures 28: Exceptions & Interrupts - II http://www.cse.unsw.edu.au/~cs3221 Instruction Set Support for Exceptions Role of O/S in Handling Exceptions
More informationInstruction Set Architecture (ISA)
Instruction Set Architecture (ISA) Encoding of instructions raises some interesting choices Tradeoffs: performance, compactness, programmability Uniformity. Should different instructions Be the same size
More informationTopic 10: Instruction Representation
Topic 10: Instruction Representation CSE 30: Computer Organization and Systems Programming Summer Session II Dr. Ali Irturk Dept. of Computer Science and Engineering University of California, San Diego
More informationChapter 4. Enhancing ARM7 architecture by embedding RTOS
Chapter 4 Enhancing ARM7 architecture by embedding RTOS 4.1 ARM7 architecture 4.2 ARM7TDMI processor core 4.3 Embedding RTOS on ARM7TDMI architecture 4.4 Block diagram of the Design 4.5 Hardware Design
More informationChapters 5. Load & Store. Embedded Systems with ARM Cortex-M. Updated: Thursday, March 1, 2018
Chapters 5 Load & Store Embedded Systems with ARM Cortex-M Updated: Thursday, March 1, 2018 Overview: Part I Machine Codes Branches and Offsets Subroutine Time Delay 2 32-Bit ARM Vs. 16/32-Bit THUMB2 Assembly
More informationARM Shift Operations. Shift Type 00 - logical left 01 - logical right 10 - arithmetic right 11 - rotate right. Shift Amount 0-31 bits
ARM Shift Operations A novel feature of ARM is that all data-processing instructions can include an optional shift, whereas most other architectures have separate shift instructions. This is actually very
More informationEmbedded Operating Systems
Embedded Operating Systems Condensed version of Embedded Operating Systems course. Or how to write a TinyOS Part 2 Context Switching John Hatch Covered in Part One ARM registers and modes ARM calling standard
More informationARM Processor. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
ARM Processor Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu CPU Architecture CPU & Memory address Memory data CPU 200 ADD r5,r1,r3 PC ICE3028:
More informationOUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure
ARCHITECTURE AND PROGRAMMING George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners OUTLINE STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and
More informationThe ARM Instruction Set Architecture
The ARM Instruction Set Architecture Mark McDermott With help from our good friends at ARM Fall 008 Main features of the ARM Instruction Set All instructions are 3 bits long. Most instructions execute
More informationCamellia Getting Started with ARM922T
A Hand-Out 1 Getting Started with ARM922T Las Palmas de G. C., Canary Islands Jul, 15 th, 2002 Reny / IUMA-ULPGC ARM922T Overview 2 Harvard Architecture (Data and instruction are located in different memories).
More informationARM Cortex-M4 Programming Model
ARM Cortex-M4 Programming Model ARM = Advanced RISC Machines, Ltd. ARM licenses IP to other companies (ARM does not fabricate chips) 2005: ARM had 75% of embedded RISC market, with 2.5 billion processors
More informationUNIT 2 PROCESSORS ORGANIZATION CONT.
UNIT 2 PROCESSORS ORGANIZATION CONT. Types of Operand Addresses Numbers Integer/floating point Characters ASCII etc. Logical Data Bits or flags x86 Data Types Operands in 8 bit -Byte 16 bit- word 32 bit-
More informationECE 471 Embedded Systems Lecture 2
ECE 471 Embedded Systems Lecture 2 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 3 September 2015 Announcements HW#1 will be posted today, due next Thursday. I will send out
More informationWhat is Pipelining? Time per instruction on unpipelined machine Number of pipe stages
What is Pipelining? Is a key implementation techniques used to make fast CPUs Is an implementation techniques whereby multiple instructions are overlapped in execution It takes advantage of parallelism
More informationEmbedded Systems Ch 12B ARM Assembly Language
Embedded Systems Ch 12B ARM Assembly Language Byung Kook Kim Dept of EECS Korea Advanced Institute of Science and Technology Overview 6. Exceptions 7. Conditional Execution 8. Branch Instructions 9. Software
More informationARM Cortex-M4 Programming Model Memory Addressing Instructions
ARM Cortex-M4 Programming Model Memory Addressing Instructions References: Textbook Chapter 4, Sections 4.1-4.5 Chapter 5, Sections 5.1-5.4 ARM Cortex-M Users Manual, Chapter 3 2 CPU instruction types
More informationLecture 15 ARM Processor A RISC Architecture
CPE 390: Microprocessor Systems Fall 2017 Lecture 15 ARM Processor A RISC Architecture Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030
More informationECE 571 Advanced Microprocessor-Based Design Lecture 3
ECE 571 Advanced Microprocessor-Based Design Lecture 3 Vince Weaver http://www.eece.maine.edu/ vweaver vincent.weaver@maine.edu 22 January 2013 The ARM Architecture 1 Brief ARM History ACORN Wanted a chip
More informationARM968E-S. Technical Reference Manual. Revision: r0p1. Copyright 2004, 2006 ARM Limited. All rights reserved. ARM DDI 0311D
ARM968E-S Revision: r0p1 Technical Reference Manual Copyright 2004, 2006 ARM Limited. All rights reserved. ARM DDI 0311D ARM968E-S Technical Reference Manual Copyright 2004, 2006 ARM Limited. All rights
More informationThe ARM Cortex-M0 Processor Architecture Part-2
The ARM Cortex-M0 Processor Architecture Part-2 1 Module Syllabus ARM Cortex-M0 Processor Instruction Set ARM and Thumb Instruction Set Cortex-M0 Instruction Set Data Accessing Instructions Arithmetic
More informationA block of memory (FlashROM) starts at address 0x and it is 256 KB long. What is the last address in the block?
A block of memory (FlashROM) starts at address 0x00000000 and it is 256 KB long. What is the last address in the block? 1 A block of memory (FlashROM) starts at address 0x00000000 and it is 256 KB long.
More informationMICROPROCESSORS AND MICROCONTROLLERS 15CS44 MODULE 4 ARM EMBEDDED SYSTEMS & ARM PROCESSOR FUNDAMENTALS ARM EMBEDDED SYSTEMS
15CS44 MODULE 4 ARM EMBEDDED SYSTEMS & ARM PROCESSOR FUNDAMENTALS ARM EMBEDDED SYSTEMS The ARM processor core is a key component of many successful 32-bit embedded systems. ARM cores are widely used in
More informationArchitecture. Digital Computer Design
Architecture Digital Computer Design Architecture The architecture is the programmer s view of a computer. It is defined by the instruction set (language) and operand locations (registers and memory).
More informationASSEMBLY LANGUAGE MACHINE ORGANIZATION
ASSEMBLY LANGUAGE MACHINE ORGANIZATION CHAPTER 3 1 Sub-topics The topic will cover: Microprocessor architecture CPU processing methods Pipelining Superscalar RISC Multiprocessing Instruction Cycle Instruction
More informationElements of CPU performance
Elements of CPU performance Cycle time. CPU pipeline. Superscalar design. Memory system. Texec = instructions ( )( program cycles instruction seconds )( ) cycle ARM7TDM CPU Core ARM Cortex A-9 Microarchitecture
More informationEE251: Tuesday September 5
EE251: Tuesday September 5 Shift/Rotate Instructions Bitwise logic and Saturating Instructions A Few Math Programming Examples ARM Assembly Language and Assembler Assembly Process Assembly Structure Assembler
More informationInstruction Set Principles and Examples. Appendix B
Instruction Set Principles and Examples Appendix B Outline What is Instruction Set Architecture? Classifying ISA Elements of ISA Programming Registers Type and Size of Operands Addressing Modes Types of
More informationECE 598 Advanced Operating Systems Lecture 7
ECE 598 Advanced Operating Systems Lecture 7 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 5 February 2015 Announcements Homework #2 was assigned, due Wednesday Don t put it
More informationInstruction Pipelining Review
Instruction Pipelining Review Instruction pipelining is CPU implementation technique where multiple operations on a number of instructions are overlapped. An instruction execution pipeline involves a number
More informationLatches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter
IT 3123 Hardware and Software Concepts Notice: This session is being recorded. CPU and Memory June 11 Copyright 2005 by Bob Brown Latches Can store one bit of data Can be ganged together to store more
More informationTypical Processor Execution Cycle
Typical Processor Execution Cycle Instruction Fetch Obtain instruction from program storage Instruction Decode Determine required actions and instruction size Operand Fetch Locate and obtain operand data
More informationSamsung S3C4510B. Hsung-Pin Chang Department of Computer Science National Chung Hsing University
Samsung S3C4510B Hsung-Pin Chang Department of Computer Science National Chung Hsing University S3C4510B A 16/32-bit RISC microcontroller is a cost-effective, highperformance microcontroller 16/32-bit
More informationThe Nios II Family of Configurable Soft-core Processors
The Nios II Family of Configurable Soft-core Processors James Ball August 16, 2005 2005 Altera Corporation Agenda Nios II Introduction Configuring your CPU FPGA vs. ASIC CPU Design Instruction Set Architecture
More informationSneha Rajguru & Prajwal Panchmahalkar
Sneha Rajguru & Prajwal Panchmahalkar Sneha Rajguru Security Consultant, Payatu Technologies Pvt Ltd. @sneharajguru Prajwal Panchmahalkar Red Team Lead Security Engineer, VMware @pr4jwal Introduction to
More informationChapter 2A Instructions: Language of the Computer
Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction
More information2 MARKS Q&A 1 KNREDDY UNIT-I
2 MARKS Q&A 1 KNREDDY UNIT-I 1. What is bus; list the different types of buses with its function. A group of lines that serves as a connecting path for several devices is called a bus; TYPES: ADDRESS BUS,
More informationAND SOLUTION FIRST INTERNAL TEST
Faculty: Dr. Bajarangbali P.E.S. Institute of Technology( Bangalore South Campus) Hosur Road, ( 1Km Before Electronic City), Bangalore 560100. Department of Electronics and Communication SCHEME AND SOLUTION
More informationOverview COMP 3221 Bitwise Logical Operations
Overview COMP 3221 Microprocessors and Embedded Systems Lecture 9: C/Assembler Logical and Shift - I http://www.cse.unsw.edu.au/~cs3221 August, 2003 Saeid@unsw.edu.au Bitwise Logical Operations OR AND
More informationThe Original Instruction Pipeline
Agenda ARM Architecture Family The ARM Architecture and ISA Architecture Overview Family of cores Pipeline Datapath AMBA Bus Intelligent Energy Manager Instruction Set Architecture Mark McDermott With
More informationJob Posting (Aug. 19) ECE 425. ARM7 Block Diagram. ARM Programming. Assembly Language Programming. ARM Architecture 9/7/2017. Microprocessor Systems
Job Posting (Aug. 19) ECE 425 Microprocessor Systems TECHNICAL SKILLS: Use software development tools for microcontrollers. Must have experience with verification test languages such as Vera, Specman,
More informationThese actions may use different parts of the CPU. Pipelining is when the parts run simultaneously on different instructions.
MIPS Pipe Line 2 Introduction Pipelining To complete an instruction a computer needs to perform a number of actions. These actions may use different parts of the CPU. Pipelining is when the parts run simultaneously
More informationThe ARM Architecture
The ARM Architecture Leonid Ryzhyk June 5, 2006 1 Introduction ARM is a a 32-bit RISC processor architecture currently being developed by the ARM corporation. The business l behind
More informationCortex M3 Programming
Cortex M3 Programming EE8205: Embedded Computer Systems http://www.ee.ryerson.ca/~courses/ee8205/ Dr. Gul N. Khan http://www.ee.ryerson.ca/~gnkhan Electrical and Computer Engineering Ryerson University
More informationLecture 4 (part 2): Data Transfer Instructions
Lecture 4 (part 2): Data Transfer Instructions CSE 30: Computer Organization and Systems Programming Diba Mirza Dept. of Computer Science and Engineering University of California, San Diego Assembly Operands:
More information