MIPS Strikes Back: 64-bit Warrior I6400 Arrives
by Stephen Barrett on September 2, 2014 10:00 AM ESTMIPS Instruction Set: 64-bit Release 6
Computer processors accomplish tasks by following instructions. The processor, however, only understands instructions in a specific "language". The language of a processor is called its Instruction Set Architecture (ISA). The code sent to a processor must be in that ISA to be understood. It's similar to what would happen if someone proceeded to give me instructions in Portuguese: I unfortunately would have no idea how to execute them. When a program or operating system is authored and compiled, the compiler is parameterized to generate the 1s and 0s of binary code using a specific ISA.
In general, there are two types of ISAs. Complex Instruction Set Computing (CISC) and Reduced Instruction Set Computing (RISC). The difference between them being of course their relative complexity. In general, a RISC ISA contains significantly fewer instructions that are far simpler than a CISC ISA.
Despite its increased complexity, CISC actually predates RISC and was only named retroactively. CISC ISAs were a necessity when low level code (assembly) was often authored by hand, and compilation was crippled by dramatically less powerful compilers than those available today. Having higher level instructions in the ISA, such as looping, allowed simple compilers to extract sufficient performance and human assembly authors to write programs. The most popular CISC ISA ever written is the x86 ISA used in Intel, AMD, and VIA processors. Interestingly, these processors now use dedicated decoding hardware to actually translate CISC instructions into RISC instructions that are executed internally.
RISC ISAs push much of the instruction complexity into the code compiler. Instead of using instruction decode circuits inside the CPU core to translate complex instructions into simple ones, RISC processors operate directly on the simple instructions provided by the compiler. This benefit is somewhat offset as often code compiled for RISC ISAs is larger; it may take multiple RISC instructions for the equivalent CISC instruction. This holds true in computer science theory, as one of the first things taught is there is often a tradeoff between storage and efficiency. If there is a desire for increased efficiency, precompute items ahead of time and then store them. If you need to save storage (or reduce the memory footprint), compute items on-the-fly.
The most popular RISC ISA ever written is the ARM ISA. The MIPS ISA, like ARM, is RISC. It has been revised several times since its inception in 1985. The first five releases are named according to roman numerals I through V, and each was a super set of the last. In 1999, MIPS announced a large revision of the ISA which deprecated the old hierarchical I through V scheme and instead focused on two ISAs: MIPS32 and MIPS64.
Release 6 occurred in 2014 and the I6400 is the first CPU utilizing the new ISA. I won’t go through all the changes in the ISA, but the most significant is a culling of the instructions. Significant work was done to simplify the ISA by removing infrequently used instructions, in particular those that overlapped with Imagination’s PowerVR GPUs. Additional instructions were also added specifically targeting today’s applications like web browsers. The fruit of these instructions has recently been seen as Google Chrome’s V8 rendering engine added experimental support for MIPS64 release 6 in July.
In the MIPS programmer’s guide the release 6 ISA is actually referred to as MIPS3264 release 6. This naming is not by accident, as MIPS64 ISA is actually a direct superset of the MIPS32 ISA. In contrast to AMD64 (x86-64), there are no "operating modes" that dictate the bitness of instructions executed on the CPU but rather an entirely new set of instructions specifically for 64-bit. Registers inside the CPU are all 64bit, and when a 32-bit instruction executes, results saved in registers are sign-extended to the entire 64-bits of space. This means there is no mode switching, and 32-bit and 64-bit applications can coexist and even be executed using the same hardware resources like registers (more on this later).
The MIPS ISA contains several optional instructions called Application Specific Extensions. These rely on optional portions of the CPU core that a licensee may or may not implement. Additionally, a MIPS CPU has optional modules that can enhance performance when paired with certain instructions.
Release 6 drops the legacy MIPS16e ASE as well as the redundant 3D ASE now that Imagination offers GPUs alongside MIPS CPUs.
MIPS CPUs in Mobile Devices
While MIPS CPUs are quite popular in networking equipment and many other embedded industries, consumers will likely only experience one firsthand when it's integrated into an Android handset. Since Android 4.0, Google has supported three ISAs: x86, ARM, and MIPS. Several devices have shipped running MIPS processors, most notably the low-cost Novo 7 tablet. MIPS devices will continue to be low cost alternative devices for now, but low cost devices have the largest volume. The volume should eventually help MIPS push app developers to address their #1 problem: compatibility.
Android applications are either written in Java, then compiled on the device to the specific required ISA before running (a processes called JIT compilation), or written in the Android Native Development Kit (NDK) to target a specific ISA. Apps written in Java can therefore run on any ISA that Android itself supports, including MIPS. Apps written with the NDK (many of which exist, especially games) cannot run on anything but the specific ISA they were written for. The Android NDK does allows packaging multiple ISA specific binaries into a single app, but with the vast majority of Android devices using ARM processors and therefore the ARM ISA, a multiple NDK Android app is simply uncommon.
What does this mean for an end user? There are many Android apps that simply won’t run if you have a MIPS processor in your device. Intel has the same NDK compatibility problem, but with their considerably larger engineering resources, Intel implemented a layer that translates ARM ISA applications to the Intel x86 ISA (albeit at a performance penalty). Until MIPS implements the same or ships enough volume to convince Android app developers to put in some extra work, a MIPS Android device will unfortunately be a second class experience.
Despite some existing Android app compatibility woes, the MIPS I6400 CPU contains some interesting technology designed to address many more markets than handsets. In fact, Android usage of MIPS processors is really a minor part of the MIPS business. A few slides from the MIPS announcement indicate just how many other markets they are targeting.
84 Comments
View All Comments
alexvoica - Wednesday, September 3, 2014 - link
CoreMark is a superior benchmark over DMIPS and reflects real world performance and workloads - not all, I agree but it still covers a lot more. If you look at our CoreMark results, you will notice we use gcc.https://www.eembc.org/coremark/
not proprietary (and expensive) compilers. I recommend you actually click on the link, see for yourself and then come back here and copy/paste what it says in the compiler section of that page.
Again, if you had read my article and the press release, you would have seen we actually have said that we lead in SPECint scores AND provide better performance when using multithreading.
I have no problem talking to you or anyone here trying to dispute our claims but let's keep it civilized and not imply I am deliberately lying.
bji - Wednesday, September 3, 2014 - link
Why are you so hostile? Calm the freak down man.Wilco1 - Tuesday, September 2, 2014 - link
SPEC has a multithreaded variant called SPECrate, this runs as many threads as you want. Various compilers (eg. icc) do autoparallelize some of the SPEC benchmarks even for the base results. This has made SPEC almost useless as a single-threaded comparison. So what people do is ignore Intel's icc results and rerun SPEC using GCC with identical options on the CPUs to be compared.Samus - Wednesday, September 3, 2014 - link
Wow name99 and Wilco1 chill the fuck out you're way over-complicating this article. When we have working devices we'll get the real benchmark comparisons to the "ARM equivalent" but its well understood MIPS has superior performance per watt capability at the cost of code and compiler complexity, in the same way ARM has superior performance per watt over x86 at the cost of x86 compatibility. The legacy P55C datapath inherently inflats the transistor count and inefficiency of x86 CPU's, and this is starting to become an issue for ARM as they have over 15 generations of designs, most of which are all backwards compatible with each other.MIPS has just 6 generations of designs to contend with, and was already a more efficient processing method from the get go. ARM's initially superior licensing model and incredibly successful development platform are what has lead to their success decades later.
Wilco1 - Wednesday, September 3, 2014 - link
When we have working devices we can compare performance per Watt. Until then which will be more efficient is just a guess. MIPS and ARM started around the same time and have similar baggage accumulated. Note MIPS is a simpler ISA and actually easier for the compiler as it doesn't have some of the more complex instructions that ARM has.Samus - Wednesday, September 3, 2014 - link
MIPSv6 is way more complex than ARM57, just like MIPSv1 was way more complex than ARM4JAVA is JAVA, but the compiler and instruction sets are more advanced in MIPS, hence more complex. An author may chose not to use a lot of extensions, but long story short, I work with programmers all the time and optimizing for MIPS is more work as optimizing for ARM. There are a lot of reasons for this (admittedly, industry support being one huge one.)
Wilco1 - Wednesday, September 3, 2014 - link
Cortex-A57 is ARM's highest performance and most complex OoO core. You can't compare that with MIPSv6 - an architecture. Wait until Imagination designs a CPU with comparable performance.MIPS is a simpler ISA than ARM, so compilers are easier to write. But MIPS pays for that by having to use more instructions to achieve the same task and more complex hardware to achieve the same performance. The fusing of 2 loads or stores is a very good example of this - if this was supported in the ISA like on ARM, it wouldn't need to be special cased. And while it improves performance, you still pay with larger codesize.
defiler99 - Thursday, September 4, 2014 - link
MIPS is hardly the "new kid on the block"; the MIPS instruction set has always been a rare example of beauty and simplicity in design.It's hardly fair to call that article "marketing fluff" either; have you seen some examples of true fluff? That isn't one.
puppies - Tuesday, September 2, 2014 - link
The time to admit your affiliation was before you started your first post, not after you got called out on it......alexvoica - Tuesday, September 2, 2014 - link
Called out for using my real name and claiming ownership (I, my) of the article from the first post? Don't think so.