From 15449f26754603d49ea2ba4f58a2b2f3495a6568 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 26 Sep 2015 21:08:29 +0200 Subject: Testcase from ticket96 --- testsuite/gna/ticket96/ent.vhd | 30 ++++++++++++++++++++++++++++++ testsuite/gna/ticket96/testsuite.sh | 10 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 testsuite/gna/ticket96/ent.vhd create mode 100755 testsuite/gna/ticket96/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/gna/ticket96/ent.vhd b/testsuite/gna/ticket96/ent.vhd new file mode 100644 index 0000000..d876cc1 --- /dev/null +++ b/testsuite/gna/ticket96/ent.vhd @@ -0,0 +1,30 @@ +entity ent is +end entity; + +architecture a of ent is + procedure proc( + constant seq : in string; + signal clk : in bit) is + begin + for i in seq'left to seq'right loop + report ("left=" & integer'image(seq'left) & + ", right=" & integer'image(seq'right) & + ", i=" & integer'image(i)); + report "seq(i)=" & character'image(seq(i)); + wait until rising_edge(clk); + end loop; + end procedure; + + signal clk : bit := '0'; +begin + + clk <= not clk after 1 ns; + main : process + variable var : string(1 to 10 - 1); + begin + var := (others => '0'); + proc(var & "0", clk); + wait; + end process; +end architecture; + diff --git a/testsuite/gna/ticket96/testsuite.sh b/testsuite/gna/ticket96/testsuite.sh new file mode 100755 index 0000000..604fe24 --- /dev/null +++ b/testsuite/gna/ticket96/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +analyze ent.vhd +elab_simulate ent --stop-time=10ns +clean + +echo "Test successful" -- cgit