Created
August 27, 2023 08:10
-
-
Save camel-cdr/9db1c2341da4e4cefe03f2b6ac9366e0 to your computer and use it in GitHub Desktop.
Simulating tenstorent ocelot (now bobcat?) rvv 1.0 core based on SonicBOOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BOBCAT=MegaBobcatConfig | |
source env.sh | |
sed '/WithBoomDebugHarness/d' -i generators/chipyard/src/main/scala/config/BobcatConfigs.scala | |
make -C sims/verilator CONFIG=$BOBCAT USE_FSDB=1 -j$(nproc) | |
awk '{print $0;if($0 ~ /bits\(scoreboard_entry\)\)/)print("tt_ffs_"++c);}' /chipyard/sims/verilator/generated-src/chipyard.TestHarness.$BOBCAT/gen-collateral/tt_scoreboard_ovi.sv > /tmp/tmp.sv | |
mv /tmp/tmp.sv /chipyard/sims/verilator/generated-src/chipyard.TestHarness.$BOBCAT/gen-collateral/tt_scoreboard_ovi.sv | |
cat <<EOF >> /chipyard/sims/verilator/generated-src/chipyard.TestHarness.$BOBCAT/chipyard.TestHarness.$BOBCAT.debug/VTestHarness.cpp | |
extern "C" { | |
void monitor_instr(char*,int,uint64_t,uint64_t,uint64_t,uint64_t,uint32_t){} | |
void monitor_gpr(char*,int,uint64_t,uint32_t,uint64_t){} | |
void monitor_fpr(char*,int,uint64_t,uint32_t,uint64_t){} | |
void monitor_vr(char*,int,uint64_t,uint32_t,uint64_t*,uint8_t){} | |
void monitor_csr(char*,int,uint64_t,uint32_t,uint64_t){} | |
void env_init() {} | |
void env_final() {} | |
} | |
EOF | |
make -C sims/verilator CONFIG=$BOBCAT USE_FSDB=1 -j$(nproc) | |
make -C tests | |
echo "source env.sh" >> $HOME/.bashrc | |
echo "Run with: make -C sims/verilator run-binary CONFIG=$BOBCAT USE_FSDB=1 BINARY=/chipyard/tests/hello.riscv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM continuumio/miniconda3 | |
RUN apt-get update \ | |
&& apt-get install -y build-essential wget git unzip python3 sudo file python3-vcstools libboost-dev vim cpio binutils \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN conda install conda-lock=1.4 | |
RUN git clone https://github.com/tenstorrent/chipyard/ | |
WORKDIR chipyard | |
COPY ./stage.sh ./stage.sh | |
RUN chmod +x ./stage.sh ; ./stage.sh 1 ; sed 's/conda activate/source activate/g' -i ./env.sh | |
RUN git rm --force vlsi/hammer-mentor-plugins \ | |
&& sed '/hammer-mentor-plugins/d' -i .gitmodules scripts/*.sh \ | |
&& sed 's/git@github.com:tenstorrent/https:\/\/github.com\/tenstorrent/g' -i .gitmodules | |
RUN ./stage.sh 2 | |
RUN ./stage.sh 3 | |
RUN ./stage.sh 4 | |
RUN ./stage.sh 5 | |
COPY ./build.sh ./build.sh | |
RUN chmod +x ./build.sh ; ./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
[ $1 -gt 1 ] && source env.sh | |
case $1 in | |
1) ./build-setup.sh -f riscv-tools -s 2 -s 3 -s 4 -s 5 -s 6 -s 7 -s 8 -s 9 -s 10 ;; | |
2) ./build-setup.sh -f riscv-tools -s 1 -s 3 -s 4 -s 5 -s 6 -s 7 -s 8 -s 9 -s 10 ;; | |
3) ./build-setup.sh -f riscv-tools -s 1 -s 2 -s 4 -s 5 -s 6 -s 7 -s 8 -s 9 -s 10 ;; | |
4) ./build-setup.sh -f riscv-tools -s 1 -s 2 -s 3 -s 5 -s 6 -s 7 -s 8 -s 9 -s 10 ;; | |
5) ./build-setup.sh -f riscv-tools -s 1 -s 2 -s 3 -s 4 -s 6 -s 7 -s 8 -s 9 -s 10 ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment