Code Monkey home page Code Monkey logo

mips32's Introduction

MIPS 32 CORE WITH HAZARD DETECTION & DATA FORWARDING

The MIPS 32 CPU core is a five stage pipelined central processing unit based on the MIPS (Microprocessor without Interlocked Pipeline Stages) architecture with Hazard detection and data forwarding unit.MIPS is a Reduced Instruction Set Computer (RISC) architecture that is widely used in embedded systems, networking devices, and other applications.

The term "MIPS 32" refers to a specific version of the MIPS architecture, which is a 32-bit instruction set architecture. It means that the CPU core can process instructions that are 32 bits in length. The MIPS 32 architecture provides a standardized set of instructions and registers that the CPU core can execute.

Some key features of a MIPS 32 CPU core include:

RISC architecture: MIPS 32 follows the RISC philosophy, which emphasizes simplicity and efficiency by using a reduced set of instructions that can be executed in a single clock cycle.

Instruction pipeline: MIPS 32 CPUs typically use a classic five-stage pipeline, which allows for efficient instruction fetching, decoding, execution, memory access, and write-back stages.

Register set: MIPS 32 CPUs have a set of 32 general-purpose registers (GPRs) that can be used for arithmetic, data manipulation, and storage operations

image

**The MIPS32 instruction set architecture (ISA) **is a 32-bit RISC (Reduced Instruction Set Computer) architecture developed by MIPS Technologies.

Instruction Formats: MIPS32 instructions are encoded in a fixed-length format of 32 bits. The three primary instruction formats are: a. R-Format: Used for arithmetic and logical operations between registers. b. I-Format: Used for immediate arithmetic and logical operations, memory loads, and branches. c. J-Format: Used for unconditional and jump instructions.

image

MIPS processor architecture has been implemented using 5 pipeline stages. These pipeline stages are Instruction Fetch (IF), Instruction Decode (ID), Execution (EX), Memory Access (MEM) and Write Back (WB). These stages are separated by special registers called pipeline registers. The purpose of these registers is to separate the stages of the instructions so that there is no conflicting data due to multiple instructions being executed simultaneously. They are named after the stages that they are placed in-between: IF/ID Register, ID/EX Register, EX/MEM Register, and MEM/WB Register.

Screenshot 2024-04-11 104303

This pipe lined architecture consist two extra modules Hazard detection unit and Data forwarding unit to improve datapath of architecture.

Screenshot 2024-04-11 104310

Hazard Detection Unit: There are three types of pipeline hazards: Structural hazard, data hazard and control hazard. In this paper we are concentrating on data hazard only. Data hazards arise when an instruction depends on the result of a previous instruction in a way that is exposed by the overlapping of the instructions in the pipeline, thus causing the pipeline to stall until the results are made available.

Screenshot 2024-04-11 104319

Data Forwarding Unit: One solution of data hazard is called Data forwarding, which supplies the resulting operand to the dependant instruction as soon it has been computed. Figure 10 shows how dependencies are resolved using a Data forwarding unit. [t shows that in sub instruction, result is available at EXECUT[ON stage (after 3rd clock cycle) and successive instructions reads $2 at the end of execution stage or 4th or 5th clock cycle. This means instructions can be execute without stalls by just forwarding the data. So, here forwarding unit gives remedy for data hazard.

Screenshot 2024-04-11 104330

Design of 32-bit MIPS based RISC processor is implemented successfully with pipeline functionalities. Every instruction is executed in one clock cycle with 5-stage pipe lining. This design shows the implementation of MIPS based CPU capable of handling various R -type, J-type and I-type of instruction and each of these categories has a different format. These instructions are verified successfully through testbench. Designing Forwarding unit and hazard detection unit to overcome the data dependencies was critical task and it was implemented successfully.

mips32's People

Contributors

madeshwar01 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.