Lecture 1: Introduction To ARM Based Embedded Systems
Lecture 1: Introduction To ARM Based Embedded Systems
Lecture 1: Introduction To ARM Based Embedded Systems
Lecture 1: Introduction to ARM based Embedded Systems Swagat Kumar Fall Semester, 2011-12 IIT Rajasthan
RISC Vs CISC
RISC : Reduced Instruction Set Computing o Reduce the complexity of instructions performed by the hardware because it is easier to provide greater flexibility and intelligence in software than in hardware. o Result is a Complex Compiler o Simpler hardware design for Processor CISC: Complex Instruction Set Computing o Relies more on hardware for instruction functionality CISC instructions are complicated o Complicated hardware design for Processor o Simpler Compiler However, at this moment of time the distinction between RISC and CISC has blurred as CISC processor have implemented many RISC concepts.
For x86 PCs, the most common PC bus technology is Peripheral Component Interconnect (PCI) bus. This bus is external to the chip (off-chip) ARM uses an on-chip bus that is internal to the chip that allows different peripheral devices to be interconnected to an ARM Core. Two different classes of devices are attached to the bus: Bus Master - capable of initiating data transfer with another device ARM Processor Core Bus Slave - capable only of responding to a transfer request from a bus master device Peripherals BUS has two architecture level Physical Layer - electrical characteristics, bus width etc. Bus Protocol - logical rules that govern communication between a process & a peripheral
Memory
Memory Continued
Hierarchy
Cache
Located between main memory and the core Speeds up data transfer between the processor and main memory. Improves performance but with a loss of predictable execution time. Although cache improves general performance of the system, it does not help real-time response. Many smaller embedded systems do not require cache.
Main memory
large in size 256 KB to 256 MB stored in separate chips Load & store instructions access the main memory
Secondary storage is the largest and the slowest form of memory hard disk rive, CD-ROM
Memory Contd...
Types
ROM : least flexible can not be reprogrammed contains code that does not require update or correction eg. Boot code Flash ROM
R/W but slow access, low cost Used for storing data that needs to be preserved after power off. An alternative for mass storage or secondary storage.
Currently most commonly used RAM Lowest Cost per MB (among RAMs) Requires frequent refreshing of electronic charge on each cells. Requires a DRAM controller Faster but requires more silicon area Higher Cost Does not require refreshing Access time for SRAM is shorter than equivalent DRAM because SRAM does not require a pause between data accesses. Synchronized with the processor clock Higher clock speed than the conventional memory.
Peripherals
Needed for interacting with the outside world Performs input & output functions Peripherals are mostly off-chip All ARM peripherals are memory mapped programming interface is a set of memory-addressed registers. The address of these registers is an offset from a specific peripheral base address. Controllers are specialized peripherals that implement higher levels of functionality.
Memory controller Interrupt controller
Memory Controllers
Connects different type of memory to the processor bus. On power-up a memory controller is configured to allow certain memory devices to be active. These memory devices all the initialization code to be executed. Some memory devices must be set up by software eg. When using DRAM, you need to set up memory timings and refresh rates before it can be accessed.
Interrupt Controllers
When a peripheral needs attention, it raises an interrupt to the processor. An interrupt controller provides a programmable governing policy that allows software to determine which device can interrupt the processor at any specific time by setting appropriate bits in the ICR (interrupt controller register) Two types of Interrupt Controllers
Standard Interrupt Controllers (SIC) Vector Interrupt Controllers (VIC)
Operating System
Provides an infrastructure to control applications and manage hardware system resources.
Device Drivers
Provide software interface to the peripherals.
Applications
Performs one of the tasks required for a device
Operating System
An OS organizes the styem resources: the peripherals, memory and processing time. It schedules applications to ensure optimal usage of available resources. Two important categories
Real-time operating System (RTOS)
Provides guaranteed response times to events. System running RTOS generally do not have secondary storage. Soft / hard RTOSs
An application implements a processing task. The operating system controls the environment.
Summary
ARM uses modified RISC design philosophy suitable for embedded system applications good code density & low power consumption. ES = processor core + cache + memory + peripherals + buses Key points of RISC design philosophy are
Improve performance by reducing the complexity of instructions (simpler hardware) Speed of instruction processing by using a pipeline Provide large register set to store data near the core To use load-store architecture