CPU selection in embedded systems
The selection of a CPU in any embedded design has long been considered a “hardware issue”. As it is part of the hardware, this seems logical. However, the implications of the choice on software development are profound. This article puts the case for a stronger influence from software developers in the CPU selection process.
A warning: There is no silver bullet -- no One Solution to this problem. Every embedded system is different, so the selection of a processor (or processors) will vary from one design to another. The best that an article such as this can offer is some guidelines on how to approach the issue.
The end game
Ultimately an embedded device provides a bunch of functionality, which is delivered at a specific speed (performance), while consuming a certain amount of power. Many design decisions are driven by the need to manage the tension between these three parameters: functionality, performance and power. The choice of CPU is a critical factor in this decision-making process.
CPU selection in the past
Some 30+ years ago, embedded systems were just becoming a mainstream type of electronic design. CPU selection was reasonably straightforward. If 8 bits would suffice, the choice was broadly a choice between 8051, Z80 or one of the 6800 family. For 16-bit devices, the big players were 80186 and the 68000 family, which gave an entrée to the 32-bit world via the 68020. As 32-bit devices became more economic and applications needed that kind of power, numerous options arose and many of them have since disappeared. The 68000 family expanded and morphed into ColdFire. PowerPC was a very successful option. Intel never really succeeded with embedded devices, despite offering three separate families at one point (x86, 860 and 960). AMD’s 29K came and went. Even Motorola introduced a new family, the 88K, which was somewhat short lived. Then, quietly, with no particular fanfare, along came ARM heralding the embedded CPU landscape that we see today.
The bigger picture – System-on-Chip and FPGA
Historically, selecting the CPU was a single decision, which could be made in isolation, quite separate from other design considerations. There were exceptions. When it made sense to use a microcontroller, its selection would be influenced by the CPU on which the device is based, but the array of peripherals included on the chip would affect the decision. This is all true today, except that there are two other clear scenarios.
SoC (System-on-Chip) devices are commonly a very effective means to cost-effectively implement a design. Thus devices include one or more CPUs (which may be several different architectures), memory and a wide range of peripheral electronics. Which CPU(s) are used in a given SoC may determine whether it is suitable for a specific application.
If a design utilizes an FPGA, there are two distinct ways that a CPU (or CPUs) may be incorporated. First, there are FPGA devices that incorporate other hardware IP alongside the FPGA fabric; this may include one or more processor cores. Also, a number of CPU architectures have been adapted for implementation as soft cores in the FPGA or, indeed, have been designed from the ground up with this in mind. Notable examples of the latter are Xilinx’s Microblaze and Altera’s Nios.
Hardware based selection
The selection of a CPU has traditionally been the sole province of the hardware designers. Typical selection criteria are:
- How much power does the chip consume? This is difficult, as, with modern devices, the power consumption may vary drastically according to the CPU’s current status and activity.
- How much computing power can the CPU deliver? It is hard to know what the hardware designer can do with this information.
- What facilities does the device include on-chip? Clearly the closer this is to the final design, the less work required to get there.
- What is the device’s price and availability? These are obvious parameters.