From: Florent Kermarrec Date: Mon, 15 Apr 2019 08:51:17 +0000 (+0200) Subject: build/xilinx/vivado: round period constraints to lowest picosecond X-Git-Tag: 24jan2021_ls180~1332 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=538ca59ab6094608d9e84fef3988a590b78367d9;p=litex.git build/xilinx/vivado: round period constraints to lowest picosecond Vivado will do the opposite if we don't do it, with this change we ensure the applied period constraints will always be >= to the requested constraint. --- diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index 54bbfe85..b9750bba 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -4,6 +4,7 @@ import os import subprocess import sys +import math from migen.fhdl.structure import _Fragment @@ -250,6 +251,7 @@ class XilinxVivadoToolchain: def add_period_constraint(self, platform, clk, period): 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):