convert Logical to use new XER use of Data()
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 20 May 2020 04:44:52 +0000 (05:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 20 May 2020 04:44:52 +0000 (05:44 +0100)
src/soc/fu/logical/main_stage.py
src/soc/fu/logical/test/test_pipe_caller.py

index f4fb36411f1645a2d0b2d8acda5a4cde20cdcf86..d8c3b2fb56cc2a3ba25e0882e434974811317244 100644 (file)
@@ -131,7 +131,7 @@ class LogicalMainStage(PipeModBase):
 
         ###### sticky overflow and context, both pass-through #####
 
-        comb += self.o.so.eq(self.i.so)
+        comb += self.o.xer_so.data.eq(self.i.so)
         comb += self.o.ctx.eq(self.i.ctx)
 
         return m
index b44245212b50523b849d04262a88d509ea53ad78..6223a3dd1886a86bb851f2b71628bd1607858722 100644 (file)
@@ -238,18 +238,18 @@ class TestRunner(FHDLTestCase):
                         print(f"expected {expected:x}, actual: {alu_out:x}")
                         self.assertEqual(expected, alu_out, code)
                     yield from self.check_extra_alu_outputs(alu, pdecode2,
-                                                            simulator)
+                                                            simulator, code)
 
         sim.add_sync_process(process)
         with sim.write_vcd("simulator.vcd", "simulator.gtkw",
                             traces=[]):
             sim.run()
-    def check_extra_alu_outputs(self, alu, dec2, sim):
+    def check_extra_alu_outputs(self, alu, dec2, sim, code):
         rc = yield dec2.e.rc.data
         if rc:
             cr_expected = sim.crl[0].get_range().value
-            cr_actual = yield alu.n.data_o.cr0
-            self.assertEqual(cr_expected, cr_actual)
+            cr_actual = yield alu.n.data_o.cr0.data
+            self.assertEqual(cr_expected, cr_actual, code)
 
 
 if __name__ == "__main__":