From 9336fe11390eb7fd26245f48a6a5f2937e9824fd Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 31 Dec 2019 10:33:12 +0100 Subject: [PATCH] build/microsemi/libero_soc: update add_period_constraint behavior when clock is already constrainted. --- litex/build/microsemi/libero_soc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/build/microsemi/libero_soc.py b/litex/build/microsemi/libero_soc.py index 7ca51db38..8110034d2 100644 --- a/litex/build/microsemi/libero_soc.py +++ b/litex/build/microsemi/libero_soc.py @@ -288,7 +288,9 @@ class MicrosemiLiberoSoCPolarfireToolchain: def add_period_constraint(self, platform, clk, period): if clk in self.clocks: - raise ValueError("A period constraint already exists") + if period != self.clocks[clk]: + raise ValueError("Clock already constrained to {:.2f}ns, new constraint to {:.2f}ns" + .format(self.clocks[clk], period)) self.clocks[clk] = period def add_false_path_constraint(self, platform, from_, to):