aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 4dc9d1b72577dc4503e39903e0abfd8fa73d1075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# firrtl
#### Flexible Internal Representation for RTL

 This repository contains the compiler for .fir files.
 It is currently being developed in stanza, with the end-goal to translate into scala for ease of other people to use.
 This decision was made for multiple reasons:  
       1.   Previous development had already been done in stanza   
       2.   Most of the passes are relatively language independent   
       3.   Stanza is easier to develop in than scala bc less-strict type system   
       4.   As a favor, its useful to develop in stanza to give Patrick some language tips :)   
 The hardest part to port will likely be the parser, but we hope to use an existing scala-based general-purpose parser for the port.   

#### Installation instructions (for Mac):    
*Disclaimer*: This project is going through development stages so there is no guarantee anything works.     
    `git clone https://github.com/ucb-bar/firrtl # Clone repository`     
    `make install-mac # Stanza installation`     
    `pip install lit # Install lit (this assumes you have pip installed)`     
    `make build # Build firrtl`     
    `make check # Run tests`     
    `make # Build & test`     

#### Scala implementation 
The Scala FIRRTL implementation relies upon sbt.    
Example use:    
  `sbt -mem 2048 "run-main Example <input> <output>`    
This command will read in &lt;input&gt; FIRRTL file, parse it, then output the AST to &lt;output&gt;