SPI Tokens
Data Definition Language (DDL) Reference Manual — 426798-002
7- 25
TOKEN-MAP Statement
The next example shows incorrect use of the SPI-NULL value for bit fields:
DEF bits-layout-z.
02 z-1 Type BIT 4 SPI-Null 0.
02 z-2 Type BIT 3 SPI-Null 1.
02 z-3 Type BIT 10.
02 z-4 Type BIT 4.
END.
*** ERROR *** SPI-NULL value on a bit field must be 255 - Z-1
*** ERROR *** SPI-NULL value on a bit field must be 255 - Z-2
The next examples show incorrect use of version numbers for bit fields:
In the following example, NOVERSION is incorrect for field z-2 because DDL would put
z-2 in the same byte as field z-1, and bit fields in the same byte must have the same
version number.
DEF bits-layout-z.
02 z-1 Type BIT 4 SPI-Null 255.
02 z-2 Type BIT 3 SPI-Null 255.
02 z-3 Type BIT 10.
02 z-4 Type BIT 4.
END.
TOKEN-MAP map-bits-z VALUE is 20 DEF is bits-layout-z.
VERSION "C00" FOR z-1.
NOVERSION FOR z-2.
1
0
1
New version specification follows
0
0
0
NOVERSION
511
1
255
Null value for bit FILLER
1
0
1
New version specification follows
17162
C
10
Version C10
511
1
255
Null value for bits-2
1
0
1
New version specification follows
17172
C
20
Version C20
767
2
255
Null value for bits-5 and bits-4
1
0
1
New version specification follows
0
0
0
NOVERSION
767
2
255
Null value for bits-7 and bit FILLER
Table 7-2. Structure of a Bit Map
Value in Word
Byte 1
Byte 2
Meaning of Value