diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2017-07-31 21:35:07 +0200 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2017-08-16 08:28:05 +0200 |
commit | 94c1bacb1138a0ce677f537252c200985366446e (patch) | |
tree | 5f960336f1fc203f764820308a7bd47fd3566f04 /dist/windows | |
parent | 61b24c93601ecf7b9013b0926d9bda74e9eddadd (diff) | |
download | ghdl-94c1bacb1138a0ce677f537252c200985366446e.tar.gz ghdl-94c1bacb1138a0ce677f537252c200985366446e.tar.bz2 ghdl-94c1bacb1138a0ce677f537252c200985366446e.zip |
Added std_logic_misc for all VHDL versions to the synopsys flavor (PowerShell). Fixed an issue in Format-VHDLSourceFile.
Diffstat (limited to 'dist/windows')
-rw-r--r-- | dist/windows/compile-libraries.ps1 | 8 | ||||
-rw-r--r-- | dist/windows/shared.psm1 | 26 |
2 files changed, 16 insertions, 18 deletions
diff --git a/dist/windows/compile-libraries.ps1 b/dist/windows/compile-libraries.ps1 index 6579f2ace..c6898ca5e 100644 --- a/dist/windows/compile-libraries.ps1 +++ b/dist/windows/compile-libraries.ps1 @@ -166,13 +166,13 @@ $SourceFiles = @{ "prmtvs_p", "prmtvs_b", "memory_p", "memory_b" ); - "synopsys8793" = @( - "std_logic_textio" - ); "synopsys" = @( "std_logic_arith", "std_logic_unsigned", - "std_logic_signed", + "std_logic_signed" + ); + "synopsys8793" = @( + "std_logic_textio", "std_logic_misc", "std_logic_misc-body" ); "mentor" = @( diff --git a/dist/windows/shared.psm1 b/dist/windows/shared.psm1 index 2517a6ae4..33136941d 100644 --- a/dist/windows/shared.psm1 +++ b/dist/windows/shared.psm1 @@ -106,20 +106,20 @@ function Format-VHDLSourceFile ) begin - { $State = 0 - $VersionAsInt = switch ($Version) - { "87" { 87 } - "93" { 93 } - "02" { 2 } - "08" { 8 } - } + { $State = 1 + $Version = switch ($Version) + { "87" { 87 } + "93" { 93 } + "02" { 2 } + "08" { 8 } + } } process { if ($InputObject -is [String]) { $Line = $InputObject.ToString() if ($Line.StartsWith("--START-V")) - { $State = switch ($Line.Substring(9, 2)) + { $State = switch ($Line.Substring(9, 2)) { "87" { 87 } "93" { 93 } "02" { 2 } @@ -128,21 +128,19 @@ function Format-VHDLSourceFile } elseif ($Line.StartsWith("--START-!V")) { if ($Line.Substring(10, 2) -eq $Version) - { $State = -1 } + { $State = 2 } } elseif ($Line.StartsWith("--END-V") -or $Line.StartsWith("--END-!V")) - { $State = 0 } + { $State = 1 } else - { if ($State -eq 0) + { if ($State -eq 1) { if ($Line.EndsWith("--V$Version")) { Write-Output $Line } elseif (-not (($Line -like "*--V??") -or ($Line.EndsWith("--!V$Version")))) { Write-Output $Line } } - elseif ($State -eq $VersionAsInt) + elseif ($State -eq $Version) { Write-Output $Line } - # else - # { Write-Host "Discard line: $Line" -ForegroundColor Red } } } else |