Register Map XML File Structure
- Updated2025-10-09
- 4 minute(s) read
Refer to the following information when configuring an XML file for use with a Digital Pattern Editor Register Map.
The register map XML schema, located at <Program Files>\National Instruments\Digital Pattern Editor\RegisterMap.xsd, defines the structure for a register map XML file.
Configuring a Register Map XML File
The
root element of a register map file is a RegisterMap element. This
element must specify the following required attributes:
- schemaVersion — this must have a value of "1.0".
- xmlns — this must have a value of http://www.ni.com/Semiconductor/RegisterMap
The following sections describe elements within the RegisterMap element to configure.
Registers
Registers contains zero or more Register elements. You must
configure the addressBitWidth and valueBitWidth
for this element. For each Register element, you must specify the
register name, hexadecimal address, and read-write
access type.
Note Set the read-write type attribute to ReadWrite,
Read, or Write.
Fields
Fields contains zero or more
Field elements representing register fields in a register map
document. Each Field element contains an Comment
element, and zero or more RegisterBits elements. You must configure
the name attribute for each Field element. Each
Field element specifies the following attributes:
- format— set to one of the following values:
- Hexadecimal — this is the default value if this attribute is not specified.
- Binary
- Decimal
- UnsignedDecimal
- Boolean
- Enumeration — the Field element must specify an enum definition in the enumDefinition attribute.
- enumDefinition
- reserved— specifies the field is reserved for internal or future use
EnumDefinitions
EnumDefinitions contains zero or more
EnumDefinition elements representing enums specified in the
register map's Field element. Each EnumDefinition
element specifies a list of EnumMember elements and the following
attributes:
- name— the name of the enum definition.
- format— set to one of the following values:
- Hexadecimal — this is the default value if this attribute is not specified.
- Binary
- Decimal
- UnsignedDecimal
- Boolean
You must specify the following attributes for each
EnumMember:
- name — the name of the enum member.
- value — the value of the enum member.
RegisterBits
RegisterBits— these elements describe how a
Field is composed from the bits of registers in the register
map. You must specify values for the register and
bitRange attributes for each RegisterBits
element. The bitRange value is composed of two numbers separated by
a colon. The number on the left of the colon specifies the most significant bit, and
the number on the right of the colon specifies the least significant bit. For
example, a specified value of 7:0 indicates bits 7 through 0 with
bit 7 in the MSB position and bit 0 in the LSB position.
Note These numbers are restricted by
the value of the valueBitWidth attribute.
Protocol
These elements specify how to read and write register values.
The Protocol element contains the following:
- A ReadTemplate element specifying how to read the
registers. This element contains:
- patternName— an attribute specifying the name of the pattern to be burst to read register values.
- PatternSequencerRegisters— an element containing zero or more pattern sequencer register values to set before executing a read operation.
- SourceWaveformRegisterPacket— an element
specifying how to format the source waveform for reading register
values. If this element is not specified, Digital Pattern Editor
will pack the source waveform with the addresses of the registers to
read. This element contains the following:
- Comment— an element describing the packet.
- One or more RegisterPacketSegment elements
that contain the following:
- Comment
- CustomBits— specifies a custom bit value, with an comment attribute.
- AddressBitRange— the address bit range must be formatted as 2 numbers separated by a colon.
- ValueBitRange— the value bit range must be formatted as 2 numbers separated by a colon.
- ParityBit— set to either EvenParity or OddParity. Only one ParityBit element is allowed in a RegisterPacketSegment.
- CaptureWaveformRegisterPacket— an element
specifying how to parse the capture waveform for reading register
values. If this element is not specified, then Digital Pattern
Editor will parse the capture waveform assuming it is packed with
register value bits. This element contains the following:
- Comment
- One or more RegisterPacketSegment elements
that contain the following:
- Comment
- CustomBits— specifies a custom bit value, with an comment attribute.
- AddressBitRange— the address bit range must be formatted as 2 numbers separated by a colon.
- ValueBitRange— the value bit range must be formatted as 2 numbers separated by a colon.
- ParityBit— set to either EvenParity or OddParity. Only one ParityBit element is allowed in a RegisterPacketSegment.
- An WriteTemplate element specifying how to write to
registers. This element contains:
- patternName— an attribute specifying the name of the pattern to be burst to write register values.
- SourceWaveformRegisterPacket— an element specifying how to format the source waveform for writing register values. If this element is not specified, Digital Pattern Editor will pack the source waveform with the address and value of the registers to read. For example, when reading two registers named regA and regB, Digital Pattern Editor packs the source waveform with the address and value of regA, then the address and value of regB.
- PatternSequencerRegisters— an element containing zero or more pattern sequencer register values to set before executing a write operation.
PatternSequencerRegister
PatternSequencerRegisters— an
element containing zero or more pattern sequencer register values to set before
executing a read operation. Each PatternSequencerRegister
contains:
- Comment
- index— a required attribute specifying the pattern sequencer register index. Specify values from 8 to 15. reg0 to reg7 are reserved by Digital Pattern Editor.
- value— a required attribute specifying the integer value to set in the pattern sequencer register. Specify values from 0 to 65535.