Skip to content

Commit 1343b5e

Browse files
committed
phy/SDPHYIO: Fix data_i_ce (following 809ade3).
Since output clk is inverted, we also need to take this into account in SDPHYIO.
1 parent fefee15 commit 1343b5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

litesdcard/phy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def __init__(self, clocker, sdpads, round_trip_latency=2):
509509
# Generate a data_i_ce pulse round_trip_latency cycles after clocker.clk goes high so that
510510
# the data input effectively get sampled on the first sys_clk after the SDCard clk goes high.
511511
clocker_clk_delay = Signal(round_trip_latency)
512-
self.sync += clocker_clk_delay.eq(Cat(clocker.clk, clocker_clk_delay))
512+
self.sync += clocker_clk_delay.eq(Cat(~clocker.clk, clocker_clk_delay))
513513
self.sync += sdpads.data_i_ce.eq(clocker_clk_delay[-1] & ~clocker_clk_delay[-2])
514514

515515

0 commit comments

Comments
 (0)