dvisampler/charsync: report position

This commit is contained in:
Sebastien Bourdeauducq 2013-03-24 00:44:50 +01:00
parent 99f9ffa7e8
commit ee5bfd4d3d
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ class CharSync(Module, AutoReg):
self.data = Signal(10) self.data = Signal(10)
self._r_char_synced = RegisterField(1, READ_ONLY, WRITE_ONLY) 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) previous_control_position.eq(control_position)
] ]
self.specials += MultiReg(self.synced, self._r_char_synced.field.w) 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) self.sync.pix += self.data.eq(raw >> word_sel)