return res
+def shape(i):
+ print ("shape", i)
+ r = 0
+ for part in list(i):
+ print ("shape?", part)
+ s, _ = part.shape()
+ r += s
+ return r, False
+
+
def cat(i):
""" flattens a compound structure recursively using Cat
"""
""" handles case where stage has dynamic ready/valid functions
"""
m = Module()
+ m.submodules.p = self.p
+ m.submodules.n = self.n
if self.stage is not None and hasattr(self.stage, "setup"):
self.stage.setup(m, self.p.i_data)
self.m = m = ControlBase._elaborate(self, platform)
# make a FIFO with a signal of equal width to the o_data.
- (fwidth, _) = self.n.o_data.shape()
+ (fwidth, _) = shape(self.n.o_data)
if self.buffered:
fifo = SyncFIFOBuffered(fwidth, self.fdepth)
else:
fwft=True, pipe=False)
-"""
# this is *probably* SimpleHandshake (note: memory cell size=0)
class SimpleHandshake(FIFOControl):
def __init__(self, stage, in_multi=None, stage_ctl=False):
FIFOControl.__init__(self, 0, stage, in_multi, stage_ctl,
fwft=True, pipe=False)
-"""