diff options
author | Patrick Lehmann <Patrick.Lehmann@tu-dresden.de> | 2016-06-07 20:54:10 +0200 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2016-06-07 20:54:10 +0200 |
commit | a41a009f2ebec350f0ebbcbf8353223a15cfa557 (patch) | |
tree | 44e1d7374c4aa7bea4f8541296f18c70b087682d /libraries/vendors/compile-vunit.ps1 | |
parent | 20259a7f396e03c5bfce9237fd5732eb931e3d23 (diff) | |
download | ghdl-a41a009f2ebec350f0ebbcbf8353223a15cfa557.tar.gz ghdl-a41a009f2ebec350f0ebbcbf8353223a15cfa557.tar.bz2 ghdl-a41a009f2ebec350f0ebbcbf8353223a15cfa557.zip |
Paebbels/master (#75)
* Obviously, this is the initial commit on a .gitignore file.
* Implemented vendor specific compile scripts for: Altera Quartus-II (tested with 15.0), Xilinx ISE (tested with 14.7) and OSVVM.
* Minor fixes.
* First version of a README file for the vendor specific library compile scripts.
* Vendor specific simulation library compile scripts: Improved error handling by stream processing. Extracted configuration into a config.ps1 file.
* Minor fixes.
* Added Unisim SecureIP primitives. Added Unimacro library.
* Fixed file encoding of compile-osvvm.ps1. Implemented a 'advanced functions' to restore ghdl warning/error messages as a one-liner.
* Splitted Xilinx compile scripts into *-ise.ps1 and *-vivado.ps1.
* Added compile script for VUnit.
* Updated README.md for the vendor compile scripts.
* Added file headers. Change config.ps1 and shared.ps1 to a PowerShell module (*.psm1).
* Fixed embedded help pages in all compile scripts.
* Fixed all errors in compile script for Vivado simulation libraries: *_retarget_VCOMP.vhd was missing.
* First steps towards compile scripts for Linux.
* Translated lines from Windows script to Linux script.
* Step 3 - colors and basic control blocks.
* Changed copyright line in file header.
* Changed copyright line in file header.
* Added colorizer rules. Added skip mode for existing object files. Added cleanup mode.
* Disabled vital checks in Xilinx's simprim library. Fixed typo.
* Added '-Clean' parameter to cleanup the directory before analyzing.
* Added a new '-Help' switch to all compile scripts to show the embedded help page(s).
* Generalized config.sh. Fixed some bugs in compile-xilinx-ise.sh.
* Added command line argument parsing.
* Fixed syntax errors on Linux.
* Added --all option. Generalized GHDL parameters.
* Added '--skip-largefile' option.
* Added the 'stop compiling' feature (not working).
* Updated README.md for vendor specific compile scripts.
* Implemented a check if grcat is installed on the system. Added support to execute the script from an other directory. Changed file size test from 'du -b' to 'wc -b'.
* Fixed exit code problem in pipes. Fixed word count problem.
* Minor fixes.
* Fixed possible syntax error.
* Implemented vendor specific library compile script for OSVVM.
* Implemented vendor specific library compile script for VUnit.
* Enabled disabled messages. Fixed typos.
* Implemented vendor specific library compile script for Xilinx Vivado.
* Minor fixes.
* Implemented vendor specific library compile script for Altera Quartus-II.
* Applied chmod to all new compile scripts.
* Minor fixes.
* Fixed typos.
* Implemented 'halt-on-error' feature.
* Fixed relative path problem for grcat.
* README updates.
* Updated PoSh scripts for
- IEEE library compilation (complib.ps1)
- added VITAL2000 support for VHDL-2008
- minor fixes
- vendor compile scripts
- added VHDL93 and VHDL2008 switches to compile vendor libraries with VHDL-2008
- minor fixes
* Updated vendor library compile scripts (Bash) for Linux, too.
* Fixed error in vendor library compile scripts for osvvm and vunit.
* Windows compile scripts for mcode backend: Reworked compile.ps1.
* Changed default output directory to xilinx-ise and xilinx-vivado.
* compile-altera.sh: Skip large files
* Updated compile script for OSVVM.
* Improved OSVVM compile script for Linux.
Diffstat (limited to 'libraries/vendors/compile-vunit.ps1')
-rw-r--r-- | libraries/vendors/compile-vunit.ps1 | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/libraries/vendors/compile-vunit.ps1 b/libraries/vendors/compile-vunit.ps1 index 53c104bc5..e2230fded 100644 --- a/libraries/vendors/compile-vunit.ps1 +++ b/libraries/vendors/compile-vunit.ps1 @@ -46,10 +46,12 @@ param( [switch]$All = $true, # Clean up directory before analyzing. - [switch]$Clean = $false, + [switch]$Clean = $false, #Skip warning messages. (Show errors only.) [switch]$SuppressWarnings = $false, + # Halt on errors + [switch]$HaltOnError = $false, # Show the embedded help page(s) [switch]$Help = $false @@ -72,14 +74,11 @@ Import-Module $PSScriptRoot\shared.psm1 $SourceDir = $InstallationDirectory["VUnit"] $DestinationDir = $DestinationDirectory["VUnit"] -if (-not $All) -{ $All = $false } -elseif ($All -eq $true) +if ($All -eq $true) { # nothing to configure } -$StopCompiling = $false - +$ErrorCount = 0 # define global GHDL Options $GlobalOptions = ("-a", "-fexplicit", "-frelaxed-rules", "--mb-comments", "--warn-binding", "--no-vital-checks", "--std=08") @@ -97,60 +96,61 @@ if ($Clean) } # compile vunit_lib library -if (-not $StopCompiling) -{ Write-Host "Compiling library 'vunit_lib' ..." -ForegroundColor Yellow - $Options = $GlobalOptions - $Files = ( - "$SourceDir\vhdl\run\src\stop_api.vhd", - "$SourceDir\vhdl\vhdl\src\lib\std\textio.vhd", - "$SourceDir\vhdl\vhdl\src\lang\lang.vhd", - "$SourceDir\vhdl\com\src\com_types.vhd", - "$SourceDir\vhdl\run\src\stop_body_2008.vhd", - "$SourceDir\vhdl\com\src\com_api.vhd", - "$SourceDir\vhdl\string_ops\src\string_ops.vhd", - "$SourceDir\vhdl\path\src\path.vhd", - "$SourceDir\vhdl\logging\src\log_types.vhd", - "$SourceDir\vhdl\logging\src\log_formatting.vhd", - "$SourceDir\vhdl\logging\src\log_special_types200x.vhd", - "$SourceDir\vhdl\array\src\array_pkg.vhd", - "$SourceDir\vhdl\logging\src\log_base_api.vhd", - "$SourceDir\vhdl\logging\src\log_base.vhd", - "$SourceDir\vhdl\logging\src\log_api.vhd", - "$SourceDir\vhdl\logging\src\log.vhd", - "$SourceDir\vhdl\check\src\check_types.vhd", - "$SourceDir\vhdl\check\src\check_special_types200x.vhd", - "$SourceDir\vhdl\check\src\check_base_api.vhd", - "$SourceDir\vhdl\check\src\check_base.vhd", - "$SourceDir\vhdl\check\src\check_api.vhd", - "$SourceDir\vhdl\check\src\check.vhd", - "$SourceDir\vhdl\dictionary\src\dictionary.vhd", - "$SourceDir\vhdl\run\src\run_types.vhd", - "$SourceDir\vhdl\run\src\run_special_types200x.vhd", - "$SourceDir\vhdl\run\src\run_base_api.vhd", - "$SourceDir\vhdl\run\src\run_base.vhd", - "$SourceDir\vhdl\run\src\run_api.vhd", - "$SourceDir\vhdl\run\src\run.vhd", - "$SourceDir\vhdl\vunit_run_context.vhd", - "$SourceDir\vhdl\vunit_context.vhd", - "$SourceDir\vhdl\com\src\com_std_codec_builder.vhd", - "$SourceDir\vhdl\com\src\com_debug_codec_builder.vhd", - "$SourceDir\vhdl\com\src\com_string.vhd", - "$SourceDir\vhdl\com\src\com_codec_api.vhd", - "$SourceDir\vhdl\com\src\com_codec.vhd", - "$SourceDir\vhdl\com\src\com.vhd", - "$SourceDir\vhdl\com\src\com_context.vhd") - foreach ($File in $Files) - { Write-Host "Analyzing package '$File'" -ForegroundColor Cyan - $InvokeExpr = "ghdl.exe " + ($Options -join " ") + " --work=vunit_lib " + $File + " 2>&1" - $ErrorRecordFound = Invoke-Expression $InvokeExpr | Restore-NativeCommandStream | Write-ColoredGHDLLine $SuppressWarnings - $StopCompiling = ($LastExitCode -ne 0) - if ($StopCompiling) { break } +Write-Host "Compiling library 'vunit_lib' ..." -ForegroundColor Yellow +$Options = $GlobalOptions +$Files = ( + "$SourceDir\vunit\vhdl\run\src\stop_api.vhd", + "$SourceDir\vunit\vhdl\vhdl\src\lib\std\textio.vhd", + "$SourceDir\vunit\vhdl\vhdl\src\lang\lang.vhd", + "$SourceDir\vunit\vhdl\com\src\com_types.vhd", + "$SourceDir\vunit\vhdl\run\src\stop_body_2008.vhd", + "$SourceDir\vunit\vhdl\com\src\com_api.vhd", + "$SourceDir\vunit\vhdl\string_ops\src\string_ops.vhd", + "$SourceDir\vunit\vhdl\path\src\path.vhd", + "$SourceDir\vunit\vhdl\logging\src\log_types.vhd", + "$SourceDir\vunit\vhdl\logging\src\log_formatting.vhd", + "$SourceDir\vunit\vhdl\logging\src\log_special_types200x.vhd", + "$SourceDir\vunit\vhdl\array\src\array_pkg.vhd", + "$SourceDir\vunit\vhdl\logging\src\log_base_api.vhd", + "$SourceDir\vunit\vhdl\logging\src\log_base.vhd", + "$SourceDir\vunit\vhdl\logging\src\log_api.vhd", + "$SourceDir\vunit\vhdl\logging\src\log.vhd", + "$SourceDir\vunit\vhdl\check\src\check_types.vhd", + "$SourceDir\vunit\vhdl\check\src\check_special_types200x.vhd", + "$SourceDir\vunit\vhdl\check\src\check_base_api.vhd", + "$SourceDir\vunit\vhdl\check\src\check_base.vhd", + "$SourceDir\vunit\vhdl\check\src\check_api.vhd", + "$SourceDir\vunit\vhdl\check\src\check.vhd", + "$SourceDir\vunit\vhdl\dictionary\src\dictionary.vhd", + "$SourceDir\vunit\vhdl\run\src\run_types.vhd", + "$SourceDir\vunit\vhdl\run\src\run_special_types200x.vhd", + "$SourceDir\vunit\vhdl\run\src\run_base_api.vhd", + "$SourceDir\vunit\vhdl\run\src\run_base.vhd", + "$SourceDir\vunit\vhdl\run\src\run_api.vhd", + "$SourceDir\vunit\vhdl\run\src\run.vhd", + "$SourceDir\vunit\vhdl\vunit_run_context.vhd", + "$SourceDir\vunit\vhdl\vunit_context.vhd", + "$SourceDir\vunit\vhdl\com\src\com_std_codec_builder.vhd", + "$SourceDir\vunit\vhdl\com\src\com_debug_codec_builder.vhd", + "$SourceDir\vunit\vhdl\com\src\com_string.vhd", + "$SourceDir\vunit\vhdl\com\src\com_codec_api.vhd", + "$SourceDir\vunit\vhdl\com\src\com_codec.vhd", + "$SourceDir\vunit\vhdl\com\src\com.vhd", + "$SourceDir\vunit\vhdl\com\src\com_context.vhd") +foreach ($File in $Files) +{ Write-Host "Analyzing package '$File'" -ForegroundColor Cyan + $InvokeExpr = "ghdl.exe " + ($Options -join " ") + " --work=vunit_lib " + $File + " 2>&1" + $ErrorRecordFound = Invoke-Expression $InvokeExpr | Restore-NativeCommandStream | Write-ColoredGHDLLine $SuppressWarnings + if ($LastExitCode -ne 0) + { $ErrorCount += 1 + if ($HaltOnError) + { break } } } Write-Host "--------------------------------------------------------------------------------" Write-Host "Compiling VUnit library " -NoNewline -if ($StopCompiling) +if ($ErrorCount -gt 0) { Write-Host "[FAILED]" -ForegroundColor Red } else { Write-Host "[SUCCESSFUL]" -ForegroundColor Green } |