From fe2a5cf412864314c0d44dc2b5ec0453ce5f4e5c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 15 Jul 2020 14:56:02 +0100 Subject: [PATCH] missed critical functions in cut/paste copy of PipeContext --- src/nmutil/concurrentunit.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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): -- 2.30.2