Fix pause handling

This commit is contained in:
Alex Forencich
2020-10-26 13:34:02 -07:00
parent c7783ef7c0
commit 0c9cd9084c

View File

@@ -146,18 +146,17 @@ class StreamSource(object):
await RisingEdge(self.clock)
if (ready_sample and valid_sample) or (not valid_sample):
if self.drive_obj:
if not self.pause:
self.bus.drive(self.drive_obj)
self.drive_obj = None
self.drive_sync.set()
if self.valid is not None:
self.valid <= 1
if self.drive_obj and not self.pause:
self.bus.drive(self.drive_obj)
self.drive_obj = None
self.drive_sync.set()
if self.valid is not None:
self.valid <= 1
self.active = True
else:
if self.valid is not None:
self.valid <= 0
self.active = False
self.active = bool(self.drive_obj)
async def _run(self):
while True: