Skip to content

Commit

Permalink
[build system] add t1-rocketv in build system for link t1 with rocket
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Aug 27, 2024
1 parent d772524 commit 4e4fd56
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ trait RocketV
def chiselIvy = None
}

object t1rocket extends T1Rocket

trait T1Rocket
extends millbuild.common.T1RocketModule
with ScalafmtModule {
def scalaVersion = T(v.scala)
def rocketModule = rocketv
def t1Module = t1

def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselPluginIvy = None
def chiselIvy = None
}

object ipemu extends IPEmulator

trait IPEmulator
Expand All @@ -161,6 +176,20 @@ trait RocketEmulator extends millbuild.common.RocketEmulatorModule {
def chiselIvy = None
}

object t1rocketemu extends T1RocketEmulator

trait T1RocketEmulator
extends millbuild.common.T1RocketEmulatorModule {
def scalaVersion = T(v.scala)

def t1rocketModule = t1rocket

def chiselModule = Some(chisel)
def chiselPluginJar = T(Some(chisel.pluginModule.jar()))
def chiselPluginIvy = None
def chiselIvy = None
}

object panamaconverter extends PanamaConverter

trait PanamaConverter
Expand Down Expand Up @@ -188,6 +217,8 @@ trait Elaborator
ipemu,
rocketv,
rocketemu,
t1rocket,
t1rocketemu,
)

def mainargsIvy = v.mainargs
Expand Down
17 changes: 17 additions & 0 deletions common.sc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ trait RocketVModule
def moduleDeps = super.moduleDeps ++ Seq(axi4Module, hardfloatModule)
}

// Link T1 example: RocketV+T1
trait T1RocketModule
extends ScalaModule
with HasChisel {
def rocketModule: ScalaModule
def t1Module: ScalaModule

def moduleDeps = super.moduleDeps ++ Seq(rocketModule, t1Module)
}

trait EmuHelperModule
extends ScalaModule
with HasChisel
Expand All @@ -101,6 +111,13 @@ trait IPEmulatorModule
def moduleDeps = super.moduleDeps ++ Seq(t1Module)
}

trait T1RocketEmulatorModule
extends ScalaModule
with HasChisel {
def t1rocketModule: ScalaModule
def moduleDeps = super.moduleDeps ++ Seq(t1rocketModule)
}

trait ElaboratorModule
extends ScalaModule
with HasChisel {
Expand Down
2 changes: 2 additions & 0 deletions nix/t1/t1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ let
./../../elaborator
./../../configgen/src
./../../rocketv
./../../t1rocket
./../../t1rocketemu
./../../rocketemu/src
];
};
Expand Down

0 comments on commit 4e4fd56

Please sign in to comment.