@@ -7,7 +7,7 @@ import $file.common
77import $file .`rocket-chip` .common
88import $file .`rocket-chip` .common
99import $file .`rocket-chip` .cde .common
10- import $file .`rocket-chip` .hardfloat .build
10+ import $file .`rocket-chip` .hardfloat .common
1111
1212val defaultScalaVersion = " 2.13.15"
1313
@@ -16,7 +16,9 @@ def defaultVersions = Map(
1616 " chisel-plugin" -> ivy " org.chipsalliance:::chisel-plugin:7.0.0 "
1717)
1818
19- trait HasChisel extends ScalaModule {
19+ val pwd = os.Path (sys.env(" MILL_WORKSPACE_ROOT" ))
20+
21+ trait HasChisel extends SbtModule {
2022 def chiselModule : Option [ScalaModule ] = None
2123
2224 def chiselPluginJar : T [Option [PathRef ]] = None
@@ -37,18 +39,24 @@ trait HasChisel extends ScalaModule {
3739
3840object rocketchip extends `rocket-chip` .common.RocketChipModule with HasChisel {
3941
40- val rcPath = os. pwd / " rocket-chip"
42+ val rcPath = pwd / " rocket-chip"
4143 override def millSourcePath = rcPath
4244
4345 def mainargsIvy = ivy " com.lihaoyi::mainargs:0.7.0 "
4446
4547 def json4sJacksonIvy = ivy " org.json4s::json4s-jackson:4.0.7 "
4648
47- object macros extends `rocket-chip` .common.MacrosModule with HasChisel {
49+ object macros extends `rocket-chip` .common.MacrosModule with SbtModule {
50+
51+ def scalaVersion : T [String ] = T (defaultScalaVersion)
52+
4853 def scalaReflectIvy = ivy " org.scala-lang:scala-reflect: ${scalaVersion}"
4954 }
5055
51- object cde extends `rocket-chip` .cde.common.CDEModule with HasChisel {
56+ object cde extends `rocket-chip` .cde.common.CDEModule with ScalaModule {
57+
58+ def scalaVersion : T [String ] = T (defaultScalaVersion)
59+
5260 override def millSourcePath = rcPath / " cde" / " cde"
5361 }
5462
@@ -64,8 +72,8 @@ object rocketchip extends `rocket-chip`.common.RocketChipModule with HasChisel {
6472
6573}
6674
67- object utility extends SbtModule with HasChisel {
68- override def millSourcePath = os. pwd / " utility"
75+ object utility extends HasChisel {
76+ override def millSourcePath = pwd / " utility"
6977
7078 override def moduleDeps = super .moduleDeps ++ Seq (rocketchip)
7179
@@ -74,27 +82,27 @@ object utility extends SbtModule with HasChisel {
7482 )
7583}
7684
77- object huancun extends SbtModule with HasChisel {
78- override def millSourcePath = os. pwd / " coupledL2" / " HuanCun"
85+ object huancun extends HasChisel {
86+ override def millSourcePath = pwd / " coupledL2" / " HuanCun"
7987
8088 override def moduleDeps = super .moduleDeps ++ Seq (
8189 rocketchip, utility
8290 )
8391}
8492
85- object coupledL2 extends SbtModule with HasChisel {
86- override def millSourcePath = os. pwd / " coupledL2"
93+ object coupledL2 extends HasChisel {
94+ override def millSourcePath = pwd / " coupledL2"
8795 override def moduleDeps = super .moduleDeps ++ Seq (
8896 rocketchip, utility, huancun
8997 )
9098}
9199
92- object openNCB extends SbtModule with HasChisel {
93- override def millSourcePath = os. pwd / " openNCB"
100+ object openNCB extends HasChisel {
101+ override def millSourcePath = pwd / " openNCB"
94102 override def moduleDeps = super .moduleDeps ++ Seq (rocketchip)
95103}
96104
97- object OpenLLC extends SbtModule with HasChisel with millbuild .common.OpenLLCModule {
105+ object OpenLLC extends HasChisel with $file .common.OpenLLCModule {
98106
99107 override def millSourcePath = millOuterCtx.millSourcePath
100108
@@ -106,7 +114,7 @@ object OpenLLC extends SbtModule with HasChisel with millbuild.common.OpenLLCMod
106114
107115 def openNCBModule : ScalaModule = openNCB
108116
109- object test extends SbtModuleTests with TestModule .ScalaTest
117+ object test extends SbtTests with TestModule .ScalaTest
110118
111119 override def scalacOptions = super .scalacOptions() ++ Agg (" -deprecation" , " -feature" )
112120
0 commit comments