Giter Site home page Giter Site logo

bizhen-ray / ercesimips Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zavs/ercesimips

0.0 1.0 0.0 2.1 MB

This repo has been put together to demonstrate a number of simple MIPS Processors written in Chisel.

Home Page: https://github.com/zavs/ercesiMIPS

License: GNU General Public License v3.0

Scala 97.04% Assembly 1.17% Shell 1.79%

ercesimips's Introduction

ercesiMIPS Processor Porject

Author: Meng Zhang ([email protected])

Author: Jianfeng An ([email protected])

Author: Danghui Wang ([email protected])

Date: 2017 April 9

Diagrams: ercesiMIPS wiki

This repo has been put together to demonstrate a number of simple MIPS Processors written in Chisel.

Install Chisel (according to usb-bar chisel3)

  1. Install sbt Run the following from the terminal to install sbt in (Ubuntu-like) Linux.
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt
  1. Install updated Verilator. Install dependencies:
sudo apt-get install git make autoconf g++ flex bison

Clone the Verilator repository:

git clone http://git.veripool.org/git/verilator

In the Verilator repository directory, check out a known good version (You can skip the step if the latest version is statable.):

cd verilator
git pull
git checkout verilator_3_886

In Verilator directory, build and install:

cd verilator
unset VERILATOR_ROOT
autoconf
./configure
make
sudo make install

Clone lab repository

Run the following from the terminal to clone lab resources.

cd ~/
git clone https://github.com/zavs/ercesiMIPS.git

Write your CPU and test it

A template ALU block has been presented in src/main/scala/SingleCycle/ALU.scala with the tester in src/test/scala/SingleCycle/ALUtests.scala. We borrowed the Launcher method from ucb-bar/chisel-tutorial. A new argument for shell runner needs to be name in Launcher.scala as the arguments of Map function:

object Launcher {
  val tests = Map(
        "ALU" -> { (backendName: String) =>
              Driver(() => new ALU(), backendName) {
                (c) => new ALUTests(c)
              }
            },
        "ALU11" -> { (backendName: String) =>
              Driver(() => new ALU11(), backendName) {
                (c) => new ALU11Tests(c)
              }
            }
        }
    )
}

In which, "ALU" is the argument for the shell runner, and ALU() is denoted the instance class of DUT in ALUTests(c). Just add new argument for you own block class.

To test the ALU module with ALUtests, just input the following command in ercesiMIPS root directory.

./run-single.sh ALU

If you still want to monitor its verification via waveform, just run this:

./run-bak.v.sh ALU

And the output .vcd file can be monitored in gtkwave program which could be install in Ubuntu-like Linux:

sudo apt-get install gtkwave

ercesimips's People

Contributors

zavs avatar leyuanniao avatar anjianfeng avatar

Watchers

James Cloos 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.