Make keep attribute for add_period_constraint optional. Vivado 2019 barfs upon IDELAYCTRL automatically replicated and it's refclk set to dont_touch.
This commit is contained in:
parent
eb2e9a371d
commit
b107d4a6fe
|
@ -157,8 +157,9 @@ class GenericToolchain:
|
|||
|
||||
return v_output.ns
|
||||
|
||||
def add_period_constraint(self, platform, clk, period):
|
||||
clk.attr.add("keep")
|
||||
def add_period_constraint(self, platform, clk, period, keep=True):
|
||||
if keep:
|
||||
clk.attr.add("keep")
|
||||
period = math.floor(period*1e3)/1e3 # Round to lowest picosecond.
|
||||
if clk in self.clocks:
|
||||
if period != self.clocks[clk]:
|
||||
|
|
|
@ -72,11 +72,11 @@ class XilinxPlatform(GenericPlatform):
|
|||
def build(self, *args, **kwargs):
|
||||
return self.toolchain.build(self, *args, **kwargs)
|
||||
|
||||
def add_period_constraint(self, clk, period):
|
||||
def add_period_constraint(self, clk, period, keep=True):
|
||||
if clk is None: return
|
||||
if hasattr(clk, "p"):
|
||||
clk = clk.p
|
||||
self.toolchain.add_period_constraint(self, clk, period)
|
||||
self.toolchain.add_period_constraint(self, clk, period, keep=keep)
|
||||
|
||||
def add_false_path_constraint(self, from_, to):
|
||||
if hasattr(from_, "p"):
|
||||
|
|
|
@ -384,7 +384,6 @@ class XilinxVivadoToolchain(GenericToolchain):
|
|||
if tools.subprocess_call_filtered(shell + [script], common.colors) != 0:
|
||||
raise OSError("Error occured during Vivado's script execution.")
|
||||
|
||||
|
||||
def vivado_build_args(parser):
|
||||
toolchain_group = parser.add_argument_group(title="Toolchain options")
|
||||
toolchain_group.add_argument("--synth-mode", default="vivado", help="Synthesis mode (vivado or yosys).")
|
||||
|
|
Loading…
Reference in New Issue