<commit_before>#!/bin/sh

ACCEL_VARIANT=$1

CHISEL_SRC_DIR="/home/maltanar/sandbox/spmv-vector-cache/chisel"
COMP_SYNTH_DIR="/home/maltanar/sandbox/spmv-vector-cache/vivado-setup/$ACCEL_VARIANT/comp"
SYS_SYNTH_DIR="/home/maltanar/sandbox/spmv-vector-cache/vivado-setup/$ACCEL_VARIANT/sys"
LOG_DIR="/home/maltanar/sandbox/spmv-vector-cache/logOutput"

ORIG_DIR="$(pwd)"

mkdir -p $LOG_DIR

echo "Generating Verilog and register driver..."
cd $CHISEL_SRC_DIR
sbt "run inst SpMVAccel-$ACCEL_VARIANT" > $LOG_DIR/gen-verilog.log
sbt "run driver SpMVAccel-$ACCEL_VARIANT" > $LOG_DIR/gen-regdriver.log
mv -f "driverOutput/SpMVAccelerator${ACCEL_VARIANT}Driver.hpp" "../software/"

echo "Running component synthesis..."
cd $COMP_SYNTH_DIR
./run-synth.sh > $LOG_DIR/synth-comp.log

echo "Running system synthesis..."
cd $SYS_SYNTH_DIR
./synth-and-update.sh $ACCEL_VARIANT > $LOG_DIR/synth-sys.log

cd $ORIG_DIR
echo "$0 finished"<commit_msg>print tail of sys synthesis log with makeSpMVAccel<commit_after>#!/bin/sh

ACCEL_VARIANT=$1

CHISEL_SRC_DIR="/home/maltanar/sandbox/spmv-vector-cache/chisel"
COMP_SYNTH_DIR="/home/maltanar/sandbox/spmv-vector-cache/vivado-setup/$ACCEL_VARIANT/comp"
SYS_SYNTH_DIR="/home/maltanar/sandbox/spmv-vector-cache/vivado-setup/$ACCEL_VARIANT/sys"
LOG_DIR="/home/maltanar/sandbox/spmv-vector-cache/logOutput"

ORIG_DIR="$(pwd)"

mkdir -p $LOG_DIR

echo "Generating Verilog and register driver..."
cd $CHISEL_SRC_DIR
sbt "run inst SpMVAccel-$ACCEL_VARIANT" > $LOG_DIR/gen-verilog.log
sbt "run driver SpMVAccel-$ACCEL_VARIANT" > $LOG_DIR/gen-regdriver.log
mv -f "driverOutput/SpMVAccelerator${ACCEL_VARIANT}Driver.hpp" "../software/"

echo "Running component synthesis..."
cd $COMP_SYNTH_DIR
./run-synth.sh > $LOG_DIR/synth-comp.log

echo "Running system synthesis..."
cd $SYS_SYNTH_DIR
./synth-and-update.sh $ACCEL_VARIANT > $LOG_DIR/synth-sys.log

cd $ORIG_DIR
# print the last 50 lines of synthesis log (succcess/fail, timing summary)
cat $LOG_DIR/synth-sys.log | tail -n 50

echo "$0 finished"
{'fraction_non_alphanumeric': 0.14328210213187903, 'fraction_numerical': 0.0039662865642042635, 'mean_word_length': 5.426751592356688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2832049', 'n_tokens_mistral': 876, 'n_tokens_neox': 825, 'n_words': 130}