aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/SimplePackage.vhdl
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2020-12-29 17:19:09 +0100
committerGitHub <noreply@github.com>2020-12-29 17:19:09 +0100
commit7ca54117b8f757396ba5ef04c83ff1228ca94384 (patch)
treecc5f7f4166cc0570bda5cf2047d3ef7abbc36e37 /testsuite/pyunit/SimplePackage.vhdl
parent340fc792bba2ffdb4f930bc427a39ea3a1b659b2 (diff)
parent50adcf884c3cfa4e33ca45769295f163baa63a3e (diff)
downloadghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.tar.gz
ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.tar.bz2
ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.zip
Merge pull request #1556 from Paebbels/paebbels/pyGHDL
Cleanup and Restructuring of pyGHDL
Diffstat (limited to 'testsuite/pyunit/SimplePackage.vhdl')
-rw-r--r--testsuite/pyunit/SimplePackage.vhdl21
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;