[From the last episode: we looked at how intellectual propertyThis can have lots of meanings, but, in the computer-chip world, it refers to parts of a chip design that have been built and optimized by one company, which then sells them to other companies that don’t want to design those blocks themselves. They’re not selling actual chips; they’re selling the design of a block that will be used within a chip. helps designers reuse circuits.]
Last week we saw that, instead of creating a new CPUStands for "central processing unit." Basically, it's a microprocessor - the main one in the computer. Things get a bit more complicated because, these days, there may be more than one microprocessor. But you can safely think of all of them together as the CPU., most chipAn electronic device made on a piece of silicon. These days, it could also involve a mechanical chip, but, to the outside world, everything looks electronic. The chip is usually in some kind of package; that package might contain multiple chips. "Integrated circuit," and "IC" mean the same thing, but refer only to electronic chips, not mechanical chips. designers will buy a CPU design – like a blueprint of the CPU – and then use that in a chip that they’re designing. Now you’re going to write softwareIn this context, "software" refers to functions in an IoT device that are implemented by running instructions through some kind of processor. It's distinct from "hardware," where functions are built into a silicon chip or some other component. for the CPU, and you’ll probably do that using a higher-level language – because it’s easier and faster than getting bogged down in low-level details. As we saw before, compilers are really good at taking care of that mind-numbing stuff.
One of the good things about a higher-level language is that, in theory, you should be able to compile it for any CPU. That’s part of the point of using a high-level language – to separate the program from the processor running the program.
Software Adapted to the CPU
But each CPU has quirks – features or characteristics that may make it better for something. Or may just be different, and you want to account for it in the software – especially if you’re trying to get the best performance or lowest powerThe rate of energy consumption. For electricity, it’s measured in watts (W).. So, with programs that run on many of the devices that we use, developers have often polished and optimized that software for a particular CPU, sometimes with select bits of low-level programming that they can’t easily transfer to a different CPU.
Therefore, once you’ve done all the painstaking debug work to get it all working, you don’t want to touch it. Because one of the challenges of writing software is that decisions you make can have side effects, and it can be hard to think of all the side effects. You may tweak something in software that you think will improve one thing – and it may indeed do that, but it may also break something else.
In theory, people writing software are supposed to document their code with lots and lots of comments that explain why they did things a certain way and what specific lines of code are supposed to accomplish. In practice, however, that takes a lot of time, and everyone’s on a deadline, and so pretty much no one likes to touch code that someone else wrote. It’s too easy to break something that was working just fine. There are bugs in programs that you probably use on a daily basis, and no one is fixing those bugs because they’re afraid of opening up the old code and messing things up.
And Now You’re Locked In
So imagine, then, that it’s been a few years since you decided to use MCUs with, say, ARM processorsA computer chip that does computing work for a computer. It may do general work (like in your home computer) or it may do specialized work (like some of the processors in your smartphone).. (This isn’t about ARM, of course; it could apply to any CPU maker. It’s just that ARM is one very successful example.) Over the years, you’ve written lots of software for it, and it’s all humming along nicely. And then someone from a new company comes along with a better CPU (or, at least, so they say). Do you change?
Well, if you have a completely new product line that you need to write completely new code for, perhaps. But usually, new products take lots of code from old products and then add some new software to it. If that old code was written for the old processor, then, if you change processors, you’ll need to change that old software to make it run on the new processor.
In theory, you just recompile the old code for the new CPU, but, in practice, it’s not usually that straightforward. So, out of fear of what might happen, you decide not to use the new CPU because it’s just going to be too much work and risk to change all of the old software that’s running just fine, thank you. It’s better to exhibit brand loyalty.
New Kid on the Block
We call that old, accumulated base of software legacy codeA collection of software that’s been built up over the years. It’s usually been improved an optimized gradually for the processor it's running on, and it works, so developers will be reluctant to make major changes to it.. And ARM, in particular, has benefited from winning lots of designs in, for instance, communications equipment. But, as an example, there’s a new CPU getting lots of attention these days, and it’s called RISC-V (“risk-five”). It’s unusual in that it’s getting traction in ways that other CPUs have had a hard time with. Is that because it’s just so much better?
Well, I’m not going to get into the processor-judging business, but timing is playing a big part in the opportunity for RISC-V. It may not see a lot of success where ARM is well entrenched and has lots of legacy code, but with artificial intelligenceA broad term for technology that acts more human-like than a typical machine, especially when it comes to "thinking." Machine learning is one approach to AI. (AI) and machine learningMachine learning (or ML) is a process by which machines can be trained to perform tasks that required humans before. It's based on analysis of lots of data, and it might affect how some IoT devices work. (ML) in particular, developers are writing lots of brand-new code. This is greenfield stuff: there’s not really much legacy code out there.
Same thing with IoTThe Internet of Things. A broad term covering many different applications where "things" are interconnected through the internet. devices: it’s a new area, and it’s not dominated by legacy code. So this particular timing is good for folks trying to sell or use new CPUs. If there’s a big winner in this new battle, then they may accumulate a big pile of legacy code that will protect them from the next upstart.
The point here is that the choice of CPU is about more than technical bits and bytes. Business decisions – like the existence of legacy code – may be just as important, or even more so. With new areas like ML and the IoT, new processors may get their chance at bat.
Leave a Reply