Course Perspective #1: Today Mostly About Software � I’m a Computer Science professor, this is a Course perspective and logistics � CS class � Embedded systems introduction � Crosslisted for convenience � Assignments, exams, etc. are primarily about software In contrast 5780 is primarily about HW � devices and how to use them � Chris Myers and I co-designed these two courses to paint a fairly complete picture of embedded system design Course Perspective #2: Holistic Q: Why focus on a holistic view of � embedded software? Can’t just look at an embedded system as a � collection of parts A: You are extremely valuable if you: � Many important issues involve the whole Have a deep understanding of both the HW and � 1. SW sides of embedded system design, and how system they interact � Debugging Can see the big picture about a software design 2. � Security in order to spot potential problems and � Timeliness opportunities � Power and energy use � What does “extremely valuable” mean? Prereqs and Expectations Course Components � Everyone should already: Lecture � � Be able to write and debug C programs � I expect good attendance � Understand basic systems concepts – interrupts, � If attendance is too bad I start giving pop quizzes device interfacing, etc. Labs � � From ECE 5780, CS 3400/4400, CS 5460, … � Embedded programming projects ECE folks need to be willing to learn: � � Bulk of your time will be spent on these � Software engineering material Homework � � System-level software thinking � Pretty minimal – handful of assignments � A bit of programming language and compiler material Exams � CS folks need to be willing to learn: � � 1 midterm, 1 final � Breadboarding � Logic analyzer use � How to read vendor reference manuals Page 1
Textbook Labs Tuesdays, 3:40-5:00 in the ECE Digital Lab � � MEB 2265 � None required! Programming environment is CodeWarrior � IDE which runs on Windows � But please get a good book on C � Free download if you want to run it on your programming machines � Course web page lists one � Programming target is a ColdFire � There are others – can talk to me about this development board from FreeScale A copy of Valvano (textbook for CS/ECE � � Nice 32-bit CPU 5780) would be occasionally useful � You work in groups of two � Best to have one CS person, one ECE person Determines 50% of your course grade � To Do Get on the cs5785 course mailing list � Questions? � See https://sympa.eng.utah.edu/sympa � � One list for all course sections � I’ll assume everyone reads this � Mail to this list goes to all subscribers � To mail just me and the TA use � teach-cs5785@list.eng.utah.edu Look for a number starting with 2* on the � back of your Ucard � If this number isn’t there, you need a new card � The 2* indicates a modern card that contains the RFID chip that will get you into the lab Embedded Systems Definitions of “Embedded System” Account for >99% of new � microprocessors � Consumer electronics A special-purpose computer that interacts with 1. � Vehicle control systems the real world through sensing and/or actuation � Medical equipment A computer that you don’t think of as a 2. � Etc. computer Almost any computer that isn’t a PC 3. … 4. Page 2
More definitions Embedded Characteristics Microprocessor: A regular CPU � Microcontroller: A system on chip that � � Close interaction with the physical world contains extra support for dealing with the � Often must operate in real time real world Constrained resources � � Analog to digital and digital to analog converters � Memory � Pulse width modulation � SRAM, DRAM, flash, EEPROM, … � Networks: serial, I2C, CAN, USB, 802.15.4, etc… � Energy � General-purpose I/O pins � CPU cycles � Lots of interrupt lines � Pins � Low-power sleep modes � Flash memory read / write cycles � Voltage / frequency scaling � What else? � Temperature / vibration resistance � Onboard volatile and nonvolatile RAM � What else? More Characteristics Important Difference Concurrent � � Easy to make concurrency errors Unlike PC software, embedded software is � � Hard to find and fix them developed in the context of a particular piece of hardware Often lack: � � This is good: � Virtual memory � App can be tailored very specifically to � Memory protection platform � Hardware supported user-kernel boundary � In many cases writing portable software is not � Secondary storage a concern � Have to be developed rapidly � This is bad: Cost sensitive � All this tailoring is hard work � � Per-unit cost often dominates overall cost of a product Digital Signal Processing What Do Embedded Systems Do? Idea: � 5 main kinds of functionality: � � Operate on discrete approximations of � Digital signal processing continuous signals � Open loop and closed loop control � Origins in the 1960s and 70s: � Wired and wireless networking � Radar and sonar � User interfacing � Space program � Storage management � Oil exploration Most embedded systems do 1-4 of these � � Medical imaging � Which apply to: Far broader applicability today � � Cell phone? � LinkSys home router? � Cruise control? � Stoplight? Page 3
More DSP Control Idea � � Applications: � Make stuff happen in the world � Telecom: Compression, echo control, wireless � Open loop control � Audio: Music, speech generation and recognition � No feedback � Echo location: Radar, sonar, medical, seismology � E.g. toaster, stoplight � Image processing: Compression, feature recognition, manipulation � Closed loop control � You could take years of courses on DSP � Uses feedback to adjust output � Extremely broad topic � E.g. thermostat, cruise control � Extensive theoretical underpinnings � You could take years of courses on control � See textbook Ch. 15 � But you better enjoy differential equations… � See textbook Ch. 13 Networking User Interfacing Idea � Idea � � Present functionality directly to humans � Processors want to talk to each other Modes: � Differences from PC networking � � Visual – screens � Communication is often local � Tactile – keyboards � E.g. “unlock the driver’s side door” � Aural – sounds, speech recognition � Specialized protocols This aspect of embedded systems shouldn't � Often not TCP/IP � be ignored � Topology may be fixed � Bad interfaces kill people � Often low-bandwidth � E.g. anesthesia, radiation therapy � Faster networks not necessarily better � Wireless increasingly important But we will ignore it anyway � � Packets can have real-time deadlines � Doesn’t really fit in with rest of course See textbook Ch. 14 � � We have a UI course if you’re really interested Storage Embedded System Requirements Idea � � Make today’s huge persistent storage devices Two basic flavors � available to embedded applications � Functional – What the system does � Sometimes embedded storage is special- � We just talked about this purpose � Non-functional (or para-functional) – Important � Car needs to remember if passenger-side airbag properties not directly related to what the system is enabled or disabled does But often, general-purpose storage � management can be embedded � iPods, digicam flash cards, etc. use standard filesystems Page 4
Example Non-Functional Crosscutting Issues Requirements Energy efficiency � Energy-efficient � � Must run for years on a tiny battery (hearing aid, Real-time � pacemaker) Safety critical � Unlimited power (ventilation control) � Upgradeable � Real-time � Cost sensitive � Great harm is done if deadlines are missed (process Highly available or fault-tolerant � � control, avionics, weapons) � Secure Few time constraints (toy) � � These issues cut across system designs � Important (and difficult) to get them right � We’ll be spending a lot of time on these More Crosscutting Issues More Crosscutting Issues � Safety critical Cost sensitivity � � Device is safety critical (nuclear plant) � A few % in extra costs will kill profitability Failure is largely irrelevant (toy, electric toothbrush) � (many products) Cost is largely irrelevant (military applications) � Upgradability � Impossible to update (spacecraft, pacemaker) � Availability / fault-tolerance � Easily updated (firmware in a PC network card) � � Must be operating all the time (pacemaker, spacecraft control) Can shutdown at any time (cell phone) � More Crosscutting Issues Software Architectures Secure What does the “main loop” look like? � � Security breach extremely bad (smart card, � � How is control flow determined? satellite, missile launch control) � What computations can preempt others, and Security irrelevant (many systems) � when? How is data flow determined? � Distributed � � Options: Single-node (many systems) � � Cyclic executive � Fixed topology (car) � Event-driven � Variable topology (sensor network, bluetooth � Threaded network) � Dataflow � Client-server Page 5
Recommend
More recommend