aboutsummaryrefslogtreecommitdiffstats
path: root/libraries
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-17 22:51:02 +0100
committereine <6628437+eine@users.noreply.github.com>2021-01-18 00:13:04 +0100
commiteeb25ef2b348b672948ffdee6b9569f819c1886c (patch)
tree35c4dace2abfd3bea244de5387dc7b844acdd899 /libraries
parent22765c93ff3dd872d0e4d8cb1c750ccaaeefb900 (diff)
downloadghdl-eeb25ef2b348b672948ffdee6b9569f819c1886c.tar.gz
ghdl-eeb25ef2b348b672948ffdee6b9569f819c1886c.tar.bz2
ghdl-eeb25ef2b348b672948ffdee6b9569f819c1886c.zip
Improvements to the UVVM pre-compile scripts.
Diffstat (limited to 'libraries')
-rw-r--r--libraries/vendors/README.md12
-rw-r--r--libraries/vendors/compile-uvvm.ps119
-rwxr-xr-xlibraries/vendors/compile-uvvm.sh79
-rwxr-xr-xlibraries/vendors/shared.sh4
4 files changed, 43 insertions, 71 deletions
diff --git a/libraries/vendors/README.md b/libraries/vendors/README.md
index 93a7c8a48..65b55e513 100644
--- a/libraries/vendors/README.md
+++ b/libraries/vendors/README.md
@@ -115,15 +115,17 @@ For a detailed documentation and all command line options see
- OSVVM
- switch / search directories if normal OSVVM or OsvvmLibraries is specified as source
-
- Missing features
- - Implement `--clean` commands
-
+ - Implement `-Clean` ```--clean` commands
- describe usage with -P
-
- document offered procedures and functions
-
- don't enforce `--output` if `--source` is used.
+- UVVM (OSVVM)
+ - create a list of components as array and generate from that:
+ - variables
+ - cli options
+ - help text
+ - default values
------------------------
Author: Patrick Lehmann
diff --git a/libraries/vendors/compile-uvvm.ps1 b/libraries/vendors/compile-uvvm.ps1
index e15116f68..8076e0342 100644
--- a/libraries/vendors/compile-uvvm.ps1
+++ b/libraries/vendors/compile-uvvm.ps1
@@ -40,8 +40,8 @@ param(
[switch]$UVVM = $false,
# Compile all UVVM Utility packages.
[switch]$UVVM_Utilities = $false,
- # Compile all UVVM VCC Framework packages.
- [switch]$UVVM_VCC_Framework = $false,
+ # Compile all UVVM VVC Framework packages.
+ [switch]$UVVM_VVC_Framework = $false,
# Compile all UVVM Verification IPs (VIPs).
[switch]$UVVM_VIP = $false,
# Compile VIP: Avalon Memory Mapped
@@ -131,7 +131,7 @@ if ($All)
}
if ($UVVM)
{ $UVVM_Utilities = $true
- $UVVM_VCC_Framework = $true
+ $UVVM_VVC_Framework = $true
}
if ($UVVM_VIP)
{ $UVVM_VIP_Avalon_MM = $true
@@ -211,12 +211,15 @@ $VIP_Files = [ordered]@{}
foreach ($VIPName in (Get-Content "$SourceDirectory\script\component_list.txt"))
{ if ($VIPName.StartsWith("uvvm"))
{ $VIPVariable = $VIPName.Substring(5).ToUpper()
- $VIPVariable = $VIPVariable.Replace("UTIL", "UTILITIES")
+ $VIPVariable = $VIPVariable.Replace("UTIL", "Utilities")
}
elseif ($VIPName.StartsWith("bitvis"))
{ $VIPVariable = $VIPName.Substring(7).ToUpper()
- $VIPVariable = $VIPVariable.Replace("AXI", "AXI_")
+ $VIPVariable = $VIPVariable.Replace("AXILITE", "AXI_LITE")
+ $VIPVariable = $VIPVariable.Replace("AXISTREAM", "AXI_STREAM")
+ $VIPVariable = $VIPVariable.Replace("HVVC_TO_VVC_BRIDGE", "HVVC2VVC")
}
+ $VIPVariable = "UVVM_$VIPVariable"
$EnableVerbose -and (Write-Host " Found VIP: $VIPName" -ForegroundColor Gray ) | Out-Null
$EnableDebug -and (Write-Host " Reading compile order from '$SourceDirectory\$VIPName\script\compile_order.txt'" -ForegroundColor DarkGray ) | Out-Null
@@ -243,9 +246,9 @@ foreach ($VIPName in (Get-Content "$SourceDirectory\script\component_list.txt"))
}
$VIP_Files[$VIPName] = @{
- "Variable" = "UVVM_$VIPVariable";
- "Library" = $VIPName;
- "Files" = $VIPFiles
+ "Variable" = $VIPVariable;
+ "Library" = $VIPName;
+ "Files" = $VIPFiles
}
}
diff --git a/libraries/vendors/compile-uvvm.sh b/libraries/vendors/compile-uvvm.sh
index 17d2e7853..fafbd0118 100755
--- a/libraries/vendors/compile-uvvm.sh
+++ b/libraries/vendors/compile-uvvm.sh
@@ -237,7 +237,7 @@ if [[ $COMMAND -le 1 ]]; then
echo ""
echo "Common Packages:"
echo " --uvvm-utilities UVVM utilities."
- echo " --uvvm-vvc-framework VHDL Verification Component (VCC) framework."
+ echo " --uvvm-vvc-framework VHDL Verification Component (VVC) framework."
echo ""
echo "Verification IPs:"
echo " --uvvm-vip-avalon_mm Altera/Intel Avalon Memory Mapped"
@@ -250,7 +250,7 @@ if [[ $COMMAND -le 1 ]]; then
echo " --uvvm-vip-ethernet Ethernet"
echo " --uvvm-vip-gmii GMII"
echo " --uvvm-vip-gpio General Purpose Input/Output (GPIO)"
- echo " --uvvm-vip-hvvc2vvc HVVC to VCC bridge"
+ echo " --uvvm-vip-hvvc2vvc HVVC to VVC bridge"
echo " --uvvm-vip-i2c Inter-Integrated Circuit (I²C)"
echo " --uvvm-vip-rgmii RGMII"
echo " --uvvm-vip-sbi Simple Bus Interface"
@@ -367,75 +367,49 @@ if [[ $CLEAN -eq 1 ]]; then
fi
-# UVVM libraries
+# Read order of components
# ==============================================================================
test $VERBOSE -eq 1 && echo -e " ${ANSI_GRAY}Reading compile order files...${ANSI_NOCOLOR}"
-# Read uvvm_util library files
-StructName="UVVM_UTIL"
-LibraryPath="uvvm_util"
-Files=()
-test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Reading compile order from '$SourceDirectory/$LibraryPath/script/compile_order.txt'${ANSI_NOCOLOR}"
-while IFS= read -r File; do
- if [[ ${File:0:2} == "# " ]]; then
- if [[ ${File:2:7} == "library" ]]; then
- LibraryName=${File:10:-1}
- fi
- else
- Files+=("${File:3:-1}")
- fi
-done < <(cat "$SourceDirectory/$LibraryPath/script/compile_order.txt")
-
-CreateLibraryStruct $StructName $LibraryName $LibraryPath $VHDLVersion "${Files[@]}"
-
-test $COMPILE_UVVM_UTILITIES -eq 1 && Libraries+=("$StructName")
-
-
-# Reading uvvm_vvc_framework library files
-StructName="UVVM_VVC_FRAMEWORK"
-LibraryPath="uvvm_vvc_framework"
-Files=()
-test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Reading compile order from '$SourceDirectory/$LibraryPath/script/compile_order.txt'${ANSI_NOCOLOR}"
-while IFS= read -r File; do
- if [[ ${File:0:2} == "# " ]]; then
- if [[ ${File:2:7} == "library" ]]; then
- LibraryName=${File:10:-1}
- fi
- else
- Files+=("${File:3:-1}")
+Components=()
+while IFS= read -r Component; do
+ Component=${Component%?}
+ if [[ ${Component:0:2} != "# " ]]; then
+ Components+=("$Component")
fi
-done < <(cat "$SourceDirectory/$LibraryPath/script/compile_order.txt")
-
-CreateLibraryStruct $StructName $LibraryName $LibraryPath $VHDLVersion "${Files[@]}"
-
-test $COMPILE_UVVM_VVC_FRAMEWORK -eq 1 && Libraries+=("$StructName")
+done < <(cat "$SourceDirectory/script/component_list.txt")
-# Verification IPs
+# Read libraries and Verification IPs
# ==============================================================================
VIPNames=()
-while IFS= read -r VIPDirectory; do
- LibraryPath=$(basename "$VIPDirectory")
- x="${LibraryPath%%_*}"
+for ComponentName in "${Components[@]}"; do
+ x="${ComponentName%%_*}"
pos=${#x}+1
- l=${LibraryPath:$pos}
+ l=${ComponentName:$pos}
VIPName=${l^^}
+ LibraryPath=$ComponentName
+
+ VIPName=${VIPName//UTIL/UTILITIES}
+ VIPName=${VIPName//AXILITE/AXI_LITE}
+ VIPName=${VIPName//AXISTREAM/AXI_STREAM}
test $VERBOSE -eq 1 && echo -e " ${ANSI_GRAY}Found VIP '$VIPName' in '$LibraryPath'.${ANSI_NOCOLOR}"
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Reading compile order from '$SourceDirectory/$LibraryPath/script/compile_order.txt'${ANSI_NOCOLOR}"
- # Reading uvvm_vvc_framework library files
+ # Reading component's files
StructName=$VIPName
Files=()
while IFS= read -r File; do
+ File=${File%?}
if [[ ${File:0:2} == "# " ]]; then
if [[ ${File:2:7} == "library" ]]; then
- LibraryName=${File:10:-1}
+ LibraryName=${File:10}
fi
else
- Files+=("${File:3:-1}")
+ Files+=("${File:3}")
fi
done < <(cat "$SourceDirectory/$LibraryPath/script/compile_order.txt")
@@ -443,14 +417,9 @@ while IFS= read -r VIPDirectory; do
VarName="COMPILE_UVVM_${VIPName}"
test ${!VarName} -eq 1 && Libraries+=("$StructName")
-done < <(find $SourceDirectory/*vip* -type d -prune)
-
-# if [[ $DEBUG -eq 1 ]]; then
- # for StructName in ${Libraries[*]}; do
- # PrintLibraryStruct $StructName " "
- # done
-# fi
+done
+# Compile components
if [[ ${#Libraries[@]} -ne 0 ]]; then
Compile "$SourceDirectory" "${Libraries[*]}"
diff --git a/libraries/vendors/shared.sh b/libraries/vendors/shared.sh
index a00540677..64d0e2e1b 100755
--- a/libraries/vendors/shared.sh
+++ b/libraries/vendors/shared.sh
@@ -266,9 +266,7 @@ AnalyzeVHDL() {
local PiplineStatus=("${PIPESTATUS[@]}")
if [[ ${PiplineStatus[0]} -ne 0 ]]; then
echo 1>&2 -e "$Filter_Indent${COLORED_ERROR} While analyzing '$File'. ExitCode: ${PiplineStatus[0]}${ANSI_NOCOLOR}"
- if [[ $CONTINUE_ON_ERROR -eq 1 ]]; then
- exit 1;
- fi
+ test $CONTINUE_ON_ERROR -eq 0 && exit 1
elif [[ ${PiplineStatus[1]} -ne 0 ]]; then
case $(( ${PiplineStatus[1]} % 4 )) in
# TODO: implement CONTINUE_ON_ERROR in cases ...