Lab Assignment 2: MIPS Single-Cycle Implementation: Electrical and Computer Engineering University of Cyprus
Lab Assignment 2: MIPS Single-Cycle Implementation: Electrical and Computer Engineering University of Cyprus
MIPS single-cycle
implementation
Electrical and Computer
Engineering
University of Cyprus
Control
Memory
Datapath
Output
INTRODUCTION
The MIPS processor, designed in 1984 by
researchers at Stanford University.
Is a RISC (Reduced Instruction Set
Computer) processor. Compared with
their CISC (Complex Instruction Set
Computer) counterparts (such as the
Intel Pentium processors), RISC
processors typically support fewer and
much simpler instructions.
A RISC processor can be made much
faster than a CISC processor because of
its simpler design.
INTRODUCTION ()
RISC processors typically have a
load-store architecture.
Two instructions for accessing
memory:
a load (l) instruction to load data from
memory,
a store (s) instruction to write data to
memory.
5-Stage MIPS
Stage 5
PC
Instruction
Memory
(Imem)
Stage 1
Registers
Stage 2
ALU
Stage 3
ALU
IM
DM
Reg
Data
Memory
(Dmem)
Stage 4
Datapath elements
Instruction memory
PC register, adder increment PC by 4
Register file
ALU
Data memory
Data
PC
Address
Instruction
memory
Instruction
Register #
Registers
ALU
Address
Register #
Data
memory
Register #
Data
cycle time
rising edge
Combinational logic
State
element
2
Single-cycle Implementation
All operations take the same amount
of time - a single cycle
long cycle time
Instructions same size
Source registers always in same place
Immediates same size, location
Operations always on
registers/immediates
LAB2
You will become familiar with the
MIPS instruction set by implementing
a single-cycle core in VHDL
The example code will be uploaded to
the website
LAB2
You will be given the design skeleton
of a single-cycle MIPS processor that
is capable of performing some
instructions.
Complete the design of the singlecycle implementation in order to
support the required MIPS instruction
set.
MIPS
MIPS
IFETCH
IFETCH
CONTROL
CONTROL
EXECUTE
EXECUTE
DMEMORY
DMEMORY
IFETCH
IFETCH
IFETCH
IFETCH
IDECODE
IDECODE
DEMO
You'll want to build a suite of test
programs to test the new capabilities
of your implementation as you add
them.
Test Programs
IFETCH.vhd file
are
Stored
in
the
REPORT
Objective of this lab and intro.
Your implementation
Your test programs and results
(simulations)
Your conclusion
Attach your VHDL source code
(email)
Important Announcements!
Lab material (Tutorials, VHDL Files) will
be uploaded in the website!