61342620 unit 1 embedded system
TRANSCRIPT
-
7/29/2019 61342620 Unit 1 Embedded System
1/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
EMBEDDED SYSTEMSDEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
UNIT I
INTRODUCTION TO EMBEDDED SYSTEM
IntroductionFunctional building blocks of embedded systemsProcessorRegisterMemory devicesPorts
TimerInterrupt controllersIntroduction to Software Programming in Embedded systemPrepared byM.Sujith,Lecturer,Department of Electrical and Electronics Engineering,Vidyaa Vikas College of Engineering and Technology.
H
HHHHOOOOODDDDD/////EEEEEEEEEEEEEEEPPPPPRRRRRIIIIINNNNNCCCCCIIIIIP
PPPPAAAAALLLLL
Department of EEE Page 1
-
7/29/2019 61342620 Unit 1 Embedded System
2/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
INTRODUCTION TO EMBEDDED SYSTEM
EMBEDDED SYSTEM
Embedded system is one that has computer-hardware and software embedded in it asone of its most important component which makes a system dedicated for anapplication (s) or specific part of an application or product or part of a larger system. Embedded system is a single purpose computer built in to larger system for processing thecontrol and monitoring the systemCOMPONENTS OF EMBEDDED SYSTEM
It has HardwareProcessor, Timers, Interrupt controller, I/O Devices, Memories, Ports, etc.It has main Application Software
Which may perform concurrently the series of tasks or multiple tasks.It has Real Time Operating System (RTOS)RTOS defines the way the system work. Which supervise the application software.It sets the rules during theexecution of the application program. A small scale embedded system may not needan RTOS.Department of EEEPage 2
-
7/29/2019 61342620 Unit 1 Embedded System
3/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
WHAT IS A SYSTEM?
A system is a way of working, organizing or doing one or many tasks according toa fixed plan,program or set of rules.A system is also an arrangement in which all its units assemble and work together according tothe plan or program.Example:-It is a time display SYSTEMParts: Hardware, Needles, Battery, Dial, Chassis and StrapRules
1. All needles move clockwise only2. A thin needle rotates every second3. A long needle rotates every minute4. A short needle rotates every hour
5. All needles return to the original position after 12 hoursDepartment of EEEPage 3
-
7/29/2019 61342620 Unit 1 Embedded System
4/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Features of an embedded system
Constituents of embedded computer: hardware and softwareTimeliness: controller must be able to respond fast enough to keep its operationwithin a safe region
System interconnectionReliabilitySkills required for an embedded system designers
For small scale embedded system designer understanding of microcontroller, memoryallocation,
C programming and debugging
For medium scale ES designers-RTOS, RTOS with application programming interfacefor the specificmicrocontrollerFor sophisticated ES designer-co design, RTOS, HDLs (High Level Design Language)programmingSPECIFICATION OF THE SYSTEM
Product functions and tasks Delivery Time schedule Product Life-cycle Load on System Human-Machine Interaction
Operating Environment Sensors Power Requirement and enviornment System CostDepartment of EEEPage 4
-
7/29/2019 61342620 Unit 1 Embedded System
5/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
A SHORT LIST OF EMBEDDED SYSTEMS
Anti-lock brakes ModemsAuto-focus cameras MPEG decodersAutomatic teller machin Network cardsAutomatic toll systems Network switches/routersAutomatic transmission On-board navigationAvionic systems PagersBattery chargers PhotocopiersCamcorders Point-of-sale systemsCell phones Portable video gamesCell-phone base stations PrintersCordless phones Satellite phonesCruise control ScannersCurbside check-in system Smart ovens/dishwashersDigital cameras Speech recognizersDisk drives Stereo systemsElectronic card readers Teleconferencing systems
Electronic instruments TelevisionsElectronic toys/games Temperature controllersFactory control Theft tracking systemsFax machines TV set-top boxesFingerprint identifiers VCRs, DVD playersHome security systems Video game consolesLife-support systems Video phonesMedical testing systems Washers and dryers
Department of EEE Page 5
-
7/29/2019 61342620 Unit 1 Embedded System
6/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Some common characteristics of embedded systems
Single-functioned Executes a single program, repeatedly Tightly-constrained Low cost, low power, small, fast, etc. Reactive and real-time Continually reacts to changes in the systems environmentMust compute certain results in real-time without delayCharacteristics of an embedded systemReal-Time Operation
Reactive: computations must occur in response to external events Correctness is partially a function of timeSmall Size, Low Weight
Hand-held electronics and Transportation applications --weight costs moneyLow Power
Battery power for 8+ hours (laptops often last only 2 hours)
Harsh environment
Heat, vibration, shock, power fluctuations, RF interference, lightning, corrosionSafety-critical operation
Must function correctly and Must not function in correctlyExtreme cost sensitivity
$. 05 adds up over 1,000, 000 unitsDepartment of EEE Page 6
-
7/29/2019 61342620 Unit 1 Embedded System
7/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Embedding a computer
An Embedded Control System Designers View
u Measured by: Cost, Time-to-market, Cost, Functionality, Cost & Cost.&386(16256$'&219(56,21'$&219(56,21$&78$7256+80$1,17(5)$&(',$*1267,&722/6$8;,/,$5
-
7/29/2019 61342620 Unit 1 Embedded System
8/72
)3*$$6,&62)7:$5(0(025
-
7/29/2019 61342620 Unit 1 Embedded System
9/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Examples of embedded systems
automatic teller machines (ATMs)avionics, such as inertial guidance systems, flight control hardware/software and otherintegrated systems in aircraft and missilescellular telephones and telephone switchesengine controllers and antilock brake controllers for automobileshome automation products, such as thermostats, air conditioners, sprinklers, andsecuritymonitoring systemshandheld calculators
household appliances, including microwave ovens, washing machines, television sets, DVDplayers and recordersmedical equipmentHandheld computersVideogame consolescomputer peripherals such as routers and printersIndustrial controllers for remote machine operation.
History
The first recognizably modern embedded system was the Apollo GuidanceComputer, developed by Charles Stark Draper at the MIT InstrumentationLaboratory.The first mass-produced embedded system was the Autonetics D-17 guidancecomputer for the Minuteman (missile), released in 1961.In 1978 National Engineering Manufacturers Association released the standard fora programmable microcontroller.
By the mid-1980s, widespread use of embedded systems became feasible with microcontroller
Department of EEEPage 8
-
7/29/2019 61342620 Unit 1 Embedded System
10/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Embedded software architectures
Simple control loopsoftware simply has a loop. The loop calls subroutines, each of which manages apart ofthe hardware or software.Interrupt controlled systemtasks performed by the system are triggered by different kinds of events. (e.g.a timer, orby a serial port controller receiving a byte)Usually there is a simple task in a main loop also. The tasks performed in the interrupthandlers should be as short as possibl
Some times longer tasks are added to a queue structureCooperative multitaskingA nonpreemptive multitasking system is very similar to the simple control loop scheme,except that the loop is hidden in an API. (usually called "pause", "wait", "yield", etc.).The advantages and disadvantages are very similar to the control loop, except that addingnew software is easier.
Preemptive multitaskingA low-level piece of code (scheduler) switches between tasks based on a timer. Itintroduces all the complexities of managing multiple tasks running seemingly atthe sametime.Tasks must be precisely separated. Access to shared data must be controlled by somesynchronization strategy, such as message queues, semaphores or a non-blockingsynchronization scheme.
It is common for organizations to buy a real-time operating system, allowing theapplication programmers to concentrate on device functionality rather than operatingsystem servicesMicrokernels and exokernelsA microkernel can allocate memory and CPU time to different threads of execution. User
-
7/29/2019 61342620 Unit 1 Embedded System
11/72
mode processes implement major functions such as file systems, network interfaces, etc.Department of EEEPage 9
-
7/29/2019 61342620 Unit 1 Embedded System
12/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Exokernels communicate efficiently by normal subroutine calls. The hardware, andall thesoftware in the system are available to, and extensible by application programmers.Monolithic kernelsA full kernel with sophisticated capabilities is adapted to suit an embedded environment.It requires more hardware resources and can be less predictable and reliable.Common examples are Embedded Linux and Windows CE.This type of embedded system is increasing in popularity. Here are some of the reasons:Ports to common embedded chip sets (ARM, x86, PowerPC) are available.
They permit re-use of publicly available code for Device Drivers, Web Servers, Firewalls,and other code.Running application code in user mode is more reliable, easier to debug and thatthereforethe development process is easier and the code more portable.A system such as Embedded Linux has fast enough response for many applications (realtimerequirement).
Features requiring faster response than can be guaranteed can often be placed inhardware.Many RTOS systems have a per-unit cost (royalty).What is an Embedded System?
Embedded System =A computer which is integrated into another system, the embeddingsystem
Department of EEEPage 10
-
7/29/2019 61342620 Unit 1 Embedded System
13/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Department of EEE Page 11
-
7/29/2019 61342620 Unit 1 Embedded System
14/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Department of EEE Page 12
-
7/29/2019 61342620 Unit 1 Embedded System
15/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Department of EEE Page 13
-
7/29/2019 61342620 Unit 1 Embedded System
16/72
Introduction to Embedded system [UNIT-I] V.V.C.E.TDepartment of EEE Page 14Essential Components Microprocessor / DSP Sensors Converters (A-D and D-A) Actuators Memory (On-chip and Off chip) Communication path with the interacting environmentEmbedded System StructureEssential Considerations Response Time -- Real Time Systems Area Cost Portability Low Power (Battery Life) Fault ToleranceDesign Issues (Hardware-Software Co-design) System Specification Functions, Real Time Constraints, Cost and Power Constraints Hardware Software Partitioning Hardware Synthesis Software Synthesis and Code Generation
Simulation ImplementationES, MS and RTS All embedded systems are microprocessor based systems, but all microprocessor basedsystems may not be amenable to embedding (Area, Power, Cost, Payload parameters). Most of the embedded systems have real time constraints, but there may be ES whichare not hard RTS (for example off line Palm tops) There may be RTS which are not embedded (e.g. Separate Process Control Computersin a network)
Embedded Systems are not GPS; they are designed for dedicated applications withspecific interfaces with the sphere of control
-
7/29/2019 61342620 Unit 1 Embedded System
17/72
Introduction to Embedded system [UNIT-I] V.V.C.E.TDepartment of EEE Page 15General Characteristics of Embedded Systems Perform a single task Usually not general purpose Increasingly high performance and real time constrained Power, cost and reliability are important considerations HW-SW systems Software is used for more features and flexibility Hardware (processors, ASICs, memory etc. are used for performanceand securityASIPs and ASICs form a significant component Advantage: customization lower power, cost and enhancedperformance Disadvantage: higher development effort (debuggers, compilers etc.)and larger time to marketClassification of Embedded Systems Distributed and Non distributed Reactive and Transformational Control dominated and Data dominatedApplication Specific Characteristics Application is known before the system is designed System is however made programmable for
Feature upgrades Product differentiation Often application development occurs in parallel to system development Hw-Sw partitioning should be as delayed as possible For upgrades design reuse is an important criterion IP reuse, object oriented development
-
7/29/2019 61342620 Unit 1 Embedded System
18/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
DSP Characteristics
Signals are increasingly being represented digitally as a sequence of samplesADCs are moving closer to signals; RFs are also treated digitallyTypical DSP processing includes:Filtering, DFT, DCT etc.Speech and image: Compression, decompression, encryption, decryptionetc.Modems: Equalization, noise and echo cancellation, better SNRCommunication channel: encoding, decoding, equalization etc.Design Metrics
Unit cost the $ cost for each unit excluding development costNRE cost: $ cost for design and developmentSize: The physical space reqd. determined by bytes of sw, number of gatesand transistors in hwPerformance: execution time or throughput of the systemPower: lifetime of battery, cooling provisionsFlexibility: ability to change functionality without heavy NRE cost
Major Subtasks of Embedded System Design
Modeling the system to be designed and constraintsExperimenting with different algorithms and their preliminaryevaluationFactoring the task into smaller subtasks and modeling their interactionRefinementHW-SW partitioning
Allocating the tasks into hw, sw running on custom hw or generalpurpose hwScheduling allocation of time steps for several modules sharing the sameresourceImplementation: Actual hw binding and sw code generationSimulation and Validation
-
7/29/2019 61342620 Unit 1 Embedded System
19/72
Iterate if necessaryCAD for Embedded Systems
Co-design: Joint optimization of hw and sw to optimize design metricsCo-synthesis: Synthesizes designs from formal specificationsRapid prototyping and design space explorationMany of the tasks are interrelatedIntermediate evaluation is not easy as a later decision in one path affects theotherDepartment of EEEPage 16
-
7/29/2019 61342620 Unit 1 Embedded System
20/72
Introduction to Embedded system [UNIT-I] V.V.C.E.TDepartment of EEE Page 17Importance of EmbeddedSoftware and EmbeddedProcessors... the New York Times hasestimated that the averageAmerican comes into contactwith about 60 micro-processorsevery day.... [Camposano, 1996]Latest top-level BMWscontain over 100 microprocessors[Personal communication]Basic Block Diagram of an Embedded ProcessorParallelI/O portsSerialI/O portsCounter/TimerProcessorcoreInternalmemory
To externalmemoryFigure 9.3. A block diagram of an embedded processor.A-to-D conversion D-to-A conversion
-
7/29/2019 61342620 Unit 1 Embedded System
21/72
Introduction to Embedded system [UNIT-I] V.V.C.E.TDepartment of EEE Page 18Embedded System ExampleHome NetworkHome Automation
-
7/29/2019 61342620 Unit 1 Embedded System
22/72
Introduction to Embedded system [UNIT-I] V.V.C.E.TDepartment of EEE Page 19Microwave OvenDesign Issues Cost I/O capability Size Power consumption On-Chip memory Performance Software Instruction set Development tools Testability and reliability
-
7/29/2019 61342620 Unit 1 Embedded System
23/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
BASIC COMPONENTS OF EMBEDDED SYSTEMS
MemoryCoprocessorsControllersConvertersProcessorInterfaceSoftwareASICAnalogDigital Analog
Analog components-Sensors, controllers,Digital components
-Processor, coprocessors-Memories-Controllers, busses-ASIC: Application-Specific Integrated Circuit, a chip designedfor a particular application
Converters A/D, D/A, Software-Application programs-Exception handlersDepartment of EEE
Page 20
-
7/29/2019 61342620 Unit 1 Embedded System
24/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Processor
Processor is the heart of the embedded system. It consists of two units:
Two Essential Units: Operations
Control Unit (CU), Fetch
Execution Unit (EU) Execute-It includes ALU and executes the program task, say,halt, interruptand jump or another set of instructions
Processor runs the cycle of fetch and execute. Processor mostly in the form of IC or in the form ofCore ASIP [Application Specific Instruction Processor] or Soc [System on Chip],core means a part offunctional circuit on VLSI chip.EMBEDDED SYSTEM CONSTRAINTS
An embedded system is software designed to keep in view three constraints:
Available system memory Available processor speed The need to limit the power dissipationWhen running the system continuously in cycles of wait for events, run, stop andwakeupAn embedded system processor chip or core can be one of the following
General purpose processor [GPP]Microrpocessor
MicrocontrollerDepartment of EEE Page 21
-
7/29/2019 61342620 Unit 1 Embedded System
25/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Embedded processorDigital signal processorMedia processorApplication Specific System Processor [ASSP]Multipurpose system using general purpose processor [GPPs]GPP CORE or ASIP core integrated in to an ASIP or VLSI[Very Large Scale Integrated circuit] orFPGA[Fast Programmable Gate Array] integrated with processor units in the VLSI chip.Important consideration when selecting a processor
Instruction set
Maximum bit (8 or 16 or 32) in single ALU operationClock frequency in MHZ and processor speed in MIPSProcessor capability to solve the complex algorithmsMicroprocessor
Stream MPU family Source CISC or RISCStream 1 68HC XXX Motorola CISCStream 2 80x86 Intel CISCStream 3 SPARC SUN RISCStream 4 Power PC 601 IBM RISC
Complex Instruction Set Computer (CISC)
Memory in those days was expensiveBigger program->more storage->more moneyHence needed to reduce the number of instructions per programNumber of instructions are reduced by having multiple operations within a singleinstruction
Multiple operations lead to many different kinds of instructions that access memoryIn turn making instruction length variable and fetch-decode execute time unpredictable making it morecomplexExample: x86 ISAReduced Instruction Set Computer (RISC)
-
7/29/2019 61342620 Unit 1 Embedded System
26/72
Original idea to reduce the ISAProvide minimal set of instructions that could carry out all essential operationsInstruction complexity is reduced byHaving few simple instructions that are the same lengthAllowed memory access only with explicit load and store instructionsDepartment of EEEPage 22
-
7/29/2019 61342620 Unit 1 Embedded System
27/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Hence each instruction performs less work but instruction execution time among differentinstructions is consistentThe complexity that is removed from ISA is moved into the domain of the assemblyprogrammer/compilerExamples: LC3, MIPS, PowerPC (IBM), SPARC (Sun)RRRRRIIIIISSSSSCCCCCVVVVVSSSSS.....CCCCCI
IIIISSSSSCCCCC
RISC CISC Simple instructions, few in number Fixed length instructions Complexity in compiler Only LOAD/STORE instructions access memory Few addressing modes Many complex instructions Variable length instructions Complexity in microcode
Many instructions can access memory Many addressing modes
A microprocessor is a single chip semi conductor device also which is a computeron chip,but not a complete computer.Its CPU contains an ALU, a program counter, a stack pointer, some working register, a clocktiming circuit and interrupt circuit on a single chip.To make complete micro computer, one must add memory usually ROM and RAM, memory
decoder, an oscillator and a number of serial and parallel portsHISTORY OF MICROPROCESSOR
1st Generation (4 bit processors)
4004 and 4040 4 bit in early 1970 by Intel (Integrated Electronics)
2nd Generation (8 bit processors)
-
7/29/2019 61342620 Unit 1 Embedded System
28/72
8008 and 8080 8 bit in 1974 Intel with +5 V Input supply 8080 8085 8 bit
3rd Generation (16 bit processors)
8086 16 bit. Same as 8086, the 8088 introduced 8088 has only 8 bit data bus(This made it easier to interface to the common 8 bit peripheral devices available at the time)
Followed by:
The 80186 & 80286 (16 bit processor), the 80386 & 80486 (a 32 bit processor), leading to the Pentiumrange of microprocessors (64 bit processors) available today. The 80x86 and Pentium processors have allbeen designed for use in personal computer type applications and have large memory maps.
Department of EEEPage 23
-
7/29/2019 61342620 Unit 1 Embedded System
29/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Department of EEE Page 24
-
7/29/2019 61342620 Unit 1 Embedded System
30/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Department of EEE Page 25
-
7/29/2019 61342620 Unit 1 Embedded System
31/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
MMMMMIIIIICCCCCRRRRROOOOOCCCCCOOOOONNNNNTTTTTRRRRROOOOOLLLLLLLLLLEEEEERRRRR
A microcontroller is a single chip VLSI unit called microcomputer which though having limited computational
capabilities processes enhanced i/p-o/p capabilities and a number of on chip functional units.
Stream MPU family Source CISC or RISCStream 1Stream 2Stream 3Stream 4Stream 5*68HC 11XX, 68HC 12XX805180x86$PIC 16FXX
ARM processorMotorolaIntelIntelMicrochipARM, TexasCISCCISCCISCCISCCISC with RISC core
Department of EEE Page 26
-
7/29/2019 61342620 Unit 1 Embedded System
32/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
A microcontroller is a functional computer system-on-a-chip. It contains a processor, memory, andprogrammable input/output peripherals. Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, orboth) and peripherals capable of input and output. INTEL8031,8032,8051,8052,8751,8752 PIC8-bit PIC16, PIC18,16-bit DSPIC33 / PIC24,PIC16C7xMotorolaMC68HC11
Department of EEE Page 27
-
7/29/2019 61342620 Unit 1 Embedded System
33/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
MICROPROCESSOR MICROCONTROLLERThe functional blocks are ALU, registers,timing & control unitsIt includes functional blocks of microprocessors &in addition has timer, parallel i/o, RAM, EPROM,ADC & DACBit handling instruction is less, One or twotype onlyMany type of bit handling instructionRapid movements of code and databetween external memory & MPRapid movements of code and data within MCIt is used for designing general purposedigital computers systemThey are used for designing application specificdedicated systems
Embedded processor
It designed for fast, precise and intensive calculation and for real time applic
ationEg: AWACS-advanced control and warning system-Tracking radar, GPS system
Advantages
1.Fast context switching-complex real time application: context switching meanssaving the context ofinterrupted routine or task or load the new task is called routine. The time taken for a contextswitching for a period called latency period.
2.Atomic ALU operations to solve data share problems-during multitasking operation
E.g.: large scale embedded system i860 or i960 embedding a VLSI chip including RISC andCISC operational features.-image processing and aerodynamic applications
Examples : ARM 7, INTEL i960, AMD 29050
Department of EEE Page 28
-
7/29/2019 61342620 Unit 1 Embedded System
34/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
CLASSIFICATIONS OF EMBEDDED SYSTEMSMALL SCALE EMBEDDED SYSTEM
Single 8 bit or 16bit Microcontroller.Little hardware and software complexity.They May even be battery operated.Usually C is used for developing these system.The need to limit power dissipation when system is running continuously.Programming tools:
Editor, Assembler and Cross Assembler
MEDIUM SCALE EMBEDDED SYSTEM
Single or few 16 or 32 bit microcontrollers or DigitalSignal Processors (DSP) or Reduced Instructions SetComputers (RISC).Both hardware and software complexity.Programming tools:
RTOS, Source code Engineering Tool, Simulator, Debugger and Integrated DevelopmentEnvironment (IDE).
Department of EEEPage 29
-
7/29/2019 61342620 Unit 1 Embedded System
35/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
SOPHISTICATED EMBEDDED SYSTEM
Enormous hardware and software complexityThis may need scalable processor or configurable processor andprogramming logic arrays.Constrained by the processing speed available in their hardwareunits.Programming Tools:
For these systems may not be readily available at a reasonable cost or may not beavailable at all. A compiler or retarget able compiler might have to be developed for this.
Application Specific Instruction-Set Processor (ASIP)
(b) DSP or(c) Media processor or(d) IO processor or(e) Network processor or(f) A domain specific processorDIGITAL SIGNAL PROCESSOR
DSP as a GPP is a single chip VLSI unit.
It includes the computational capabilities of microprocessor and multiply & accumulates units (MAC).DSP has large number of applications such as image processing, audio, video & telecommunicationprocessing systems.It is used when signal processing functions are to be processed fast.Examples: TMS320Cxx, SHARC, Motorola 5600xx
MEDIA PROCESSOR
TI DSP TMS320DM310 or Trimedia Phillips Media Processor 1x00 series for Processi
ngStreaming and Data Networks and Image, Video and Speech: PNX 1300, PNX 1500 (2002)
Department of EEEPage 30
-
7/29/2019 61342620 Unit 1 Embedded System
36/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
3.GPP OR ASIP CORE (S)
GPP or ASIP Integrated into either an Application Specific Integrated Circuit (ASIC), or a Very LargeScale Integrated Circuit (VLSI) circuit or a FPGA core integrated with processorunit(s) in a VLSI (ASIC) chip
4.APPLICATION SPECIFIC SYSTEM PROCESSOR (ASSP)
ASSP is dedicated to specific tasks and provides a faster solution. An ASSP is used as an additional processing unit for running the application inplace of using embeddedsoftware.Examples: IIM7100, W3100A
Typically a set top box processor or mpeg video-processor or network applicationprocessor ormobile application processor
5. Single purpose processor or Application Specific Instruction processor Floating point Coprocessor CCD Pixel coprocessor and image codec in digital cameraDepartment of EEE Page 31
-
7/29/2019 61342620 Unit 1 Embedded System
37/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Graphic processor Speech processor Adaptive filtering processor Encryption engine Decryption engine Communication protocol stack processor Java acceleratorUse of Accelerator Cores:
Examples
Java Accelerator Nazonin Communications Java codes run 15 to 60 Times fast,Video Accelerator for fast Video Processing
6. Multi core processors or multiprocessor system using GPPsExamples
Multiprocessor system for Real time performance in a video-conference system, Embedded firewall cum router, High-end cell phone.etc.MOORES LAW
Moore's law describes a long-term trend in the history of computing hardware. Since the invention of the integrated circuit in 1958, the number of transistorsthat can be placedinexpensively on an integrated circuit has increased exponentially, doubling approximately every twoyears. The trend was first observed by Intel co-founder Gordon E. Moore in 1965. Almost every measure of the capabilities of digital electronic devices is linkedto Moore's law: processingspeed, memory capacity, etc.Department of EEE Page 32
-
7/29/2019 61342620 Unit 1 Embedded System
38/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Basic Circuit Elements at the System
(i) Power Source1. System own supply with separate supply rails for IOs, clock, basic processorand memory andanalog units, or2. Supply from a system to which the embedded system interfaces, for example ina network card,OR
Charge pump concept used in a system of little power needs, for examples, in themouse or contact-less smart card
Power Dissipation Management
1. Clever real-time programming by Wait and Stop instructions2. Clever reduction of the clock rate during specific set of instructions3. Optimizing the codes and4. Clever enabling and disabling of use of caches or cache blocks
(ii) Clock Oscillator Circuit and Clocking Units1. Appropriate clock oscillator circuit2. Real Time Clock*( System Clock) and Timers driving hardware and software(iii) Reset Circuit1. Reset on Power-up2. External and Internal Reset circuit3. Reset on Timeout of Watchdog timerMEMORY
Department of EEE Page 33
-
7/29/2019 61342620 Unit 1 Embedded System
39/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
a. Functions Assigned to the ROM or EPROM or Flash1. Storing 'Application' program from where the processor fetches the instruction codes2. Storing codes for system booting, initializing, Initial input data and Strings.3. Storing Codes for RTOS.4. Storing Pointers (addresses) of various service routines.b. Functions Assigned to the Internal, External and Buffer RAM1. Storing the variables during program run,2. Storing the stacks,3. Storing input or output buffers for example, for speech or image .c. Functions Assigned to the EEPROM or FlashStoring non-volatile results of processing
d. Functions Assigned to the Caches1. Storing copies of the instructions, data and branch-transfer instructions inadvancefrom external memories and2. Storing temporarily the results in write back caches during fast processing(v) Interrupts Handler
Interrupt Handling element for the external port interrupts, IO interrupts, timer andRTC interrupts, software interrupts and Exceptions
(vi) Linking Embedded System Hardware Linking and interfacing circuit for the Buses by using the appropriate multiplexers, and decoders,demultiplexers Interface the varioussystem units3. IO Communication Unita. Communication Driver(s) Network Ethernet or serial driver to communicate withhostembedded system Expansion
Facility Serial Bus(es): For example, UART (512 kbaud/s), 1-wire CAN (33 kbps),Industrial I2C (100kbps), SM I2C Bus (100 kbps), SPI (100 kbps), Fault tolerantCAN (110 kbps),Serial Port (230 kbps), MicroWire (300 kbps). SCSI parallel (40 Mbps), Fast SCSI (8M to 80 Mbps) , Ultra SCSI-3 (8M to 160 Mbps),FireWire/IEEE 1394 (400 Mbps, 72 meter), High Speed USB 2.0 (480 Mbps, 25 meter) Parallel Bus(es): PCI, PCI-Xb. Media IO Control Elementc. Keypad or Keyboard IO Interfaced. LCD Display System Interfacee. ADC Single or Multi channel
f. DACg. GPIB Interface Elementh. Pulse Dialing Elementi. Modem and j. Bluetooth, 802.11, IrDA.Department of EEE Page 34
-
7/29/2019 61342620 Unit 1 Embedded System
40/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
MEMORY TECHNOLOGIES
Memory is an essential part of all microprocessor based systems. Different memory types are available to suitdifferent tasks. Some of these memory types will be discussed here.
1.RANDOM ACCESS MEMORY (RAM)
This is memory that can be written to and read from as often as we wish. The 'Random Access' refersto the fact that we can access any position in the memory equally fast. RAM is used for short term storage, suchas for storing variables that are used by a program. RAM is volatile memory. Itwill only store contents (at best)for as long as the power is applied.
1.1 RAM SignalsA typical RAM device will have (at least) the following set of signals:Data Bus: This is a set of lines which carry the data into the memory or out ofit. We refer to
the width of the memory by how many bits can be written or read simultaneously.Address Bus: This is a set of lines which is used to specify the location of thedata to beread/written.WR line: This line tells the RAM it is going to be written to or read from.OE line: This line enables the data bus as output for when we read data from thedevice.CS line: This line is used to select the device. This line enables or disables the entire chip.Typical timing diagrams may be found in the lab sheet.
1.2 Basic RAM Typesi. DRAM
Dynamic RAM uses tiny capacitors to store each bit of information. This is a cheap, high densitytechnology. The capacitors need to be recharged periodically and so DRAM needs to be refreshed frequently.DRAM forms the basis for most computer memory. Usually DRAM is used together with a DRAM controllerwhich handles the refresh cycles.
ii. SRAMStatic RAM uses a flip flop to store each bit in the memory. Because the data isstored in a proper flipflop there is no need to refresh SRAM. SRAM is more expensive and lower densitythan DRAM. It has better
access times, which means that generally it is faster to store and retrieve datathan the DRAM. SRAM is simplerto use than DRAM as it does not require any refresh circuitry.
Department of EEE Page 35
-
7/29/2019 61342620 Unit 1 Embedded System
41/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
1.3 Special RAM Typesi. SDRAMSynchronous Dynamic RAM is a DRAM based technology which has been enhanced to improve theperformance of the computing system that it is used in. When a computer programuses memory it oftenexhibits a property called spatial locality. When we access one memory location,we often access locationsclose to it soon afterwards. SDRAM is modified so that after it incurs full access time for one access andaccessing other data that is close by faster.
ii. DDRDDR is based around SDRAM. The difference is that the access bus has been enhanced to allowmemory access on both clock edges, hence the name.
iii. RAMBUSRambus is a RAM arrangement which makes use of parallelism to achieve extremely high memory
bandwidth.
1.4 Popular RAM form factorsA form factor is the physical size and shape of a device. RAM comes in a numberof standard sizesand shapes. These generally originate in the computer industry. Early desktop computers used individual RAMchips. The RAM occupied a very large portion of the motherboard.
The SIMM (Single Inline Memory Module) was introduced. This is a small circuit board which hadthe RAM chips on it. The SIMM normally stood upright on the motherboard and occupied less real estate. The
SIMM concept was taken further with the 72 pin SIMM. This SIMM had more connection points to allow forwider busses.72 pin SIMM's had either FPM (slower) RAM chips on them or EDO (faster)RAM chips on them.When PC's started using SDRAM instead of DRAM the form factor of the memory waschanged. The newdevices were called DIMM's (Dual Inline Memory Module). These have even more pins than the SIMMs.
DIMM's had 10ns access time device (called PC100 for the 100MHz bus that connected to them) or7.5ns access time devices (called PC133) on them. When PC's started using DDR then a new form factor was
introduced. DDR modules come in a variety of speeds, commonly up to 400MHz. Higher speeds are available.Laptop computers use smaller form factors. These are not as standardized as thedesktop PC RAM form factors.Some manufacturers use this as a business tool.
Department of EEE Page 36
-
7/29/2019 61342620 Unit 1 Embedded System
42/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
2. READ ONLY MEMORY (ROM)Read Only Memory is a memory which is made to store data on a permanent basis. We call this non-volatilememory. ROM is used in computing systems to store programs, long-term data and it can sometimes be used inplace of combinational logic. When we put data into a ROM it is generally calledprogramming the device.
2.1 ROM SignalsROM devices will have (at least) the following signals:Data bus: A set of lines which data is normally read out of. During programmingdata isnormally put in through these lines.Address Bus: A set of lines used to specify the address to be read or programmed.OE: Output enable. Allows the data bus to output data.CS: Chip Select. Enable the deviceProgramming Signals: These lines are used to signal the memory device that datais to beprogrammed. Older devices used high voltage (up to 21V) signals to program the
device. Typical timing diagrams may be found in the lab sheet.
6.2.2 Basic ROM Typesi. Mask ROMThis ROM is manufactured with the data already stored in it. This is only used for very high volumeproduction when the data (or program) has been thoroughly tested. This is a cheap option as it avoids having toprogram the devices yourself. Once the device is manufactured there is no way tochange it.
ii. PROM (Programmable Read Only Memory)
This memory type is almost obsolete now. Devices would be programmed by blowingtiny fusesinside the device. Devices could only be programmed once.
iii. EPROM (Erasable Programmable Read Only Memory)This memory type is also nearing obsolescence. Device could be programmed and could then beerased by shining an ultraviolet light through a quartz window in on the top ofthe chip. The packing wasexpensive. Being able to erase the devices was a big step forward from PROM.Erasing a device requires a UV light source. The device had to be exposed to high levels of UV for 15 minutes.Some microcontrollers incorporated EPROM. These are fantastic to look at under a
microscope. You can seethe silicon die through the window. Under a stereo microscope they are truly spectacular.
Department of EEE Page 37
-
7/29/2019 61342620 Unit 1 Embedded System
43/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
EPROM has a fairly limited endurance. Endurance is the number of times that a device can be erased andreprogrammed. EPROM typically has an endurance of several hundred cycles.
iv. OTP (One Time Programmable)Because the packaging for normal EPROM is expensive a cheaper option is available. These devicesare EPROM inside, but have no quartz window. Because of the volumes, the programming equipment and thecompatibility these devices are generally preferred to PROM. Once they have beenprogrammed they can not bechanged.
v. EEPROM (Electrically Erasable Programmable Read Only Memory)These devices can be programmed and then erased by means of an electrical signal. This opens up ahuge range of possibilities. They are cheap and find their way into many devices. A few microcontrollers usedEEPROM for storing their programs. Many modern microcontrollers have a block ofEEPROM which can be
used for storing configuration data.
Typical endurance figures for modern EEPROM are around 1000 000 cycles. EEPROM is a fairly lowdensity technology and this limits its use for bulk storage.
vi. FlashFlash memory is also electrically erasable. It is based around a different principle of operation toEEPROM. Flash memory attains much higher density than EEPROM and it has established itself as a popularbulk storage medium. Flash memory has lower endurance than EEPROM. First generation Flash memory
devices had endurance figures of around 100 cycles, but new devices will withstand several hundred thousandcycles. Techniques such as wear leveling and delayed writing are used to furtherimprove the endurance ofFlash memories. Flash memory is cheap to produce and is the memory technology ofchoice for mostmicrocontrollers.
3. Programmable Logic TechnologiesProgrammable logic is used to build up complex circuits without the need to connect up many gates.They consist of chips which contain many logic gates. The way in which these gates are connected is
determined by the way in which the device is configured (programmed).
Programmable logic is commonly used because it is more compact and generally canrun faster than acircuit made out of discrete gates. Programmable logic offers design security.
There has been remarkable progress in the development of programmable logic devices over the lastfew years. Because of the vast changes that the industry has seen there are veryfew standards in terms of
-
7/29/2019 61342620 Unit 1 Embedded System
44/72
signals and compatibility between devices.
Department of EEE Page 38
-
7/29/2019 61342620 Unit 1 Embedded System
45/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
3.1 PAL (Programmable Array Logic) and PLA ( Programmable Array Logic)These were the earliest form of programmable logic. They had a simple grid typestructure which wasprogrammed by blowing fuses. They were only programmable once. The programming was done in a simplelanguage, typically PALASM, ABEL or CUPL.
3.2 GAL (Generic Array Logic)Slightly more complex and flexible structure than PAL. Reprogrammable! They typically had aJTAG (Joint Test and Access Group) interface for programming. This is an industry standard (IEEE1149.1)four wire interface that has become one of the dominant programming and debugging interfaces forprogrammable logic, microcontrollers and larger processors.
3.3 PEEL (programmable electrically erasable logic)Very similar to GALs, but made of CMOS rather than bipolar technology.
3.4 CPLD (Complex Programmable Logic Device)
These devices are typically made up of many small PAL's connected together witha programmableinterconnection system. They are much more flexible than any of the previous programmable logic families.
3.5 FPGA (Field Programmable Gate Array)These are the high end of the market. They consist of lots of programmable logicblocks. These blocksare each quite complex, typically consisting of PAL type logic as well as devices such as configurable flip flops.They are available in sizes up to several million gates.
They often have peripherals such as phase locked loop clock multipliers, memory
blocks andcommunication (LVDS) systems.
There are many FPGA's which are big enough to hold entire microprocessors. Theseare becomingmore popular. They are called soft cores.
Department of EEE Page 39
-
7/29/2019 61342620 Unit 1 Embedded System
46/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
SYSTEM-ON-CHIP (SoC) AND USE OF VLSI CIRCUIT DESIGN TECHNOLOGY VLSI CHIP
Integration of high-level componentsPossess gate-level sophistication in circuits above that of the counter, register, multiplier, floatingpoint operation unit and ALU. System on chip (SoC) a new design innovationSoC is a system on a VLSI chip that has all needed analog as well as digital circuits, processors andsoftware, for example, single-chip mobile phone New InnovationExample Mobile Phone on a SoC
SYSTEM-ON-CHIP
Embeds:
Multiple processors,memories,multiple standard source solutions (IP Cores),Logic and analog units Embedding a MicroprocessorGeneral Purpose Processor (GPP) microprocessor can be embedded on a VSLI chip.Department of EEEPage 40
-
7/29/2019 61342620 Unit 1 Embedded System
47/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Embedding an ASIP
Processor with instruction set designed for specific application on a VLSI chipfor example,microcontroller, DSP, IO, media, network or other domain specific processor Embedding aMicrocontroller core68HC11xx,HC12xx,HC16xx8051,80251 PIC 16F84 or16C76, 16F876 and PIC18Microcontroller
Enhancements of ARM9/ARM7 ARM, Cortex M3 from Philips, Samsung and ST MicroelectronicsEmbedding a DSP Core
TMS320Cxx, OMAP1Tiger SHARC 5600xx PNX 1300, 15002DSP for mobile phones, for example, OMAP of Texas Instruments use the effectivepowerdissipation methods of dynamic switching both of power supply voltage and operating frequency of theCPU core.
Filtering, noise cancellation, echo elimination, compression and encryptionEmbedding a Multi-processor or Dual Core using General Purpose Processors (GPP)
Speech signal-compression and coding, Signal decoding and decompression
Embedding an Accelerator
Accelerate the execution of codes, for example, a floating point coprocessor accelerates the mathematicaloperations and Java accelerator accelerates the Java code execution.
Embedding Single purpose processors
For Dialing, Modulating, Transmitting. Demodulating and Receiving.Keypad interface and display interface handling.Touch screenMessage display and creation, SMS (Short Message Service) and MMS
-
7/29/2019 61342620 Unit 1 Embedded System
48/72
Protocol-stack generation.Pixel coprocessor and CODEC in a digital cameraSoC
Embedded processor GPP or ASIP core,Single purpose processing cores or multiple processor cores,A network bus protocol core,An encryption and decryption functions cores, Cores for FFT and Discrete cosinetransformsfor signal processing applications,Memories Multiple standard source solutions, called IP (Intellectual Property) cores,Programmable logic device and FPGA (Field Programmable Gate Array) cores.Other logic and analog units.Department of EEEPage 41
-
7/29/2019 61342620 Unit 1 Embedded System
49/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
IPs in SoC
IP a standard source solution for synthesizing a higher-level component by configuring a core of VLSIcircuit or FPGA core available as an Intellectual Property, called (IP).High Level Components with gate level sophistication circuit much above level ofcounters and registers.IPs
Designer or designing company holds the copyright for the synthesized design ofa higher-levelcomponent for gate-level implementation of an IP.One might have to pay royalty for every chip shipped. An embedded system may incorporate several IPs.IP
An IP may provide a
Design for adaptive filtering of a signal.Full design for implementing Hypertext Transfer Protocol (HTTP) or File TransferProtocol (FTP) totransmit a web page or file on Internet.USB port controller, Bluetooth, GPS interface, Wireless 802.11or 802.16 interfaces FPGA CoreAn FPGA consists of a large number of programmable gates on a VLSI chip. There is a set of gates in
each FPGA cell, called 'macro cell'.Embedded system designed with a view of offering enhancing functionalities in future, then FPGA corecan be used in the circuits.FPGA Core
Each cell has several inputs and outputs. All cells interconnect like an array (matrix).Each interconnection is programmable through the associated memory RAM in a FPGAprogramming
tool.A concept is using FPGA (Field Programmable Gate Arrays) core along with singleor multipleprocessors.Use of Xilinx Spartan-3 90 nm based FPGAs with Power PCs (2003 )
Use of FPGAs cum Processor Cores
FPGA 125136 Logic Cells along with the Four IBM PowerPC processors
-
7/29/2019 61342620 Unit 1 Embedded System
50/72
[Exemplary Application: System with a Data Encryption Engine at 1.5 Gbps]
FPGA
An SIMD instruction, Fourier transform and its inverse, DFT or Laplace transformand its inverse,compression or decompression, encrypting or deciphering, a specific pattern-recognition (for recognizinga signature or finger print or DNA sequence).Configure an algorithm into the logic gates of the FPGA.Department of EEEPage 42
-
7/29/2019 61342620 Unit 1 Embedded System
51/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
FPGA CORE WITH A SINGLE PROCESSOR
E.g.Smart Card
Smart Card
Smart card a plastic card in ISO standard dimensions, 85.60 mm x 53.98 x 0.80 mm.Embedded system on a card.SoC (System-On-Chip).ISO recommended standards are ISO7816 (1 to 4) for host-machine contact basedcards and ISO14443 (Part A or B) for the contact-less cards.Silicon chip is just a few mm in size and is concealed in-between the layers. It
s very small size protectsthe card from bendingEmbedded hardware components in a contact less smart card
Department of EEEPage 43
-
7/29/2019 61342620 Unit 1 Embedded System
52/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Embedded hardware components
Microcontroller or ASIP (Application Specific Instruction Set Processor)RAM for temporary variables and stackROM for application codes and RTOS codes for scheduling the tasksEEPROM for storing user data, user address, user identification codes, card number and expiry dateTimer and Interrupt controllerA carrier frequency ~16 MHz generating circuit and Amplitude Shifted Key (ASK)Interfacing circuit for the I/OsCharge
Embedded Software
Boot-up, Initialisation and OS programsSmart card secure file systemConnection establishment and terminationCommunication with hostCryptography
Host authenticationCard authenticationAddition parameters or recent new data sent by the host (for example, present balance left)Smart Card OS Special features
Protected environment.Every method, class and run time library should be scalable.
Code-size generated be optimum.Memory should not exceed 64 kB memory.Limiting uses of specific data types; multidimensional arrays, long 64-bit integer and floatingpointsSmart Card OS Limiting features _ Limiting uses of the error handlers, exceptions, signals,serialization, debugging and profiling. [Serialization means process of converting an object is converted
-
7/29/2019 61342620 Unit 1 Embedded System
53/72
into a data stream for transferring it to network or from one process to another. At receiver end there isde-serialization.]Smart Card OS File System and Classes
Three-layered file system for the data.
Master file to store all file headers.Dedicated file to hold a file grouping and headers of the immediate successor elementary files of thegroup.Elementary file to hold the file header and its file data.Fixed-length or variable-file length managementClasses for the network, sockets, connections, data grams, character-input output and streams, securitymanagement, digital-certification, symmetric and asymmetric keys-based cryptography and digitalsignatures.Department of EEE
Page 44
-
7/29/2019 61342620 Unit 1 Embedded System
54/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
GENERALSOFTWARE FOR EMBEDDING IN A SYSTEM-PART 1ROM image, Programming Languages and Program models
ROM Image
Final stage software also called ROM image* (Just as an image is a unique sequence and arrangement of pixels, embedded software is also a uniqueplacement and arrangement at each ROM address of bytes for instructions and data. )SystemROM memory embedding the software, RTOS, data, and vector addresses
Final machine software
Bytes at each address defined for creating the ROM image.
By changing this image, the same hardware platform work differently and can be used for entirelydifferent applications or for new upgrades of the same system.Department of EEEPage 45
-
7/29/2019 61342620 Unit 1 Embedded System
55/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Distinct ROM image in a distinct Embedded System
Hardware elements between the distinct systems can be identical but it is the software that makes a systemunique and distinct from the other.
Compressed Codes and Data
ROM image may alternatively be compressed software (for example, the zip format)and data (for example,the pictures in jpg or gif format) along with the software required for decompression algorithm
OUTLINE
ROM imageProgramming Languages
Program models1. Machine Language CodingProgrammer defines the addresses and the corresponding bytes or bits at each address.Used in configuring some specific physical device or subsystem like transceiver,the machine code-based coding is used2. Assembly Language CodingNeeded for Invoking Processor Specific Instructions
Requires understanding of the processor and instruction set.A program or a small specific part coded in the assembly language using an Assembler (software usedfor developing codes in assembly).Three steps when using assembly language
'Assembler','Linker' and
'Locator'Before finally burned at the ROM
Department of EEEPage 46
-
7/29/2019 61342620 Unit 1 Embedded System
56/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Programming language C or C++ or Visual C++ or Java
Application Software -Different Program Layers
Department of EEE Page 47
-
7/29/2019 61342620 Unit 1 Embedded System
57/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Program various layers
Processor commands,Main function,Task functions andLibrary functions,Interrupt service routines andKernel (scheduler).Compiler
Generates an object file .Using linker and locator, the file for ROM image is created for the targeted
hardware.C++ and Java are other languages used for software coding.Program Models
Sequential Programming ModelObject Oriented Programming ModelControl and Data flow graphs orSynchronous Data Flow (SDF) Graph or Multi Thread Graph (MTG) Model
Finite State Machine for data pathMultithreaded ModelConcurrent Processing of processes or thread or tasksDepartment of EEEPage 48
-
7/29/2019 61342620 Unit 1 Embedded System
58/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
DEVICE DRIVERS, DEVICE MANAGER, OS, RTOS AND SOFTWARE TOOLS
DeviceDevice managerMultitasking using an operating system (OS) and Real time operating system (RTOS)Software toolsDEVICE
In an embedded system, there are number of physical devices.
Physical devices keypad, LCD display or touch screen, memory stick (flash memory), wireless networkingdevice, parallel port and network card
In an embedded system, there are number of virtual devices.
Virtual devices pipe, file, RAM disk, Socket, Device Driver
A device driver is software for controlling (configuring), receiving and sendinga byte or a stream of bytes fromor to a device.
A set of generic functions, such as create ( ), open ( ), connect ( ), listen (), accept ( ), read ( ), write ( ),close ( ), delete ( ) for use by high level programmers
Each generic function calls a specific software (interrupt service routine), which controls a devicefunction or device input or outputDevice controls and functions by:
1. Calling an ISR (also called Interrupt Handler Routine) on hardware or software interrupt2. Placing appropriate bits at the control register or word.3. Setting status flag(s) in the status register for interrupting, therefore running (driving) the ISR, Resetting thestatus flag after interrupt service
DEVICE MANAGER
Device Manager for the devices and driversDevice Management software (usually a part of the OS) provide codes for detecting the presence ofdevices, for initializing (configuring) these and for testing the Concurrent Processes, tasks or threads
-
7/29/2019 61342620 Unit 1 Embedded System
59/72
A System is composed of two or more concurrent processes that executeOperating System
Multitasking (multiprocessing or multithreaded) softwareScheduling multiple tasks,Processes, memory, device, ports, network, file system, timers, event functions,inter-processorCommunication, shared memory, security, GUIs, .etc. management devicesDepartment of EEEPage 49
-
7/29/2019 61342620 Unit 1 Embedded System
60/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Real Time Operating System (RTOS)
Embedded software is most often designed for deterministic performance and taskandISR latencies in addition to the OS functionsPerforming multiple actions and controlling multiple devices and their ISRs withdefined real timeconstraints and with deadlines for these Task and ISRs priority allocations, their preemptive scheduling
RTOS and concurrent processes
OS for providing deterministic performance during concurrent processing and execution with hard (stringent) orsoft timing requirements with priority allocation and preemption RTOS is neededwhen the tasks for the systemhave real time constraints and deadlines for finishing the tasks
Important RTOSes
OS COS-IIVxWorksWindows CEOSEKLinux 2.6.24 or RTLinux
QNXDEVELOPMENT TOOLS
1.Editor,
2. Interpreter,3. Compiler,4. Assembler and Cross Assembler,IDE,5. PrototyperApplication Software Development Tools
Source Code Engineering ToolsStethoscope (tracks the switching from one task to another as a function of time, stores beats)Trace Scope (traces changes in a parameter(s) as a function of time)A Simulator... To simulate the target processor and hardware elements on a hostPC and to run and test theexecutable module.
-
7/29/2019 61342620 Unit 1 Embedded System
61/72
Project Manager
To manage the files that associates with a design stage project and keep severalversions of the source file(s) inan orderly fashion.
Department of EEE Page 50
-
7/29/2019 61342620 Unit 1 Embedded System
62/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
SOFTWARE DESIGN CYCLE
Activities for Software Design during Software-Development Process
Five levels of abstraction from top level to bottom level in the design process
RequirementsSpecificationsArchitectureComponentsSystem IntegrationDepartment of EEE Page 51
-
7/29/2019 61342620 Unit 1 Embedded System
63/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Requirements
Complete clarity of
required purpose,inputs,outputs,functioning,design metrics andValidation requirements for finally developed systems specifications.Consistency in the requirementsSpecifications
Clear specifications of Customer expectations from the product.Needs specifications for hardware, for example, peripherals, devices processor and memoryspecifications data types and processingSpecifications
Needed specifications
Expected system behavior specifications,
constraints of design,expected life cycle specifications of the product.Process specifications analysed by making lists of inputs on events list, outputs on events, processesactivated on each event.Architecture
data flow graphs
program modelssoftware architecture layers andhardware architectureinterfaces designsystem integrationHardware Components
-
7/29/2019 61342620 Unit 1 Embedded System
64/72
Processor, ASIP and single purpose processors in the systemMemory RAM, ROM or internal and external flash or secondary memory in the systemPeripherals and devices internal and external to the systemPorts and buses in the systemPower source or battery in the systemDepartment of EEEPage 52
-
7/29/2019 61342620 Unit 1 Embedded System
65/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Challenges in Embedded System Design: Optimizing the Design Metrics and Formalism of System Design
Formalism of Steps
Requirements and Specifications of hardware and softwareDefine architectures of hardware and softwareCoding and implementation as per architectureTesting, validation and verification of SystemAmount and type of hardware needed
Optimizing the microprocessors, ASIPs and single purpose processors in the system
Optimizing according to the performance, power dissipation, cost and other design metrics the systemOptimizing hardware (memory RAM, ROM or internal and external flash or secondarymemory in thesystem, peripherals and devices internal and external to the system, ports and buses in the system andpower source or battery in the system).Taking into account the design metrics
Design metrics examples power dissipation, physical size, number of gates and engineering, prototypedevelopment and manufacturing costs.
Optimizing the Power Dissipation
Clock Rate ReductionOperating Voltage ReductionWait, Stop and Cache Disable InstructionsClever real-time programming. It is by using of 'Wait' and 'Stop' instructions and disabling or
controlling certain units when not needed is one method of saving power during program executionDisable use of certain structural units of the processor to reduce power dissipation
Cacheswhen not necessary andKeep in disconnected state those structure units that are not needed during a particular software-portion
-
7/29/2019 61342620 Unit 1 Embedded System
66/72
execution, for example, display screen, timers or IO unitsControl of power requirement, for example, by screen auto-brightness controlProcess Deadlines
Meeting the deadline of all processes in the system while keeping the memory, power dissipation, processorclock rate and cost at minimum is a challenge
Department of EEEPage 53
-
7/29/2019 61342620 Unit 1 Embedded System
67/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Coding language UML (Universal Modeling Language)
Conceptual design modelingClasses and Objects to describe identity, attributes, components and behaviourInheritances in classes and objectsInterfaces with the objects and their implementation in the objects,Structural description of the design ComponentsBehavioral description in terms of states, state machine and signalsEvents descriptionTesting, Verification and Validation
Testing to find errors and to validate that the implemented software is as per thespecifications and requirements to get a reliable product.Verification refers to an activity to ensure that specific functions are correctly implemented.Validation refers to an activity to ensure that the system that has been createdis as per therequirements agreed upon at the analysis phase, and to ensure its qualityExample : SET OF ROBOTS
Hardware components in the set of robots
Department of EEEPage 54
-
7/29/2019 61342620 Unit 1 Embedded System
68/72
Introduction to Embedded system [UNIT-I]V.V.C.E.T
Master Robot Functions
It receives from a remote controller commands to start the music, stop the musicand the code for thespecific orchestra to be played.It sends the PWM signals to the ports for the moving the sticks in both hands asper the program.
It establishes and binds the sockets (the virtual devices) connection with the slaves.It sends the signals through sockets using IrDA protocols. The byte streams responses to the clients areas per the music file being playedSlave Robot Functions
It establishes and binds the sockets (the virtual devices) connection with the master.It receives from a master socket the commands accept ( ) and write ( ) from themaster. It receivescommands from master to start the music, stop the music and the code for the specific orchestra to beplayed.It receives the signals through sockets using IrDA protocols. The byte streams from the server re as perthe music file being played.
Slave robots speaker outputs for playing the music.Robot Hardware units
Microcontroller or ASIP (Application Specific Instruction Set Processor)Music file processorRAM for storing temporary variables and stackROM for application codes and RTOS codes for scheduling the robot actions and tasks
Timer, Flash memory for storing user preferences and music files.IrDA controllerDirect Memory Access controllerPower supply source or batteryMicrocontrollers
-
7/29/2019 61342620 Unit 1 Embedded System
69/72
Each robot has a microcontroller with expansion ports, P0,., P8.A single ASIC can perform the multiple port functions of a microcontroller. Whenthe engineering costof ASIC development is high, a general purpose microcontroller 68HC12 or 8051 isused.Control Funtions
Master robot signals the commands and slave robots play according to the signalsfrom the master.
Each robot is assumed to have five degrees of freedom. At each degree of freedom, there is a servomotor.A servomotor controls by PWM method.Each motor is controlled in a sequence to let the robot perform the desired action.Department of EEEPage 55
-
7/29/2019 61342620 Unit 1 Embedded System
70/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Ports and Flash Memory
The port outputs from the port(s) connect the motors and PWM outputs drive the motors in each robot.Each robot has a serial input/output through IrDA protocol.Internal memory flash to store the OS, embedded software and limited number of music.Robot Software Components
Socket functionsMusic codingMusic decodingMemory and file systems
Light, flash and display device driversIrDA and socket Port device driversMotor driversIO Interrupt Service routinesSoftware components in the set of robots in which a master robots signals the commands and slave robotsplay according to the signals from the master
Department of EEE Page 56
-
7/29/2019 61342620 Unit 1 Embedded System
71/72
Introduction to Embedded system [UNIT-I] V.V.C.E.T
Introduction to Embedded Systems
Part A (2 MARKS)
1. Define a System.2. What is an embedded system?3. What are the main components of an embedded system?4. Define embedded microcontroller.5. What are the various classifications of embedded systems?6. What are the two essential units of a processor on a embedded system?7. What does the execution unit of a processor in a embedded system do?8. Give examples for general purpose processor.9. Define microprocessor.10. When is Application Specific System processors (ASSPs) used in an embedded system?11. What is the need for LCD and LED displays?12. Define ROM image.13. Define device driver.14. Name some of the softwares used for the detailed designing of an embedded system.
15. What are the various models used in the design of a embedded system?16. Give some examples for small scale embedded systems.17. Give some examples for medium scale embedded systems18. Give some examples for sophisticated embedded systemsPart B (16 MARKS)
1. List the hardware units that must be present in the embedded systems.2. i) Explain the Exemplary applications of each type of embedded system. (8)ii) Explain the different program layers in the embedded software and also the process ofconverting a C program into the file for ROM image with suitable block diagrams. (8)3. Explain the Embedded System on Chip (SoC) & in VLSI circuit.
4. i) Explain the various form of memories present in a system (8)ii)Explain the software tools in designing of an embedded system. (8)Department of EEE Page 57
-
7/29/2019 61342620 Unit 1 Embedded System
72/72