Skip to content

Commit

Permalink
Fix force pll APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Dec 11, 2024
1 parent c61752b commit 150d1fd
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions adijif/fpgas/xilinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@ def fpga_generation(self):
]

""" Force use of QPLL for transceiver source """
force_qpll = 0
force_qpll = False

""" Force use of QPLL1 for transceiver source (GTHE3,GTHE4,GTYE4)"""
force_qpll1 = 0
force_qpll1 = False

""" Force use of CPLL for transceiver source """
force_cpll = 0
force_cpll = False

""" Force all transceiver sources to be from a single PLL quad.
This will try to leverage the output dividers of the PLLs
"""
force_single_quad_tile = 0
force_single_quad_tile = False

""" Request that clock chip generated device clock
device clock == LMFC/40
Expand Down Expand Up @@ -708,10 +708,33 @@ def _setup_quad_tile(
else:
raise Exception(f"Unsupported FPGA generation {self.fpga_generation()}")

self._transceiver_models[converter.name].force_cpll = self.force_cpll
self._transceiver_models[converter.name].force_qpll = self.force_qpll
# Handle force PLLs for nested devices and multiple converters
force_cpll = False
force_qpll = False
force_qpll1 = False

if isinstance(self.force_cpll, dict):
if converter in self.force_cpll:
force_cpll = self.force_cpll[converter]
else:
force_cpll = self.force_cpll

if isinstance(self.force_qpll, dict):
if converter in self.force_qpll:
force_qpll = self.force_qpll[converter]
else:
force_qpll = self.force_qpll

if isinstance(self.force_qpll1, dict):
if converter in self.force_qpll1:
force_qpll1 = self.force_qpll1[converter]
else:
force_qpll1 = self.force_qpll1

self._transceiver_models[converter.name].force_cpll = force_cpll
self._transceiver_models[converter.name].force_qpll = force_qpll
if hasattr(self._transceiver_models[converter.name], "force_qpll1"):
self._transceiver_models[converter.name].force_qpll1 = self.force_qpll1
self._transceiver_models[converter.name].force_qpll1 = force_qpll1

config = self._transceiver_models[converter.name].add_constraints(
config, fpga_ref, converter
Expand Down

0 comments on commit 150d1fd

Please sign in to comment.