Integrate Mempress memory tester (#1253)
This commit is contained in:
2
.github/scripts/check-commit.sh
vendored
2
.github/scripts/check-commit.sh
vendored
@@ -47,7 +47,7 @@ search () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
submodules=("cva6" "boom" "ibex" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor")
|
submodules=("cva6" "boom" "ibex" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor" "mempress")
|
||||||
dir="generators"
|
dir="generators"
|
||||||
branches=("master" "main" "dev")
|
branches=("master" "main" "dev")
|
||||||
search
|
search
|
||||||
|
|||||||
3
.github/scripts/defaults.sh
vendored
3
.github/scripts/defaults.sh
vendored
@@ -27,7 +27,7 @@ LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim
|
|||||||
declare -A grouping
|
declare -A grouping
|
||||||
grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket chipyard-nomem-scratchpad"
|
grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket chipyard-nomem-scratchpad"
|
||||||
grouping["group-peripherals"]="chipyard-dmirocket chipyard-blkdev chipyard-spiflashread chipyard-spiflashwrite chipyard-mmios chipyard-lbwif"
|
grouping["group-peripherals"]="chipyard-dmirocket chipyard-blkdev chipyard-spiflashread chipyard-spiflashwrite chipyard-mmios chipyard-lbwif"
|
||||||
grouping["group-accels"]="chipyard-fftgenerator chipyard-nvdla chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-streaming-fir chipyard-streaming-passthrough"
|
grouping["group-accels"]="chipyard-fftgenerator chipyard-nvdla chipyard-mempress chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-streaming-fir chipyard-streaming-passthrough"
|
||||||
grouping["group-constellation"]="chipyard-constellation"
|
grouping["group-constellation"]="chipyard-constellation"
|
||||||
grouping["group-tracegen"]="tracegen tracegen-boom"
|
grouping["group-tracegen"]="tracegen tracegen-boom"
|
||||||
grouping["group-other"]="icenet testchipip constellation"
|
grouping["group-other"]="icenet testchipip constellation"
|
||||||
@@ -39,6 +39,7 @@ mapping["chipyard-rocket"]=""
|
|||||||
mapping["chipyard-dmirocket"]=" CONFIG=dmiRocketConfig"
|
mapping["chipyard-dmirocket"]=" CONFIG=dmiRocketConfig"
|
||||||
mapping["chipyard-lbwif"]=" CONFIG=LBWIFRocketConfig"
|
mapping["chipyard-lbwif"]=" CONFIG=LBWIFRocketConfig"
|
||||||
mapping["chipyard-sha3"]=" CONFIG=Sha3RocketConfig"
|
mapping["chipyard-sha3"]=" CONFIG=Sha3RocketConfig"
|
||||||
|
mapping["chipyard-mempress"]=" CONFIG=MempressRocketConfig"
|
||||||
mapping["chipyard-digitaltop"]=" TOP=DigitalTop"
|
mapping["chipyard-digitaltop"]=" TOP=DigitalTop"
|
||||||
mapping["chipyard-streaming-fir"]=" CONFIG=StreamingFIRRocketConfig"
|
mapping["chipyard-streaming-fir"]=" CONFIG=StreamingFIRRocketConfig"
|
||||||
mapping["chipyard-streaming-passthrough"]=" CONFIG=StreamingPassthroughRocketConfig"
|
mapping["chipyard-streaming-passthrough"]=" CONFIG=StreamingPassthroughRocketConfig"
|
||||||
|
|||||||
4
.github/scripts/run-tests.sh
vendored
4
.github/scripts/run-tests.sh
vendored
@@ -62,6 +62,10 @@ case $1 in
|
|||||||
(cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh)
|
(cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh)
|
||||||
make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv
|
make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv
|
||||||
;;
|
;;
|
||||||
|
chipyard-mempress)
|
||||||
|
(cd $LOCAL_CHIPYARD_DIR/generators/mempress/software/src && make)
|
||||||
|
make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/mempress/software/src/mempress-rocc.riscv
|
||||||
|
;;
|
||||||
chipyard-streaming-passthrough)
|
chipyard-streaming-passthrough)
|
||||||
make -C $LOCAL_CHIPYARD_DIR/tests
|
make -C $LOCAL_CHIPYARD_DIR/tests
|
||||||
make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv
|
make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv
|
||||||
|
|||||||
26
.github/workflows/chipyard-run-tests.yml
vendored
26
.github/workflows/chipyard-run-tests.yml
vendored
@@ -791,6 +791,31 @@ jobs:
|
|||||||
group-key: "group-accels"
|
group-key: "group-accels"
|
||||||
project-key: "chipyard-nvdla"
|
project-key: "chipyard-nvdla"
|
||||||
|
|
||||||
|
chipyard-mempress-run-tests:
|
||||||
|
name: chipyard-mempress-run-tests
|
||||||
|
needs: prepare-chipyard-accels
|
||||||
|
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
|
||||||
|
uses: ./.github/actions/run-tests
|
||||||
|
with:
|
||||||
|
group-key: "group-accels"
|
||||||
|
project-key: "chipyard-mempress"
|
||||||
|
toolchain: "esp-tools"
|
||||||
|
|
||||||
|
|
||||||
tracegen-boom-run-tests:
|
tracegen-boom-run-tests:
|
||||||
name: tracegen-boom-run-tests
|
name: tracegen-boom-run-tests
|
||||||
needs: prepare-chipyard-tracegen
|
needs: prepare-chipyard-tracegen
|
||||||
@@ -1028,6 +1053,7 @@ jobs:
|
|||||||
chipyard-hwacha-run-tests,
|
chipyard-hwacha-run-tests,
|
||||||
chipyard-gemmini-run-tests,
|
chipyard-gemmini-run-tests,
|
||||||
chipyard-nvdla-run-tests,
|
chipyard-nvdla-run-tests,
|
||||||
|
chipyard-mempress-run-tests,
|
||||||
chipyard-constellation-run-tests,
|
chipyard-constellation-run-tests,
|
||||||
tracegen-boom-run-tests,
|
tracegen-boom-run-tests,
|
||||||
tracegen-run-tests,
|
tracegen-run-tests,
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -130,3 +130,6 @@
|
|||||||
[submodule "generators/constellation"]
|
[submodule "generators/constellation"]
|
||||||
path = generators/constellation
|
path = generators/constellation
|
||||||
url = https://github.com/ucb-bar/constellation.git
|
url = https://github.com/ucb-bar/constellation.git
|
||||||
|
[submodule "generators/mempress"]
|
||||||
|
path = generators/mempress
|
||||||
|
url = https://github.com/ucb-bar/mempress.git
|
||||||
|
|||||||
@@ -149,10 +149,16 @@ lazy val chipyard = (project in file("generators/chipyard"))
|
|||||||
sha3, // On separate line to allow for cleaner tutorial-setup patches
|
sha3, // On separate line to allow for cleaner tutorial-setup patches
|
||||||
dsptools, `rocket-dsp-utils`,
|
dsptools, `rocket-dsp-utils`,
|
||||||
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
||||||
constellation)
|
constellation, mempress)
|
||||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||||
.settings(commonSettings)
|
.settings(commonSettings)
|
||||||
|
|
||||||
|
lazy val mempress = (project in file("generators/mempress"))
|
||||||
|
.dependsOn(rocketchip, midasTargetUtils)
|
||||||
|
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||||
|
.settings(chiselTestSettings)
|
||||||
|
.settings(commonSettings)
|
||||||
|
|
||||||
lazy val constellation = (project in file("generators/constellation"))
|
lazy val constellation = (project in file("generators/constellation"))
|
||||||
.dependsOn(rocketchip)
|
.dependsOn(rocketchip)
|
||||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||||
|
|||||||
8
docs/Generators/Mempress.rst
Normal file
8
docs/Generators/Mempress.rst
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Mempress
|
||||||
|
====================================
|
||||||
|
|
||||||
|
Mempress is a RoCC accelerator that generates memory requests through TileLink. It sends out requests as hard as it can to stress test the memory hierarchy of the Chipyard/Rocketchip-based SoC.
|
||||||
|
|
||||||
|
Mempress can generate multiple **streams** of memory requests. Each stream can be set up to generate read or write requests and configured to generate strided or random access patterns. Furthermore, the memory footprint of each stream is also configurable.
|
||||||
|
|
||||||
|
To add the Mempress unit into the SoC, you should add the ``mempress.WithMemPress`` config fragment to the SoC configurations.
|
||||||
@@ -33,4 +33,5 @@ so changes to the generators themselves will automatically be used when building
|
|||||||
fft
|
fft
|
||||||
NVDLA
|
NVDLA
|
||||||
Sodor
|
Sodor
|
||||||
|
Mempress
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,16 @@ class TinyRocketConfig extends Config(
|
|||||||
new freechips.rocketchip.subsystem.With1TinyCore ++ // single tiny rocket-core
|
new freechips.rocketchip.subsystem.With1TinyCore ++ // single tiny rocket-core
|
||||||
new chipyard.config.AbstractConfig)
|
new chipyard.config.AbstractConfig)
|
||||||
|
|
||||||
|
class MempressRocketConfig extends Config(
|
||||||
|
new mempress.WithMemPress ++ // use Mempress (memory traffic generation) accelerator
|
||||||
|
new freechips.rocketchip.subsystem.WithNBanks(8) ++
|
||||||
|
new freechips.rocketchip.subsystem.WithInclusiveCache(nWays=16, capacityKB=2048) ++
|
||||||
|
new chipyard.config.WithExtMemIdBits(7) ++ // use 7 bits for tl like request id
|
||||||
|
new freechips.rocketchip.subsystem.WithNMemoryChannels(4) ++
|
||||||
|
new chipyard.config.WithSystemBusWidth(128) ++
|
||||||
|
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||||
|
new chipyard.config.AbstractConfig)
|
||||||
|
|
||||||
// DOC include start: FFTRocketConfig
|
// DOC include start: FFTRocketConfig
|
||||||
class FFTRocketConfig extends Config(
|
class FFTRocketConfig extends Config(
|
||||||
new fftgenerator.WithFFTGenerator(numPoints=8, width=16, decPt=8) ++ // add 8-point mmio fft at the default addr (0x2400) with 16bit fixed-point numbers.
|
new fftgenerator.WithFFTGenerator(numPoints=8, width=16, decPt=8) ++ // add 8-point mmio fft at the default addr (0x2400) with 16bit fixed-point numbers.
|
||||||
|
|||||||
@@ -72,3 +72,7 @@ class WithSerialTLBackingMemory extends Config((site, here, up) => {
|
|||||||
)}
|
)}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
class WithExtMemIdBits(n: Int) extends Config((site, here, up) => {
|
||||||
|
case ExtMem => up(ExtMem, site).map(x => x.copy(master = x.master.copy(idBits = n)))
|
||||||
|
})
|
||||||
|
|
||||||
|
|||||||
1
generators/mempress
Submodule
1
generators/mempress
Submodule
Submodule generators/mempress added at 647519c15e
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/build.sbt b/build.sbt
|
diff --git a/build.sbt b/build.sbt
|
||||||
index bbbb8251..b7adcb73 100644
|
index ec36a85f..c0c2849a 100644
|
||||||
--- a/build.sbt
|
--- a/build.sbt
|
||||||
+++ b/build.sbt
|
+++ b/build.sbt
|
||||||
@@ -143,8 +143,8 @@ lazy val testchipip = (project in file("generators/testchipip"))
|
@@ -146,7 +146,7 @@ lazy val testchipip = (project in file("generators/testchipip"))
|
||||||
|
|
||||||
lazy val chipyard = (project in file("generators/chipyard"))
|
lazy val chipyard = (project in file("generators/chipyard"))
|
||||||
.dependsOn(testchipip, rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell,
|
.dependsOn(testchipip, rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell,
|
||||||
@@ -10,9 +10,8 @@ index bbbb8251..b7adcb73 100644
|
|||||||
+// sha3, // On separate line to allow for cleaner tutorial-setup patches
|
+// sha3, // On separate line to allow for cleaner tutorial-setup patches
|
||||||
dsptools, `rocket-dsp-utils`,
|
dsptools, `rocket-dsp-utils`,
|
||||||
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
||||||
constellation)
|
constellation, mempress)
|
||||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
@@ -204,11 +204,11 @@ lazy val sodor = (project in file("generators/riscv-sodor"))
|
||||||
@@ -189,11 +189,11 @@ lazy val sodor = (project in file("generators/riscv-sodor"))
|
|
||||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||||
.settings(commonSettings)
|
.settings(commonSettings)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user