100 million lines of code in your car,
100 million lines of code,
If one of the lines develops a bug…
An article by IEEE indicates that a premium-class automobile “contains close to 100 million lines of software code.” The software executes on 70-100 microprocessor-based electronic control units (ECUs) networked throughout the body of your car. Even low-end cars have 30-50 ECUs embedded in the body, doors, dash, roof, trunk, seats, etc. Software controls just about everything from your brakes to the volume of your radio.
“Automobiles are no longer a battery, a distributor or alternator, and a carburetor; they are hugely modern in their complexity,” says Thomas Little, an electrical engineering professor at Boston University who is developing intelligent transportation systems. “The goals to save energy, reduce [emissions], and improve safety have driven the specialization and adoption of electronics in particular.”
And like its PC counterpart, software in automobiles continues to grow in size and complexity. For example, BMW has announced that its 2009 models will be equipped with BMW Assist system, which can notify emergency personnel not only where an accident occurred, but also the likelihood of passengers being severely injured.
The first production automotive microcomputer ECU was a single-function controller used for electronic spark timing in the 1977 General Motors Oldsmobile Toronado. In 1978, GM introduced the Cadillac Trip Computer, a modified Motorola 6802 microprocessor chip that displayed fuel, trip, and engine information. GM also used the chip to test how well a microprocessor could control critical system functions such as port fuel injection, electronic spark timing, and cruise control.
This story reminds me of an old joke…
If GM had developed technology like Microsoft, we would all be driving cars with the following characteristics:
- For no reason whatsoever, your car would crash twice a day.
- Every time they repainted the lines in the road, you would have to buy a new car.
- Occasionally your car would die on the freeway for no reason. You would have to pull to the side of the road, close all of the windows, shut off the car, restart it, and reopen the windows before you could continue. For some reason you would simply accept this.
- Occasionally, executing a maneuver such as a left turn would cause your car to shut down and refuse to restart, in which case you would have to reinstall the engine.
- Macintosh would make a car that was powered by the sun, was reliable, five times as fast and twice as easy to drive — but would run on only five percent of the roads.
- The oil, water temperature, and alternator warning lights would all be replaced by a single “This Car Has Performed An Illegal Operation” warning light.
- The airbag system would ask “Are you sure?” before deploying.
- Occasionally, for no reason whatsoever, your car would lock you out and refuse to let you in until you simultaneously lifted the door handle, turned the key and grabbed hold of the radio antenna.
- Every time a new car was introduced car buyers would have to learn how to drive all over again because none of the controls would operate in the same manner as the old car.
- You’d have to press the “Start” button to turn the engine off.
Article published on March 9, 2009
If you like this article, please share it: |
March 9th, 2009 at 3:00 pm
I was surprised to learn there was that much code in a car.
Separately, and picking nits, this line really set me off: “If one of the lines develops a bug”
The days of insects and mechanical switches being the problem are far behind us — these days, it should be called a defect and the programmer should take responsibility for it, rather than the “Oh, software has bugs”-attitude that prevails. 🙁
March 10th, 2009 at 1:36 pm
Me also, I was surprised to know this much of code is available in cars.
March 10th, 2009 at 2:29 pm
It amazed me that cars run so well with this much code.
I’ve had a copy of the “if Microsoft built cars” joke for more than a decade now. I still think some of it is reality. For example:
4. I had a car that started to die in a left turn. The engine stayed, but a sensor was replaced.
6. “This Car Has Performed An Illegal Operation” is too long for the dashboard. Most cars use “Check Engine” or an engine shaped icon. I have yet to find where a Dr. Watson log or system dump is stored.
8. My wife was at an exercise class. Another woman there had the same make of car. My wife grabbed her keys (both sets were identical), and inserted the key in the ignition, which was then disabled. The locksmith showed her the key combination to reset the ignition.
9. No, just have different manufacturers. I consistently turn on wipers because the same control turns on lights in the other car.
10. Funny, I used the ignition to turn the car on and off. Same switch does both.
March 11th, 2009 at 2:02 am
The main issue on this subject is that the motors manufactures keep all these codes to themselves. What makes matters worse is that there are different languages within the cars so all makes have to be retro-engineered. The ECU market is the domain of Delphi. Bosch, Valeo, Siemens and others and is very specialised. Specialised garage tools allow the data to be decoded and displayed on computers however with condition based servces around the corner the average vehicle will now service themselves when logged on to the home computer, Fact or fiction ? Actually its happening now – see http://www.airmaxremote.com
March 13th, 2009 at 9:08 pm
[…] 100 Million Lines of Code in Your Car – An article by IEEE indicates that a premium-class automobile “contains close to 100 million lines of software code.” The software executes on 70-100 microprocessor-based electronic control units (ECUs) networked throughout the body of your car. Even low-end cars have 30-50 ECUs embedded in the body, doors, dash, roof, trunk, seats, etc. Software controls just about everything from your brakes to the volume of your radio. […]
March 18th, 2009 at 10:17 am
[…] was reading over on DevTopic today about how 100 Million Lines of Code is pretty common in cars today. We have come a really long way since 1977 when the first micro-chip was introduced […]
April 28th, 2009 at 12:55 pm
What’s worse with 100 million lines of code is that most of these are coded in Assembly language – the syntax closest to what machines could understand and one of the hardest ones to debug.
May 7th, 2009 at 9:43 am
Not quite accurate about the assembly language. Actually most auto-software is actually written in very high level languages like Simulink nowadays, which is then automatically coded into C. There is still some assembly hand written for i/o drivers, etc. (shudders!)
February 7th, 2010 at 5:36 pm
[…] are more than 100,000,000 lines of code running over dozens of processors in a contemporary automobile. That programming controls […]
August 22nd, 2012 at 1:27 pm
This article has been translated with permission into Serbo-Croation language at http://science.webhostinggeeks.com/100-miliona-linija