Coder Social home page Coder Social logo

tomasulo-simulation's Introduction

Motivation

The aim of the project is to simulate the tomasulo algorithm for a floating-point MIPS-like instruction pipeline, demonstrating out-of-order execution in the same way it was presented in the lecture through a tabulated visualization.

Simulation

Implementation

We use HTML and JS to create our simulator. We started with creating the tables with HTML to have our simulator’s frontend ready. Then we represented them in the backend using arrays like:-

  • Memory Table (Memory, 64 locations): holds the available memory locations and their contents. The contents of the memory are generated randomly with the start of the simulation.
  • Execution Time Table (executionTimes): holds the amount of time taken for each instruction operation to execute. and JSON arrays like:-
  • Instruction Queue (InstructionQ): contains the instructions in their desired order of issuing, the cycle where they were issued, the start and end of execution cycles, and the write back cycle.
  • Add and Sub Reservation Table (AddReserv): contains 3 elements representing 3 reservation stations present in the simulator. Each reservation station holds an instruction opcode, a busy bit, vj, vk, qj, qk, and the reservation station’s tag. The opcode can be “ADD” or “SUB”.
  • Mul and Div Reservation Table (MulReserv): contains 2 elements representing 2 reservation stations present in the simulator. Each reservation station holds an instruction opcode, a busy bit, vj, vk, qj, qk, and the reservation station’s tag. The opcode can be “MUL” or “DIV”.
  • LD Reservation Table (LDReserv): contains 3 elements representing 3 reservation stations present in the simulator. Each reservation station holds an address, a busy bit, and the reservation station’s tag.
  • SD Reservation Table (SDReserv): contains 3 elements representing 3 reservation stations present in the simulator. Each reservation station holds an address, a busy bit, v, q, and the reservation station’s tag.
  • Register File Table (Registers): contains 32 elements representing 32 registers (0-31) present in the simulator. Each register holds q, v, and the register name.

We then added input fields in the Execution Time HTML table (id=’ETs’) and the Instruction Queue HTML table (id=’IQ’) in order to allow users to enter each operator’s execution time, as well as entering the instructions they would like to run. Moreover, we added 2 buttons, “start” and “next” to control the clock cycle. Each button’s functionality is explained later.

How to run:

Open Tomasulo.html in the browser, enter the instructions and the execution times, then click “start” to start the simulation. Click “next” to increment cycles.

Memory and its content can be viewed in the browser's console.

Team members:

  • Hadeer ElHussen
  • Mariam Tamer
  • Maryam ElOraby
  • Rawan Reda
  • Rowan Amgad

tomasulo-simulation's People

Contributors

hadeer1111 avatar mareloraby avatar mariammtamerr6 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

rawanreda

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.