Chapter 5 generated code architecture, Symbolic name creation, Default names – National Instruments AutoCode NI MATRIX User Manual

Page 109: Symbolic name creation -1, Default names -1, Er 5, Generated code architecture, Chapter 5, Generated code, Architecture

Advertising
background image

© National Instruments Corporation

5-1

AutoCode Reference

5

Generated Code Architecture

This chapter supplies more details about the content and framework of
the generated code. This includes storage usage, various procedures,
specialized blocks, and subsystems. This chapter is directed toward
someone writing his/her own template, interfacing generated code within
a larger system, designing for optimal code size and speed, or being
interested in the generated code architecture. This chapter assumes
familiarity with the C or Ada programming language and standard
programming concepts.

Symbolic Name Creation

AutoCode is very much like a compiler in that it translates a model diagram
(a type of language) into generated code. The requirements of generated
code are somewhat different than that of the model diagram and AutoCode
must resolve these differences and preserve the semantics of the model
diagram.

The symbolic names that appear within the generated code include function
names, variable names, and data types. AutoCode uses the names of
SuperBlocks, blocks, and signal labels/names to derive the symbolic names
for the code that provide maximal traceability from the code back to the
model diagram. AutoCode follows some basic rules when deriving a
symbolic name. These rules are described in the following sections.

Default Names

AutoCode selects a default name for any symbol that does not have a
specific name from the diagram. A default name is a combination of the
block name and block identification number as found in the diagram. If the
block has no name, the enclosing SuperBlock name is used to form the
name.

Advertising