Central processing units (CPUs) for mobile and embedded devices (e.g., Internet of Things devices) are the tiny, high-powered electronic circuit boards that make what we do on mobile phones possible—quickly, and without draining a device’s battery in the blink of an eye.
In this article, we’ll look at two top architectures for programming CPUs: ARM (Advanced RISK Machines) and Intel’s x86, both known for their excellent speed and processing power. Here’s a look at how they stack up and what makes them different, in terms a non-engineer can understand.
What is a CPU?
A CPU is like the translator between the software and the hardware of a device. It’s able to take high-level instructions from the software and translate them into native machine language that a computer can understand and carry out in tasks. What you ideally want is a CPU that’s a mix of efficiency and power, without requiring too many resources—something that will be determined by its architecture. A well-architected CPU gives mobile users a smooth user experience without draining battery resources.
CPUs process commands in the form of instruction sets, which are translated by the CPU’s microcode—it’s own internal set of instructions modeled on instruction set architectures (ISAs). There are various types of ISAs that distinguish one type of CPU from another, with different attributes—two of which we’ll discuss next.
RISC vs. CISC
How are instruction set architectures different and how do they affect the final CPU product they’re used to build?
Before we dive into that, it’s important to note that comparing two ISAs won’t necessarily leave you with one choice that’s better than the other. How these ISAs are implemented into the CPU architecture will determine any gaps in performance, power usage, memory usage, etc. Simply choosing one ISA over the other won’t result in a superior CPU—how the CPU is built, however, will.
RISC (Reduced Instruction Set Computing) uses more compartmentalized instruction sets. Basically, we’re talking performance here. It’s one in, one out—one instruction will perform one operation, in one clock cycle. Simple instruction sets mean fewer transistors on the circuit board, so the chips can be smaller, more cost-effective, theoretically use less power, and put off less heat. However, simpler instruction sets can often mean more tasks need to be carried out, translating to more memory consumption and longer execution times. If that seems counterintuitive, think of it as a give and take: one part of the CPU is going to end up having to carry the load, and in this instance it typically ends up being the software, not the hardware.
Compared with CISC (Complex Instruction Set Computing), its predecessor, RISC uses a more simple, minimalist instruction set that can be completed in one clock cycle. CISC, on the other hand, can add a few more steps to arrive at the same idea—requiring more clock cycles to arrive at the same conclusion. Compared with RISC processors, CISC-based processors require more from the hardware, but less from the compiler. That means they’ll need more logic built in to execute instructions, but will end up putting less stress on the compiler.
Now let’s look at two processors that utilize these two different types of architectures.
A Quick Look at X86: The Powerhouse
The x86 chip from Intel uses an architecture that echoes that of processors originally used in desktop and server CPUs. There’s a key difference here: those machines are typically able to be constantly connected to an external power source, unlike mobile and embedded devices, which are intended to be just that—mobile. This immediately means it had a bit more ground to cover to be as effective for mobile use, but it stacks up right next to competitors.
It uses 64-bit computing and supports both mobile and desktop operating systems like Linux and Windows. X86’s instruction sets are designed for more complex tasks. Because of this complexity, they might require more power consumption—anywhere from 6 to 30W vs. the >5W of an ARM processor, but that largely depends on the architecture of the CPU, not the ISA itself. They can also use less RAM because the complexity is built into the CPU’s processor, leaning more on the hardware than the compiler for translation.
- More complex ISA
- Uses less RAM
- Compiler has to do less to translate high-level code
- Uses more power
- Requires more from the hardware, but less from the software
- Requires more transistors (more hardware space)
Summary: X86 is going to echo Intel’s desktop predecessors, focusing on super high performance.
A Quick Look at ARM: The Efficiency Expert
ARM (Advanced RISC Machines) is a modern microprocessor architecture that can be licensed and used to build CPU cores, used by companies like Apple, Samsung, and Qualcomm. It’s one of the most popular CPUs for mobile and embedded design in IoT devices, due to its focus on low power consumption (for longer battery life).
It uses both 32-bit and 64/32-bit computing architectures, depending on the model. ARM CPUs support the iOS and Android mobile operating systems, Windows, and some Linux distributions like Raspberry Pi and the Windows 10 IoT Core version, designed specifically for embedded systems.
- Simple ISA
- Uses more RAM
- Compiler has to do more work to translate high-level code into machine code
- Require less power
- Simple instruction sets require fewer transistors (less hardware space)
- Require less from the hardware, but more from the software
Summary: ARM is going to be more of an embodiment of the mobile-first mentality, with simple instruction sets, efficiency, and low power usage as its priorities. The fact that it requires fewer transistors and frees up that hardware space more than makes up for the use or RAM in a mobile scenario.
Developing an IoT Device or Software?
If you’re developing embedded software or an embedded device, the CPU is going to come into consideration. For software, depending on what hardware you’re developing for, you’ll want to account for compatibility. If you’re developing a networked device with embedded software, you’re going to want to weigh the importance of these criteria we covered above:
- Performance/processing power
- Battery life/power consumption
- Hardware constraints
- Software compatibility
- Programming difficulty (ARM has a much simpler instruction set, so is more accessible to those with basic hardware development skills)
- Are you focused on iOS or Android? Windows? Know what platform you’re targeting