aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/vendors/compile-lattice.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/vendors/compile-lattice.sh')
-rwxr-xr-xlibraries/vendors/compile-lattice.sh66
1 files changed, 36 insertions, 30 deletions
diff --git a/libraries/vendors/compile-lattice.sh b/libraries/vendors/compile-lattice.sh
index df67c0bcb..cd556b695 100755
--- a/libraries/vendors/compile-lattice.sh
+++ b/libraries/vendors/compile-lattice.sh
@@ -57,7 +57,7 @@ COMMAND=1
CLEAN=0
VERBOSE=0
DEBUG=0
-FILTERING=0 # TODO: 1
+FILTERING=1
SUPPRESS_WARNINGS=0
HALT_ON_ERROR=0
VHDLStandard=93
@@ -102,11 +102,11 @@ while [[ $# > 0 ]]; do
GHDL="$2" # overwrite a potentially existing GHDL environment variable
shift # skip argument
;;
- --src)
+ --source)
SrcDir="$2"
shift # skip argument
;;
- --out)
+ --output)
DestDir="$2"
shift # skip argument
;;
@@ -150,30 +150,30 @@ if [[ $COMMAND -le 1 ]]; then
echo " compile-lattice.sh <common command>|<library> [<options>] [<adv. options>]"
echo ""
echo "Common commands:"
- echo " -h --help Print this help page"
- echo " -c --clean Remove all generated files"
+ echo " -h --help Print this help page"
+ echo " -c --clean Remove all generated files"
echo ""
echo "Libraries:"
- echo " -a --all Compile all Lattice simulation libraries."
+ echo " -a --all Compile all Lattice simulation libraries."
for Device in $DeviceList; do
printf " --%-19s Device primitives for '%s'.\n" "${Device,,}" "$Device"
done
echo ""
echo "Library compile options:"
- echo " --vhdl93 Compile the libraries with VHDL-93."
- echo " --vhdl2008 Compile the libraries with VHDL-2008."
- echo " -H --halt-on-error Halt on error(s)."
+ echo " --vhdl93 Compile the libraries with VHDL-93."
+ echo " --vhdl2008 Compile the libraries with VHDL-2008."
+ echo " -H --halt-on-error Halt on error(s)."
echo ""
echo "Advanced options:"
- echo " --ghdl <GHDL binary> Path to GHDL's executable, e.g. /usr/local/bin/ghdl"
- echo " --out <dir name> Name of the output directory, e.g. uvvm_util"
- echo " --src <Path to UVVM> Path to the sources."
+ echo " --ghdl <GHDL binary> Path to GHDL's executable, e.g. /usr/local/bin/ghdl"
+ echo " --output <dir name> Name of the output directory, e.g. lattice"
+ echo " --source <Path to Diamond>Path to the sources."
echo ""
echo "Verbosity:"
- echo " -v --verbose Print verbose messages."
- echo " -d --debug Print debug messages."
-# echo " -n --no-filter Disable output filtering scripts."
- echo " -N --no-warnings Suppress all warnings. Show only error messages."
+ echo " -v --verbose Print verbose messages."
+ echo " -d --debug Print debug messages."
+# echo " -n --no-filter Disable output filtering scripts."
+ echo " -N --no-warnings Suppress all warnings. Show only error messages."
echo ""
exit $COMMAND
fi
@@ -213,6 +213,11 @@ if [[ $? -ne 0 ]]; then echo 1>&2 -e "${COLORED_ERROR} While loading configurati
source $ScriptDir/shared.sh
if [[ $? -ne 0 ]]; then echo 1>&2 -e "${COLORED_ERROR} While loading further procedures.${ANSI_NOCOLOR}"; exit 1; fi
+# <= $VHDLVersion
+# <= $VHDLStandard
+# <= $VHDLFlavor
+GHDLSetup $VHDLStandard
+
# -> $SourceDirectories
# -> $DestinationDirectories
# -> $SrcDir
@@ -228,26 +233,27 @@ CreateDestinationDirectory
cd $DestinationDirectory
-# => $SUPPRESS_WARNINGS
-# <= $GRC_COMMAND
-SetupGRCat
-
-# -> $VHDLStandard
-# <= $VHDLVersion
-# <= $VHDLStandard
-# <= $VHDLFlavor
-GHDLSetup
-
# Extend global GHDL Options
Analyze_Parameters+=(
-fexplicit
- --no-vital-checks
-Wbinding
- -Wno-hide
- -Wno-others
- -Wno-parenthesis
+)
+if [[ $DEBUG -eq 0 ]]; then
+ Analyze_Parameters+=(
+ -Wno-hide
+ )
+fi
+if [[ ! (VERBOSE -eq 1) && ($DEBUG -eq 1) ]]; then
+ Analyze_Parameters+=(
+ -Wno-others
+ -Wno-static
+ )
+fi
+Analyze_Parameters+=(
--ieee=$VHDLFlavor
+ --no-vital-checks
--std=$VHDLStandard
+ -frelaxed
-P$DestinationDirectory
)