Data Definition Language (DDL) Reference Manual
SPI Tokens
Data Definition Language (DDL) Reference Manual—529431-004
7-17
Product Versions for Bit Fields
•
Make the field larger. For example, if a field is a 16-bit integer and all 16-bit values
are valid for the field, you can define the field as a 32-bit integer. Lengthening the
field enables you to choose an SPI null value that creates a value in the 32-bit
integer that is not one of the valid values for the 16-bit integer.
For more information on using product versions in extensible structured tokens, see
the SPI Programming Manual and the SPI Common Extensions Manual.
Topics:
•
Product Versions for Bit Fields on page 7-17
•
TOKEN-MAP Statement Output on page 7-18
•
Standard SPI Definitions in Token-Map Definitions on page 7-19
Product Versions for Bit Fields
Bit fields that share the same byte must have the same product version number in the
token map. The product version number applies to the entire byte. If a bit field extends
across two bytes within a word, the product version number of that field applies to the
entire word.
The product version number for a bit filler depends on the filler’s position in a word and
the length of the filler.
•
If a bit filler or group of contiguous bit fillers is less than a byte long and is
contained within one of the two bytes of a word, the filler or group of fillers
assumes the same product version number as all other bit fields in the containing
byte.
•
If a bit filler or group of contiguous bit fillers is a byte long or longer and fills either
the upper or lower byte of a word, the filler or group of fillers is a NOVERSION
field. The remaining part of the bit filler or fillers, if any, assumes the same product
version number as all other bit fields in the byte that contains the remaining part.
•
If a bit filler extends across two bytes of the same word but does not fill up either
byte, the part of the bit filler on either side of the byte boundary assumes the same
product version number as all other bit fields in the byte that contains the filler.
The DDL compiler allocates words for bit fields according to these rules:
•
A bit field inside a group structure that follows a nonbit field item starts on a new
16-bit word. If you specify bit fields consecutively inside the group structure, the
DDL compiler allocates the same 16-bit word for all contiguous bit fields that can fit
in the word. For the next bit field that cannot fit in the same 16-bit word, the DDL
compiler allocates the next word.
•
Consecutive bit fields that occupy the same word have the same byte offset value
but different bit offset values in their records in the DICTOBL file. An elementary
item of another data type that follows a bit field item starts on the next word.