A brief summary of embedded system

Status
Not open for further replies.
Joined
Aug 5, 2002
Messages
24,537
Location
Silicon Valley
Got this kind of question too much, so I'll just go ahead and put it out here.




What is an embedded system?

Basically anything that is a computer running a system that performs a pre-determined function. Cell phone, printer, your car, your bank's ATM machine, your TV, DVD player, etc. Chances are, you have used one within the last 45 seconds (quote ARM)




How does an embedded system looks like?

It could look anything physically, but usually in terms of computer architecture it has a processor, RAM, ROM, and some I/O that it input from and output to. Once powered up, it receives "command" or inputs and process it for an output. Mostly likely, it is at least 1 chip running on an embedded CPU with integrated (internal) RAM, ROM, some custom logics, and IO to other chips.

In the software perspective, it usually runs a small program waiting for stuff to do, and sleep till the command/signal comes, then wake up, do the job, and goes back to sleep.

Think of running your car's engine control on a 12 year old computer on DOS, that's how embedded system looks like if it is not embedded. It wasn't that far fetch, your ECU most likely runs the motorolla 68k architecture that was once the brain of Macintosh.




How is embedded system different than your PC at home?

It is usually smaller (one chip or a few chips), less powerful (unless a high powered DSP unit for high performance application), cheaper, use less power, and are hidden from the user. It's usually design to do one task (or a few simple tasks) and do it just good enough. PC is usually overpowered because it can't anticipate what user will use it for. It is common to see 25Mhz CPU with 30KB RAM running simple task (flash memory card controller). Many system are also REAL TIME, meaning that it is guaranteed to respond to external command/signal within a deadline. PC usually will be ok if the program runs 1S or so, embedded system in many case are considered failure if it is late to finish its task (choppy video, mp3, etc).



What is ASIC?

It is the chip that contains everything needed to drive the system. Frequently it contains a CPU, RAM, ROM, some custom logic that perform tasks too slow for software, and the "secret sauce" that makes it expensive (i.e. decode cell phone signals or cancel the noises). The "chips" on your hard drive is one good example, it is custom build to handle everything in one unit, except the external RAM and NAND because it is cheaper to buy than to integrate those.




What is firmware?

The code that the ASIC runs, predetermined to do the task you need with the ASIC. Some are upgradable (flash memory based), some are not (ROM based). Usually come with the system that you buy and cannot be run else where (exception applied like the Linksys Routers that can run external firmware).




Why don't we just use a predefined hard circuits to perform the task, but instead have to put it on a processor with software/firmware? It seems too complicated.

True, but chips are now cheap and it is easy to make mistakes on complex logic. It is far more flexible to have an upgradable firmware that you can fix problem down the line. Imagine if you are 6 months behind the competitor, how much money you save on a 25-50 cents part if you are 6 months ahead and can sell $10 more for 20 million units? Also, chips need to sell in million units per month to reach economic of scale. Building a custom chip that you only need 20k unit per month is always more expensive than buying a programmable off the shelf chip that has a volume of 20 million a months.




Are there other ways to do embedded system other than ASIC with firmware?

FPGA is very powerful but way more expensive, usually reserved for high performance low volume units (like the high end CISCO routers that are sold for up to 1 million each, or some high end stereo systems that cost 3000 each). It would be suicidal to put a $30 chip on a $60 hard drive, you need to put something less than $4 on it.

Having a host computer running it will be even more flexible but bulky, and high power consumption. Many industrial systems like logic analyzer or medical instruments are run on PC with Windows XP (don't laugh). They are much easier to develop since you can just buy an off the shelf system instead of develop the hardware.
 
Last edited:
Do companies always build their own ASIC or buy them, are there standards that everyone follows?

It depends. Many companies buy ASIC when the volume is low and the ASIC vendors has a competitive advantage. Marvell, Broadcom, Atheros, Agere, LSI, PMC Sierra, etc are all companies that have technologies that make them competitive, or patents that you cannot get around by building your own chips. Sometimes what you want is also what your competitor wants, so why bother developing your own when someone already paid for the R&D that you merely need to pay 25c for? Sometimes the solution needs to pass qualification, and your vendor already has something qualified.

This can also be a problem if you have trade secrets that you don't want your competitors to know or you want to charge for. You can either license it to an ASIC vendor, and have them custom build it for you and your competitor (in exchange for money or other goodies like discounts), or you hire a team of engineers and build your own ASIC/firmware and never sell to others.

Most designs choose a CPU architecture from ARM/ARC/MIPS/68K/TMS/etc for its power and performance need, then develop the system around it. Since FABs (chip plants) are so expensive, the smaller vendors (outside some Japanese/Korean/Intel/AMD/etc) usually send the design to a foundry to build it for them, much like you hire a shop to rebuild according to your engine's blue print and assembly instruction. Foundries run their capacity to 70-90% utilization, so there is lower waste (thus cheaper) compare to in house FAB.




Now that we know many different embedded systems are actually the same internally (either due to using the same ASIC or similar ASIC architecture) what fun things can we do to them?

Some you cannot do anything, some you can hack, and some you can replace with another firmware. Those with ROM based everything cannot do anything for you, just use it. You can swap firmware between low end and high end models . Many times it is too expensive to build 2 models, one for low end and one for high end, so it is crippled in firmware. If you unlock it, you can get the high end for free. (i.e. many routers can be flashed with firmware that has high end features like adapter mode, Some flash memory cards are crippled to a lower speed than labeled)




How is developing firmware or ASIC for embedded system different from, say, Windows programming?

Harder, you need to beware of low performance, short of memory, unable to see what is going on inside the system without disturbing it (there is no monitor like PC does).
 
Originally Posted By: ToyotaNSaturn
Good info, thanks for posting this!

My cousin writes software for embedded systems. His paychecks are amazing.


It is a tough job, and really separate the great engineers from the good/ok ones. Imagine doing an engine rebuild blind folded with only hand tools, vs. in a machine shop with all the custom tools you can use and desire.
 
Status
Not open for further replies.
Back
Top Bottom