arm show.ppt
TRANSCRIPT
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 1/38
Asatoma sat gamaya
Tamasoma jyotir gamaya
Mrityorma amrutam gamaya
M.SELVAM, M.Sc.,D.IT.,M.Phil.,(M.E.)
LECTURER,DEPT. OF ELECTRONICS & COMMUNICATION SYSTEMSKARPAGAM UNIVERSITY COIMBATORE 641 021
4 April 2013SELVAM1
EMBEDDED SYSTEM DEVELOPMENT USING ARM PROCESSOR
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 2/38
4 April 2013SELVAM
System : is a way of working, organizing or doing one or manytasks according to a fixed plan, program, or set of rules.
An Embedded System is one that has computer hardware withsoftware embedded in it as one of its most important component.
It is a dedicated computer based system for an application orproduct. It may be either an independent system or a part of alarger system.
2
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 3/38
4 April 2013SELVAM
Hardware : Microprocessor or Microcontroller or DSP withits supporting circuits.
Software : The application software may perform
concurrently the series of tasks or multiple tasks.
RTOS : The Real Time Operating System that supervises theapplication software and provides a mechanism to let the
processor run a process as per scheduling and do thecontext switch between the various tasks.
3
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 4/38
P o w e r S
u p p l y ,
R e s e t a
n d O s c i l l a t o r c i r c u i t
S y s t e m A
p p l i c a t i o n
S p e c i f i c C i r c u i t s
Input Devices, Interfacing/Driving circuits
Outputs Interfacing / DrivingCircuits
Processor
Timers
InterruptController
Program Memory /Data memory
Serial Comm.Port
Parallel Ports
4 April 2013SELVAM4
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 5/38
4 April 2013SELVAM
Abacus : first mechanical calculator – Babylonians – 500 B.C – used up to 1642(Pascal invented gear teeth)
Electrical age : 1800 electric motors (Faraday) used to drive gears of mechanicalcomputers up to 1970
Vacuum tubes (1930) replaced mechanical parts.
ENIAC : first general purpose computer (1946) 17000 vacuum tubes, 500 milesof wires, 30 ton weight. Programmable by rewiring.
Transistor : 1948 – Bell labs – semiconductor Advent.
IC : 1958 – Jack Kilby – Texas Instruments
RTL : 1960 100‟s 1000‟s of transistor in a single chip. Mini computer were placedfor automation – expensive & bulky – the basic hardwire was logic gates, flipflops, counters, multiplexers etc.,
5
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 7/38
4 April 2013SELVAM
Microprocessor Evolution :
Intel 4004 : First MP – 4 bit – 4090 x 4 memory – 45 instructions50KIPS- requires additional circuits.
Intel 8080 : Three separate buses- 72 instructions- 500 KIPS –
64 KB
Intel 8085 : Additional interrupts – 3 to 5 MHz – serial interface
Motorola 6800 : 1974 – two accumulators –index and relativeaddressing
Zilog Z80 : More registers – additional non mask able interrupts – 2 independent flags – 158 instructions
types.
7
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 8/38
4 April 2013SELVAM
* Intel 8086 : 16 bit – 2.5 MIPS – 1MB – BIU & EU – MUL & DIV
Zilog Z8000 : 8 MB – 16 16bit regs. – can be used as 32 & 64bit
Motorola 68000 : First MP having 32 bit Regs. – two 16 bit ALU – 4 to 8MHz – 16MB – 8 external interrupts – 6 data types
Intel 80186 : improved version of 8086 – on chip PPI
Intel 80286 : designed for multitasking – 16MB – 4 MIPS
Intel 80386 : 1986 – first 32 bit MP – 4GB - UNIX &multitasking applications - requires co- processor
8
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 9/38
4 April 2013SELVAM
Intel 80486 : 1989 – includes co-processor – 8KB cache – 50 MIPS
Intel Pentium : 1993 – 64bit MP -110 MIPS – super scalar technology – separate cache for data and code- 2 ALU with separate pipeline
ARM11 : 32 bit RISC MP – DSP extensions – MMX supporting
- consumer devices includes 2.5G & 3G mobile phones – PDAs – Digital camera – IP and broadband modem etc., - 400 to 1200MIPS
IBM Power PC 750 : 32bit RISC core – 64 bit data bus – 32 bit addressbus – 500 MHz – low power – JTAG interface
9
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 10/38
4 April 2013SELVAM
MC : is a integrated chip that has the processor, memory and severalother hardware units. These form the micro computer part of theembedded system.
Criteria for choosing a Microcontroller :
1. It must meet the computing needs of the task. 8bit/16bit/ 32bit – speed – packaging – power consumption – amount of RAM ROM – number of IO pins – cost etc.,
2. Availability of software development tools such as assemblers,
compilers, debuggers, simulators, emulators etc., This will reduce theproduct development time.
3. Wide availability and reliable sources in needed quantitiesboth now and in the future.
10
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 11/38
4 April 2013SELVAM
* Intel 8051 : 1981 – 8bit – 128 RAM -4KB ROM – two timers – 1
serial port – four parallel ports – six interrupts etc,.
Intel 8052 : 256 RAM – 8K ROM – 3 timers – 8 interrupts etc.,
Intel 8031 : ROM less version of 8051
Intel 8751 : UV EPROM version of 8051
Atmel AT89C51 : the flash ROM version of 8051
Dallas Semiconductor DS5000 : the NV RAM version of 8051
Philips P89C51 : 6clock/12clock mode – extended features such asADC, DAC, PWM etc.,
Cygnal : High speed high cost CPU – 100 MIPS – 5ADC – 8 IO ports –JTAC – voltage comparators – 6 Timers – 2 USARTS – CAN – CCP
11
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 12/38
4 April 2013SELVAM
Microchip PIC Microcontrollers :
RISC core – versatile choice for specific need - 8 to 64 pin count – 62
MCs in 16Fxxx series - world number II bestseller – IDE user friendly
PIC 12CXXX : 12 bit instructions – 512 / 1024 x 12 flash memory –
25 / 41B RAM – 6 IO pins – one 8 bit timer – 4MHz speed
PIC16F84a : 4024 x 14 flash memory – 68 B RAM – 64 B EEPROM RAM –
13 IO – one 8 bit timer – max. 20 MHz
PIC 16F873 : 4096 X 14 flash – 128 EEPROM RAM – 192B RAM – 22 IO- 28pin – 5 ch 10 bit ADC – 2 PWM – one 16 bit timer – two 8bit timer –
USART – I2C – CCP etc.,
12
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 13/38
4 April 2013SELVAM
PIC 16F876 : 8192 X 14 flash – 256 EEPROM – 368 B RAM
PIC 16F874 : 4096 X 14 flash – 33 IO – 40 pins – 8 ch 10 bit ADC
PIC 16F877 : 8192 X 14 flash - 33 IO – 40 pins
PIC 17CXXX & PIC 18CXXX : high speed CPU – 40MHz – 16 bitinstructions – CAN controller – transmit, receive buffers – filters etc.,
Other popular MCs : Motorola M68HC11, M68HC12,M68HC16 – TaxasInstruments MSP430 – Samsung SAM8 – Zilog Z80 etc.,
AND FINALLY WE ENTERING ARM FAMILY
13
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 14/38
4 April 2013SELVAM
The software is the most important aspect, the brain of the EmbeddedSystems. It may be classified as follows,
* Coding of software in Machine Codes
* Software in processor specific assembly language
* Software in high level language
* Software for device drivers and device management using anoperating system
* Software design for scheduling multiple tasks and devicesusing an RTOS
14
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 15/38
4 April 2013SELVAM
Software in machine codes :
The programmer defines the addresses and the corresponding bytes.
It is time consuming because programmer must first understand the processor instructions and their machine codes
Software in assembly language :
Programmer must understand the processor and its instructions thoroughly.
Extremely useful for configuring physical devices like ports, display interface,ADC, DAC, device driver codes etc.,
Provides optimal coding solution
Time consuming but suitable for simple and small scale system
15
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 16/38
4 April 2013SELVAM
Software in high level language :
The detailed operation of the target processor is mostly hidden
Permits code portability between different devices
Reduces software development time
„C‟ , „C++‟ or JAVA are preferred languages
Most of the time C is the preferred language because :
C is not designed for any one particular area of application – is a
general purpose programming language – provides code efficiency –
elements of structured programming - rich set of operators, making C
a convenient and effective programming solution
16
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 17/38
4 April 2013SELVAM
Software for the device drivers and device management using OS :
In ES exemplary physical devices are keyboard, display, disk, parallel
port and network card
DEVICE : The control registers, input data buffers, output data buffersand status registers form part of the device hardware
DEVICE DRIVER : is a software for controlling, receiving, and sendinga byte or a stream of bytes from or to a device. It controls three
function :
1. Initialization by placing CW into CR
2. Calling an interrupt handler routine
3. Resetting status flag after ISR service
Device driver accesses parallel port, serial port, keyboard, mouse,disk, network, display, file and pipe at specific addresses
17
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 18/38
4 April 2013SELVAM
OS : may provide device driver codes for system port addresses and for the access mechanism for the device hardware
Using OS functions, device driver coding can be made such that the
underlying hardware is hidden as much as possible – an API definesthe hardware separately
Device Management software modules provides codes for detecting
the presence of devices, for initialization and for testing the devicesthat are present
18
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 19/38
4 April 2013SELVAM
Software design for scheduling Multiple Tasks and Devices using an
RTOS:
Embedded software is most often designed for performing multiple
actions and controlling multiple devices and their ISRs. Multitasking
software is therefore essential. For scheduling multiple tasks RTOS are
most often used
In a multitasking OS, each task has a distinct memory allocation of its
own and a task has one or more functions or procedures for a specific
job. A task may share the data/memory with other task
The kernel‟s important function is to schedule the transition of a task
from a ready state to running state. It also controls IPCs, messaging
and sharing of variables, queues and pipes
19
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 20/38
4 April 2013SELVAM
Editor : for writing C / Assembly codes using the keyboard of
the PC for entering the program. Allows the entry, addition, deletion,
insert etc.,
Assembler : translates ALP into binary file. Also creates list file
which has address, source code and hex code
Cross Assembler : converting object codes for a processor to other
codes for another processor
Interpreter : line by line translation into machine codes
Compiler : Uses the complete sets of the codes, may also include
codes, functions and expressions from the library routines and
creates object file
20
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 21/38
4 April 2013SELVAM
Simulator : To simulate all functions of an ES circuit including
memory and peripherals
IDE : Software and hardware environment that consists of
simulators with editors, compilers, assemblers, RTOS,
debuggers, tracer, emulators, logic analyzers, EEPROM programmer
for the integrated development of a system
Prototyper : summarizing the complete status of the final target
system during the development time
21
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 22/38
4 April 2013SELVAM
ARM
CORE22
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 23/38
ARM Ltd Founded in November 1990
Spun out of Acorn Computers
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 thedesign-in of the ARM architecture
Software tools, boards, debug
hardware, application software, busarchitectures, peripherals etc
23 4 April 2013SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 24/38
Introduction
24
Leading provider of 32-bit embedded RISCmicroprocessors, 75% of market
High performance
Low power consumption
Low system cost
Solutions for
Embedded real-time systems for massstorage,
automotive, industrial and networkingapplications
Secure applications - smartcards and SIMs
Open platforms running complex operatingsystems 4 April 2013SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 25/38
25
Version 1 – The first ARM processor, developed at Acorn
Computers Limited
1983-1985
– 26-bit address, no multiply or coprocessor supportVersion 2
– Sold in volume in the Acorn Archimedes and A3000products
– 26-bit addressing, including 32-bit result multiply andcoprocessor
Version 2a
– Coprocessor 15 as the system control coprocessor tomanage
cache 4 April 2013SELVAM
ARM Architecture Version
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 26/38
26
Version 3
– First ARM processor designed by ARM Limited (1990)
– ARM6 (macro cell)
ARM60 (stand-alone processor) ARM600 (an integrated CPU with on-chip cache, MMU,
write buffer)
ARM610 (used in Apple Newton)
– 32-bit addressing, separate CPSR and SPSRs – Add the undefined and abort modes to allowcoprocessor
emulation and virtual memory support in supervisor mode
Version 3M
– Introduce the signed and unsigned multiply and multiplyaccumulate
instructions that generate the full 64-bit result
4 April 2013SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 27/38
4 April 2013SELVAM27
Version 4
– Add the signed, unsigned half-word and signed byte
load and storeinstructions
– Reserve some of SWI space for architecturally
defined operation
– System mode is introducedVersion 4T
– 16-bit Thumb compressed form of the instruction set
is introduced
Version 5T
– Introduced recently, a superset of version 4T adding
the BLX, CLZ and BRK instructions
Version 5TE
– Add the signal processing instruction set extension
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 28/38
4 April 2013SELVAM28
Version 6 – Media processing extensions (SIMD)
• 2x faster MPEG4 encode/decode
• 2x faster audio DSP
– Improved cache architecture
• Physically addressed caches
• Reduction in cache flush/refill
• Reduced overhead in context switches
– Improved exception and interrupt handling
• Important for improving performance in real-timetasks
– Unaligned and mixed-endian data support
• Simpler data sharing, application porting andsaves memory
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 29/38
ARM Architecture Version
4 April 2013SELVAM29
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 30/38
Naming Rule of ARM
4 April 2013SELVAM30
ARM {x} {y} {z} {T} {D} {M} {I} {E} {J} {F} {-S} –x: series
–y: memory management / protection unit
–z: cache
–T: Thumb decoder
–D: JTAG debugger
–M: fast multiplier
–I: support hardware debug
–E: enhance instructions (based on TDMI)
–J: Jazelle –F: vector floating point unit
–S: synthesiable, suitable for EDA tools
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 31/38
ARM Processor Core
31
Current low-end ARM core for applications likedigital mobile phones
TDMI T: Thumb, 16-bit instruction set
D: on-chip Debug support, enabling the processor to halt in response to a debug request
M: enhanced Multiplier, yield a full 64-bit result, highperformance
I: EmbeddedICE hardware
Von Neumann architecture
3-stage pipeline
4 April 2013SELVAM
ARM C Di
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 32/38
ARM Core Diagram
32 4 April 2013SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 33/38
The Registers ARM has 37 registers all of which are 32-bits long.
1 dedicated program counter
1 dedicated current program status register
5 dedicated saved program status registers
30 general purpose registers
The current processor mode governs which of several banks is accessible.
Each mode can access
a particular set of r0-r12 registers
a particular r13 (the stack pointer, sp) and r14 (the link
register)
the program counter, r15 (pc)
the current program status register, cpsr
Privileged modes (except System) can also access
a particular spsr (saved program status register)
4 April 201333 SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 34/38
When the processor is executing in ARM state:
All instructions are 32 bits wide
All instructions must be word aligned
When the processor is executing in Thumb state:
All instructions are 16 bits wide
All instructions must be halfword aligned
When the processor is executing in Jazelle state:
All instructions are 8 bits wide
Processor performs a word access to read 4
instructions at once
DIFFERENT STATES
4 April 201334 SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 35/38
Thumb is a 16-bit instruction set
Optimised for code density from C code (~65% of ARM code
size) Improved performance from narrow memory Subset of the functionality of the ARM instruction set
Core has additional execution state - Thumb
Switch between ARM and Thumb using BX instruction
01
5
31 0 ADDS r2,r2,#1
ADD r2,#1
32-bit ARM
Instruction
16-bit Thumb
Instruction
For most instructions generated by compiler:
Conditional execution is not used
Source and destination registers identical
Only Low registers used
Constants are of limited size
Inline barrel shifter not used
Thumb
4 April 201335 SELVAM
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 36/38
SAMPLE CODE
#include <LPC214X.h>
int wait(unsigned int w)
{ unsigned int a,b;
for(a=0;a<w;a++)
for(b=0;b<200;b++);
}
4 April 2013SELVAM36
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 37/38
int main()
{
PINSEL0 = 0;
PINSEL1 = 0;
PINSEL2 = 0;
IODIR0 = 0XFFFFFFFF;
IODIR1 = 0XFFFFFFFF;
IOCLR1 = 0XFFFFFFFF;
IOCLR0 = 0XFFFFFFFF;
while(1)
{
IOSET0 = 0XFFFFFFFF;IOSET1 = 0XFFFFFFFF;
wait(50000);
IOCLR0 = 0XFFFFFFFF;IOCLR1 = 0XFFFFFFFF;
wait(50000);
}
}
4 April 2013SELVAM37
7/28/2019 ARM SHOW.ppt
http://slidepdf.com/reader/full/arm-showppt 38/38
4 Ap il 2013SELVAM
“A hundred times every day I remained myself that myinner and outer lives are based on the labors of other men,
living and dead, and that I must exert myself in order to give in
the same measure a I have received and am still receiving”
ALBERT EINSTEIN
Thank You
38