SlideShare a Scribd company logo
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 252
REALIZATION OF HIGH PERFORMANCE RUN-TIME LOADABLE
MIPS SOFT-CORE PROCESSOR
Prathibha S R1
, M Z Kurian2
1
M.Tech Student, Department of E&C, Sri Siddhartha Institute of Technology, Tumkur, Karnataka, India
2
Head, Department of E&C, Sri Siddhartha Institute of Technology, Tumkur, Karnataka, India
Abstract
Soft-core processors on Field Programmable Gate Array (FPGA) chips are becoming a solution for application-specific
customization. Soft-core processors provide several advantages for designer. Currently using microprocessor doesn’t support real-
time loading. If, any change in the assembly code of the implemented processor, it requires re-implementation and downloads the soft-
core on FPGA. This project proposes realization of run-time loading technique of a MIPS (Microprocessor without Interlocked
Pipeline Stages) soft- core processor on FPGA. The proposed system consists of mainly three components: microprocessor soft-core,
software tool and universal asynchronous Receiver/Transmitter (UART). Since, here MIPS code is updating instantly there is no need
of resynthesize, place, route, and reload the soft-core. The software tool communicates between the user and MIPS soft-core
processor through UART. Five stage pipelining is included to improve the overall processor performance. In this paper 32-bit MIPS
soft-core processor, RAM module, APB Interface is designed and simulated using Modelsim. Design architecture will be doing in
Verilog, simulate using Modelsim 10.3 simulator and realize in Spartan-6 FPGA using Xilinx ISE 14.2.
Keywords: FPGA, MIPS, PERL, RISC, UART etc…
-----------------------------------------------------------------------***-----------------------------------------------------------------------
1. INTRODUCTION
Soft-core processor is a microprocessor their architecture and
behavior are defined in Hardware Description Language
(HDL), which can be synthesized in programmable hardware,
like FPGAs or ASICs. MIPS is a RISC processor, which is a
32-bit processor designed with single cycle
implementation.[2] For the realization of MIPS soft-core
processor using Field Programmable Gate Array (FPGA)
many techniques have been reported and documented in open
literature. However, the run time loading for CPU on FPGA
and its hardware realization using FPGA has not been reported
as of our knowledge.
This project is to propose run-time loading technique of
machine code for MIPS-32 soft-core processor on FPGA.
Some logic has to be introduced in the program memory made
it rewritable in runtime. ROM (Read Only Memory) logic has
to be changed to RAM. So bipartite the RAM (Random
Access Memory) into two sections, one section is for
instruction memory and the other one is used as data
memory.[9] The software tool is build by using Perl
programming language. It is used to write the MIPS assembly
code, debug the code, generates the machine code and sends it
to the FPGA.
The objective of this project is to design and implementation
of run-time loading of machine code for MIPS-32 soft-core
processor on FPGA. Write the PERL (Practical Extract and
Report Language) script to generate the opcode of the MIPS
processor and that should be stored in text file and after
storing the opcode information that sent to the instruction
decoder through UART/RS232 bus protocols and that will
fetch the correct opcode from that instruction decoder and
send to the MIPS logic through Advance Peripheral Bus
protocol (APB) interface and it can change in the run time
through programming the FPGA. Implementing the required
MIPS using FPGA that controls the processor at run time and
it debug easily which gives the complete functional design of
the MIPS processor. Five stage pipelining is included to
improve the overall processor performance. [1]
The organization of this paper is as follows. Section II
presents proposed work, Section III discussed on system
design of proposed work, Section IV shows the results.
Section V concludes this work and future enhancement.
2. PROPOSED WORK
The fig.1 shows the block diagram of the proposed system.
Writing the perl script to generates the opcode and operand
code fields in a text file format.
Text file: It stores the opcode and operand information in
machine level language.
UART: From computer side it is the media to send and
receive the data serially to/from external world. The UART is
used to connect the FPGA and computer for data and
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 253
instruction transfer. This UART information will be stored on
the FPGA RAM for further processing.
MIPS Logic: The architecture is standard processor
architecture with fetch, decode and execute blocks with run
time instruction execution. The internal blocks of MIPS logic
are data and instruction buffers, ALU controller and ALU. The
data and instructions will be feed from RAM.
Fig -1: Block Diagram of a system
APB: This is one of the standard bus protocol defined by
ARM Company which is used to interconnect the modules.
3. SYSTEM DESIGN
3.1 Design of MIPS Processor
MIPS processor is 32-bit processor designed with single cycle
implementation operate with frequency of 100MHz.
Fig -2: Architecture of proposed MIPS Processor
As shown in fig.2 the numerical 1, 2, 3 indicate as below;
1. Waiting_For_Decoder: Wait for the fetched
instruction if it is not fetched any instruction in
decoder module.
2. Waiting_For_Execution: After completion of
decoding it will wait for next execution done.
3. Decoder_Fetch: Fetch the valid instruction from the
fetch module through advance peripheral bus.
The Fig.2 shows the architecture of the proposed processor. It
mainly consists of Fetch module, Decode module, execution
module, register bank and updated PC.
Fetch module: In fetch unit instruction is fetched from
memory. The address of the instruction will be fetched from
program counter. The fetched instruction is again moved to
the instruction register through data bus.
Decode module: Here transfer the instruction from instruction
register to decode unit. In this unit the fetched instruction is
decoded by the processor. It will get the operands and opcode
given in the instruction.
Execute module: In this unit executes the instruction. ALU
performs arithmetic and logical operation depending on
requirement of the instruction and result is stored back in
register/memory.
Register Bank: It contains array of registers. It has 32 registers
each of 32bit wide.
PC Update: Update the value of program counter normally
incremented by 1. If any jump or branch instructions PC
updated to other address.
Interrupt Control: It allows interrupts on one or more CPU
lines, based on priority assigned. When interrupt occurs,
disturbs the execution of current code in processor and needs
immediate attention.
Flush Signal: As soon as flush signal received, it cancels
instruction queues cannot performing any other operations.
Program counter jumps to specific address, start fetching in
normal way.
Control Signals are
1. Fetch instruction: This signal from fetch unit to RAM
2. Valid fetch: This signal from RAM to fetch unit valid
instruction is fetched.
3. Data memory request: This signal from execution unit
to the Data memory requesting for access memory.
4. Valid read data: This signal from memory to the
execution unit after read the data.
5. Interrupt: This signal from external device to the
interrupt control.
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 254
6. Data memory operation: This signal form data
memory to the execution unit.
7. Reset: Global signal.
8. Clock: Global signal.
3.1.1 Design of Fetch Unit
Fig -3: Fetch unit of MIPS Processor
Above fig.3 shows Fetch unit of the MIPS processor.
Simulation result of the Fetch unit is shown in fig 8.
Clk, Reset: Global signals.
Valid fetch: It will fetch the valid instruction from the ram
module through APB.
Decoder fetch: Decoder sends this signal to fetch unit to send
next fetched instruction.
Flush: It will flush the entire module when jump or call
instruction comes.
Fetched Instruction: It will fetch the instruction (data and
address) from the RAM.
Updated PC: It is used to update the instruction address in the
fetch module.
Fetch Instruction (IF): The instruction is fetched from
memory and placed in the instruction register (IR).
Waiting for decoder: Fetched instruction is waiting for
decoder to decode the operands and opcode.
Program counter: It is a register that contains the address
(location) of the instruction being executed at the current time.
After each instruction gets fetched, the program counter
increases its value by 1 and points to the next instruction in the
execution sequence. When the processor restarts or reset, the
program counter normally back to 0.
3.1.2 Design of Decode Unit
Fig -4: Decode unit of the MIPS Processor
Above fig.4 shows Decode unit of the MIPS processor.
Simulation result of the Decode unit is shown in fig 9.
Clk, Reset: Global signals.
Waiting for decoder: when this signal is high, indicates that
the fetch module is waiting for decoder to decode next
instruction.
Flush: It will flush the entire module when jump or call
instruction.
Instruction for decoder: Fetch unit sends 32-bit instruction to
the decoder module.
Execution done: After execution completes, execution module
sends this signal to the decoder unit.
Decoder fetch: Decoder sends this signal to fetch unit to send
next fetched instruction.
Waiting for execution: After completion of decoding it will
wait for next execution.
Control signals: which control all instruction like opcode,
fetch, program counter etc,.
3.1.3 Design of Execution Unit
Fig -5: Execution unit of MIPS Processor
The fig.5 shows Execution unit of the MIPS processor. The
fig.10 shows the simulation result of Execution unit.
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 255
Clk, Reset: Global signals.
Waiting for execution: After completion of decoding it will
wait for next execution.
Control signals: It controls all instruction like opcode, fetch,
program counter etc.
Memory operation done: After complete execution from the
execution unit it will send the acknowledgement to memory
that it completes operation.
Execution done: when it will high indicates that the execution
of the instruction is complete.
Data memory request: Requesting for the data memory to
store the data.
Data memory operation: This stores required data in the data
memory.
Data memory address: This stores required address in the data
memory.
3.2 RAM Module
The soft-core processor has RAM and it is 32 bit aligned.
Some of the internal signals of RAM are Address, Data_out,
Read, Ready, Clock, Reset.
Fig -6: State Diagram of RAM
Above fig.6 shows state diagram of RAM. To support real
time loading and ROM logic has to be changed to RAM.
ROM (Read Only Memory) is called instruction memory can’t
be rewritable. Program memory made it rewritable in runtime,
so bipartite the RAM (Random Access Memory) into nearly
two equal sections. One section is for instruction memory and
the other one is used as data memory approximately 2KB
each.
When WE (Write enable) =1, Write the data in to RAM.
When WE (Write enable) =0, Read the data from the RAM.
The fig.12 shows the simulation result of RAM unit.
3.3 Advance Peripheral Bus Protocol
APB is a part of the AMBA 3 (Advanced Microcontroller Bus
Architecture) protocol family. It gives a low-cost interface that
is optimized for minimal power consumption and reduced
interface complexity. APB interfaces to any peripherals
having low-bandwidth and do not require the pipelined bus
interface. It has non-pipelined bus and synchronous. All signal
transitions are only related to the rising edge of the clock to
enable the integration of APB peripherals. Each transfer takes
minimum two cycles. It is used for write and read transfers.
The below tabel.1shows the list of APB signals with its
description.
Table -1: APB Signal Descriptions
Sl
No
Signals Description
1 PREADY
A ready signal used by slaves to
extend a APB transfer
2 PSLVERR
An error signal indicate the failure of
a transfer (Valid only
PSEL,PENABLE,PREADY are
high)
3 PCLK
The rising edge of PCLK times all
transfers on APB
4 PADDR
APB address bus can be extend up to
32 bits and driven by peripheral bus
bridge
5 PWRITE
This signal indicates an APB write
access when HIGH and APB read
access when LOW
6 PSEL
APB bridge unit generates this signal
to each slave devise and select the
desired one and transfer the data
7
PENABL
E
Enable signal indicated the second
and further cycles used for an APB
transfer
8 PWDATA
The write data, it is 32 bits wide and
operates when PWRITE = 1
9 PRDATA
The read data, it is 32 bits wide and
operates when PWRITE = 0
10 PRESET
APB reset signal is active LOW, its
normally connected to the system bus
reset signal
Operating States
The operation of APB is as shown in fig.7. The state machine
consists of three states:
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 256
Fig -7: State diagram of operating states of APB
IDLE: It is a default state of APB.
SETUP: When a transfer is required this bus moves to the
SETUP state. An appropriate select signal PSEL is chosen
and it remains in this state for one clock cycle and next jump
to ACCESS state on next rising edge of the clock.
ACCESS: When PENABLE is HIGH, ACCESS state is
activated. The address, write, select, and write data signals
stable during transition from SETUP to ACCESS state. This
state is controlled by the PREADY signal from the slave:
PREADY =0, Bus will remains in the ACCESS state.
PREADY=1, Bus returns to IDLE state, if no other transfers
are required and Bus directly moves to SETUP state still
transfers are there.
The fig.13 shows the simulation result of APB.
4. RESULTS
Fig -8: Simulation Result of Fetch Unit
Fig -9: Simulation Result of Decode Unit
Fig -10: Simulation Result of Execution Unit
Fig -11: Top Level RTL Schematic of MIPS Processor
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 257
Fig -12: Simulation Result of RAM
Fig -13: Simulation Result of APB
5. CONCLUSIONS AND FUTURE WORK
This paper proposes design and simulation result of fetch unit,
decode unit, execution unit, MIPS processor and RAM
module of 32-bit Run-Time Loadable MIPS soft-core
processor and also includes APB Interface Block. The
proposed system is trying to utilize less FPGA resources and
reduce area consumption to consume small area out of the
entire FPGA leaving plenty of FPGA resources for
implementing other parallel processors on the same device. It
focus on remaining blocks of system design, different
optimization techniques such as pipelining will be applied in
order to obtain high performance considering the parameters
like speed and area.
REFERENCES
[1] Balaji valli, A. Uday Kumar, B.Vijay Bhaskar, “FPGA
Implementation and Functional Verification of a
Pipelined MIPS Processor” International Journal Of
Computational Engineering Research (ijceronline.com)
Vol. 2 Issue. 5, September-2012.
[2] Jason G. Tong, Ian D. L. Anderson and Mohammed A.
S. Khalid, “Soft-Core Processors for Embedded
Systems” 18th International Confernece on
Microelectronics (ICM) 2006
[3] Ortega-Sanchez C., " MiniMIPS: An 8-Bit MIPS in an
FPGA for Educational Purposes," in Proc. of
International Conference on Reconfigurable
Computing and FPGAs,pp. 152-157, 2011.
[4] Wael M ElMedany, Khalid A AlKooheji “Design and
Implementation of a 32bit RISC Processor on Xilinx
FPGA”.
[5] V.N.Sireesha, D.Hari Hara Santosh, “ FPGA
Implementation of A MIPS RISC Processor”
Int.J.Computer Technology & Applications,Vol 3 (3),
1251-1253, MAY-JUNE 2012.
[6] Galani Tina, R.D.Daruwala “Performance
Improvement of MIPS Architecture by Adding New
Features” International Journal of Advanced Research
in Computer Science and Software Engineering 3(2),
February - 2013, pp. 1-6.
[7] Prashant D Bhirange, V. G. Nasre, M. A. Gaikwad3,
“Processor Realization for Application of Convolution”
International Journal of Engineering Research and
Development, Volume 2, Issue 6 (August 2012), PP.
51-55
[8] Rupali S. Balpande, Rashmi S. Keote “Design of
FPGA Based Instruction Fetch & Decode Module of
32-Bit RISC (MIPS) Processor”, in Proc. of
International Conference on Communication and
Network Technologies, Pp 409-413, 2011.
[9] Mazen Bahaidarah, Hesham Al-Obaisi “A Novel
Technique for Run- Time Loading for MIPS Soft-
Core Processor”Saudi International Electronics,
Communications and Photonics Conference (SIECPC)
2013.

More Related Content

PDF
ARM 32-bit Microcontroller Cortex-M3 introduction
PDF
20120140502007 2-3
PDF
Design & Simulation of RISC Processor using Hyper Pipelining Technique
PDF
Bca examination 2015 csa
PDF
Embedded systems notes
PPTX
Pipelining and vector processing
PDF
16-bit Microprocessor Design (2005)
PDF
L4 speeding-up-execution
ARM 32-bit Microcontroller Cortex-M3 introduction
20120140502007 2-3
Design & Simulation of RISC Processor using Hyper Pipelining Technique
Bca examination 2015 csa
Embedded systems notes
Pipelining and vector processing
16-bit Microprocessor Design (2005)
L4 speeding-up-execution

What's hot (20)

PPTX
Unit vi (2)
DOCX
Real Time Atomization of agriculture system for the modernization of indian a...
PDF
Embedded Systems (18EC62) - ARM - 32-Bit Microcontroller (Module 1)
PPTX
Computer Architecture – An Introduction
PPT
E.s unit 4 and 5
DOC
Unit 1 embedded systems and applications
PPTX
Embedded systems 101 final
PPTX
Unit vi (1)
PDF
Computer architecture
PDF
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
PPTX
ARM Processor architecture
PDF
PPTX
Microcontroller(18CS44) module 1
PPTX
ARM Cortex-M3 Training
PDF
Performance Comparison Between x86 and ARM Assembly
DOCX
Applications - embedded systems
PPTX
ARM Microcontroller and Embedded Systems (17EC62) – ARM – 32 bit Microcontrol...
PDF
Computer Organization and Architecture 10th Edition by Stallings Test Bank
PPTX
Computer organization
PPTX
Embedded system
Unit vi (2)
Real Time Atomization of agriculture system for the modernization of indian a...
Embedded Systems (18EC62) - ARM - 32-Bit Microcontroller (Module 1)
Computer Architecture – An Introduction
E.s unit 4 and 5
Unit 1 embedded systems and applications
Embedded systems 101 final
Unit vi (1)
Computer architecture
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
ARM Processor architecture
Microcontroller(18CS44) module 1
ARM Cortex-M3 Training
Performance Comparison Between x86 and ARM Assembly
Applications - embedded systems
ARM Microcontroller and Embedded Systems (17EC62) – ARM – 32 bit Microcontrol...
Computer Organization and Architecture 10th Edition by Stallings Test Bank
Computer organization
Embedded system
Ad

Viewers also liked (20)

PDF
Design and implementation of network security using genetic algorithm
PDF
Qo s management for mobile satellite communication
PDF
Hardware software co simulation of edge detection for image processing system...
PDF
Detection of speech under stress using spectral analysis
PDF
Study of various design methods for cold – formed light gauge steel sections ...
PDF
Molten metal flow analysis of housing component
PDF
Psnr value of digital image watermarking by using
PDF
Production of malto dextrin from broken rice
PDF
Fpga based encryption design using vhdl
PDF
A scheme for optical pulse generation using
PDF
Secure and efficient handover authentication and detection of spoofing attack
PDF
To analyses the effects of turning parameters on
PDF
Effects of filtering on ber performance of an ofdm system
PDF
Effect of soft segment chain length on tailoring the properties
PDF
3 d modeling and dynamic charectarization of steam turbine packet blade and c...
PDF
Explicit model predictive control of fast dynamic system
PDF
Cfd simulation on different geometries of venturimeter
PDF
Pe2 a public encryption with two ack approach to
PDF
Data discrimination prevention in customer relationship managment
PDF
Variable step size of lms algorithem using partical swarm optimization
Design and implementation of network security using genetic algorithm
Qo s management for mobile satellite communication
Hardware software co simulation of edge detection for image processing system...
Detection of speech under stress using spectral analysis
Study of various design methods for cold – formed light gauge steel sections ...
Molten metal flow analysis of housing component
Psnr value of digital image watermarking by using
Production of malto dextrin from broken rice
Fpga based encryption design using vhdl
A scheme for optical pulse generation using
Secure and efficient handover authentication and detection of spoofing attack
To analyses the effects of turning parameters on
Effects of filtering on ber performance of an ofdm system
Effect of soft segment chain length on tailoring the properties
3 d modeling and dynamic charectarization of steam turbine packet blade and c...
Explicit model predictive control of fast dynamic system
Cfd simulation on different geometries of venturimeter
Pe2 a public encryption with two ack approach to
Data discrimination prevention in customer relationship managment
Variable step size of lms algorithem using partical swarm optimization
Ad

Similar to Realization of high performance run time loadable mips soft-core processor (20)

PDF
11 2014
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PDF
FPGA Verilog Processor Design
PDF
Design and development of a 5-stage Pipelined RISC processor based on MIPS
PDF
IRJET- Design of Low Power 32- Bit RISC Processor using Verilog HDL
PDF
Implementation Of MIPS Single Cycle Processor
PPT
Chapter 4
PPTX
Computer Organization: Introduction to Microprocessor and Microcontroller
PDF
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
PDF
Victor thesis
PDF
Victor thesis
PPTX
PROCESSOR AND CONTROL UNIT
PPTX
MIPS IMPLEMENTATION.pptx
PPTX
Computer Architecture and Organization- THE PROCESSOR DESIGN
PDF
Digital logic design Lesson 9 - Datapath 6th May 2022.pdf
PPTX
PPT
Basic MIPS implementation
PPT
Basic MIPS implementation
PPTX
HDL17_MIPS CPU Design using Verilog.pptx
PDF
Unit 2 processor&memory-organisation
11 2014
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
FPGA Verilog Processor Design
Design and development of a 5-stage Pipelined RISC processor based on MIPS
IRJET- Design of Low Power 32- Bit RISC Processor using Verilog HDL
Implementation Of MIPS Single Cycle Processor
Chapter 4
Computer Organization: Introduction to Microprocessor and Microcontroller
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
Victor thesis
Victor thesis
PROCESSOR AND CONTROL UNIT
MIPS IMPLEMENTATION.pptx
Computer Architecture and Organization- THE PROCESSOR DESIGN
Digital logic design Lesson 9 - Datapath 6th May 2022.pdf
Basic MIPS implementation
Basic MIPS implementation
HDL17_MIPS CPU Design using Verilog.pptx
Unit 2 processor&memory-organisation

More from eSAT Publishing House (20)

PDF
Likely impacts of hudhud on the environment of visakhapatnam
PDF
Impact of flood disaster in a drought prone area – case study of alampur vill...
PDF
Hudhud cyclone – a severe disaster in visakhapatnam
PDF
Groundwater investigation using geophysical methods a case study of pydibhim...
PDF
Flood related disasters concerned to urban flooding in bangalore, india
PDF
Enhancing post disaster recovery by optimal infrastructure capacity building
PDF
Effect of lintel and lintel band on the global performance of reinforced conc...
PDF
Wind damage to trees in the gitam university campus at visakhapatnam by cyclo...
PDF
Wind damage to buildings, infrastrucuture and landscape elements along the be...
PDF
Shear strength of rc deep beam panels – a review
PDF
Role of voluntary teams of professional engineers in dissater management – ex...
PDF
Risk analysis and environmental hazard management
PDF
Review study on performance of seismically tested repaired shear walls
PDF
Monitoring and assessment of air quality with reference to dust particles (pm...
PDF
Low cost wireless sensor networks and smartphone applications for disaster ma...
PDF
Coastal zones – seismic vulnerability an analysis from east coast of india
PDF
Can fracture mechanics predict damage due disaster of structures
PDF
Assessment of seismic susceptibility of rc buildings
PDF
A geophysical insight of earthquake occurred on 21 st may 2014 off paradip, b...
PDF
Effect of hudhud cyclone on the development of visakhapatnam as smart and gre...
Likely impacts of hudhud on the environment of visakhapatnam
Impact of flood disaster in a drought prone area – case study of alampur vill...
Hudhud cyclone – a severe disaster in visakhapatnam
Groundwater investigation using geophysical methods a case study of pydibhim...
Flood related disasters concerned to urban flooding in bangalore, india
Enhancing post disaster recovery by optimal infrastructure capacity building
Effect of lintel and lintel band on the global performance of reinforced conc...
Wind damage to trees in the gitam university campus at visakhapatnam by cyclo...
Wind damage to buildings, infrastrucuture and landscape elements along the be...
Shear strength of rc deep beam panels – a review
Role of voluntary teams of professional engineers in dissater management – ex...
Risk analysis and environmental hazard management
Review study on performance of seismically tested repaired shear walls
Monitoring and assessment of air quality with reference to dust particles (pm...
Low cost wireless sensor networks and smartphone applications for disaster ma...
Coastal zones – seismic vulnerability an analysis from east coast of india
Can fracture mechanics predict damage due disaster of structures
Assessment of seismic susceptibility of rc buildings
A geophysical insight of earthquake occurred on 21 st may 2014 off paradip, b...
Effect of hudhud cyclone on the development of visakhapatnam as smart and gre...

Recently uploaded (20)

PPTX
Internet of Things (IOT) - A guide to understanding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Sustainable Sites - Green Building Construction
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Well-logging-methods_new................
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
PPT on Performance Review to get promotions
PDF
composite construction of structures.pdf
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Internet of Things (IOT) - A guide to understanding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Sustainable Sites - Green Building Construction
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
bas. eng. economics group 4 presentation 1.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Well-logging-methods_new................
R24 SURVEYING LAB MANUAL for civil enggi
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
CH1 Production IntroductoryConcepts.pptx
OOP with Java - Java Introduction (Basics)
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT on Performance Review to get promotions
composite construction of structures.pdf
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT

Realization of high performance run time loadable mips soft-core processor

  • 1. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 252 REALIZATION OF HIGH PERFORMANCE RUN-TIME LOADABLE MIPS SOFT-CORE PROCESSOR Prathibha S R1 , M Z Kurian2 1 M.Tech Student, Department of E&C, Sri Siddhartha Institute of Technology, Tumkur, Karnataka, India 2 Head, Department of E&C, Sri Siddhartha Institute of Technology, Tumkur, Karnataka, India Abstract Soft-core processors on Field Programmable Gate Array (FPGA) chips are becoming a solution for application-specific customization. Soft-core processors provide several advantages for designer. Currently using microprocessor doesn’t support real- time loading. If, any change in the assembly code of the implemented processor, it requires re-implementation and downloads the soft- core on FPGA. This project proposes realization of run-time loading technique of a MIPS (Microprocessor without Interlocked Pipeline Stages) soft- core processor on FPGA. The proposed system consists of mainly three components: microprocessor soft-core, software tool and universal asynchronous Receiver/Transmitter (UART). Since, here MIPS code is updating instantly there is no need of resynthesize, place, route, and reload the soft-core. The software tool communicates between the user and MIPS soft-core processor through UART. Five stage pipelining is included to improve the overall processor performance. In this paper 32-bit MIPS soft-core processor, RAM module, APB Interface is designed and simulated using Modelsim. Design architecture will be doing in Verilog, simulate using Modelsim 10.3 simulator and realize in Spartan-6 FPGA using Xilinx ISE 14.2. Keywords: FPGA, MIPS, PERL, RISC, UART etc… -----------------------------------------------------------------------***----------------------------------------------------------------------- 1. INTRODUCTION Soft-core processor is a microprocessor their architecture and behavior are defined in Hardware Description Language (HDL), which can be synthesized in programmable hardware, like FPGAs or ASICs. MIPS is a RISC processor, which is a 32-bit processor designed with single cycle implementation.[2] For the realization of MIPS soft-core processor using Field Programmable Gate Array (FPGA) many techniques have been reported and documented in open literature. However, the run time loading for CPU on FPGA and its hardware realization using FPGA has not been reported as of our knowledge. This project is to propose run-time loading technique of machine code for MIPS-32 soft-core processor on FPGA. Some logic has to be introduced in the program memory made it rewritable in runtime. ROM (Read Only Memory) logic has to be changed to RAM. So bipartite the RAM (Random Access Memory) into two sections, one section is for instruction memory and the other one is used as data memory.[9] The software tool is build by using Perl programming language. It is used to write the MIPS assembly code, debug the code, generates the machine code and sends it to the FPGA. The objective of this project is to design and implementation of run-time loading of machine code for MIPS-32 soft-core processor on FPGA. Write the PERL (Practical Extract and Report Language) script to generate the opcode of the MIPS processor and that should be stored in text file and after storing the opcode information that sent to the instruction decoder through UART/RS232 bus protocols and that will fetch the correct opcode from that instruction decoder and send to the MIPS logic through Advance Peripheral Bus protocol (APB) interface and it can change in the run time through programming the FPGA. Implementing the required MIPS using FPGA that controls the processor at run time and it debug easily which gives the complete functional design of the MIPS processor. Five stage pipelining is included to improve the overall processor performance. [1] The organization of this paper is as follows. Section II presents proposed work, Section III discussed on system design of proposed work, Section IV shows the results. Section V concludes this work and future enhancement. 2. PROPOSED WORK The fig.1 shows the block diagram of the proposed system. Writing the perl script to generates the opcode and operand code fields in a text file format. Text file: It stores the opcode and operand information in machine level language. UART: From computer side it is the media to send and receive the data serially to/from external world. The UART is used to connect the FPGA and computer for data and
  • 2. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 253 instruction transfer. This UART information will be stored on the FPGA RAM for further processing. MIPS Logic: The architecture is standard processor architecture with fetch, decode and execute blocks with run time instruction execution. The internal blocks of MIPS logic are data and instruction buffers, ALU controller and ALU. The data and instructions will be feed from RAM. Fig -1: Block Diagram of a system APB: This is one of the standard bus protocol defined by ARM Company which is used to interconnect the modules. 3. SYSTEM DESIGN 3.1 Design of MIPS Processor MIPS processor is 32-bit processor designed with single cycle implementation operate with frequency of 100MHz. Fig -2: Architecture of proposed MIPS Processor As shown in fig.2 the numerical 1, 2, 3 indicate as below; 1. Waiting_For_Decoder: Wait for the fetched instruction if it is not fetched any instruction in decoder module. 2. Waiting_For_Execution: After completion of decoding it will wait for next execution done. 3. Decoder_Fetch: Fetch the valid instruction from the fetch module through advance peripheral bus. The Fig.2 shows the architecture of the proposed processor. It mainly consists of Fetch module, Decode module, execution module, register bank and updated PC. Fetch module: In fetch unit instruction is fetched from memory. The address of the instruction will be fetched from program counter. The fetched instruction is again moved to the instruction register through data bus. Decode module: Here transfer the instruction from instruction register to decode unit. In this unit the fetched instruction is decoded by the processor. It will get the operands and opcode given in the instruction. Execute module: In this unit executes the instruction. ALU performs arithmetic and logical operation depending on requirement of the instruction and result is stored back in register/memory. Register Bank: It contains array of registers. It has 32 registers each of 32bit wide. PC Update: Update the value of program counter normally incremented by 1. If any jump or branch instructions PC updated to other address. Interrupt Control: It allows interrupts on one or more CPU lines, based on priority assigned. When interrupt occurs, disturbs the execution of current code in processor and needs immediate attention. Flush Signal: As soon as flush signal received, it cancels instruction queues cannot performing any other operations. Program counter jumps to specific address, start fetching in normal way. Control Signals are 1. Fetch instruction: This signal from fetch unit to RAM 2. Valid fetch: This signal from RAM to fetch unit valid instruction is fetched. 3. Data memory request: This signal from execution unit to the Data memory requesting for access memory. 4. Valid read data: This signal from memory to the execution unit after read the data. 5. Interrupt: This signal from external device to the interrupt control.
  • 3. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 254 6. Data memory operation: This signal form data memory to the execution unit. 7. Reset: Global signal. 8. Clock: Global signal. 3.1.1 Design of Fetch Unit Fig -3: Fetch unit of MIPS Processor Above fig.3 shows Fetch unit of the MIPS processor. Simulation result of the Fetch unit is shown in fig 8. Clk, Reset: Global signals. Valid fetch: It will fetch the valid instruction from the ram module through APB. Decoder fetch: Decoder sends this signal to fetch unit to send next fetched instruction. Flush: It will flush the entire module when jump or call instruction comes. Fetched Instruction: It will fetch the instruction (data and address) from the RAM. Updated PC: It is used to update the instruction address in the fetch module. Fetch Instruction (IF): The instruction is fetched from memory and placed in the instruction register (IR). Waiting for decoder: Fetched instruction is waiting for decoder to decode the operands and opcode. Program counter: It is a register that contains the address (location) of the instruction being executed at the current time. After each instruction gets fetched, the program counter increases its value by 1 and points to the next instruction in the execution sequence. When the processor restarts or reset, the program counter normally back to 0. 3.1.2 Design of Decode Unit Fig -4: Decode unit of the MIPS Processor Above fig.4 shows Decode unit of the MIPS processor. Simulation result of the Decode unit is shown in fig 9. Clk, Reset: Global signals. Waiting for decoder: when this signal is high, indicates that the fetch module is waiting for decoder to decode next instruction. Flush: It will flush the entire module when jump or call instruction. Instruction for decoder: Fetch unit sends 32-bit instruction to the decoder module. Execution done: After execution completes, execution module sends this signal to the decoder unit. Decoder fetch: Decoder sends this signal to fetch unit to send next fetched instruction. Waiting for execution: After completion of decoding it will wait for next execution. Control signals: which control all instruction like opcode, fetch, program counter etc,. 3.1.3 Design of Execution Unit Fig -5: Execution unit of MIPS Processor The fig.5 shows Execution unit of the MIPS processor. The fig.10 shows the simulation result of Execution unit.
  • 4. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 255 Clk, Reset: Global signals. Waiting for execution: After completion of decoding it will wait for next execution. Control signals: It controls all instruction like opcode, fetch, program counter etc. Memory operation done: After complete execution from the execution unit it will send the acknowledgement to memory that it completes operation. Execution done: when it will high indicates that the execution of the instruction is complete. Data memory request: Requesting for the data memory to store the data. Data memory operation: This stores required data in the data memory. Data memory address: This stores required address in the data memory. 3.2 RAM Module The soft-core processor has RAM and it is 32 bit aligned. Some of the internal signals of RAM are Address, Data_out, Read, Ready, Clock, Reset. Fig -6: State Diagram of RAM Above fig.6 shows state diagram of RAM. To support real time loading and ROM logic has to be changed to RAM. ROM (Read Only Memory) is called instruction memory can’t be rewritable. Program memory made it rewritable in runtime, so bipartite the RAM (Random Access Memory) into nearly two equal sections. One section is for instruction memory and the other one is used as data memory approximately 2KB each. When WE (Write enable) =1, Write the data in to RAM. When WE (Write enable) =0, Read the data from the RAM. The fig.12 shows the simulation result of RAM unit. 3.3 Advance Peripheral Bus Protocol APB is a part of the AMBA 3 (Advanced Microcontroller Bus Architecture) protocol family. It gives a low-cost interface that is optimized for minimal power consumption and reduced interface complexity. APB interfaces to any peripherals having low-bandwidth and do not require the pipelined bus interface. It has non-pipelined bus and synchronous. All signal transitions are only related to the rising edge of the clock to enable the integration of APB peripherals. Each transfer takes minimum two cycles. It is used for write and read transfers. The below tabel.1shows the list of APB signals with its description. Table -1: APB Signal Descriptions Sl No Signals Description 1 PREADY A ready signal used by slaves to extend a APB transfer 2 PSLVERR An error signal indicate the failure of a transfer (Valid only PSEL,PENABLE,PREADY are high) 3 PCLK The rising edge of PCLK times all transfers on APB 4 PADDR APB address bus can be extend up to 32 bits and driven by peripheral bus bridge 5 PWRITE This signal indicates an APB write access when HIGH and APB read access when LOW 6 PSEL APB bridge unit generates this signal to each slave devise and select the desired one and transfer the data 7 PENABL E Enable signal indicated the second and further cycles used for an APB transfer 8 PWDATA The write data, it is 32 bits wide and operates when PWRITE = 1 9 PRDATA The read data, it is 32 bits wide and operates when PWRITE = 0 10 PRESET APB reset signal is active LOW, its normally connected to the system bus reset signal Operating States The operation of APB is as shown in fig.7. The state machine consists of three states:
  • 5. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 256 Fig -7: State diagram of operating states of APB IDLE: It is a default state of APB. SETUP: When a transfer is required this bus moves to the SETUP state. An appropriate select signal PSEL is chosen and it remains in this state for one clock cycle and next jump to ACCESS state on next rising edge of the clock. ACCESS: When PENABLE is HIGH, ACCESS state is activated. The address, write, select, and write data signals stable during transition from SETUP to ACCESS state. This state is controlled by the PREADY signal from the slave: PREADY =0, Bus will remains in the ACCESS state. PREADY=1, Bus returns to IDLE state, if no other transfers are required and Bus directly moves to SETUP state still transfers are there. The fig.13 shows the simulation result of APB. 4. RESULTS Fig -8: Simulation Result of Fetch Unit Fig -9: Simulation Result of Decode Unit Fig -10: Simulation Result of Execution Unit Fig -11: Top Level RTL Schematic of MIPS Processor
  • 6. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 03 Issue: 04 | Apr-2014, Available @ http://www.ijret.org 257 Fig -12: Simulation Result of RAM Fig -13: Simulation Result of APB 5. CONCLUSIONS AND FUTURE WORK This paper proposes design and simulation result of fetch unit, decode unit, execution unit, MIPS processor and RAM module of 32-bit Run-Time Loadable MIPS soft-core processor and also includes APB Interface Block. The proposed system is trying to utilize less FPGA resources and reduce area consumption to consume small area out of the entire FPGA leaving plenty of FPGA resources for implementing other parallel processors on the same device. It focus on remaining blocks of system design, different optimization techniques such as pipelining will be applied in order to obtain high performance considering the parameters like speed and area. REFERENCES [1] Balaji valli, A. Uday Kumar, B.Vijay Bhaskar, “FPGA Implementation and Functional Verification of a Pipelined MIPS Processor” International Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 5, September-2012. [2] Jason G. Tong, Ian D. L. Anderson and Mohammed A. S. Khalid, “Soft-Core Processors for Embedded Systems” 18th International Confernece on Microelectronics (ICM) 2006 [3] Ortega-Sanchez C., " MiniMIPS: An 8-Bit MIPS in an FPGA for Educational Purposes," in Proc. of International Conference on Reconfigurable Computing and FPGAs,pp. 152-157, 2011. [4] Wael M ElMedany, Khalid A AlKooheji “Design and Implementation of a 32bit RISC Processor on Xilinx FPGA”. [5] V.N.Sireesha, D.Hari Hara Santosh, “ FPGA Implementation of A MIPS RISC Processor” Int.J.Computer Technology & Applications,Vol 3 (3), 1251-1253, MAY-JUNE 2012. [6] Galani Tina, R.D.Daruwala “Performance Improvement of MIPS Architecture by Adding New Features” International Journal of Advanced Research in Computer Science and Software Engineering 3(2), February - 2013, pp. 1-6. [7] Prashant D Bhirange, V. G. Nasre, M. A. Gaikwad3, “Processor Realization for Application of Convolution” International Journal of Engineering Research and Development, Volume 2, Issue 6 (August 2012), PP. 51-55 [8] Rupali S. Balpande, Rashmi S. Keote “Design of FPGA Based Instruction Fetch & Decode Module of 32-Bit RISC (MIPS) Processor”, in Proc. of International Conference on Communication and Network Technologies, Pp 409-413, 2011. [9] Mazen Bahaidarah, Hesham Al-Obaisi “A Novel Technique for Run- Time Loading for MIPS Soft- Core Processor”Saudi International Electronics, Communications and Photonics Conference (SIECPC) 2013.