External Tutorial Setup
This section of the documentation is for external attendees of a in-person FireSim and Chipyard tutorial. Please follow along with the following steps to get setup if you already have an AWS EC2 account.
Note
These steps should take around 2hrs if you already have an AWS EC2 account.
Start following the FireSim documentation from initial-setup but ending at Setting up the FireSim Repo (make sure to NOT clone the FireSim repository)
Run the following commands:
#!/bin/bash
FIRESIM_MACHINE_LAUNCH_GH_URL="https://raw.githubusercontent.com/firesim/firesim/final-tutorial-2022-isca/scripts/machine-launch-script.sh"
curl -fsSLo machine-launch-script.sh "$FIRESIM_MACHINE_LAUNCH_GH_URL"chmod +x machine-launch-script.sh./machine-launch-script.sh
source ~/.bashrc
export MAKEFLAGS=-j16
sudo yum install -y nano
mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do wget -O ~/.vim/$d/scala.vim https://raw.githubusercontent.com/derekwyatt/vim-scala/master/$d/scala.vim; done
echo "colorscheme ron" >> /home/centos/.vimrc
cd ~/
(git clone https://github.com/ucb-bar/chipyard -b final-tutorial-2022-isca-morning chipyard-morningcd chipyard-morning./scripts/init-submodules-no-riscv-tools.sh
./scripts/build-toolchains.sh ec2fastsource env.sh
./scripts/firesim-setup.sh --fastcd sims/firesimsource sourceme-manager.sh
cd ~/chipyard-morning/sims/verilator/makemake clean
cd ~/chipyard-morningchmod +x scripts/repo-clean.sh./scripts/repo-clean.shgit checkout scripts/repo-clean.sh
)
cd ~/
(git clone https://github.com/ucb-bar/chipyard -b final-tutorial-2022-isca chipyard-afternooncd chipyard-afternoon./scripts/init-submodules-no-riscv-tools.sh
./scripts/build-toolchains.sh ec2fastsource env.sh
./scripts/firesim-setup.sh --fastcd sims/firesimsource sourceme-manager.shcd simunset MAKEFLAGSmake f1export MAKEFLAGS=-j16
cd ../target-design/chipyard/software/firemarshal./init-submodules.shmarshal -v build br-base.jsonmarshal -v install br-base.json
cd ~/chipyard-afternoon/generators/sha3/software/git submodule update --init esp-isa-simgit submodule update --init linux./build-spike.sh./build.sh
cd ~/chipyard-afternoon/generators/sha3/software/marshal -v build marshal-configs/sha3-linux-jtr-test.yamlmarshal -v build marshal-configs/sha3-linux-jtr-crack.yamlmarshal -v install marshal-configs/sha3*.yaml
cd ~/chipyard-afternoon/sims/firesim/sim/unset MAKEFLAGSmake f1 DESIGN=FireSim TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_WithDefaultFireSimBridges_WithFireSimHighPerfConfigTweaks_chipyard.QuadRocketConfig PLATFORM_CONFIG=BaseF1Configmake f1 DESIGN=FireSim TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_WithDefaultFireSimBridges_WithFireSimHighPerfConfigTweaks_chipyard.LargeBoomV3Config PLATFORM_CONFIG=BaseF1Configmake f1 DESIGN=FireSim TARGET_CONFIG=WithDefaultFireSimBridges_WithFireSimHighPerfConfigTweaks_chipyard.RocketConfig PLATFORM_CONFIG=BaseF1Configmake f1 DESIGN=FireSim TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_WithDefaultFireSimBridges_WithFireSimHighPerfConfigTweaks_chipyard.Sha3RocketConfig PLATFORM_CONFIG=BaseF1Configmake f1 DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB_WithDefaultFireSimBridges_WithFireSimHighPerfConfigTweaks_chipyard.Sha3RocketConfig PLATFORM_CONFIG=BaseF1Configmake f1 DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB_WithDefaultFireSimBridges_WithFireSimHighPerfConfigTweaks_chipyard.Sha3RocketPrintfConfig PLATFORM_CONFIG=WithPrintfSynthesis_BaseF1Configexport MAKEFLAGS=-j16
cd ~/chipyard-afternoonchmod +x scripts/repo-clean.sh./scripts/repo-clean.shgit checkout scripts/repo-clean.sh
)Next copy the following contents and replace your entire
~/.bashrcfile with this:
# Source global definitionsif [ -f /etc/bashrc ]; then . /etc/bashrcfi# Uncomment the following line if you don't like systemctl's auto-paging feature:# export SYSTEMD_PAGER=# User specific aliases and functionscd /home/centos/chipyard-afternoon && source env.sh && cd sims/firesim && source sourceme-manager.sh && cd /home/centos/export FDIR=/home/centos/chipyard-afternoon/sims/firesim/export CDIR=/home/centos/chipyard-afternoon/All done! Now continue with the in-person tutorial.

