Avoid having to specify it manually or eventually forget to do it and have a constraints that is not applied correctly.
return v_output.ns
def add_period_constraint(self, platform, clk, period):
+ clk.attr.add("keep")
if clk in self.clocks:
raise ValueError("A period constraint already exists")
period = math.floor(period*1e3)/1e3 # Round to lowest picosecond
self.clocks[clk] = period
def add_false_path_constraint(self, platform, from_, to):
+ from_.attr.add("keep")
+ to.attr.add("keep")
if (to, from_) not in self.false_paths:
self.false_paths.add((from_, to))
return v_output.ns
def add_period_constraint(self, platform, clk, period):
+ clk.attr.add("keep")
# TODO: handle differential clk
platform.add_platform_command("""FREQUENCY PORT "{clk}" {freq} MHz;""".format(
freq=str(float(1/period)*1000), clk="{clk}"), clk=clk)
return "\n".join(read_files)
def add_period_constraint(self, platform, clk, period):
+ clk.attr.add("keep")
new_freq = 1000.0/period
-
if clk not in self.freq_constraints.keys():
self.freq_constraints[clk] = new_freq
else:
return self.toolchain.build(self, *args, **kwargs)
def add_period_constraint(self, clk, period):
+ clk.attr.add("keep")
if hasattr(clk, "p"):
clk = clk.p
self.toolchain.add_period_constraint(self, clk, period)
from_ = from_.p
if hasattr(to, "p"):
to = to.p
+ from_.attr.add("keep")
+ to.attr.add("keep")
self.toolchain.add_false_path_constraint(self, from_, to)
# them through clock objects like DCM and PLL objects.
def add_period_constraint(self, platform, clk, period):
+ clk.attr.add("keep")
platform.add_platform_command(
"""
NET "{clk}" TNM_NET = "PRD{clk}";
)
def add_false_path_constraint(self, platform, from_, to):
+ from_.attr.add("keep")
+ to.attr.add("keep")
platform.add_platform_command(
"""
NET "{from_}" TNM_NET = "TIG{from_}";
return v_output.ns
def add_period_constraint(self, platform, clk, period):
+ clk.attr.add("keep")
if clk in self.clocks:
raise ValueError("A period constraint already exists")
period = math.floor(period*1e3)/1e3 # round to lowest picosecond
self.clocks[clk] = period
def add_false_path_constraint(self, platform, from_, to):
+ from_.attr.add("keep")
+ to.attr.add("keep")
if (to, from_) not in self.false_paths:
self.false_paths.add((from_, to))