Look up spr length from spr table
authorMichael Nolan <mtnolan2640@gmail.com>
Wed, 6 May 2020 15:44:35 +0000 (11:44 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Wed, 6 May 2020 15:44:35 +0000 (11:44 -0400)
src/soc/decoder/isa/caller.py

index 736f7bb59ced1c88aef02586f2a9535b33209323..cf66b95bd624f3c1e93f01c7beaf34ad0f276f4f 100644 (file)
@@ -2,6 +2,7 @@ from functools import wraps
 from soc.decoder.orderedset import OrderedSet
 from soc.decoder.selectable_int import (FieldSelectableInt, SelectableInt,
                                         selectconcat)
+from soc.decoder.power_enums import spr_dict
 from collections import namedtuple
 import math
 
@@ -147,8 +148,8 @@ class SPR(dict):
         if key in self:
             return dict.__getitem__(self, key)
         else:
-            import pdb; pdb.set_trace()
-            return SelectableInt(0, 64)
+            info = spr_dict[key]
+            return SelectableInt(0, info.length)
 
     def __setitem__(self, key, value):
         if isinstance(key, SelectableInt):