Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

framebuffer: work around dysfunctional Xst retiming

  • Loading branch information...
commit fd7c2ba0bf1426b2bafa1987faa2f9db0aa4bbd9 1 parent 6f2c05d
@sbourdeauducq sbourdeauducq authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 milkymist/framebuffer/__init__.py
View
10 milkymist/framebuffer/__init__.py
@@ -53,7 +53,8 @@ def get_csrs(self):
class Blender(PipelinedActor, AutoCSR):
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)
factors = []
for i in range(nimages):
@@ -65,7 +66,10 @@ def __init__(self, nimages, latency):
###
- 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)
for e in pixel_layout:
name = e[0]
@@ -85,7 +89,7 @@ def __init__(self, nimages, latency):
]
pipe_stmts = []
- for i in range(latency):
+ for i in range(latency-1):
new_outval = Record(pixel_layout)
pipe_stmts.append(new_outval.eq(outval))
outval = new_outval
Please sign in to comment.
Something went wrong with that request. Please try again.