-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sc
115 lines (92 loc) · 3.26 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
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Jiuyang Liu <[email protected]>
import mill._
import mill.scalalib._
import mill.define.{Command, TaskModule}
import mill.scalalib.publish._
import mill.scalalib.scalafmt._
import mill.scalalib.TestModule.Utest
import mill.util.Jvm
import coursier.maven.MavenRepository
import $file.dependencies.chisel.build
import $file.dependencies.`chisel-interface`.common
import $file.common
object deps {
val scalaVer = "2.13.14"
val mainargs = ivy"com.lihaoyi::mainargs:0.5.0"
val oslib = ivy"com.lihaoyi::os-lib:0.9.1"
val upickle = ivy"com.lihaoyi::upickle:3.3.1"
}
object chisel extends Chisel
trait Chisel extends millbuild.dependencies.chisel.build.Chisel {
def crossValue = deps.scalaVer
override def millSourcePath = os.pwd / "dependencies" / "chisel"
}
object axi4 extends AXI4
trait AXI4 extends millbuild.dependencies.`chisel-interface`.common.AXI4Module {
override def millSourcePath =
os.pwd / "dependencies" / "chisel-interface" / "axi4"
def scalaVersion = T(deps.scalaVer)
def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselIvy = None
def chiselPluginIvy = None
def mainargsIvy: Dep = deps.mainargs
}
object dwbb extends DWBB
trait DWBB extends millbuild.dependencies.`chisel-interface`.common.DWBBModule {
override def millSourcePath =
os.pwd / "dependencies" / "chisel-interface" / "dwbb"
def scalaVersion = T(deps.scalaVer)
def mainargsIvy = deps.mainargs
def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselIvy = None
def chiselPluginIvy = None
}
object sdram extends SDRAM
trait SDRAM
extends millbuild.dependencies.`chisel-interface`.common.SDRAMModule {
override def millSourcePath =
os.pwd / "dependencies" / "chisel-interface" / "sdram"
def scalaVersion = deps.scalaVer
def mainargsIvy = deps.mainargs
def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselIvy = None
def chiselPluginIvy = None
}
object sdramcontroller
extends millbuild.common.SDRAMControllerModule
with ScalafmtModule {
def millSourcePath = os.pwd / "sdramcontroller"
def scalaVersion = T(deps.scalaVer)
def axi4Module = axi4
def dwbbModule = dwbb
def sdramModule = sdram
def mainargsIvy = deps.mainargs
def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselPluginIvy = None
def chiselIvy = None
}
object elaborator extends Elaborator
trait Elaborator extends millbuild.common.ElaboratorModule {
def scalaVersion = T(deps.scalaVer)
def panamaconverterModule = panamaconverter
def circtInstallPath =
T.input(PathRef(os.Path(T.ctx().env("CIRCT_INSTALL_PATH"))))
def generators = Seq(sdramcontroller)
def mainargsIvy = deps.mainargs
def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselPluginIvy = None
def chiselIvy = None
}
object panamaconverter extends PanamaConverter
trait PanamaConverter extends millbuild.dependencies.chisel.build.PanamaConverter {
def crossValue = deps.scalaVer
override def millSourcePath =
os.pwd / "dependencies" / "chisel" / "panamaconverter"
def scalaVersion = T(deps.scalaVer)
}