aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal')
-rw-r--r--testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-event-attribute.vhdl22
-rw-r--r--testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last-value.vhdl15
-rw-r--r--testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_event-attribute.vhdl21
-rw-r--r--testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_value-attribute.vhdl18
4 files changed, 76 insertions, 0 deletions
diff --git a/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-event-attribute.vhdl b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-event-attribute.vhdl
new file mode 100644
index 000000000..e3c5d30cb
--- /dev/null
+++ b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-event-attribute.vhdl
@@ -0,0 +1,22 @@
+entity test is
+end test;
+
+architecture only of test is
+ signal s : bit;
+begin
+ s <= '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns;
+ p: process
+ begin
+ wait for 1 ns;
+ assert not(s'event) report "TEST FAILED - 'event active" severity failure;
+ wait for 25 ns;
+ -- s <= '1';
+-- wait for 0 ns;
+ assert s = '0' report "TEST FAILED - s has not changed to 0 yet!" severity failure;
+ wait for 10 ns;
+ assert s = '1' report "TEST FAILED - s has not changed to 1 yet!" severity failure;
+ assert (s'event) report "TEST FAILED - 'event not tripped" severity failure;
+ report "TEST PASSED";
+ wait;
+ end process;
+end architecture only;
diff --git a/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last-value.vhdl b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last-value.vhdl
new file mode 100644
index 000000000..a2e0133b4
--- /dev/null
+++ b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last-value.vhdl
@@ -0,0 +1,15 @@
+entity test is
+end test;
+
+architecture only of test is
+ signal s : bit := '0';
+begin
+ p : process
+ begin
+ s <= '1';
+ wait for 0 fs;
+ assert s'last_value = '0' report "TEST FAILED" severity failure;
+ report "TEST PASSED";
+ wait;
+ end process;
+end only;
diff --git a/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_event-attribute.vhdl b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_event-attribute.vhdl
new file mode 100644
index 000000000..dfe1f2224
--- /dev/null
+++ b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_event-attribute.vhdl
@@ -0,0 +1,21 @@
+entity test is
+end test;
+
+architecture only of test is
+ signal s : bit;
+begin
+ s <= '1' after 5 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns;
+ p: process
+ variable v: time;
+ begin
+ wait for 15 ns;
+ v:=s'last_event;
+ assert v = 10 ns report "TEST FAILED - s previous value incorrect!" severity failure;
+ report "TEST PASSED elapsed time is 10 ns" ;
+ wait for 14 ns;
+ v:=s'last_event;
+ assert v = 9 ns report "TEST FAILED - s previous value incorrect!" severity failure;
+ report "TEST PASSED elapsed time is 9 ns" ;
+ wait;
+ end process;
+end architecture only;
diff --git a/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_value-attribute.vhdl b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_value-attribute.vhdl
new file mode 100644
index 000000000..eafaf406b
--- /dev/null
+++ b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/attributes/signal/simple-last_value-attribute.vhdl
@@ -0,0 +1,18 @@
+entity test is
+end test;
+
+architecture only of test is
+ signal s : bit;
+begin
+ s <= '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns;
+ p: process
+ variable v: bit;
+ begin
+ wait for 1 ns;
+ wait for 25 ns;
+ v:=s'last_value;
+ assert v = '1' report "TEST FAILED - s previous value incorrect!" severity failure;
+ report "TEST PASSED v = 1" ;
+ wait;
+ end process;
+end architecture only;