special_overrides = common.lattice_ecpx_special_overrides
+ def __init__(self):
+ self.false_paths = set() # FIXME: use it
+
def build(self, platform, fragment,
build_dir = "build",
build_name = "top",
# TODO: handle differential clk
platform.add_platform_command("""FREQUENCY PORT "{clk}" {freq} MHz;""".format(
freq=str(float(1/period)*1000), clk="{clk}"), clk=clk)
+
+ 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))
\ No newline at end of file
if hasattr(clk, "p"):
clk = clk.p
self.toolchain.add_period_constraint(self, clk, period)
+
+ def add_false_path_constraint(self, from_, to):
+ if hasattr(from_, "p"):
+ from_ = from_.p
+ if hasattr(to, "p"):
+ to = to.p
+ self.toolchain.add_false_path_constraint(self, from_, to)
def __init__(self):
self.yosys_template = _yosys_template
self.build_template = _build_template
+ self.false_paths = set() # FIXME: use it
def build(self, platform, fragment,
build_dir = "build",
platform.add_platform_command("""FREQUENCY PORT "{clk}" {freq} MHz;""".format(
freq=str(float(1/period)*1000), clk="{clk}"), clk=clk)
+ 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))
+
def trellis_args(parser):
parser.add_argument("--yosys-nowidelut", action="store_true",
help="pass '-nowidelut' to yosys synth_ecp5")