diff options
Diffstat (limited to 'testsuite/pyunit/dom/examples/StopWatch')
5 files changed, 16 insertions, 29 deletions
diff --git a/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl b/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl index 1a40718aa..ea66f7597 100644 --- a/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl +++ b/testsuite/pyunit/dom/examples/StopWatch/StopWatch.ctx.vhdl @@ -1,21 +1,11 @@ -- Author: Patrick Lehmann -- License: MIT -- --- A generic counter module used in the StopWatch example. +-- undocumented -- -library IEEE; -use IEEE.std_logic_1164.all; -use IEEE.numeric_std.all; +context StopWatch_ctx is + library lib_Utilities; + context lib_Utilities.Utilities_pkg; --- 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; + use work.StopWatch_pkg.all; +end context; diff --git a/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl b/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl index e6551cffd..050682098 100644 --- a/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl +++ b/testsuite/pyunit/dom/examples/StopWatch/Utilities.ctx.vhdl @@ -1,12 +1,12 @@ -- Author: Patrick Lehmann -- License: MIT -- --- A generic counter module used in the StopWatch example. +-- undocumented -- -context StopWatch_ctx is +context Utilities_ctx is library IEEE; use IEEE.std_logic_1164.all, IEEE.numeric_std.all; - use work.StopWatch_pkg.all; + use work.Utilities_pkg.all; end context; diff --git a/testsuite/pyunit/dom/examples/StopWatch/Utilities.pkg.vhdl b/testsuite/pyunit/dom/examples/StopWatch/Utilities.pkg.vhdl index 16a40ccba..e15048dcf 100644 --- a/testsuite/pyunit/dom/examples/StopWatch/Utilities.pkg.vhdl +++ b/testsuite/pyunit/dom/examples/StopWatch/Utilities.pkg.vhdl @@ -9,7 +9,7 @@ use IEEE.numeric_std.all; -- Useful utility functions and types. -package Utilities is +package Utilities_pkg is type freq is range integer'low to integer'high units Hz; kHz = 1000 Hz; @@ -33,7 +33,7 @@ package Utilities is end package; -package body Utilities is +package body Utilities_pkg is function simulation return boolean is variable result : boolean := FALSE; begin diff --git a/testsuite/pyunit/dom/examples/StopWatch/seg7_Encoder.vhdl b/testsuite/pyunit/dom/examples/StopWatch/seg7_Encoder.vhdl index 3742982be..88074c884 100644 --- a/testsuite/pyunit/dom/examples/StopWatch/seg7_Encoder.vhdl +++ b/testsuite/pyunit/dom/examples/StopWatch/seg7_Encoder.vhdl @@ -3,12 +3,7 @@ -- -- A generic counter module used in the StopWatch example. -- -library IEEE; -use IEEE.std_logic_1164.all; -use IEEE.numeric_std.all; - -use work.Utilities.all; -use work.StopWatch_pkg.all; +context work.StopWatch_ctx; -- Encoder that translates from 4-bit binary (BCD) to 7-segment code. diff --git a/testsuite/pyunit/dom/examples/StopWatch/toplevel.Encoder.vhdl b/testsuite/pyunit/dom/examples/StopWatch/toplevel.Encoder.vhdl index 58294b67f..de18778a0 100644 --- a/testsuite/pyunit/dom/examples/StopWatch/toplevel.Encoder.vhdl +++ b/testsuite/pyunit/dom/examples/StopWatch/toplevel.Encoder.vhdl @@ -7,8 +7,10 @@ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; -use work.Utilities.all; -use work.StopWatch_pkg.all; +library lib_Utilities; +use lib_Utilities.Utilities_pkg.all; + +use lib_StopWatch.StopWatch_pkg.all; -- Toplevel module to demonstrate the translation of 4 slide-switches to 1 digit 7-segment display. |