From ea328fa671fc42569a688c8dfb308d87f42771c3 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 22 Jun 2021 19:20:16 +0200 Subject: Prepared for DeferredConstant. --- pyGHDL/cli/DOM.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pyGHDL/cli') diff --git a/pyGHDL/cli/DOM.py b/pyGHDL/cli/DOM.py index 2feb6aecd..641383686 100755 --- a/pyGHDL/cli/DOM.py +++ b/pyGHDL/cli/DOM.py @@ -9,8 +9,8 @@ from pydecor import export from pyGHDL import GHDLBaseException from pyGHDL.libghdl import LibGHDLException -from pyGHDL.dom import NonStandard from pyGHDL.dom.Common import DOMException +from pyGHDL.dom.NonStandard import Design, Document, Library from pyGHDL.dom.formatting.prettyprint import PrettyPrint, PrettyPrintException __all__ = [] @@ -19,14 +19,16 @@ __api__ = __all__ @export class Application: - _design: NonStandard.Design + _design: Design def __init__(self): - self._design = NonStandard.Design() + self._design = Design() def addFile(self, filename: Path, library: str): - document = NonStandard.Document(filename) - self._design.Documents.append(document) + lib = self._design.GetLibrary(library) + + document = Document(filename) + self._design.AddDocument(document, lib) def prettyPrint(self): PP = PrettyPrint() -- cgit v1.2.3