Coder Social home page Coder Social logo

mips-simulator's Introduction

MIPS-Simulator READ ME

Made by Flavortown (Abraham Lee, Tammy Vo, Jonathan Kim)

Repo Link: https://github.com/akyol/MIPS-Simulator

Project Decisions:

As a group, we decided to structure the code in terms of machine code, but the GUI is structured in a way so that the user can have an easier time using the instructions.

As a group, we decided to use Javascript, HTML/CSS for the code and to display the GUI.

Project Files:

The css folder contains styling the GUI.

The images folder contains images used in the GUI.

The sounds folder contains an mp3 used for when Guy Fieri is clicked on.

The js folder contains 3 js files, one of which is main.js. the main.js instantiates the pc, memory, memory length, and handles whatever the user does in the GUI. Depending on what the user picks and executes, the main uses the chooseOperation() function, reads the instruction and uses the operations.js to displays it on the GUI.

The operations.js file handles all the logic behind the instructions. Every method in the operations.js does not return anything, but sets registers, changes the offset, or manipulates the memory location.

The tests folder contains our unit test for our project.

You will also see an index.html and a testIndex.html. The index.html file is to be used to run the GUI and the testIndex.html is to be used for testing.

The index.html GUI:

This is the main GUI to run. You can open this file either directly in the folder or by following this online Link: https://akyol.github.io/MIPS-Simulator/index.html On the GUI itself, you will see the project group name on the top of the screen. From there you will see drop down option buttons that shows "Opcode", "Mode", "Signed", "RS", "RT", "RD", "Imm", and an "Execute" button. In addition you will see the PC counter, the memory, as well as all the registers and their values. At the bottom you will see the glorious "Guy Fieri", the king of flavortown.

The Opcode drop down is used for picking the instruction you want.

The Mode drop down is used for whether you want register mode or immediate mode. (*NOTE if you use immediate mode we automatically adjust the GUI so it becomes compatible for immediate mode.

The signed drop down is for picking if you want signed or unsigned.

The RS and RT drop down are used for picking what registers to use.

Imm text box is used for inputing an immediate value.

The execute button is to execute the instruction.

Under this bar of instructions you will see a big text box that will auto populate the instructions depending on what instructions you executed.

PC will increment by itself, the memory and register values will change depending on what instruction you use.

If you hover your mouse over Guy Fieri, you will see the basic instruction format from the MIPS green card. (*NOTE if you click on him he will say his famous catch phrase! Careful about your volume, it maybe loud.)

The testIndex.html GUI:

This html is for testing. Can be opened directly from the file or can be done through following this online Link: https://akyol.github.io/MIPS-Simulator/testIndex.html It's almost identical to the index.html besides some modifications so it can run the test. Press next to load the next test and press execute to run. Repeat until text box says done. There is also a previous button to see the previous test case. Text box will contain test method and tell you what value to be looking for test validation.

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.