Giter VIP home page Giter VIP logo

sphinx's Introduction

Description

Sphinx is a RISC-V core implemented in CASH. The following are some of the specs:

  • RV32I instruction set
  • Pipelined with 5 stages (Fetch, Decode, Execute, Memory, WriteBack)
  • Options to enable/disable forwarding, Branches resolving in 2/3 cycles, and jumps resolving in 1/2 cycles.
  • Atomic CSR instructions.

Project Layout

Alt text

Maximum Frequency

Sphinx with all optimization on:
Device       Slow Model     Fast Model

Arria 10     323.73 MHz     496.52 MHz
Cyclone IV   153.12 MHz     264.90 MHz
Cyclone V    140.19 MHz     263.92 MHz

Dependancies

Sphinx only depends on CASH being installed.

CPU Generation and simulation

#To compile the model
>> git clone https://github.com/gtcasl/cash_riscv.git
>> cd cash_riscv/src
>> make

To simulate the model with the test cases (optional --exportVerilog to export model to verilog):

>> ./Sphinx

To simulate the model with a specific hex file (optional --exportVerilog to export model to verilog):

#./Sphinx --test <relative location>
>> ./Sphinx.out  --test ../tests/rv32ui-p-bltu.hex

To add breakpoints to the simulation, use the --breakpoint flag (optional --exportVerilog to export model to verilog). When a breakpoint is reached, the values of the registers will be printed after the breakpoint instruction is executed and the user will have the option to continue or exit simulation.

#./Sphinx.out --test <relative location> --breakpoint <breakpoint PC value 1> ... <<breakpoint PC value N>
>> ./Sphinx.out --test ../tests/rv32ui-p-sra.hex --breakpoint 800000e4 80000114 80000130 800001cc

To simulate the model a specific number of cycles (optional --exportVerilog to export model to verilog). This by default does not print anything for correct timing simulation. However, flag --printEvery could be used to print every N num cycles.

#./Sphinx.out --numCycles <num> --numRuns <num> --printEvery <num>
>> ./Sphinx.out --numCycles 1000000 --numRuns 10 --printEvery 10000

For options in config.h:

  • #define FORWARDING enables forwarding otherwise stalls
  • #define BRNACH_WB branches resolve in WB instead of MEM
  • #define JAL_MEM jumps are resolved in mem instead of EXE

All simulations export the verilog model.

sphinx's People

Contributors

felsabbagh3 avatar tinebp avatar

Watchers

James Cloos avatar Hugh avatar  avatar Chad D. Kersey avatar Seyong Lee avatar Jeffrey Young avatar  avatar Poulami Das 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.