phy/s7ddrphy: simplify dqs_serdes_pattern

This commit is contained in:
Florent Kermarrec 2020-01-26 12:04:55 +01:00
parent 2072ce77b0
commit 33c5d7b87e
1 changed files with 8 additions and 14 deletions

View File

@ -275,25 +275,19 @@ class S7DDRPHY(Module, AutoCSR):
dqs_preamble = Signal()
dqs_postamble = Signal()
dqs_serdes_pattern = Signal(8, reset=0b01010101)
self.comb += [
dqs_serdes_pattern.eq(0b01010101),
If(dqs_preamble | dqs_postamble,
dqs_serdes_pattern.eq(0b0000000)
)
]
if with_odelay:
self.comb += \
self.comb += [
If(self._wlevel_en.storage,
dqs_serdes_pattern.eq(0b00000000),
If(self._wlevel_strobe.re,
dqs_serdes_pattern.eq(0b00000001)
).Else(
dqs_serdes_pattern.eq(0b00000000)
)
).Elif(dqs_preamble | dqs_postamble,
dqs_serdes_pattern.eq(0b0000000)
).Else(
dqs_serdes_pattern.eq(0b01010101)
)
else:
self.comb += [
If(dqs_preamble | dqs_postamble,
dqs_serdes_pattern.eq(0b0000000)
).Else(
dqs_serdes_pattern.eq(0b01010101)
)
]