From 140d4557b79821663102762fa1a20ea2ecfed899 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Thu, 27 Jun 2024 18:19:40 -0700 Subject: [PATCH 1/7] Bump Spike --- generators/chipyard/src/main/scala/iobinders/IOBinders.scala | 1 - generators/testchipip | 2 +- toolchains/riscv-tools/riscv-isa-sim | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/generators/chipyard/src/main/scala/iobinders/IOBinders.scala b/generators/chipyard/src/main/scala/iobinders/IOBinders.scala index 61f347443c..ca64fc47be 100644 --- a/generators/chipyard/src/main/scala/iobinders/IOBinders.scala +++ b/generators/chipyard/src/main/scala/iobinders/IOBinders.scala @@ -486,7 +486,6 @@ class WithTraceIOPunchthrough extends OverrideLazyIOBinder({ val tiles = chipyardSystem.totalTiles.values val cfg = SpikeCosimConfig( isa = tiles.headOption.map(_.isaDTS).getOrElse(""), - vlen = tiles.headOption.map(_.tileParams.core.vLen).getOrElse(0), priv = tiles.headOption.map(t => if (t.usingUser) "MSU" else if (t.usingSupervisor) "MS" else "M").getOrElse(""), mem0_base = p(ExtMem).map(_.master.base).getOrElse(BigInt(0)), mem0_size = p(ExtMem).map(_.master.size).getOrElse(BigInt(0)), diff --git a/generators/testchipip b/generators/testchipip index 5856bedf49..af0bc5dcc3 160000 --- a/generators/testchipip +++ b/generators/testchipip @@ -1 +1 @@ -Subproject commit 5856bedf495188a95934969eac19a5fd9534bb0a +Subproject commit af0bc5dcc39d172f357847d9d81247a77642b516 diff --git a/toolchains/riscv-tools/riscv-isa-sim b/toolchains/riscv-tools/riscv-isa-sim index 4d8651be94..ed5f817613 160000 --- a/toolchains/riscv-tools/riscv-isa-sim +++ b/toolchains/riscv-tools/riscv-isa-sim @@ -1 +1 @@ -Subproject commit 4d8651be943ea706eb8dcb3443add2e7ccc117a6 +Subproject commit ed5f817613a066600f5e417a1e4d6af74db56ec5 From 0a046e6fd259e4e74abfc9a0e2a42a19410d3d12 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Jun 2024 13:13:39 -0700 Subject: [PATCH 2/7] Update SpikeTile isa str to include more useful extensions --- generators/chipyard/src/main/scala/SpikeTile.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/chipyard/src/main/scala/SpikeTile.scala b/generators/chipyard/src/main/scala/SpikeTile.scala index 6811be7a45..e435d7aaf8 100644 --- a/generators/chipyard/src/main/scala/SpikeTile.scala +++ b/generators/chipyard/src/main/scala/SpikeTile.scala @@ -115,7 +115,7 @@ class SpikeTile( val masterNode = visibilityNode val slaveNode = TLIdentityNode() - override def isaDTS = "rv64gcv_Zfh" + override def isaDTS = "rv64imafdcv_zicsr_zifencei_zihpm_zvl128b_zve64d" // Required entry of CPU device in the device tree for interrupt purpose val cpuDevice: SimpleDevice = new SimpleDevice("cpu", Seq("ucb-bar,spike", "riscv")) { From ec6c34ae95b75d76143a0bf48bd8d99605baa715 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Jun 2024 14:11:59 -0700 Subject: [PATCH 3/7] Bump riscv-spike-devices --- toolchains/riscv-tools/riscv-spike-devices | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchains/riscv-tools/riscv-spike-devices b/toolchains/riscv-tools/riscv-spike-devices index cc184f2cc1..67e123c1ca 160000 --- a/toolchains/riscv-tools/riscv-spike-devices +++ b/toolchains/riscv-tools/riscv-spike-devices @@ -1 +1 @@ -Subproject commit cc184f2cc179765bb7dcf4a82075403604a60813 +Subproject commit 67e123c1ca09533b0cde9b2cfc7b8a1f36155c46 From 02171cb97d03f1e224ded42c64decf9aea17122a Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Jun 2024 16:01:59 -0700 Subject: [PATCH 4/7] Update spiketile API --- generators/chipyard/src/main/resources/csrc/spiketile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/chipyard/src/main/resources/csrc/spiketile.cc b/generators/chipyard/src/main/resources/csrc/spiketile.cc index dd02d55e21..c90ed1d6c2 100644 --- a/generators/chipyard/src/main/resources/csrc/spiketile.cc +++ b/generators/chipyard/src/main/resources/csrc/spiketile.cc @@ -1076,7 +1076,7 @@ void chipyard_simif_t::loadmem(size_t base, const char* fname) { } loadmem_memif(this, tcm_base); reg_t entry; - load_elf(fname, &loadmem_memif, &entry); + load_elf(fname, &loadmem_memif, &entry, 0); } bool insn_should_fence(uint64_t bits) { From 3af6513fcc1a42f776bc40b3a8fec12d80c6a52a Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Jun 2024 16:16:09 -0700 Subject: [PATCH 5/7] Bump firesim --- sims/firesim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sims/firesim b/sims/firesim index 62ce5cbcba..7cc90d1844 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit 62ce5cbcbaf62e4fc8270b96e2abadbb9973c208 +Subproject commit 7cc90d184404006aa63ab5e9d999987faddf9ffd From 21723ea84b2cbaf58f6cd72d4e01978506afb66c Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Jun 2024 16:49:38 -0700 Subject: [PATCH 6/7] Bump riscv-isa-sim --- generators/chipyard/src/main/resources/csrc/spiketile.cc | 1 - toolchains/riscv-tools/riscv-isa-sim | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/generators/chipyard/src/main/resources/csrc/spiketile.cc b/generators/chipyard/src/main/resources/csrc/spiketile.cc index c90ed1d6c2..2dd207c978 100644 --- a/generators/chipyard/src/main/resources/csrc/spiketile.cc +++ b/generators/chipyard/src/main/resources/csrc/spiketile.cc @@ -462,7 +462,6 @@ chipyard_simif_t::chipyard_simif_t(size_t icache_ways, cfg.bootargs = nullptr; cfg.isa = isastr; cfg.priv = "MSU"; - cfg.varch = "vlen:128,elen:64"; cfg.misaligned = false; cfg.endianness = endianness_little; cfg.pmpregions = pmpregions; diff --git a/toolchains/riscv-tools/riscv-isa-sim b/toolchains/riscv-tools/riscv-isa-sim index ed5f817613..1b1a333763 160000 --- a/toolchains/riscv-tools/riscv-isa-sim +++ b/toolchains/riscv-tools/riscv-isa-sim @@ -1 +1 @@ -Subproject commit ed5f817613a066600f5e417a1e4d6af74db56ec5 +Subproject commit 1b1a333763eae2e74dbf38b39d9adab39c4bed7c From 877063cab2be3d42fab8449aaf174124508c9c9e Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Jun 2024 18:37:29 -0700 Subject: [PATCH 7/7] Update generate-ckpt loadarch formats to match spike --- generators/testchipip | 2 +- scripts/generate-ckpt.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/generators/testchipip b/generators/testchipip index af0bc5dcc3..c27a2e4a59 160000 --- a/generators/testchipip +++ b/generators/testchipip @@ -1 +1 @@ -Subproject commit af0bc5dcc39d172f357847d9d81247a77642b516 +Subproject commit c27a2e4a59163c18bd27bdb165cb01b57864d6cf diff --git a/scripts/generate-ckpt.sh b/scripts/generate-ckpt.sh index fe42d9971b..6d0daa0d23 100755 --- a/scripts/generate-ckpt.sh +++ b/scripts/generate-ckpt.sh @@ -142,7 +142,8 @@ echo "quit" >> $CMDS_FILE echo "spike -d --debug-cmd=$CMDS_FILE $SPIKEFLAGS $BINARY" > $SPIKECMD_FILE echo "Capturing state at checkpoint to spikeout" -spike -d --debug-cmd=$CMDS_FILE $SPIKEFLAGS $BINARY 2> $LOADARCH_FILE +echo $NHARTS > $LOADARCH_FILE +spike -d --debug-cmd=$CMDS_FILE $SPIKEFLAGS $BINARY 2>> $LOADARCH_FILE echo "Finding tohost/fromhost in elf file"