cores/spi_flash/add_clk_primitive: return if clk primitive is not needed
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jul 2019 19:55:07 +0000 (21:55 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jul 2019 19:55:07 +0000 (21:55 +0200)
litex/soc/cores/spi_flash.py

index 2e40caa88524506dd763bea61118acfcdd3ba08a..b00e6fc60b29323c2b8fa46df207c721bc0b9f05 100644 (file)
@@ -46,7 +46,8 @@ class SpiFlashCommon(Module):
         self.pads = pads
 
     def add_clk_primitive(self, device):
-        assert hasattr(self, "clk_primitive_needed")
+        if not hasattr(self, "clk_primitive_needed"):
+            return
         # Xilinx 7-series
         if device[:3] == "xc7":
             self.specials += Instance("STARTUPE2",