Coder Social home page Coder Social logo

mips-simulator's Introduction

Pipelined MIPS datapath simulator

  • Implemented with Java

Description

This simulator is a low-level cycle-accurate pipelined MIPS datapath simulator that simulates the datapath including all of its storage components (register file, memories, and pipeline registers) and all of its control signals.

Stages of the pipeline

  • IF : Instruction Fetch Stage
  • ID : Instruction Decode Stage
  • EX : Execution Stage
  • MEM : Memory Stage
  • WB : Write Back Stage

Implemented Instruction Set

  • Arithmetic Operations: add, sub, addi
  • Logic Operations: and, or
  • Shift Operations: sll
  • Load/Store: lw, sw
  • Control Flow: beq, j
  • Comparison: slt

Implementation notes

  • The register file contains the 32 registers of the MIPS processor, its content is printed at the end of the simulation
  • Instruction and data memories are separated in different memory arrays
  • The size of the instruction memory is 32KB. It can hold up to 1000 instructions. The size can be changed in the simulator constructor.
  • The size of the data memory is 64KB. The size can be changed in the simulator constructor.
  • The datapath detects and handles load-use and data hazards appropriately. Hazard-detection and Forwarding units are added.

Simulation

  • Program file must be present within the project folder. When running the simulation, you wil be asked to enter its name.
  • Any initialization for the memory or register file contents can be added in the console afterwards.
  • The simulator shows the content of the pipeline registers and which instructions are being executed and at which stages in each clock cycle.

mips-simulator's People

Contributors

mostafa-abdullah avatar ahmedsoliman7 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.