Giter VIP home page Giter VIP logo

foutse2's Introduction

Chisel Project Template

You've done the chisel tutorials, and now you are ready to start your own chisel project. The following procedure should get you started with a clean running Chisel3 project.

Make your own Chisel3 project

How to get started

The first thing you want to do is clone this repo into a directory of your own. I'd recommend creating a chisel projects directory somewhere

mkdir ~/ChiselProjects
cd ~/ChiselProjects

git clone https://github.com/ucb-bar/chisel-template.git MyChiselProject
cd MyChiselProject

Make your project into a fresh git repo

There may be more elegant way to do it, but the following works for me. Note: this project comes with a magnificent 339 line (at this writing) .gitignore file. You may want to edit that first in case we missed something, whack away at it, or start it from scratch.

rm -rf .git
git init
git add .gitignore *
git commit -m 'Starting MyChiselProject'

Connecting this up to github or some other remote host is an exercise left to the reader.

Did it work?

You should now have a project based on Chisel3 that can be run. Note: With a nod to cargo cult thinking, some believe it is best to execute the following sbt before opening up this directory in your IDE. I have no formal proof of this assertion. So go for it, at the command line in the project root.

sbt test

You should see a whole bunch of output that ends with something like the following lines

STEP 1092 -> 1102
  EXPECT GCD.io_z -> 0x4 == 0x4 PASS
  EXPECT GCD.io_v -> 0x1 == 0x1 PASS
Enabling waves..
RAN 1102 CYCLES PASSED
[info] GCDTester:
[info] GCD
[info] - should calculate proper greatest common denominator (with firrtl)
[info] GCD
[info] - should calculate proper greatest common denominator (with verilator)
[info] ScalaCheck
[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] ScalaTest
[info] Run completed in 2 seconds, 944 milliseconds.
[info] Total number of tests run: 2
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 2, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2
[success] Total time: 6 s, completed Oct 15, 2016 7:39:40 AM

If you see the above then...

It worked!

You are ready to go. We have a few recommended practices and things to do.

  • Use packages and following conventions for structure and naming
  • Package names should be clearly reflected in the testing hierarchy
  • Build tests for all your work.
  • This template includes a dependency on the Chisel3 IOTesters, this is a reasonable starting point for most tests
  • You can remove this dependency in the build.sbt file if necessary
  • Change the name of your project in the build.sbt
  • Change your README.md

Development/Bug Fixes

This is the release version of chisel-template. If you have bug fixes or changes you would like to see incorporated in this repo, please checkout the master branch and submit pull requests against it.

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.