actorlib/structuring/Pipeline: make 'busy' a signal
This commit is contained in:
parent
33c3a927c2
commit
dcedc4e6a5
|
@ -199,14 +199,13 @@ class Converter(Module):
|
||||||
|
|
||||||
class Pipeline(Module):
|
class Pipeline(Module):
|
||||||
def __init__(self, *modules):
|
def __init__(self, *modules):
|
||||||
|
self.busy = Signal()
|
||||||
n = len(modules)
|
n = len(modules)
|
||||||
m = modules[0]
|
m = modules[0]
|
||||||
# expose sink of first module
|
# expose sink of first module
|
||||||
# if available
|
# if available
|
||||||
if hasattr(m, "sink"):
|
if hasattr(m, "sink"):
|
||||||
self.sink = m.sink
|
self.sink = m.sink
|
||||||
# use of busy is encouraged
|
|
||||||
# but not mandatory
|
|
||||||
if hasattr(m, "busy"):
|
if hasattr(m, "busy"):
|
||||||
busy = m.busy
|
busy = m.busy
|
||||||
else:
|
else:
|
||||||
|
@ -224,4 +223,4 @@ class Pipeline(Module):
|
||||||
# if available
|
# if available
|
||||||
if hasattr(m, "source"):
|
if hasattr(m, "source"):
|
||||||
self.source = m.source
|
self.source = m.source
|
||||||
self.busy = busy
|
self.comb += self.busy.eq(busy)
|
||||||
|
|
Loading…
Reference in New Issue