System Debug Reference Manual (32650-90901)

Chapter 10 461
System Debug Standard Functions
func symaddr
$nmdat > wl save
$1$2$3-->0004$5
The string variable save is used to store the function return value. STRWRITE is equivalent
to the W(WRITE) command, but the formatted output is returned in a string.
Note the single quotes which surround the value list. These turn the value list into a
string. Double quotes are then used to form individual string values and format
specifications.
STRWRITE is similar to the ASC function. The major difference is that ASC accepts a single
expression with an optional format specification:
wl ASC(1+2, "w4")
while STRWRITE accepts a list of expressions, each with optional formatting:
var title = strwrite('"Current Pin:" pin:"w4", " PC:", pc')
Limitations, Restrictions
none
func symaddr
Returns the bit- or byte-relative offset of a component specified through the path
specification, relative to the outer structure.
Syntax
symaddr (
pathspec
[
units
])
Formal Declaration
symaddr:u32 (
pathspec
:str [
units
:u16=8])
Parameters
pathspec
A path specification, as described in chapter 5, "Symbolic
Formatting/Symbolic Access."
units
Specifies the units (that is, bit width) in which the result is given. 1 means
bits, 8 means bytes, 32 means words. The default is bytes.
Symbolic offsets are rounded down to the nearest whole unit.
Examples
$nmdebug > symopen gradtyp.demo
Opens the symbolic data type file gradtyp.demo. It is assumed that the Debug variable