51 lines
1.4 KiB
Bash
51 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
################################### Include variables and constants
|
|
. common_720.sh
|
|
|
|
echo "[WARNING] This script is deprecated. Please use the python API package ktc instead."
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "You need to provide a bie model to run this script."
|
|
exit 1
|
|
fi
|
|
|
|
model=$1
|
|
|
|
if [ "$2" == "knerondebug" ]
|
|
then
|
|
echo "start debug mode"
|
|
debug_mode="true"
|
|
echo "debug_mode: $debug_mode"
|
|
fi
|
|
|
|
#################################### Main Process
|
|
|
|
# Prepare compiler input and output space
|
|
mkdir -p $TMP_FOLDER
|
|
echo "running compiler and ipEvaluator..."
|
|
delFolder $RESULT_FOLDER/compiler
|
|
mkdir -p $RESULT_FOLDER/compiler
|
|
|
|
cp $SCRIPT_FOLDER/res/ip_config_720.json $TMP_FOLDER
|
|
python $LIBS_FOLDER/compiler/gen_config.py -t 720 -v model_rel -o $TMP_FOLDER/config_compiler.json -a ''{\"ip_evaluator_cfg\":\"$SCRIPT_FOLDER/res/ip_config_720.json\"}''
|
|
chk_flow $? "Generating compiler config fails!"
|
|
|
|
cd $TMP_FOLDER && $LIBS_FOLDER/compiler/compile 720 $model $TMP_FOLDER/config_compiler.json warning compile.log
|
|
chk_flow $? "compuler and ip evaluator fails!"
|
|
|
|
if [[ $debug_mode == "true" ]]
|
|
then
|
|
cp $TMP_FOLDER/*.json $RESULT_FOLDER/compiler/
|
|
fi
|
|
cp $TMP_FOLDER/*.bin $RESULT_FOLDER/compiler/
|
|
cp $TMP_FOLDER/ioinfo.json $RESULT_FOLDER/compiler/
|
|
cp $TMP_FOLDER/ProfileResult.txt $RESULT_FOLDER/compiler/
|
|
echo "Compilation and IP Evaluation finished."
|
|
|
|
rm -rf $TMP_FOLDER
|
|
|
|
|
|
|
|
|