aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/cli
diff options
context:
space:
mode:
Diffstat (limited to 'pyGHDL/cli')
-rwxr-xr-xpyGHDL/cli/dom.py26
-rw-r--r--pyGHDL/cli/requirements.txt6
2 files changed, 29 insertions, 3 deletions
diff --git a/pyGHDL/cli/dom.py b/pyGHDL/cli/dom.py
index 2d0e85ea9..69a0b92ec 100755
--- a/pyGHDL/cli/dom.py
+++ b/pyGHDL/cli/dom.py
@@ -296,6 +296,32 @@ class Application(LineTerminal, ArgParseMixin):
document.DOMTranslationTime * 10 ** 6,
)
)
+ elif args.Directory is not None:
+ d: Path = args.Directory
+ if not d.exists():
+ self.WriteError("Directory '{0!s}' does not exist.".format(d))
+
+ for file in d.glob("**/*.vhd?"):
+ self.WriteNormal("Parsing file '{!s}'".format(file))
+ document = self.addFile(file, "pretty")
+ self.WriteInfo(
+ dedent(
+ """\
+ libghdl processing time: {: 5.3f} us
+ DOM translation time: {:5.3f} us
+ """
+ ).format(
+ document.LibGHDLProcessingTime * 10 ** 6,
+ document.DOMTranslationTime * 10 ** 6,
+ )
+ )
+
+ for library in self._design.Libraries.values():
+ for entityName, architectures in library.Architectures.items():
+ for entity in library.Entities:
+ if entity.Identifier == str(entityName):
+ for architecture in architectures:
+ entity.Architectures.append(architecture)
PP = PrettyPrint()
diff --git a/pyGHDL/cli/requirements.txt b/pyGHDL/cli/requirements.txt
index 4ea0fb1fd..30f22625c 100644
--- a/pyGHDL/cli/requirements.txt
+++ b/pyGHDL/cli/requirements.txt
@@ -1,5 +1,5 @@
-r ../dom/requirements.txt
-pyAttributes==2.1.0
-pyMetaClasses==1.2.1
-pyTerminalUI==1.3.4
+pyAttributes==2.2.1
+pyMetaClasses==1.3.1
+pyTerminalUI==1.4.1