diff options
author | tgingold <tgingold@users.noreply.github.com> | 2021-06-20 16:58:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-20 16:58:55 +0200 |
commit | 37920daab7a1cdcdb7f6b54c2799d73b58634524 (patch) | |
tree | 8b68056072cdd34e47efa55aa629143552a55ba8 /pyGHDL/dom/DesignUnit.py | |
parent | 603c44d06dd0b3f2f49af25045b46dd8aa72979a (diff) | |
parent | 3f3cf203c02671ab4d181d8d74aac2c3cc2c7c5c (diff) | |
download | ghdl-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/DesignUnit.py')
-rw-r--r-- | pyGHDL/dom/DesignUnit.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pyGHDL/dom/DesignUnit.py b/pyGHDL/dom/DesignUnit.py index 3619c47c5..534149677 100644 --- a/pyGHDL/dom/DesignUnit.py +++ b/pyGHDL/dom/DesignUnit.py @@ -41,7 +41,8 @@ This module contains all DOM classes for VHDL's design units (:class:`context <E """ from pydecor import export -from pyVHDLModel.VHDLModel import Entity as VHDLModel_Entity +from pyGHDL.dom.Symbol import EntitySymbol +from pyVHDLModel.VHDLModel import Entity as VHDLModel_Entity, EntityOrSymbol from pyVHDLModel.VHDLModel import Architecture as VHDLModel_Architecture from pyVHDLModel.VHDLModel import Package as VHDLModel_Package from pyVHDLModel.VHDLModel import PackageBody as VHDLModel_PackageBody @@ -87,17 +88,18 @@ class Entity(VHDLModel_Entity, GHDLMixin): @export class Architecture(VHDLModel_Architecture, GHDLMixin): - def __init__(self, name: str, entityName: str): + def __init__(self, name: str, entity: EntityOrSymbol): super().__init__(name) - self.__entityName = entityName + self._entity = entity @classmethod def parse(cls, libraryUnit): name = NodeToName(libraryUnit) entityName = NodeToName(nodes.Get_Entity_Name(libraryUnit)) + entity = EntitySymbol(entityName) - architecture = cls(name, entityName) + architecture = cls(name, entity) for item in GetDeclaredItemsFromChainedNodes( nodes.Get_Declaration_Chain(libraryUnit), "architecture", name |