Commit e5c347b7 authored by Guillem Cabo's avatar Guillem Cabo
Browse files

WIP spyglass tests

parent dcf1cf02
......@@ -2,31 +2,29 @@ RED='\033[7;31m'
GREEN='\033[7;32m'
BLUE='\033[7;36m'
NC='\033[0m' # No Color
TOP='injector.vhd'
TOP='injector'
############
## TOP $TOP.sv
############
#clean previous files
rm -rf $TOP
# Run Spyglass
printf "Please wait, running Spyglass\n"
./local_spyglass.sh \
../hdl/$TOP.vhd
#../hdl/$TOP.vhd 1> /dev/null
# TODO: add remaining files here
#Capture is there is a problem with the script
if [ $? -ne 0 ]; then
exit 2
exit 3
fi
# check if there is a result file
test -f ($TOP)/consolidated_reports/($TOP)_lint_lint_rtl/moresimple.rpt || exit 1
echo "$TOP/consolidated_reports/lint_lint_rtl/moresimple.rpt"
test -f $TOP/consolidated_reports/${TOP}lint_lint_rtl/moresimple.rpt || exit 2
# Check outcome
printf "UNIT - : ${BLUE} $TOP ${BLUE}${NC}\n"
cat ($TOP)/consolidated_reports/($TOP)_lint_lint_rtl/moresimple.rpt | grep -i 'error\|Syntax' | GREP_COLORS='mt=01;31' egrep -i --color=always error\|syntax
cat $TOP/consolidated_reports/${TOP}lint_lint_rtl/moresimple.rpt | grep -i 'error\|Syntax' | GREP_COLORS='mt=01;31' egrep -i --color=always error\|syntax
if [ $? -ne 0 ]; then
printf "SPYGLASS - Chech for errors: ${GREEN}PASS${GREEN}${NC}\n"
cat ($TOP)/consolidated_reports/($TOP)_lint_lint_rtl/moresimple.rpt | GREP_COLORS='mt=01;33' egrep -i --color=always 'warning'
cat $TOP/consolidated_reports/${TOP}lint_lint_rtl/moresimple.rpt | GREP_COLORS='mt=01;33' egrep -i --color=always 'warning'
else
printf "SPYGLASS - Chech for errors: ${RED}FAIL${RED}${NC}\n"
exit 1
......
......@@ -8,10 +8,9 @@ EX="${FN#*.}"
FILE_LIST=""
#remove tmp folder with same name if any
rm -rf /tmp/$N
#make destination folder
#make destination folders
mkdir /tmp/$N
rm -rf $PWD/../../library/
mkdir $PWD/../../library/
mkdir /tmp/$N/bsc
## TODO: work on autogenerating the vhdl projects in a similar way than SV
echo "#!SPYGLASS_PROJECT_FILE" >> /tmp/$N/$N.prj
......@@ -28,20 +27,23 @@ echo "read_file -type vhdl $PWD/../hdl/injector_read_if.vhd" >> /tmp/$N/$N.prj
echo "read_file -type vhdl $PWD/../hdl/injector_write_if.vhd" >> /tmp/$N/$N.prj
# Set library name and path
echo "set_option lib bsc {$PWD/bsc}" >> /tmp/$N/$N.prj
mkdir /tmp/$N/bsc
echo "set_option libhdlfiles bsc {/tmp/$N/bsc}" >> /tmp/$N/$N.prj
# BSC library files
cp ../hdl/injector_pkg.vhd /tmp/$N/bsc
echo "set_option libhdlfiles bsc {/tmp/$N/bsc/injector_pkg.vhd}" >> /tmp/$N/$N.prj
echo "##Common Options Section" >> /tmp/$N/$N.prj
echo "set_option mthresh 5000000" >> /tmp/$N/$N.prj
echo "set_option projectwdir ." >> /tmp/$N/$N.prj
echo "set_option top $N" >> /tmp/$N/$N.prj
echo "set_option elab_precompile yes" >> /tmp/$N/$N.prj
echo "set_option hdllibdu yes" >> /tmp/$N/$N.prj
echo "set_option designread_enable_synthesis no" >> /tmp/$N/$N.prj
echo "set_option language_mode VHDL #mixed" >> /tmp/$N/$N.prj
echo "set_option language_mode mixed" >> /tmp/$N/$N.prj
echo "set_option designread_disable_flatten no" >> /tmp/$N/$N.prj
echo "set_option active_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff" >> /tmp/$N/$N.prj
echo "set_option incdir { ./} " >> /tmp/$N/$N.prj
echo "set_option handlememory" >> /tmp/$N/$N.prj
echo "##Goal Setup Section" >> /tmp/$N/$N.prj
echo "current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff" >> /tmp/$N/$N.prj
cd /tmp/$N;
export SKIP_PLATFORM_CHECK=TRUE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment