Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Add firrtl override option and quick start example #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
# barstools
Useful utilities for BAR projects

Passes/Transforms that could be useful if added here:
* Check that a module was de-duplicated. Useful for MIM CAD flows and currently done in python.
## Quick Start

Be sure to publish-local the following repositories:
* ucb-bar/chisel-testers (requires ucb-bar/firrtl-interpreter)
* ucb-bar/firrtl
Example use of how to run the GenerateTop transform:

Example Usage:
```
sbt
> compile
> project tapeout
> run-main barstools.tapeout.transforms.GenerateTop -i <myfile>.fir -o <myfile>.v --syn-top <mysyntop> --harness-top <myharnesstop>
```

Or as an (almost) one-liner:

```
export FIRRTL_HOME=/path/to/firrtl # path to firrtl (master)
sbt -DFIRRTL_HOME=$FIRRTL_HOME "project tapeout" "run-main barstools.tapeout.transforms.GenerateTop -i MyModule.fir -o MyModule.v --syn-top MyModule --harness-top MyModule"
```

## TODO

Passes/Transforms that could be useful if added here:

* Check that a module was de-duplicated. Useful for MIM CAD flows and currently done in python.

Be sure to publish-local the following repositories:
* ucb-bar/chisel-testers (requires ucb-bar/firrtl-interpreter)
* ucb-bar/firrtl
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import Dependencies._

resolvers in ThisBuild ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
)

lazy val commonSettings = Seq(
organization := "edu.berkeley.cs",
version := "0.1-SNAPSHOT",
Expand All @@ -15,11 +20,15 @@ val defaultVersions = Map(
"chisel-iotesters" -> "1.2-SNAPSHOT"
)

val firrtl_path = sys.props.getOrElse("FIRRTL_HOME", default="firrtl")
lazy val firrtl = RootProject(file(firrtl_path))

lazy val tapeout = (project in file("tapeout"))
.dependsOn(firrtl)
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq("chisel3","chisel-iotesters").map {
dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep))
}
)
.settings(scalacOptions in Test ++= Seq("-language:reflectiveCalls"))
.settings(scalacOptions in Test ++= Seq("-language:reflectiveCalls"))