cores/video: Add fifo_depth parameter to add_video_framebuffer and use new KILOBYTE to define depth.
This commit is contained in:
parent
491974c719
commit
3fa3532f16
|
@ -646,7 +646,7 @@ class VideoTerminal(LiteXModule):
|
||||||
|
|
||||||
class VideoFrameBuffer(LiteXModule):
|
class VideoFrameBuffer(LiteXModule):
|
||||||
"""Video FrameBuffer"""
|
"""Video FrameBuffer"""
|
||||||
def __init__(self, dram_port, hres=800, vres=600, base=0x00000000, fifo_depth=65536, clock_domain="sys", clock_faster_than_sys=False, format="rgb888"):
|
def __init__(self, dram_port, hres=800, vres=600, base=0x00000000, fifo_depth=64*KILOBYTE, clock_domain="sys", clock_faster_than_sys=False, format="rgb888"):
|
||||||
self.vtg_sink = vtg_sink = stream.Endpoint(video_timing_layout)
|
self.vtg_sink = vtg_sink = stream.Endpoint(video_timing_layout)
|
||||||
self.source = source = stream.Endpoint(video_data_layout)
|
self.source = source = stream.Endpoint(video_data_layout)
|
||||||
self.underflow = Signal()
|
self.underflow = Signal()
|
||||||
|
|
|
@ -2375,7 +2375,7 @@ class LiteXSoC(SoC):
|
||||||
self.comb += vt.source.connect(phy if isinstance(phy, stream.Endpoint) else phy.sink)
|
self.comb += vt.source.connect(phy if isinstance(phy, stream.Endpoint) else phy.sink)
|
||||||
|
|
||||||
# Add Video Framebuffer ------------------------------------------------------------------------
|
# Add Video Framebuffer ------------------------------------------------------------------------
|
||||||
def add_video_framebuffer(self, name="video_framebuffer", phy=None, timings="800x600@60Hz", clock_domain="sys", format="rgb888"):
|
def add_video_framebuffer(self, name="video_framebuffer", phy=None, timings="800x600@60Hz", clock_domain="sys", format="rgb888", fifo_depth=64*KILOBYTE):
|
||||||
# Imports.
|
# Imports.
|
||||||
from litex.soc.cores.video import VideoTimingGenerator, VideoFrameBuffer
|
from litex.soc.cores.video import VideoTimingGenerator, VideoFrameBuffer
|
||||||
|
|
||||||
|
@ -2400,6 +2400,7 @@ class LiteXSoC(SoC):
|
||||||
hres = hres,
|
hres = hres,
|
||||||
vres = vres,
|
vres = vres,
|
||||||
base = base,
|
base = base,
|
||||||
|
fifo_depth = fifo_depth,
|
||||||
format = format,
|
format = format,
|
||||||
clock_domain = clock_domain,
|
clock_domain = clock_domain,
|
||||||
clock_faster_than_sys = vtg.video_timings["pix_clk"] >= self.sys_clk_freq,
|
clock_faster_than_sys = vtg.video_timings["pix_clk"] >= self.sys_clk_freq,
|
||||||
|
|
Loading…
Reference in New Issue