From f6b61769014221f190b68c3bae4acac1441f79b5 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 11 Apr 2020 15:32:15 +0200 Subject: testsuite/synth: add test for #1212 --- testsuite/synth/issue1212/fileissue.vhdl | 29 +++++++++++++++++++++++++++++ testsuite/synth/issue1212/testsuite.sh | 7 +++++++ 2 files changed, 36 insertions(+) create mode 100644 testsuite/synth/issue1212/fileissue.vhdl create mode 100755 testsuite/synth/issue1212/testsuite.sh diff --git a/testsuite/synth/issue1212/fileissue.vhdl b/testsuite/synth/issue1212/fileissue.vhdl new file mode 100644 index 000000000..fe25c38ca --- /dev/null +++ b/testsuite/synth/issue1212/fileissue.vhdl @@ -0,0 +1,29 @@ +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; +use STD.TEXTIO.all; + +entity fileissue is + generic( + data_width : integer := 4 + ); + port( + clk : in std_logic; + di : in std_logic_vector(data_width - 1 downto 0); + do : out std_logic_vector(data_width - 1 downto 0) + ); +end fileissue; + +architecture behavioral of fileissue is + file results : text; +begin + process(clk) + variable txtline : line; + variable file_status : file_open_status; + begin + file_open(file_status, results, "explicit.dat", write_mode); + write(txtline, string'("--------------------")); + writeline(results, txtline); + end process; + +end behavioral; + diff --git a/testsuite/synth/issue1212/testsuite.sh b/testsuite/synth/issue1212/testsuite.sh new file mode 100755 index 000000000..6c89b999e --- /dev/null +++ b/testsuite/synth/issue1212/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_failure fileissue.vhdl -e + +echo "Test successful" -- cgit v1.2.3