Add SPI flash support (#546)
* Add SPI flash configs, IOBinders, CI tests, and docs * Add writable SPI flash support * bump * Fix CI * Fix CI * Update docs/Generators/TestChipIP.rst Co-authored-by: Chick Markley <chick@qrhino.com> * Maybe actually fix CI * Fix broken merge * Fix the tutorial patch * bump tcip to master * fix GPIO naming bug Co-authored-by: Chick Markley <chick@qrhino.com>
This commit is contained in:
@@ -12,7 +12,7 @@ parameters:
|
||||
executors:
|
||||
main-env:
|
||||
docker:
|
||||
- image: ucbbar/chipyard-image:1.0.0
|
||||
- image: ucbbar/chipyard-image:1.0.1
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||
|
||||
@@ -262,6 +262,16 @@ jobs:
|
||||
steps:
|
||||
- prepare-rtl:
|
||||
project-key: "testchipip"
|
||||
prepare-chipyard-spiflashwrite:
|
||||
executor: main-env
|
||||
steps:
|
||||
- prepare-rtl:
|
||||
project-key: "chipyard-spiflashwrite"
|
||||
prepare-chipyard-spiflashread:
|
||||
executor: main-env
|
||||
steps:
|
||||
- prepare-rtl:
|
||||
project-key: "chipyard-spiflashread"
|
||||
chipyard-rocket-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
@@ -300,6 +310,16 @@ jobs:
|
||||
- run-tests:
|
||||
tools-version: "esp-tools"
|
||||
project-key: "chipyard-gemmini"
|
||||
chipyard-spiflashwrite-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
- run-tests:
|
||||
project-key: "chipyard-spiflashwrite"
|
||||
chipyard-spiflashread-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
- run-tests:
|
||||
project-key: "chipyard-spiflashread"
|
||||
tracegen-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
@@ -464,6 +484,16 @@ workflows:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
|
||||
- prepare-chipyard-spiflashwrite:
|
||||
requires:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
|
||||
- prepare-chipyard-spiflashread:
|
||||
requires:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
|
||||
# Run the respective tests
|
||||
|
||||
# Run midasexamples test
|
||||
@@ -508,6 +538,14 @@ workflows:
|
||||
requires:
|
||||
- prepare-tracegen-boom
|
||||
|
||||
- chipyard-spiflashwrite-run-tests:
|
||||
requires:
|
||||
- prepare-chipyard-spiflashwrite
|
||||
|
||||
- chipyard-spiflashread-run-tests:
|
||||
requires:
|
||||
- prepare-chipyard-spiflashread
|
||||
|
||||
# Run the firesim tests
|
||||
- firesim-run-tests:
|
||||
requires:
|
||||
|
||||
@@ -52,6 +52,8 @@ mapping["chipyard-blkdev"]="SUB_PROJECT=chipyard CONFIG=SimBlockDeviceRocketConf
|
||||
mapping["chipyard-hwacha"]="SUB_PROJECT=chipyard CONFIG=HwachaRocketConfig"
|
||||
mapping["chipyard-gemmini"]="SUB_PROJECT=chipyard CONFIG=GemminiRocketConfig"
|
||||
mapping["chipyard-ariane"]="SUB_PROJECT=chipyard CONFIG=ArianeConfig"
|
||||
mapping["chipyard-spiflashread"]="SUB_PROJECT=chipyard CONFIG=LargeSPIFlashROMRocketConfig"
|
||||
mapping["chipyard-spiflashwrite"]="SUB_PROJECT=chipyard CONFIG=SmallSPIFlashRocketConfig"
|
||||
mapping["tracegen"]="SUB_PROJECT=chipyard CONFIG=NonBlockingTraceGenL2Config TOP=TraceGenSystem"
|
||||
mapping["tracegen-boom"]="SUB_PROJECT=chipyard CONFIG=BoomTraceGenConfig TOP=TraceGenSystem"
|
||||
mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests"
|
||||
|
||||
@@ -13,6 +13,8 @@ RUN apt-get update \
|
||||
git \
|
||||
gnupg \
|
||||
gzip \
|
||||
libfl2 \
|
||||
libfl-dev \
|
||||
locales \
|
||||
mercurial \
|
||||
netcat \
|
||||
@@ -24,7 +26,12 @@ RUN apt-get update \
|
||||
unzip \
|
||||
wget \
|
||||
xvfb \
|
||||
zip
|
||||
xxd \
|
||||
zip \
|
||||
ccache \
|
||||
libgoogle-perftools-dev \
|
||||
numactl \
|
||||
zlib1g
|
||||
|
||||
# Set timezone to UTC by default
|
||||
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||
@@ -127,34 +134,46 @@ RUN apt-get install -y --no-install-recommends openjfx
|
||||
RUN apt-get install -y build-essential
|
||||
|
||||
# Add RISCV toolchain necessary dependencies
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autotools-dev \
|
||||
babeltrace \
|
||||
bc \
|
||||
bison \
|
||||
curl \
|
||||
device-tree-compiler \
|
||||
expat \
|
||||
flex \
|
||||
gawk \
|
||||
gperf \
|
||||
g++ \
|
||||
libexpat-dev \
|
||||
libgmp-dev \
|
||||
libmpc-dev \
|
||||
libmpfr-dev \
|
||||
libtool \
|
||||
libusb-1.0-0-dev \
|
||||
make \
|
||||
patchutils \
|
||||
pkg-config \
|
||||
python \
|
||||
python-pexpect \
|
||||
python-pexpect-doc \
|
||||
python3 \
|
||||
texinfo \
|
||||
zlib1g-dev \
|
||||
rsync
|
||||
|
||||
# Use specific bison version to bypass Verilator 4.034 issues
|
||||
# TODO: When Verilator is bumped, use apt to get newest bison
|
||||
RUN wget https://ftp.gnu.org/gnu/bison/bison-3.5.4.tar.gz \
|
||||
&& tar -xvf bison-3.5.4.tar.gz \
|
||||
&& cd bison-3.5.4 \
|
||||
&& ./configure && make && make install
|
||||
|
||||
# Check bison version is 3.5.4
|
||||
RUN bison --version
|
||||
|
||||
# Add minimal QEMU dependencies
|
||||
RUN apt-get install -y \
|
||||
libfdt-dev \
|
||||
@@ -164,6 +183,7 @@ RUN apt-get install -y \
|
||||
# Install verilator
|
||||
RUN git clone http://git.veripool.org/git/verilator \
|
||||
&& cd verilator \
|
||||
&& git pull \
|
||||
&& git checkout v4.034 \
|
||||
&& autoconf && ./configure && make && make install
|
||||
|
||||
|
||||
@@ -62,6 +62,15 @@ case $1 in
|
||||
(cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh)
|
||||
$LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/benchmarks/bare/sha3-rocc.riscv
|
||||
;;
|
||||
chipyard-spiflashread)
|
||||
make -C $LOCAL_CHIPYARD_DIR/tests
|
||||
make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary
|
||||
;;
|
||||
chipyard-spiflashwrite)
|
||||
make -C $LOCAL_CHIPYARD_DIR/tests
|
||||
make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary
|
||||
[[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false
|
||||
;;
|
||||
tracegen)
|
||||
run_tracegen ${mapping[$1]}
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user