-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
88 lines (76 loc) · 2.95 KB
/
build.sbt
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
autoCompilerPlugins := true
cancelable in Global := true
ThisBuild / useSuperShell := false
ThisBuild / organization := "com.github.uw-pharm"
ThisBuild / scalaVersion := "2.12.6"
// lazy val HardwareGeneration = config("HardwareGeneration") extend(Compile)
// lazy val topLevelFile = settingKey[String]("Top-level Scala source file to generate into hardware")
// lazy val mkHardware = taskKey[Unit]("Generates Verilog for specified project")
lazy val commonSettings = Seq(
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % Test,
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
libraryDependencies += "com.github.uw-pharm" % "bitsad-libraries_2.12" % "0.5.2"
)
lazy val hardwareSettings = Seq(
libraryDependencies += "com.github.uw-pharm" % "bitsad-plugin_2.12" % "0.5.2",
libraryDependencies += compilerPlugin("com.github.uw-pharm" % "bitsad-plugin_2.12" % "0.5.2"),
scalacOptions += s"-Xplugin:bitsad-plugin_2.12.jar:bitsad-libraries_2.12.jar"
)
lazy val root = (project in file("."))
.settings(
commonSettings,
version := "0.5",
name := "bitbench"
)
.aggregate(iterative_svd, linear_solver, svf_filter, bq_filter, ma4_filter, ma32_filter)
lazy val iterative_svd = (project in file("IterativeSVD"))
// .configs(HardwareGeneration)
.settings(
commonSettings,
name := "iterative_svd",
hardwareSettings,
scalacOptions += s"-P:bitsad-plugin:top:IterativeSVD.scala"
)
// .settings(
// topLevelFile := "IterativeSVD.scala",
// inConfig(HardwareGeneration)(Defaults.projectTasks ++ Seq(
// HardwareGeneration / scalacOptions += s"-Xplugin:bitsad-plugin_2.12.jar:bitsad-libraries_2.12.jar",
// HardwareGeneration / scalacOptions += "-Xplugin-list")),
// mkHardware in HardwareGeneration := (compile in HardwareGeneration).value,
// // HardwareGeneration / scalacOptions += s"-P:bitsad-plugin:top:${topLevelFile.value}"
// )
lazy val linear_solver = (project in file("LinearSolver"))
.settings(
commonSettings,
name := "linear_solver",
hardwareSettings,
scalacOptions += s"-P:bitsad-plugin:top:LinearSolver.scala"
)
lazy val svf_filter = (project in file("SVFFilter"))
.settings(
commonSettings,
name := "svf_filter",
hardwareSettings,
scalacOptions += s"-P:bitsad-plugin:top:PDMBandpassFilterSVF.scala"
)
lazy val bq_filter = (project in file("BQFilter"))
.settings(
commonSettings,
name := "bq_filter",
hardwareSettings,
scalacOptions += s"-P:bitsad-plugin:top:PDMBandpassFilterBQ.scala"
)
lazy val ma4_filter = (project in file("MA4Filter"))
.settings(
commonSettings,
name := "ma4_filter",
hardwareSettings,
scalacOptions += s"-P:bitsad-plugin:top:PDMMovingAverageFilter4.scala"
)
lazy val ma32_filter = (project in file("MA32Filter"))
.settings(
commonSettings,
name := "ma32_filter",
hardwareSettings,
scalacOptions += s"-P:bitsad-plugin:top:PDMMovingAverageFilter32.scala"
)