From 0f2ab1170af52d1220107458b5bed85a6396556e Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Sat, 11 Mar 2017 00:58:16 -0800 Subject: [PATCH 1/2] Add option to override firrtl Optionally override firrtl with a custom firrtl folder. Does not affect (assuming no dependence of master firrtl features) compile if not specified. --- build.sbt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6f61668a..63e15684 100644 --- a/build.sbt +++ b/build.sbt @@ -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", @@ -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")) \ No newline at end of file + .settings(scalacOptions in Test ++= Seq("-language:reflectiveCalls")) From 400ff6ac35dd9a1982fefbd4cf54a85811343fde Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Sat, 11 Mar 2017 18:06:53 -0800 Subject: [PATCH 2/2] Provide a quick example of running barstools --- README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bc6f3d9b..04182be0 100644 --- a/README.md +++ b/README.md @@ -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 .fir -o .v --syn-top --harness-top ``` + +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