integration/common: fix mem_decoder (shadow base has been deprecated)

This commit is contained in:
Florent Kermarrec 2020-02-10 19:40:56 +01:00
parent 7ee9ce38a7
commit 16d1972bf8
1 changed files with 1 additions and 2 deletions

View File

@ -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: