Skip to content

Commit

Permalink
soc/cores/clock/efinix.py: fill platform.clks with clkout mapping cd/…
Browse files Browse the repository at this point in the history
…clk_out_name. litex/build/efinix/ifacewriter.py: generate_lvds: when slow_clk/fast_clk are ClockSignal uses platform.clks to map between domain and signal name
  • Loading branch information
trabucayre committed Sep 10, 2024
1 parent ad09ffc commit a80f290
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions litex/build/efinix/ifacewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,11 @@ def generate_lvds(self, block, verbose=True):
half_rate= block.get("half_rate", "0")
tx_output_load=block.get("output_load", "3")

if type(slow_clk) == ClockSignal:
slow_clk = self.platform.clks[slow_clk.cd]
if type(fast_clk) == ClockSignal:
fast_clk = self.platform.clks[fast_clk.cd]

if mode == "OUTPUT":
block_type = "LVDS_TX"
tx_mode = block["tx_mode"]
Expand Down
1 change: 1 addition & 0 deletions litex/soc/cores/clock/efinix.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def create_clkout(self, cd, freq, phase=0, margin=0, name="", with_reset=True, d
# so, the user realy need to use the toplevel pin from the pll instead of an intermediate signal
# This is a dirty workaround. But i don't have any better
cd.clk = clk_out
self.platform.clks[cd.name] = clk_out_name
if with_reset:
self.specials += AsyncResetSynchronizer(cd, ~self.locked)
self.platform.toolchain.excluded_ios.append(clk_out_name)
Expand Down

0 comments on commit a80f290

Please sign in to comment.