From 9d08c65e8a96477e3b62c1a439ddf8840a12ecfb Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 10 Mar 2021 12:24:13 +0100 Subject: [PATCH] build/generic_platform: Make sure default_clk_period constraint is only applied when default_clk_period exists. In simulation, default_clk_period is not necessarily required. --- litex/build/generic_platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index 31ae6e29c..b40a3ad7a 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -350,7 +350,7 @@ class GenericPlatform: def do_finalize(self, fragment, *args, **kwargs): """overload this and e.g. add_platform_command()'s after the modules had their say""" - if self.use_default_clk: + if self.use_default_clk and hasattr(self, "default_clk_period"): try: self.add_period_constraint( self.lookup_request(self.default_clk_name),