Download presentation
Presentation is loading. Please wait.
Published byTabitha Nichols Modified over 9 years ago
1
CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department University of Southern California gaurav@usc.edu http://robotics.usc.edu/~gaurav/CS546
2
Today we will.. Assign homework #1 –Karthik will give a brief explanation –Homework is online on the class website Form teams for homeworks –only for homeworks (not project) –2 students in each team –your homework team is fixed for all four homeworks Sort out further registration woes Cover a quick history of embedded systems Give a broad overview of embedded systems
3
Homework #1 Karthik just gave you details Due a week from today – no extensions Teams of two for each homework – same team members for each homework Lab keys are available with Julieta in SAL 302 starting Thursday morning at 10 am (don’t ask before that – she is short of keys right now)
4
Of Registration and Rooms.. The CS dept is working on a bigger room for the class The class is currently officially capped to 40 so the University does not allow more people to sign up Can’t increase the cap until a bigger room is found I am assured that a new room will be found soon and all those who I have cleared to register will be allowed to register (how many ?)
5
Is there anyone here who has not yet filled the questionnaire ? who has filled the questionnaire and not got a response from me ? who wants to be in the class, and is not on the class mailing list ?
6
So what is this class about ? How to design scalable, distributed, application-level software for embedded systems which have constraints on processing, power, communication In particular our interest is in systems that interact with the physical world through sensors and (to a lesser extent) actuators Combine a set of readings about state of the art research with learning by doing
7
Course Outline 1.Introduction 2.Background and building blocks 3.Principles of sensing and actuation 4.Networking overview 5.Time synchronization 6.Localization 7.Energy management 8.Adaptive sampling and data management 9.Project presentations 10.Spring break 11.Environmental monitoring 12.NAMOS 13.Project presentations 14.NIMS 15.Guest lecture: Cyclops 16.Final project presentations
8
What is an Embedded System ? A special-purpose computer system completely enclosed or encapsulated within a physical device Usually the embedded system ‘controls’ the physical device Embedded systems provide a function(s) that is not itself a computer
9
Examples are everywhere Consumer electronics Toys Home appliances Factory automation Space and warfare Transportation Construction Medicine Communication Entertainment Sports …
10
Historical Notes First modern embedded system – Apollo Guidance Computer –inertial guidance system for the moon missions –used ICs – novel and risky at the time Early missiles had mass produced embedded systems – reprogrammable logic + hard disk
11
Embedded System Characteristics Generally designed to perform specific functions at low cost Often have a real-time constraint (more on this in the next slide)
12
Real Time Constraints Real time does not imply fast Real time can affect the system architecture – e.g. caching is usually a no-no in a strict real time system Generally meet the real time constraint with custom hw and some high performance sw, e.g. digital satellite TV box –Processes 10s MB continuous data per second –Custom hw takes care of parsing and decoding the multi-channel digital stream into a single video output –Embedded CPU handles interrupts at frame boundaries, generates and displays graphics etc.
13
Cost and Design Often separate out the low performance part of the overall functionality and simplify this piece – i.e. a CPU that’s ‘good enough’ Lower cost compared to a ‘general-purpose’ system accomplishing the same task High volume embedded systems need major cost reductions –Few chips, highly integrated CPU, single memory chip –Custom chip to control other functions What about embedded systems that are not high volume ? Convert a PC class machine into an ‘embedded system’ –Limit sw options/install a RTOS –Replace special purpose hw with high performance CPU
14
Common Hardware Limitations No disk drive No OS No file system –May have one but it sits on a flash drive (essentially EEPROM) No peripherals (keyboard/screen) –May have a touchpad or a small LCD Some hw limitations are from reliability considerations (e.g. avoiding moving parts like disk drives)
15
Software for Embedded Systems Often exists as firmware – software embedded in a hardware device – usually sits in a ROM or an EPROM chip (typical example is the x86 BIOS) Hardware and access limitations means the sw has to be very reliable
16
Reliability Key ability is to function uninterrupted over long periods of time Automatic restart even if a catastrophic data corruption occurs –Watchdog timer: hw reset unless the onboard sw resets the timer Built-in Self-test –CPU, Memory (usually at power on) –Power levels, communications tests, operations, safety etc.
17
Building Blocks Memory Processor InterfaceSensor and actuator suite Energy supply External communication Platform OS and SW architecture Tools User interface Application Figure adapted from [Pottie and Kaiser 2005]
18
Building Blocks Memory Processor InterfaceSensor and actuator suite Energy supply External communication Platform OS and SW architecture Tools User interface Application Figure adapted from [Pottie and Kaiser 2005] 1/24, 4/18: Cyclops 1/31: Networking 2/21: Energy management 4/18: Cyclops 2/7,14 and 28: Time synch, localization and data management 3/21,28 and 4/11: Environmental monitoring
19
Constituents Platform OS and SW architecture Tools User interface Application (often folded into SW arch)
20
Platform CPU architectures: ARM, MIPS, X86, Atmel AVR, PIC, etc. –there are many more than general purpose machines –almost all are RISC –emphasis is on minimizing interrupt latency rather instruction throughput The PC/104 is a popular standard (processor and bus) – runs DOS, Linux, QNX etc. System on a chip: Application specific IC (ASIC) or a Field-programmable gate array (FPGA)
21
OS Often none When it exists designed to be compact and efficient, often real time Examples: eCos, NetBSD, QNX, VxWorks, etc.
22
Software Architecture Control loop Non-preemptive multitasking Preemptive timers Preemptive tasks
23
Control Loop Basic loop which calls subroutines Interrupts set flags (or counter values) which are read globally A subroutine manages a list of sw timers using a periodic real time interrupt – when timer expires the associated subroutine is run
24
Control Loop Complex calculations are replaced by table lookup Difficult to modify There is (generally) no OS in this paradigm – understanding the system is easy
25
Nonpreemptive Multitasking Similar to control loop except loop is hidden in an API Define a series of tasks, each with its own subroutine stack When task is idle it calls the ‘idle’ routine (pause or wait) Can also do this using an event queue Pretty much like the control loop but easy to add new sw – write a new task
26
Preemptive Timers Like before but add a timer that runs subroutines from a timer interrupt –Timer routines can occur at guaranteed times –Code can step on own data structures
27
Preemptive Tasks Take the nonpreemptive task system and run it from a preemptive timer (or interrupts) Now need some serious data synchronization (e.g. semaphores)
28
Tools Compilers –Specialized compliers –Cross-compilers (often from GNU) Utilities to add a checksum to a program – check program data before execution Synchronous programming languages: (e.g. Aeverest) tooks to specify and implement reactive programs (special compiler, model checker, hw/sw synthesis tools) Assemblers and Debuggers
29
Debuggers and Debugging In-circuit emulator CPU-based debugger High-level debugger (break points, single stepping) Often code is developed and debugged on a general purpose machine, then ported to an embedded system
30
Start-up and Troubleshooting Start-up code disables interrupts, sets up electronics, runs the built-in self- tests, starts the application LEDs are useful troubleshooting aids – on extreme embedded systems they may also be the only debugging aid
31
Our Emphasis Assignments focused on three platforms –Mote (small processor, exotic OS) –iPaq (reasonable processor, desktop OS) –ENS box (dual processor, dual network, energy management, desktop OS) Projects focused on ENS box for the most part Papers and assigned reading on the bigger end, but some papers for smaller devices
32
Next time ENSbox HW architecture (guest lecture by Jeff Tseng) Principles of sensing and actuation
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.