I am having trouble understanding how Parameters are evaluated (especially String Parameters). For many of my fixed point models, I use a Precision parameter to define the precision of an operation or port. Currently, Precision is specified as a String to support several different precision formats.
In many cases, I specify the precision directly with a valid Precision string (for example "(1.8)"). In other cases, I would like to specify the precision with a parameter defined at a higher level in the hierarchy (i.e. as described in Section 2.5.1 Parameters in Hierarchical Models of the PTT design document #1 manual). I am struggling how to support both ways of specifying the precision.
If I use the "Parameter" class, entering valid Precision Strings will generate an expression evaluation exception (i.e. the string "(1.8)" does not parse in the expression parser). However, if I use a simple StringAttribute that is only parsed by the Precision parser, I cannot use a global Parameter to specify the precision. Any suggestions on how I can support both direct specification of precision parameters as well as parameter substitution using the expression parser?
Thanks, - Mike -- Michael J. Wirthlin Associate Professor Electrical and Computer Engineering Voice: (801) 422-7601 Brigham Young University Fax: (801) 422-0201 459 Clyde Building Email: [EMAIL PROTECTED] Provo, UT 84602 www.ee.byu.edu/faculty/wirthlin ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]