Title: Engineering Challenges of Embedded Software
1Engineering Challenges of Embedded Software
- John LinnDirector, Systems and Software
LaboratoryTexas Instruments Inc.
2Texas Instruments (TI) Importance of Embedded
Software
- TI is a major semiconductor manufacturer
- Digital Signal Processing (DSP) integrated
circuits - The analog components that transform real-world
signals to digital - Most of our products are programmable
- Enable products with embedded software
- Programmed by our customers (and us too!)
3Agenda
- Embedded software What is it? What makes it
different? - Computer economics and how financial decisions
affects embedded software engineering - Schedule and the challenges of quick
time-to-market - Discussion and QA
4What is Embedded Software
5What is Embedded Software
Some Characteristics
- Low cost
- Close to the hardware
- Software on a special-purpose processor
- Very high performance
- Low power and power management
- High reliability
- Real-time
- Small footprint
- Software/firmware in ROM/PROM
6Embedded SoftwareMy Definition
- Embedded software is software that is ultimately
bundled with hardware and sold to the end-user as
a complete product - It usually has some (or all) of the
characteristics on the previous slide
7Some Products ContainingEmbedded Software
8Close to the HardwareDigital Still Camera
- Characteristics
- Multiprocessing
- Different ISAs
- ASIC custom processor
- Complex low-level peripherals
- Power management
- Tight memory
9Low-CostMobile Handset
- Characteristics
- Very low cost
- Multiprocessing
- Different ISAs
- Very complex low-level peripherals
- Complex power management
- Tight memory
- Often ASIC custom processor
- Real-time deadlines
- High reliability
10Computer Economics
- The cost of software
- Recurring vs. non-recurring costs
- Software reuse and the value web
11Increasing Cost of Software Development
- Software development costs are going up while
hardware costs are decreasing whats going on?
The CEO
12Memory Prices Drives Software Content
13Memory Prices Drives Software Content
- Our Customers
- I can afford to put 50 Mbytes of memory and 200
Mbytes of ROM in my product. I want to fill it
up with quality software features that sell
14Software Contribution to Product Cost
- Embedded software has become a significant
contributor to product cost - Growth in demand for functionality results in
exponential growth in complexity (lines-of-code)
in products - Increased complexity more than offsets improved
programmer productivity
15Computer EconomicsUnit Cost vs. Production Volume
Production Cost per Unit
Number Units Produced per Model
16Computer EconomicsRecurring and Non-Recurring
Costs
- Non-Recurring Cost Incurred once
- Specification
- Design
- Coding
- Testing
- Integration
- Recurring Cost Incurred for every item produced
- Manufacturing material and labor
- Some types of royalties
- Manufacturing engineering
- Waste, yield, quality defects
- Maintenance, repair
17Computer EconomicsRecurring and Non-Recurring
Costs
- Hardware production is almost exclusively
recurring cost - Software development is almost exclusively
non-recurring cost - This one-time cost must be amortized across all
the products sold - Significant reduces software cost by spreading
over larger number of products
18Computer EconomicsUnit Cost vs. Production Volume
Production Cost per Unit
Number Units Produced per Model
19Computer EconomicsAmortization of Non-Recurring
Software Cost
- F/A-22
- 3M LOC _at_ 3 LOC per day 600M
- 6-7 years
- Amortized cost 4M per production aircraft (1
of recurring cost) - Competitors Now there are none
- If a competitor could cut that cost in half,
would it matter? - Not much -
20Computer EconomicsAmortization of Non-Recurring
Software Cost
- F/A-22
- 3M LOC _at_ 3 LOC per day 600M
- 6-7 years
- Amortized cost 4M per production aircraft (1
of recurring cost) - Competitors Now there are none
- If a competitor could cut that cost in half,
would it matter? - Not much - 2.5 G Cellular Handset
- 2M LOC _at_ 10 LOC per day 120M
- Amortized cost 12 per production phone (25 of
recurring cost) - Competitors Everybody
- If a competitor could cut that cost in half,
would it make a difference? Big cost advantage!
21How Do Our Customers Survive?
22How Do Our Customers Survive?Software Re-Use and
the Software Value-Web
- Value-web of software customers and vendors
- Significant software re-use across multiple
products and customers - Resulting lower amortized cost of software allows
focus on recurring costs - Interaction between software and hardware really
important for cost
23Cost of Embedded Software Key Points
- Learn when you need re-usable software and when
you dont - Look at functionality and recurring/non-recurring
costs as a guide - Learn how to make software re-usable
- Your customers will also be software developers
- Learn how to use re-usable software from other
vendors - You will also be a software customer
24Computer Economics
- Value of software development predictability
25Computer Economics Predictability of Software
Level of Effort
- Observations
- Predictability business success
- This is why CMM places such emphasis on
predictability - Biased estimates (over optimistic, over
pessimistic) make it even worse - Pricing strategies can help avoid the big
time losses, but cant totally compensate
26Computer EconomicsValue of Software LOE
Predictability
- Assumptions
- Head-to-head bidding competition
- Same software productivity and quality at both
companies - Company A costs are 2x less predictable than
company B costs
Adjusting pricing wont make up for lack of
predictability
27Computer EconomicsCosts of Software
Predictability
- Observations
- You cant afford too much loss in efficiency to
achieve predictability - The big argument against heavyweight
methodologies
28Computer EconomicsLevel-Of-Effort Prediction
Models
- You usually need a statistical model to predict
stuff - Its a statistical world - random things happen
- Even if it were deterministic, software
development is too complicated to anticipate in
sufficient detail - You need some factors (parameters) that correlate
to the final level of effort to base your model
on - Software LOE models require
- Fundamental mathematical description of cause and
effect - Input parameters like lines of code, code
complexity, team expertise, etc. - Mid-course correction, if available, during the
project - Calibration
- Improvements over time for better precision
- Human assessment, judgment and adjustment
29Computer EconomicsParametric Models
Model Quality
Parameter Estimation Quality
30Computer EconomicsCOCOMO
- Barry Boehms Constructive Cost Model
- Lines of Code used as a complexity estimate
- Lots and lots of other project and team
parameters - Significant industry calibration
- Big argument over whether LOC is a good metric
- See USC Center for Software Engineering
http//sunset.usc.edu/ - If you want to play with it http//sunset.usc.edu
/research/COCOMOII/
31Computer EconomicsFunction Points
- Allan J. Albrechts Function Point Analysis
- Function point count used as measure of
complexity - Transaction-based approach looking at amount and
complexity of control and data crossing component
boundaries - Replaced LOC with (presumed) more representative
complexity measure, but uses other aspects of
COCOMO for conversion to LOE - See http//www.ifpug.com/fpafund.htm
32Software Cost PredictabilityKey Points
- Development level-of-effort predictability is
critical - You need discipline (methodology)
- You probably need a model to help predict cost
- Learn to use one, but temper it with judgment
- You need to keep metrics to calibrate it
- You can improve predictability with process
- But you cant afford to overdo it
33Computer EconomicsSchedule
- Time is money
- - Ben Franklin
34Time is money, professor proves May 29, 2002
Posted 1230 PM EDT (1630 GMT)
- WARWICK, England (CNN) -- A mathematical formula
calculated by a British university professor has
found that time actually is money. - According to the equation, the average British
minute is worth just over 10 pence (15 cents) to
men and eight pence (12 cents) to women.
The formula is V(W((100-t)/100))/C, where V is
the value of an hour, W is a person's hourly
wage, t is the tax rate and C is the local cost
of living. It shows that there is no such thing
as a free lunch or even a free dinner, while
brushing your teeth for three minutes uses up 30
pence (45 cents) in "lost" time, and washing a
car by hand has a hidden cost of 3 (4.50).
35Schedule Importance of Schedule and
Time-to-Market
- For products with 9-month development-cycles,
time-to-market is everything - Consumer products typically start right after
Christmas and go to production for the next
Christmas season (Aug. or Sept.) - Handsets go to production when service providers
roll out new services - First to volume sales last to remain profitable
- Compressed schedules and co-design are common
- HW/SW simulation development and test
- Spartan test and debug environment and limited
test hardware - Cooperation between HW/SW teams in different
companies/countries - Dynamically changing (read chaotic) requirements
- The development methodology required may be
different than the waterfall model used in
(F/A-22 like) 10-year projects - Time-to-market often trumps efficiency
- Shortened schedules are usually inefficient
36ScheduleHardware/Software Co-Design
- What do you do when the integrated circuit and
all the peripherals are not ready? - What do you do when the other software in the
value web is not yet compete?
37ScheduleHardware/Software Co-Design
- Virtio Software Emulator
- Runs actual TI OMAP1510 Platform targeted
binaries - Includes real-world connections such as serial,
network and video streaming - Provides high level of system visibility by
viewing of system registers and variables inside
peripheral hardware models
- APTIX Hardware Prototyping System
- Verify complex system-on-chip designs
- Proprietary reconfigurable prototyping methodology
38Schedule Software Hardware Co-Design Simulation
/Emulation Headaches
- Speed
- 100x - 10,000x slower than real time
- Fewer, longer tests
- Timing
- Often cannot reproduce accurate timing sequences
- Difficult to find race, deadlock and performance
issues for real time - Accuracy
- Simulation models are software and have bugs, too
- Significant development effort for verification
and diagnostics - Cost
- Up to several millions of dollars for
timing-accurate hardware simulators - Development environment
- Usually very Spartan
- Few tools are ready when you need them and
whats there is buggy - Other parallel software efforts complicate
things, too - Device drivers, OS ports, debug tools, etc.
39ScheduleProduct Testing Headaches
- Software test requirements often not considered
in product design, such as - Rapid software download/install
- Bulk-data transfer
- Reliable communications
- Hardware diagnostics
- Run/reboot buggy software automated and
unattended - Special test framework and harness
- Test automation host
40ScheduleKey Points
- Schedule is as important as cost
- Learn how to trade cost for schedule
- (See re-useable software)
- Short schedules cause development headaches
- Get your development requirements included up
front by the hardware developers - Create a test integration plan that takes
hardware limitations into account - Buy/build enough emulators/simulators/prototypes
to execute your plan - Plan for problems with the hardware and other
vendor software
41Conclusions
- Embedded software is now big, complex business -
extreme discipline and organization is required - Economics determines what is important - products
have different economies and we need our software
engineers to understand and be flexible - Our customers (and we too!) need more emphasis on
software engineering for embedded software - its
where the action is in todays economy -
42What Do You Need to Do as Software Engineers?
- You need to understand the economics (business
case) of the system your software is used in - You need to be organized and use an appropriate
methodology - You need to understand your organizations value
web and how to make software re-usable - You need to know when to re-use and when to
create from scratch - You need to be flexible and agile One
methodology does not fit all situations - You need to be skilled and experienced