aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket30
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-01-19 06:47:08 +0100
committerTristan Gingold <tgingold@free.fr>2015-01-19 06:47:08 +0100
commit989d20ec727fff609283979244865d6058f427bc (patch)
tree5e4a8fac8799c4ee5f7a26dfd8afa852f06b2c4b /testsuite/gna/ticket30
parent2f28dbc09fd009e5003f59c9f3aa511a834f1518 (diff)
downloadghdl-989d20ec727fff609283979244865d6058f427bc.tar.gz
ghdl-989d20ec727fff609283979244865d6058f427bc.tar.bz2
ghdl-989d20ec727fff609283979244865d6058f427bc.zip
Add testcase for ticket30.
Diffstat (limited to 'testsuite/gna/ticket30')
-rw-r--r--testsuite/gna/ticket30/lib_numeric_tb.sdf18
-rw-r--r--testsuite/gna/ticket30/lib_numeric_tb.vhd30
-rwxr-xr-xtestsuite/gna/ticket30/testsuite.sh13
3 files changed, 61 insertions, 0 deletions
diff --git a/testsuite/gna/ticket30/lib_numeric_tb.sdf b/testsuite/gna/ticket30/lib_numeric_tb.sdf
new file mode 100644
index 000000000..7c6e94802
--- /dev/null
+++ b/testsuite/gna/ticket30/lib_numeric_tb.sdf
@@ -0,0 +1,18 @@
+(DELAYFILE
+ (SDFVERSION "3.0")
+ (DESIGN "test_vital_scalar_generic")
+ (DATE "Fri Dec 12 17:46:29 2014")
+ (VENDOR "GHDL")
+ (PROGRAM "GHDL")
+ (VERSION "20141231")
+ (DIVIDER /)
+ (VOLTAGE :0.95:)
+ (TEMPERATURE :85:)
+ (TIMESCALE 1 ps)
+ (CELL (CELLTYPE "numeric_tb")
+ (INSTANCE )
+ (TIMINGCHECK
+ (PERIOD (posedge CLK) ( -44:-45:-64 ))
+ )
+ )
+)
diff --git a/testsuite/gna/ticket30/lib_numeric_tb.vhd b/testsuite/gna/ticket30/lib_numeric_tb.vhd
new file mode 100644
index 000000000..82eb3a0da
--- /dev/null
+++ b/testsuite/gna/ticket30/lib_numeric_tb.vhd
@@ -0,0 +1,30 @@
+use std.textio.all;
+
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+use ieee.vital_primitives.all;
+use ieee.vital_timing.all;
+
+entity numeric_tb is
+ generic (
+ tperiod_CLK_posedge : VitalDelayType := 0.000 ns);
+ port (
+ CLK : in std_ulogic);
+ attribute VITAL_LEVEL0 of numeric_tb : entity is true;
+end numeric_tb;
+
+architecture test of numeric_tb is
+
+begin
+
+ process
+ variable l : line;
+ begin
+ write(l, string'("tperiod_CLK_posedge = "));
+ write(l, tperiod_CLK_posedge);
+ writeline(output, l);
+ wait;
+ end process;
+
+end;
diff --git a/testsuite/gna/ticket30/testsuite.sh b/testsuite/gna/ticket30/testsuite.sh
new file mode 100755
index 000000000..47e207682
--- /dev/null
+++ b/testsuite/gna/ticket30/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+$GHDL -i lib_numeric_tb.vhd
+$GHDL -m numeric_tb
+simulate numeric_tb --stop-time=10ns --wave=numeric_tb.ghw \
+ --sdf=typ==lib_numeric_tb.sdf
+
+clean
+rm numeric_tb.ghw
+
+echo "Test successful"