Spyglass improvements

- Update `site-setup.sh` to add `spyglass` to the path
- Update `cvw.prj` to use environment variables so temporary files created using sed are not needed
- Only delete reports for configurations that are being run
This commit is contained in:
Jordan Carlin 2025-06-21 14:02:02 -07:00
parent 0e0e850e68
commit 16509ef485
No known key found for this signature in database
3 changed files with 29 additions and 37 deletions

View file

@ -53,33 +53,24 @@ fi
# Spyglass work directories/files
SPYGLASS_DIR="$WALLY/synthDC/spyglass"
TEMPLATE_PRJ="$SPYGLASS_DIR/cvw.prj"
# Clean output directory
echo "Cleaning lint-spyglass-reports directory..."
rm -rf "$SPYGLASS_DIR/lint-spyglass-reports"
SPYGLASS_PRJ="$SPYGLASS_DIR/cvw.prj"
# Iterate configs
errors=0
for config in "${CONFIGS[@]}"; do
echo "Processing configuration: $config"
CONFIG_PRJ="$SPYGLASS_DIR/cvw_${config}.prj"
# Replace placeholders in template
sed -e "s|\$WALLY|$WALLY|g" \
-e "s|WALLYVER|$config|g" \
-e "s|read_file -type awl waivers.tcl|read_file -type awl $SPYGLASS_DIR/waivers.tcl|g" \
-e "s|set_option projectwdir lint-spyglass/|set_option projectwdir ${SPYGLASS_DIR}/lint-spyglass/|g" \
"$TEMPLATE_PRJ" > "$CONFIG_PRJ"
# Clean output directory
rm -rf "$SPYGLASS_DIR/lint-spyglass-reports/$config"
# Run SpyGlass
echo "Running spyglass for: $config with goal: $GOAL"
spyglass -project "$CONFIG_PRJ" -goal "$GOAL" -batch
WALLY_CONFIG=$config spyglass -project "$SPYGLASS_PRJ" -goal "$GOAL" -batch
if [ $? -ne 0 ]; then
echo "Error running spyglass for configuration: $config"
errors=$((errors + 1))
else
echo "Completed: $config"
fi
rm "$CONFIG_PRJ"
done
exit $errors

View file

@ -23,11 +23,11 @@ export QUESTA_HOME=/cad/mentor/QUESTA # Chan
export DC_HOME=/cad/synopsys/SYN # Change this for your path to Synopsys DC, excluding bin
export VCS_HOME=/cad/synopsys/VCS # Change this for your path to Synopsys VCS, excluding bin
export BREKER_HOME=/cad/breker/TREK # Change this for your path to Breker Trek
export SPYGLASS_HOME=/cad/synopsys/spyglass/W-2024.09-SP2-2/SPYGLASS_HOME # Change this for your path to Synopsys Spyglass
export SPYGLASS_HOME=/cad/synopsys/SPYGLASS_HOME # Change this for your path to Synopsys Spyglass
# Tools
# Questa and Synopsys
export PATH=$QUESTA_HOME/bin:$DC_HOME/bin:$VCS_HOME/bin:$PATH
export PATH=$QUESTA_HOME/bin:$DC_HOME/bin:$VCS_HOME/bin:$SPYGLASS_HOME/bin:$PATH
# Synopsys Spyglass
export SNPSLMD_QUEUE=1

View file

@ -4,8 +4,11 @@
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
#
set WALLY $::env(WALLY)
set WALLY_CONFIG $::env(WALLY_CONFIG)
# Sets directory for output reports
set_option projectwdir $WALLY/synthDC/spyglass/lint-spyglass-reports/
set_option projectwdir ${WALLY}/synthDC/spyglass/lint-spyglass-reports/${WALLY_CONFIG}
set_option language_mode mixed
set_option designread_enable_synthesis no
set_option designread_disable_flatten no
@ -16,18 +19,16 @@ set_option top wallywrapper
set_parameter handle_large_bus yes
# Include DIR
set_option incdir $WALLY/config/WALLYVER
set_option incdir $WALLY/config/shared
set_option incdir ${WALLY}/config/${WALLY_CONFIG}
set_option incdir ${WALLY}/config/shared
# main CVW
read_file -type verilog $WALLY/src/cvw.sv
read_file -type verilog $WALLY/testbench/wallywrapper.sv
read_file -type awl $WALLY/synthDC/spyglass/waivers.tcl
read_file -type verilog ${WALLY}/src/cvw.sv
read_file -type verilog ${WALLY}/testbench/wallywrapper.sv
read_file -type awl ${WALLY}/synthDC/spyglass/waivers.tcl
# generic read of Wally src files
read_file -type verilog $WALLY/src/*/*
read_file -type verilog $WALLY/src/*/*/*
read_file -type verilog ${WALLY}/src/*/*
read_file -type verilog ${WALLY}/src/*/*/*
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff