1 / 47

EMBEDDED SYSTEMS Study material: limayesir.wordpress

EMBEDDED SYSTEMS Study material: limayesir.wordpress.com. Arjun Gour, Dr. S.S. Limaye ETC Department. OBJECTIVE. To give sufficient background for understanding embedded systems design. To give knowledge of RISC processor.

Download Presentation

EMBEDDED SYSTEMS Study material: limayesir.wordpress

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EMBEDDED SYSTEMSStudy material: limayesir.wordpress.com Arjun Gour, Dr. S.S. Limaye ETC Department.

  2. OBJECTIVE • To give sufficient background for understanding embedded systems design. • To give knowledge of RISC processor. • To understand connection of various peripherals with microcontroller based systems. • To study embedded system design aspects. SVPCET

  3. OUTCOME • Students shall be able to design embedded based system. • Students shall be able to design embedded system based on RTOS and communication protocol. SVPCET

  4. SYLLABUS UNIT -1 EMBEDDED SYSTEM INTRODUCTION History, Design Challenges, Optimizing design metrics, Time to Market, NRE And UNIT Cost, Application of embedded systems and recent trends in embedded system. UNIT-2 EMBEEDED SYSTEM ARCHITECTURE Hardware & Software Architecture, Processor Selection, Memory Architecture & IO devices, Interrupt Service Mechanism, Context Switching , Device Drivers. UNIT -3 ARM PROCESSOR ARM architecture & programming, RISC & CISC, ARM Organization, ARM programmer's model, Operating modes, Exception Handling, Nomenclature, Core extensions, Assembly language programming, Introduction to ARM Instruction Set. SVPCET

  5. SYLLABUS UNIT -4 PROTOCOLS Bluetooth, IEEE 802.11 and IEEE 802.16, GPRS, MODBUS CAN, I2C and USB. UNIT-5 REAL TIME OS CONCEPTS Architecture of the kernel, Task scheduler, ISR, Semaphores (Shared data problem), Mailbox, Message queues, Pipes, Events, Timers, Memory Management. UNIT -6 CASE STUDY OF EMBEDDED SYSTEM BASED ON Communication (ROBOTIC OSCHESTRA), Automation (CHOCOLATE VENDING MACHINE, DIGITAL CAMERA), Security (SMART CARD), AUTOMOBILE (ADAPTIVE CRUISE CONTROL). SVPCET

  6. History, Design Challenges, Optimizing design metrics, Time to Market, NRE and UNIT Cost, Application of embedded systems and recent trends in embedded system. Embedded System ? SVPCET

  7. Definition • Embedded system is a system that has embedded software in a computer hardware which makes it a system dedicated for an application or specific part of an application or product or part of a larger system. • Embedded system is hidden. We don’t see it as computer. We only see the larger system. Embedded system may or may not have user interface. SVPCET

  8. Difference between Embedded system & General purpose computing system SVPCET

  9. Embedded System • Based on microcontroller • May or may not contain an operating system • Executing a specific set of applications. • Application is pre-programmed. • Programme development on another computer • General Computing Systems • Based on microprocessor • General purpose operating system is present • Executing variety of applications • Application programmable by user • Programme development on same computer SVPCET

  10. Embedded System • Performance: • Less Power • Less Memory Fast execution • Time requirement: • Highly critical • Built for harsh environment • May or may not have UI • General Computing Systems • Performance: • Faster is better. Don’t bother about memory or power • Time requirement: • Not critical • Built for normal environment • Must have UI

  11. Common characteristicsof embedded systems • Real time and multirate • Reacts to events in deterministic time • Schedules functions in real time • Different operations take place at distinct rates, e.g. audio, video, data, network stream • Complex algorithms • Encryption, MP3 encoding • Complex GUI or other UI • Dedicated functions (Runs same app for life) SVPCET

  12. History of embedded systems • Before birth of computers, machine control was done by mechanical devices. • Even when electronic computer was invented, it was was very expensive. Due to technological advances, the cost came down dramatically. So it became feasible to use it for machine control • Microcontrollers integrate CPU, memory and peripherals. Compact, cheap and reliable. • Today we find computers embedded into many household and industrial products.

  13. First industrial revolution. Computers were not known then. In old days, machine control was done by mechanical means. See how steam flow is directed to left and right side of piston in a steam engine. Steam engine (1765)

  14. 4 stroke petrol engine (1876) Operation V1 V2 Spark Suction off on off Compression off off off Power off off on Exhaust on off off Valves V1 and V2 are operated by CAM. Spark is operated by contact 6o before top dead center.

  15. OLD TV (1927) • Did not have remote control, timer child lock.

  16. First electronic computer ENIAC 1946, Princeton, 18000 Vacuum tubes Started third industrial revolution

  17. Birth of transistor • Shockley, Bardeen, Bratten Bell labs 1947

  18. First embedded system • The first recognizable modern embedded system was Apollo Guidance Computer, developed by Charles Stark Draper at MIT Laboratory Instrumentation, early 1960s. It was installed on  Apollo spacecraft. It had both Command Module (CM) and Lunar Module (LM). Provided onboard computation to support spacecraft guidance, navigation and control. • Autonetics D-17 guidance computer was first mass produced embedded system.

  19. Digital Equipment Corporation • DEC introduces the 12 bit PDP-8 minicomputer, which by 1973 was the best-selling computer in the world. PDP-8s were probably the first computers "embedded" in instrumentation and other sorts of commercial systems due to its low cost (about $18k in 1965 dollars, or $120k today). • Ken Olsen (1977) said • There is no reason anyone would want a computer in their home • Went bankrupt in 1998.

  20. 8051, Father of modern embedded systems • Introduced in 1980 • First mass produced commercially successful product • 4K ROM, 128 B RAM • UART, 2 timers, 4 GPIO • Modern versions • 64K Flash, 2 K RAM • SPI, I2C,ADC

  21. Modern embedded controllers • ATMEGA328P (Arduino uno) • 8 bits, 16 MHz, 2 KB RAM, 2 KB EEPROM 32 KB Flash • AT91SAM3X8E (Arduino due) ARM cortex M3 • 32 bits, 80 MHz, 96 KB RAM, 512 KB Flash • STM32F103C8T6 ARM • 32 bits, 72 MHz, 20 KB RAM, 64 KB Flash • TI SITARA AM574x • 4 cores ARM cortex A15 1.5 GHz, 2 C66 DSP, 2 Cortx M5 • GPU, GB ethernet, CAN, DDR3 RAM IF • Broadcom BCM2837B0, (Raspberry Pi) • 4 ARM 64 bit, Cortex A53, 1.4 GHz, GBE, DDR2, WiFi

  22. Recent trends • Multi core processors (TI Sitara, Broadcomm) • SOC (Wearable devices) • Built in WiFi (NodeMCU) • Open source (Linux, FreeRTOS, Arduino) • Low power • Security (Embedded encryption) • Authentication (Biometric) • Device convergence (Mobile, Wearable) • Internationalization (Multiple language & protocols) • M2M comm (Water filter to service center)

  23. Applications areas • Automotive electronics • Avionics (Aviation) • Railways • Telecommunication • Health sector • Security • Consumer electronics • Fabrication equipment • Smart buildings • Logistics • Robotics • Military applications SVPCET

  24. Examples of applications • Mobile phone • Smart cards (Banking, security) • Avionics (Missile, rockets, aeroplanes) • Automotive (Cruise control, engine control) • Consumer (Set top box, Digital camera) • Computer peripherals (Network card, printer, graphic accelerator)

  25. A longer list of embedded systems Anti-lock brakes Auto-focus cameras Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders Cell phones Cell-phone base stations Cordless phones Cruise control Curbside check-in systems Digital cameras Disk drives Electronic card readers Electronic instruments Electronic toys/games Factory control Fax machines Fingerprint identifiers Home security systems Life-support systems Medical testing systems Modems MPEG decoders Network cards Network switches/routers On-board navigation Pagers Photocopiers Point-of-sale systems Portable video games Printers Satellite phones Scanners Smart ovens dishwashers Speech recognizers Stereo systems Teleconferencing systems Televisions Temperature controllers Theft tracking systems TV set-top boxes VCR’s, DVD players Video game consoles Video phones Washers and dryers And the list goes on and on SVPCET

  26. Design metrics • Power dissipation: Important for battery operated devices – mobile, camera. • Performance: Execution speed. Time elapsed between reception of signal at antenna to voice output on speaker should be less than .1s. Time taken by a Digital camera to capture process and store a 13 MP photo should be less than .5s. • Process deadlines: There are several concurrent processes in an E.S. Mobile- audio processing, video processing, display refreshing, touch screen processing. Each process must finish computation within its deadline.

  27. Design metrics contd. • User interface- GUI (Buttons, sliders, edit boxes) and VUI(Voice commands) • Size- Physical size(limited by end application) Memory size(RAM, flash in GB) No of million gates (ASIC or FPGA) • Engineering cost-One-time (Non recurring) cost of developing, debugging, testing, production jigs. • Manufacturing cost: Depreciation of machinery, PCB component placement, flow solder, harness, assembly, flashing, testing, packing, warranty, consumables and expenses.

  28. Design metrics contd. • Flexibility-Ability to develop different versions of a product and advanced versions in future without incurring significant engineering cost. • Prototype development time (Days or months) – Time required to develop a working prototype and in-house testing for functionality. Includes engineering time (design and simulation), prototype fabrication time and testing. UL approval, CE approval. • Time to market (Days or months) – Time required to put the product in market after successful prototype. Brochures, advertizement, Raw material order, manufacturing jigs, pick and place programming.

  29. Design metrics contd. • Safety. Equipment safety-Accidental fall to ground. Improper handling, over range inputs Theft – phone locking, tracing User safety- Automobile brake, engine, radiation hazards. • Ease of maintenance- Add hardware – Graphics accelerator to PC, memory stick to camera or phone Update hardware- Change 16 GB stick with 32 GB. Update software- Change OS, new version app Update data- new ring tone, wall paper, extend expiry date of smart card.

  30. Design challenges • Amount and type of hardware needed • Minimize requirement of microprocessors, ASIPs, single purpose processors to achieve desired performance on design metrics: Power, cost (development and manufacturing) size etc. • Choose appropriate memory(SRAM, DRAM, internal and external Flash) peripheral devices (GPIO, timer, UART, SPI, LCD, LAN) • Minimizing power consumption • Reduce clock rate for non critical tasks or idle state • Disable cache for noncritical tasks or idle state • Reduce voltage for non critical tasks or idle state • Introduce Wait (power down) mode and wakeup mechanism. e.g. mobile phone.

  31. Design challenges contd. • Meeting process deadlines Must execute all tasks before their dead line considering memory, power, clock rate, cost. E.g. displaying a streaming video- must meet deadlines for MP3 decoding. • Flexibility and upgradability Product must be flexible to allow different optional features. E.g. a digital camera basic model offers USB interface. Advanced models will offer WiFi and Blue tooth. It should be possible to upgrade, i.e. introduce more advanced features in future. e.g. multi touch screen, voice commands, remote control

  32. Design challenges contd. • Reliability Embedded systems are often used in critical applications like automotive, life support, industrial control. Reliability is important. Ensure reliability by proper design, Testing- Find and remove errors in software Verification- Ensure specific functions are correctly implemented Validation- System behaves as per the specifications Reliable hardware – Industrial grade components, burning in, IP65 enclosure, EMI EMC, conformal coating, surge protection. Self test, watchdog timer

  33. Optimizing design metrics • Cost of processor v/s process deadlines • Low cost processor has low clock rate and less word size. Requires more time to do same thing than expensive processor. Affects latency i.e. response time to events and ability to meet deadlines. • NRE cost v/s unit cost • SOC has very high NRE cost but low unit cost. • Size v/s NRE cost, performance, power • Reducing size requires VLSI in finer device geometry (e.g. 15 nM instead of 22 nM). NRE cost is high. Increasing size by parallel processing increases performance and reduces power. • Time to market v/s NRE cost • Using in house IDE tools and IP will reduce NRE cost but increase time to market. Using ready IP, it can be reduced.

  34. Classification of embedded systems • Based on size • Small • Single 8/16 bit controller. Hardware and software complexity is less. No OS (Bare metal). IDE (Editor, assembeler/Compiler is used. Programming in C or assembly. Whole program fits in memory. • Medium • 16/32 bit controller, DSP, RISC. Use single purpose processors and IP (e.g. bus interfacing). Programming in C++/Java. RTOS used for multi threading. IDE contains source code control, simulator, debugger, JTAG emulator.

  35. Classification of embedded systems contd • Based on size contd • Large (Sophisticated) • Enormous hardware and soft complexity • Use several IP, ASIP, FPGA, scalable processors • Constrained by processing speed • HW/SW codesign needed. E.g. encryption, DCT, TCPIP stack may be done by hardware.

  36. Based on timing constraints Hard real time system Hard real time is a system that must perform tasks with the right deadlines. An example of a realtime hard drive system is a system that must open the valve within 30 milliseconds when the humidity of the air crosses a certain threshold. If the valve is not opened within 30 milliseconds it will cause havoc. The real-time hard system is often used as a controller for dedicated applications, having fixed fixed time limits. Processing must be completed within defined constraints, or the system will fail.

  37. Based on timing constraints contd Soft real time system Soft real time is a system that does not require deadlines. Example of soft realtime like DVD player, if given a command from the remote control it will experience delay for several milliseconds to run the command. This delay will not result in anything serious. Real-time soft systems have fewer hard time constraints, and do not support deadlines by using the deadline.

  38. Revenues ($) Time (months) Time-to-market: a demanding design metric • Time required to develop a product to the point it can be sold to customers • Market window • Period during which the product would have highest sales • Average time-to-market constraint is about 8 months • Missing the window (start with a delay) will result in loss of revenue. • Need to balance time to market with NRE cost.

  39. Peak revenue Peak revenue from delayed entry Revenues ($) On-time Market fall Market rise Delayed D W 2W On-time Delayed entry entry Time Losses due to delayed market entry • Simplified revenue model • Product life = 2W, peak at W • Time of market entry defines a triangle, representing market penetration • Triangle area equals revenue • Loss : • The difference between the on-time and delayed triangle areas

  40. Peak revenue Peak revenue from delayed entry Revenues ($) On-time Market fall Market rise Delayed D W 2W On-time Delayed entry entry Time Area = 1/2 * base * height For simplicity let H = W On-time RN = ½ * 2W * H = W2 Delayed RD = ½ * (2W – D) * (W-D) = ½ (2W2 -3WD + D2) Percentage revenue loss = ((On-time-Delayed)/On-time)*100 = (W2 - W2 + 3/2 WD – ½ D2)/W2 * 100 = D(3W-D)/(2W2) *100 Ex. 2W = 52 weeks, D = 4 weeks % loss = 4(3*26 -4) /(2 * 262) * 100 = 22% If D = 4 weeks, loss = 50% 2

  41. Optimizing NRE and unit cost metrics • Costs: • Unit cost: the monetary cost of manufacturing each copy of the system, excluding NRE cost • NRE cost (Non-Recurring Engineering cost): The one-time monetary cost of designing the system • total cost = NRE cost + unit cost * # of units • per-unit total cost= total cost / # of units • = (NRE cost / # of units) + unit cost

  42. Example • Consider NRE cost = $2000, unit cost = $100 • If we make 10 units, • total cost = $2000 + 10*$100 = $3000 • per-product cost = $2000/10 + $100 = $300 • If we make 100 units, • Total cost = $2000 + 100 * $100 = $12000 • Per-product cost = $2000/100 + $ 100 = $120

  43. Compare technologies by costs • -- best depends on quantity • Suppose we have 3 technologies to choose from • Technology A: NRE=$2,000, unit=$100 • Technology B: NRE=$30,000, unit=$30 • Technology C: NRE=$100,000, unit=$2

  44. A: TC = 2000 + 100Q UC = 2000/Q + 100 B: TC = 30000 + 30Q UC = 30000/Q + 30 C: TC = 2000 + 100Q UC = 100000/Q + 2 Tech. A is best for volumes up to 600. Tech. B is best for volumes from 600 to 2600 Tech. C is best for volumes beyond 2600

  45. The performance design metric • Clock frequency and bus width • MIPS- Mega Instructions per second • Instr. cycle time is variable for CISC. Take weighted avg. • RISC takes one instruction in every clock cycle but sometimes the pipeline stalls, so effectively about 1.5 cycles. • MIPS = Clock frequency / No. of clocks per instr. • MFLOPS- Mega floating ops per second • Important for number crunching applications (DSP, DIP) • Dhrystones (per second) • Benchmark program (Integer and string ops) • EEMBC (EDN Embedded Benchmark Consortium) • Set of benchmarks for various embedded application areas.

  46. Measure of performance for camera • Consumer electronics • Latency(response time) • Time between task start and end e.g., Camera’s A and B process images in 0.25 seconds • Throughput • Tasks per second, e.g. Camera A processes 4 images per second • Throughput can be more than latency seems to imply due to concurrency, e.g. Camera B may process 8 images per second ) • (by capturing a new image while previous image is being stored). • This is possible with pipelining

  47. Speedup is a common method of comparing the performance of two systems. Speedup of A over B = A’s performance / B’s performance

More Related