Chapter 2 Getting Started with the NI-DSP Interface Utilities
NI-DSP SRM for LabVIEW for Windows 2-7 Part 4: NI-DSP Interface Utilities
5. Run the Build Dispatch Application to Generate an Assembly Dispatch File
The next step is to generate an assembly dispatch file. In the current directory, run dispatch.exe. You can find
the executable file under the dispatch directory. The Dispatch application automatically generates the WE
DSP32C assembly code file dispatch.s and a header file dspfncs.h in your current directory.
The dspfncs.h file has define statements assigning function codes for all the functions in the library. Each
function code is used by the LabVIEW interface when calling the DSP Library. The onboard Kernel uses these
function codes (passed to it by the interface code) to execute the proper functions. Look at the file dspfncs.h to
see the resulting function IDs assigned to your custom functions. The function codes for DSP_GMaxMin is 448.
Remember this code. You will use the code later to build your LabVIEW interface VI. Figure 2-4 shows a section
of dspfncs.h corresponding to the section given from NIDSP.fnc. Notice that in this example, Signals was
the seventh group (Group 6) listed in NIDSP.fnc and hence the function IDs.
/** Signals
**/
#define DSP_Sine_NUM 384
#define DSP_Square_NUM 385
#define DSP_Sinc_NUM 386
:
:
:
:
Figure 2-4. Signals Group Section in dspfncs.h
The file dispatch.s is an assembly file that the Kernel uses to execute the proper function. This file has
information about the number of groups and the number of functions per group that are linked into the software that
resides on the board. The Dispatch application uses the files NIDSP.fnc and NIESSEN.fnc to create
dispatch.s. Figure 2-5 shows a section of dispatch.s corresponding to the section given from
NIDSP.fnc. Notice that in this example, Signals was the seventh group (Group 6) listed in NIDSP.fnc.
Group zero is the group of Essential Functions.
/*
*
Signals
**/
call DSP_Sine(r18)
nop
goto FNC_CALL_END
nop
call DSP_Square(r18)
nop
goto FNC_CALL_END
nop
call DSP_Sinc(r18)
nop
goto FNC_CALL_END
nop:
:
:
:
Figure 2-5. Signals Group Section in dispatch.s