Skip to content

Commit 28b732f

Browse files
committed
Modularize compressacc
1 parent effe2b1 commit 28b732f

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endif
8888
# Returns a list of files in directories $1 with *any* of the file extensions in $2
8989
lookup_srcs_by_multiple_type = $(foreach type,$(2),$(call lookup_srcs,$(1),$(type)))
9090

91-
CHECK_SUBMODULES_COMMAND = echo "Checking required submodules in generators/ are initialized. Uninitialized submodules will be displayed" ; ! git submodule status $(base_dir)/generators | grep '^-.*' | grep -vE "(ara|caliptra)"
91+
CHECK_SUBMODULES_COMMAND = echo "Checking required submodules in generators/ are initialized. Uninitialized submodules will be displayed" ; ! git submodule status $(base_dir)/generators | grep '^-.*' | grep -vE "(ara|caliptra|compress)"
9292

9393
SCALA_EXT = scala
9494
VLOG_EXT = sv v
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../compress-acc/chipyard/CompressAccConfigs.scala

generators/chipyard/src/main/scala/config/RoCCAcceleratorConfigs.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,3 @@ class ReRoCCManyGemminiConfig extends Config(
6161
new freechips.rocketchip.rocket.WithNHugeCores(4) ++ // 4 rocket cores
6262
new chipyard.config.AbstractConfig)
6363

64-
class ZstdCompressorRocketConfig extends Config(
65-
new compressacc.WithZstdCompressor ++
66-
new freechips.rocketchip.rocket.WithNHugeCores(1) ++
67-
new chipyard.config.AbstractConfig)

generators/compress-acc

scripts/init-submodules-no-riscv-tools-nolog.sh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ function usage
3535
echo "Enable other submodules with the --full or submodule-specific flags"
3636
echo ""
3737
echo "Options:"
38-
echo " -h Display this help message"
39-
echo " --full Initialize all submodules"
40-
echo " --ara Initialize the ara submodule"
38+
echo " -h Display this help message"
39+
echo " --full Initialize all submodules"
40+
echo " --ara Initialize the optional ara submodule"
41+
echo " --compressacc Initialize the optional compressor accelerator submodule"
4142
echo ""
4243
}
4344

4445
ENABLE_ARA=""
4546
ENABLE_CALIPTRA=""
47+
ENABLE_COMPRESSACC=""
4648

4749
while test $# -gt 0
4850
do
@@ -63,6 +65,9 @@ do
6365
--caliptra)
6466
ENABLE_CALIPTRA=1
6567
;;
68+
--compressacc)
69+
ENABLE_COMPRESSACC=1
70+
;;
6671
*)
6772
echo "ERROR: bad argument $1"
6873
usage
@@ -108,6 +113,7 @@ cd "$RDIR"
108113
generators/cva6 \
109114
generators/ara \
110115
generators/caliptra-aes-acc \
116+
generators/compress-acc \
111117
generators/nvdla \
112118
toolchains/libgloss \
113119
generators/gemmini \
@@ -158,14 +164,18 @@ cd "$RDIR"
158164
git submodule update --init generators/nvdla || exit 1
159165
git -C generators/nvdla submodule update --init src/main/resources/hw || exit 1
160166

161-
# Non-recursive clone to exclude ara submods
167+
# Optional clones
162168
if [[ "$ENABLE_ARA" -eq 1 ]] ; then
163169
git submodule update --init generators/ara || exit 1
164170
git -C generators/ara submodule update --init ara || exit 1
165171
fi
166172

167-
if [[ "$ENABLE_CALIPTRA" -eq 1]] ; then
168-
git submodule update --init generators/caliptra-aes-acc
173+
if [[ "$ENABLE_CALIPTRA" -eq 1 ]] ; then
174+
git submodule update --init generators/caliptra-aes-acc || exit 1
175+
fi
176+
177+
if [[ "$ENABLE_COMPRESSACC" -eq 1 ]] ; then
178+
git submodule update --init generators/compress-acc || exit 1
169179
fi
170180

171181
# Non-recursive clone to exclude gemmini-software
@@ -177,9 +187,6 @@ cd "$RDIR"
177187
submodule_name="generators/rocket-chip"
178188
git submodule update --init generators/rocket-chip || exit 1
179189

180-
# Non-recursive clone
181-
submodule_name="generators/compress-acc"
182-
git submodule update --init generators/compress-acc || exit 1
183190

184191
# Non-recursive clone
185192
submodule_name="generators/vexiiriscv"

0 commit comments

Comments
 (0)