mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc/integration/soc_core: fix get_mem_data for json files
This commit is contained in:
parent
4443b5075b
commit
0175f86cb2
1 changed files with 2 additions and 2 deletions
|
@ -70,9 +70,9 @@ def get_mem_data(filename, endianness="big", mem_size=None):
|
|||
for i in range(len(w), 4):
|
||||
w += b'\x00'
|
||||
if endianness == "little":
|
||||
data[i] = struct.unpack("<I", w)[0]
|
||||
data[int(base, 16)//4 + i] = struct.unpack("<I", w)[0]
|
||||
else:
|
||||
data[i] = struct.unpack(">I", w)[0]
|
||||
data[int(base, 16)//4 + i] = struct.unpack(">I", w)[0]
|
||||
i += 1
|
||||
return data
|
||||
|
||||
|
|
Loading…
Reference in a new issue