Spritetm / hadbadge2019_fpgasoc

FPGA SoC code and application example for Hackaday Supercon 2019 badge
Other
159 stars 70 forks source link

Fixed framebuffer every other line disappearing #155

Closed shaos closed 12 months ago

shaos commented 1 year ago

See attached image to see a difference in framebuffer image: badge-fix Basically it looked like every ODD line displayed twice and EVEN lines are completely ignored by DMA So the fix is making actual resolution for framebuffer 480x320 (as expected) instead of effective 480x160 (see above).

Note: This fix also mostly fixing this issue: https://github.com/Spritetm/hadbadge2019_fpgasoc/issues/143

shaos commented 1 year ago

Some speeds are worse, but still passing (before and after):


< Info: Max frequency for clock                  '$glbnet$clk48m': 48.62 MHz (PASS at 48.00 MHz)
< Info: Max frequency for clock            '$glbnet$vid_pixelclk': 70.83 MHz (PASS at 30.00 MHz)
< Info: Max frequency for clock                  '$glbnet$clkint': 451.06 MHz (PASS at 25.00 MHz)
< Info: Max frequency for clock '$glbnet$hdmi_encoder.clk_125MHz': 346.86 MHz (PASS at 140.02 MHz)
< Info: Max frequency for clock                  '$glbnet$clk96m': 686.81 MHz (PASS at 48.00 MHz)
< Info: Max frequency for clock                  '$glbnet$clk24m': 136.22 MHz (PASS at 48.00 MHz)

> Info: Max frequency for clock                  '$glbnet$clk48m': 48.72 MHz (PASS at 48.00 MHz)
> Info: Max frequency for clock            '$glbnet$vid_pixelclk': 68.95 MHz (PASS at 30.00 MHz)
> Info: Max frequency for clock                  '$glbnet$clkint': 279.02 MHz (PASS at 25.00 MHz)
> Info: Max frequency for clock '$glbnet$hdmi_encoder.clk_125MHz': 336.25 MHz (PASS at 140.02 MHz)
> Info: Max frequency for clock                  '$glbnet$clk96m': 626.57 MHz (PASS at 48.00 MHz)
> Info: Max frequency for clock                  '$glbnet$clk24m': 341.88 MHz (PASS at 48.00 MHz)
shaos commented 1 year ago

Added example app-draw720 to show the issue - it should look like this on the TV if SOC is fixed (all characters are readable): SpiritRetroHandheld-prototype-HDMI

shaos commented 1 year ago

Another screen with fixed SOC: Screenshot from 2023-10-02 10-15-25 And this is "before" picture: Screenshot from 2023-10-02 10-39-48

Spritetm commented 12 months ago

Sorry for letting this linger for a while; I don't really have time to check if this works or if it has side effects. I'll take your word for it and simply merge; if it breaks other things we'll hear it soon enough :P Thanks for contributing!

shaos commented 12 months ago

Thanks! :)