UNITIII 1 ARM SYSTEM ARCHITECTURE Prof Prasad Mahale
- Slides: 45
UNIT-III 1 ARM SYSTEM ARCHITECTURE Prof. Prasad Mahale
2 OUTLINE RISC design philosophy ARM design philosophy Embedded system hardware Embedded system software Registers Current program status register Pipeline, Exception, Interrupts Vector table Core Extensions Architecture revision ARM Processor families
3 RISC Design Philosophy Reduce Philosophy Complexity Heat Space Time Power Cost RISC is a design philosophy aimed at delivering simple but powerful instructions that execute within a single cycle at a high clock speed. It provide greater flexibility and intelligence in software rather than hardware.
4 RISC Design Philosophy RISC design places greater demand on compilers. Emphasis on software's Fixed length instructions
RISC Design Philosophy 5 The RISC philosophy is implemented with four major design rules: q. Instructions RISC processors have a reduced number of instruction classes. Each instruction is a fixed length. CISC processors the instructions are often of variable size and take many cycles to execute. q. Pipelines The processing of instructions is broken down into smaller units. No need for an instruction to be executed by a mini program called microcode as on CISC processors.
RISC Design Philosophy 6 Registers act as the fast local memory store for all data processing operations. In contrast, CISC processors have dedicated registers for specific purposes. Load-store architecture The processor operates on data held in registers. Separating memory accesses from data processing.
ARM Design Philosophy 7 ARM It is used for commercial purpose Application: video games, modems, mobile phones, handy cameras. Features: Architectural simplicity, it allows very small implementation, results in very low power consumption.
8 ARM Design Philosophy There a number of physical features that have driven the ARM processor design. Portable embedded systems require some form of battery power. High code density is another major requirement. Reduce the area of the die taken up by the embedded processor. ARM has incorporated hardware debug technology within the processor. The ARM core is not a pure RISC architecture because of the constraints of its primary application—the embedded system
9 ARM Design Philosophy ARM RISC Arch. Enhancement § Large uniform register files § Each Instruction loads the ALU & Shifter § Load/Store § Auto increment & decrement addressing modes § Simple addressing modes § Multiple load/store § Uniform & fixed length instruction § Conditional execution.
Instruction Set for Embedded Systems 10 The ARM instruction set differs from the pure RISC definition in several ways that make the ARM instruction set suitable for embedded applications: Variable cycle execution for certain instructions. Inline barrel shifter leading to more complex instructions. Thumb 16 -bit instruction set. Conditional execution. Enhanced instructions.
Embedded System Hardware 11
ARM Bus Technology 12 Embedded systems use different bus technologies than those designed for x 86 PCs. Peripheral Component Interconnect (PCI) bus. This type of technology is external or off-chip and is built into the motherboard of a PC. Embedded devices use an on-chip bus. There are two different classes of devices attached to the bus. Bus master Bus slaves A bus has two architecture levels. Physical level Protocol
13 AMBA Bus Protocol The Advanced Microcontroller Bus Architecture (AMBA) was introduced in 1996 and has been widely adopted as the on-chip bus architecture used for ARM processors. AMBA buses introduced - ASB and APB – AHB. Using AMBA, peripheral designers can reuse the same design on multiple projects. This plug-and-play interface for hardware developers improves availability and time to market.
14 AMBA Bus Protocol AHB provides higher data throughput than ASB. This change allows the AHB bus to run at higher clock speeds. ARM has introduced two variations on the AHB bus: Multi-layer AHB and AHB-Lite. AHB and Multi-layer AHB support the same protocol for master and slave but have different interconnects. They permit operations to occur in parallel and allow for higher throughput rates.
15 Embedded System Software Initialization Code Hardware configuration Diagnostics Booting RTOS Operating System Applications Platform OS
16 ARM Core Architecture
17 Registers There are up to 18 active registers: 16 data registers and 2 processor status registers. Register r 13 is traditionally used as the stack pointer (sp) Register r 14 is called the link register (lr) Register r 15 is the program counter (pc) Depending upon the context, registers r 13 and r 14 can also be used as general-purpose registers.
Current Program Status Register (CPSR) 18 The ARM core uses the cpsr to monitor and control internal operations The cpsr is divided into four fields, each 8 bits wide: flags, status, extension, and control. Some ARM processor cores have extra bits allocated. For example, the J bit
19 Processor Mode It determines which registers are active and the access rights. Each processor mode is either privileged or non-privileged. There are seven processor modes in total: six privileged modes (abort, fast interrupt request, supervisor, system, and undefined) and one nonprivileged mode (user).
20 Processor Mode Abort Mode Fast Interrupt Request Mode Supervisor Mode Privilege System Mode Undefined Mode Non Privilege User Mode
21 Processor Mode
22
23 Banked Registers Above figure shows all 37 registers in the register file. They are available only when the processor is in a particular mode; for example, abort mode has banked registers r 13_abt, r 14_abt and spsr_abt. Every processor mode except user mode can change mode by writing directly to the mode bits of the CPSR. For example, when the processor is In the interrupt request mode, the instructions you execute still access registers named r 13 and r 14.
Banked Registers 24 What happens when an interrupt forces a mode change? The figure shows the core changing from user mode to interrupt request mode. r 13_irq contains the stack pointer for interrupt request mode. r 14_irq contains the return address. New register appearing in interrupt request mode: the saved program status register (SPSR), which stores the previous mode’s CPSR.
Thumb State 25 The state of the core determines which instruction set is being executed. There are three instruction sets: ARM, Thumb, and Jazelle. The ARM instruction set is only active when the processor is in ARM state. Similarly the Thumb instruction set is only active when the processor is in Thumb state.
Thumb State 26 The Jazelle J and Thumb T bits in the CPSR reflect the state of the processor. The ARM designers introduced a third instruction set called Jazelle executes 8 -bit instructions and is a hybrid mix of software and hardware designed to speed up the execution of Java bytecodes. IF J=0 T=0 ARM State J=0 T=1 Thumb State J=1 T=0 Jazelle State
27 Interrupt Mask Interrupt masks are used to stop specific interrupt requests from interrupting the processor. There are two interrupt request levels available on the ARM processor core— interrupt request (IRQ) and fast interrupt request (FIQ).
28 Condition Flags
29
30 Pipeline A pipeline is the mechanism a RISC processor uses to execute instructions. Using a pipeline speeds up execution. Fetch loads an instruction from memory. Decode identifies the instruction to be executed. Execute processes the instruction and writes the result back to a register.
31 Pipeline It shows a sequence of three instructions being fetched, decoded, and executed by the processor. Each instruction takes a single cycle to complete after the pipeline is filled. Filling the pipeline. Pipeline length increases - amount of work done reduced - allows the processor to attain a higher operating frequency. The system latency also increases because it takes more cycles to fill the pipeline before the core can execute an instruction.
Pipeline 32 ARM 9 to process on average 1. 1 Dhrystone MIPS per MHz—an increase in instruction throughput by around 13% compared with an ARM 7. The ARM 10 can process on average 1. 3 Dhrystone MIPS per MHz, about 34% more throughput than an ARM 7 processor core, but again at a higher latency cost. Code written for the ARM 7 will execute on an ARM 9 or ARM 10.
33 Pipeline Executing Characteristics An ARM 7 pipeline has executed an instruction only when the fourth instruction is fetched. The MSR instruction is used to enable IRQ interrupts. It clears the I bit in the CPSR to enable the IRQ interrupts.
34 Pipeline Executing Characteristics In the execute stage, the pc always points to the address of the instruction plus 8 bytes. This is important when the pc is used for calculating a relative offset and is an architectural characteristic across all the pipelines. Note when the processor is in Thumb state the pc is the instruction address plus 4.
35 Pipeline Executing Characteristics The execution of a branch instruction or branching by the direct modification of the pc causes the ARM core to flush its pipeline. ARM 10 uses branch prediction, which reduces the effect of a pipeline flush by predicting possible branches and loading the new branch address prior to the execution of the instruction. Third, an instruction in the execute stage will complete even though an interrupt has been raised.
Exceptions, Interrupts and the Vector 36 Table The address is within a special address range called the vector table. The memory map address 0 x 0000 is reserved for the vector table. Operating systems such as Linux and Microsoft’s embedded products can take advantage of this feature. When an exception or interrupt occurs, the processor suspends normal execution and starts loading instructions from the exception vector table. Reset vector Undefined instruction vector Software interrupt vector Prefetch abort vector Data abort vector Interrupt request vector - interrupt the normal execution flow of the processor. Fast interrupt request vector
37 Core Extensions The hardware extensions are standard components placed next to the ARM core. They improve performance, manage resources, and provide extra functionality and are designed to provide flexibility in handling particular applications. Each ARM family has different extensions available. There are three hardware extensions ARM wraps around the core: Cache and Tightly Coupled Memory Management. The Coprocessor Interface.
Cache and Tightly Coupled Memory 38 The cache is a block of fast memory placed between main memory and the core. Most ARM-based embedded systems use a single-level cache internal to the processor. ARM has two forms of cache. Von Neumann–style cores – combine both data and instruction into a single unified cache. Harvard-style cores - separate caches for data and instruction.
Cache and Tightly Coupled Memory 39
Cache and Tightly Coupled Memory 40 A cache provides an overall increase in performance but at the expense of predictable execution. But for real-time systems it is paramount that code execution is deterministic. This is achieved using a form of memory called tightly coupled memory (TCM). TCM is fast SRAM located close to the core and guarantees the clock cycles required to fetch instructions or data—critical for real-time algorithms requiring deterministic behavior. By combining both technologies, ARM processors can have both improved performance and predictable real-time response.
Cache and Tightly Coupled Memory 41
Memory Management And Coprocessors 42 ARM cores have three different types of memory management hardware. No extensions. A memory protection unit (MPU). A memory management unit (MMU). Coprocessors can be attached to the ARM processor. A coprocessor extends the processing features of a core by extending the instruction set or by providing configuration registers. The coprocessor can also extend the instruction set by providing a specialized group of new instructions.
Architecture Revision 43 ARM{x}-{y}-{z}-{T}-{D}-{M}-{I}-{E}-{J}-{F}-{S} Embedded ICE macrocell is the debug hardware built into the processor. Synthesizable means that the processor core is supplied as source code that can be compiled into form easily used by EDA tools.
44
45
- 1nd class lever
- Circumferential clasp and bar clasp
- Effort arm and resistance arm
- Effort arm and resistance arm
- Linker arm left arm
- Circumfrential clasp
- Arm system on chip architecture
- Harris & harris digital design and computer architecture
- Asr instruction in arm
- Folding architecture definition
- Computer architecture arm edition
- Arm in computer organization
- Arm architecture history
- Arm instruction set architecture
- Digital design and computer architecture: arm edition
- Dr annie prasad
- Sudhakar prasad
- Srinivas prasad md
- Edamana prasad
- Prasad gourineni md
- Dr.malathi prasad trichy
- Combination reaction example
- Write the process of making pochampalli saree
- Bharat penmecha
- Prasad raghavendra
- Lawrence prasad
- Admission under reception order
- Tk wright
- The gita project
- What can we learn privately
- Gaura
- Chandi prasad bhatt quotes
- Astha prasad
- Prasad calyam
- Vanessa prasad permaul
- Vanessa prasad permaul
- Rachit prasad
- Bill prasad
- Amita prasad ias
- Engage global solutions
- Prasad calyam
- Rajesh prasad ias assam
- Dspace backup and restore
- Prasad sandireddy
- System architecture diagram for hospital management system
- Flat file service