Technical data
DOC-01-TELAS-CRG-4 ASTi ACE Studio Components Reference Guide Rev.M
96 Copyright © 2014 Advanced Simulation Technology inc.
5.13. MathFunction
Summary:
Background: The ACE Host Input component does not include built-in scaling
features - it simply provides a means to extract control fields from incoming host
packets. Scaling of the Host Input fields is done in two ways:
1. The Host Input (data source) is linked directly to an internal variable field of a
component (data sink). The sink component includes a basic scaling feature
including a single operand and modifier which modify the value of the Host
Input.
2. The Host Input* is linked to a Math Function component, which is configured
to modify the value of the Host Input.
*Actually up to three Host Inputs can be linked to a Math Function. Also, Math
Function Inputs can be connected to the outputs of other Math functions, to provide
grouped or nested functions. For simplicity, this description uses Host Input to
mean “data source.”
The Math Function calls a user-specified function (like: lookup table, add, subtract,
multiply, divide, etc.) which acts on the input (or inputs). The output is the result of
the specified function acting on the input variables.
The Math Function is then linked to a variable inside the data sink component.
Description: Schematically, the Math Function is connected to a series, between a
Host Input data source and the sink component using the control data to modify one
of its internal variables. The Math Function provides a variety of modifier features
for the Host Input:
1. One, two or three data source inputs,
2. A link to the ACE Function Service, providing access to: one variable func-
tions, or f(x), two variable functions, or f(x,y) and three variable functions, f(x,
y, z).
The Math Function has three inputs: X, Y and Z and serves as a one, two or three
variable math functions. Here is how it works:
One variable function: link one input to a Host Input and a one variable functions,
f(x) is selected. The two unused inputs assume values of 1.
Two variable function: two inputs are linked to Host Inputs and a two variable
function, f(x,y) is selected. The unused input assumes a value of 1.
Three variable function: all three inputs are linked to Host Inputs and a three
variable function, f(x, y, z) is selected.
Each input has its own constant scaling factor and multiplier operand. Each of the
input scaling factors are user selectable.
The function operating on the X, Y, and Z inputs is selected using the function
handle. The function handle specifies an f(x), f(x, y) or f(x, y, z) function from the
Function Service. Function handles are defined in the tool associated with the
Function Service. The Math Function includes a user interface for selecting a
function handle (e.g. a pull-down list). Function handles include: Table (x), Scale/
Limit (x), Log/Antilog (x), Lag Filter (x), Add/ Subtract/ Multiply/ Divide (x, y),
Random Number (x), Comparator / MaxMin (x), Switch (x, y, z).
The evaluation of the function is modified by a user-selectable scaling factor and
multiplier operand.
A Gain input is also available for use as a final-stage scaling factor - it modifies the
scaled evaluation of the function. The Gain input has its own user-selectable
constant scaling factor and multiplier operand.
The final result of Math Function is: the scaled Gain value multiplied by the scaled
function evaluation. Result data types include:
• Float: Output result of math function, floating point value.
• Integer: Output result of math function, integer value, a rounding of the
floating point result.
• Boolean: Output result of math function, as a boolean. The boolean (On/Off)
is a digital comparison of the float value based on a 0.3 and 0.7 low and high
threshold value. Below 0.3 is Off, above 0.7 is On, the 0.4 difference pro-
vides a hysteresis value.










