From: David Shah Date: Mon, 25 Feb 2019 18:01:35 +0000 (+0000) Subject: trellis: Add LPF frequency constraints and remove -nomux X-Git-Tag: 24jan2021_ls180~1383^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=024b41c5b2becf15719e100d1848b1d78dd3ccbe;p=litex.git trellis: Add LPF frequency constraints and remove -nomux --- diff --git a/litex/build/lattice/trellis.py b/litex/build/lattice/trellis.py index a395c367..397b2dbd 100644 --- a/litex/build/lattice/trellis.py +++ b/litex/build/lattice/trellis.py @@ -125,7 +125,7 @@ class LatticeTrellisToolchain: self.yosys_template = [ "{read_files}", "attrmap -tocase keep -imap keep=\"true\" keep=1 -imap keep=\"false\" keep=0 -remove keep=0", - "synth_ecp5 -nomux -json {build_name}.json -top {build_name}", + "synth_ecp5 -json {build_name}.json -top {build_name}", ] self.build_template = [ @@ -189,9 +189,4 @@ class LatticeTrellisToolchain: # approach as the icestorm and use the fastest clock for timing # constraints. def add_period_constraint(self, platform, clk, period): - new_freq = 1000.0/period - - if clk not in self.freq_constraints.keys(): - self.freq_constraints[clk] = new_freq - else: - raise ConstraintError("Period constraint already added to signal.") + platform.add_platform_command("""FREQUENCY PORT "{clk}" {freq} MHz;""".format(freq=str(float(1/period)*1000), clk="{clk}"), clk=clk)