fix non-alt hdmi phy

This commit is contained in:
Romain Dolbeau
2024-01-02 17:40:52 +01:00
parent 084ea8aaf9
commit e24ba870cd
2 changed files with 3 additions and 2 deletions

View File

@@ -192,11 +192,11 @@ class MacPeriphSoC(SoCCore):
from VintageBusFPGA_Common.goblin_alt_fb import goblin_rounded_size, GoblinAlt
if (not hdmi):
self.submodules.videophy = VideoVGAPHY(platform.request("vga"), clock_domain="vga")
self.submodules.videophy = VideoVGAPHY(self.platform.request("vga"), clock_domain="vga")
self.submodules.goblin = Goblin(soc=self, phy=self.videophy, timings=goblin_res, clock_domain="vga", irq_line=goblin_irq, endian="little", hwcursor=False, truecolor=True) # clock_domain for the VGA side, goblin is running in cd_sys
else:
if (not use_goblin_alt):
self.submodules.videophy = VideoS7HDMIPHY(platform.request("hdmi"), clock_domain="hdmi")
self.submodules.videophy = VideoS7HDMIPHY(self.platform.request("hdmi"), clock_domain="hdmi")
self.submodules.goblin = Goblin(soc=self, phy=self.videophy, timings=goblin_res, clock_domain="hdmi", irq_line=goblin_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

View File

@@ -79,6 +79,7 @@ class GoblinAudio(Module, AutoCSR):
self.comb += self.irqstatus.fields.irq.eq(~self.irq) # self.irq active low
# basic 44.1 KHz clock based on system clock
# FIXME: what if this should be derived from the pixel clock ???
audio_max = int((soc.sys_clk_freq / audio_clk_freq) + 0.5)
audio_max_bits = log2_int(audio_max, False)
audio_counter = Signal(audio_max_bits)