Known Ada Compiler Problems; Comparing Results To Systembuild's Simulator - National Instruments AutoCode NI MATRIX Reference

National instruments ni matrixx reference manual
Table of Contents

Advertisement

Known Ada Compiler Problems

Comparing Results to SystemBuild's Simulator

© National Instruments Corporation
The architecture of AutoCode/Ada Fixed-Point heavily relies upon
overloaded operators and generic function instantiation. For a large and
complex model, the number of overloads and instantiations might
overwhelm some older Ada compilers. Also, problems might occur when
compiling source code from many different models into the same Ada
Library. NI suggests that code from different models be compiled into
separate libraries.
Another problem area might be the declaration of unsigned fixed-point
types. The Ada'83 standard does not include unsigned data types. Newer
Ada compilers do support unsigned types as extensions to the language
definition. If your compiler fails to handle unsigned fixed-point types,
one solution is to avoid using unsigned fixed-point types in the model.
Or, upgrade to a newer Ada compiler.
Another problem might occur with a
suggests that the overloaded operators and conversion functions be
specified with the inline directive. This eliminates function call overhead.
However, because those functions are instantiated from generics, older Ada
compilers might not work properly.
The SystemBuild Simulator can simulate a model with fixed-point types.
If you compare the stand-alone simulations from an Ada executable, the
results might not match. The following examples are possible reasons and
solutions for the problem:
Round and Truncation—By default, the SystemBuild Simulator
performs fixed-point data conversions using truncation as the rounding
mode. The Ada language always uses some type of rounding mode
other than truncation. SystemBuild includes a special default
parameter,
fixpt_round
round to nearest, with midpoint rounded away from zero mode.
Different Rounding Modes at Midpoint—The Ada language
specifically states rounding mode is to nearest. However, the
specification does not specify rounding when at a midpoint. Table 3-1
shows the possible choices. SystemBuild uses a round to nearest and
away from zero at midpoint. Therefore, if your Ada compiler does not
round away from zero at midpoint, the results from the simulator and
the stand-alone simulation will differ. There is no workaround. The
new Ada standard, Ada'95 specifies round away from zero at
midpoint.
Chapter 3
pragma
, which when set to the value of 1, uses a
3-35
Ada Language Reference
directive. NI strongly
AutoCode Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Autocode ni matrixx

Table of Contents