aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/formatting
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-30 13:52:30 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-07-01 06:39:47 +0200
commit301dea333ec3e28e95a43b1a4af569ebbedd6ab9 (patch)
treeacd83171832402e31c6a55dafdbb47afa43a1529 /pyGHDL/dom/formatting
parent12a6518bf4d2e41664210b77a5416eca0d1dc7af (diff)
downloadghdl-301dea333ec3e28e95a43b1a4af569ebbedd6ab9.tar.gz
ghdl-301dea333ec3e28e95a43b1a4af569ebbedd6ab9.tar.bz2
ghdl-301dea333ec3e28e95a43b1a4af569ebbedd6ab9.zip
Added package declarations inside of declarations.
Added PSL Default clock (dummy). Added Disconnect specification (dummy).
Diffstat (limited to 'pyGHDL/dom/formatting')
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py
index 4eef043f5..4d6e5dccb 100644
--- a/pyGHDL/dom/formatting/prettyprint.py
+++ b/pyGHDL/dom/formatting/prettyprint.py
@@ -4,6 +4,7 @@ from pydecor import export
from pyGHDL.dom.Attribute import Attribute, AttributeSpecification
from pyGHDL.dom.Misc import Alias
+from pyGHDL.dom.PSL import DefaultClock
from pyGHDL.dom.Subprogram import Procedure
from pyGHDL.dom.Type import (
IntegerType,
@@ -478,12 +479,24 @@ class PrettyPrint:
buffer.append(
"{prefix}- use {name!s}".format(prefix=prefix, name=item.Item)
)
+ elif isinstance(item, Package):
+ buffer.append(
+ "{prefix}- package {name} is ..... end package".format(
+ prefix=prefix, name=item.Identifier
+ )
+ )
elif isinstance(item, PackageInstantiation):
buffer.append(
"{prefix}- package {name} is new {name2!s} generic map (.....)".format(
prefix=prefix, name=item.Identifier, name2=item.PackageReference
)
)
+ elif isinstance(item, DefaultClock):
+ buffer.append(
+ "{prefix}- default {name} is {expr}".format(
+ prefix=prefix, name=item.Identifier, expr="..."
+ )
+ )
else:
raise PrettyPrintException(
"Unhandled declared item kind '{name}'.".format(