build/microsemi/libero_soc: update add_period_constraint behavior when clock is already constrainted.

This commit is contained in:
Florent Kermarrec 2019-12-31 10:33:12 +01:00
parent 3022f02b3f
commit 9336fe1139
1 changed files with 3 additions and 1 deletions

View File

@ -288,7 +288,9 @@ class MicrosemiLiberoSoCPolarfireToolchain:
def add_period_constraint(self, platform, clk, period): def add_period_constraint(self, platform, clk, period):
if clk in self.clocks: 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 self.clocks[clk] = period
def add_false_path_constraint(self, platform, from_, to): def add_false_path_constraint(self, platform, from_, to):