4.4.14. ARMulif_SetConfig

This function changes the config value of the modeled processor. The config value represents the state of the configuration pins on the ARM core.

Syntax

void ARMulif_SetConfig(RDI_ModuleDesc *mdesc,
                       ARMword bitsToChange, ARMword newValue)

where:

mdesc

is the handle for the core.

bitsToChange

is a bitmask of the config bits to change.

newValue

contains the new values of the bits to change.

Return

The function returns the previous config value.

Usage

Note

If a bit is cleared in bitsToChange it must not be set in newValue. For example, to set bit[1] and clear bit[0]:

bitsToChange

0x03 (0b00000011)

newValue

0x02 (0b00000010)

Example

oldConfig = ARMulif_SetConfig(state, 0x00000001, 0x00000001);
//This sets bit[0] to value 1
oldConfig = ARMulif_SetConfig(state, 0x00000002, 0x00000001);
//This sets bit[0] to value 0 - note that bit[0] is unaffected.

You can use the following call to obtain the current settings of the configuration pins, without modifying them:

currentConfig = ARMulif_SetConfig(state, 0, 0)
Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0207D
Non-Confidential