_build_template = [
"yosys -q -l {build_name}.rpt {build_name}.ys",
"nextpnr-ecp5 --json {build_name}.json --lpf {build_name}.lpf --textcfg {build_name}.config \
- --{architecture} --package {package} --freq {freq_constraint} {timefailarg}",
+ --{architecture} --package {package} {timefailarg}",
"ecppack {build_name}.config --svf {build_name}.svf --bit {build_name}.bit"
]
-def _build_script(source, build_template, build_name, architecture, package, freq_constraint, timingstrict):
+def _build_script(source, build_template, build_name, architecture, package, timingstrict):
if sys.platform in ("win32", "cygwin"):
script_ext = ".bat"
script_contents = "@echo off\nrem Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n\n"
build_name = build_name,
architecture = architecture,
package = package,
- freq_constraint = freq_constraint,
timefailarg = "--timing-allow-fail" if not timingstrict else "",
fail_stmt = fail_stmt)
def __init__(self):
self.yosys_template = _yosys_template
self.build_template = _build_template
- self.freq_constraints = dict()
def build(self, platform, fragment,
build_dir = "build",
architecture = nextpnr_ecp5_architectures[(family + "-" + size).lower()]
package = nextpnr_ecp5_package(package)
- freq_constraint = str(max(self.freq_constraints.values(), default=0.0))
-
# Generate build script
script = _build_script(False, self.build_template, build_name, architecture, package,
- freq_constraint, timingstrict)
+ timingstrict)
# Run
if run:
return v_output.ns
- # Until nextpnr-ecp5 can handle multiple clock domains, use the same
- # approach as the icestorm and use the fastest clock for timing
- # constraints.
def add_period_constraint(self, platform, clk, period):
platform.add_platform_command("""FREQUENCY PORT "{clk}" {freq} MHz;""".format(
freq=str(float(1/period)*1000), clk="{clk}"), clk=clk)