preliminary support for the hdl-util/hdmi contorller as an alternative

This commit is contained in:
Romain Dolbeau 2022-12-20 08:19:41 +01:00
parent 13d0e6519c
commit 149ac2fcef
2 changed files with 13 additions and 4 deletions

@ -1 +1 @@
Subproject commit c708a834691efb34bbcc7d4c0022dd2f59aa7e4d Subproject commit 59e39731defcad164ff30f395f7fa079e63a78af

View File

@ -30,7 +30,6 @@ from migen.genlib.resetsync import AsyncResetSynchronizer
from litex.soc.cores.video import VideoS7HDMIPHY from litex.soc.cores.video import VideoS7HDMIPHY
from litex.soc.cores.video import VideoVGAPHY from litex.soc.cores.video import VideoVGAPHY
from litex.soc.cores.video import video_timings from litex.soc.cores.video import video_timings
from VintageBusFPGA_Common.goblin_fb import *
from VintageBusFPGA_Common.goblin_accel import * from VintageBusFPGA_Common.goblin_accel import *
# Wishbone stuff # Wishbone stuff
@ -164,6 +163,12 @@ class NuBusFPGA(SoCCore):
self.platform = platform = ztex213_nubus.Platform(variant = variant, version = version) self.platform = platform = ztex213_nubus.Platform(variant = variant, version = version)
use_goblin_alt = True
if ((not use_goblin_alt) or (not hdmi)):
from VintageBusFPGA_Common.goblin_fb import goblin_rounded_size, Goblin
else:
from VintageBusFPGA_Common.goblin_alt_fb import goblin_rounded_size, GoblinAlt
if (goblin): if (goblin):
hres = int(goblin_res.split("@")[0].split("x")[0]) hres = int(goblin_res.split("@")[0].split("x")[0])
vres = int(goblin_res.split("@")[0].split("x")[1]) vres = int(goblin_res.split("@")[0].split("x")[1])
@ -418,8 +423,12 @@ class NuBusFPGA(SoCCore):
self.submodules.videophy = VideoVGAPHY(platform.request("vga"), clock_domain="vga") self.submodules.videophy = VideoVGAPHY(platform.request("vga"), clock_domain="vga")
self.submodules.goblin = Goblin(soc=self, phy=self.videophy, timings=goblin_res, clock_domain="vga", irq_line=fb_irq, endian="little", hwcursor=False, truecolor=True) # clock_domain for the VGA side, goblin is running in cd_sys self.submodules.goblin = Goblin(soc=self, phy=self.videophy, timings=goblin_res, clock_domain="vga", irq_line=fb_irq, endian="little", hwcursor=False, truecolor=True) # clock_domain for the VGA side, goblin is running in cd_sys
else: else:
self.submodules.videophy = VideoS7HDMIPHY(platform.request("hdmi"), clock_domain="hdmi") if (not use_goblin_alt):
self.submodules.goblin = Goblin(soc=self, phy=self.videophy, timings=goblin_res, clock_domain="hdmi", irq_line=fb_irq, endian="little", hwcursor=False, truecolor=True) # clock_domain for the HDMI side, goblin is running in cd_sys self.submodules.videophy = VideoS7HDMIPHY(platform.request("hdmi"), clock_domain="hdmi")
self.submodules.goblin = Goblin(soc=self, phy=self.videophy, timings=goblin_res, clock_domain="hdmi", irq_line=fb_irq, endian="little", hwcursor=False, truecolor=True) # clock_domain for the HDMI side, goblin is running in cd_sys
else:
# GoblinAlt contains its own PHY
self.submodules.goblin = GoblinAlt(soc=self, timings=goblin_res, clock_domain="hdmi", irq_line=fb_irq, endian="little", hwcursor=False, truecolor=True)
self.bus.add_slave("goblin_bt", self.goblin.bus, SoCRegion(origin=self.mem_map.get("goblin_bt", None), size=0x1000, cached=False)) self.bus.add_slave("goblin_bt", self.goblin.bus, SoCRegion(origin=self.mem_map.get("goblin_bt", None), size=0x1000, cached=False))
#pad_user_led_0 = platform.request("user_led", 0) #pad_user_led_0 = platform.request("user_led", 0)
#pad_user_led_1 = platform.request("user_led", 1) #pad_user_led_1 = platform.request("user_led", 1)