aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-12-26 09:14:46 +0100
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-12-26 09:14:46 +0100
commit283418269b3f5e351415dc6e8946437a1781941c (patch)
tree89b1ecc594327051efb064d4672dbf4b37382137 /testsuite/pyunit
parent4be45cbc3b4fc20eae8f817fce7bd508d6964691 (diff)
downloadghdl-283418269b3f5e351415dc6e8946437a1781941c.tar.gz
ghdl-283418269b3f5e351415dc6e8946437a1781941c.tar.bz2
ghdl-283418269b3f5e351415dc6e8946437a1781941c.zip
New handling of symbols.
Diffstat (limited to 'testsuite/pyunit')
-rw-r--r--testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl21
-rw-r--r--testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl12
2 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl b/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl
new file mode 100644
index 000000000..1a40718aa
--- /dev/null
+++ b/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl
@@ -0,0 +1,21 @@
+-- Author: Patrick Lehmann
+-- License: MIT
+--
+-- A generic counter module used in the StopWatch example.
+--
+library IEEE;
+use IEEE.std_logic_1164.all;
+use IEEE.numeric_std.all;
+
+-- Package with stop watch specific types.
+package StopWatch_pkg is
+ subtype T_BCD is unsigned(3 downto 0);
+ type T_BCD_Vector is array(natural range <>) of T_BCD;
+
+ type T_DIGIT_CONFIGURATION is record
+ Modulo : positive;
+ Dot : std_logic;
+ end record;
+
+ type T_STOPWATCH_CONFIGURATION is array(natural range <>) of T_DIGIT_CONFIGURATION;
+end package;
diff --git a/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl b/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl
new file mode 100644
index 000000000..e6551cffd
--- /dev/null
+++ b/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl
@@ -0,0 +1,12 @@
+-- Author: Patrick Lehmann
+-- License: MIT
+--
+-- A generic counter module used in the StopWatch example.
+--
+context StopWatch_ctx is
+ library IEEE;
+ use IEEE.std_logic_1164.all,
+ IEEE.numeric_std.all;
+
+ use work.StopWatch_pkg.all;
+end context;