Skip to content

Commit e03453e

Browse files
committed
fix(cocotbext - ndk_core): set 400MHz as default value for P_TILE PCIe CLK
1 parent 163918d commit e03453e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python/cocotbext/cocotbext/ndk_core/nfbdevice.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,13 @@ async def _init_clks(self):
128128
await cocotb.start(Clock(self._core.clk_gen_i.OUTCLK_3, 10, 'ns').start())
129129

130130
for pcie_clk in self._core.pcie_i.pcie_core_i.pcie_hip_clk:
131-
await cocotb.start(Clock(pcie_clk, 4, 'ns').start())
131+
if self._core.pcie_i.pcie_core_i.ENDPOINT_TYPE.value.decode() == "P_TILE":
132+
# This is default value in IP core for g4_pld_clkfreq_user_hwctl
133+
period = 2.5
134+
else:
135+
period = 4
136+
137+
await cocotb.start(Clock(pcie_clk, period, 'ns').start())
132138

133139
for eth_core in self._core.network_mod_i.eth_core_g if hasattr(self._core.network_mod_i, 'eth_core_g') else []:
134140
if hasattr(eth_core.network_mod_core_i, 'cmac_clk_322m'):

0 commit comments

Comments
 (0)