forked from kevinliutong/chiselmill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
102 lines (75 loc) · 2.89 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
// Thank help from Jiuyang Liu to write this code.
import mill._
import mill.modules.Util
import scalalib._
import mill.contrib.buildinfo.BuildInfo
import $file.chisel3.build
import $file.firrtl.build
import $file.treadle.build
import mill.define.Target
object myfirrtl extends firrtl.build.firrtlCrossModule("2.12.11") {
override def millSourcePath = super.millSourcePath / 'firrtl
}
object mychisel3 extends chisel3.build.chisel3CrossModule("2.12.11") {
override def millSourcePath = super.millSourcePath / 'chisel3
def firrtlModule: Option[PublishModule] = Some(myfirrtl)
def treadleModule: Option[PublishModule] = Some(mytreadle)
}
object mytreadle extends treadle.build.treadleCrossModule("2.12.11") {
override def millSourcePath = super.millSourcePath / 'treadle
def firrtlModule: Option[PublishModule] = Some(myfirrtl)
}
trait CommonModule extends ScalaModule {
def scalaVersion = "2.12.10"
override def scalacOptions = Seq("-Xsource:2.11")
override def moduleDeps: Seq[ScalaModule] = Seq(mychisel3)
private val macroParadise = ivy"org.scalamacros:::paradise:2.1.0"
override def compileIvyDeps = Agg(macroParadise)
override def scalacPluginIvyDeps = Agg(macroParadise)
}
object config extends CommonModule {
override def millSourcePath = super.millSourcePath / 'design / 'craft
}
object hardfloat extends CommonModule with SbtModule
object rocketchip extends CommonModule with SbtModule {
override def ivyDeps = super.ivyDeps() ++ Agg(
ivy"${scalaOrganization()}:scala-reflect:${scalaVersion()}",
ivy"org.json4s::json4s-jackson:3.6.1"
)
object macros extends CommonModule with SbtModule
override def moduleDeps = super.moduleDeps ++ Seq(config, macros, hardfloat)
override def mainClass = Some("rocketchip.Generator")
}
object inclusivecache extends CommonModule {
override def moduleDeps = super.moduleDeps ++ Seq(rocketchip)
override def millSourcePath = super.millSourcePath / 'design / 'craft / 'inclusivecache
}
object sifiveblocks extends CommonModule {
override def moduleDeps = super.moduleDeps ++ Seq(rocketchip)
override def millSourcePath = super.millSourcePath
}
object boom extends CommonModule {
override def moduleDeps = super.moduleDeps ++ Seq(rocketchip, inclusivecache)
override def millSourcePath = super.millSourcePath
}
object chiselexamples extends CommonModule {
override def moduleDeps = super.moduleDeps ++ Seq(rocketchip)
override def millSourcePath = super.millSourcePath
}
object integration extends CommonModule {
override def moduleDeps = super.moduleDeps ++
Seq(
boom,
inclusivecache,
rocketchip,
mychisel3,
sifiveblocks,
chiselexamples
)
override def forkArgs: Target[Seq[String]] = Seq("-Xmx128G")
override def ivyDeps = Agg(
ivy"com.lihaoyi::upickle:latest.integration",
ivy"com.lihaoyi::os-lib:latest.integration",
ivy"com.lihaoyi::pprint:latest.integration"
)
}