2.5 Model resource access

The following table shows the MxScript functions that access model resources, and their iris.debug equivalent:

Table 2-4 Resource access functions

MxScript function iris.debug equivalent
regWrite(name, value) target.write_register(name, value)
regRead(name) target.read_register(name)
memWrite(memspace, address, value) target.write_memory(address, value[, memspace])

If memspace is not specified, the current memory space is used.

memRead(memspace, address, count) target.read_memory(address, count[, memspace])

If memspace is not specified, the current memory space is used.

disassemble(address) target.disassemble(address)
memStoreToFile(…)
with open("tempmem.bin", "wb") as f:
    mem = cpu.read_memory(0, count=1024)
    f.write(mem)
memLoadFromFile(…)
with open("tempmem.bin", "rb") as f:
    mem = bytearray(f.read(1024))
    cpu.write_memory(0, mem)
Non-ConfidentialPDF file icon PDF version101421_0100_01_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.