-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
139 lines (94 loc) · 3.63 KB
/
build.sc
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// See LICENSE.md for license details
import mill._
import mill.modules._
import mill.scalalib._
import coursier.maven.MavenRepository
trait Common extends ScalaModule {
def sv = "2.12.12"
def chisel = ivy"edu.berkeley.cs::chisel3:3.5.0"
def chisel_plugin = ivy"edu.berkeley.cs:::chisel3-plugin:3.5.0"
def paradise = ivy"org.scalamacros:::paradise:2.1.1"
def circt = ivy"com.sifive::chisel-circt:0.4.0"
override def scalaVersion = sv
override def scalacOptions = Seq(
"-Xsource:2.11"
)
override def compileIvyDeps = Agg(paradise)
override def scalacPluginIvyDeps = Agg(paradise)
override def repositories = super.repositories ++ Seq(
MavenRepository("https://oss.sonatype.org/content/repositories/snapshots"),
MavenRepository("https://oss.sonatype.org/service/local/staging/deploy/maven2")
)
}
object config extends Common {
override def millSourcePath = os.pwd / "repo" / "config" / "cde"
}
object hard_float extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "hard_float"
override def ivyDeps = Agg(chisel)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object rocket_macros extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "rocket" / "macros"
override def ivyDeps = Agg(
chisel,
ivy"${scalaOrganization()}:scala-reflect:${scalaVersion()}"
)
}
object rocket extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "rocket"
override def ivyDeps = Agg(
chisel,
ivy"org.json4s::json4s-jackson:3.6.1"
)
override def moduleDeps = Seq(config, hard_float, rocket_macros)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object fudian extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "fudian"
override def ivyDeps = Agg(chisel)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object huancun extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "huancun"
override def ivyDeps = Agg(chisel)
override def moduleDeps = Seq(rocket)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object difftest extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "difftest"
override def ivyDeps = Agg(chisel)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object xiangshan extends SbtModule with Common {
override def millSourcePath = os.pwd / "repo" / "xiangshan"
override def ivyDeps = Agg(chisel, circt)
override def moduleDeps = Seq(rocket, fudian, huancun, difftest)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object firesim extends Common {
val sim = os.pwd / "repo" / "firesim" / "sim"
override def sources = T.sources(
sim / "midas" / "targetutils" / "src" / "main" / "scala",
sim / "midas" / "src" / "main" / "scala",
sim / "firesim-lib" / "src" / "main" / "scala",
sim / "src" / "main" / "scala"
)
override def ivyDeps = Agg(chisel)
override def moduleDeps = Seq(rocket)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}
object xsofs extends Common {
override def millSourcePath = os.pwd
override def ivyDeps = Agg(chisel)
override def moduleDeps = Seq(xiangshan, firesim)
override def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++ Agg(chisel_plugin)
}