add write-regs encoding to regspec decoder
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 2 Jun 2020 16:52:42 +0000 (17:52 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 2 Jun 2020 16:52:42 +0000 (17:52 +0100)
src/soc/fu/regspec.py

index 632c19fcbf4e741cdbb593968f811a4fd8d94f1f..c85db645cfb4f830031d99d4ca3a58d83583279d 100644 (file)
@@ -131,6 +131,10 @@ def regspec_decode(e, regfile, name):
             return e.read_reg2.ok, 1<<e.read_reg2.data, None
         if name == 'rc': # RS
             return e.read_reg3.ok, 1<<e.read_reg3.data, None
+        if name == 'o': # RT
+            return e.write_reg.ok, None, 1<<e.write_reg.data
+        if name == 'o1': # RA (update mode: LD/ST EA)
+            return e.write_ea.ok, None, 1<<e.write_ea.data
 
     if regfile == 'CR':
         # CRRegs register numbering is *unary* encoded