Giter Site home page Giter Site logo

ss2783 / firrtl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chipsalliance/firrtl

0.0 1.0 0.0 45.18 MB

Flexible Intermediate Representation for RTL

Home Page: http://freechipsproject.github.io/firrtl/

Shell 0.13% Makefile 0.09% Scala 88.13% C 0.01% LLVM 0.16% TeX 10.36% ANTLR 0.70% Verilog 0.09% C++ 0.32%

firrtl's Introduction

Firrtl

Build Status

Flexible Internal Representation for RTL

Firrtl is an intermediate representation (IR) for digital circuits designed as a platform for writing circuit-level transformations. This repository consists of a collection of transformations (written in Scala) which simplify, verify, transform, or emit their input circuit.

A Firrtl compiler is constructed by chaining together these transformations, then writing the final circuit to a file.

For a detailed description of Firrtl's intermediate representation, see the document "Specification of the Firrtl Language" located in spec/spec.pdf.

This repository is in ALPHA VERSION, so many things may change in the coming months.

Wiki's and Tutorials

Useful information is on our wiki, located here:

Some important pages to read, before writing your own transform:

To write a Firrtl transform, please start with the tutorial here: src/main/scala/tutorial. To run these examples:

sbt assembly
./utils/bin/firrtl -td regress -tn rocket --custom-transforms tutorial.lesson1.AnalyzeCircuit
./utils/bin/firrtl -td regress -tn rocket --custom-transforms tutorial.lesson2.AnalyzeCircuit

Other Tools

Installation Instructions

Disclaimer: This project is in alpha, so there is no guarantee anything works. The installation instructions should work for OSX/Linux machines.

Prerequisites
  1. If not already installed, install verilator (Requires at least v3.886)
  2. If not already installed, install sbt (Requires at least v0.13.6)
Installation
  1. Clone the repository: git clone https://github.com/ucb-bar/firrtl.git && cd firrtl
  2. Compile firrtl: sbt compile
  3. Run tests: sbt test
  4. Build executable (utils/bin/firrtl): sbt assembly
    • Note: You can add utils/bin to your path to call firrtl from other processes
  5. Publish this version locally in order to satisfy other tool chain library dependencies:
sbt publish-local
Useful sbt Tips
  1. Run a single test suite: sbt "testOnly firrtlTests.UnitTests"
  2. Continually execute a command: sbt ~compile
  3. Only invoke sbt once:
sbt
> compile
> test
Using Firrtl as a commandline tool
utils/bin/firrtl -i regress/rocket.fir -o regress/rocket.v -X verilog // Compiles rocket-chip to Verilog
utils/bin/firrtl --help // Returns usage string

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.