aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1233/testsuite.sh
blob: c86134b19d43b7c0107a0f715d3f28fd3f4beea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/sh

. ../../testenv.sh

analyze adder.vhdl
elab adder

if c_compiler_is_available && ghdl_has_feature adder vpi; then
  add_vpi_path

  $GHDL --vpi-compile -v gcc -c vpi_plugin.c
  $GHDL --vpi-link -v gcc -o vpi_plugin.vpi vpi_plugin.o

  simulate adder --vpi=./vpi_plugin.vpi

  rm -f vpi_plugin.vpi vpi_plugin.o
fi
clean

echo "Test successful"