diff options
Diffstat (limited to 'libraries/vendors/compile-altera.ps1')
-rw-r--r-- | libraries/vendors/compile-altera.ps1 | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/libraries/vendors/compile-altera.ps1 b/libraries/vendors/compile-altera.ps1 index 80f36637e..bcbbcba0d 100644 --- a/libraries/vendors/compile-altera.ps1 +++ b/libraries/vendors/compile-altera.ps1 @@ -102,6 +102,13 @@ param( # save working directory $WorkingDir = Get-Location +# set default values +$EnableVerbose = $PSCmdlet.MyInvocation.BoundParameters["Verbose"] +$EnableDebug = $PSCmdlet.MyInvocation.BoundParameters["Debug"] +if ($EnableVerbose -eq $null) { $EnableVerbose = $false } +if ($EnableDebug -eq $null) { $EnableDebug = $false } +if ($EnableDebug -eq $true) { $EnableVerbose = $true } + # load modules from GHDL's 'vendors' library directory Import-Module $PSScriptRoot\config.psm1 -Verbose:$false -Debug:$false -ArgumentList "AlteraQuartus" Import-Module $PSScriptRoot\shared.psm1 -Verbose:$false -Debug:$false -ArgumentList @("Altera Quartus", "$WorkingDir") @@ -187,7 +194,7 @@ if ((-not $StopCompiling) -and $Altera) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -201,7 +208,7 @@ if ((-not $StopCompiling) -and $Altera) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -219,7 +226,7 @@ if ((-not $StopCompiling) -and $Altera) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -233,7 +240,7 @@ if ((-not $StopCompiling) -and $Altera) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -246,7 +253,7 @@ if ((-not $StopCompiling) -and $Altera) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -262,7 +269,7 @@ if ((-not $StopCompiling) -and $Max) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -276,7 +283,7 @@ if ((-not $StopCompiling) -and $Max) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -290,7 +297,7 @@ if ((-not $StopCompiling) -and $Max) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -306,7 +313,7 @@ if ((-not $StopCompiling) -and $Arria) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -320,7 +327,7 @@ if ((-not $StopCompiling) -and $Arria) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -335,7 +342,7 @@ if ((-not $StopCompiling) -and $Arria) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -351,7 +358,7 @@ if ((-not $StopCompiling) -and $Arria) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -367,7 +374,7 @@ if ((-not $StopCompiling) -and $Arria) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -381,7 +388,7 @@ if ((-not $StopCompiling) -and $Arria) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -397,7 +404,7 @@ if ((-not $StopCompiling) -and $Cyclone) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -411,7 +418,7 @@ if ((-not $StopCompiling) -and $Cyclone) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -425,7 +432,7 @@ if ((-not $StopCompiling) -and $Cyclone) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -441,7 +448,7 @@ if ((-not $StopCompiling) -and $Cyclone) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -457,7 +464,7 @@ if ((-not $StopCompiling) -and $Stratix) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -471,7 +478,7 @@ if ((-not $StopCompiling) -and $Stratix) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -487,7 +494,7 @@ if ((-not $StopCompiling) -and $Stratix) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -501,7 +508,7 @@ if ((-not $StopCompiling) -and $Stratix) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -515,7 +522,7 @@ if ((-not $StopCompiling) -and $Nanometer) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } @@ -533,7 +540,7 @@ if ((-not $StopCompiling) -and $Nanometer) $SourceFiles = $Files | % { "$SourceDirectory\$_" } $ErrorCount += 0 - Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError + Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0) } |