From eb86e88739c8797b8da520a6e35d117954205b34 Mon Sep 17 00:00:00 2001 From: edwardcwang Date: Thu, 27 Jun 2024 04:45:35 +0000 Subject: [PATCH] Make latch_map_file truly optional (#869) 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 = ""