From 6b5e08c5373607115cb0fec38b67a76e2f7f8927 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 22 Jun 2021 23:30:06 +0200 Subject: Handle shared variables. --- pyGHDL/dom/formatting/prettyprint.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pyGHDL/dom/formatting') 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( -- cgit v1.2.3