diff options
Diffstat (limited to 'testsuite/pyunit/SimplePackage.vhdl')
-rw-r--r-- | testsuite/pyunit/SimplePackage.vhdl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/pyunit/SimplePackage.vhdl b/testsuite/pyunit/SimplePackage.vhdl new file mode 100644 index 000000000..f06cc32fa --- /dev/null +++ b/testsuite/pyunit/SimplePackage.vhdl @@ -0,0 +1,21 @@ +library ieee; +use ieee.numeric_std.all + +package pack_1 is + constant const_1 : boolean; + + type matrix is array(natural range <>, natural range <>) of std_logic; + + subtype matrix8x8 is matrix(7 downto 0, 7 downto 0); + + function func1(value : unsigned) return natural; +end package; + +package body pack_1 is + constant const_1 : boolean := true; + + function func1(value : unsigned) return natural is + begin + return to_integer(value); + end function; +end package body; |