Giter Club home page Giter Club logo

riscv-fivestage's Introduction

Best viewed in emacs org mode.

This is the coursework for the graded part of the TDT4255 course at NTNU.

Instructions

To get started with designing your 5-stage RISC-V pipeline you should follow the Exercise instructions

If you want an introduction to chisel and hardware design you should do the Chisel Intro exercise first.

About

Since much of the tooling for HW design is rather difficult to work with this skeleton comes with a lot of reinvented wheels which should make inspecting what is really going on a little clearer.

The FiveStage suite works in the following way:

Parsing a test

The Parser parses an assembly test found in the test resource directory. The resulting program can then be loaded on to a VM, or assembled into machine code.

Interpreting the test

Next the parsed assembly code is run on a virtual machine. Relevant information is then compiled in an execution trace log which shows which instruction was performed at a given step and what the resulting state was.

Preparing your circuit

Next up the chisel design is synthesized into a circuit emulator. The (relatively seamless) test harness provided for your circuit is then used in order to preload the instruction memory with the assembled machinecode, as well as test defined initial memory and register configurations.

Running your circuit

As with the VM, your circuit will leave an extensive log which is parsed and used to verify the correctness of your design

Checking the result

If your processor performed the same updates to registers and memory, and terminated at the same address the test is successful.

Debugging a failed test

When a test fails, (or if you have enabled verbose logging) a side by side execution log is shown, allowing you to pinpoint exactly how your processor went wrong.

Intended use

This coursework is intended to be used! If you are a tutor currently teaching computer architecture you may freely use this project, but I would be very grateful if you provided me with feedback. Pull requests always welcome!

Contributing

Considering the very significant amount of work saved on making your own coursework, you could maybe help adding features. Take a look at the TODO file (does not render well in github) to get an idea of nice features to have, or add different features altogether!

Additionally, if you write your own tests, please send a pull request! The more tests the better!

Solution

This is a graded coursework, so I would prefer that if you fork this project you keep the solution private. If you want access to the solution please send me a message verifying that you are a tutor and I will make it available to you.

riscv-fivestage's People

Contributors

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