Arm Legv8 and Mips: Comparative Study: An "Introduction To Computer Architecture (Ecen 432) " Project Report by
Arm Legv8 and Mips: Comparative Study: An "Introduction To Computer Architecture (Ecen 432) " Project Report by
Submitted in partial fulfilment for the requirements of the ECEN 432 project to
Fall 2021
2
Abstract— Since out studies focus on Reduced Instruction Set MIPS and ARM both use the RISC architecture, which is a
Chip RISC architecture like MIPS and ARM, the target in areas load-store architecture, and since they use the same ISA, both
of research and design is to perform comparative studies that later models are quite similar. In comparison to ARM, MIPS has
on help in the optimization of such architectures based on the field more general-purpose registers. Although a few of these
and its usage. ARM, unlike the MIPS, has 16 registers only. It also registers have unique purposes, this effectively restricts the
has a higher throughput, and efficiency as they support 64-bit data
buses. The project will focus on the implementation of ARM
number of registers that the programmer has access to on a
LEGv8, a more down to earth subset implementation of the regular basis. MIPS also needs to employ additional instruction
ARMv8 – one of the top ARM architectures. The choice of ARM fields to define register operands, which reduces the flexibility
LEGv8 is based on its usage and definition in “Computer of the MIPS instructions. ARM, on the other hand, addresses
Organization and Design Book”. this problem by giving more bits to encode more alternatives,
resulting in more flexible addressing modes.
Keywords— ISA, architecture, MIPS, ARM, LEGv8, waveform.
ARM’s code is more efficient and denser since all of its
I. INTRODUCTION instructions may be conditionally executed, whereas MIPS only
allows conditional branches. Both MIPS and ARM
ISA is the inly way the user can interact with the hardware,
architectures implement conditional execution, but in slightly
and with it comes various different types of architectures that
different ways. MIPS evaluates conditional branches using the
compete to provide the best performance when it comes to
contents of the registers, whereas ARM employs the condition
processors and embedded systems.
field in addition to the four conational flags contained in the
CISC stands for Complex Instruction Set Computer. It was
CPSR. Furthermore, both MIPS and ARM employ a stack
invented by computer developers to create the job of the
pointer to manage the stack, therefore their stack
compiler simpler. Typically, this architecture implements over
implementations are identical. However, the MIPS architecture
a hundred instructions of variable byte count and complexity.
typically only has one stack, whereas the ARM architecture has
Because some of these instructions can modify data directly
several stacks, each of which must be started during system
from memory, they must be encoded with a big memory
startup and the list of differences and similarities can go on and
address. RISC stands for Reduced Instruction Set Computer;
on [3,4].
this architecture was created to address the weaknesses of the
With the impressive developments in the embedded
CICS architecture. RISC processors, unlike CISC cousins, use
microprocessors industry and especially in mobile
fixed-size instructions, making instruction decoding easier
development, the ARM architecture tops the field. ARM, or
[1,2].
"Advanced RISC Machine" was developed by Arm Ltd based
RISC as mentioned before is a microprocessor architecture
on an optimized RISC architecture. Smartphones, tablets,
that contain a small, highly optimized set of instructions instead
laptops, video game consoles, and desktop computers, as well
of the specialized set of instructions seen in other architectures.
as an increasing number of other smart devices, are all using
Compared to CISC, it is widely regarded as the most efficient
processors based on this architecture [5].
CPU architectural technology available today. A central
With a high performance, moderate price, low power
processing unit (CPU) that uses RISC can perform more with
consumption, and small size, it deserves its wide-spread
less time, which results in an improved performance. The
application and the 50 billion distributed and used licenses. The
ability to extend the register set and internal parallelism by
newer versions of the ARM architecture have a 64-bit addresses
raising the number of parallel threads performed by the CPU
and 32 registers [6-8]. One of the most famous and efficient
and improving the speed of the CPU's executing instructions is
ARM versions is the ARMv8. The ARM ISA in general is way
a fundamental RISC feature. Most RISC processors have the
much bigger than the MIPS and so instead of implementing the
following architectural features:
ARMv8 ISA, a famous subset of the ARMv8-A version is used,
• One-cycle execution time: RISC processors have a one-
developed by ARM as an educational testing kit, commonly
cycle CPI (clock per instruction). This is because to the
referred to as LEGv8, which is closer to the MIPS in size and
CPU's optimization of each instruction and a method
simplicity. [9,10].
known as Pipelining is a technique for more effectively
The details of both the MIPS and LEGv8 structure will be
processing instructions by allowing segments, or stages, of
further discussed in detail. The paper’s target is to provide a
instructions to be executed at the same time.
comparative study between the MIPS and the LEGv8
• High number of registers: The RISC design philosophy architectures. The implementations done are a simulation for
supports many registers to avoid significant amounts of the single-cycle processors for both the MIPS and the LEGv8
memory interactions.
3
B. Instruction Memory
Figure 4 ALU
F. Control Unit
responsible for taking the instruction and generating the
appropriate signals for the Datapath elements.
Holds the program instructions that are to be executed in 4 Figure 8 Program Counter in ARM
locations each (8-bit in each location, 32-bit total for each
instruction) 1- Register with 32-bit
• INSTRUCTION MEMORY
III. METHODOLOGY o MIPS
A. Program Counter
A. MIPS
1- A: 32-bit input
2- RD: 32-bit output
o ARM
o ARM
Figure 11 Data Memory in MIPS 1- RA1: 5-bit input to determine our first source register
2- RA2: 5-bit input to determine our second source
register
1- CLK 3- WA3: 5-bit input to determine our destination
2- We: we enable signal (1 when using store instruction, register
0 otherwise) 4- WD3: 32-bit data required to be stored
3- Wd: 32-bit input data which is required to be stored. 5- WE3: control signal to determine whether we will
4- A: 32-bit signal to determine the address in the write the wd input in the register determined by the
memory to either read its data or write the WD in it. wa3 input
5- RD: 32-bit output of the data 6- CLK
7- RD1: 32 -bit output of the value stored in the register
o ARM determined by the ra1 input signal
8- RD2: 32-bit output of the value stored in the register
determined by the ra1 input signal
o ARM
o ARM
o ARM
Differences
1. PC module is not constructed in ARM
2. Sign extended depends on format of instruction
Ex: Branch, Condition Branch, D Type: R Type in
MIPS
3. ALU instruction is 11-bits in ARM and 6-bits in
MIPS
4. ALU out is 4-bits while MIPS is called ALUControl
and have 3-bits
5. ALU input in ARM is 64-bits while MIPS is 32-bits
6. In ARM code ALU is used to compute Adder
PCNext and Adder ShiftPC
7. ARM has input of 64-bits while MIPS is 32-bits
In conclusion ARM saves several CLK cycles when fetching
compared to MIPS and Data bus output in ARM it outputs
more data.
V. CONCLUSION
In conclusion, The ARM LEGv8 was designed and
implemented with a basic ISA and compared to a MIPS single
cycle. It was found that the differences weren’t as big in delays
as it didn’t differ as much from a MIPS’s architecture and basic
ISA when it comes to the core alone. It was also found that the
changes start to appear when taken into account the peripherals
that come with ARM such as NVIC, SYSTick and DMA that
are interfaced with the core and aren’t affected by its ISA.
Therefore, on a basic core level the MIPs and LEGv8 didn’t
differ a lot.
REFERENCES