build/xilinx/ise/add_period_constraint: Add keep parameter.

This commit is contained in:
Florent Kermarrec 2023-05-21 09:33:19 +02:00
parent f5a9efd8ba
commit 54192651d8

View file

@ -205,12 +205,13 @@ bitgen {bitgen_opt} {build_name}.ncd {build_name}.bit{fail_stmt}
# constraints and other constraints otherwise it will be unable to trace
# them through clock objects like DCM and PLL objects.
def add_period_constraint(self, platform, clk, period):
def add_period_constraint(self, platform, clk, period, keep=True):
if clk is None:
return
if hasattr(clk, "p"):
clk = clk.p
clk.attr.add("keep")
if keep:
clk.attr.add("keep")
platform.add_platform_command(
"""
NET "{clk}" TNM_NET = "PRD{clk}";