Digital Signal Processing Reference
In-Depth Information
FIGURE 3.20.
CCS windows for the sum of products in the project
dotp4a
.
wait B wait ;wait here
Verify that the resulting sum of products is A4
=
0x28
=
40. Note that A0
contains the result address (
result_addr
). Select View
Core
Registers and verify this address (in hex). Figure 3.20 shows a CCS display of this
project. Note from the disassembly file that execution was halted at the infinite wait
loop.
Æ
Registers
Æ
Example 3.7: Dot Product Using C Function Calling a Linear Assembly
Function (
dotp4clasm
)
Figure 3.21 shows a listing of the C source program
dotp4clasm.c
, which calls
the linear assembly function
dotp4clasmfunc.sa
, shown in Figure 3.22. Example
1.3 introduced the dot product implementation using C code only. The previous five
examples introduced the syntax of assembly-coded programs.
The section of code invoked by the linear assembler optimizer starts and ends
with the linear assembler directives,
.cproc
and
.
endproc
, respectively. The name
of the linear assembly function called is preceded by an underscore since the calling
function is in C. The directive
.def
defines the function.
Search WWH ::
Custom Search