Merge pull request #1303 from ucb-bar/ultrabump

Bump to scala 2.13.10/chisel 3.5.5/latest rocketchip
This commit is contained in:
Jerry Zhao
2023-02-01 18:10:38 -08:00
committed by GitHub
35 changed files with 87 additions and 97 deletions

View File

@@ -64,7 +64,6 @@ mapping["chipyard-constellation"]=" CONFIG=SharedNoCConfig"
mapping["constellation"]=" SUB_PROJECT=constellation"
mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests"
mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests"
mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests"
mapping["icenet"]="SUB_PROJECT=icenet"
mapping["testchipip"]="SUB_PROJECT=testchipip"

View File

@@ -16,4 +16,4 @@ cd $REMOTE_CHIPYARD_DIR
# Run Firesim Scala Tests
export FIRESIM_ENV_SOURCED=1;
export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache
make -C $REMOTE_FIRESIM_DIR JAVA_OPTS="$REMOTE_JAVA_OPTS" SBT_OPTS="$REMOTE_SBT_OPTS" testOnly ${mapping[$1]}
make -C $REMOTE_FIRESIM_DIR JAVA_OPTS="$REMOTE_JAVA_OPTS" SBT_OPTS="$REMOTE_SBT_OPTS" TARGET_SBT_PROJECT="{file:$REMOTE_CHIPYARD_DIR}firechip" testOnly ${mapping[$1]}

View File

@@ -1003,30 +1003,6 @@ jobs:
project-key: "fireboom"
run-script: "remote-run-firesim-scala-tests.sh"
firesim-multiclock-run-tests:
name: firesim-multiclock-run-tests
needs: setup-complete
runs-on: self-hosted
steps:
- name: Delete old checkout
run: |
ls -alh .
rm -rf ${{ github.workspace }}/* || true
rm -rf ${{ github.workspace }}/.* || true
ls -alh .
- name: Checkout
uses: actions/checkout@v3
- name: Git workaround
uses: ./.github/actions/git-workaround
- name: Create conda env
uses: ./.github/actions/create-conda-env
- name: Run tests on self-hosted
uses: ./.github/actions/run-tests
with:
group-key: "extra-tests"
project-key: "firesim-multiclock"
run-script: "remote-run-firesim-scala-tests.sh"
# Sentinel job to simplify how we specify which checks need to pass in branch
# protection and in Mergify
#
@@ -1061,8 +1037,7 @@ jobs:
testchipip-run-tests,
constellation-run-tests,
prepare-chipyard-fpga, # firesim-run-tests,
fireboom-run-tests,
firesim-multiclock-run-tests]
fireboom-run-tests]
runs-on: ubuntu-latest
steps:
- run: echo Success!

View File

@@ -7,13 +7,12 @@ lazy val chipyardRoot = Project("chipyardRoot", file("."))
lazy val commonSettings = Seq(
organization := "edu.berkeley.cs",
version := "1.6",
scalaVersion := "2.12.10",
scalaVersion := "2.13.10",
assembly / test := {},
assembly / assemblyMergeStrategy := { _ match {
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case _ => MergeStrategy.first}},
scalacOptions ++= Seq("-deprecation","-unchecked","-Xsource:2.11"),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full),
scalacOptions ++= Seq("-deprecation","-unchecked"),
unmanagedBase := (chipyardRoot / unmanagedBase).value,
allDependencies := {
// drop specific maven dependencies in subprojects in favor of Chipyard's version
@@ -60,7 +59,7 @@ def isolateAllTests(tests: Seq[TestDefinition]) = tests map { test =>
new Group(test.name, Seq(test), SubProcess(options))
} toSeq
val chiselVersion = "3.5.2"
val chiselVersion = "3.5.5"
lazy val chiselSettings = Seq(
libraryDependencies ++= Seq("edu.berkeley.cs" %% "chisel3" % chiselVersion,
@@ -68,9 +67,6 @@ lazy val chiselSettings = Seq(
"org.apache.commons" % "commons-text" % "1.9"),
addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % chiselVersion cross CrossVersion.full))
val firrtlVersion = "1.5.1"
lazy val firrtlSettings = Seq(libraryDependencies ++= Seq("edu.berkeley.cs" %% "firrtl" % firrtlVersion))
val chiselTestVersion = "2.5.1"
@@ -88,7 +84,7 @@ lazy val hardfloat = (project in rocketChipDir / "hardfloat")
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.json4s" %% "json4s-jackson" % "3.6.1",
"org.json4s" %% "json4s-jackson" % "3.6.6",
"org.scalatest" %% "scalatest" % "3.2.0" % "test"
)
)
@@ -98,7 +94,7 @@ lazy val rocketMacros = (project in rocketChipDir / "macros")
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.json4s" %% "json4s-jackson" % "3.6.1",
"org.json4s" %% "json4s-jackson" % "3.6.6",
"org.scalatest" %% "scalatest" % "3.2.0" % "test"
)
)
@@ -108,7 +104,7 @@ lazy val rocketConfig = (project in rocketChipDir / "api-config-chipsalliance/bu
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.json4s" %% "json4s-jackson" % "3.6.1",
"org.json4s" %% "json4s-jackson" % "3.6.6",
"org.scalatest" %% "scalatest" % "3.2.0" % "test"
)
)
@@ -120,15 +116,14 @@ lazy val rocketchip = freshProject("rocketchip", rocketChipDir)
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.json4s" %% "json4s-jackson" % "3.6.1",
"org.apache.commons" % "commons-lang3" % "3.12.0",
"org.json4s" %% "json4s-jackson" % "3.6.6",
"org.scalatest" %% "scalatest" % "3.2.0" % "test"
)
)
.settings( // Settings for scalafix
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalacOptions += "-Ywarn-unused-import"
scalacOptions += "-Ywarn-unused"
)
lazy val rocketLibDeps = (rocketchip / Keys.libraryDependencies)
@@ -185,7 +180,7 @@ lazy val hwacha = (project in file("generators/hwacha"))
.settings(commonSettings)
lazy val boom = (project in file("generators/boom"))
.dependsOn(testchipip, rocketchip)
.dependsOn(rocketchip)
.settings(libraryDependencies ++= rocketLibDeps.value)
.settings(commonSettings)
@@ -242,7 +237,7 @@ lazy val dsptools = freshProject("dsptools", file("./tools/dsptools"))
commonSettings,
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.+" % "test",
"org.typelevel" %% "spire" % "0.16.2",
"org.typelevel" %% "spire" % "0.17.0",
"org.scalanlp" %% "breeze" % "1.1",
"junit" % "junit" % "4.13" % "test",
"org.scalacheck" %% "scalacheck" % "1.14.3" % "test",

View File

@@ -234,7 +234,14 @@ class WithTieOffInterrupts extends OverrideHarnessBinder({
class WithTieOffL2FBusAXI extends OverrideHarnessBinder({
(system: CanHaveSlaveAXI4Port, th: HasHarnessSignalReferences, ports: Seq[ClockedIO[AXI4Bundle]]) => {
ports.foreach({ p => p := DontCare; p.bits.tieoff() })
ports.foreach({ p =>
p.bits := DontCare
p.bits.aw.valid := false.B
p.bits.w.valid := false.B
p.bits.b.ready := false.B
p.bits.ar.valid := false.B
p.bits.r.ready := false.B
})
}
})
@@ -274,7 +281,10 @@ class WithTiedOffDebug extends OverrideHarnessBinder({
d.dmiClock := false.B.asClock
d.dmiReset := true.B
case a: ClockedAPBBundle =>
a.tieoff()
a.pready := false.B
a.pslverr := false.B
a.prdata := 0.U
a.pduser := DontCare
a.clock := false.B.asClock
a.reset := true.B.asAsyncReset
a.psel := false.B

View File

@@ -287,7 +287,7 @@ class WithAXI4MemPunchthrough extends OverrideLazyIOBinder({
p.clock := clockBundle.clock
p.reset := clockBundle.reset
p
})
}).toSeq
(ports, Nil)
}
}
@@ -307,7 +307,7 @@ class WithAXI4MMIOPunchthrough extends OverrideLazyIOBinder({
p.clock := clockBundle.clock
p.reset := clockBundle.reset
p
})
}).toSeq
(ports, Nil)
}
}
@@ -326,7 +326,7 @@ class WithL2FBusAXI4Punchthrough extends OverrideLazyIOBinder({
m <> p.bits
p.clock := clockBundle.clock
p
})
}).toSeq
(ports, Nil)
}
}

View File

@@ -74,11 +74,15 @@ class TestSuiteHelper
addSuites(env.map(rv32uf))
if (cfg.fLen >= 64)
addSuites(env.map(rv32ud))
if (cfg.minFLen <= 16)
addSuites(env.map(rv32uzfh))
} else {
addSuite(rv32udBenchmarks)
addSuites(env.map(rv64uf))
if (cfg.fLen >= 64)
addSuites(env.map(rv64ud))
if (cfg.minFLen <= 16)
addSuites(env.map(rv64uzfh))
}
}
if (coreParams.useAtomics) {

View File

@@ -119,7 +119,8 @@ case class DividerOnlyClockGeneratorNode(pllName: String)(implicit valName: ValN
class DividerOnlyClockGenerator(pllName: String)(implicit p: Parameters, valName: ValName) extends LazyModule {
val node = DividerOnlyClockGeneratorNode(pllName)
lazy val module = new LazyRawModuleImp(this) {
lazy val module = new Impl
class Impl extends LazyRawModuleImp(this) {
require(node.out.size == 1, "Idealized PLL expects to generate a single output clock group. Use a ClockGroupAggregator")
val (refClock, ClockEdgeParameters(_, refSinkParam, _, _)) = node.in.head
val (outClocks, ClockGroupEdgeParameters(_, outSinkParams, _, _)) = node.out.head

View File

@@ -34,7 +34,7 @@ class TileResetSetter(address: BigInt, beatBytes: Int, tileNames: Seq[String], i
}
})
tlNode.regmap((0 until nTiles).map({ i =>
i * 4 -> Seq(RegField.rwReg(1, r_tile_resets(i).io)),
i * 4 -> Seq(RegField.rwReg(1, r_tile_resets(i).io))
}): _*)
val tileMap = tileNames.zipWithIndex.map({ case (n, i) =>

View File

@@ -25,7 +25,7 @@ class WithL2TLBs(entries: Int) extends Config((site, here, up) => {
class WithTraceIO extends Config((site, here, up) => {
case TilesLocated(InSubsystem) => up(TilesLocated(InSubsystem), site) map {
case tp: BoomTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
trace = true))
core = tp.tileParams.core.copy(trace = true)))
case tp: CVA6TileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
trace = true))
case other => other
@@ -36,7 +36,7 @@ class WithTraceIO extends Config((site, here, up) => {
class WithNoTraceIO extends Config((site, here, up) => {
case TilesLocated(InSubsystem) => up(TilesLocated(InSubsystem), site) map {
case tp: BoomTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
trace = false))
core = tp.tileParams.core.copy(trace = false)))
case tp: CVA6TileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
trace = false))
case other => other

View File

@@ -62,6 +62,11 @@ case class MyCoreParams(
val decodeWidth: Int = 1 // TODO: Check
val fetchWidth: Int = 1 // TODO: Check
val retireWidth: Int = 2
val useBitManip: Boolean = false
val useBitManipCrypto: Boolean = false
val useCryptoNIST: Boolean = false
val useCryptoSM: Boolean = false
val traceHasWdata: Boolean = false
}
// DOC include start: CanAttachTile

View File

@@ -40,7 +40,7 @@ class AddDefaultTests extends Phase with HasRocketChipStageUtils {
// If a custom test suite is set up, use the custom test suite
annotations += CustomMakefragSnippet(p(TestSuitesKey).apply(tileParams, suiteHelper, p))
RocketTestSuiteAnnotation(suiteHelper.suites.values.toSeq) +: annotations
RocketTestSuiteAnnotation(suiteHelper.suites.values.toSeq) +: annotations.toSeq
}

View File

@@ -76,7 +76,7 @@ class WithSerialBridge extends OverrideHarnessBinder({
val ram = withClockAndReset(th.buildtopClock, th.buildtopReset) {
SerialAdapter.connectHarnessRAM(system.serdesser.get, bits, th.buildtopReset)
}
SerialBridge(th.buildtopClock, ram.module.io.tsi_ser, p(ExtMem).map(_ => MainMemoryConsts.globalName))
SerialBridge(th.buildtopClock, ram.module.io.tsi_ser, p(ExtMem).map(_ => MainMemoryConsts.globalName), th.buildtopReset.asBool)
}
Nil
}
@@ -97,7 +97,7 @@ class WithUARTBridge extends OverrideHarnessBinder({
val pbusClockNode = system.outer.asInstanceOf[HasTileLinkLocations].locateTLBusWrapper(PBUS).fixedClockNode
val pbusClock = pbusClockNode.in.head._1.clock
BoringUtils.bore(pbusClock, Seq(uartSyncClock))
ports.map { p => UARTBridge(uartSyncClock, p)(system.p) }; Nil
ports.map { p => UARTBridge(uartSyncClock, p, th.buildtopReset.asBool)(system.p) }; Nil
})
class WithBlockDeviceBridge extends OverrideHarnessBinder({
@@ -134,7 +134,7 @@ class WithAXIOverSerialTLCombinedBridges extends OverrideHarnessBinder({
axiClockBundle,
th.buildtopReset)
}
SerialBridge(th.buildtopClock, harnessMultiClockAXIRAM.module.io.tsi_ser, Some(MainMemoryConsts.globalName))
SerialBridge(th.buildtopClock, harnessMultiClockAXIRAM.module.io.tsi_ser, Some(MainMemoryConsts.globalName), th.buildtopReset.asBool)
// connect SimAxiMem
(harnessMultiClockAXIRAM.mem_axi4 zip harnessMultiClockAXIRAM.memNode.edges.in).map { case (axi4, edge) =>

View File

@@ -1,3 +1,3 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.21")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3")

View File

@@ -4,10 +4,10 @@
set -e
set -o pipefail
RDIR=$(git rev-parse --show-toplevel)
CYDIR=$(git rev-parse --show-toplevel)
# get helpful utilities
source $RDIR/scripts/utils.sh
source $CYDIR/scripts/utils.sh
common_setup
@@ -90,7 +90,7 @@ run_step() {
# setup and install conda environment
if run_step "1"; then
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
CONDA_REQS=$RDIR/conda-reqs
CONDA_REQS=$CYDIR/conda-reqs
CONDA_LOCK_REQS=$CONDA_REQS/conda-lock-reqs
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
@@ -100,10 +100,10 @@ if run_step "1"; then
fi
# use conda-lock to create env
conda-lock install -p $RDIR/.conda-env $LOCKFILE
conda-lock install -p $CYDIR/.conda-env $LOCKFILE
source $RDIR/.conda-env/etc/profile.d/conda.sh
conda activate $RDIR/.conda-env
source $CYDIR/.conda-env/etc/profile.d/conda.sh
conda activate $CYDIR/.conda-env
fi
if [ -z "$FORCE_FLAG" ]; then
@@ -115,8 +115,8 @@ fi
# initialize all submodules (without the toolchain submodules)
if run_step "2"; then
$RDIR/scripts/init-submodules-no-riscv-tools.sh $FORCE_FLAG
$RDIR/scripts/init-fpga.sh $FORCE_FLAG
$CYDIR/scripts/init-submodules-no-riscv-tools.sh $FORCE_FLAG
$CYDIR/scripts/init-fpga.sh $FORCE_FLAG
fi
# build extra toolchain collateral (i.e. spike, pk, riscv-tests, libgloss)
@@ -130,17 +130,17 @@ if run_step "3"; then
fi
PREFIX=$RISCV
fi
$RDIR/scripts/build-toolchain-extra.sh $TOOLCHAIN_TYPE -p $PREFIX
$CYDIR/scripts/build-toolchain-extra.sh $TOOLCHAIN_TYPE -p $PREFIX
fi
# run ctags for code navigation
if run_step "4"; then
$RDIR/scripts/gen-tags.sh
$CYDIR/scripts/gen-tags.sh
fi
# precompile chipyard scala sources
if run_step "5"; then
pushd $RDIR/sims/verilator
pushd $CYDIR/sims/verilator
make launch-sbt SBT_COMMAND=";project chipyard; compile"
make launch-sbt SBT_COMMAND=";project tapeout; compile"
popd
@@ -148,16 +148,17 @@ fi
# setup firesim
if run_step "6"; then
$RDIR/scripts/firesim-setup.sh
$RDIR/sims/firesim/gen-tags.sh
$CYDIR/scripts/firesim-setup.sh
$CYDIR/sims/firesim/gen-tags.sh
# precompile firesim scala sources
if run_step "7"; then
pushd $RDIR/sims/firesim
pushd $CYDIR/sims/firesim
(
echo $CYDIR
source sourceme-f1-manager.sh --skip-ssh-setup
pushd sim
make sbt SBT_COMMAND="project firechip; compile" TARGET_PROJECT=firesim
make sbt SBT_COMMAND="project {file:$CYDIR}firechip; compile" TARGET_PROJECT=firesim
popd
)
popd
@@ -166,12 +167,12 @@ fi
# setup firemarshal
if run_step "8"; then
pushd $RDIR/software/firemarshal
pushd $CYDIR/software/firemarshal
./init-submodules.sh
# precompile firemarshal buildroot sources
if run_step "9"; then
source $RDIR/scripts/fix-open-files.sh
source $CYDIR/scripts/fix-open-files.sh
./marshal $VERBOSE_FLAG build br-base.json
./marshal $VERBOSE_FLAG clean br-base.json
fi
@@ -180,13 +181,13 @@ fi
# do misc. cleanup for a "clean" git status
if run_step "10"; then
$RDIR/scripts/repo-clean.sh
$CYDIR/scripts/repo-clean.sh
fi
cat <<EOT >> env.sh
# line auto-generated by $0
conda activate $RDIR/.conda-env
source $RDIR/scripts/fix-open-files.sh
conda activate $CYDIR/.conda-env
source $CYDIR/scripts/fix-open-files.sh
EOT
echo "Setup complete!"