aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/_Translate.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-21 19:19:11 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 12:26:59 +0200
commitba097bd3118db3135e75b913cae81973995777cd (patch)
tree294cf09448709635d71920e9ca939fed52bd89b9 /pyGHDL/dom/_Translate.py
parented99fae7f13db8d5c3e95e935e32db825313b56a (diff)
downloadghdl-ba097bd3118db3135e75b913cae81973995777cd.tar.gz
ghdl-ba097bd3118db3135e75b913cae81973995777cd.tar.bz2
ghdl-ba097bd3118db3135e75b913cae81973995777cd.zip
Handle component declarations.
Diffstat (limited to 'pyGHDL/dom/_Translate.py')
-rw-r--r--pyGHDL/dom/_Translate.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py
index e1770672d..e29a9f827 100644
--- a/pyGHDL/dom/_Translate.py
+++ b/pyGHDL/dom/_Translate.py
@@ -34,7 +34,6 @@ from typing import List
from pydecor import export
-from pyGHDL.dom.Misc import Alias
from pyVHDLModel.VHDLModel import (
Constraint,
Direction,
@@ -97,6 +96,7 @@ from pyGHDL.dom.Expression import (
RotateRightExpression,
)
from pyGHDL.dom.Subprogram import Function
+from pyGHDL.dom.Misc import Alias
__all__ = []
@@ -313,6 +313,10 @@ def GetDeclaredItemsFromChainedNodes(nodeChain: Iir, entity: str, name: str):
print("found function body '{name}'".format(name="????"))
elif kind == nodes.Iir_Kind.Object_Alias_Declaration:
result.append(GetAliasFromNode(item))
+ elif kind == nodes.Iir_Kind.Component_Declaration:
+ from pyGHDL.dom.DesignUnit import Component
+
+ result.append(Component.parse(item))
else:
raise DOMException(
"Unknown declared item kind '{kindName}'({kind}) in {entity} '{name}'.".format(