Presentation is loading. Please wait.

Presentation is loading. Please wait.

Research Overview John Regehr Fall 2008. Part 1 – Embedded Systems.

Similar presentations


Presentation on theme: "Research Overview John Regehr Fall 2008. Part 1 – Embedded Systems."— Presentation transcript:

1 Research Overview John Regehr Fall 2008

2 Part 1 – Embedded Systems

3 Embedded Systems  Account for >99% of new microprocessors  Consumer electronics  Vehicle control systems  Medical equipment  Etc.

4 Definitions of “Embedded System” 1. A special-purpose computer that interacts with the real world through sensing and/or actuation 2. A computer that you don’t think of as a computer 3. Almost any computer that isn’t a PC 4. …

5 What Do Embedded Systems Do?  Five main categories:  Digital signal processing  Control – open loop or closed loop  Networking – wired or wireless  User interfacing – speech, text, graphics, …  Data storage  Most embedded systems do 1-4 of these  Which apply to:  Cell phone?  LinkSys home router?  Cruise control?  iPod?

6 Fun Microcontroller Example: ChipCon 2430  8051 processor  Old-style 8-bit, originated at Intel  32 MHz, 8 KB RAM, 128 KB Flash  802.15.4 radio on-chip  Short-range, low-power wireless  Zigbee is based on this  Low power: 25 mA for CPU + Zigbee receive  Low cost: <$4 in large quantities  This has potential to be big  Cheaply add wireless connectivity to any device  Examples?

7 Why Are Microcontrollers Cool?  Because they add computation to almost any device  Computation is amazingly useful  They’re cheap  MCU contains almost everything you need  Development tools are free in many cases  The hardware is really good  Often, hardest part of embedded system design is creating good software  This is a serious problem

8 Problem  Significant number of projects fail due to problems creating good embedded software  Fail means…  Project unacceptably delayed  Software has unacceptably low quality  Worst cases  Patients killed  Nuclear plant owned  Spacecraft lost

9 Solutions  Industry needs developers who can  Understand systems from multiple points of view  Debug rapidly  Test aggressively  Think critically  Learn rapidly  Creating really solid software is 5-10 times harder than creating working software

10 Future of Embedded Systems  Future is bright  1.6 B ARM processors sold in 2005  Trends for new systems  Software intensive  Networked  Many new designs will use 32-bit chips  Many new designs will be heterogeneous multiprocessors / networks on chip  CE is a great major  People skilled in software + control, signals, circuits, analog are extremely valuable  CS and EE curricula both miss the boat on this  Lots of jobs for people like you

11 Part 2 – Research Overview

12 My Research 1. Find a problem that embedded system programmers have  Another embarrassment of riches 2. Create a software tool that solves the problem  Solution should involve ideas from compilers and operating systems

13 Example Tool: Saving RAM  Observation 1: RAM is often the most limited resource on a microcontroller  < 1 KB is common on inexpensive chips  Running out of RAM == hosed  Observation 2: Many programs use RAM very poorly  We ran an experiment showing that many programs use only 1 bit out of every allocated byte, on average  Example  int x; where x is a true or false flag

14 How to Save RAM? 1. Identify variables that use RAM poorly, e.g.  Boolean A uses 1 bit  Enumerated type B with 6 variants uses 3 bits  Pointer C that references a buffer of 16 elements uses 4 bits  Integer D with range -10 to 20 uses 5 bits 2. Perform bit-level packing struct { A_compressed : 1; B_compressed : 3: C_compressed : 4; D_compressed : 5; } compressed_variables;  Challenge: Do this all automatically!

15 How to Save RAM Cont’d  How do we automatically find limited- bitwidth variables?  look at the types – WRONG  E.g. bools, enums, etc.  These can lie! – if they do, compressing will break the system  use dataflow analysis – RIGHT  Analysis is conservative – if it says a variable has limited bit-width, it does

16 Dataflow Analysis x = y-7 test x z-flag set? w = 10w = 2*x mem[w] = 7 YES NO Z-flag =  If z=1 then x=[0,0] If z=0 then x=[1,4] x = [0,  ] y = [7,11] w = [0,  ] x = [0,4] y,w remains the same w = [10,10] x = [0,0] x = [1,4] w = [2,8] x = [0,4] w = [2,10]

17 RAM Compression  Difficulties  Dataflow analysis is difficult when there are interrupts, threads, pointers, etc.  This transformation will slow down execution  This transformation will bloat code size  Results  Reduce RAM usage by 22% for a collection of embedded programs

18 We also created tools to:  Avoid the need to declare variables as volatile  Detect potential for stack overflow errrors  Predict worst-case execution time  Prevent ALL pointer and array errors in C code  Do automatic stress testing  Optimize much better than GCC  Compile towards application-specific goals

19 Summary  Embedded systems are fun  Courses to keep in mind  Myers: Embedded Systems  Regehr: Advanced Embedded Systems  Probably should be called “Advanced Embedded Software”  Provancher (ME): Advanced Mechatronics  Research is fun  I’m always looking for smart people to work in my group  But generally people who have taken my advanced embedded systems course


Download ppt "Research Overview John Regehr Fall 2008. Part 1 – Embedded Systems."

Similar presentations


Ads by Google