System Debug Reference Manual (32650-90888)

Chapter 10 365
System Debug Standard Functions
func bool
+---------------------------------------------------------------+
| |
+---------------------------------------------------------------+
If a S16 or U16 value is passed, the format of the word (start/end positions) is as follows:
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-------------------------------+
| |
+-------------------------------+
Examples
This is a 32-bit word containing the bit pattern for the hex value 4015381c:
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+---------------------------------------------------------------+
|0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0|
+---------------------------------------------------------------+
$nmdebug > var xx:u32 4015381c
$nmdebug > wl bitx(xx,#10,5)
$a
Extract five bits starting at position 10 (this yields the bit pattern 01010).
$nmdebug > wl bitx(xx,-#14,5)
$a
Extract five bits ending at position 14 (this yields the bit pattern 01010). This is the same
field of bits as in the previous example.
Limitations, Restrictions
If an extended address
source
is passed, the extraction location must fall entirely within
the 64-bit offset part. Since EADDR types have a total of 96 bits, the valid bit positions are
32 through 95.
func bool
Coerces an expression into a Boolean value.
Syntax
bool (
value
)
Formal Declaration
bool:bool (
value
:any)