SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
Indian Institute of Space Science and Technology
Department of Avionics
AV242 VLSI Design Lab
Project Report on
Implementation Of
MIPS Single Cycle Processor
Submitted by
D. Pramod Reddy
SC12B079
Date: 12/5/2014
Acknowledgement
I take this opportunity to express my gratitude towards Dr. Priyadarshanam sir and
Nidheesh Ravi sir for assisting me through the project and also thanks to the Dept.
of Avionics of the Indian Institute of Space Science and Technology for providing
necessary support and facilities whenever needed.
Introduction:-
The MIPS Instruction Set Architecture:-
The MIPS Architecture defines thirty-two, 32-bit general purpose registers. Register $r0 is
hardwired and always contains the value zero. The CPU uses byte addressing for word accesses
and must be aligned on a byte boundary divisible by four (0, 4, 8, …). MIPS only has three
instruction types: I-type is used for the Load and Stores instructions, R-type is used for Arithmetic
instructions, and J-type is used for the Jump instructions. MIPS is a load/store architecture,
meaning that all operations are performed on operands held in the processor registers and the
main memory can only be accessed through the load and store instructions (e.g lw, sw).
A load instruction loads a value from memory into a register. A store instruction stores a value
from a register to memory. The load and store instructions use the sum of the offset value in the
address/immediate field and the base register in the $rs field to address the memory. Arithmetic
instructions or R-type include: ALU Immediate (e.g. addi), three-operand (e.g. add, and, slt), and
shift instructions (e.g. sll, srl).
The J-type instructions are used for jump instructions (e.g. j). Branch instructions (e.g. beq, bne)
are I-type instructions which use the addition of an offset value from the current address in the
address/immediate field along with the program counter (PC) to compute the branch target
address; this is considered PC relative addressing.
MIPS Single-Cycle Processor:-
The MIPS single-cycle processor performs the tasks of instruction fetch, instruction decode,
execution, memory access and write-back all in one clock cycle. First the PC value is used as an
address to index the instruction memory which supplies a 32-bit value of the next instruction to be
executed. The instructions opcode field bits [31-26] are sent to a control unit to determine the type
of instruction to execute. The type of instruction then determines which control signals are to be
asserted and what function the ALU is to perform, thus decoding the instruction. The instruction
register address fields $rs bits [25 - 21], $rt bits [20 - 16], and $rd bits [15-11] are used to address
the register file. The register file supports two independent register reads and one register write in
one clock cycle. The register file reads in the requested addresses and outputs the data values
contained in these registers. These data values can then be operated on by the ALU whose
operation is determined by the control unit to either compute a memory address (e.g. load or
store), compute an arithmetic result (e.g. add, and or slt), or perform a compare (e.g. branch). If
the instruction decoded is arithmetic, the ALU result must be written to a register. If the instruction
decoded is a load or a store, the ALU result is then used to address the data memory. The final
step writes the ALU result or memory value back to the register file.
MIPS Single Clock cycle Implementation
Implementation:-
Register file:-
The register file has two read and one write input ports, meaning that during one clock cycle, the
processor must be able to read two independent data values and write a separate value into the
register file. The register file was implemented in VHDL by declaring it as a one-dimensional array
of 32 elements or registers each 8-bits wide. (e.g. TYPE register_file IS ARRAY (0 TO 31) OF
STD_LOGIC_VECTOR (7 DOWNTO 0) ). By declaring the register file as a one-dimensional
array, the requested register address would need to be converted into an integer to index the
register file.(e.g. Read_Data_1 <= register_file ( CONV_INTEGER (read_register_address1 (4
DOWNTO 0))) ) Finally, to save from having to load each register with a value, the registers get
initialized to their respective register number when the Reset signal is asserted. (e.g. $r1 = 1, $r2
= 2, etc.)
Register File
Instruction Fetch Unit:-
The function of the instruction fetch unit is to obtain an instruction from the instruction memory
using the current value of the PC and increment the PC value for the next instruction. Since this
design uses an 8-bit data width we had to implement byte addressing to access the registers and
word address to access the instruction memory. The instruction fetch component contains the
following logic elements that are implemented in VHDL: 32-bit program counter (PC) register, an
adder to increment the PC by four, the instruction memory, a multiplexor, and an AND gate used
to select the value of the next PC.
Instruction fetch stage
Instruction Decode Unit:-
The main function of the instruction decode unit is to use the 32-bit instruction provided from the
previous instruction fetch unit to index the register file and obtain the register data values. This unit
also sign extends instruction bits [15 - 0] to 32-bit. The logic elements to be implemented in VHDL
include several multiplexors and the register file.
Control Unit:-
The control unit of the MIPS single-cycle processor examines the instruction opcode bits [31 – 26]
and decodes the instruction to generate nine control signals to be used. The RegDst control signal
determines which register is written to the register file. The Jump control signal selects the jump
address to be sent to the PC. The Branch control signal is used to select the branch address to be
sent to the PC. The MemRead control signal is asserted during a load instruction when the data
memory is read to load a register with its memory contents. The MemtoReg control signal
determines if the ALU result or the data memory output is written to the register file. The ALUOp
control signals determine the function the ALU performs. (e.g. and, or, add, sbu, slt) The
MemWrite control signal is asserted when during a store instruction when a registers value is
stored in the data memory. The ALUSrc control signal determines if the ALU second operand
comes from the register file or the sign extend. The RegWrite control signal is asserted when the
register file needs to be written.
Control Unit
Execution Unit:-
The execution unit of the MIPS processor contains the arithmetic logic unit (ALU) which performs
the operation determined by the ALUop signal. The branch address is calculated by adding the
PC+4 to the sign extended immediate field shifted left 2 bits by a separate adder. The logic
elements to be implemented in VHDL include a multiplexor, an adder, the ALU and the ALU
control.
Data Memory Unit:-
The data memory unit is only accessed by the load and store instructions. The load instruction
asserts the Mem Read signal and uses the ALU Result value as an address to index the data
memory. The read output data is then subsequently written into the register file. A store instruction
asserts the Mem Write signal and writes the data value previously read from a register into the
computed memory address.
Following are used in implementing MIPS processor
1. Instruction memory and data memory are given byte addressing.
2. Since instruction and data memory are byte addressing program counter has to be incremented
by 4 to fetch next instruction in instruction memory.
3. Little endian is used in implementation.
4. All the instructions are given in test bench in the form of decoded 32 bit data for each
instruction.
5. Default contents in instruction and data memory are given to “0”.
TestBench Program:-
addi $1,$0,11 ; $1=0B
addi $2,$0,6 ; $2=6
loop: sub $1,$1,$2 ; $1=$1-$2=5
slt $3,$1,$2 ; $1<$2 so $3 = 1
beq $0,$1,loop ;$0=0,$1=1 so not equal hence don’t branch (loop=-12)
add $1,$1,$2 ;$1=$1+$2=5+6=0B (11)
over: beq $0,$0,over ; $0=$0 so loop over (over=-4)
ModelSim Simulation:-
Conclusion:- Hence the single clock cycle MIPS Processor is implemented and the result
obtained by ModelSim shows the same result as traced above, therefore we can conclude that it is
implemented successfully.

Más contenido relacionado

La actualidad más candente

BOOTP and DHCP.ppt
BOOTP and DHCP.pptBOOTP and DHCP.ppt
BOOTP and DHCP.pptanik301
 
Application layer protocol - Electronic Mail
Application layer protocol - Electronic MailApplication layer protocol - Electronic Mail
Application layer protocol - Electronic MailAmishaSahu3
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OSSalah Amean
 
1628502836912_CAN_TP,DCM&AutosarCAN.pptx
1628502836912_CAN_TP,DCM&AutosarCAN.pptx1628502836912_CAN_TP,DCM&AutosarCAN.pptx
1628502836912_CAN_TP,DCM&AutosarCAN.pptxYamini454
 
Congestion Control in Wireless Sensor Networks- An overview of Current Trends
Congestion Control in Wireless Sensor Networks- An overview of Current TrendsCongestion Control in Wireless Sensor Networks- An overview of Current Trends
Congestion Control in Wireless Sensor Networks- An overview of Current TrendsEditor IJCATR
 
CCNAv5 - S3: Chapter3 Link Aggregation
CCNAv5 - S3: Chapter3 Link AggregationCCNAv5 - S3: Chapter3 Link Aggregation
CCNAv5 - S3: Chapter3 Link AggregationVuz Dở Hơi
 
Asynchronous transfer mode
Asynchronous transfer modeAsynchronous transfer mode
Asynchronous transfer modeVinil Patel
 
Networking Protocols for Internet of Things
Networking Protocols for Internet of ThingsNetworking Protocols for Internet of Things
Networking Protocols for Internet of Thingsrjain51
 
Physical Design of IoT.pdf
Physical Design of IoT.pdfPhysical Design of IoT.pdf
Physical Design of IoT.pdfJoshuaKimmich1
 
Aircraft Anti collision system using ZIGBEE Communication
Aircraft Anti collision system using ZIGBEE CommunicationAircraft Anti collision system using ZIGBEE Communication
Aircraft Anti collision system using ZIGBEE CommunicationPavanKalyan314
 
Automatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptAutomatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptJOLLUSUDARSHANREDDY
 
Simulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocolSimulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocolPrafull Johri
 
Osi Layer model provided by TopTechy.com
Osi Layer model provided by TopTechy.comOsi Layer model provided by TopTechy.com
Osi Layer model provided by TopTechy.comVicky Kamboj
 

La actualidad más candente (20)

BOOTP and DHCP.ppt
BOOTP and DHCP.pptBOOTP and DHCP.ppt
BOOTP and DHCP.ppt
 
Atm intro
Atm introAtm intro
Atm intro
 
Application layer protocol - Electronic Mail
Application layer protocol - Electronic MailApplication layer protocol - Electronic Mail
Application layer protocol - Electronic Mail
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OS
 
DHCP basics
DHCP basicsDHCP basics
DHCP basics
 
1628502836912_CAN_TP,DCM&AutosarCAN.pptx
1628502836912_CAN_TP,DCM&AutosarCAN.pptx1628502836912_CAN_TP,DCM&AutosarCAN.pptx
1628502836912_CAN_TP,DCM&AutosarCAN.pptx
 
Congestion Control in Wireless Sensor Networks- An overview of Current Trends
Congestion Control in Wireless Sensor Networks- An overview of Current TrendsCongestion Control in Wireless Sensor Networks- An overview of Current Trends
Congestion Control in Wireless Sensor Networks- An overview of Current Trends
 
CCNAv5 - S3: Chapter3 Link Aggregation
CCNAv5 - S3: Chapter3 Link AggregationCCNAv5 - S3: Chapter3 Link Aggregation
CCNAv5 - S3: Chapter3 Link Aggregation
 
Asynchronous transfer mode
Asynchronous transfer modeAsynchronous transfer mode
Asynchronous transfer mode
 
Networking Protocols for Internet of Things
Networking Protocols for Internet of ThingsNetworking Protocols for Internet of Things
Networking Protocols for Internet of Things
 
MetaCDN
MetaCDNMetaCDN
MetaCDN
 
Rpl
Rpl Rpl
Rpl
 
Physical Design of IoT.pdf
Physical Design of IoT.pdfPhysical Design of IoT.pdf
Physical Design of IoT.pdf
 
Aircraft Anti collision system using ZIGBEE Communication
Aircraft Anti collision system using ZIGBEE CommunicationAircraft Anti collision system using ZIGBEE Communication
Aircraft Anti collision system using ZIGBEE Communication
 
Automatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptAutomatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos ppt
 
DDS Enabling Open Architecture
DDS Enabling Open ArchitectureDDS Enabling Open Architecture
DDS Enabling Open Architecture
 
Simulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocolSimulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocol
 
OSI Model
OSI ModelOSI Model
OSI Model
 
Security in GSM
Security in GSMSecurity in GSM
Security in GSM
 
Osi Layer model provided by TopTechy.com
Osi Layer model provided by TopTechy.comOsi Layer model provided by TopTechy.com
Osi Layer model provided by TopTechy.com
 

Similar a Implementation Of MIPS Single Cycle Processor

Design and development of a 5-stage Pipelined RISC processor based on MIPS
Design and development of a 5-stage Pipelined RISC processor based on MIPSDesign and development of a 5-stage Pipelined RISC processor based on MIPS
Design and development of a 5-stage Pipelined RISC processor based on MIPSIRJET Journal
 
Design & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueDesign & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueIOSR Journals
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]shibbirtanvin
 
4bit PC report
4bit PC report4bit PC report
4bit PC reporttanvin
 
16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)Susam Pal
 
cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineeringVishnuVinay6
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNAnonymous Red
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processors9007912
 
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...IAEME Publication
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Rai University
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...Rai University
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...Rai University
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdfSaralaT3
 
A REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORS
A REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORSA REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORS
A REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORSIRJET Journal
 

Similar a Implementation Of MIPS Single Cycle Processor (20)

Design and development of a 5-stage Pipelined RISC processor based on MIPS
Design and development of a 5-stage Pipelined RISC processor based on MIPSDesign and development of a 5-stage Pipelined RISC processor based on MIPS
Design and development of a 5-stage Pipelined RISC processor based on MIPS
 
THE PROCESSOR
THE PROCESSORTHE PROCESSOR
THE PROCESSOR
 
instruction codes
instruction codesinstruction codes
instruction codes
 
Design & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueDesign & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining Technique
 
Unit 3 The processor
Unit 3 The processorUnit 3 The processor
Unit 3 The processor
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 
4bit PC report
4bit PC report4bit PC report
4bit PC report
 
16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)
 
cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
 
CSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptxCSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptx
 
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
 
A REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORS
A REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORSA REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORS
A REVIEW ON ANALYSIS OF 32-BIT AND 64-BIT RISC PROCESSORS
 

Más de Pramod Devireddy

Avalanche and Meteor Destruction
Avalanche and Meteor DestructionAvalanche and Meteor Destruction
Avalanche and Meteor DestructionPramod Devireddy
 
Space Debris - An Environmental Problem for Space Missions
Space Debris - An Environmental Problem for Space MissionsSpace Debris - An Environmental Problem for Space Missions
Space Debris - An Environmental Problem for Space MissionsPramod Devireddy
 
Eco design of consumer electronics myth or reality?
Eco design of consumer electronics myth or reality?Eco design of consumer electronics myth or reality?
Eco design of consumer electronics myth or reality?Pramod Devireddy
 

Más de Pramod Devireddy (8)

Avalanche and Meteor Destruction
Avalanche and Meteor DestructionAvalanche and Meteor Destruction
Avalanche and Meteor Destruction
 
Stealth Radar
Stealth RadarStealth Radar
Stealth Radar
 
Stealth Radar
Stealth RadarStealth Radar
Stealth Radar
 
Space Debris - An Environmental Problem for Space Missions
Space Debris - An Environmental Problem for Space MissionsSpace Debris - An Environmental Problem for Space Missions
Space Debris - An Environmental Problem for Space Missions
 
Eco design of consumer electronics myth or reality?
Eco design of consumer electronics myth or reality?Eco design of consumer electronics myth or reality?
Eco design of consumer electronics myth or reality?
 
Cabinet of INDIA
Cabinet of INDIACabinet of INDIA
Cabinet of INDIA
 
Pramod reddy batch 1 (2)
Pramod reddy batch 1 (2)Pramod reddy batch 1 (2)
Pramod reddy batch 1 (2)
 
Pvc
PvcPvc
Pvc
 

Último

Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...gajnagarg
 
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...amitlee9823
 
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...gajnagarg
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...gajnagarg
 
Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...
Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...
Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...amitlee9823
 
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7shivanni mehta
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryoyebolasonuga14
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...amitlee9823
 
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...gajnagarg
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...amitlee9823
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja Nehwal
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 

Último (20)

CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
 
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
 
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
 
CHEAP Call Girls in Hauz Quazi (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Hauz Quazi  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Hauz Quazi  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Hauz Quazi (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...
Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...
Hosa Road Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ban...
 
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
 
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
 
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
 

Implementation Of MIPS Single Cycle Processor

  • 1. Indian Institute of Space Science and Technology Department of Avionics AV242 VLSI Design Lab Project Report on Implementation Of MIPS Single Cycle Processor Submitted by D. Pramod Reddy SC12B079 Date: 12/5/2014
  • 2. Acknowledgement I take this opportunity to express my gratitude towards Dr. Priyadarshanam sir and Nidheesh Ravi sir for assisting me through the project and also thanks to the Dept. of Avionics of the Indian Institute of Space Science and Technology for providing necessary support and facilities whenever needed.
  • 3. Introduction:- The MIPS Instruction Set Architecture:- The MIPS Architecture defines thirty-two, 32-bit general purpose registers. Register $r0 is hardwired and always contains the value zero. The CPU uses byte addressing for word accesses and must be aligned on a byte boundary divisible by four (0, 4, 8, …). MIPS only has three instruction types: I-type is used for the Load and Stores instructions, R-type is used for Arithmetic instructions, and J-type is used for the Jump instructions. MIPS is a load/store architecture, meaning that all operations are performed on operands held in the processor registers and the main memory can only be accessed through the load and store instructions (e.g lw, sw). A load instruction loads a value from memory into a register. A store instruction stores a value from a register to memory. The load and store instructions use the sum of the offset value in the address/immediate field and the base register in the $rs field to address the memory. Arithmetic instructions or R-type include: ALU Immediate (e.g. addi), three-operand (e.g. add, and, slt), and shift instructions (e.g. sll, srl). The J-type instructions are used for jump instructions (e.g. j). Branch instructions (e.g. beq, bne) are I-type instructions which use the addition of an offset value from the current address in the address/immediate field along with the program counter (PC) to compute the branch target address; this is considered PC relative addressing. MIPS Single-Cycle Processor:- The MIPS single-cycle processor performs the tasks of instruction fetch, instruction decode, execution, memory access and write-back all in one clock cycle. First the PC value is used as an address to index the instruction memory which supplies a 32-bit value of the next instruction to be executed. The instructions opcode field bits [31-26] are sent to a control unit to determine the type of instruction to execute. The type of instruction then determines which control signals are to be asserted and what function the ALU is to perform, thus decoding the instruction. The instruction register address fields $rs bits [25 - 21], $rt bits [20 - 16], and $rd bits [15-11] are used to address the register file. The register file supports two independent register reads and one register write in one clock cycle. The register file reads in the requested addresses and outputs the data values contained in these registers. These data values can then be operated on by the ALU whose operation is determined by the control unit to either compute a memory address (e.g. load or store), compute an arithmetic result (e.g. add, and or slt), or perform a compare (e.g. branch). If the instruction decoded is arithmetic, the ALU result must be written to a register. If the instruction decoded is a load or a store, the ALU result is then used to address the data memory. The final step writes the ALU result or memory value back to the register file.
  • 4. MIPS Single Clock cycle Implementation Implementation:- Register file:- The register file has two read and one write input ports, meaning that during one clock cycle, the processor must be able to read two independent data values and write a separate value into the register file. The register file was implemented in VHDL by declaring it as a one-dimensional array of 32 elements or registers each 8-bits wide. (e.g. TYPE register_file IS ARRAY (0 TO 31) OF STD_LOGIC_VECTOR (7 DOWNTO 0) ). By declaring the register file as a one-dimensional array, the requested register address would need to be converted into an integer to index the register file.(e.g. Read_Data_1 <= register_file ( CONV_INTEGER (read_register_address1 (4 DOWNTO 0))) ) Finally, to save from having to load each register with a value, the registers get initialized to their respective register number when the Reset signal is asserted. (e.g. $r1 = 1, $r2 = 2, etc.)
  • 5. Register File Instruction Fetch Unit:- The function of the instruction fetch unit is to obtain an instruction from the instruction memory using the current value of the PC and increment the PC value for the next instruction. Since this design uses an 8-bit data width we had to implement byte addressing to access the registers and word address to access the instruction memory. The instruction fetch component contains the following logic elements that are implemented in VHDL: 32-bit program counter (PC) register, an adder to increment the PC by four, the instruction memory, a multiplexor, and an AND gate used to select the value of the next PC. Instruction fetch stage
  • 6. Instruction Decode Unit:- The main function of the instruction decode unit is to use the 32-bit instruction provided from the previous instruction fetch unit to index the register file and obtain the register data values. This unit also sign extends instruction bits [15 - 0] to 32-bit. The logic elements to be implemented in VHDL include several multiplexors and the register file. Control Unit:- The control unit of the MIPS single-cycle processor examines the instruction opcode bits [31 – 26] and decodes the instruction to generate nine control signals to be used. The RegDst control signal determines which register is written to the register file. The Jump control signal selects the jump address to be sent to the PC. The Branch control signal is used to select the branch address to be sent to the PC. The MemRead control signal is asserted during a load instruction when the data memory is read to load a register with its memory contents. The MemtoReg control signal determines if the ALU result or the data memory output is written to the register file. The ALUOp control signals determine the function the ALU performs. (e.g. and, or, add, sbu, slt) The MemWrite control signal is asserted when during a store instruction when a registers value is stored in the data memory. The ALUSrc control signal determines if the ALU second operand comes from the register file or the sign extend. The RegWrite control signal is asserted when the register file needs to be written.
  • 7. Control Unit Execution Unit:- The execution unit of the MIPS processor contains the arithmetic logic unit (ALU) which performs the operation determined by the ALUop signal. The branch address is calculated by adding the PC+4 to the sign extended immediate field shifted left 2 bits by a separate adder. The logic elements to be implemented in VHDL include a multiplexor, an adder, the ALU and the ALU control.
  • 8. Data Memory Unit:- The data memory unit is only accessed by the load and store instructions. The load instruction asserts the Mem Read signal and uses the ALU Result value as an address to index the data memory. The read output data is then subsequently written into the register file. A store instruction asserts the Mem Write signal and writes the data value previously read from a register into the computed memory address. Following are used in implementing MIPS processor 1. Instruction memory and data memory are given byte addressing. 2. Since instruction and data memory are byte addressing program counter has to be incremented by 4 to fetch next instruction in instruction memory. 3. Little endian is used in implementation. 4. All the instructions are given in test bench in the form of decoded 32 bit data for each instruction. 5. Default contents in instruction and data memory are given to “0”.
  • 9. TestBench Program:- addi $1,$0,11 ; $1=0B addi $2,$0,6 ; $2=6 loop: sub $1,$1,$2 ; $1=$1-$2=5 slt $3,$1,$2 ; $1<$2 so $3 = 1 beq $0,$1,loop ;$0=0,$1=1 so not equal hence don’t branch (loop=-12) add $1,$1,$2 ;$1=$1+$2=5+6=0B (11) over: beq $0,$0,over ; $0=$0 so loop over (over=-4) ModelSim Simulation:- Conclusion:- Hence the single clock cycle MIPS Processor is implemented and the result obtained by ModelSim shows the same result as traced above, therefore we can conclude that it is implemented successfully.