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) await RisingEdge(self.clock)
if (ready_sample and valid_sample) or (not valid_sample): if (ready_sample and valid_sample) or (not valid_sample):
if self.drive_obj: if self.drive_obj and not self.pause:
if not self.pause: self.bus.drive(self.drive_obj)
self.bus.drive(self.drive_obj) self.drive_obj = None
self.drive_obj = None self.drive_sync.set()
self.drive_sync.set() if self.valid is not None:
if self.valid is not None: self.valid <= 1
self.valid <= 1
self.active = True self.active = True
else: else:
if self.valid is not None: if self.valid is not None:
self.valid <= 0 self.valid <= 0
self.active = False self.active = bool(self.drive_obj)
async def _run(self): async def _run(self):
while True: while True: