diff options
Diffstat (limited to 'libraries/vendors/compile-lattice.ps1')
-rw-r--r-- | libraries/vendors/compile-lattice.ps1 | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/libraries/vendors/compile-lattice.ps1 b/libraries/vendors/compile-lattice.ps1 index 991cb7012..b73787032 100644 --- a/libraries/vendors/compile-lattice.ps1 +++ b/libraries/vendors/compile-lattice.ps1 @@ -113,6 +113,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 "LatticeDiamond" Import-Module $PSScriptRoot\shared.psm1 -Verbose:$false -Debug:$false -ArgumentList @("Lattice Diamond", "$WorkingDir") @@ -220,7 +227,7 @@ if ((-not $StopCompiling) -and $ec) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -231,7 +238,7 @@ if ((-not $StopCompiling) -and $ecp) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -242,7 +249,7 @@ if ((-not $StopCompiling) -and $ecp2) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -253,7 +260,7 @@ if ((-not $StopCompiling) -and $ecp3) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -264,7 +271,7 @@ if ((-not $StopCompiling) -and $ecp5u) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -275,7 +282,7 @@ if ((-not $StopCompiling) -and $lptm) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -286,7 +293,7 @@ if ((-not $StopCompiling) -and $lptm2) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -297,7 +304,7 @@ if ((-not $StopCompiling) -and $MachXO) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -308,7 +315,7 @@ if ((-not $StopCompiling) -and $MachXO2) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -319,7 +326,7 @@ if ((-not $StopCompiling) -and $machxo3l) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -330,7 +337,7 @@ if ((-not $StopCompiling) -and $sc) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -341,7 +348,7 @@ if ((-not $StopCompiling) -and $scm) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -352,7 +359,7 @@ if ((-not $StopCompiling) -and $xp) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } @@ -363,7 +370,7 @@ if ((-not $StopCompiling) -and $xp2) $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" } $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) } |