diff options
author | Ben Reynwar <ben@reynwar.net> | 2020-05-10 07:56:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 16:56:48 +0200 |
commit | a0919fe84b25f37d0307805650379830094fcfbf (patch) | |
tree | 01d1e5693e7ce954495eca1473319a32057c57fe /testsuite/vpi/vpi001/testsuite.sh | |
parent | 06202188e0e88c0096518415413c08bd0471644b (diff) | |
download | ghdl-a0919fe84b25f37d0307805650379830094fcfbf.tar.gz ghdl-a0919fe84b25f37d0307805650379830094fcfbf.tar.bz2 ghdl-a0919fe84b25f37d0307805650379830094fcfbf.zip |
Constants in vpi (#1297)
* Adding some very basic vpi tests.
* Modify test so that's it's checking VPI access to constants.
* Provide VPI to access constants.
* Add vpi tests to testsuite.
* Fix bug to allow getting values of generic/constant boolean and std_logic.
* Fix stupid copying mistake in last commit.
* Formatting and trying to get tests working on windows.
* Fixing comment and removing redundant VhpiConstantDeclK
Diffstat (limited to 'testsuite/vpi/vpi001/testsuite.sh')
-rwxr-xr-x | testsuite/vpi/vpi001/testsuite.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/vpi/vpi001/testsuite.sh b/testsuite/vpi/vpi001/testsuite.sh new file mode 100755 index 000000000..a3edac791 --- /dev/null +++ b/testsuite/vpi/vpi001/testsuite.sh @@ -0,0 +1,24 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze mydesign.vhdl +elab myentity + +if ghdl_has_feature myentity vpi; then + $GHDL --vpi-compile -v gcc -c vpi1.c + $GHDL --vpi-link -v gcc -o vpi1.vpi vpi1.o + + add_vpi_path + + simulate myentity --vpi=./vpi1.vpi | tee myentity.out + if grep -q Error myentity.out; then + echo "Error in output" + exit 1; + fi + + rm -f vpi1.vpi vpi1.o myentity.out +fi +clean + +echo "Test successful" |