From ae076be45e4503e96d9263d411b002929bf999eb Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Wed, 26 Jun 2024 18:47:20 -0400 Subject: [PATCH] Make latch_map_file truly optional Right now if a technology doesn't specify the latch map file, "techmap -map None" is written into the generated tcl. --- hammer/synthesis/yosys/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hammer/synthesis/yosys/__init__.py b/hammer/synthesis/yosys/__init__.py index fc344c9be..fbfe135b0 100644 --- a/hammer/synthesis/yosys/__init__.py +++ b/hammer/synthesis/yosys/__init__.py @@ -249,7 +249,7 @@ def init_environment(self) -> bool: def syn_generic(self) -> bool: # TODO: is there a better way to do this? like self.get_setting() - if self._database.has_setting("synthesis.yosys.latch_map_file"): + if self._database.has_setting("synthesis.yosys.latch_map_file") and self.get_setting('synthesis.yosys.latch_map_file') is not None: latch_map = f"techmap -map {self.get_setting('synthesis.yosys.latch_map_file')}" else: # TODO: make the else case better latch_map = ""