more updating spr1/spr2 to fast1/fast2
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Jul 2020 19:44:50 +0000 (20:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Jul 2020 19:44:50 +0000 (20:44 +0100)
src/soc/decoder/power_regspec_map.py
src/soc/fu/compunits/test/test_branch_compunit.py

index a88375d0dcc1d02ffec2df6b855a4eedc9b9fa94..2fc32fe0213e9390aa90fa5793823fa266dbd805 100644 (file)
@@ -88,9 +88,9 @@ def regspec_decode_read(e, regfile, name):
         if name == 'msr':
             return Const(1), MSR # TODO: detect read-conditions
         # TODO: remap the SPR numbers to FAST regs
-        if name == 'spr1':
+        if name == 'fast1':
             return e.read_fast1.ok, 1<<e.read_fast1.data
-        if name == 'spr2':
+        if name == 'fast2':
             return e.read_fast2.ok, 1<<e.read_fast2.data
 
     if regfile == 'SPR':
@@ -143,9 +143,9 @@ def regspec_decode_write(e, regfile, name):
         if name == 'msr':
             return None, MSR # hmmm
         # TODO: remap the SPR numbers to FAST regs
-        if name == 'spr1':
+        if name == 'fast1':
             return e.write_fast1, 1<<e.write_fast1.data
-        if name == 'spr2':
+        if name == 'fast2':
             return e.write_fast2, 1<<e.write_fast2.data
 
     if regfile == 'SPR':
index dbcd0f656df8b026b2927e9db8ea4c42394d44a5..622aabfd184e781ee8d20e9eab9452f786033195 100644 (file)
@@ -42,16 +42,16 @@ class BranchTestRunner(TestRunner):
 
         # Link SPR
         lk = yield dec2.e.lk
-        branch_lk = 'spr2' in res
+        branch_lk = 'fast2' in res
         self.assertEqual(lk, branch_lk, code)
         if lk:
-            branch_lr = res['spr2']
+            branch_lr = res['fast2']
             self.assertEqual(sim.spr['LR'], branch_lr, code)
 
         # CTR SPR
-        ctr_ok = 'spr1' in res
+        ctr_ok = 'fast1' in res
         if ctr_ok:
-            ctr = res['spr1']
+            ctr = res['fast1']
             self.assertEqual(sim.spr['CTR'], ctr, code)