Giter Club home page Giter Club logo

processor's Introduction

Compiler - Assembler - Processor

This repository implements a compiler, assembler and a processor.

Compiler

OCaml.
Most of code taken from Northeastern compilers course.
Compiles to x86.

Assembler

Ocaml.
Coverts x86 to a RISC ISA and assembles to binary.

Processor

Verilog.
Implements a RISC ISA capable of running all instructions generated by assembler.

Test Bench

C - Verilog Programming Interface.
Simulates instruction memory, data memory, and registers.
Runs through different types of tests:

  1. Binary tests - binary code. and checks to make sure main memory and registers are the same as expected
  2. Assembly Tests - x86 assembly code. tests only the final result in eax.
  3. Code Tests - abstract code. tests only the final result in eax.

Running the code

There is a dependency script that may or may not work for getting the dependencies.
Once these are acquired, the makefile can be run which will compile all four modules and run the test bench.

Future Features

  1. Super scalar ๐Ÿ‘
  2. Performance metrics (branch misses, IPC, instruction histograms, stalls) ๐Ÿ‘
  3. Branch predictor ๐Ÿ‘
  4. Compiler - Tuples ๐Ÿ‘
  5. Emulator ๐Ÿ‘
  6. Instruction Logs ๐Ÿ‘
  7. Out of order
  8. Memory simulator (cache / memory heirarchy with random latency)
  9. Combining instruction memory and data memory

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.