dvisampler: connect sync polarity detection

This commit is contained in:
Sebastien Bourdeauducq 2013-05-05 12:58:53 +02:00
parent cb008a061c
commit d175e01876

View file

@ -10,6 +10,7 @@ from milkymist.dvisampler.datacapture import DataCapture
from milkymist.dvisampler.charsync import CharSync from milkymist.dvisampler.charsync import CharSync
from milkymist.dvisampler.decoding import Decoding from milkymist.dvisampler.decoding import Decoding
from milkymist.dvisampler.chansync import ChanSync from milkymist.dvisampler.chansync import ChanSync
from milkymist.dvisampler.syncpol import SyncPolarity
from milkymist.dvisampler.resdetection import ResolutionDetection from milkymist.dvisampler.resdetection import ResolutionDetection
class DVISampler(Module, AutoCSR): class DVISampler(Module, AutoCSR):
@ -53,18 +54,18 @@ class DVISampler(Module, AutoCSR):
self.chansync.data_in2.eq(self.data2_decod.output), self.chansync.data_in2.eq(self.data2_decod.output),
] ]
de = self.chansync.data_out0.de self.submodules.syncpol = SyncPolarity()
r = self.chansync.data_out2.d self.comb += [
g = self.chansync.data_out1.d self.syncpol.valid_i.eq(self.chansync.chan_synced),
b = self.chansync.data_out0.d self.syncpol.data_in0.eq(self.chansync.data_out0),
hsync = self.chansync.data_out0.c[0] self.syncpol.data_in1.eq(self.chansync.data_out1),
vsync = self.chansync.data_out0.c[1] self.syncpol.data_in2.eq(self.chansync.data_out2)
]
self.submodules.resdetection = ResolutionDetection() self.submodules.resdetection = ResolutionDetection()
self.comb += [ self.comb += [
self.resdetection.de.eq(de), self.resdetection.de.eq(self.syncpol.de),
self.resdetection.hsync.eq(hsync), self.resdetection.vsync.eq(self.syncpol.vsync)
self.resdetection.vsync.eq(vsync)
] ]
class RawDVISampler(Module, AutoCSR): class RawDVISampler(Module, AutoCSR):