From: Luke Kenneth Casson Leighton Date: Wed, 15 Jul 2020 13:56:02 +0000 (+0100) Subject: missed critical functions in cut/paste copy of PipeContext X-Git-Tag: 24jan2021_ls180~35 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe2a5cf412864314c0d44dc2b5ec0453ce5f4e5c;p=nmutil.git missed critical functions in cut/paste copy of PipeContext --- diff --git a/src/nmutil/concurrentunit.py b/src/nmutil/concurrentunit.py index 30fe93c..fd11a3e 100644 --- a/src/nmutil/concurrentunit.py +++ b/src/nmutil/concurrentunit.py @@ -43,6 +43,16 @@ class PipeContext: ret.append(self.op.eq(i.op)) return ret + def __iter__(self): + yield self.muxid + yield self.op + + def ports(self): + if hasattr(self.op, "ports"): + return [self.muxid] + self.op.ports() + else: + return list(self) + class InMuxPipe(PriorityCombMuxInPipe): def __init__(self, num_rows, iospecfn, maskwid=0):