aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/formatting
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 23:30:06 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 23:30:06 +0200
commit6b5e08c5373607115cb0fec38b67a76e2f7f8927 (patch)
tree753ee3e4dc0c82b4da339ade374488b51afd4d8c /pyGHDL/dom/formatting
parentf8e700709132f7a65b0962c38379bf4c39033f12 (diff)
downloadghdl-6b5e08c5373607115cb0fec38b67a76e2f7f8927.tar.gz
ghdl-6b5e08c5373607115cb0fec38b67a76e2f7f8927.tar.bz2
ghdl-6b5e08c5373607115cb0fec38b67a76e2f7f8927.zip
Handle shared variables.
Diffstat (limited to 'pyGHDL/dom/formatting')
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py
index 0509b826d..c4f76acaa 100644
--- a/pyGHDL/dom/formatting/prettyprint.py
+++ b/pyGHDL/dom/formatting/prettyprint.py
@@ -24,7 +24,7 @@ from pyGHDL.dom.DesignUnit import (
Context,
Component,
)
-from pyGHDL.dom.Object import Constant, Signal
+from pyGHDL.dom.Object import Constant, Signal, SharedVariable
from pyGHDL.dom.InterfaceItem import (
GenericConstantInterfaceItem,
PortSignalInterfaceItem,
@@ -302,6 +302,16 @@ class PrettyPrint:
expr=str(item.DefaultExpression),
)
)
+ elif isinstance(item, SharedVariable):
+ buffer.append(
+ "{prefix}- shared variable {name} : {subtype}".format(
+ prefix=prefix,
+ name=item.Name,
+ subtype=self.formatSubtypeIndication(
+ item.SubType, "shared variable", item.Name
+ ),
+ )
+ )
elif isinstance(item, Signal):
buffer.append(
"{prefix}- signal {name} : {subtype}{initValue}".format(