dvisampler/charsync: report position
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 23 Mar 2013 23:44:50 +0000 (00:44 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 23 Mar 2013 23:44:50 +0000 (00:44 +0100)
milkymist/dvisampler/charsync.py

index f91ff3d5c7999771f9f64e7236c4a7092bdaffb5..41268f94d443a8cf8e7c7d4458daeebec398d318 100644 (file)
@@ -13,6 +13,7 @@ class CharSync(Module, AutoReg):
                self.data = Signal(10)
 
                self._r_char_synced = RegisterField(1, READ_ONLY, WRITE_ONLY)
+               self._r_ctl_pos = RegisterField(bits_for(9), READ_ONLY, WRITE_ONLY)
 
                ###
 
@@ -48,5 +49,6 @@ class CharSync(Module, AutoReg):
                        previous_control_position.eq(control_position)
                ]
                self.specials += MultiReg(self.synced, self._r_char_synced.field.w)
+               self.specials += MultiReg(word_sel, self._r_ctl_pos.field.w)
 
                self.sync.pix += self.data.eq(raw >> word_sel)