mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
framebuffer: work around dysfunctional Xst retiming
This commit is contained in:
parent
1c8ef0fe3e
commit
df23431d77
1 changed files with 7 additions and 3 deletions
|
@ -53,7 +53,8 @@ class Framebuffer(Module):
|
||||||
|
|
||||||
class Blender(PipelinedActor, AutoCSR):
|
class Blender(PipelinedActor, AutoCSR):
|
||||||
def __init__(self, nimages, latency):
|
def __init__(self, nimages, latency):
|
||||||
self.sink = Sink([("i"+str(i), pixel_layout) for i in range(nimages)])
|
sink_layout = [("i"+str(i), pixel_layout) for i in range(nimages)]
|
||||||
|
self.sink = Sink(sink_layout)
|
||||||
self.source = Source(pixel_layout)
|
self.source = Source(pixel_layout)
|
||||||
factors = []
|
factors = []
|
||||||
for i in range(nimages):
|
for i in range(nimages):
|
||||||
|
@ -65,7 +66,10 @@ class Blender(PipelinedActor, AutoCSR):
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
imgs = [getattr(self.sink.payload, "i"+str(i)) for i in range(nimages)]
|
sink_registered = Record(sink_layout)
|
||||||
|
self.sync += If(self.pipe_ce, sink_registered.eq(self.sink.payload))
|
||||||
|
|
||||||
|
imgs = [getattr(sink_registered, "i"+str(i)) for i in range(nimages)]
|
||||||
outval = Record(pixel_layout)
|
outval = Record(pixel_layout)
|
||||||
for e in pixel_layout:
|
for e in pixel_layout:
|
||||||
name = e[0]
|
name = e[0]
|
||||||
|
@ -85,7 +89,7 @@ class Blender(PipelinedActor, AutoCSR):
|
||||||
]
|
]
|
||||||
|
|
||||||
pipe_stmts = []
|
pipe_stmts = []
|
||||||
for i in range(latency):
|
for i in range(latency-1):
|
||||||
new_outval = Record(pixel_layout)
|
new_outval = Record(pixel_layout)
|
||||||
pipe_stmts.append(new_outval.eq(outval))
|
pipe_stmts.append(new_outval.eq(outval))
|
||||||
outval = new_outval
|
outval = new_outval
|
||||||
|
|
Loading…
Reference in a new issue