diff --git a/.gitmodules b/.gitmodules index 03010358b3..ca80d66105 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,3 +37,6 @@ [submodule "generators/icenet"] path = generators/icenet url = https://github.com/firesim/icenet.git +[submodule "generators/block-inclusivecache-sifive"] + path = generators/sifive-cache + url = https://github.com/sifive/block-inclusivecache-sifive.git diff --git a/build.sbt b/build.sbt index f2fa105c63..cb3a0b69a8 100644 --- a/build.sbt +++ b/build.sbt @@ -81,7 +81,7 @@ lazy val testchipip = (project in file("generators/testchipip")) .settings(commonSettings) lazy val example = conditionalDependsOn(project in file("generators/example")) - .dependsOn(boom, hwacha, sifive_blocks) + .dependsOn(boom, hwacha, sifive_blocks, sifive_cache) .settings(commonSettings) lazy val utilities = conditionalDependsOn(project in file("generators/utilities")) @@ -114,12 +114,17 @@ lazy val sifive_blocks = (project in file("generators/sifive-blocks")) .dependsOn(rocketchip) .settings(commonSettings) +lazy val sifive_cache = (project in file("generators/sifive-cache")).settings( + commonSettings, + scalaSource in Compile := baseDirectory.value / "craft" + ).dependsOn(rocketchip) + // Library components of FireSim lazy val midas = ProjectRef(firesimDir, "midas") lazy val firesimLib = ProjectRef(firesimDir, "firesimLib") lazy val firechip = (project in file("generators/firechip")) - .dependsOn(boom, icenet, testchipip, sifive_blocks, midasTargetUtils, midas, firesimLib % "test->test;compile->compile") + .dependsOn(boom, icenet, testchipip, sifive_blocks, sifive_cache, midasTargetUtils, midas, firesimLib % "test->test;compile->compile") .settings( commonSettings, testGrouping in Test := isolateAllTests( (definedTests in Test).value ) diff --git a/common.mk b/common.mk index a816024831..310da07cdb 100644 --- a/common.mk +++ b/common.mk @@ -8,7 +8,7 @@ SHELL=/bin/bash ######################################################################################### lookup_scala_srcs = $(shell find -L $(1)/ -iname "*.scala" 2> /dev/null) -PACKAGES=$(addprefix generators/, rocket-chip testchipip boom hwacha sifive-blocks example) \ +PACKAGES=$(addprefix generators/, rocket-chip testchipip boom hwacha sifive-blocks sifive-cache example) \ $(addprefix sims/firesim/sim/, . firesim-lib midas midas/targetutils) SCALA_SOURCES=$(foreach pkg,$(PACKAGES),$(call lookup_scala_srcs,$(base_dir)/$(pkg)/src/main/scala)) diff --git a/generators/example/src/main/scala/Configs.scala b/generators/example/src/main/scala/Configs.scala index cd81f89408..c2334ca8da 100644 --- a/generators/example/src/main/scala/Configs.scala +++ b/generators/example/src/main/scala/Configs.scala @@ -3,7 +3,7 @@ package example import chisel3._ import freechips.rocketchip.config.{Config} -import freechips.rocketchip.subsystem.{WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32, WithExtMemSize, WithNBanks} +import freechips.rocketchip.subsystem.{WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32, WithExtMemSize, WithNBanks, WithInclusiveCache} import testchipip._ @@ -62,6 +62,9 @@ class GB1MemoryConfig extends Config( new WithExtMemSize((1<<30) * 1L) ++ new DefaultRocketConfig) +class RocketL2Config extends Config( + new WithInclusiveCache ++ new DefaultRocketConfig) + // ------------ // BOOM Configs // ------------ @@ -142,6 +145,9 @@ class RV32UnifiedBoomConfig extends Config( new WithBootROM ++ new boom.system.SmallRV32UnifiedBoomConfig) +class BoomL2Config extends Config( + new WithInclusiveCache ++ new SmallDefaultBoomConfig) + // --------------------- // BOOM and Rocket Configs // --------------------- @@ -247,3 +253,6 @@ class RV32BoomAndRocketConfig extends Config( new freechips.rocketchip.subsystem.WithRV32 ++ new freechips.rocketchip.subsystem.WithNBigCores(1) ++ new freechips.rocketchip.system.BaseConfig) + +class DualCoreRocketL2Config extends Config( + new WithInclusiveCache ++ new DualCoreRocketConfig) diff --git a/generators/sifive-cache b/generators/sifive-cache new file mode 160000 index 0000000000..13d0c2f178 --- /dev/null +++ b/generators/sifive-cache @@ -0,0 +1 @@ +Subproject commit 13d0c2f17853a658ae86eae793718c71ac82dddf diff --git a/tools/firrtl b/tools/firrtl index 228c9a4b74..99ae1d6649 160000 --- a/tools/firrtl +++ b/tools/firrtl @@ -1 +1 @@ -Subproject commit 228c9a4b7432ac52178d63b8f27fe064aec71e9c +Subproject commit 99ae1d6649f1731c5dec2098b10733735232b72c