mirror of
https://github.com/enjoy-digital/litedram.git
synced 2025-01-04 09:52:25 -05:00
phy/s7dddrphy: fix nphases = 2 (same code can be shared between nphases = 2 and nphases = 4)
This commit is contained in:
parent
170b3dc67d
commit
e70d77e76e
1 changed files with 6 additions and 12 deletions
|
@ -337,18 +337,12 @@ class S7DDRPHY(Module, AutoCSR):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self.submodules += dq_bitslip
|
self.submodules += dq_bitslip
|
||||||
if nphases == 2:
|
self.comb += [
|
||||||
self.comb += [
|
self.dfi.phases[0].rddata[i].eq(dq_bitslip.o[0]), self.dfi.phases[0].rddata[databits+i].eq(dq_bitslip.o[1]),
|
||||||
self.dfi.phases[0].rddata[i].eq(dq_bitslip.o[7]), self.dfi.phases[0].rddata[databits+i].eq(dq_bitslip.o[5]),
|
self.dfi.phases[1].rddata[i].eq(dq_bitslip.o[2]), self.dfi.phases[1].rddata[databits+i].eq(dq_bitslip.o[3]),
|
||||||
self.dfi.phases[1].rddata[i].eq(dq_bitslip.o[6]), self.dfi.phases[1].rddata[databits+i].eq(dq_bitslip.o[7])
|
self.dfi.phases[2].rddata[i].eq(dq_bitslip.o[4]), self.dfi.phases[2].rddata[databits+i].eq(dq_bitslip.o[5]),
|
||||||
]
|
self.dfi.phases[3].rddata[i].eq(dq_bitslip.o[6]), self.dfi.phases[3].rddata[databits+i].eq(dq_bitslip.o[7])
|
||||||
else:
|
]
|
||||||
self.comb += [
|
|
||||||
self.dfi.phases[0].rddata[i].eq(dq_bitslip.o[0]), self.dfi.phases[0].rddata[databits+i].eq(dq_bitslip.o[1]),
|
|
||||||
self.dfi.phases[1].rddata[i].eq(dq_bitslip.o[2]), self.dfi.phases[1].rddata[databits+i].eq(dq_bitslip.o[3]),
|
|
||||||
self.dfi.phases[2].rddata[i].eq(dq_bitslip.o[4]), self.dfi.phases[2].rddata[databits+i].eq(dq_bitslip.o[5]),
|
|
||||||
self.dfi.phases[3].rddata[i].eq(dq_bitslip.o[6]), self.dfi.phases[3].rddata[databits+i].eq(dq_bitslip.o[7])
|
|
||||||
]
|
|
||||||
|
|
||||||
if with_odelay:
|
if with_odelay:
|
||||||
self.specials += \
|
self.specials += \
|
||||||
|
|
Loading…
Reference in a new issue