15.5.9 Linking MEM-AP access to a core device

Not all clients are directly aware of MEM-AP type devices. DS-5 Debugger is an example of such a client. To allow such clients to make use of MEM-AP devices, named address space filters can be added to any DTSL Device object. The purpose of the address space filter is to tell the Device object that, if it sees a memory access with a known address space name, it should carry out the access through another DTSL device, rather than through the core. For example, we can add an address space filter to the Cortex-M3 DTSL Device which detects memory accesses to an address with an address space of “AHB”. When it detects such an access, it performs the access using the AHB device, instead of going through the Cortex-M3. For DS-5 Debugger, this means that the user can prefix an address with AHB: (for example, AHB:0x20000000), and the access is performed using the AHB-AP.

The following code shows how the address space filter is added to the Cortex-M3 object:

devID = self.findDevice("CSMEMAP")
self.AHB = CortexM_AHBAP(self, devID, "CSMEMAP")
devID = self.findDevice("Cortex-M3")
self.cortexM3 = ResetHookedDevice(self, devID, "Cortex-M3")
    [AHBCortexMMemAPAccessor("AHB", self.AHB, "AHB bus accessed via AP_0")])

Any number of address filters can be added, but each filter name (DS-5 Debugger address prefix) must be unique.

To determine the supported address spaces for an object which implements IDevice, call the getAddressSpaces() method. When a client matches against an address space, it can map the address space to a rule parameter which is passed into the IDevice memory access methods. The rule parameter is then used to direct the memory access to the appropriate device.

Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.