Git Product home page Git Product logo

processor-sim's Introduction

Superscalar Processor Simulator

Introduction

A simulator for a superscalar, out of order, pipelined processor.

Features

  • Superscalar
  • Out of order
  • Branch prediction
  • Tomasulo's algorithm
  • Speculative execution
  • Pipelined
  • Non-blocking issue

ISA

The processor supports the following instructions:

Opcode Operands Description
nop
add Rd Rn Ri Add the contents of Rn and Ri, and store the result in Rd.
mul Rd Rn Ri Multiply the contents of Rn and Ri, and store the result in Rd.
sub Rd Rn Ri Subtract the contents of Rn and Ri, and store the result in Rd.
div Rd Rn Ri Perform integer division of Rn by Ri, and store the result in Rd.
lsh Rd Rn Ri Perform left shift of Rn by Ri, and store the result in Rd.
rsh Rd Rn Ri Perform right shift of Rn by Ri, and store the result in Rd.
and Rd Rn Ri Perform bitwise and of Rn and Ri. Store the result in Rd.
or Rd Rn Ri Perform bitwise or of Rn and Ri. Store the result in Rd.
xor Rd Rn Ri Perform bitwise xor of Rn and Ri. Store the result in Rd.
ld Rd Rn Ri Load from memory address Rn + Ri , and store in Rd.
ldc Rd Ri Load Ri into register Rd.
st Rd Rn Ri Store Rd in r1 + r2.
blt Rd Rn Ri Branch to Rd if Rn < Ri.
bz Rd Ri Rd if Ri == 0.
bnz Rd Ri Rd if Ri != 0.
b Branch to Rd.
jlt dest Increments program counter by Rd if Rn < Ri.
jz Rd Rn Ri Increments program counter by Rd if Ri == 0.
jnz Rd Ri Increments program counter by Rd if Ri != 0.
j Rd Increments program counter by Rd.
halt Halt execution of the processor.

Rn is always register addressed. Ri may be register addressed or be an immediate.

Prerequisites

  • clang++ or g++ to compile from source.

Usage

  1. Write, clone, download, steal, or otherwise acquire an assembly program compatible with the ISA specified above.
  2. Compile the simulator from source using
make
  1. Execute the assembly program using the proc program:
./bin/proc {assembly source} {scalar width} {branch prediction type (dynamic, static, fixedskip, fixedtake)} {No. EUs}

processor-sim's People

Contributors

tipex360 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.