integration/common: fix mem_decoder (shadow base has been deprecated)
This commit is contained in:
parent
7ee9ce38a7
commit
16d1972bf8
|
@ -13,12 +13,11 @@ from migen import *
|
||||||
# Helpers ----------------------------------------------------------------------------------------
|
# Helpers ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def mem_decoder(address, size=0x10000000):
|
def mem_decoder(address, size=0x10000000):
|
||||||
address &= ~0x80000000
|
|
||||||
size = 2**log2_int(size, False)
|
size = 2**log2_int(size, False)
|
||||||
assert (address & (size - 1)) == 0
|
assert (address & (size - 1)) == 0
|
||||||
address >>= 2 # bytes to words aligned
|
address >>= 2 # bytes to words aligned
|
||||||
size >>= 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):
|
def get_version(with_time=True):
|
||||||
if with_time:
|
if with_time:
|
||||||
|
|
Loading…
Reference in New Issue