From 16d1972bf81f43840a74e37fee3f5107e6b0504c Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 10 Feb 2020 19:40:56 +0100 Subject: [PATCH] integration/common: fix mem_decoder (shadow base has been deprecated) --- litex/soc/integration/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litex/soc/integration/common.py b/litex/soc/integration/common.py index 695e56090..a5ac066ac 100644 --- a/litex/soc/integration/common.py +++ b/litex/soc/integration/common.py @@ -13,12 +13,11 @@ from migen import * # Helpers ---------------------------------------------------------------------------------------- def mem_decoder(address, size=0x10000000): - address &= ~0x80000000 size = 2**log2_int(size, False) assert (address & (size - 1)) == 0 address >>= 2 # bytes to words aligned size >>= 2 # bytes to words aligned - return lambda a: (a[log2_int(size):-1] == (address >> log2_int(size))) + return lambda a: (a[log2_int(size):] == (address >> log2_int(size))) def get_version(with_time=True): if with_time: