From 4f1f9fce47a41d7d1a3e1eb1f065dce03d5873ea Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Wed, 2 Feb 2022 15:37:28 -0800 Subject: [PATCH 1/4] Remove sbt subproject "tapeout" Now barstools should be easier to compose in multi-project sbt projects, such as Chipyard. Resolves ucb-bar/barstools#117. --- build.sbt | 57 +++++++++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/build.sbt b/build.sbt index ca8d0639..67d09427 100644 --- a/build.sbt +++ b/build.sbt @@ -5,39 +5,26 @@ val defaultVersions = Map( "chisel-iotesters" -> "2.5-SNAPSHOT" ) -lazy val commonSettings = Seq( - organization := "edu.berkeley.cs", - version := "0.4-SNAPSHOT", - scalaVersion := "2.12.13", - crossScalaVersions := Seq("2.12.13", "2.13.6"), - scalacOptions := Seq("-deprecation", "-feature", "-language:reflectiveCalls"), - libraryDependencies ++= Seq("chisel3","chisel-iotesters").map { - dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) - }, - libraryDependencies ++= Seq( - "com.typesafe.play" %% "play-json" % "2.9.2", - "org.scalatest" %% "scalatest" % "3.2.9" % "test", - "org.apache.logging.log4j" % "log4j-api" % "2.11.2", - "org.apache.logging.log4j" % "log4j-core" % "2.11.2" - ), - resolvers ++= Seq( - Resolver.sonatypeRepo("snapshots"), - Resolver.sonatypeRepo("releases"), - Resolver.mavenLocal - ) +organization := "edu.berkeley.cs" +version := "0.4-SNAPSHOT" +name := "tapeout" +scalaVersion := "2.12.13" +crossScalaVersions := Seq("2.12.13", "2.13.6") +scalacOptions := Seq("-deprecation", "-feature", "-language:reflectiveCalls") +Test / scalacOptions ++= Seq("-language:reflectiveCalls") +fork := true +mainClass := Some("barstools.macros.MacroCompiler") +libraryDependencies ++= Seq("chisel3","chisel-iotesters").map { + dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) +} +libraryDependencies ++= Seq( + "com.typesafe.play" %% "play-json" % "2.9.2", + "org.scalatest" %% "scalatest" % "3.2.9" % "test", + "org.apache.logging.log4j" % "log4j-api" % "2.11.2", + "org.apache.logging.log4j" % "log4j-core" % "2.11.2" +) +resolvers ++= Seq( + Resolver.sonatypeRepo("snapshots"), + Resolver.sonatypeRepo("releases"), + Resolver.mavenLocal ) - -//disablePlugins(sbtassembly.AssemblyPlugin) -// -//enablePlugins(sbtassembly.AssemblyPlugin) - -lazy val tapeout = (project in file(".")) - .settings(commonSettings) - .settings(scalacOptions in Test ++= Seq("-language:reflectiveCalls")) - .settings(fork := true) - .settings( - mainClass := Some("barstools.macros.MacroCompiler") - ) - .enablePlugins(sbtassembly.AssemblyPlugin) - -//lazy val root = (project in file(".")).aggregate(tapeout) From d1de92d28787d4fb395e0e631a5c68fa31b02227 Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Wed, 2 Feb 2022 15:45:36 -0800 Subject: [PATCH 2/4] Make readme consistent with new sbt setup --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 01e263c3..30d55252 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Barstools ![Test](https://github.com/freechipsproject/ucb-bar/barstools/Test/badge.svg) -**Barstools** is a coolection of useful utilities for BAR projects +**Barstools** is a collection of 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. @@ -18,16 +18,13 @@ Example Usage: ``` sbt > compile -> project tapeout > runMain barstools.tapeout.transforms.GenerateTop -i .fir -o .v --syn-top --harness-top ``` Building the macro compiler JAR: ``` $ sbt [...] -[info] Set current project to root (in build file:/mnt/data/dev/barstools_pcad/) -> project macros -[info] Set current project to macros (in build file:/mnt/data/dev/barstools_pcad/) +[info] Set current project to tapeout (in build file:/mnt/data/dev/barstools_pcad/) > assembly [...] [info] SHA-1: 77d4c759c825fd0ea93dfec26dbbb649f6cd5c89 From a0d1fdb16c04957d9c7f48415fd6c77479259094 Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Wed, 2 Feb 2022 17:31:52 -0800 Subject: [PATCH 3/4] Add Chisel compiler plugin See here for more info: https://github.com/chipsalliance/chisel3#build-your-own-chisel-projects --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index 67d09427..8ce17447 100644 --- a/build.sbt +++ b/build.sbt @@ -23,6 +23,7 @@ libraryDependencies ++= Seq( "org.apache.logging.log4j" % "log4j-api" % "2.11.2", "org.apache.logging.log4j" % "log4j-core" % "2.11.2" ) +addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % defaultVersions("chisel3") cross CrossVersion.full) resolvers ++= Seq( Resolver.sonatypeRepo("snapshots"), Resolver.sonatypeRepo("releases"), From adaca59416294898611f3fa2401888526e8bf95a Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Mon, 7 Feb 2022 20:47:33 -0800 Subject: [PATCH 4/4] Bump Chisel versions to x.5.1 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 8ce17447..1a972764 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,8 @@ // See LICENSE for license details. val defaultVersions = Map( - "chisel3" -> "3.5-SNAPSHOT", - "chisel-iotesters" -> "2.5-SNAPSHOT" + "chisel3" -> "3.5.1", + "chisel-iotesters" -> "2.5.1" ) organization := "edu.berkeley.cs"