aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/formatting/prettyprint.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyGHDL/dom/formatting/prettyprint.py')
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py
index 5be27492d..be1d2a511 100644
--- a/pyGHDL/dom/formatting/prettyprint.py
+++ b/pyGHDL/dom/formatting/prettyprint.py
@@ -144,7 +144,9 @@ class PrettyPrint:
buffer.append(f"{prefix} - {package.Identifier} instantiate from {package.PackageReference}")
buffer.append(f"{prefix}Entities ({len(library.Entities)}):")
for entity in library.Entities.values():
- buffer.append(f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures])})")
+ buffer.append(
+ f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures.values()])})"
+ )
buffer.append(f"{prefix}Configurations ({len(library.Configurations)}):")
for configuration in library.Configurations.values():
buffer.append(f"{prefix} - {configuration.Identifier}")
@@ -213,7 +215,7 @@ class PrettyPrint:
for item in entity.Statements:
buffer.append(f"{prefix} ...")
buffer.append(f"{prefix} Architectures:")
- for item in entity.Architectures:
+ for item in entity.Architectures.values():
buffer.append(f"{prefix} - {item.Identifier}")
return buffer
@@ -442,13 +444,14 @@ class PrettyPrint:
def formatSubtypeIndication(self, subtypeIndication, entity: str, name: str) -> str:
if isinstance(subtypeIndication, SimpleSubtypeSymbol):
- return f"{subtypeIndication.SymbolName}"
+ return f"{subtypeIndication.Identifier}"
elif isinstance(subtypeIndication, ConstrainedCompositeSubtypeSymbol):
constraints = []
- for constraint in subtypeIndication.Constraints:
- constraints.append(str(constraint))
+ # FIXME: disabled due to problems with symbols
+ # for constraint in subtypeIndication.Constraints:
+ # constraints.append(str(constraint))
- return f"{subtypeIndication.SymbolName}({', '.join(constraints)})"
+ return f"{subtypeIndication.Identifier}({', '.join(constraints)})"
else:
raise PrettyPrintException(
f"Unhandled subtype kind '{subtypeIndication.__class__.__name__}' for {entity} '{name}'."