(Untitled)

Feb 08, 2010 09:27

Discovery News: This Car Runs on Code

An estimate that premium-class automobile's contain close to 100 million lines of software code, running on up to 100 embedded controllers. And they guesstimate that this will grow to 300 million LOC.

This is insane.

Leave a comment

jujulilianan February 8 2010, 09:10:23 UTC
actually, embedded microcontroller code is exactly the sort of code I work on.

though that seems like an awful large amount of code per processor.. I've worked on things that might have 80k lines of actual source code in 20 or so files. and that's including basic graphic interfaces, simple ethernet, and a bunch of other things too... Their order of 10x the code per processor over what I'm used to is probably counting standard included C library code, too.... which is a pretty lame thing to do here, seeing the exact same library code will be included in all the processors...

Anyway - unlike web apps and desktop apps, It mostly works for cars because you modularise functionality into very simple blocks (thats why there's 100 processors! everything does just one thing!) then you module test EVERYTHING to really strict standards (ie, like official authority specified standards, not personal ones) and use use a powerful well characterised language like C that actually just works, rather than implements multi user web functionality for the next version of twitter that's coming some day....
:-)

Reply

domesticmouse February 8 2010, 09:25:38 UTC
I'm guessing you guys aren't doing multi-threaded work in your embedded cpus yet, right?

I remember back in the day when everything was single threaded processes, oh those were the days...

Reply

jujulilianan February 8 2010, 09:55:09 UTC

well... you break a complex embedded app into tasks that cover certain areas (like, you wouldn't have your ethernet code in with graphic LCD and serial port code and GPS module driver code) and then there's a whole pile of methods of task scheduling in embedded C depending on what you need and what you can afford processor-wise (simple co-operative right up to actual pre-emptive with adjustable priorities like uC/os-II) and inter task communication is available, often with semaphores or just global variables.... but nothing quite like windows threads.

You can go crazy with largeish ARM based designs, and run actual linux kernel if you want, and then I guess you could have threads if you wanted?? but that's not for 8 bit systems, which is where most of what I know sits. Those big ARM systems are 32 bit data bus things with many megabytes of RAM.

Reply

domesticmouse February 8 2010, 11:56:39 UTC
Ya making me nostalgic for the days when i hacked on the 6502 =)

Reply

jujulilianan February 8 2010, 13:15:26 UTC
oooh... c64??
:-)

I only ever tried programming in basic on mine.

Reply

domesticmouse February 8 2010, 20:40:17 UTC
Yeah, the good ole c64. Legend of a computer. Tho, according to Wikipedia it actually has a 6510 not a 6502. Heh. It was fun. Especially the whole page flipping to get access to the ram of the machine...

Reply

jujulilianan February 8 2010, 09:56:55 UTC
oh yeah... and I don't really deal with CPU's as such. I write code for microcontrollers. which are chips with a CPU and embedded peripherals.

Reply

domesticmouse February 8 2010, 12:01:07 UTC
What is the difference between a microcontroller and a SoC? Is it just the the microcontroller is designed for dealing with I/O or is there more to it?

Yeah, I'm such a noob these days around the actual silicon. =)

Reply

jujulilianan February 8 2010, 13:33:37 UTC
I don't know much about system on chips... heard the term before, and I get the impression they're like a normal microcontroller but bigger?

Reply

domesticmouse February 8 2010, 20:43:03 UTC
Yeah, i tend to wander across them when I'm looking at embedded linux devices. Typically an arm core, a memory controller, possibly a dma controller, and if it's really flash, a gpu as well. The iPad's A4 is called a SoC for instance. There are a few x86 SoC's getting around as well...

Reply


Leave a comment

Up