From: Luke Kenneth Casson Leighton Date: Mon, 29 Mar 2021 19:05:11 +0000 (+0100) Subject: correct segment check (off by one in LE/BE convert X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f444872e662aa097ad705a54e47f2ed8f77e3743;p=soc.git correct segment check (off by one in LE/BE convert --- diff --git a/src/soc/decoder/isa/radixmmu.py b/src/soc/decoder/isa/radixmmu.py index 9bd6d53f..6f4aeae7 100644 --- a/src/soc/decoder/isa/radixmmu.py +++ b/src/soc/decoder/isa/radixmmu.py @@ -495,7 +495,7 @@ class RADIX: # below *directly* match the spec, unlike microwatt which # has to turn them around (to LE) mask = genmask(shift, 44) - nonzero = addr[1:32] & mask[13:44] # mask 31 LSBs (BE numbered 13:44) + nonzero = addr[2:33] & mask[13:44] # mask 31 LSBs (BE numbered 13:44) print ("RADIX _segment_check nonzero", bin(nonzero.value)) print ("RADIX _segment_check addr[0-1]", addr[0].value, addr[1].value) if addr[0] != addr[1] or nonzero != 0: