cores/spi_flash/add_clk_primitive: return if clk primitive is not needed

This commit is contained in:
Florent Kermarrec 2019-07-22 21:55:07 +02:00
parent 462d12bacc
commit 6d54335839

View file

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