get prioritymux test working with nose3
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 2 May 2019 23:28:23 +0000 (00:28 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 2 May 2019 23:28:23 +0000 (00:28 +0100)
src/nmutil/test/test_prioritymux_pipe.py

index dac0f141bf64f721832a614a9d9b8c5727098e29..c80a179ee812f15961d10bc629e7b9dd66961c0d 100644 (file)
@@ -130,7 +130,7 @@ class InputTest:
     def send(self, mid):
         for i in range(self.tlen):
             op2 = self.di[mid][i]
-            rs = dut.p[mid]
+            rs = self.dut.p[mid]
             yield rs.valid_i.eq(1)
             yield rs.data_i.data.eq(op2)
             yield rs.data_i.idx.eq(i)
@@ -202,8 +202,7 @@ class TestPriorityMuxPipe(PriorityCombMuxInPipe):
         stage = PassThroughStage(iospecfn)
         PriorityCombMuxInPipe.__init__(self, stage, p_len=self.num_rows)
 
-
-if __name__ == '__main__':
+def test1():
     dut = TestPriorityMuxPipe()
     vl = rtlil.convert(dut, ports=dut.ports())
     with open("test_inputgroup_multi.il", "w") as f:
@@ -216,3 +215,5 @@ if __name__ == '__main__':
                          test.rcv()],
                    vcd_name="test_inputgroup_multi.vcd")
 
+if __name__ == '__main__':
+    test1()