forked from M-Labs/artiq
1
0
Fork 0

serwb: fix rx_comma detection

This commit is contained in:
Florent Kermarrec 2018-05-07 23:54:35 +02:00
parent bfa7637760
commit 60fd362d57
2 changed files with 12 additions and 4 deletions

View File

@ -205,8 +205,12 @@ class KUSSerdes(Module):
decoders[3].input.eq(rx_bitslip.o[30:40]), decoders[3].input.eq(rx_bitslip.o[30:40]),
self.rx_k.eq(Cat(*[decoders[i].k for i in range(4)])), self.rx_k.eq(Cat(*[decoders[i].k for i in range(4)])),
self.rx_d.eq(Cat(*[decoders[i].d for i in range(4)])), self.rx_d.eq(Cat(*[decoders[i].d for i in range(4)])),
self.rx_comma.eq((decoders[0].k == 1) & (decoders[0].d == K(28,5))) self.rx_comma.eq(
] (decoders[0].k == 1) & (decoders[0].d == K(28,5)) &
(decoders[1].k == 0) & (decoders[1].d == 0) &
(decoders[2].k == 0) & (decoders[2].d == 0) &
(decoders[3].k == 0) & (decoders[3].d == 0))
]
idle_timer = WaitTimer(32) idle_timer = WaitTimer(32)
self.submodules += idle_timer self.submodules += idle_timer

View File

@ -216,8 +216,12 @@ class S7Serdes(Module):
decoders[3].input.eq(rx_bitslip.o[30:40]), decoders[3].input.eq(rx_bitslip.o[30:40]),
self.rx_k.eq(Cat(*[decoders[i].k for i in range(4)])), self.rx_k.eq(Cat(*[decoders[i].k for i in range(4)])),
self.rx_d.eq(Cat(*[decoders[i].d for i in range(4)])), self.rx_d.eq(Cat(*[decoders[i].d for i in range(4)])),
self.rx_comma.eq((decoders[0].k == 1) & (decoders[0].d == K(28,5))) self.rx_comma.eq(
] (decoders[0].k == 1) & (decoders[0].d == K(28,5)) &
(decoders[1].k == 0) & (decoders[1].d == 0) &
(decoders[2].k == 0) & (decoders[2].d == 0) &
(decoders[3].k == 0) & (decoders[3].d == 0))
]
idle_timer = WaitTimer(32) idle_timer = WaitTimer(32)
self.submodules += idle_timer self.submodules += idle_timer