Recent from talks
Nothing was collected or created yet.
MIPS architecture
View on Wikipedia
| Designer | MIPS Technologies, Imagination Technologies |
|---|---|
| Bits | 64-bit (32 → 64) |
| Introduced | 1985 |
| Version | MIPS32/64 Release 6 (2014) |
| Design | RISC |
| Type | Load–store |
| Encoding | Fixed |
| Branching | Compare and branch, with a 1 instruction delay after the branching condition check |
| Endianness | Bi |
| Page size | 4 KB |
| Extensions | MDMX, MIPS-3D |
| Open | Partly. The R16000 processor has been on the market for more than 20 years and as such cannot be subject to patent claims. Therefore, the R16000 and older processors are fully open. |
| Registers | |
| General-purpose | 32 |
| Floating-point | 32 |
MIPS (Microprocessor without Interlocked Pipelined Stages)[1] is a family of reduced instruction set computer (RISC) instruction set architectures (ISA)[2]: A-1 [3]: 19 developed by MIPS Computer Systems, now MIPS Technologies, based in the United States.
There are multiple versions of MIPS, including MIPS I, II, III, IV, and V, as well as five releases of MIPS32/64 (for 32- and 64-bit implementations, respectively). The early MIPS architectures were 32-bit; 64-bit versions were developed later. As of April 2017, the current version of MIPS is MIPS32/64 Release 6.[4][5] MIPS32/64 primarily differs from MIPS I–V by defining the privileged kernel mode System Control Coprocessor in addition to the user mode architecture.
The MIPS architecture has several optional extensions: MIPS-3D, a simple set of floating-point SIMD instructions dedicated to 3D computer graphics;[6] MDMX (MaDMaX), a more extensive integer SIMD instruction set using 64-bit floating-point registers; MIPS16e, which adds compression to the instruction stream to reduce the memory programs require;[7] and MIPS MT, which adds multithreading capability.[8]
Computer architecture courses in universities and technical schools often study the MIPS architecture.[9] The architecture greatly influenced later RISC architectures such as Alpha. In March 2021, MIPS announced that the development of the MIPS architecture had ended as the company is making the transition to RISC-V.[10]
History
[edit]This section needs expansion. You can help by adding to it. (February 2020) |
The first version of the MIPS architecture was designed by MIPS Computer Systems for its R2000 microprocessor, the first MIPS implementation. Both MIPS and the R2000 were introduced together in 1985.[11][failed verification] When MIPS II was introduced, MIPS was renamed MIPS I to distinguish it from the new version.[3]: 32
MIPS Computer Systems' R6000 microprocessor (1989) was the first MIPS II implementation.[3]: 8 Designed for servers, the R6000 was fabricated and sold by Bipolar Integrated Technology, but was a commercial failure. During the mid-1990s, many new 32-bit MIPS processors for embedded systems were MIPS II implementations because the introduction of the 64-bit MIPS III architecture in 1991 left MIPS II as the newest 32-bit MIPS architecture until MIPS32 was introduced in 1999.[3]: 19
MIPS Computer Systems' R4000 microprocessor (1991) was the first MIPS III implementation. It was designed for use in personal, workstation, and server computers. MIPS Computer Systems aggressively promoted the MIPS architecture and R4000, establishing the Advanced Computing Environment (ACE) consortium to advance its Advanced RISC Computing (ARC) standard, which aimed to establish MIPS as the dominant personal computing platform. ARC found little success in personal computers, but the R4000 (and the R4400 derivative) were widely used in workstation and server computers, especially by its largest user, Silicon Graphics. Other uses of the R4000 included high-end embedded systems and supercomputers. MIPS III was eventually implemented by a number of embedded microprocessors. Quantum Effect Design's R4600 (1993) and its derivatives were widely used in high-end embedded systems and low-end workstations and servers. MIPS Technologies' R4200 (1994), was designed for embedded systems, laptop, and personal computers. A derivative, the R4300i, fabricated by NEC Electronics, was used in the Nintendo 64 game console. The Nintendo 64, along with the PlayStation, were among the highest volume users of MIPS architecture processors in the mid-1990s.
The first MIPS IV implementation was the MIPS Technologies R8000 microprocessor chipset (1994). The design of the R8000 began at Silicon Graphics, Inc. and it was only used in high-end workstations and servers for scientific and technical applications where high performance on large floating-point workloads was important. Later implementations were the MIPS Technologies R10000 (1996) and the Quantum Effect Devices R5000 (1996) and RM7000 (1998). The R10000, fabricated and sold by NEC Electronics and Toshiba, and its derivatives were used by NEC, Pyramid Technology, Silicon Graphics, and Tandem Computers (among others) in workstations, servers, and supercomputers. The R5000 and R7000 found use in high-end embedded systems, personal computers, and low-end workstations and servers. A derivative of the R5000 from Toshiba, the R5900, was used in Sony Computer Entertainment's Emotion Engine, which powered its PlayStation 2 game console.
Announced on October 21, 1996, at the Microprocessor Forum 1996 alongside the MIPS Digital Media Extensions (MDMX) extension, MIPS V was designed to improve the performance of 3D graphics transformations.[12] In the mid-1990s, a major use of non-embedded MIPS microprocessors were graphics workstations from Silicon Graphics. MIPS V was completed by the integer-only MDMX extension to provide a complete system for improving the performance of 3D graphics applications.[13] MIPS V implementations were never introduced. On May 12, 1997, Silicon Graphics announced the H1 ("Beast") and H2 ("Capitan") microprocessors. The former was to have been the first MIPS V implementation, and was due to be introduced in the first half of 1999.[14] The H1 and H2 projects were later combined and eventually canceled in 1998. While there have not been any MIPS V implementations, MIPS64 Release 1 (1999) was based on MIPS V and retains all of its features as an optional Coprocessor 1 (FPU) feature called Paired-Single.
When MIPS Technologies was spun-out of Silicon Graphics in 1998, it refocused on the embedded market. Through MIPS V, each successive version was a strict superset of the previous version, but this property was found to be a problem,[citation needed] and the architecture definition was changed to define a 32-bit and a 64-bit architecture: MIPS32 and MIPS64. Both were introduced in 1999.[15] MIPS32 is based on MIPS II with some additional features from MIPS III, MIPS IV, and MIPS V; MIPS64 is based on MIPS V.[15] NEC, Toshiba and SiByte (later acquired by Broadcom) each obtained licenses for MIPS64 as soon as it was announced. Philips, LSI Logic, IDT, Raza Microelectronics, Inc., Cavium, Loongson Technology and Ingenic Semiconductor have since joined them. MIPS32/MIPS64 Release 5 was announced on December 6, 2012.[16] According to the Product Marketing Director at MIPS, Release 4 was skipped because the number four is perceived as unlucky in many Asian cultures.[17]
In December 2018, Wave Computing, the new owner of the MIPS architecture, announced that MIPS ISA would be open-sourced in a program dubbed the MIPS Open initiative.[18] The program was intended to open up access to the most recent versions of both the 32-bit and 64-bit designs making them available without any licensing or royalty fees as well as granting participants licenses to existing MIPS patents.[19][20][21]
In March 2019, MIPS Revision 6 was made available under a royalty-free license,[22] but later that year the program was shut down again.[23]
In March 2021, Wave Computing announced that the development of the MIPS architecture has ceased. The company has joined the RISC-V foundation and future processor designs will be based on the RISC-V architecture.[10][24] In spite of this, some licensees such as Loongson are continuing with new extensions of MIPS-compatible ISAs on their own.[25]
In January 2024, Loongson won a case over rights to use MIPS architecture.[26]
Design
[edit]This section needs expansion. You can help by adding to it. (February 2020) |
MIPS is a modular architecture supporting up to four coprocessors (COP0/1/2/3). In MIPS terminology, COP0 is the System Control Coprocessor (an essential part of the processor that is implementation-defined in MIPS I–V), COP1 is an optional floating-point unit (FPU), and COP2 and COP3 are optional implementation-defined coprocessors (MIPS III removed COP3 and reused its opcodes for other purposes). For example, in the PlayStation video game console, COP2 is the Geometry Transformation Engine (GTE), which accelerates the processing of geometry in 3D computer graphics.
Versions
[edit]MIPS I
[edit]MIPS is a load/store architecture (also known as a register-register architecture); except for the load/store instructions used to access memory, all instructions operate on the registers.
Registers
[edit]MIPS I has thirty-two 32-bit general-purpose registers (GPR). Register $0 is hardwired to zero and writes to it are discarded. Register $31 is the link register. For integer multiplication and division instructions, which run asynchronously from other instructions, a pair of 32-bit registers, HI and LO, are provided. There is a small set of instructions for copying data between the general-purpose registers and the HI/LO registers.
The program counter has 32 bits. The two low-order bits always contain zero since MIPS I instructions are 32 bits long and are aligned to their natural word boundaries.
Instruction formats
[edit]Instructions are divided into three types: R (register), I (immediate), and J (jump). Every instruction starts with a 6-bit opcode. In addition to the opcode, R-type instructions specify three registers,[27] a shift amount field, and a function field; I-type instructions specify two registers and a 16-bit immediate value; J-type instructions follow the opcode with a 26-bit jump target.[2]: A-174
The following are the three formats used for the core instruction set:
| Type | -31- format (bits) -0- | |||||
|---|---|---|---|---|---|---|
| R | opcode (6) | rs (5) | rt (5) | rd (5) | shamt (5) | funct (6) |
| I | opcode (6) | rs (5) | rt (5) | immediate (16) | ||
| J | opcode (6) | address (26) | ||||
CPU instructions
[edit]MIPS I has instructions that load and store 8-bit bytes, 16-bit halfwords, and 32-bit words. Only one addressing mode is supported: base + displacement. Since MIPS I is a 32-bit architecture, loading quantities fewer than 32 bits requires the datum to be either sign-extended or zero-extended to 32 bits. The load instructions suffixed by "unsigned" perform zero extension; otherwise sign extension is performed. Load instructions source the base from the contents of a GPR (rs) and write the result to another GPR (rt). Store instructions source the base from the contents of a GPR (rs) and the store data from another GPR (rt). All load and store instructions compute the memory address by summing the base with the sign-extended 16-bit immediate. MIPS I requires all memory accesses to be aligned to their natural word boundaries, otherwise an exception is signaled. To support efficient unaligned memory accesses, there are load/store word instructions suffixed by "left" or "right". All load instructions are followed by a load delay slot. The instruction in the load delay slot cannot use the data loaded by the load instruction. The load delay slot can be filled with an instruction that is not dependent on the load; a NOP is substituted if such an instruction cannot be found.
MIPS I has instructions to perform addition and subtraction. These instructions source their operands from two GPRs (rs and rt), and write the result to a third GPR (rd). Alternatively, addition can source one of the operands from a 16-bit immediate (which is sign-extended to 32 bits). The instructions for addition and subtraction have two variants: by default, an exception is signaled if the result overflows; instructions with the "unsigned" suffix do not signal an exception. The overflow check interprets the result as a 32-bit two's complement integer. MIPS I has instructions to perform bitwise logical AND, OR, XOR, and NOR. These instructions source their operands from two GPRs and write the result to a third GPR. The AND, OR, and XOR instructions can alternatively source one of the operands from a 16-bit immediate (which is zero-extended to 32 bits). The "Set on relation" instructions write one or zero to the destination register if the specified relation is true or false. These instructions source their operands from two GPRs or one GPR and a 16-bit immediate (which is sign-extended to 32 bits), and write the result to a third GPR. By default, the operands are interpreted as signed integers. The variants of these instructions that are suffixed with "unsigned" interpret the operands as unsigned integers (even those that source an operand from the sign-extended 16-bit immediate).
The Load Upper Immediate instruction copies the 16-bit immediate into the high-order 16 bits of a GPR. It is used in conjunction with the Or Immediate instruction to load a 32-bit immediate into a register.
MIPS I has instructions to perform left and right logical shifts and right arithmetic shifts. The operand is obtained from a GPR (rt), and the result is written to another GPR (rd). The shift distance is obtained from either a GPR (rs) or a 5-bit "shift amount" (the "sa" field).
MIPS I has instructions for signed and unsigned integer multiplication and division. These instructions source their operands from two GPRs and write their results to a pair of 32-bit registers called HI and LO, since they may execute separately from (and concurrently with) the other CPU instructions. For multiplication, the high- and low-order halves of the 64-bit product is written to HI and LO (respectively). For division, the quotient is written to LO and the remainder to HI. To access the results, a pair of instructions (Move from HI and Move from LO) is provided to copy the contents of HI or LO to a GPR. These instructions are interlocked: reads of HI and LO do not proceed past an unfinished arithmetic instruction that will write to HI and LO. Another pair of instructions (Move to HI or Move to LO) copies the contents of a GPR to HI and LO. These instructions are used to restore HI and LO to their original state after exception handling. Instructions that read HI or LO must be separated by two instructions that do not write to HI or LO.
All MIPS I control flow instructions are followed by a branch delay slot. Unless the branch delay slot is filled by an instruction performing useful work, a NOP is substituted. MIPS I branch instructions compare the contents of a GPR (rs) against zero or another GPR (rt) as signed integers and branch if the specified condition is true. Control is transferred to the address computed by shifting the 16-bit offset left by two bits, sign-extending the 18-bit result, and adding the 32-bit sign-extended result to the sum of the program counter (instruction address) and 810. Jumps have two versions: absolute and register-indirect. Absolute jumps ("Jump" and "Jump and Link") compute the address to which control is transferred by shifting the 26-bit instr_index left by two bits and concatenating the 28-bit result with the four high-order bits of the address of the instruction in the branch delay slot. Register-indirect jumps transfer control to the instruction at the address sourced from a GPR (rs). The address sourced from the GPR must be word-aligned, else an exception is signaled after the instruction in the branch delay slot is executed. Branch and jump instructions that link (except for "Jump and Link Register") save the return address to GPR 31. The "Jump and Link Register" instruction permits the return address to be saved to any writable GPR.
MIPS I has two instructions for software to signal an exception: System Call and Breakpoint. System Call is used by user mode software to make kernel calls; and Breakpoint is used to transfer control to a debugger via the kernel's exception handler. Both instructions have a 20-bit Code field that can contain operating environment-specific information for the exception handler.
MIPS has 32 floating-point registers. Two registers are paired for double precision numbers. Odd numbered registers cannot be used for arithmetic or branching, just as part of a double precision register pair, resulting in 16 usable registers for most instructions (moves/copies and loads/stores were not affected).
Single precision is denoted by the .s suffix, while double precision is denoted by the .d suffix.
MIPS II
[edit]MIPS II removed the load delay slot[3]: 41 and added several sets of instructions. For shared-memory multiprocessing, the Synchronize Shared Memory, Load Linked Word, and Store Conditional Word instructions were added.[28] A set of Trap-on-Condition instructions were added. These instructions caused an exception if the evaluated condition is true. All existing branch instructions were given branch-likely versions that executed the instruction in the branch delay slot only if the branch is taken.[3]: 40 These instructions improve performance in certain cases by allowing useful instructions to fill the branch delay slot.[3]: 212 Doubleword load and store instructions for COP1–3 were added. Consistent with other memory access instructions, these loads and stores required the doubleword to be naturally aligned.
The instruction set for the floating point coprocessor also had several instructions added to it. An IEEE 754-compliant floating-point square root instruction was added. It supported both single- and double-precision operands. A set of instructions that converted single- and double-precision floating-point numbers to 32-bit words were added. These complemented the existing conversion instructions by allowing the IEEE rounding mode to be specified by the instruction instead of the Floating Point Control and Status Register.
MIPS III
[edit]MIPS III is a backwards-compatible extension of MIPS II that added support for 64-bit memory addressing and integer operations. The 64-bit data type is called a doubleword, and MIPS III extended the general-purpose registers, HI/LO registers, and program counter to 64 bits to support it. New instructions were added to load and store doublewords, to perform integer addition, subtraction, multiplication, division, and shift operations on them, and to move doubleword between the GPRs and HI/LO registers. For shared-memory multiprocessing, the Load Linked Double Word, and Store Conditional Double Word instructions were added.[28] Existing instructions originally defined to operate on 32-bit words were redefined, where necessary, to sign-extend the 32-bit results to permit words and doublewords to be treated identically by most instructions. Among those instructions redefined was Load Word. In MIPS III it sign-extends words to 64 bits. To complement Load Word, a version that zero-extends was added.
The R instruction format's inability to specify the full shift distance for 64-bit shifts (its 5-bit shift amount field is too narrow to specify the shift distance for doublewords) required MIPS III to provide three 64-bit versions of each MIPS I shift instruction. The first version is a 64-bit version of the original shift instructions, used to specify constant shift distances of 0–31 bits. The second version is similar to the first, but adds 3210 the shift amount field's value so that constant shift distances of 32–63 bits can be specified. The third version obtains the shift distance from the six low-order bits of a GPR.
MIPS III added a supervisor privilege level in between the existing kernel and user privilege levels. This feature only affected the implementation-defined System Control Processor (Coprocessor 0).
MIPS III removed the Coprocessor 3 (COP3) support instructions, and reused its opcodes for the new doubleword instructions. The remaining coprocessors gained instructions to move doublewords between coprocessor registers and the GPRs. The floating general registers (FGRs) were extended to 64 bits and the requirement for instructions to use even-numbered register only was removed. This is incompatible with earlier versions of the architecture; a bit in the floating-point control/status register is used to operate the MIPS III floating-point unit (FPU) in a MIPS I- and II-compatible mode. The floating-point control registers were not extended for compatibility. The only new floating-point instructions added were those to copy doublewords between the CPU and FPU convert single- and double-precision floating-point numbers into doubleword integers and vice versa.
MIPS IV
[edit]MIPS IV is the fourth version of the architecture. It is a superset of MIPS III and is compatible with all existing versions of MIPS.[29]: A-1 MIPS IV was designed to mainly improve floating-point (FP) performance. To improve access to operands, an indexed addressing mode (base + index, both sourced from GPRs) for FP loads and stores was added, as were prefetch instructions for performing memory prefetching and specifying cache hints (these supported both the base + offset and base + index addressing modes).
MIPS IV added several features to improve instruction-level parallelism. To alleviate the bottleneck caused by a single condition bit, seven condition code bits were added to the floating-point control and status register, bringing the total to eight. FP comparison and branch instructions were redefined so they could specify which condition bit was written or read (respectively); and the delay slot in between an FP branch that read the condition bit written to by a prior FP comparison was removed. Support for partial predication was added in the form of conditional move instructions for both GPRs and FPRs; and an implementation could choose between having precise or imprecise exceptions for IEEE 754 traps.
MIPS IV added several new FP arithmetic instructions for both single- and double-precision FPNs: fused-multiply add or subtract, reciprocal, and reciprocal square-root. The FP fused-multiply add or subtract instructions perform either one or two roundings (it is implementation-defined), to exceed or meet IEEE 754 accuracy requirements (respectively). The FP reciprocal and reciprocal square-root instructions do not comply with IEEE 754 accuracy requirements, and produce results that differ from the required accuracy by one or two units of last place (it is implementation defined). These instructions serve applications where instruction latency is more important than accuracy.
MIPS V
[edit]MIPS V added a new data type, the Paired Single (PS), which consisted of two single-precision (32-bit) floating-point numbers stored in the existing 64-bit floating-point registers. Variants of existing floating-point instructions for arithmetic, compare and conditional move were added to operate on this data type in a SIMD fashion. New instructions were added for loading, rearranging and converting PS data.[3]: 426–429 It was the first instruction set to exploit floating-point SIMD with existing resources.[13]
MIPS32/MIPS64
[edit]The first release of MIPS32, based on MIPS II, added conditional moves, prefetch instructions, and other features from the R4000 and R5000 families of 64-bit processors.[15] The first release of MIPS64 adds a MIPS32 mode to run 32-bit code.[15] The MUL and MADD (multiply-add) instructions, previously available in some implementations, were added to the MIPS32 and MIPS64 specifications, as were cache control instructions.[15] For the purpose of cache control, both SYNC and SYNCI instructions were prepared.[30][31]
MIPS32/MIPS64 Release 6 in 2014 added the following:[32]
- a new family of branches with no delay slot:
- unconditional branches (BC) and branch-and-link (BALC) with a 26-bit offset,
- conditional branch on zero/non-zero with a 21-bit offset,
- full set of signed and unsigned conditional branches compare between two registers (e.g. BGTUC) or a register against zero (e.g. BGTZC),
- full set of branch-and-link which compare a register against zero (e.g. BGTZALC).
- index jump instructions with no delay slot designed to support large absolute addresses.
- instructions to load 16-bit immediates at bit position 16, 32 or 48, allowing to easily generate large constants.
- PC-relative load instructions, as well as address generation with large (PC-relative) offsets.
- bit-reversal and byte-alignment instructions (previously only available with the DSP extension).
- multiply and divide instructions redefined so that they use a single register for their result).
- instructions generating truth values now generate all zeroes or all ones instead of just clearing/setting the 0-bit,
- instructions using a truth value now only interpret all-zeroes as false instead of just looking at the 0-bit.
Removed infrequently used instructions:
- some conditional moves
- branch likely instructions (deprecated in previous releases).
- integer overflow trapping instructions with 16-bit immediate
- integer accumulator instructions (together HI/LO registers, moved to the DSP Application-Specific Extension)
- unaligned load instructions (LWL and LWR), (requiring that most ordinary loads and stores support misaligned access, possibly via trapping and with the addition of a new instruction (BALIGN))
Reorganized the instruction encoding, freeing space for future expansions.
microMIPS
[edit]The microMIPS32/64 architectures are supersets of the MIPS32 and MIPS64 architectures (respectively) designed to replace the MIPS16e application-specific extension (ASE). A disadvantage of MIPS16e is that it requires a mode switch before any of its 16-bit instructions can be processed. microMIPS adds versions of the most-frequently used 32-bit instructions that are encoded as 16-bit instructions. This allows programs to intermix 16- and 32-bit instructions without having to switch modes. microMIPS was introduced alongside of MIPS32/64 Release 3, and each subsequent release of MIPS32/64 has a corresponding microMIPS32/64 version. A processor may implement microMIPS32/64 or both microMIPS32/64 and its corresponding MIPS32/64 subset. Starting with MIPS32/64 Release 6, support for MIPS16e ended, and microMIPS is the only form of code compression in MIPS.
Application-specific extensions
[edit]The base MIPS32 and MIPS64 architectures can be supplemented with a number of optional architectural extensions, which are collectively referred to as application-specific extensions (ASEs). These ASEs provide features that improve the efficiency and performance of certain workloads, such as digital signal processing.
MIPS MCU
[edit]Enhancements for microcontroller applications. The MCU ASE (application-specific extension) has been developed to extend the interrupt controller support, reduce the interrupt latency and enhance the I/O peripheral control function typically required in microcontroller system designs.
- Separate priority and vector generation
- Supports up to 256 interrupts in EIC (External Interrupt Controller) mode and eight hardware interrupt pins
- Provides 16-bit vector offset address
- Pre-fetching of the interrupt exception vector
- Automated Interrupt Prologue – adds hardware to save and update system status before the interrupt handling routine
- Automated Interrupt Epilogue – restores the system state previously stored in the stack for returning from the interrupt.
- Interrupt Chaining – supports the service of pending interrupts without the need to exit the initial interrupt routine, saving the cycles required to store and restore multiple active interrupts
- Supports speculative pre-fetching of the interrupt vector address. Reduces the number of interrupt service cycles by overlapping memory accesses with pipeline flushes and exception prioritization
- Includes atomic bit set/clear instructions which enables bits within an I/O register that are normally used to monitor or control external peripheral functions to be modified without interruption, ensuring the action is performed securely.
MIPS16
[edit]MIPS16 is an Application-Specific Extension for MIPS I through to V designed by LSI Logic and MIPS Technologies, announced on October 21, 1996, alongside its first implementation, the LSI Logic TinyRISC processor.[33] MIPS16 was subsequently licensed by NEC Electronics, Philips Semiconductors, and Toshiba (among others); and implemented as an extension to the MIPS I, II, an III architectures. MIPS16 decreases the size of application by up to 40% by using 16-bit instructions instead of 32-bit instructions and also improves power efficiency, the instruction cache hit rate, and is equivalent in performance to its base architecture.[34] It is supported by hardware and software development tools from MIPS Technologies and other providers. MIPS16e is an improved version of MIPS16 first supported by MIPS32 and MIPS64 Release 1. MIPS16e2 is an improved version of MIPS16 that is supported by MIPS32 and MIPS64 (up to Release 5). Release 6 replaced it with microMIPS.
MIPS Digital Signal Processing (DSP)
[edit]The DSP ASE is an optional extension to the MIPS32/MIPS64 Release 2 and newer instruction sets which can be used to accelerate a large range of "media" computations—particularly audio and video. The DSP module comprises a set of instructions and state in the integer pipeline and requires minimal additional logic to implement in MIPS processor cores. Revision 2 of the ASE was introduced in the second half of 2006. This revision adds extra instructions to the original ASE, but is otherwise backwards-compatible with it.[35] Unlike the bulk of the MIPS architecture, it's a fairly irregular set of operations, many chosen for a particular relevance to some key algorithm. Its main novel features (vs original MIPS32):[36]
- Saturating arithmetic (when a calculation overflows, deliver the representable number closest to the non-overflowed answer).
- Fixed-point arithmetic on signed 32- and 16-bit fixed-point fractions with a range of -1 to +1 (these are widely called "Q31" and "Q15").
- The existing integer multiplication and multiply-accumulate instructions, which deliver results into a double-size accumulator (called "hi/lo" and 64 bits on MIPS32 CPUs). The DSP ASE adds three more accumulators, and some different flavours of multiply-accumulate.
- SIMD instructions operating on 4 x unsigned bytes or 2 x 16-bit values packed into a 32-bit register (the 64-bit variant of the DSP ASE supports larger vectors, too).
- SIMD operations are basic arithmetic, shifts and some multiply-accumulate type operations.
MIPS SIMD architecture (MSA)
[edit]Instruction set extensions designed to accelerate multimedia.
- Predefined scalable extensions for chips with more gates/transistors
- 32 vector registers of 16 x 8-bit, 8 x 16-bit, 4 x 32-bit, and 2 x 64 bit vector elements, all 128-bit in width
- Includes operations for:
- Efficient vector arithmetic on integer, fixed-point and floating-point data with full rounding and saturation options
- Creating absolute values in vectors
- Full precision multiplication and fused multiply-add
- Conversions between integer, floating-point and fixed-point data
- Vector-level comparison and branching without condition flags
- Vector (1D) and array (2D) shuffling
- Typed loads and stores for endian-independent operation
- IEEE 754-2008 compliant
- Element-precise floating-point exception signaling
- Accelerates compute-intensive applications by leveraging generic compiler support
- Created as a software-programmable solution for consumer electronics applications or functions not covered by dedicated hardware
- Created for emerging data mining, feature extraction, multimedia processing, GUIs and high-performance scientific computing
MIPS virtualization
[edit]MIPS Revision 6 added native virtualization supported by hardware.
MIPS multi-threading
[edit]Each multi-threaded MIPS core can support up to two VPEs (Virtual Processing Elements) which share a single pipeline as well as other hardware resources. However, since each VPE includes a complete copy of the processor state as seen by the software system, each VPE appears as a complete standalone processor to an SMP Linux operating system. For more fine-grained thread processing applications, each VPE is capable of supporting up to nine TCs allocated across two VPEs. The TCs share a common execution unit but each has its own program counter and core register files so that each can handle a thread from the software. The MIPS MT architecture also allows the allocation of processor cycles to threads, and sets the relative thread priorities with an optional Quality of Service (QoS) manager block. This enables two prioritization mechanisms that determine the flow of information across the bus. The first mechanism allows the user to prioritize one thread over another. The second mechanism is used to allocate a specified ratio of the cycles to specific threads over time. The combined use of both mechanisms allows effective allocation of bandwidth to the set of threads, and better control of latencies. In real-time systems, system-level determinism is very critical, and the QoS block facilitates improvement of the predictability of a system. Hardware designers of advanced systems may replace the standard QoS block provided by MIPS Technologies with one that is specifically tuned for their application.
SmartMIPS
[edit]SmartMIPS is an Application-Specific Extension (ASE) designed by Gemplus International and MIPS Technologies to improve performance and reduce memory consumption for smart card software. It is supported by MIPS32 only, since smart cards do not require the capabilities of MIPS64 processors. Few smart cards use SmartMIPS.
MIPS Digital Media eXtension (MDMX)
[edit]Multimedia application accelerations that were common in the 1990s on RISC and CISC systems.
Additional instructions for improving the performance of 3D graphics applications
Calling conventions
[edit]MIPS has had several calling conventions, especially on the 32-bit platform.
The O32 ABI is the most commonly used ABI, owing to its status as the original System V ABI for MIPS.[37][38] It is strictly stack-based, with only four registers ($a0-$a3) available to pass arguments. Space on the stack is reserved in case the callee needs to save its arguments, but the registers are not stored there by the caller. The return value is stored in register $v0; a second return value may be stored in $v1. The ABI took shape in 1990 and was last updated in 1994. This perceived slowness, along with an antiquated floating-point model with only 16 registers, has encouraged the proliferation of many other calling conventions. It is only defined for 32-bit MIPS, but GCC has created a 64-bit variation called O64.[39]
For 64-bit, the N64 ABI by Silicon Graphics is most commonly used. The most important improvement is that eight registers are now available for argument passing; it also increases the number of floating-point registers to 32. There is also an ILP32 version called N32, which uses 32-bit pointers for smaller code, analogous to the x32 ABI. Both run under the 64-bit mode of the CPU.[39] The N32 and N64 ABIs pass the first eight arguments to a function in the registers $a0-$a7; subsequent arguments are passed on the stack. The return value (or a pointer to it) is stored in $v0; a second return value may be stored in $v1. In both the N32 and N64 ABIs, all registers are considered to be 64-bits wide.
A few attempts have been made to replace O32 with a 32-bit ABI that resembles N32 more than O32. A 1995 conference came up with MIPS EABI, for which the 32-bit version was quite similar.[40] EABI inspired MIPS Technologies to propose a more radical "NUBI" ABI additionally reuse argument registers for the return value.[41] MIPS EABI is supported by GCC but not LLVM, and neither supports NUBI.
For all of O32 and N32/N64, the return address is stored in $ra ($31). This is automatically set with the use of the JAL (jump and link) or JALR (jump and link register) instructions. The function prologue of a (non-leaf) MIPS subroutine pushes the return address (in $ra) to the stack.[42][43]
On both O32 and N32/N64, the stack grows downwards, but the N32/N64 ABIs require 64-bit alignment for all stack entries. The frame pointer ($30) is optional and in practice rarely used except when the stack allocation in a function is determined at runtime, for example, by calling alloca().
For N32 and N64, the return address is typically stored 8 bytes before the stack pointer, although this may be optional.
For the N32 and N64 ABIs, a function must preserve the $s0-$s7 registers, the global pointer ($gp or $28), the stack pointer ($sp or $29) and the frame pointer ($fp or $30). The O32 ABI is the same except the calling function is required to save the $gp register instead of the called function.
For multi-threaded code, the thread local storage pointer is typically stored in special hardware register $29 and is accessed by using the mfhw (move from hardware) instruction. At least one vendor is known to store this information in the $k0 register which is normally reserved for kernel use, but this is not standard.
The $k0 and $k1 registers ($26, $27) are reserved for kernel use and should not be used by applications since these registers can be changed at any time by the kernel due to interrupts, context switches or other events.
| Name | Number | Use | Callee must preserve? |
|---|---|---|---|
| $zero | $0 | constant 0 | — |
| $at | $1 | assembler temporary | No |
| $v0–$v1 | $2–$3 | values for function returns and expression evaluation | No |
| $a0–$a3 | $4–$7 | function arguments | No |
| $t0–$t7 | $8–$15 | temporaries | No |
| $s0–$s7 | $16–$23 | saved temporaries | Yes |
| $t8–$t9 | $24–$25 | temporaries | No |
| $k0–$k1 | $26–$27 | reserved for OS kernel | — |
| $gp | $28 | global pointer | Yes (except PIC code) |
| $sp | $29 | stack pointer | Yes |
| $fp | $30 | frame pointer | Yes |
| $ra | $31 | return address | — |
| Name | Number | Use | Callee must preserve? |
|---|---|---|---|
| $zero | $0 | constant 0 | — |
| $at | $1 | assembler temporary | No |
| $v0–$v1 | $2–$3 | values for function returns and expression evaluation | No |
| $a0–$a7 | $4–$11 | function arguments | No |
| $t4–$t7 | $12–$15 | temporaries | No |
| $s0–$s7 | $16–$23 | saved temporaries | Yes |
| $t8–$t9 | $24–$25 | temporaries | No |
| $k0–$k1 | $26–$27 | reserved for OS kernel | — |
| $gp | $28 | global pointer | Yes |
| $sp | $29 | stack pointer | Yes |
| $s8 | $30 | frame pointer | Yes |
| $ra | $31 | return address | — |
Registers that are preserved across a call are registers that (by convention) will not be changed by a system call or procedure (function) call. For example, $s-registers must be saved to the stack by a procedure that needs to use them, and $sp and $fp are always incremented by constants, and decremented back after the procedure is done with them (and the memory they point to). By contrast, $ra is changed automatically by any normal function call (ones that use jal), and $t-registers must be saved by the program before any procedure call (if the program needs the values inside them after the call).
The userspace calling convention of position-independent code on Linux additionally requires that when a function is called the $t9 register must contain the address of that function.[45] This convention dates back to the System V ABI supplement for MIPS.[46]
Uses
[edit]This section needs expansion. You can help by adding to it. (February 2020) |
Parts of this article (those related to 2010s) need to be updated. (August 2020) |
MIPS processors are used in embedded systems such as residential gateways and routers. Originally, MIPS was designed for general-purpose computing. During the 1980s and 1990s, MIPS processors for personal, workstation, and server computers were used by many companies such as Digital Equipment Corporation, MIPS Computer Systems, NEC, Pyramid Technology, SiCortex, Siemens Nixdorf, Silicon Graphics, and Tandem Computers.
Historically, video game consoles such as the Nintendo 64, Sony PlayStation, PlayStation 2, and PlayStation Portable used MIPS processors. MIPS processors also used to be popular in supercomputers during the 1990s, but all such systems have dropped off the TOP500 list. These uses were complemented by embedded applications at first, but during the 1990s, MIPS became a major presence in the embedded processor market, and by the 2000s, most MIPS processors were for these applications.
In the mid- to late-1990s, it was estimated that one in three RISC microprocessors produced was a MIPS processor.[47]
By the late 2010s, MIPS machines were still commonly used in embedded markets, including automotive, wireless router, LTE modems (mainly via MediaTek), and microcontrollers (for example the Microchip Technology PIC32M). They have mostly faded out of the personal, server, and application space.
Simulators
[edit]Open Virtual Platforms (OVP)[48] includes the freely available for non-commercial use simulator OVPsim, a library of models of processors, peripherals and platforms, and APIs which enable users to develop their own models. The models in the library are open source, written in C, and include the MIPS 4K, 24K, 34K, 74K, 1004K, 1074K, M14K, microAptiv, interAptiv, proAptiv 32-bit cores and the MIPS 64-bit 5K range of cores. These models are created and maintained by Imperas[49] and in partnership with MIPS Technologies have been tested and assigned the MIPS-Verified mark. Sample MIPS-based platforms include both bare metal environments and platforms for booting unmodified Linux binary images. These platforms–emulators are available as source or binaries and are fast, free for non-commercial usage, and are easy to use. OVPsim is developed and maintained by Imperas and is very fast (hundreds of million of instructions per second), and built to handle multicore homogeneous and heterogeneous architectures and systems.
There is a freely available MIPS32 simulator called SPIM (earlier versions simulated only the R2000/R3000) for use in education. EduMIPS64[50] is a GPL graphical cross-platform MIPS64 CPU simulator, written in Java/Swing. It supports a wide subset of the MIPS64 ISA and allows the user to graphically see what happens in the pipeline when an assembly program is run by the CPU.
MARS[51] is another GUI-based MIPS emulator designed for use in education, specifically for use with Hennessy's Computer Organization and Design.
WebMIPS[52] is a browser-based MIPS simulator with visual representation of a generic, pipelined processor. This simulator is quite useful for register tracking during step by step execution.
QtMips provides a simple 5-stage pipeline visualization as well as cache principle visualization for basic computer architectures courses.[53][54][55] It is available both as a web application and as a downloadable program for Windows, Linux, and macOS.
More advanced free emulators are available from the GXemul (formerly known as the mips64emul project) and QEMU projects. They emulate the various MIPS III and IV microprocessors in addition to entire computer systems which use them.
Commercial simulators are available especially for the embedded use of MIPS processors, for example Wind River Simics (MIPS 4Kc and 5Kc, PMC RM9000, QED RM7000, Broadcom/Netlogic ec4400, Cavium Octeon I), Imperas (all MIPS32 and MIPS64 cores), VaST Systems (R3000, R4000), and CoWare (the MIPS4KE, MIPS24K, MIPS25Kf and MIPS34K).
The Creator simulator[56][57][58][59][60] is portable and allows the user to learn various assembly languages of different processors. Creator has examples with an implementation of MIPS32 and RISC-V instructions.
See also
[edit]References
[edit]- ^ Patterson, David (2014). Computer Organization and Design (PDF). Elsevier. pp. 4.16–4. ISBN 978-0-12-407726-3. Archived (PDF) from the original on September 4, 2019. Retrieved November 28, 2018.
- ^ a b Price, Charles (September 1995). MIPS IV Instruction Set (Revision 3.2), MIPS Technologies, Inc.
- ^ a b c d e f g h Sweetman, Dominic (1999). See MIPS Run. Morgan Kaufmann Publishers, Inc. ISBN 1-55860-410-3.
- ^ "MIPS32 Architecture". MIPS. Archived from the original on March 21, 2020. Retrieved March 20, 2020.
- ^ "MIPS64 Architecture". MIPS. Archived from the original on February 2, 2020. Retrieved March 20, 2020.
- ^ "MIPS-3D ASE". Imagination Technologies. Archived from the original on January 3, 2014. Retrieved January 4, 2014.
- ^ "MIPS16e". MIPS. Archived from the original on January 16, 2021. Retrieved March 20, 2020.
- ^ "MIPS Multithreading". MIPS. Archived from the original on October 26, 2020. Retrieved March 20, 2020.
- ^ University of California, Davis. "ECS 142 (Compilers) References & Tools page". Archived from the original on March 21, 2011. Retrieved May 28, 2009.
- ^ a b Turley, Jim (March 8, 2021). "Wait, What? MIPS Becomes RISC-V". Electronic Engineering Journal. Archived from the original on March 21, 2021. Retrieved March 28, 2021.
- ^ "The MIPS Processor". www.d.umn.edu. Archived from the original on May 17, 2023. Retrieved May 17, 2023.
- ^ "Silicon Graphics Introduces Enhanced MIPS Architecture to Lead the Interactive Digital Revolution" (Press release). Silicon Graphics, Inc. October 21, 1996. Archived from the original on June 6, 1997.
- ^ a b Gwennap, Linley (November 18, 1996). "Digital, MIPS Add Multimedia Extensions" (PDF). Microprocessor Report. 10 (15): 24–28. Archived (PDF) from the original on July 20, 2011.
- ^ "Silicon Graphics Previews New High-Performance MIPS Microprocessor Roadmap" (Press release). May 12, 1997.
- ^ a b c d e "MIPS Technologies, Inc. Enhances Architecture to Support Growing Need for IP Re-Use and Integration" (Press release). Business Wire. May 3, 1999. Archived from the original on December 1, 2018. Retrieved February 11, 2016.
- ^ "Latest Release of MIPS Architecture Includes Virtualization and SIMD Key Functionality for Enabling Next Generation of MIPS-Based Products" (Press release). MIPS Technologies. December 6, 2012. Archived from the original on December 13, 2012.
- ^ "MIPS skips Release 4 amid bidding war". EE Times. December 10, 2012. Archived from the original on April 17, 2014.
- ^ "Wave Computing Extends AI Lead by Targeting Edge of Cloud Through Acquisition of MIPS". June 15, 2018. Archived from the original on November 25, 2020. Retrieved December 19, 2018.
- ^ "Wave Computing® Launches the MIPS Open Initiative To Accelerate Innovation for the Renowned MIPS® Architecture". December 17, 2018. Archived from the original on July 28, 2021. Retrieved December 19, 2018.
- ^ "MIPS Processor ISA To Be Open-Sourced In 2019 - Phoronix". Archived from the original on March 6, 2021. Retrieved December 18, 2018.
- ^ Yoshida, Junko (December 17, 2018). "MIPS Goes Open Source". EE Times. Archived from the original on July 5, 2022. Retrieved July 18, 2022.
- ^ "MIPS R6 Architecture Now Available for Open Use". March 28, 2019. Archived from the original on August 4, 2020. Retrieved December 16, 2019.
- ^ "Wave Computing Closes Its MIPS Open Initiative with Immediate Effect, Zero Warning". November 15, 2019. Archived from the original on March 7, 2021. Retrieved December 16, 2019.
- ^ "Wave Computing and MIPS emerge from chapter 11 bankruptcy" (Press release). March 1, 2021. Archived from the original on May 13, 2021. Retrieved March 11, 2021.
- ^ Shilov, Anton (August 25, 2021). "Loongson Rips MIPS: Uses Old Code for New CPUs". Tom's Hardware. Archived from the original on January 25, 2022. Retrieved December 1, 2021.
- ^ Connatser, Matthew (January 19, 2024). "Chinese chipmaker Loongson wins case over rights to MIPS architecture - company's new CPU architecture heavily resembles existing MIPS". Tom's Hardware. Archived from the original on January 19, 2024. Retrieved January 19, 2024.
- ^ Harris, David Money; Harris, Sarah L. (2013). "Architecture". Digital Design and Computer Architecture. Elsevier. pp. 294–369. doi:10.1016/b978-0-12-394424-5.00006-9. ISBN 9780123944245.
R-type is short for register-type. R-type instructions use three registers as operands: two as sources, and one as a destination.
- ^ a b "APPLICATION NOTE MIPS R4000 Synchronization Primitives" (PDF). p. 5. Archived (PDF) from the original on December 27, 2023. Retrieved December 27, 2023.
- ^ MIPS IV Instruction Set (PDF) (Revision 3.2 ed.). MIPS Technologies. September 1995. Archived (PDF) from the original on November 27, 2022. Retrieved August 24, 2022.
- ^ "MIPS instruction set R5" (PDF). p. 59-62. Archived (PDF) from the original on December 15, 2023. Retrieved December 15, 2023.
- ^ "MIPS® Coherence Protocol Specification, Revision 01.01" (PDF). p. 26,25,57. Archived (PDF) from the original on September 4, 2018. Retrieved December 15, 2023.
- ^ "MIPS – Market-leading RISC CPU IP processor solutions". imgtec.com. Archived from the original on March 9, 2016. Retrieved February 11, 2016.
- ^ "Silicon Graphics Introduces Compact MIPS RISC Microprocessor Code For High Performance at a Low Cost" (Press release). October 21, 1996.
- ^ Sweetman, Dominic (2007). See MIPS Run (2nd ed.). San Francisco, California: Morgan Kaufmann Publishers. pp. 425–427. ISBN 978-0-12-088421-6.
- ^ "Using the GNU Compiler Collection (GCC): MIPS DSP Built-in Functions". gcc.gnu.org. Archived from the original on April 20, 2017.
- ^ "Instruction Set Architecture - LinuxMIPS". www.linux-mips.org. Archived from the original on April 20, 2017.
- ^ Sweetman, Dominic (2007). See MIPS Run, 2nd edition. Morgan Kaufmann. ISBN 978-0-12088-421-6.
- ^ "MIPS32 Instruction Set Quick Reference". Archived (PDF) from the original on January 25, 2022. Retrieved August 17, 2020.
- ^ a b "MIPS ABI History". Archived from the original on August 26, 2018.
- ^ Eric Christopher (June 11, 2003). "mips eabi documentation". binutils@sources.redhat.com (Mailing list). Archived from the original on May 7, 2020. Retrieved June 19, 2020.
- ^ "NUBI". Archived from the original on July 29, 2021. Retrieved August 17, 2020.
- ^ Karen Miller (2006). "The MIPS Register Usage Conventions". Archived from the original on October 25, 2020.
- ^ Hal Perkins (2006). "MIPS Calling Convention" (PDF). Archived (PDF) from the original on September 30, 2020.
- ^ MIPSpro N32 ABI Handbook (PDF). Silicon Graphics. Archived from the original (PDF) on December 17, 2021. Retrieved August 17, 2020.
- ^ "PIC code – LinuxMIPS". www.linux-mips.org. Archived from the original on September 21, 2018. Retrieved September 21, 2018.
- ^ "System V Application Binary Interface MIPS RISC Processor Supplement, 3rd Edition" (PDF). pp. 3–12. Archived (PDF) from the original on November 12, 2020. Retrieved August 17, 2020.
- ^ Rubio, Victor P. "A FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education" (PDF). New Mexico State University. Archived (PDF) from the original on April 15, 2012. Retrieved December 22, 2011.
- ^ "OVP: Fast Simulation, Free Open Source Models. Virtual Platforms for software development". Ovpworld.org. Archived from the original on June 8, 2012. Retrieved May 30, 2012.
- ^ "Imperas". Imperas. March 3, 2008. Archived from the original on June 14, 2012. Retrieved May 30, 2012.
- ^ "EduMIPS64". Edumips.org. Archived from the original on May 7, 2012. Retrieved May 30, 2012.
- ^ "MARS MIPS simulator - Missouri State University". Courses.missouristate.edu. Archived from the original on May 2, 2012. Retrieved May 30, 2012.
- ^ "WebMIPS - MIPS CPU PIPLINED SIMULATION On Line". Archived from the original on December 31, 2012. Retrieved January 13, 2012. (online demonstration) "Archived copy". Archived from the original on October 10, 2011. Retrieved January 13, 2012.
{{cite web}}: CS1 maint: archived copy as title (link) (source) - ^ QtMips - MIPS CPU simulator for education purposes on GitHub
- ^ Kočí, Karel (2018). Graphical CPU Simulator with Cache Visualization (PDF) (MSc). Czech Technical University in Prague. Archived (PDF) from the original on November 19, 2020. Retrieved January 25, 2021.
- ^ Gizopoulos, Dimitris (December 6, 2020). "The basics of QtMips-v3" (PDF). National and Kapodistrian University of Athens. Retrieved January 25, 2021.[dead link]
- ^ Camarmas-Alonso, Diego; Garcia-Carballeira, Felix; Del-Pozo-Punal, Elias; Mateos, Alejandro Calderon (May 29, 2024). "CREATOR: An Educational Integrated Development Environment for RISC-V Programming". IEEE Access. 12: 127702–127717. doi:10.1109/ACCESS.2024.3406935. ISSN 2169-3536.
- ^ "CREATOR: Simulador didáctico y genérico para la programación en ensamblador" (in Spanish). July 23, 2021. Archived from the original on September 29, 2021. Retrieved September 29, 2021.
- ^ Camarmas-Alonso, Diego; Garcia-Carballeira, Felix; Del-Pozo-Punal, Elias; Mateos, Alejandro Calderon (August 2, 2022). A new generic simulator for the teaching of assembly programming. 2021 XLVII Latin American Computing Conference (CLEI) (in Spanish). pp. 1–9. doi:10.1109/CLEI53233.2021.9640144. ISBN 978-1-6654-9503-5. S2CID 245387555. Retrieved August 2, 2022.
- ^ "CREATOR Web with MIPS32 example". Archived from the original on September 29, 2021.
- ^ CREATOR source code on GitHub
Further reading
[edit]- Farquhar, Erin; Philip Bunce (1994). MIPS Programmer's Handbook. Morgan Kaufmann Publishers. ISBN 1-55860-297-6.
- Patterson, David A; John L. Hennessy (2004). Computer Organization and Design: The Hardware/Software Interface. Morgan Kaufmann Publishers. ISBN 1-55860-604-1.
- Sweetman, Dominic (1999). See MIPS Run. Morgan Kaufmann Publishers. ISBN 1-55860-410-3.
- Sweetman, Dominic (2007). See MIPS Run, 2nd edition. Morgan Kaufmann Publishers. ISBN 978-0-12-088421-6.
External links
[edit]- MIPS Processors Archived May 11, 2022, at the Wayback Machine
- MIPS Architecture history diagram at the Wayback Machine (archived 2013-05-30)
- Online MIPS emulator Archived March 5, 2022, at the Wayback Machine
- MIPS Instructions - MIPS Instruction Set Archived April 7, 2022, at the Wayback Machine
MIPS architecture
View on GrokipediaHistory
Origins and Early Development
The MIPS architecture originated as a research project at Stanford University's Computer Systems Laboratory in 1981, led by John L. Hennessy along with collaborators including Norman Jouppi, Forest Baskett, and John Gill.[8] The initiative emerged in response to contemporaneous efforts in reduced instruction set computing (RISC), such as the University of California, Berkeley's RISC-I project and IBM's 801 minicomputer, aiming to explore innovative microprocessor designs through VLSI technology.[9] Funded by the Defense Advanced Research Projects Agency (DARPA), the project began as a special graduate course, emphasizing hands-on design and implementation to advance academic understanding of RISC principles.[10] The first prototype of the MIPS processor was realized in 1983 through custom VLSI chips, marking a significant milestone in demonstrating practical RISC hardware.[9] This implementation included working silicon components, such as the 1MIPS chip—a monolithic nMOS design—that integrated the core architecture on a single chip, capable of basic program execution and eventually supporting a prototype system for running Unix.[11] The effort built directly on the 1981 designs, transitioning from simulation and partial fabrication to a functional prototype that validated the architecture's feasibility in silicon. Central to the MIPS design were goals of simplicity, efficient pipelining without hardware interlocks, and a fixed 32-bit instruction length to optimize for VLSI constraints and performance.[8] Simplicity was pursued by minimizing hardware complexity and instruction variety, delegating dependency resolution to software schedulers rather than interlocks, which allowed a five-stage pipeline to operate at high clock speeds without stalls.[12] The uniform instruction format streamlined decoding and execution, enabling all operations to complete in one memory cycle and facilitating easier code generation and optimization. Initially, the project focused on educational applications through the graduate course and on empirically proving the viability of RISC concepts, such as achieving high performance via streamlined instructions and pipelining over complex CISC alternatives.[10] By demonstrating that a simple architecture could outperform contemporary systems in benchmarks without intricate hardware, MIPS contributed foundational evidence to the RISC paradigm's adoption in academia.[8] This research laid the groundwork for subsequent commercialization efforts in the mid-1980s.[13]Commercialization and Key Milestones
In 1984, John Hennessy, along with John Moussouris and others from the Stanford MIPS research project, founded MIPS Computer Systems Inc. during Hennessy's sabbatical from Stanford University to commercialize the RISC-based MIPS architecture.[14][15] The company aimed to produce high-performance microprocessors for workstations and embedded systems, marking the shift from academic prototyping to industrial production.[16] The first major milestone came with the announcement of the R2000, the inaugural commercial MIPS I processor, in 1985, followed by its release in 1986 as a 32-bit RISC chip running at up to 8 MHz.[17][18] This processor was paired with the optional R2010 floating-point coprocessor, which handled IEEE 754-compliant single- and double-precision arithmetic, enabling efficient scientific computing applications. In 1988, MIPS released the R3000, an enhanced second-generation processor with integrated memory management and higher clock speeds up to 40 MHz, significantly boosting performance for multitasking environments.[19] The R3000 also featured the R3010 floating-point unit, further solidifying MIPS's role in high-performance computing.[17] Early adoption accelerated through key partnerships and product integrations in the late 1980s. Silicon Graphics Incorporated (SGI) became one of the first adopters in 1987, incorporating MIPS RISC chips into its Iris workstation series to power advanced 3D graphics rendering, which helped establish MIPS in the professional visualization market.[20] Similarly, Sony introduced the NEWS (Network Engineering Workstation) line with MIPS support, notably the NWS-3860 model in 1989 equipped with the R3000 processor, targeting engineering and networking applications in Japan.[21] These developments propelled MIPS processors into over a million units shipped by the early 1990s, underscoring their commercial viability in workstations.[17]Ownership Changes and Decline
In 1992, Silicon Graphics Inc. (SGI) acquired MIPS Computer Systems in a stock swap transaction valued at approximately $333 million, integrating the processor designer closely with SGI's workstation and graphics hardware ecosystem.[22] This move solidified MIPS as the primary supplier of reduced instruction set computing (RISC) processors for SGI's products, enhancing its commercial viability amid growing demand for high-performance computing.[23] By 1998, amid SGI's strategic shifts toward broader processor compatibility, the company spun off MIPS Technologies as an independent entity through an initial public offering that raised over $70 million, with SGI retaining an 85% ownership stake initially before further divestitures.[24] This separation allowed MIPS Technologies to pursue licensing deals more autonomously, expanding its IP portfolio beyond SGI's needs.[25] MIPS Technologies operated independently for two decades, licensing its architecture to various semiconductor firms, until June 2018 when it was acquired by Wave Computing, an AI-focused startup aiming to leverage MIPS IP for dataflow processing in neural networks.[26] The acquisition positioned MIPS as a subsidiary to support Wave's vision of a unified platform for AI workloads from data centers to edge devices.[27] However, Wave Computing encountered financial difficulties, filing for Chapter 11 bankruptcy protection in April 2020 amid disputes with investors and operational challenges.[28] Following a court-supervised auction, the reorganized entity emerged from bankruptcy in March 2021 under new ownership led by Tallwood Venture Capital, with MIPS Technologies retaining its core assets but undergoing significant restructuring.[29] As part of the 2021 emergence, MIPS announced the cessation of further development on the proprietary MIPS instruction set architecture (ISA), marking the end of new core designs based on it, and pivoted to the open-source RISC-V ISA to align with industry trends toward modular, royalty-free processor IP.[30] This transition reflected broader market pressures, including competition from Arm and RISC-V adopters, and allowed MIPS to focus resources on extensible, collaborative architectures suitable for AI and embedded applications.[31] Legacy MIPS support continued for existing licensees, ensuring compatibility for deployed systems in networking, consumer electronics, and industrial uses, but no proprietary MIPS innovations were pursued thereafter.[32] In January 2024, MIPS unveiled a corporate rebranding at CES, emphasizing a strategic focus on providing "freedom to innovate compute" through customizable RISC-V-based IP for automotive, data center, and embedded markets, while maintaining support for legacy MIPS deployments.[33] Building on this, by March 2025, MIPS shifted further toward AI-enabled robotics and physical AI platforms, launching the Atlas product suite of compute subsystems designed for real-time sensing, decision-making, and actuation in autonomous edge devices like industrial robots and self-driving vehicles.[34] These RISC-V-derived chips prioritize low-latency AI inference without introducing new MIPS cores, underscoring the company's commitment to open ecosystems while sustaining revenue from historical MIPS licenses.[35] In July 2025, GlobalFoundries announced its acquisition of MIPS to accelerate AI and compute capabilities through expanded IP offerings, with the transaction completed in August 2025. MIPS continues to operate as a standalone business unit within GlobalFoundries, serving existing customers and advancing RISC-V solutions for edge AI and embedded systems.[36][37]Architectural Principles
RISC Fundamentals
The Reduced Instruction Set Computer (RISC) philosophy emphasizes a streamlined instruction set architecture (ISA) consisting of a small number of simple, orthogonal instructions designed to execute in a single clock cycle, thereby facilitating efficient pipelining and hardware optimization.[38] This approach contrasts with Complex Instruction Set Computing (CISC) by minimizing instruction complexity and variability, allowing processors to focus on high-speed execution rather than handling multifaceted operations in hardware.[39] Orthogonality ensures that instructions operate independently on registers without unintended side effects, promoting predictability and ease of implementation.[40] The RISC concept emerged from pioneering research projects in the late 1970s and early 1980s, including IBM's 801 minicomputer developed by John Cocke, which demonstrated the viability of simplified instructions for faster processing.[38] This work influenced the Berkeley RISC project at the University of California, led by David Patterson and Carlo Séquin, which produced the RISC I and II prototypes emphasizing load-store architectures and pipelining under DARPA funding.[41] Similarly, the Stanford MIPS project, initiated by John Hennessy in 1981, built on these foundations to create a VLSI-implementable RISC processor, further popularizing the paradigm through its focus on academic and commercial viability.[1] These efforts collectively validated RISC as a response to the limitations of CISC designs in achieving higher performance with advancing semiconductor technology.[42] MIPS architecture adheres strictly to RISC principles through its use of fixed-length 32-bit instructions, which simplify decoding and fetching in the pipeline.[5] It employs a three-operand format for arithmetic and logical operations, such as addition (e.g.,add $d, $s, $t), enabling direct register-to-register computations without implicit operands or memory involvement.[43] Additionally, MIPS minimizes hardware interlocks by relying on compiler scheduling to resolve data dependencies, as reflected in its full name: Microprocessor without Interlocked Pipeline Stages, which reduces complexity and die area.[44]
These RISC tenets in MIPS yield significant benefits over CISC, including higher clock speeds due to simpler control logic and shorter critical paths in the datapath.[45] Compilers can more readily optimize code for pipelined execution, as the uniform instruction structure allows straightforward instruction scheduling and register allocation.[39] Furthermore, the reduced hardware demands contribute to lower power consumption, making MIPS suitable for embedded systems and battery-powered devices.[46]
Load-Store and Pipeline Design
The MIPS architecture employs a load-store model, in which memory access is restricted to dedicated load and store instructions, while all arithmetic, logical, and other computational operations are performed exclusively on values held in the processor's registers.[47] This design simplifies the hardware by separating memory operations from computation, enabling more efficient pipelining and reducing the complexity of instruction decoding. As a result, programmers must explicitly manage data movement between memory and registers using instructions like lw (load word) and sw (store word), fostering a clear distinction between data processing and storage.[47] Central to MIPS execution is a classic five-stage pipeline that overlaps instruction processing to improve throughput, consisting of instruction fetch (IF), instruction decode and register fetch (ID), execution (EX), memory access (MEM), and write-back (WB). In the IF stage, the instruction is retrieved from memory; ID decodes it and reads source registers; EX performs ALU operations or computes addresses; MEM handles load/store data transfer if applicable; and WB writes results back to the register file. This balanced pipeline assumes each stage takes one clock cycle, allowing up to five instructions to be in progress simultaneously under ideal conditions. MIPS implements a non-interlocked pipeline, meaning the hardware does not automatically stall or insert bubbles to resolve data hazards or control dependencies; instead, software is responsible for hazard mitigation through instruction reordering or explicit no-operation (NOP) insertions.[48] The architecture's name derives from "Microprocessor without Interlocked Pipelined Stages," emphasizing this software-centric approach to pipeline efficiency.[49] For branches and jumps, MIPS uses delay slots—single instructions immediately following the control transfer that are always executed, regardless of the branch outcome—to fill pipeline bubbles and maintain utilization without hardware prediction in the base design.[48] Load and store instructions in MIPS support a single addressing mode: register base plus a 16-bit signed offset, forming effective addresses within a ±32 KiB range from the base register value.[47] In the base MIPS32 configuration, virtual addresses are 32 bits wide, enabling a flat 4 GiB address space that is translated via a memory management unit (MMU) for protected access.[47] This restricted mode promotes regularity and compiler optimization by avoiding complex address calculations in hardware, aligning with broader RISC principles of simplicity.Core Instruction Set
Registers and Memory Model
The MIPS architecture features a register file consisting of 32 general-purpose registers (GPRs), numbered from $0 to $31, each 32 bits wide in the base MIPS I and II implementations.[50] These registers serve as the primary storage for operands in arithmetic and logical operations, with all computations performed within this register file under the load-store paradigm. Notably, register $0 is hardwired to always contain the value zero and cannot be modified by any instruction, providing a convenient constant for computations and addressing modes.[50] In addition to the GPRs, the MIPS ISA includes several special-purpose registers that manage program execution and specific operations. The Program Counter (PC) is a 32-bit register that holds the address of the current instruction, implicitly incremented by 4 bytes (one word) after each fetch in unbranched execution. For multiplication and division operations, results are stored in two dedicated coprocessor registers: HI (high-order 32 bits) and LO (low-order 32 bits), which are accessed via move instructions like mfhi and mflo rather than direct addressing. These HI and LO registers allow handling of 64-bit products and quotients from 32-bit integer operations without expanding the GPR file.[51] The memory model in MIPS is byte-addressable, enabling access to individual bytes, halfwords (16 bits), words (32 bits), or doublewords (64 bits in later variants, though base is 32-bit) at any aligned or unaligned address, with hardware support for unaligned loads and stores in some implementations. By default, MIPS employs big-endian byte ordering, where the most significant byte of a multi-byte datum is stored at the lowest address; however, implementations may support little-endian mode via configuration. Virtual memory is managed through a Translation Lookaside Buffer (TLB), a cache of page table entries that translates virtual to physical addresses, with software handling page faults and TLB misses via exception handlers. This model supports a flat 32-bit virtual address space, typically divided into user and kernel segments. Stack and frame management in MIPS relies on implicit conventions using dedicated GPRs rather than dedicated instructions for push and pop operations. Register $29, conventionally denoted sp to allocate space for local variables and parameters. Register $30, or $fp, acts as the frame pointer, preserving the base address of the current stack frame to facilitate access to arguments and locals relative to a fixed reference, particularly in nested calls. These conventions ensure efficient, software-managed stack operations without hardware enforcement.[51]Instruction Formats and Encoding
MIPS instructions are encoded as fixed-length 32-bit words, ensuring uniform decoding and facilitating pipelined execution.[49] The primary distinguishing feature is a 6-bit opcode field occupying bits 31 through 26, which selects the instruction class and operation.[49] This design supports three fundamental formats: R-type for arithmetic and logical operations between registers, I-type for instructions involving immediate values or memory accesses, and J-type for jump targets.[52] The R-type format is used for register-to-register operations and includes fields for two source registers, a destination register, a shift amount, and a function code.[53] Specifically, it comprises the 6-bit opcode (bits 31-26, typically 000000), 5-bit rs (source register, bits 25-21), 5-bit rt (second source or temporary register, bits 20-16), 5-bit rd (destination register, bits 15-11), 5-bit shamt (shift amount, bits 10-6), and 6-bit funct (function specifier, bits 5-0).[53] The funct field differentiates operations when the opcode is zero, allowing up to 64 distinct instructions within this format.[53] For example, the ADD instruction, which adds the contents of two registers and stores the result in a third, uses the R-type format with opcode 000000 and funct 100000 (decimal 32).[54] A binary encoding for ADD rs, $rt might appear as:000000 ss sss rtt tt ddd dd 00000 100000
000000 ss sss rtt tt ddd dd 00000 100000
100011 ss sss rtt tt iii iiii iiii iiii
100011 ss sss rtt tt iii iiii iiii iiii
Fundamental Instructions
The fundamental instructions in the MIPS architecture form the core of its reduced instruction set computing (RISC) design, emphasizing simple, fixed-length operations on registers and memory. These instructions handle basic integer arithmetic, data movement between registers and memory, and program control flow through branches and jumps, all encoded in 32-bit words as detailed in the base MIPS I instruction set.[58][59] Arithmetic instructions perform operations on 32-bit integer values stored in the 32 general-purpose registers, producing results in a destination register without direct memory access. The ADD instruction computes the sum of two source registers and stores it in the destination, treating operands as signed integers and generating an exception on arithmetic overflow (e.g.,add $d, $s, $t sets s + d, t).[](https://www.cs.kzoo.edu/cs230/Resources/MIPS/SummaryFinal.html) Similarly, SUB subtracts signed [integer](/page/Integer)s with overflow [trapping](/page/Trapping) (sub s, d = t), while SUBU handles unsigned subtraction without trapping.[58][60] Logical operations include AND, which performs bitwise AND (and $d, $s, $t sets s & d, t sets $d = $s | $t).[](https://www.cs.kzoo.edu/cs230/Resources/MIPS/SummaryFinal.html) The SLT instruction sets the destination to 1 if the first source is less than the second ([signed comparison](/page/Comparison)), otherwise 0 (slt s, $t`), with SLTU providing an unsigned version.[58] These operations support efficient computation in pipelined processors by avoiding complex addressing modes.
Load and store instructions enable data transfer in the load-store architecture, where only these operations access memory, using a base register plus a 16-bit signed offset for addressing. The LW instruction loads a 32-bit word from memory into a register (lw $t, offset($s) loads from address t, offset(t, offset(t, offset($s)`); an unsigned variant LHU exists for halfword loads without sign extension.[61] These instructions align accesses to natural boundaries (multiples of 2 for halfwords, 4 for words) to optimize performance in the memory model.[62]
Branch and jump instructions manage control flow, with conditional branches comparing two registers and unconditional jumps using absolute or register-based targets. The BEQ instruction branches to a 16-bit offset target if the two source registers are equal (beq $s, $t, offset), while BNE branches if they are not equal (bne $s, $t, offset).[63] Unconditional jumps include J, which targets a 26-bit absolute address shifted left by 2 (j target), and JR, which jumps to the address in a register (jr $s).[63] All branch and jump instructions include a delay slot: the instruction immediately following is always executed before the control transfer, regardless of whether the branch is taken, to mitigate pipeline hazards in early MIPS implementations.[64][65]
Pseudoinstructions provide assembler conveniences not directly implemented in hardware, expanding usability without altering the core ISA. For example, LI loads a 16-bit immediate value into a register (li $t, imm), which the assembler translates to a single ORI instruction if the value fits in the lower 16 bits (e.g., ori $t, $zero, imm, since $zero is always 0), or to a combination of LUI (load upper immediate) and ORI for larger constants.[66][67] This allows compilers to generate efficient code for constants without dedicated immediate arithmetic beyond existing formats.[68]
ISA Evolution
MIPS I and II
MIPS I, introduced in 1985 as the foundational 32-bit reduced instruction set computer (RISC) architecture with the release of the R2000 microprocessor, emphasized simplicity and pipelining efficiency through a load-store model featuring 32 general-purpose registers. Integer multiply and divide operations were not integrated directly into the core execution pipeline; instead, they relied on dedicated multi-cycle instructions that deposited results into special HI and LO registers, necessitating additional moves and interlocks for use in general computations. Exception handling, including traps, was managed entirely through software emulation using Coprocessor 0 (CP0) registers for status, cause, and control information, without hardware-accelerated trapping mechanisms. This base ISA lacked native support for unaligned memory accesses, causing standard load and store instructions to generate exceptions on misaligned addresses, thereby enforcing strict alignment for performance and simplicity.[69][47][49] MIPS II, released in 1990 alongside the R6000 microprocessor targeted at high-performance computing, extended the MIPS I ISA with targeted enhancements to boost computational efficiency and concurrency support while ensuring full backward compatibility for existing MIPS I binaries. Key additions included MUL and DIV instructions that performed integer multiplication and division directly into general-purpose registers, bypassing the HI/LO mechanism for faster single-cycle or reduced-latency operations in many implementations. Additions to the floating-point coprocessor (CP1) included instructions such as square root (SQRT) and conversion operations (e.g., CEIL.W, FLOOR.W, ROUND.W, TRUNC.W). Coprocessor 2 support was added as an optional implementation-specific feature. The load-linked (LL) and store-conditional (SC) instruction pair provided hardware primitives for atomic read-modify-write operations, enabling reliable synchronization in multiprocessor environments without complex locking software.[69][70][49] These early MIPS ISAs found widespread adoption in pioneering applications, powering initial generations of UNIX workstations from companies like Silicon Graphics (SGI) for graphics-intensive tasks and serving as the foundation for embedded systems in networking and scientific instruments due to their clean design and performance per transistor. The backward compatibility of MIPS II allowed seamless migration of software from MIPS I deployments, facilitating broader ecosystem growth in both workstation and nascent embedded markets during the late 1980s and early 1990s. Despite their innovations, both versions retained the unaligned access limitation, requiring programmers to handle alignment explicitly or use specialized partial-load/store instructions for edge cases.[71][17]MIPS III to V
MIPS III, introduced in 1991 with the R4000 microprocessor, represented the first 64-bit extension of the MIPS architecture, expanding the general-purpose registers (GPRs) from 32 bits to 64 bits to support larger integer operations and addressing spaces.[72] This version added dedicated instructions for 64-bit arithmetic, such as DADD for doubleword addition, which performs signed 64-bit addition on GPR contents and stores the result in a destination register, along with corresponding shift and multiply instructions to handle the extended data width.[73] Additionally, MIPS III enabled 64-bit virtual addressing, allowing access to vastly larger memory spaces compared to prior 32-bit iterations, while maintaining backward compatibility with MIPS I and II through a processor mode that restricts execution to 32-bit instructions.[49] A key feature of MIPS III was its support for dynamic mode switching between 32-bit and 64-bit operation via the Status register in the coprocessor 0 (CP0) control unit, specifically using the FR bit to enable or disable 64-bit floating-point registers (FPRs) while the integer registers remained 64-bit capable.[74] This flexibility allowed software to operate in either mode without hardware reconfiguration, facilitating gradual adoption of 64-bit features. MIPS III implementations, such as the R4000, were prominently used in high-performance workstations from Silicon Graphics Inc. (SGI), where the mode-switching capability supported mixed 32/64-bit applications in graphics and scientific computing environments.[75] MIPS IV, released in 1994 with the R8000 processor, built upon MIPS III by introducing instructions to enhance instruction-level parallelism and reduce branch-related penalties.[76] Notable additions included the PREF (prefetch) instruction, which hints to the memory system to load data into the cache without altering architectural state, thereby improving data access latency in pipelined executions.[49] MIPS IV also added conditional move instructions like MOVN (move non-zero) and MOVZ (move zero), which transfer a value from one GPR to another only if a condition on a third register is met, enabling more efficient control flow without branches.[77] MIPS V, announced in 1996 and implemented starting around 1997, further refined the 64-bit architecture with enhancements to the floating-point unit (FPU), including additional paired-single precision operations for better vector processing efficiency. These FPU improvements supported more precise and faster computations for multimedia and scientific applications. MIPS V also laid the groundwork for integrating MDMX (MIPS Digital Media Extension), an SIMD instruction set that leverages the 64-bit registers for parallel integer and fixed-point operations in media processing, though MDMX was implemented as a separate but compatible extension.[78]MIPS32, MIPS64, and microMIPS
The MIPS32 and MIPS64 architectures, formalized in Release 1 in 2001, established standardized 32-bit and 64-bit instruction set architectures (ISAs) building on earlier MIPS versions, with compatibility modes to support legacy software. These releases introduced application-specific profiles to guide implementations, such as the 4Kc profile optimized for low-power embedded systems with features like conditional moves and hardware multiply-accumulate units. Additionally, Release 1 added synchronization instructions, including SYNC and variants like SYNCI, to manage memory ordering and coherence in multiprocessor configurations, ensuring reliable data visibility across cores.[79][80] MIPS32/MIPS64 Release 2, introduced in 2002, expanded exception handling and added new instructions such as count leading zeros (CLZ) and population count (POP), along with enhancements to multiply and divide operations for better performance. This release also made the MDMX (MaDiX) extension optional, allowing implementations to include vectorized multimedia instructions for improved SIMD performance in compatible processors while maintaining core ISA consistency. Further enhancements included support for 64-bit floating-point units in MIPS32 implementations and refined floating-point register models for better compatibility between 32-bit and 64-bit modes.[81][82] Release 6 of MIPS32 and MIPS64, ratified in 2014, focused on modern system requirements with security enhancements like hardware-assisted virtualization through the Virtualization (VZ) module, enabling secure multi-domain partitioning for isolation in embedded and networking applications. It also introduced the nanoMIPS variant, a highly compressed ISA with 16-, 32-, and 48-bit instructions targeted at ultra-low-power microcontrollers, offering further reductions in code size and energy consumption while remaining compatible with the baseline architecture. Other updates streamlined the ISA by removing deprecated features like MIPS16e in favor of more efficient alternatives. No further releases beyond Release 6 have been issued, and as of the early 2020s, active development of the MIPS ISA has ceased in favor of other architectures like RISC-V.[44][83] Introduced in 2010 as part of the MIPS32 Release 3 ecosystem, microMIPS employs a mixed-length encoding scheme combining 16-bit and 32-bit instructions to enhance code density in resource-constrained environments, achieving at least 30% smaller binaries compared to standard MIPS32 while delivering equivalent performance through recoded common operations like loads, branches, and arithmetic. This architecture maintains full compatibility with the MIPS32 ISA via interlinking mechanisms, allowing seamless mixing of compressed and uncompressed code, and supports profiling for embedded devices such as microcontrollers and IoT nodes. MicroMIPS prioritizes frequent instruction patterns for compression, reducing instruction cache pressure and power usage without sacrificing the load-store RISC principles.[84][85]Extensions
Embedded and Compressed Variants
The MIPS16 instruction set architecture (ISA), developed in the late 1990s as an application-specific extension (ASE) to the base MIPS ISA, employs 16-bit instruction encodings to achieve significant code density improvements for memory-constrained embedded systems.[86] This subset supports a reduced set of operations, including loads, stores, arithmetic, branches, and jumps, often using only eight of the 32 general-purpose registers to fit the compact format, while allowing seamless switching to full 32-bit MIPS instructions via specific opcodes like JALX.[86] In practice, MIPS16 enables up to 40% reduction in code size compared to standard MIPS32 code for typical embedded workloads, making it suitable for microcontrollers where program memory is limited.[86] Building on MIPS16, the microMIPS ISA, introduced in the late 2000s, combines 16-bit and 32-bit instructions in a mixed-length format to further optimize code size while preserving near-full MIPS32 performance.[87] This extension allows frequent use of compact 16-bit encodings for common instructions like register-register moves and immediate loads, interspersed with 32-bit instructions for more complex operations, resulting in approximately 30-35% smaller code footprints without requiring recompilation of existing MIPS32 binaries—though source-level recompilation maximizes benefits.[87] MicroMIPS also incorporates dedicated 16-bit break instructions to facilitate debugging in embedded environments, enabling precise breakpoints with minimal instruction replacement overhead.[84] In MIPS Release 6 (2014), MIPS16 was deprecated in favor of microMIPS as the preferred compression solution.[44] The MIPS MCU ASE, tailored for microcontroller applications in the 2000s, extends the MIPS32 ISA with features optimized for low-end embedded devices, including efficient handling of 8- and 16-bit peripherals.[88] It introduces instructions for direct manipulation of memory-mapped I/O registers and supports fast interrupt handling through reduced latency mechanisms, such as shadow register sets that allow context switching in as few as three cycles.[88] This makes MIPS MCU particularly effective for real-time control tasks in cost-sensitive systems like automotive and consumer electronics.[88] Across these variants, the primary trade-off is a modest performance penalty—typically 2-10% slower execution due to denser packing and mode-switching overhead—in exchange for substantially reduced memory usage, which lowers overall system cost in embedded deployments.[86][87]Multimedia and DSP Extensions
The MIPS architecture incorporates several application-specific extensions (ASEs) designed to accelerate multimedia and digital signal processing (DSP) workloads, particularly in embedded systems where efficient vector and media operations are essential. Several of these ASEs, including MDMX and MIPS-3D, were removed in MIPS Release 6 (2014), though legacy support persists in older implementations.[44] These extensions build upon the core floating-point unit (FPU) to enable parallel processing of pixel data, audio samples, and geometric computations without significantly increasing hardware complexity.[89] Key examples include the MDMX, MIPS-3D, and MIPS SIMD Architecture (MSA), each targeting specific aspects of media acceleration.[88] MDMX, introduced in 1996 as the MIPS Digital Media Extension, provides SIMD-like capabilities for 64-bit multimedia processing using the existing 64-bit FPU registers and a dedicated 192-bit accumulator.[90] It supports vector operations on small integers (8-, 16-, and 32-bit elements) for tasks such as video encoding, audio filtering, and image manipulation, adding instructions like vector adds, multiplies, and shuffles while maintaining backward compatibility with MIPS IV.[90] This extension was particularly suited for early multimedia applications in workstations and set-top boxes, offering up to 2x performance gains in pixel processing routines compared to scalar FPU code.[91] MIPS-3D, announced in 1999, extends the MIPS V architecture with 13 specialized instructions focused on 3D graphics acceleration, emphasizing geometry transformations like vector dot products, reciprocals, and cross products using paired-single floating-point formats. These operations build directly on the FPU's paired-single data type to reduce cycles for vertex processing in rendering pipelines, achieving up to 4x speedup in matrix multiplications for 3D scenes.[88] Targeted at graphics-intensive embedded devices such as gaming consoles and CAD systems, MIPS-3D enabled silicon-efficient implementations without requiring dedicated graphics hardware.[92] The MIPS SIMD Architecture (MSA), introduced in 2012 as part of MIPS32/64 Release 5, delivers comprehensive 128-bit SIMD support with 32 vector registers shared with the FPU, handling up to 16 elements per instruction across integer (8- to 64-bit), fixed-point (16- and 32-bit), and floating-point (32- and 64-bit) data types.[93] Featuring over 150 instructions for arithmetic, logical, permutation, and conversion operations, MSA supports advanced DSP algorithms like FFTs for audio and complex codecs such as H.264 for video decoding.[89] In embedded applications, it accelerates graphics rendering and signal processing, providing 4-8x efficiency improvements in multimedia pipelines on devices like smartphones and digital TVs.[89]Virtualization and Multithreading Features
Deprecations and Legacy
In MIPS Release 6 (2014), several extensions like SmartMIPS were deprecated to streamline the ISA. Following MIPS Technologies' challenges, Wave Computing (which acquired MIPS) filed for bankruptcy in 2023, with its IP acquired by CEVA in 2024. As of November 2025, these features maintain legacy support in embedded systems, particularly in networking and automotive sectors.[44] The MIPS Virtualization Module, introduced as part of MIPS32/64 Release 5 in 2012, enables efficient support for hypervisors by partitioning the processor into root and guest contexts. In root mode, the hypervisor operates with full privileges, managing guest configurations and resources, while guest modes (user, kernel, and supervisor) provide isolated execution environments with restricted access to sensitive instructions and registers. This separation ensures that guest operating systems run without modifications, leveraging hardware-assisted virtualization to handle context switches and resource allocation transparently.[94] A key feature of the module is its two-level memory management unit (MMU) approach, which uses guest and root translation lookaside buffers (TLBs) to achieve isolation similar to shadow paging mechanisms. The guest TLB maps virtual addresses to guest physical addresses, while the root TLB further translates to system physical addresses, preventing guests from accessing unauthorized memory. Guest IDs or address space identifiers (ASIDs) tag TLB entries to avoid flushes during context switches, reducing overhead in multi-guest scenarios. This design, detailed in the MIPS Architecture for Programmers Volume IV-i, supports EPT-like efficiency without requiring guest OS awareness of the hypervisor.[94][95] The MIPS Multi-Threading (MT) Application Specific Extension (ASE), added to MIPS32 Release 2 in 2005, facilitates hardware-level parallelism by supporting up to four hardware threads per core through virtual processing elements (VPEs) and thread contexts (TCs). Each VPE can manage multiple TCs, enabling fine-grained multithreading where threads share core resources but maintain independent register states and program counters, improving utilization in latency-bound workloads like networking and multimedia processing. Implementations such as the MIPS 34K core demonstrated this with 2 to 4 threads, reducing context-switch penalties via hardware scheduling.[96][97] Synchronization in the MT ASE relies on instructions like FORK, which allocates and initializes a new thread context, and YIELD, which blocks the current thread until resources are available, allowing cooperative or OS-managed scheduling. Additional primitives, such as WAIT and DMT, provide barriers for thread synchronization and disable multithreading temporarily, ensuring ordered execution across threads without software polling overhead. These features, available in user and kernel modes, enhance parallel execution in embedded systems while maintaining MIPS's load/store architecture.[98][99] SmartMIPS, an ASE introduced in 2002 for MIPS32, adds instructions optimized for embedded operating systems by simplifying cache and memory management tasks. Instructions like PREF (prefetch) and CACHE operations (e.g., for invalidation and locking) allow software to control data placement and eviction directly, reducing interrupt latency and power consumption in resource-constrained environments. For instance, CACHE Index Store Tag can lock cache lines for real-time predictability, while PREF hints anticipate data needs to minimize misses. This extension targets OS kernels in devices like set-top boxes, where manual cache control improves efficiency without hardware changes.[79][44] Security in these extensions emphasizes isolation for virtualization and multithreading. The Virtualization Module enforces root privileges, where only the hypervisor in root kernel mode can access guest registers or modify TLB entries, trapping unauthorized guest attempts via privileged sensitive instruction exceptions. TLB isolation prevents cross-guest interference by segregating entries, and unmapped memory regions limit guest access to shared hardware. In multithreading, TC-specific controls like dirty bits and privilege checks ensure threads cannot escalate access, supporting secure parallel execution in trusted environments. These mechanisms collectively enable robust hypervisor deployment and thread safety without compromising the base ISA's simplicity.[94][100]Implementations
Processor Families
The IDT R3000 family represents one of the earliest commercial implementations of the MIPS architecture, featuring 32-bit processors based on the MIPS I instruction set. These chips, such as the R3000A, integrated the CPU core with options for coprocessor interfaces and operated at clock speeds ranging from 16.7 MHz to 33 MHz, delivering sustained performance up to 28 MIPS.[101] The family emphasized simplicity and pipeline efficiency, with separate instruction and data caches typically configured at 4 KB each in external memory controllers.[102] MIPS Technologies, in collaboration with Silicon Graphics (SGI), developed the R4000 series as a pivotal advancement to 64-bit processing under the MIPS III instruction set. Introduced in 1991, the R4000 employed a superpipelined design with an internal clock double the external frequency, enabling operation up to 100 MHz while maintaining compatibility with prior 32-bit modes.[103] This family powered high-end workstations, prioritizing clock speed over superscalar execution for balanced throughput in graphics and scientific workloads.[104] Building on the R4000 lineage, the MIPS R10000, released in 1996, introduced superscalar capabilities to the 64-bit MIPS IV instruction set, fetching and decoding up to four instructions per cycle in an out-of-order execution model. Fabricated on a four-chip module, it supported clock speeds reaching 275 MHz, with on-chip 32 KB instruction and data caches, and addressed up to 1 TB of physical memory via a 40-bit address space.[105] The R10000's dynamic scheduling and speculative execution marked a shift toward higher instruction-level parallelism, achieving significant performance gains over its predecessors in compute-intensive environments.[106] Broadcom's BMIPS family comprises MIPS-compatible cores integrated into system-on-chip (SoC) designs primarily for embedded networking applications, supporting both MIPS32 and MIPS64 architectures. Licensing MIPS IP since 1998, Broadcom developed synthesizable cores like the 74K series, which exceeded 1 GHz at 40 nm process nodes, and later iterations such as the BRCM5000 delivering dual-issue execution at 1.3 GHz.[107] These processors emphasized low power and scalability, with multi-core configurations providing up to 10,000 Dhrystone MIPS in compact packages.[108] In China, the Loongson (also known as Godson) series from Loongson Technology has sustained MIPS-compatible implementations, evolving from MIPS I/III roots to MIPS64 under the MIPS32/64 licenses acquired in the early 2000s. Earlier models used MIPS64 under these licenses. The Loongson 3A5000, launched in 2021, features a quad-core design at 2.5 GHz on a 12 nm process, using the in-house LoongArch ISA designed for source-level compatibility with MIPS64 software via recompilation, while incorporating custom extensions for performance.[109] Post-2021 developments shifted toward the in-house LoongArch ISA, which preserves MIPS-like semantics for software portability but operates as an independent architecture cleared of direct MIPS derivation in legal rulings.[110] Following the 2021 cessation of new MIPS architecture development by MIPS Technologies in favor of RISC-V, no major vendor-initiated MIPS CPU designs have emerged, though legacy implementations persist in Internet of Things (IoT) devices and embedded systems reliant on established MIPS IP.[111] In August 2025, GlobalFoundries completed its acquisition of MIPS to integrate its RISC-V IP and tools, further solidifying the shift to open architectures without new MIPS designs.[37] This transition reflects broader industry momentum toward open standards, leaving MIPS as a mature but static foundation for ongoing maintenance in specialized hardware.[112]Industrial Applications
MIPS processors have found extensive application in networking equipment, particularly in routers and switches where efficient packet processing is essential. Companies like Cisco have integrated MIPS-based cores into their router architectures to support high-throughput data handling in enterprise and service provider environments.[113] Broadcom has also employed MIPS 4000-class processors in system-on-chips for network switches and broadband gateways, enabling scalable performance in data-intensive scenarios.[114] In consumer electronics, MIPS architecture powered iconic gaming consoles, including the Sony PlayStation (PS1) with its R3000A CPU operating at 33.8688 MHz for real-time game execution and the PlayStation 2 featuring the R5900 Emotion Engine for enhanced multimedia processing.[115][116] Laser printers represent another key consumer and office deployment, with Hewlett-Packard selecting the QED RM5271 64-bit MIPS processor at speeds up to 300 MHz for controller functions in its Color LaserJet series, optimizing print engine management and image processing.[117] Embedded systems leverage MIPS for reliability in demanding environments, such as automotive applications where the architecture supports advanced driver-assistance systems (ADAS) through low-latency data orchestration from multiple sensors.[118] In telecommunications, MIPS cores have been deployed in base stations and backhaul processors to handle protocol implementation and data transmission, as seen in infrastructure supporting LTE modems and network gateways.[119] As of 2025, legacy MIPS deployments persist in billions of embedded IoT devices worldwide, contributing to the estimated 21.1 billion connected IoT units, particularly in long-lifecycle sectors like networking and consumer hardware where upgrades are infrequent.[120][121] Following the 2021 Wave Computing bankruptcy and restructuring into MIPS, new MIPS IP designs have focused on RISC-V extensions for emerging markets, while ongoing support in China through Loongson processors maintained compatibility with legacy MIPS-based systems until their transition to the indigenous LoongArch architecture in 2021.[122][110]Software Support
Calling Conventions
The MIPS architecture employs distinct application binary interfaces (ABIs) to define calling conventions, which govern parameter passing, return value handling, register preservation, and stack management for function calls. These conventions vary by ABI variant, with O32 serving as the foundational 32-bit ABI derived from the System V convention, while N32 (ILP32 64-bit integers and pointers) and N64 (LP64) provide enhanced support for 64-bit operations and larger register sets for arguments. All ABIs designate specific registers for temporary use (t9), saved values (s7), and the return address (s0-$s7 across calls.[123][124] In the O32 ABI, the first four 32-bit integer or pointer arguments are passed in argument registers a3 (general-purpose registers 4–7). Any additional arguments are pushed onto the stack in right-to-left order, with the stack pointer aligned to an 8-byte boundary upon entry to the callee; however, a 16-byte alignment is often enforced for compatibility with floating-point operations. Single-word return values occupy v0 and f12 and f12 and fp (register 30) is optional, used only when necessary for dynamic stack access.[125][126][123] The N32 and N64 ABIs extend the O32 model for 64-bit compatibility, passing the first eight 64-bit integer or pointer arguments in a7 (registers 4–11), with subsequent arguments on the stack. Return values follow a similar pattern to O32 but operate at 64-bit width, using v1. Floating-point parameter passing is more generous: up to four 64-bit doubles or eight 32-bit singles fit in f20 (even indices for doubles), with overflow to the stack; this accommodates modern applications requiring intensive numerical computation. Both ABIs mandate 16-byte stack alignment to support aligned 64-bit and vector operations, and the optional frame pointer remains $fp. The primary distinction between N32 and N64 lies in pointer sizing—32-bit in N32 versus 64-bit in N64—though calling conventions are otherwise aligned for interoperability.[124][125][123] Handling of variadic functions (varargs) is consistent across ABIs: fixed parameters follow the standard register-based passing, but all variable arguments are allocated on the stack regardless of count, allowing the callee to access them via stack offsets without register shadowing. This approach ensures reliable access in functions like printf, with the stack frame including space for the register arguments if needed for varargs. Callees must adjust the stack pointer accordingly to maintain alignment during allocation.[125][126]Operating Systems and Toolchains
Several operating systems have been ported to the MIPS architecture, leveraging its RISC design for both general-purpose and embedded applications. Microsoft Windows NT supported MIPS processors in the 1990s and early 2000s, targeting workstations and embedded systems before discontinuation. The Linux kernel's MIPS port, initiated by Ralf Baechle in 1994, marked an early milestone in open-source support, enabling the OS to run on MIPS-based workstations and embedded devices.[127] This port has evolved to support a wide range of MIPS variants, including 32-bit and 64-bit modes, and remains maintained in the mainline kernel, with ongoing enhancements; patches for Rust language integration in kernel modules were submitted in 2024 but have not yet been merged as of November 2025.[128] Silicon Graphics' IRIX, a proprietary Unix variant, was specifically developed for MIPS processors starting in 1988, powering high-end workstations and servers until its discontinuation in 2006; it emphasized scalability for up to 512 CPUs and 1 TB of RAM in clustered environments.[129] FreeBSD provided experimental MIPS support from the late 1990s, achieving Tier 2 status in version 13.x, but dropped it entirely starting with FreeBSD 14.0 in 2023 due to limited maintainer resources and hardware availability.[130] For embedded systems lacking a memory management unit (MMU), no-MMU support for MIPS—originally developed under the uClinux project in the early 2000s—has been integrated into the mainline Linux kernel since 2006, targeting microcontroller-based devices without full virtual memory. This support facilitates resource-constrained applications, such as network routers and IoT devices, by adapting the kernel to MMU-less MIPS cores like those in the R3000 family. Other BSD derivatives and real-time OSes, like those from Wind River, have historically supported MIPS but see diminishing active development outside niche industrial uses. Toolchains for MIPS development are robust, anchored by the GNU Compiler Collection (GCC), which added initial MIPS backend support in the early 1990s alongside its expansion beyond x86.[131] GCC continues to handle MIPS32 and MIPS64 instruction sets, including options for bi-endian configurations and ABI variants like o32 and n64, enabling cross-compilation for diverse targets. The LLVM project maintains a MIPS backend, supporting code generation for MIPS I through Release 6, though as of 2025, it lacks a dedicated maintainer, leading to sporadic updates focused on legacy compatibility.[132] GNU Binutils provides essential assembler (as) and linker (ld) tools tailored for MIPS, with syntax handling for directives like .set mips64 and endian-specific relocations, ensuring seamless ELF object file processing across 32-bit and 64-bit modes.[133] MIPS's bi-endian nature—capable of big-endian or little-endian operation via configuration—poses porting challenges for operating systems and toolchains, as software must explicitly manage byte order to avoid data corruption in multi-byte structures like integers or network packets.[134] For instance, big-endian MIPS configurations, common in older SGI systems, can break assumptions in little-endian-optimized libraries for cryptography or multimedia, requiring conditional compilation or runtime swaps. Similarly, transitioning between 32-bit and 64-bit modes introduces ABI incompatibilities, such as pointer sizes and floating-point register usage, complicating binary compatibility and necessitating separate builds for modes like MIPS32 (o32 ABI) versus MIPS64 (n64 ABI).[135] As of November 2025, MIPS OS support remains active primarily for legacy and embedded systems, with Linux kernels up to version 6.17 providing full functionality for industrial and networking hardware, though new processor designs increasingly favor RISC-V.[136] FreeBSD's removal of MIPS underscores the architecture's niche status, limiting toolchain evolution to maintenance rather than innovation, while no-MMU support sustains use in cost-sensitive applications.Development Tools
Simulators and Emulators
Simulators and emulators for the MIPS architecture enable the execution of MIPS binaries and assembly code on non-MIPS hardware, facilitating software development, education, testing, and analysis without requiring physical processors. These tools range from full-system emulators that replicate entire MIPS-based environments, including operating systems and peripherals, to lightweight instruction-level simulators focused on assembly execution and debugging. They support various MIPS instruction set architectures (ISAs), primarily MIPS32 and MIPS64, and are essential for preserving legacy MIPS software while adapting to modern development workflows. QEMU is a widely used open-source full-system emulator that provides comprehensive support for MIPS processors, including 32-bit and 64-bit variants in both big-endian and little-endian configurations through executables such as qemu-system-mips, qemu-system-mipsel, qemu-system-mips64, and qemu-system-mips64el. It emulates complete MIPS systems, allowing users to boot operating systems like Linux or run firmware images, which is particularly valuable for cross-platform development and verification of MIPS-compatible software. QEMU's dynamic binary translation enables efficient execution, making it suitable for running complex workloads such as embedded applications or full OS instances on host machines with significantly higher performance. For educational purposes, SPIM serves as a self-contained simulator that executes MIPS32 assembly language programs compatible with the R2000 and R3000 processors, providing a simple environment for teaching computer architecture concepts without hardware dependencies. It directly interprets MIPS instructions, supports basic system calls for input/output operations, and includes features like exception handling to mimic real processor behavior. Complementing SPIM, MARS is an interactive development environment that integrates a MIPS32 assembler and runtime simulator with a graphical user interface, offering tools for editing, assembling, and stepping through code while supporting MIPS I and II instructions along with syscall emulation for simplified program testing. MARS is designed for classroom use, with features like data segment visualization and breakpoint support to aid in understanding memory management and instruction flow.[137][138][139] Architectural simulators like SimpleScalar enable performance modeling of MIPS-like systems by simulating processor pipelines, caches, and memory hierarchies, allowing researchers to evaluate design trade-offs without fabricating hardware. Based on a portable ISA (PISA) similar to MIPS I, SimpleScalar supports detailed cycle-accurate simulation of out-of-order execution and branch prediction, with tools for generating statistics on instruction throughput and energy consumption. The tool set includes compilers and linkers to produce executables for simulation, facilitating studies on architectural innovations such as improved cache coherence protocols.[140] These simulators and emulators find applications in software development for prototyping MIPS applications on x86 or ARM hosts, and in reverse engineering tasks such as analyzing legacy firmware or malware targeting MIPS devices, where QEMU's full-system capabilities allow extraction and execution of binaries in a controlled environment. By 2025, integration with RISC-V toolchains has become common in multi-architecture simulators like CPUlator, which supports both MIPS32 and RISC-V RV32 for comparative development and migration efforts between ISAs.[141]Debuggers and Assemblers
The GNU Assembler (gas), part of the GNU Binutils project, provides comprehensive support for assembling MIPS assembly code, utilizing a syntax that employs dollar signs for register names (e.g.,$1 for register 1 or $t0 for temporary register 0) and a three-operand format for instructions like add $1, $2, $3.[142] This syntax separates operands with commas without spaces and supports labels terminated by colons, facilitating straightforward MIPS program structure.[142] Gas includes MIPS-specific directives such as .word to allocate or initialize 32-bit words (e.g., .word 0x12345678), which is essential for defining constants or reserving memory in assembly files.[142]
Gas also accommodates MIPS architecture extensions through directives like .set mipsN (where N ranges from 0 to 5 or 32/64 for variants), allowing assemblers to target specific instruction set levels and enabling features such as 64-bit operations or floating-point instructions. Additionally, it handles pseudoinstructions via macro expansions, such as li $1, 42 (load immediate) which the assembler translates into underlying lui and ori instructions, simplifying code while ensuring compatibility with the core MIPS ISA.[143] Syntax in gas adheres to a MIPS-specific convention rather than AT&T or Intel-like variants typical of x86 assemblers, though it supports MIPSpro-compatible directives like .ent for entry points, .frame for stack frame descriptions, and .mask for register masks to aid debugging and unwinding.[144]
For debugging, the GNU Debugger (GDB) offers robust MIPS support, including source-level debugging of assembly code with commands tailored for MIPS targets, such as set mipsfpu to configure floating-point unit emulation (options: double, single, none, or auto).[145] GDB enables remote debugging over serial lines using the MIPS remote protocol, configurable via --target=mips-remote, which connects to embedded MIPS boards for real-time inspection of registers, memory, and execution flow.[146] This extends to JTAG-based remote debugging when paired with hardware interfaces like OpenOCD, allowing breakpoints, single-stepping, and trace capture on MIPS processors without halting the system entirely.
Commercial tools include Lauterbach's TRACE32 debugger, which provides advanced hardware trace capabilities for MIPS architectures, supporting on-chip and off-chip trace modules for non-intrusive debugging, performance analysis, and multi-core tracing across MIPS variants.[147] For legacy systems, Integrated Device Technology (IDT, now part of Renesas) offered development tools like the IDT 4640 MIPS RISC toolchain, incorporating assemblers and debuggers based on GNU components for board bring-up and software validation on older MIPS processors.[148] These tools emphasize hardware integration for embedded applications, contrasting with open-source options by providing vendor-specific optimizations and proprietary trace features.References
- https://wiki.alpinelinux.org/wiki/MIPS64/Known_Issues
