diff options
author | Marlon James <marlon.james@gmail.com> | 2021-03-03 10:33:56 -0800 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-03-04 07:49:28 +0100 |
commit | 783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e (patch) | |
tree | 929ab92aac895ec39b5e7780e1fe8cea3edf3be1 /scripts | |
parent | a03aedddf650f923b06ebacb441a713930cd63e1 (diff) | |
download | ghdl-783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e.tar.gz ghdl-783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e.tar.bz2 ghdl-783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e.zip |
VHPI: add initial minimal implementation
Minimal implementation of VHPI provides library loading and
error support. Calling most vhpi_* functions will raise a
VHPI error condition.
Incorporates VHPI thunks into libghdlvpi for linking.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/windows/compile.ps1 | 3 | ||||
-rw-r--r-- | scripts/windows/mcode/compile.bat | 3 | ||||
-rw-r--r-- | scripts/windows/mcode/grt-modules.adb | 2 | ||||
-rw-r--r-- | scripts/windows/targets.psm1 | 2 |
4 files changed, 10 insertions, 0 deletions
diff --git a/scripts/windows/compile.ps1 b/scripts/windows/compile.ps1 index 1c12b7867..33e480548 100644 --- a/scripts/windows/compile.ps1 +++ b/scripts/windows/compile.ps1 @@ -478,6 +478,7 @@ else Copy-Item "$GHDLBuildDir\ghdl.exe" "$GHDLZipPackageDir\bin\ghdl.exe" -ErrorAction SilentlyContinue # include files Copy-Item "$GHDLRootDir\src\grt\vpi_user.h" "$GHDLZipPackageDir\include" -ErrorAction SilentlyContinue + Copy-Item "$GHDLRootDir\src\grt\vhpi_user.h" "$GHDLZipPackageDir\include" -ErrorAction SilentlyContinue # pre-compile scripts Copy-Item $GHDLVendorLibraryDir -Recurse "$GHDLZipPackageDir\lib\vendors" -ErrorAction SilentlyContinue # pre-compiled libraries @@ -580,6 +581,7 @@ else Copy-Item "$GHDLBuildDir\ghdl.exe" "$InstallPath\bin\ghdl.exe" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue # include files Copy-Item "$GHDLRootDir\src\grt\vpi_user.h" "$InstallPath\include" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue + Copy-Item "$GHDLRootDir\src\grt\vhpi_user.h" "$InstallPath\include" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue # pre-compile scripts Copy-Item $GHDLVendorLibraryDir -Recurse "$InstallPath\lib" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue # pre-compiled libraries @@ -656,6 +658,7 @@ else Copy-Item "$GHDLBuildDir\ghdl.exe" "$InstallPath\bin\ghdl.exe" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue # include files Copy-Item "$GHDLRootDir\src\grt\vpi_user.h" "$InstallPath\include" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue + Copy-Item "$GHDLRootDir\src\grt\vhpi_user.h" "$InstallPath\include" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue # pre-compile scripts Copy-Item $GHDLVendorLibraryDir -Recurse "$InstallPath\lib" -Verbose:$EnableVerbose -ErrorAction SilentlyContinue # pre-compiled libraries diff --git a/scripts/windows/mcode/compile.bat b/scripts/windows/mcode/compile.bat index 9a1825e46..2e50f624a 100644 --- a/scripts/windows/mcode/compile.bat +++ b/scripts/windows/mcode/compile.bat @@ -10,6 +10,9 @@ if errorlevel 1 goto failed gcc -c %CFLAGS% ../../../src/grt/grt-cvpi.c if errorlevel 1 goto failed +gcc -c %CFLAGS% ../../../src/grt/grt-cvhpi.c +if errorlevel 1 goto failed + gcc -c %CFLAGS% ../../../src/grt/config/clock.c if errorlevel 1 goto failed diff --git a/scripts/windows/mcode/grt-modules.adb b/scripts/windows/mcode/grt-modules.adb index bbe36e7a9..70f7fca04 100644 --- a/scripts/windows/mcode/grt-modules.adb +++ b/scripts/windows/mcode/grt-modules.adb @@ -16,6 +16,7 @@ with System.Storage_Elements; -- Work around GNAT bug. with Grt.Vcd; with Grt.Vpi; +with Grt.Vhpi; with Grt.Waves; with Grt.Vital_Annotate; with Grt.Disp_Tree; @@ -30,6 +31,7 @@ package body Grt.Modules is Grt.Vcd.Register; Grt.Waves.Register; Grt.Vpi.Register; + Grt.Vhpi.Register; Grt.Vital_Annotate.Register; Grt.Disp_Rti.Register; Grt.Backtraces.Register; diff --git a/scripts/windows/targets.psm1 b/scripts/windows/targets.psm1 index e2ab03a87..e1db658a8 100644 --- a/scripts/windows/targets.psm1 +++ b/scripts/windows/targets.psm1 @@ -234,6 +234,7 @@ function Invoke-CompileCFiles $SourceFiles = @() $SourceFiles += New-Object PSObject -Property @{File="grt\grt-cstdio.c"; CFlags=@()} $SourceFiles += New-Object PSObject -Property @{File="grt\grt-cvpi.c"; CFlags=@()} + $SourceFiles += New-Object PSObject -Property @{File="grt\grt-cvhpi.c"; CFlags=@()} $SourceFiles += New-Object PSObject -Property @{File="grt\grt-cdynload.c"; CFlags=@()} $SourceFiles += New-Object PSObject -Property @{File="grt\config\clock.c"; CFlags=@()} $SourceFiles += New-Object PSObject -Property @{File="grt\config\win32.c"; CFlags=@('-DWITH_GNAT_RUN_TIME')} @@ -314,6 +315,7 @@ function Invoke-CompileGHDLAdaFiles $Parameters += 'grt-cstdio.o' $Parameters += 'clock.o' $Parameters += 'grt-cvpi.o' + $Parameters += 'grt-cvhpi.o' $Parameters += 'grt-cdynload.o' $Parameters += 'memsegs_c.o' $Parameters += 'win32.o' |