From 8a644c90865249952ca953ba1e0a426f5de9840a Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 15 Jun 2021 18:10:24 +0200 Subject: [PATCH] soc/add_video_xy: Allow passing phy or phy's Endpoint. --- litex/soc/integration/soc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litex/soc/integration/soc.py b/litex/soc/integration/soc.py index a2f2be55f..9e5662fdb 100644 --- a/litex/soc/integration/soc.py +++ b/litex/soc/integration/soc.py @@ -1702,7 +1702,7 @@ class LiteXSoC(SoC): # Connect Video Timing Generator to ColorsBars Pattern. self.comb += [ vtg.source.connect(colorbars.vtg_sink), - colorbars.source.connect(phy.sink) + colorbars.source.connect(phy if isinstance(phy, stream.Endpoint) else phy.sink) ] # Add Video Terminal --------------------------------------------------------------------------- @@ -1738,7 +1738,7 @@ class LiteXSoC(SoC): ] # Connect Video Terminal to Video PHY. - self.comb += vt.source.connect(phy.sink) + self.comb += vt.source.connect(phy if isinstance(phy, stream.Endpoint) else phy.sink) # Add Video Framebuffer ------------------------------------------------------------------------ def add_video_framebuffer(self, name="video_framebuffer", phy=None, timings="800x600@60Hz", clock_domain="sys"): @@ -1768,7 +1768,7 @@ class LiteXSoC(SoC): self.comb += vtg.source.connect(vfb.vtg_sink) # Connect Video FrameBuffer to Video PHY. - self.comb += vfb.source.connect(phy.sink) + self.comb += vfb.source.connect(phy if isinstance(phy, stream.Endpoint) else phy.sink) # Constants. self.add_constant("VIDEO_FRAMEBUFFER_BASE", base)