soc/integration/soc_core: fix get_mem_data for json files
This commit is contained in:
parent
4443b5075b
commit
0175f86cb2
|
@ -70,9 +70,9 @@ def get_mem_data(filename, endianness="big", mem_size=None):
|
||||||
for i in range(len(w), 4):
|
for i in range(len(w), 4):
|
||||||
w += b'\x00'
|
w += b'\x00'
|
||||||
if endianness == "little":
|
if endianness == "little":
|
||||||
data[i] = struct.unpack("<I", w)[0]
|
data[int(base, 16)//4 + i] = struct.unpack("<I", w)[0]
|
||||||
else:
|
else:
|
||||||
data[i] = struct.unpack(">I", w)[0]
|
data[int(base, 16)//4 + i] = struct.unpack(">I", w)[0]
|
||||||
i += 1
|
i += 1
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue