mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-06-28 09:36:01 -04:00
Merge pull request #1460 from jordancarlin/spyglass
Spyglass improvements
This commit is contained in:
commit
a9b3e3669d
4 changed files with 57 additions and 45 deletions
|
@ -20,6 +20,7 @@ fi
|
||||||
GOAL="lint/lint_rtl"
|
GOAL="lint/lint_rtl"
|
||||||
DEFAULT_CONFIGS=(rv32e rv64gc rv32gc rv32imc rv32i rv64i)
|
DEFAULT_CONFIGS=(rv32e rv64gc rv32gc rv32imc rv32i rv64i)
|
||||||
CONFIGS=()
|
CONFIGS=()
|
||||||
|
BATCH_FLAG="-batch"
|
||||||
|
|
||||||
# === Parse command-line options ===
|
# === Parse command-line options ===
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
|
@ -32,10 +33,15 @@ while [[ $# -gt 0 ]]; do
|
||||||
IFS=',' read -r -a CONFIGS <<< "$2"
|
IFS=',' read -r -a CONFIGS <<< "$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--gui)
|
||||||
|
BATCH_FLAG=""
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
echo "Usage: $0 [-g lint_goal] [-c config1,config2,...]"
|
echo "Usage: $0 [-g lint_goal] [-c config1,config2,...] [--gui]"
|
||||||
echo " -g, --goal Linting goal (e.g., lint/lint_rtl or lint/lint_rtl_enhanced)"
|
echo " -g, --goal Linting goal (e.g., lint/lint_rtl or lint/lint_rtl_enhanced)"
|
||||||
echo " -c, --configs Comma-separated list of configs to run (e.g., rv32e,rv64gc)"
|
echo " -c, --configs Comma-separated list of configs to run (e.g., rv32e,rv64gc)"
|
||||||
|
echo " --gui Run SpyGlass with Verdi GUI"
|
||||||
echo "Defaults: goal=$GOAL, configs=${DEFAULT_CONFIGS[*]}"
|
echo "Defaults: goal=$GOAL, configs=${DEFAULT_CONFIGS[*]}"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -51,35 +57,31 @@ if [ ${#CONFIGS[@]} -eq 0 ]; then
|
||||||
CONFIGS=("${DEFAULT_CONFIGS[@]}")
|
CONFIGS=("${DEFAULT_CONFIGS[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# For GUI mode, warn if multiple configs are specified
|
||||||
|
if [ -z "$BATCH_FLAG" ] && [ ${#CONFIGS[@]} -gt 1 ]; then
|
||||||
|
echo "Warning: Multiple configurations selected. GUI will open for each configuration sequentially."
|
||||||
|
fi
|
||||||
|
|
||||||
# Spyglass work directories/files
|
# Spyglass work directories/files
|
||||||
SPYGLASS_DIR="$WALLY/synthDC/spyglass"
|
SPYGLASS_DIR="$WALLY/synthDC/spyglass"
|
||||||
TEMPLATE_PRJ="$SPYGLASS_DIR/cvw.prj"
|
SPYGLASS_PRJ="$SPYGLASS_DIR/cvw.prj"
|
||||||
|
|
||||||
# Clean output directory
|
|
||||||
echo "Cleaning lint-spyglass-reports directory..."
|
|
||||||
rm -rf "$SPYGLASS_DIR/lint-spyglass-reports"
|
|
||||||
|
|
||||||
# Iterate configs
|
# Iterate configs
|
||||||
|
errors=0
|
||||||
for config in "${CONFIGS[@]}"; do
|
for config in "${CONFIGS[@]}"; do
|
||||||
echo "Processing configuration: $config"
|
# Clean output directory
|
||||||
CONFIG_PRJ="$SPYGLASS_DIR/cvw_${config}.prj"
|
rm -rf "$SPYGLASS_DIR/lint-spyglass-reports/$config"
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# Run SpyGlass
|
# Run SpyGlass
|
||||||
echo "Running spyglass for: $config with goal: $GOAL"
|
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_FLAG
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Error running spyglass for configuration: $config"
|
echo "Error running spyglass for configuration: $config"
|
||||||
|
errors=$((errors + 1))
|
||||||
else
|
else
|
||||||
echo "Completed: $config"
|
echo "Completed: $config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm "$CONFIG_PRJ"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $errors
|
||||||
|
|
|
@ -1,22 +1,29 @@
|
||||||
#!/bin/csh
|
#!/bin/csh
|
||||||
|
|
||||||
# site-setup.csh
|
# site-setup.csh
|
||||||
|
# System Admin should install this into $RISCV/site-setup.csh
|
||||||
|
# It is automatically placed in the $RISCV directory by wally-toolchain-install.sh
|
||||||
|
# $RISCV is typically /opt/riscv or ~/riscv
|
||||||
|
# System Admin must update the licenses and paths for localization.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
|
|
||||||
# License servers and commercial CAD tool paths
|
# License servers and commercial CAD tool paths
|
||||||
# Must edit these based on your local environment. Ask your sysadmin.
|
# Must edit these based on your local environment. Ask your sysadmin.
|
||||||
setenv MGLS_LICENSE_FILE 27002@zircon.eng.hmc.edu # Change this to your Siemens license server
|
setenv MGLS_LICENSE_FILE 27002@zircon.eng.hmc.edu # Change this to your Siemens license server
|
||||||
setenv SNPSLMD_LICENSE_FILE 27020@zircon.eng.hmc.edu # Change this to your Synopsys license server
|
setenv SNPSLMD_LICENSE_FILE 27020@zircon.eng.hmc.edu # Change this to your Synopsys license server
|
||||||
setenv QUESTAPATH /cad/mentor/questa_sim-2022.4_2/questasim/bin # Change this for your path to Questa
|
setenv QUESTAPATH /cad/mentor/QUESTA/bin # Change this for your path to Questa
|
||||||
setenv SNPSPATH /cad/synopsys/SYN/bin # Change this for your path to Design Compiler
|
setenv DCPATH /cad/synopsys/SYN/bin # Change this for your path to Design Compiler
|
||||||
setenv VCSPATH /cad/synopsys/vcs/U-2023.03-SP2-4/bin # Change this for your path to Synopsys VCS
|
setenv VCSPATH /cad/synopsys/VCS/bin # Change this for your path to Synopsys VCS
|
||||||
setenv SPYGLASS_HOME /cad/synopsys/spyglass/W-2024.09-SP2-2/SPYGLASS_HOME # Change this for your path to Synopsys Spyglass
|
setenv BREKER_HOME /cad/breker/TREK # Change this for your path to Breker Trek
|
||||||
|
setenv SPYGLASS_HOME /cad/synopsys/SPYGLASS_HOME # Change this for your path to Synopsys Spyglass
|
||||||
|
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
# Questa and Synopsys
|
# Questa and Synopsys
|
||||||
extend PATH $QUESTAPATH
|
extend PATH $QUESTAPATH
|
||||||
extend PATH $SNPSPATH
|
extend PATH $DCPATH
|
||||||
extend PATH $VCSPATH
|
extend PATH $VCSPATH
|
||||||
|
extend PATH $SPYGLASS_HOME/bin
|
||||||
# Synopsys Spyglass
|
# Synopsys Spyglass
|
||||||
setenv SNPSLMD_QUEUE 1
|
setenv SNPSLMD_QUEUE 1
|
||||||
|
|
||||||
|
@ -62,6 +69,8 @@ if ($?IDV) then
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Use newer gcc version for older distros
|
# Use newer gcc version for older distros
|
||||||
if ( -e $RISCV/gcc-10 ) then
|
if ( -e $RISCV/gcc-13 ) then
|
||||||
prepend PATH \$RISCV/gcc-10/bin # Ubuntu 20.04 LTS
|
prepend PATH $RISCV/gcc-13/bin # SUSE Family
|
||||||
|
elseif ( -e $RISCV/gcc-10 ) then
|
||||||
|
prepend PATH $RISCV/gcc-10/bin # Ubuntu 20.04 LTS
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -15,19 +15,19 @@ ENDC='\033[0m' # Reset to default color
|
||||||
|
|
||||||
# license servers and commercial CAD tool paths
|
# license servers and commercial CAD tool paths
|
||||||
# Must edit these based on your local environment.
|
# Must edit these based on your local environment.
|
||||||
export MGLS_LICENSE_FILE=27002@zircon.eng.hmc.edu # Change this to your Siemens license server for Questa
|
export MGLS_LICENSE_FILE=27002@zircon.eng.hmc.edu # Change this to your Siemens license server for Questa
|
||||||
export SNPSLMD_LICENSE_FILE=27020@zircon.eng.hmc.edu # Change this to your Synopsys license server
|
export SNPSLMD_LICENSE_FILE=27020@zircon.eng.hmc.edu # Change this to your Synopsys license server
|
||||||
export IMPERASD_LICENSE_FILE=27020@zircon.eng.hmc.edu # Change this to your Imperas license server
|
export IMPERASD_LICENSE_FILE=27020@zircon.eng.hmc.edu # Change this to your Imperas license server
|
||||||
export BREKER_LICENSE_FILE=1819@zircon.eng.hmc.edu # Change this to your Breker license server
|
export BREKER_LICENSE_FILE=1819@zircon.eng.hmc.edu # Change this to your Breker license server
|
||||||
export QUESTA_HOME=/cad/mentor/QUESTA # Change this for your path to Questa, excluding bin
|
export QUESTA_HOME=/cad/mentor/QUESTA # Change this for your path to Questa, excluding bin
|
||||||
export DC_HOME=/cad/synopsys/SYN # Change this for your path to Synopsys DC, excluding bin
|
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 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 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
|
# Tools
|
||||||
# Questa and Synopsys
|
# 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
|
# Synopsys Spyglass
|
||||||
export SNPSLMD_QUEUE=1
|
export SNPSLMD_QUEUE=1
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,11 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
# 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
|
# 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 language_mode mixed
|
||||||
set_option designread_enable_synthesis no
|
set_option designread_enable_synthesis no
|
||||||
set_option designread_disable_flatten no
|
set_option designread_disable_flatten no
|
||||||
|
@ -16,18 +19,16 @@ set_option top wallywrapper
|
||||||
set_parameter handle_large_bus yes
|
set_parameter handle_large_bus yes
|
||||||
|
|
||||||
# Include DIR
|
# Include DIR
|
||||||
set_option incdir $WALLY/config/WALLYVER
|
set_option incdir ${WALLY}/config/${WALLY_CONFIG}
|
||||||
set_option incdir $WALLY/config/shared
|
set_option incdir ${WALLY}/config/shared
|
||||||
|
|
||||||
# main CVW
|
# main CVW
|
||||||
read_file -type verilog $WALLY/src/cvw.sv
|
read_file -type verilog ${WALLY}/src/cvw.sv
|
||||||
read_file -type verilog $WALLY/testbench/wallywrapper.sv
|
read_file -type verilog ${WALLY}/testbench/wallywrapper.sv
|
||||||
read_file -type awl $WALLY/synthDC/spyglass/waivers.tcl
|
read_file -type awl ${WALLY}/synthDC/spyglass/waivers.tcl
|
||||||
|
|
||||||
# generic read of Wally src files
|
# 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
|
current_methodology $SPYGLASS_HOME/GuideWare/latest/block/rtl_handoff
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue