soc/cores/video: Set data to 0 during blanking, thanks @suarezvictor.

See https://github.com/enjoy-digital/litex/issues/1349.
This commit is contained in:
Florent Kermarrec 2022-07-04 19:22:55 +02:00
parent b74bb90c48
commit ee580f2ce8
1 changed files with 4 additions and 3 deletions

View File

@ -727,9 +727,10 @@ class VideoGenericPHY(Module):
cbits = len(pads.r)
cshift = (8 - cbits)
for i in range(cbits):
self.specials += SDROutput(i=sink.r[cshift + i], o=pads.r[i], clk=ClockSignal(clock_domain))
self.specials += SDROutput(i=sink.g[cshift + i], o=pads.g[i], clk=ClockSignal(clock_domain))
self.specials += SDROutput(i=sink.b[cshift + i], o=pads.b[i], clk=ClockSignal(clock_domain))
# VGA monitors interpret minimum value as black so ensure data is set to 0 during blanking.
self.specials += SDROutput(i=sink.r[cshift + i] & sink.de, o=pads.r[i], clk=ClockSignal(clock_domain))
self.specials += SDROutput(i=sink.g[cshift + i] & sink.de, o=pads.g[i], clk=ClockSignal(clock_domain))
self.specials += SDROutput(i=sink.b[cshift + i] & sink.de, o=pads.b[i], clk=ClockSignal(clock_domain))
# VGA (Generic).