aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/Aggregates.py
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2021-06-20 16:58:55 +0200
committerGitHub <noreply@github.com>2021-06-20 16:58:55 +0200
commit37920daab7a1cdcdb7f6b54c2799d73b58634524 (patch)
tree8b68056072cdd34e47efa55aa629143552a55ba8 /pyGHDL/dom/Aggregates.py
parent603c44d06dd0b3f2f49af25045b46dd8aa72979a (diff)
parent3f3cf203c02671ab4d181d8d74aac2c3cc2c7c5c (diff)
downloadghdl-37920daab7a1cdcdb7f6b54c2799d73b58634524.tar.gz
ghdl-37920daab7a1cdcdb7f6b54c2799d73b58634524.tar.bz2
ghdl-37920daab7a1cdcdb7f6b54c2799d73b58634524.zip
Merge pull request #1798 from Paebbels/paebbels/aggregates
Python-C/Ada Bindings - Updated decorator
Diffstat (limited to 'pyGHDL/dom/Aggregates.py')
-rw-r--r--pyGHDL/dom/Aggregates.py94
1 files changed, 94 insertions, 0 deletions
diff --git a/pyGHDL/dom/Aggregates.py b/pyGHDL/dom/Aggregates.py
new file mode 100644
index 000000000..ac8ecbca8
--- /dev/null
+++ b/pyGHDL/dom/Aggregates.py
@@ -0,0 +1,94 @@
+# =============================================================================
+# ____ _ _ ____ _ _
+# _ __ _ _ / ___| | | | _ \| | __| | ___ _ __ ___
+# | '_ \| | | | | _| |_| | | | | | / _` |/ _ \| '_ ` _ \
+# | |_) | |_| | |_| | _ | |_| | |___ | (_| | (_) | | | | | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)__,_|\___/|_| |_| |_|
+# |_| |___/
+# =============================================================================
+# Authors:
+# Patrick Lehmann
+#
+# Package module: DOM: VHDL design units (e.g. context or package).
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2021 Tristan Gingold
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <gnu.org/licenses>.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+
+"""
+This module contains all DOM classes for VHDL's design units (:class:`context <Entity>`,
+:class:`architecture <Architecture>`, :class:`package <Package>`,
+:class:`package body <PackageBody>`, :class:`context <Context>` and
+:class:`configuration <Configuration>`.
+
+
+"""
+from pydecor import export
+
+from pyGHDL.dom.Range import Range
+from pyGHDL.dom.Symbol import EnumerationLiteralSymbol
+from pyVHDLModel.VHDLModel import (
+ SimpleAggregateElement as VHDLModel_SimpleAggregateElement,
+ IndexedAggregateElement as VHDLModel_IndexedAggregateElement,
+ RangedAggregateElement as VHDLModel_RangedAggregateElement,
+ NamedAggregateElement as VHDLModel_NamedAggregateElement,
+ OthersAggregateElement as VHDLModel_OthersAggregateElement,
+ Expression,
+)
+
+
+__all__ = []
+
+
+@export
+class SimpleAggregateElement(VHDLModel_SimpleAggregateElement):
+ def __init__(self, expression: Expression):
+ super().__init__()
+ self._expression = expression
+
+
+@export
+class IndexedAggregateElement(VHDLModel_IndexedAggregateElement):
+ def __init__(self, index: Expression, expression: Expression):
+ super().__init__()
+ self._index = index
+ self._expression = expression
+
+
+@export
+class RangedAggregateElement(VHDLModel_RangedAggregateElement):
+ def __init__(self, r: Range, expression: Expression):
+ super().__init__()
+ self._range = r
+ self._expression = expression
+
+
+@export
+class NamedAggregateElement(VHDLModel_NamedAggregateElement):
+ def __init__(self, name: EnumerationLiteralSymbol, expression: Expression):
+ super().__init__()
+ self._name = name
+ self._expression = expression
+
+
+@export
+class OthersAggregateElement(VHDLModel_OthersAggregateElement):
+ def __init__(self, expression: Expression):
+ super().__init__()
+ self._expression = expression