You are on page 1of 16

Unit 1 : Introduction to Embedded Systems

Electronics and Communication Engineering Geethanjali College of Engineering and Technology


Cheeryal (V), Keesara (M), RR Dt. AP 501301 Email: gcetmcesd@gmail.com

Prepared by : Prof. K S Rao, E C E Dept

Topics:

Overview of Embedded Systems Processor embedded into a system Embedded hardware units and devices in system Embedded software Complex system design Design Process in Embedded Systems Formalization of System Design Classification of embedded systems.
Pl refer chapter 1 of the text book Embedded Systems by Raj Kamal

Prepared by : Prof. K S Rao

Overview of Embedded Systems


System: A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program or a set of rules. A System is also an arrangement in which all its units assemble and work together according to the plan or program. Embedded system: a. It is a system that has embedded software and computer hardware, which makes it a system dedicated for an application or specific part of an application or product or a part of a larger system. b. It is any device that includes a programmable computer but is not itself intend to be a general purpose computer. c. These are electronic systems that contain a microprocessor or a microcontroller, but these are not computers. The computer is hidden or embedded in the system. Ex: Fax m/c, washing m/c. microwave oven, digi camera, cam cord, Digi TV, modem, clock, MP player, Cell phone, car controller, elevator controller, set top box, etc. etc. Special characteristics of Embedded system: It will not have secondary memory (disc units). It executes Real time and multi rate operations, reacts to events, interrupts and schedules the system functioning in Real time, executes complex algorithms, complex user interface (GUI) & other user interfaces and dedicated functions. Constraints for ES : Available system memory, Processor speed, Limit the power dissipation, small size, low Cost, high performance and low power consumption.

Prepared by : Prof. K S Rao

Overview of Embedded Systems


Comparison between microprocessors and Microcontrollers:
Microprocessors are intended to be general purpose digital computers where as microcontrollers are intended to be special purpose digital controllers. Microprocessors contain a CPU , memory addressing circuits, and interrupt handling circuits. Microcontrollers have these features as well as timers, parallel and serial I/O and internal RAM and ROM in a single VLSI IC. Microprocessors are also known as GPPs and are used for a general desktop / laptop systems. Microcontrollers are used generally for Embedded systems. Microcontrollers models vary in data size 4 to 32 bits. External memory can also be added.

Prepared by : Prof. K S Rao

Overview of Embedded Systems


The components of an Embedded system hardware:
Power supply, Reset and oscillator circuits Input Devices Interfacing / Driver circuits

Processor

Program Memory & Data Memory

Timers Interrupt controllers

Serial communication ports


Parallel ports

Outputs Interfacing / Driver circuits

Prepared by : Prof. K S Rao

System application specific circuits

Processor embedded into a system


An embedded system processor chip or core can be one of the following:
GPP : A General purpose processor with instruction set designed not specific to the applications Micro processors, Embedded processors ASIP: Application Specific Instruction set Processor with an instruction set designed for specific applications on a VLSI chip Micro controllers, Embedded microcontrollers, DSPs, Network processors, I/O processors etc. Single purpose processors as additional processors : Ex: Coprocessor ( used for graphic processing, floating point processing, encrypting, DCT, IDCT applications), Accelerator ( Java code accelerator), Controllers (Peripherals, DMA, bus controllers). ASIP / GPP as FPGA : cores integrated with processor units in a VLSI or a ASIC ASSP : Application specific system processor Multi-core processor / Multiprocessor : To improve speed of execution

Microprocessor : is used as general purpose processor when large embedded software has to be located in the external memory chips. Microcontroller : is used when a small or part of the software has to be located in the internal memory and when on-chip functional units such as the interrupthandler, port, timer, ADC. PWM and CAN controllers are required.

Prepared by : Prof. K S Rao

Processor embedded into a system


Single purpose processors: used in Embedded system includes
Coprocessor : Ex. Floating point processing Graphic processor: for functions such as gaming, display from graphics memory buffers and to move and rotate an image or its segments. Pixel coprocessor: used in digital cameras for displaying images directly or after rotate operations, shifting to next or previous operations. Encryption engine: to encrypt data for secure transmission Decryption engine: to decrypt the encrypted data at receivers end DCT & IDCT : discrete cosine transformation and inverse transformation for speech and video processing. Protocol stack processor: to create protocol formats like header, error check codes etc. Network processor: to establish connection, finish, send and receive acknowledgements. Accelerator: to accelerate computations in java programs CODEC: coder-decoder for voice, speech, image, video signals JPEG CODEC: Joint photographers experts group CODEC for jpg compression/ decompression of pictures MPEG CODEC: Motion pictures experts group CODEC for MP3 compression / decompression for videos. Controller: DMA / peripheral / bus controllers

Prepared by : Prof. K S Rao

Embedded hardware units and devices in system


Power source : battery / AC input power. Also, a charge pump can be used. Clock oscillator circuit and clocking units : clock oscillator circuit, using it for synchronizing various CPU activities. System timers and real time clocks : generates system interrupts periodically, creates required delays, and executes programs in real time. Reset circuit, power up reset and watchdog time reset : to make the CPU to start from the beginning of the program. WDT brings the processor to normal when it falls in an infinite loop or out of memory track. Memory : RAM, ROM for data and program. Internal or external. Input, output and IO ports, IO buses and IO interfaces: For interfacing with the external physical devices. Can be serial or parallel. Mux and De-multiplexers are used for connecting more devices. I2C, CAN, USB, ISA, EISA, PCI etc. buses are in use. DAC using a PWM and an ADC: PWM technique with an external integrator is used for DAC. STC (start of conversion) and EOC ( End of conversion) signals are used for ADC. LCD, LED and Touch screen Displays: to display the status or message for a line, for a multiline displays. Keypad / Keyboard: for giving inputs. Pulse Dialer, Modem and Transceiver: for the usage in communication system. Interrupt handler: for executing ISRs, in case of interrupts from physical devices, systems, software instructions, timers etc.

Prepared by : Prof. K S Rao

Embedded Software
Final machine Implementable software for a system: A final ROM Image. Contains memory address and contents. This image contains boot-up program, stacks, application program, ISRs, RTOS, Input data and vector addresses. Coding of software in machine codes: Direct writing the bits and bytes in the machine code. Very rarely done for simple programs as this is very difficult. Software in processor specific assembly language: Using machine specific mnemonics, writing in ALP (LL language). Assembler converts ALP program into machine code. Linker links various such required programs of an application, into a single program. Loader program performs reallocating the codes based on the availability of the physical memory locations. Locator locates these codes in the ROM, permanently. Device programmer is used to burn the ROM with the final program. Software in High level language: For complex applications, programming can be done fast using C/ C++ /VC++ /Java. C program has various layers: processor commands, main function, task and library functions, ISRs & Kernel. Compiler converts HL program to an object file. Using a linker and locator, the file for the ROM image is created for target system. Program models for software designing : The program design is simplified if a program is modeled. The different models are : Sequential program model, Object Oriented Program model, Control and Data flow graph, Finite state machine for data path, Multithreaded Model for concurrent processing of threads or tasks. UML is the modeling language for Object Oriented Program model and is popular.

Prepared by : Prof. K S Rao

Embedded Software
Software for concurrent processing and scheduling of multiple tasks and ISRs using an RTOS: Real Time Operating System is used in ES for concurrent processing of multiple tasks when the tasks have real time constraints and deadlines. Software for Device drivers and Device Management in an operating system : Two types of device drivers, i.e. physical devices (KB, printer, display etc.) & virtual devices (a file, a pipe, a socket, RAM, disk etc.). Device drivers and device manager software are needed in the system. The RTOS includes device drivers and a device manager, to control and facilitates the use of number of physical and virtual devices. Software tools for designing an Embedded system: Editor, interpreter, compiler, Assembler, Cross Assembler, Simulator, Source code Engineering software, RTOS, Stethoscope, Trace scope, Integrated development Environment (IDE), Prototyper, Locator etc. are the various tools for the designing an ES software.

Software tools required in Exemplary cases : RTOS is essential in most embedded systems to process multiple tasks and ISRs. Embedded systems for medium scale and sophisticated applications need a number of sophisticated software and debugging tools.

Prepared by : Prof. K S Rao

10

Complex System Design & Processors


Embedding a Microprocessor :A GPP from Motorola (69HCxxx- CISC)/ Intel(80x86- CISC)/ SUN (SPARC- RISC)/ ARM (ARM- RISC with CISC functionality - is embedded on a VLSI. Embedding a Microcontroller : Motorola (68HC12 / 12/ 16xx-CISC)/ Intel (8051x-CISC)/ Microchip (PIC 16/18xx- CISC)/ ARM (ARM7 /9) - is embedded on a VLSI. Embedded a DSP: Texas (TMS320xx)/ Analog Devices (Tiger SHARC)/ Motorola(5600xx)/ Philips(PNX1300/1500) are used for DSP. DSP have DCT/IDCT, MAC, facilities. These are SIMD, VLIW processors. Embedding a RISC: For speedy processing of instructions, each in a single clock cycle time. Pipelining and super scalar processing is possible in RISC. THUMB is the new industry std. Embedding an ASIP: Instn set designed for specific application like DSP, IO, media, network. Embedding a Multiprocessor or Dual core using GPPs: For execution of tasks in a strict deadline, concurrently. Embedded processor / Embedded Microcontroller : Embedded Processors are with fast processing, fast context switching and atomic ALU operations. Embedded controllers are with internal RAM, ROM, timer, interrupt handler, to meet the reqt with out external memory. Embedding ARM Processor: ARM cores integrated with DSP, are very popular. ARM7. ARM9 and CORTEX-M3 operating at 200 MHz are now a days in use for complex ES. Embedding ASSP: An ASSP is used as an additional processing unit for running application specific tasks in place of processing using embedded software.

Prepared by : Prof. K S Rao

11

Design Process in Embedded Systems


Design Metrics
Power dissipation : to be as small as possible,, otherwise the battery operated systems are to be charged very frequently. Performance : smaller instruction execution time for higher performance Process deadlines: computations are to be finished and results are to be given with in the specified timings. User interfaces : facility to interface with keypad, GUIs and VUIs etc. Size : should have less physical size, should take less RAM and should have less no. of logic gates to have less circuit. Engineering cost : Initial cost of developing, debugging, testing the H/w and the S/w Manufacturing cost : cost of manufacture each unit - costs should be small Flexibility: enhancement to advanced versions should be possible. Prototype development time : time taken for developing the prototype and in-house testing for system functionalities. Time to market: time taken after prototype to products for use by customers System and user safety: safety to accidental fall, theft, and user safety Maintenance: changeability and additions to the system like adding additional memory, etc. Also, the units are to be easily maintainable for repairs.

Prepared by : Prof. K S Rao

12

Design Process in Embedded Systems


Abstraction of steps in the Design process

Top to down design is the most favored approach.


a. b. c. d. e. Requirements: Definition and analysis of the system requirement. Purpose, inputs, outputs, functioning, design metrics and validation requirements . Specifications: Precise, guide the customer expectations from the product, guide the system architecture for finalizing hardware, data types and processing requirements, system behavior, constraints and expected life cycle specifications. Architecture: data modeling designs, data flow graphs, program models, software architecture layers and hardware architecture. Components: For Hardware, the components are processor, memory, peripherals, ports, buses, power source etc. For software, these are object oriented components. System integration: built components are integrated in the system and the system is made functional and validated. Debugging tools and IDE etc. are used for testing and validation.

Continuous refinement in design can be made by effective communication between designers and implementers. Software design activities are Edit, test, debug and validate till a bug free system is developed.

Prepared by : Prof. K S Rao

13

Design Process in Embedded Systems


Challenges in Embedded system design Optimizing Design Metrics Amount of hardware needed: The type of processor/controller, memory capacity, peripherals, power source etc. should be optimum. Should not be over capacity or under capacity. Optimizing power Dissipation and Consumption: Power dissipation can be reduced by: Clock Rate Reduction : By reducing the CPU clock rate, Voltage Reduction: By using circuits like CMOS , operating on 2.0 V Wait, Stop and Cache Disable instructions: For a continuous running embedded system, using power down mode, when not in use, the overall power consumption can be reduced. Process deadlines : Meeting the deadlines of all processes in the system while keeping the memory, power dissipation, processor clock rate and cost at minimum. Flexibility and Upgrade ability: while keeping the cost minimum, to introduce the advanced product in the market. Reliability : Designing a highly reliable product by appropriate design, testing, validation and thorough verification

Prepared by : Prof. K S Rao

14

Formalization of system Design


Formalization of system design is done using a top-down-approach by abstraction and by * * * * Detailing Requirements and Specifications of hardware & software Defining architectures of Hardware and software Coding and implementation as per architecture Testing, validation and Verification of system.

Since diagrammatic model clears the design concepts better, UML (Universal modeling language) is used.
UML will have User diagrams, object diagrams, Sequence diagrams, State diagrams, class diagrams and activity diagrams. Classes and objects which gives identity, attribute, components and behavior. Inheritance of the classes and objects Interfaces of the objects and their implementation at the objects. Structural description of the design components. Behavioral description in terms of states, state machine and signals Event description.

Prepared by : Prof. K S Rao

15

Classification of Embedded Systems


Small Scale Embedded Systems: Designed with a single 8 or 16 bit micro-controller ; Little Hardware and software complexities ; Single board circuit, generally battery operated. Programming tools: Editor, Assembler, Cross Assembler, IDE (Integrated development Environment) tool. Software has to fit with in the memory available and limit the Power dissipation when system is continuously running. Medium Scale Embedded Systems: Designed with a single or a few 16 or 32 bit micro controllers, DSPs or RISCs. Also, uses readily available single purpose Processors and IPs (Like bus interfacing) Both hardware and software complexities Programming tools: C/C++/visual C++/Java, RTOS, Source code engineering tool, simulator, Debugger, IDE Sophisticated Embedded Systems: Enormous hardware and software complexities Require several IPs / ASIPs, scalable Processors, Configurable Processors, PLAs Processing speed is the constraint. Software functions like encryption, deciphering algorithms, DCT and DCIT algorithms, TCP/IP Protocols, network driver functions are implemented to get additional speed. Development tools: May not be readily available. Some times, a compiler/ retarget able compiler is to be developed.

Prepared by : Prof. K S Rao

16

You might also like