Skip to content

Commit

Permalink
integration/common: fix mem_decoder (shadow base has been deprecated)
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Feb 10, 2020
1 parent 7ee9ce3 commit 16d1972
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions litex/soc/integration/common.py
Expand Up @@ -13,12 +13,11 @@
# 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:
Expand Down

0 comments on commit 16d1972

Please sign in to comment.