Remove sha3 due to no chisel6 compatibility
This commit is contained in:
2
.github/scripts/check-commit.sh
vendored
2
.github/scripts/check-commit.sh
vendored
@@ -45,7 +45,7 @@ search () {
|
||||
done
|
||||
}
|
||||
|
||||
submodules=("cva6" "boom" "ibex" "gemmini" "icenet" "nvdla" "rocket-chip" "sha3" "rocket-chip-blocks" "rocket-chip-inclusive-cache" "testchipip" "riscv-sodor" "mempress" "bar-fetchers" "shuttle" "constellation" "fft-generator" "hardfloat" "caliptra-aes-acc" "rocc-acc-utils" "diplomacy")
|
||||
submodules=("cva6" "boom" "ibex" "gemmini" "icenet" "nvdla" "rocket-chip" "rocket-chip-blocks" "rocket-chip-inclusive-cache" "testchipip" "riscv-sodor" "mempress" "bar-fetchers" "shuttle" "constellation" "fft-generator" "hardfloat" "caliptra-aes-acc" "rocc-acc-utils" "diplomacy")
|
||||
dir="generators"
|
||||
branches=("master" "main" "dev")
|
||||
search
|
||||
|
||||
3
.github/scripts/defaults.sh
vendored
3
.github/scripts/defaults.sh
vendored
@@ -30,7 +30,7 @@ REMOTE_COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache
|
||||
declare -A grouping
|
||||
grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boomv3 chipyard-boomv4 chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket chipyard-nomem-scratchpad chipyard-spike chipyard-clone chipyard-prefetchers chipyard-shuttle"
|
||||
grouping["group-peripherals"]="chipyard-dmirocket chipyard-dmiboomv3 chipyard-dmiboomv4 chipyard-spiflashwrite chipyard-mmios chipyard-nocores chipyard-manyperipherals chipyard-chiplike chipyard-tethered chipyard-symmetric chipyard-llcchiplet"
|
||||
grouping["group-accels"]="chipyard-mempress chipyard-sha3 chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla chipyard-aes256ecb"
|
||||
grouping["group-accels"]="chipyard-mempress chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla chipyard-aes256ecb"
|
||||
grouping["group-constellation"]="chipyard-constellation"
|
||||
grouping["group-tracegen"]="tracegen tracegen-boomv3 tracegen-boomv4"
|
||||
grouping["group-other"]="icenet testchipip constellation rocketchip-amba rocketchip-tlsimple rocketchip-tlwidth rocketchip-tlxbar chipyard-clusters"
|
||||
@@ -40,7 +40,6 @@ grouping["group-fpga"]="arty35t arty100t nexysvideo vc707 vcu118"
|
||||
declare -A mapping
|
||||
mapping["chipyard-rocket"]=" CONFIG=QuadChannelRocketConfig"
|
||||
mapping["chipyard-dmirocket"]=" CONFIG=dmiRocketConfig"
|
||||
mapping["chipyard-sha3"]=" CONFIG=Sha3RocketConfig"
|
||||
mapping["chipyard-mempress"]=" CONFIG=MempressRocketConfig"
|
||||
mapping["chipyard-prefetchers"]=" CONFIG=PrefetchingRocketConfig"
|
||||
mapping["chipyard-digitaltop"]=" TOP=DigitalTop"
|
||||
|
||||
4
.github/scripts/run-tests.sh
vendored
4
.github/scripts/run-tests.sh
vendored
@@ -85,10 +85,6 @@ case $1 in
|
||||
run_binary BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal
|
||||
run_binary BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal
|
||||
;;
|
||||
chipyard-sha3)
|
||||
(cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh)
|
||||
run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv
|
||||
;;
|
||||
chipyard-mempress)
|
||||
(cd $LOCAL_CHIPYARD_DIR/generators/mempress/software/src && make)
|
||||
run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/mempress/software/src/mempress-rocc.riscv
|
||||
|
||||
48
.github/workflows/chipyard-run-tests.yml
vendored
48
.github/workflows/chipyard-run-tests.yml
vendored
@@ -119,29 +119,6 @@ jobs:
|
||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
||||
.github/scripts/check-commit.sh
|
||||
|
||||
tutorial-setup-check:
|
||||
name: tutorial-setup-check
|
||||
needs: [setup-complete]
|
||||
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||
runs-on: as4
|
||||
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: Check that the tutorial-setup patches apply
|
||||
run: |
|
||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
||||
scripts/tutorial-setup.sh
|
||||
|
||||
documentation-check:
|
||||
name: documentation-check
|
||||
needs: [setup-complete]
|
||||
@@ -800,29 +777,6 @@ jobs:
|
||||
group-key: "group-peripherals"
|
||||
project-key: "chipyard-llcchiplet"
|
||||
|
||||
chipyard-sha3-run-tests:
|
||||
name: chipyard-sha3-run-tests
|
||||
needs: prepare-chipyard-accels
|
||||
runs-on: as4
|
||||
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-sha3"
|
||||
|
||||
chipyard-gemmini-run-tests:
|
||||
name: chipyard-gemmini-run-tests
|
||||
needs: prepare-chipyard-accels
|
||||
@@ -1172,7 +1126,6 @@ jobs:
|
||||
all_tests_passed:
|
||||
name: "all tests passed"
|
||||
needs: [commit-on-master-check,
|
||||
tutorial-setup-check,
|
||||
documentation-check,
|
||||
chipyard-rocket-run-tests,
|
||||
chipyard-hetero-run-tests,
|
||||
@@ -1190,7 +1143,6 @@ jobs:
|
||||
chipyard-tethered-run-tests,
|
||||
chipyard-symmetric-run-tests,
|
||||
chipyard-llcchiplet-run-tests,
|
||||
chipyard-sha3-run-tests,
|
||||
chipyard-gemmini-run-tests,
|
||||
chipyard-manymmioaccels-run-tests, # chipyard-nvdla-run-tests,
|
||||
chipyard-prefetchers-run-tests,
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -55,9 +55,6 @@
|
||||
[submodule "generators/rocket-chip-inclusive-cache"]
|
||||
path = generators/rocket-chip-inclusive-cache
|
||||
url = https://github.com/chipsalliance/rocket-chip-inclusive-cache.git
|
||||
[submodule "generators/sha3"]
|
||||
path = generators/sha3
|
||||
url = https://github.com/ucb-bar/sha3.git
|
||||
[submodule "generators/shuttle"]
|
||||
path = generators/shuttle
|
||||
url = https://github.com/ucb-bar/shuttle.git
|
||||
|
||||
@@ -157,7 +157,6 @@ lazy val testchipip = (project in file("generators/testchipip"))
|
||||
|
||||
lazy val chipyard = (project in file("generators/chipyard"))
|
||||
.dependsOn(testchipip, rocketchip, boom, rocketchip_blocks, rocketchip_inclusive_cache,
|
||||
sha3, // On separate line to allow for cleaner tutorial-setup patches
|
||||
dsptools, rocket_dsp_utils,
|
||||
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
||||
constellation, mempress, barf, shuttle, caliptra_aes)
|
||||
@@ -224,11 +223,6 @@ lazy val sodor = (project in file("generators/riscv-sodor"))
|
||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||
.settings(commonSettings)
|
||||
|
||||
lazy val sha3 = (project in file("generators/sha3"))
|
||||
.dependsOn(rocketchip, midasTargetUtils)
|
||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||
.settings(commonSettings)
|
||||
|
||||
lazy val gemmini = (project in file("generators/gemmini"))
|
||||
.dependsOn(rocketchip)
|
||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||
|
||||
@@ -34,10 +34,6 @@ Accelerators
|
||||
**Gemmini**
|
||||
A matrix-multiply accelerator targeting neural-networks
|
||||
|
||||
**SHA3**
|
||||
A fixed-function accelerator for the SHA3 hash function. This simple accelerator is used as a demonstration for some of the
|
||||
Chipyard integration flows using the RoCC interface.
|
||||
|
||||
System Components:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ should look something like this:
|
||||
|
||||
lazy val chipyard = (project in file("generators/chipyard"))
|
||||
.dependsOn(testchipip, rocketchip, boom, rocketchip_blocks, rocketchip_inclusive_cache,
|
||||
sha3, dsptools, `rocket-dsp-utils`,
|
||||
dsptools, `rocket-dsp-utils`,
|
||||
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
||||
yourproject, // <- added to the middle of the list for simplicity
|
||||
constellation, mempress)
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
SHA3 RoCC Accelerator
|
||||
===================================
|
||||
The SHA3 accelerator is a basic RoCC accelerator for the SHA3 hashing algorithm.
|
||||
We like using SHA3 in Chipyard tutorial content because it is a self-contained, simple
|
||||
example of integrating a custom accelerator into Chipyard.
|
||||
|
||||
|
||||
Introduction
|
||||
-----------------------------------
|
||||
Secure hashing algorithms represent a class of hashing functions that provide four attributes: ease
|
||||
of hash computation, inability to generate the message from the hash (one-way property), inability
|
||||
to change the message and not the hash (weakly collision free property), and inability to find
|
||||
two messages with the same hash (strongly collision free property). The National Institute of
|
||||
Standards and Technology (NIST) recently held a competition for a new algorithm to be added to
|
||||
its set of Secure Hashing Algorithms (SHA). In 2012 the winner was determined to be the Keccak
|
||||
hashing function and a rough specification for SHA3 was established. The algorithm operates on
|
||||
variable length messages with a sponge function, and thus alternates between absorbing chunks of
|
||||
the message into a set of state bits and permuting the state. The absorbing is a simple bitwise
|
||||
XOR while the permutation is a more complex function composed of several operations, χ, θ, ρ,
|
||||
π, ι, that all perform various bitwise operations, including rotations, parity calculations, XORs,
|
||||
etc. The Keccak hashing function is parameterized for different sizes of state and message chunks
|
||||
but for this accelerator we will only support the Keccak-256 variant with 1600 bits of state and
|
||||
1088 bit message chunks. A diagram of the SHA3 accelerator is shown below.
|
||||
|
||||
.. image:: ../_static/images/sha3.png
|
||||
|
||||
Technical Details
|
||||
------------------------------------
|
||||
The accelerator is designed around three sub-systems, an
|
||||
interface with the processor, an interface with memory, and
|
||||
the actual hashing computation system. The interface
|
||||
with the processor is designed using the ROCC interface for
|
||||
coprocessors integrating with the RISC-V Rocket/BOOM
|
||||
processor. It includes the ability to transfer two 64 bit
|
||||
words to the co-processor, the request for a return value,
|
||||
and a small field for the function requested. The accelerator
|
||||
receives these requests using a ready/valid interface. The
|
||||
ROCC instruction is parsed and the needed information is
|
||||
stored into a execution context. The execution context contains
|
||||
the memory address of the message being hashed, the memory address
|
||||
to store the resulting hash in, the length of the message, and
|
||||
several other control fields.
|
||||
|
||||
Once the execution context is valid the memory subsystem
|
||||
then begins to fetch chunks of the message. The memory
|
||||
subsystem is fully decoupled from the other subsystems
|
||||
and maintains a single full round memory buffers.
|
||||
The accelerators memory interface can provide a
|
||||
maximum of one 64 bit word per cycle which corresponds
|
||||
to 17 requests needed to fill a buffer (the size is dictated by
|
||||
the SHA3 algorithm). Memory requests to fill these buffers
|
||||
are sent out as rapidly as the memory interface can handle,
|
||||
with a tag field set to allow the different memory buffers
|
||||
requests to be distinguished, as they may be returned out of
|
||||
order. Once the memory subsystem has filled a buffer the
|
||||
control unit absorbs the buffer into the execution
|
||||
context, at which point the execution context is free to
|
||||
begin permutation, and the memory buffer is free to send
|
||||
more memory requests.
|
||||
|
||||
After the buffer is absorbed, the hashing computation
|
||||
subsystem begins the permutation operations. Once
|
||||
the message is fully hashed, the hash is written to memory
|
||||
with a simple state machine.
|
||||
|
||||
|
||||
Using a SHA3 Accelerator
|
||||
------------------------
|
||||
Since the SHA3 accelerator is designed as a RoCC accelerator,
|
||||
it can be mixed into a Rocket or BOOM core by overriding the
|
||||
``BuildRoCC`` key. The config fragment is defined in the SHA3
|
||||
generator. An example configuration highlighting the use of
|
||||
this config fragment is shown here:
|
||||
|
||||
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketSha3Configs.scala
|
||||
:language: scala
|
||||
:start-after: DOC include start: Sha3Rocket
|
||||
:end-before: DOC include end: Sha3Rocket
|
||||
|
||||
The SHA3 example baremetal and Linux tests are located in the SHA3 repository.
|
||||
Please refer to its `README.md <https://github.com/ucb-bar/sha3/blob/master/README.md>`_ for more information on how to run/build the tests.
|
||||
@@ -26,7 +26,6 @@ so changes to the generators themselves will automatically be used when building
|
||||
IceNet
|
||||
TestChipIP
|
||||
Rocket-Chip-Generators
|
||||
SHA3
|
||||
CVA6
|
||||
Ibex
|
||||
fft
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package chipyard
|
||||
|
||||
import org.chipsalliance.cde.config.{Config}
|
||||
import freechips.rocketchip.diplomacy.{AsynchronousCrossing}
|
||||
|
||||
// --------------
|
||||
// Rocket+SHA3 Configs
|
||||
// These live in a separate file to simplify patching out for the tutorials.
|
||||
// --------------
|
||||
|
||||
// DOC include start: Sha3Rocket
|
||||
class Sha3RocketConfig extends Config(
|
||||
new sha3.WithSha3Accel ++ // add SHA3 rocc accelerator
|
||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
// DOC include end: Sha3Rocket
|
||||
|
||||
class Sha3RocketPrintfConfig extends Config(
|
||||
new sha3.WithSha3Printf ++
|
||||
new sha3.WithSha3Accel ++ // add SHA3 rocc accelerator
|
||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
@@ -12,10 +12,6 @@ import scala.collection.immutable.ListMap
|
||||
// For each of 4 phases, participants will customize and build a
|
||||
// small demonstration config.
|
||||
|
||||
// This file is designed to be used after running chipyard/scripts/tutorial-setup.sh,
|
||||
// which removes the SHA3 accelerator RTL, and provides participants
|
||||
// the experience of integrating external RTL.
|
||||
|
||||
// This file was originally developed for the cancelled ASPLOS-2020
|
||||
// Chipyard tutorial. While the configs here work, the corresponding
|
||||
// slideware has not yet been created.
|
||||
@@ -54,26 +50,6 @@ class TutorialMMIOConfig extends Config(
|
||||
new chipyard.config.AbstractConfig
|
||||
)
|
||||
|
||||
// Tutorial Phase 3: Integrate a SHA3 RoCC accelerator
|
||||
class TutorialSha3Config extends Config(
|
||||
// Uncomment this line once you added SHA3 to the build.sbt, and cloned the SHA3 repo
|
||||
// new sha3.WithSha3Accel ++
|
||||
|
||||
// For this demonstration we assume the base system is a single-core Rocket, for fast elaboration
|
||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||
new chipyard.config.AbstractConfig
|
||||
)
|
||||
|
||||
// Tutorial Phase 4: Integrate a Black-box verilog version of the SHA3 RoCC accelerator
|
||||
class TutorialSha3BlackBoxConfig extends Config(
|
||||
// Uncomment these lines once SHA3 is integrated
|
||||
// new sha3.WithSha3BlackBox ++ // Specify we want the Black-box verilog version of Sha3 Ctrl
|
||||
// new sha3.WithSha3Accel ++
|
||||
|
||||
// For this demonstration we assume the base system is a single-core Rocket, for fast elaboration
|
||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||
new chipyard.config.AbstractConfig
|
||||
)
|
||||
|
||||
// Tutorial Phase 5: Map a multicore heterogeneous SoC with multiple cores and memory-mapped accelerators
|
||||
class TutorialNoCConfig extends Config(
|
||||
|
||||
Submodule generators/sha3 deleted from 2d38585d64
@@ -72,7 +72,6 @@ cd "$RDIR"
|
||||
generators/cva6 \
|
||||
generators/nvdla \
|
||||
toolchains/libgloss \
|
||||
generators/sha3 \
|
||||
generators/gemmini \
|
||||
generators/rocket-chip \
|
||||
sims/firesim \
|
||||
@@ -101,9 +100,6 @@ cd "$RDIR"
|
||||
)
|
||||
|
||||
(
|
||||
# Non-recursive clone to exclude riscv-linux
|
||||
git submodule update --init generators/sha3
|
||||
|
||||
# Non-recursive clone to exclude cva6 submods
|
||||
git submodule update --init generators/cva6
|
||||
git -C generators/cva6 submodule update --init src/main/resources/cva6/vsrc/cva6
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
diff --git a/build.sbt b/build.sbt
|
||||
index c3be6161..2a6d7160 100644
|
||||
--- a/build.sbt
|
||||
+++ b/build.sbt
|
||||
@@ -147,7 +147,7 @@ lazy val testchipip = (project in file("generators/testchipip"))
|
||||
|
||||
lazy val chipyard = (project in file("generators/chipyard"))
|
||||
.dependsOn(testchipip, rocketchip, boom, rocketchip_blocks, rocketchip_inclusive_cache,
|
||||
- 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,
|
||||
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
|
||||
constellation, mempress, barf, shuttle, caliptra_aes)
|
||||
@@ -219,10 +219,10 @@ lazy val sodor = (project in file("generators/riscv-sodor"))
|
||||
.settings(libraryDependencies ++= rocketLibDeps.value)
|
||||
.settings(commonSettings)
|
||||
|
||||
-lazy val sha3 = (project in file("generators/sha3"))
|
||||
- .dependsOn(rocketchip, midasTargetUtils)
|
||||
- .settings(libraryDependencies ++= rocketLibDeps.value)
|
||||
- .settings(commonSettings)
|
||||
+// lazy val sha3 = (project in file("generators/sha3"))
|
||||
+// .dependsOn(rocketchip, midasTargetUtils)
|
||||
+// .settings(libraryDependencies ++= rocketLibDeps.value)
|
||||
+// .settings(commonSettings)
|
||||
|
||||
lazy val gemmini = (project in file("generators/gemmini"))
|
||||
.dependsOn(rocketchip)
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
RDIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
cd $RDIR
|
||||
|
||||
git rm generators/chipyard/src/main/scala/config/RocketSha3Configs.scala
|
||||
git rm -rf generators/sha3
|
||||
|
||||
for p in scripts/tutorial-patches/*.patch
|
||||
do
|
||||
echo "Applying tutorial patch $p"
|
||||
git apply $p
|
||||
done
|
||||
Reference in New Issue
Block a user