aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1226/testsuite.sh
blob: 210e01058d24b7300d2ec423295f2a4005940fa7 (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 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"