From: Michael Nolan Date: Wed, 6 May 2020 15:44:35 +0000 (-0400) Subject: Look up spr length from spr table X-Git-Tag: div_pipeline~1369 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6ab6784783b14eadf5b0fff57a60119446f0bc9;p=soc.git Look up spr length from spr table --- diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index 736f7bb5..cf66b95b 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -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):