Add dsptools.
This commit is contained in:
parent
7c55307c45
commit
ee75c03875
|
@ -46,3 +46,12 @@
|
|||
[submodule "vlsi/hammer-cad-plugins"]
|
||||
path = vlsi/hammer-cad-plugins
|
||||
url = https://github.com/ucb-bar/hammer-cad-plugins.git
|
||||
[submodule "tools/dsptools"]
|
||||
path = tools/dsptools
|
||||
url = https://github.com/ucb-bar/dsptools.git
|
||||
[submodule "tools/chisel-testers"]
|
||||
path = tools/chisel-testers
|
||||
url = https://github.com/freechipsproject/chisel-testers.git
|
||||
[submodule "tools/treadle"]
|
||||
path = tools/treadle
|
||||
url = https://github.com/freechipsproject/treadle.git
|
||||
|
|
57
build.sbt
57
build.sbt
|
@ -43,6 +43,22 @@ def conditionalDependsOn(prj: Project): Project = {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* It has been a struggle for us to override settings in subprojects.
|
||||
* An example would be adding a dependency to rocketchip on midas's targetutils library,
|
||||
* or replacing dsptools's maven dependency on chisel with the local chisel project.
|
||||
*
|
||||
* This function works around this by specifying the project's root at src/ and overriding
|
||||
* scalaSource and resourceDirectory.
|
||||
*/
|
||||
def freshProject(name: String, dir: File): Project = {
|
||||
Project(id = name, base = dir / "src")
|
||||
.settings(
|
||||
scalaSource in Compile := baseDirectory.value / "main" / "scala",
|
||||
resourceDirectory in Compile := baseDirectory.value / "main" / "resources"
|
||||
)
|
||||
}
|
||||
|
||||
// Fork each scala test for now, to work around persistent mutable state
|
||||
// in Rocket-Chip based generators
|
||||
def isolateAllTests(tests: Seq[TestDefinition]) = tests map { test =>
|
||||
|
@ -55,6 +71,21 @@ def isolateAllTests(tests: Seq[TestDefinition]) = tests map { test =>
|
|||
// NB: FIRRTL dependency is unmanaged (and dropped in sim/lib)
|
||||
lazy val chisel = (project in rocketChipDir / "chisel3")
|
||||
|
||||
lazy val treadle = freshProject("treadle", file("tools/treadle"))
|
||||
.settings(commonSettings)
|
||||
|
||||
lazy val `chisel-testers` = freshProject("chisel-testers", file("./tools/chisel-testers"))
|
||||
.dependsOn(treadle, chisel)
|
||||
.settings(
|
||||
commonSettings,
|
||||
libraryDependencies ++= Seq(
|
||||
"junit" % "junit" % "4.12",
|
||||
"org.scalatest" %% "scalatest" % "3.0.5",
|
||||
"org.scalacheck" %% "scalacheck" % "1.14.0",
|
||||
"com.github.scopt" %% "scopt" % "3.7.0"
|
||||
)
|
||||
)
|
||||
|
||||
// Contains annotations & firrtl passes you may wish to use in rocket-chip without
|
||||
// introducing a circular dependency between RC and MIDAS
|
||||
lazy val midasTargetUtils = ProjectRef(firesimDir, "targetutils")
|
||||
|
@ -66,14 +97,8 @@ lazy val hardfloat = (project in rocketChipDir / "hardfloat")
|
|||
lazy val rocketMacros = (project in rocketChipDir / "macros")
|
||||
.settings(commonSettings)
|
||||
|
||||
// HACK: I'm strugging to override settings in rocket-chip's build.sbt (i want
|
||||
// the subproject to register a new library dependendency on midas's targetutils library)
|
||||
// So instead, avoid the existing build.sbt altogether and specify the project's root at src/
|
||||
lazy val rocketchip = (project in rocketChipDir / "src")
|
||||
.settings(
|
||||
commonSettings,
|
||||
scalaSource in Compile := baseDirectory.value / "main" / "scala",
|
||||
resourceDirectory in Compile := baseDirectory.value / "main" / "resources")
|
||||
lazy val rocketchip = freshProject("rocketchip", rocketChipDir)
|
||||
.settings(commonSettings)
|
||||
.dependsOn(chisel, hardfloat, rocketMacros)
|
||||
|
||||
lazy val testchipip = (project in file("generators/testchipip"))
|
||||
|
@ -110,6 +135,22 @@ lazy val barstoolsMacros = (project in file("./tools/barstools/macros/"))
|
|||
.enablePlugins(sbtassembly.AssemblyPlugin)
|
||||
.settings(commonSettings)
|
||||
|
||||
lazy val dsptools = freshProject("dsptools", file("./tools/dsptools"))
|
||||
.dependsOn(chisel, `chisel-testers`)
|
||||
.settings(
|
||||
commonSettings,
|
||||
libraryDependencies ++= Seq(
|
||||
"org.typelevel" %% "spire" % "0.14.1",
|
||||
"org.scalanlp" %% "breeze" % "0.13.2",
|
||||
"junit" % "junit" % "4.12" % "test",
|
||||
"org.scalatest" %% "scalatest" % "3.0.5" % "test",
|
||||
"org.scalacheck" %% "scalacheck" % "1.14.0" % "test"
|
||||
))
|
||||
|
||||
lazy val `rocket-dsptools` = (project in file("./tools/dsptools/rocket"))
|
||||
.dependsOn(rocketchip, dsptools)
|
||||
.settings(commonSettings)
|
||||
|
||||
lazy val sifive_blocks = (project in file("generators/sifive-blocks"))
|
||||
.dependsOn(rocketchip)
|
||||
.settings(commonSettings)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 41f4eef0d85b65fabd0d786efa8baa099513dcf0
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 15145ab6230f869676de7eb730b4267fff7b11e8
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a03b969af104770a7662ecdbac80cebf622e674b
|
Loading…
Reference in New Issue