phy/gensdrphy: use tristate input

This commit is contained in:
Florent Kermarrec 2018-10-29 19:27:26 +01:00
parent 9ce84d96ec
commit 82c08c78c9
1 changed files with 3 additions and 2 deletions

View File

@ -61,8 +61,9 @@ class GENSDRPHY(Module):
# DQ/DQS/DM data # DQ/DQS/DM data
dq_o = Signal(databits) dq_o = Signal(databits)
dq_oe = Signal() dq_oe = Signal()
dq_i = Signal(databits)
self.sync += dq_o.eq(dfi.p0.wrdata) self.sync += dq_o.eq(dfi.p0.wrdata)
self.specials += Tristate(pads.dq, dq_o, dq_oe) self.specials += Tristate(pads.dq, dq_o, dq_oe, dq_i)
self.sync += \ self.sync += \
If(dfi.p0.wrdata_en, If(dfi.p0.wrdata_en,
pads.dm.eq(dfi.p0.wrdata_mask) pads.dm.eq(dfi.p0.wrdata_mask)
@ -70,7 +71,7 @@ class GENSDRPHY(Module):
pads.dm.eq(0) pads.dm.eq(0)
) )
dq_in = Signal(databits) dq_in = Signal(databits)
self.sync.sys_ps += dq_in.eq(pads.dq) self.sync.sys_ps += dq_in.eq(dq_i)
self.sync += dfi.p0.rddata.eq(dq_in) self.sync += dfi.p0.rddata.eq(dq_in)
# DQ/DM control # DQ/DM control