Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dvisampler/chansync: set synced to 0 when control tokens do not arriv…

…e at the same time
  • Loading branch information...
commit b018fcedc48003dc2fa3c69d0246daecadf1598f 1 parent 1ab89d6
@sbourdeauducq sbourdeauducq authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 milkymist/dvisampler/chansync.py
View
16 milkymist/dvisampler/chansync.py
@@ -45,8 +45,20 @@ def __init__(self, nchan=3, depth=8):
]
lst_control_starts.append(control_starts)
- self.comb += all_control_starts.eq(optree("&", lst_control_starts))
+ some_control_starts = Signal()
+ self.comb += [
+ all_control_starts.eq(optree("&", lst_control_starts)),
+ some_control_starts.eq(optree("|", lst_control_starts))
+ ]
self.sync.pix += If(~self.valid_i,
self.chan_synced.eq(0)
- ).Elif(all_control_starts, self.chan_synced.eq(1))
+ ).Else(
+ If(some_control_starts,
+ If(all_control_starts,
+ self.chan_synced.eq(1)
+ ).Else(
+ self.chan_synced.eq(0)
+ )
+ )
+ )
self.specials += MultiReg(self.chan_synced, self._r_channels_synced.status)
Please sign in to comment.
Something went wrong with that request. Please try again.