From fe8def53014d725fe6cc716858aa9a640c7db582 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 3 May 2019 00:43:30 +0100 Subject: [PATCH] get test_fpadd_pipe.py working --- src/ieee754/fpadd/test/test_fpadd_pipe.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ieee754/fpadd/test/test_fpadd_pipe.py b/src/ieee754/fpadd/test/test_fpadd_pipe.py index ca469dc1..2b021924 100644 --- a/src/ieee754/fpadd/test/test_fpadd_pipe.py +++ b/src/ieee754/fpadd/test/test_fpadd_pipe.py @@ -37,7 +37,7 @@ class InputTest: def send(self, mid): for i in range(self.tlen): op1, op2 = self.di[mid][i] - rs = dut.p[mid] + rs = self.dut.p[mid] yield rs.valid_i.eq(1) yield rs.data_i.a.eq(op1) yield rs.data_i.b.eq(op2) @@ -108,8 +108,7 @@ class InputTest: print ("recv ended", mid) - -if __name__ == '__main__': +def test1(): dut = FPADDMuxInOut(32, 4) vl = rtlil.convert(dut, ports=dut.ports()) with open("test_fpadd_pipe.il", "w") as f: @@ -124,3 +123,5 @@ if __name__ == '__main__': ], vcd_name="test_fpadd_pipe.vcd") +if __name__ == '__main__': + test1() -- 2.30.2