Skip to content

Commit

Permalink
phy/SDPHYIO: Fix data_i_ce (following 809ade3).
Browse files Browse the repository at this point in the history
Since output clk is inverted, we also need to take this into account in SDPHYIO.
  • Loading branch information
enjoy-digital committed Sep 2, 2024
1 parent fefee15 commit 1343b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litesdcard/phy.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def __init__(self, clocker, sdpads, round_trip_latency=2):
# Generate a data_i_ce pulse round_trip_latency cycles after clocker.clk goes high so that
# the data input effectively get sampled on the first sys_clk after the SDCard clk goes high.
clocker_clk_delay = Signal(round_trip_latency)
self.sync += clocker_clk_delay.eq(Cat(clocker.clk, clocker_clk_delay))
self.sync += clocker_clk_delay.eq(Cat(~clocker.clk, clocker_clk_delay))
self.sync += sdpads.data_i_ce.eq(clocker_clk_delay[-1] & ~clocker_clk_delay[-2])


Expand Down

0 comments on commit 1343b5e

Please sign in to comment.