User`s guide
Optimizing Embedded Code with Target Function Libraries
Code Generation Using the Target Function Library
The build process begins by converting your model and its confi guration set to
an intermediate form that reflects the blocks and configurations in the model.
Then the code generation phase starts.
Note Real-Time Workshop refers to the following conversion process as
replacement and it occurs before the build process generates a project.
During code generation for your model, the following process occurs:
1 Code ge neration encounters a call site fo r a functio n or arithme tic operator
and creates an d partially populates a target function library entry object.
2 The entry object queries the target function library database for an
equivalent math function or operator. The information provided b y the code
generation process for the entry object includes the function o r operator
key, and the conceptual argument list.
3 The code generation process passes the target function library entry object
to the target function library.
4 If there is a matching table entry in the target function library, the query
returns a fully-populated target function library entry to the call site,
including the implementation function name, arg ument list, and build
information
5 The code generation process uses the returned information to generate code.
Within the target function library that you select for your model, the software
searches the tables that comprise the library. The search occurs in the order
in which the tables appear in either the Target Function Library Viewer or
the Target function library tool tip. For each table searched, if the search
finds multiple matches for a target function library entry object, priority level
determines the match to return. The search returns the higher-priority
(lower-numbered) entry.
3-71