summaryrefslogtreecommitdiff
path: root/testsuite/gna/ticket37
diff options
context:
space:
mode:
authorTristan Gingold2015-03-07 07:30:07 +0100
committerTristan Gingold2015-03-07 07:30:07 +0100
commit8af64459f397e5037dd7e25317491edad39d8006 (patch)
tree13476a4fe7a97c9dc62df4d03bf33045e2920b04 /testsuite/gna/ticket37
parentad4ac5499e426cff9b76479e8ff6250a32fcbb57 (diff)
downloadghdl-8af64459f397e5037dd7e25317491edad39d8006.tar.gz
ghdl-8af64459f397e5037dd7e25317491edad39d8006.tar.bz2
ghdl-8af64459f397e5037dd7e25317491edad39d8006.zip
Implement ticket 37: add switch -gNAME=VAL to override top entity generics.
Diffstat (limited to 'testsuite/gna/ticket37')
-rw-r--r--testsuite/gna/ticket37/dispgen.vhdl8
-rwxr-xr-xtestsuite/gna/ticket37/testsuite.sh12
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/gna/ticket37/dispgen.vhdl b/testsuite/gna/ticket37/dispgen.vhdl
new file mode 100644
index 0000000..73dd486
--- /dev/null
+++ b/testsuite/gna/ticket37/dispgen.vhdl
@@ -0,0 +1,8 @@
+entity dispgen is
+ generic (str : string := "init");
+end dispgen;
+
+architecture behav of dispgen is
+begin
+ assert false report "str: " & str severity note;
+end behav;
diff --git a/testsuite/gna/ticket37/testsuite.sh b/testsuite/gna/ticket37/testsuite.sh
new file mode 100755
index 0000000..ea51e5c
--- /dev/null
+++ b/testsuite/gna/ticket37/testsuite.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze dispgen.vhdl
+elab_simulate dispgen
+
+elab_simulate dispgen -gstr=Hello
+
+clean
+
+echo "Test successful"