master-thesis/netpfga/do-all-steps.sh

51 lines
1.0 KiB
Bash
Raw Normal View History

2019-06-03 19:31:58 +00:00
#!/bin/sh
set -e
set -x
2019-06-03 19:33:42 +00:00
echo "First source all variables and THEN run this script"
read something
2019-06-03 19:31:58 +00:00
# Step 1..3: create code
# Step 4
cd $P4_PROJECT_DIR && make
# Step 5
2019-06-03 19:56:45 +00:00
cd $P4_PROJECT_DIR/nf_sume_sdnet_ip/SimpleSumeSwitch && ./vivado_sim.bash 2>&1 | tee LOG
2019-06-03 19:39:03 +00:00
2019-06-03 19:47:36 +00:00
expected_line=$(grep ^expected LOG | sed 's/.*= <//')
actual_line=$(grep ^actual LOG | sed 's/.*= <//')
2019-06-03 19:39:03 +00:00
2019-06-03 19:56:45 +00:00
2019-06-03 19:39:03 +00:00
if [ "$expected_line" != "$actual_line" ]; then
echo packet mismatch
exit 1
fi
2019-06-03 19:31:58 +00:00
# Step 6
cd $P4_PROJECT_DIR && make config_writes
# Step 7
cd $P4_PROJECT_DIR && make uninstall_sdnet && make install_sdnet
# Step 8
cd $NF_DESIGN_DIR/test/sim_switch_default && make
# Step 9
cd $SUME_FOLDER && ./tools/scripts/nf_test.py sim --major switch --minor default
# Step 10
cd $NF_DESIGN_DIR && make
2019-06-06 20:28:46 +00:00
# Step 11: (nothing to be done)
2019-06-03 19:31:58 +00:00
# Step 12:
cd $NF_DESIGN_DIR/bitfiles
mv simple_sume_switch.bit ${P4_PROJECT_NAME}.bit
cp $P4_PROJECT_DIR/testdata/config_writes.sh ./
# Step 13:
cd $NF_DESIGN_DIR/bitfiles/
2019-06-06 20:28:46 +00:00
sudo bash -c ". $HOME/master-thesis/netpfga/bashinit && $(pwd -P)/program_switch.sh"