aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue458/e.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-15 06:38:05 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-15 06:38:05 +0100
commit185840b837766c5cbb6082e3f71b2c122541b8ea (patch)
tree66532e9551d75ed91c9d93924170f7dd35a8e099 /testsuite/gna/issue458/e.vhdl
parente973f74ed2b05170ad0ff4fbaca1998a2f70787c (diff)
downloadghdl-185840b837766c5cbb6082e3f71b2c122541b8ea.tar.gz
ghdl-185840b837766c5cbb6082e3f71b2c122541b8ea.tar.bz2
ghdl-185840b837766c5cbb6082e3f71b2c122541b8ea.zip
Add reproducer for #458
Diffstat (limited to 'testsuite/gna/issue458/e.vhdl')
-rw-r--r--testsuite/gna/issue458/e.vhdl40
1 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/issue458/e.vhdl b/testsuite/gna/issue458/e.vhdl
new file mode 100644
index 000000000..2b07ef763
--- /dev/null
+++ b/testsuite/gna/issue458/e.vhdl
@@ -0,0 +1,40 @@
+entity E is
+end entity;
+
+architecture A of E is
+ signal S1 : bit := '0';
+ signal S2_inertial : bit;
+ signal S2_transport : bit;
+ signal S2_delayed : bit;
+
+ constant LEVEL : severity_level := FAILURE;
+begin
+ S1 <= '1' after 10 ns, '0' after 20 ns;
+
+ S2_inertial <= inertial S1 after 100 ns;
+ S2_transport <= transport S1 after 100 ns;
+ S2_delayed <= S1'delayed(100 ns);
+
+ CheckInertial: process
+ begin
+ wait until S2_inertial = '1' for 200 ns;
+ assert (S2_inertial = '0') report "Pulse was not rejected!" severity LEVEL;
+ wait;
+ end process;
+
+ CheckTransport: process
+ begin
+ wait until S2_transport = '1' for 115 ns;
+ assert (S2_transport = '1') report "Pulse was not transport delayed!" severity LEVEL;
+ assert (now = 110 ns) report "Transport delayed pulse was not received at 110 ns!" severity LEVEL;
+ wait;
+ end process;
+
+ CheckDelayed: process
+ begin
+ wait until S2_delayed = '1' for 115 ns;
+ assert (S2_delayed = '1') report "Pulse was not delayed!" severity LEVEL;
+ assert (now = 110 ns) report "Delayed pulse was not received at 110 ns!" severity LEVEL;
+ wait;
+ end process;
+end architecture;