Contents
AutoCode Reference vi ni.com
Linking Procedures with Real-Time Applications or Simulator.................... 2-22
Invoking Generated Procedures Directly..........................................2-22
Invoking Procedures Using Generated UCB Wrapper Function......2-24
Invoking Procedures Using Generated Subsystem Function ...........2-25
C Fixed-Point Arithmetic..............................................................................................2-26
Fixed-Point AutoCode/C Implementation...................................................... 2-26
Generated Code with Fixed-Point Variables.................................................. 2-28
Fixed-Point Data Types..................................................................................2-28
User Types......................................................................................................2-30
Overflow Protection........................................................................................2-31
Stand-Alone Files............................................................................................2-31
Macro Interface...............................................................................................2-32
Function Interface...........................................................................................2-33
Fixed-Point Conversion and Arithmetic Macros............................................ 2-35
Conversion Macros...........................................................................2-35
Arithmetic Macros............................................................................2-38
Implementation of the Addition and Subtraction Macros................ 2-40
Selecting Wordsize Extension in the Preprocessor Macro............... 2-42
32-Bit Multiplication and Division Macros......................................2-42
32-Bit Multiplication........................................................................2-42
32-Bit Division.................................................................................2-43
16-Bit by 8-Bit Division...................................................................2-43
32-Bit by 16-Bit Division.................................................................2-43
Fixed-Point Relational Macros....................................................................... 2-44
Some Relevant Issues......................................................................................2-45
Chapter 3Ada Language Reference
Stand-Alone Simulation................................................................................................3-1
Supported Ada Compilers for the Stand-Alone Library................................. 3-1
Supplied Templates.......................................................................................................3-2
ada_rt.tpl Template.........................................................................................3-2
ada_sim.tpl Template......................................................................................3-2
ada_fxpt_sys.tpl Template..............................................................................3-2
ada_fxpt_sub.tpl Template..............................................................................3-2
Stand-Alone Library......................................................................................................3-3
System-Specific Files......................................................................................3-3
Data Types........................................................................................3-5
Target-Specific Utilities.................................................................................. 3-6
Enable( ), Disable( ), and Background( ) Procedures.......................3-7
Error Procedure() Procedure ............................................................3-7
Implementation_Initialize() Procedure ............................................3-8
Implementation_Terminate( ) Procedure..........................................3-10