B.2.1. CADIReg_t

This data buffer is used to read and write register values. The register data is into the bytes array byte-by-byte. Data is always encoded in little endian mode. For example, the lowest address in the bytes array contains the least significant byte of the register.

Example B.10. CADIReg_t

struct CADIReg_t
{
public: // methods
        CADIReg_t(uint32_t regNumber = 0,
                  uint64_t bytes_par = 0,
                  uint16_t offset128 = 0,
                  bool isUndefined = false,
                  CADIRegAccessAttribute_t attribute = CADI_REG_READ_WRITE) :
                regNumber(regNumber), offset128(offset128), isUndefined(isUndefined),
                attribute(attribute)
        {
            for(int i=0; i < 8; ++i)
                bytes[i] = uint8_t(bytes_par >> (i * 8));
        }
public: // data
        uint32_t   regNumber;  
        uint8_t    bytes[16];  
        uint16_t   offset128; 
        bool  isUndefined;     
        CADIRegAccessAttribute_t attribute;   
};

The data members are:

regNumber

From debugger to target. Register ID to be read/written.

bytes[16]

From target to debugger for reads, from debugger to target for writes. Value to be read/written in little endian (regardless of the endianness of the host or the target).

offset128

From debugger to target. Specify which part of the register value to read/write for long registers greater than 128 bits. Measured in multiples of 128 bits. For example, 1 means bytes[0..15] contain bits 128-255. The actual bitwidth of non-string registers is determined by the bitsWide field in CADIRegInfo_t. Similarly for string registers, specify the offset in units of 16 chars into the string that is to be read or written, for example, offset128=1 means read/write str[16..31]. Reads to offsets beyond the length of the string are explicitly permitted and must result in bytes[0..15] being all zero.

Writes can make the string longer by writing nonzero data to offsets greater than the current length of a string. Writes can make a string shorter by writing data containing at least one zero byte to a specific offset.

Write sequences always write lower offsets before higher offsets and must always be terminated by at least one write containing at least one zero byte. Unused chars in bytes[0..15] (after the terminating zero byte) must be set to zero. The bitsWide field in CADIRegInfo_t is ignored for string registers.

isUndefined

From target to debugger. If true the value of the register is completely undefined. Bytes[0..15] must be ignored.

attribute

Undefined for CADI2.0. Targets and Debuggers should not set this data member so that the default value is used.

Copyright © 2008-2014 ARM. All rights reserved.ARM DUI 0444M
Non-ConfidentialID051314