From fb966df09443abf0e34d3a65bde9cb2b4db629d3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 20 Apr 2019 23:23:09 +0100 Subject: [PATCH] use RecordObject in output mux pipe --- src/add/test_outmux_pipe.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/add/test_outmux_pipe.py b/src/add/test_outmux_pipe.py index f1b0774f..9f420f07 100644 --- a/src/add/test_outmux_pipe.py +++ b/src/add/test_outmux_pipe.py @@ -5,24 +5,15 @@ from nmigen.compat.sim import run_simulation from nmigen.cli import verilog, rtlil from multipipe import CombMuxOutPipe -from singlepipe import SimpleHandshake, PassThroughHandshake +from singlepipe import SimpleHandshake, PassThroughHandshake, RecordObject -class PassInData: +class PassInData(RecordObject): def __init__(self): + RecordObject.__init__(self) self.mid = Signal(2, reset_less=True) self.data = Signal(16, reset_less=True) - def __iter__(self): - yield self.mid - yield self.data - - def eq(self, i): - return [self.mid.eq(i.mid), self.data.eq(i.data)] - - def ports(self): - return [self.mid, self.data] - class PassThroughStage: -- 2.30.2