From: Luke Kenneth Casson Leighton Date: Fri, 14 Aug 2020 19:44:59 +0000 (+0100) Subject: bad hack to get HSRR0/1 to be "same" as SRR0/1 X-Git-Tag: semi_working_ecp5~342 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f04821a516437b9091fae7690e499ef6d9a84b6;p=soc.git bad hack to get HSRR0/1 to be "same" as SRR0/1 --- diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index c8b5f4de..59728a0b 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -216,6 +216,10 @@ class SPR(dict): if isinstance(key, int): key = spr_dict[key].SPR key = special_sprs.get(key, key) + if key == 'HSRR0': # HACK! + key = 'SRR0' + if key == 'HSRR1': # HACK! + key = 'SRR1' if key in self: res = dict.__getitem__(self, key) else: @@ -235,6 +239,10 @@ class SPR(dict): key = spr_dict[key].SPR print("spr key", key) key = special_sprs.get(key, key) + if key == 'HSRR0': # HACK! + self.__setitem__('SRR0', value) + if key == 'HSRR1': # HACK! + self.__setitem__('SRR1', value) print("setting spr", key, value) dict.__setitem__(self, key, value)