add ALUHelpers check_fast_spr3 for SVSRR0 checking
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 4 May 2021 16:56:03 +0000 (17:56 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 4 May 2021 16:56:03 +0000 (17:56 +0100)
src/openpower/test/common.py

index 33a873dbccda32d2fbfb685d0f8e6ee730ba78a3..754505ec99a0fa3d39eb36f088ce8e77145996b0 100644 (file)
@@ -514,6 +514,13 @@ class ALUHelpers:
             print(f"expected {expected:x}, actual: {alu_out:x}")
             dut.assertEqual(expected, alu_out, msg)
 
+    def check_fast_spr3(dut, res, sim_o, msg):
+        if 'fast3' in res:
+            expected = sim_o['fast3']
+            alu_out = res['fast3']
+            print(f"expected {expected:x}, actual: {alu_out:x}")
+            dut.assertEqual(expected, alu_out, msg)
+
     def check_int_o1(dut, res, sim_o, msg):
         if 'o1' in res:
             expected = sim_o['o1']