cores/video/add_video_framebuffer: Add workaround when SDRAM data_width < 32.

This commit is contained in:
Florent Kermarrec 2021-03-29 11:25:34 +02:00
parent 4a29e2403c
commit ac7857fa4f
1 changed files with 4 additions and 0 deletions

View File

@ -599,6 +599,10 @@ class VideoFrameBuffer(Module, AutoCSR):
# Video CDC. # Video CDC.
self.submodules.cdc = stream.ClockDomainCrossing([("data", 32)], cd_from="sys", cd_to=clock_domain) self.submodules.cdc = stream.ClockDomainCrossing([("data", 32)], cd_from="sys", cd_to=clock_domain)
self.comb += self.conv.source.connect(self.cdc.sink) self.comb += self.conv.source.connect(self.cdc.sink)
self.comb += If(dram_port.data_width < 32, # FIXME.
self.cdc.sink.data[ 0: 8].eq(self.conv.source.data[16:24]),
self.cdc.sink.data[16:24].eq(self.conv.source.data[ 0: 8]),
)
# Video Generation. # Video Generation.
self.comb += [ self.comb += [