Microchip PIC32AK6416GC41064 handleiding
Handleiding
Je bekijkt pagina 4 van 76

DSP Library for PIC32A MCU
User Guide
© 2025 Microchip Technology Inc. and its subsidiaries
DS70005605A - 4
1.2.3. DSP Library Funcon Calling Convenon
All the object modules within the DSP Library are compliant with the C compatibility guidelines for
the PIC32A devices. The guidelines follow the function call conventions documented in the Function
call convention section of “MPLAB
®
XC32 C Compiler User’s Guide for PIC32A MCU”, DS50003831.
1.2.4. Data Types
The operations provided by the DSP Library have been designed to take advantage of the DSP
instruction set and architectural features of the PIC32A devices. Therefore, most operations are
computed using 1.31 xed-point arithmetic.
The DSP Library denes a fractional type from an integer type:
#ifndef fractional
typedef int fractional;
#endif
The 1.31 xed-point data are represented with one sign bit and 31 fractional bits, which is
commonly known as the 1.31 xed-point format. The results of functions which use the multiplier
are computed using the 72-bit accumulator with 9.63 arithmetic. This format comprises nine sign/
magnitude bits and 63 fractional bits, providing space for extra computation beyond the range of
-1.00 to approximately +1.00 oered by the 1.31 format. When these functions return a result, they
revert to a fractional data type in the 1.31 format.
The use of fractional arithmetic has some constraints on the allowable set of values to be input to
a particular function. However, several functions perform implicit scaling to the input data and/or
output results, which may decrease the resolution of the output values (when compared to a
oating-point implementation).
A subset of operations in the DSP Library, which requires a higher degree of numerical resolution,
does operate in oating-point arithmetic. Nevertheless, the results of these operations are
transformed into fractional values for integration with the application. The only exception to this
is the MatrixInvert function which computes the inversion of a oating-point matrix in oating-point
arithmetic and provides the results in a oating-point format.
1.2.5. Data Memory Usage
The DSP Library performs no allocation of RAM and leaves this task to the users. If the users do
not allocate and align the data memory properly, undesired results will occur during the function
execution. In addition, to minimize execution time, the DSP Library will do no checking on the
provided function arguments (including pointers to data memory) to determine if they are valid.
Most functions accept data pointers as function arguments, which contain the data to be operated
on and, typically, the location to store the result. For convenience, most functions in the DSP Library
expect their input arguments to be allocated in the default RAM memory space (X-Data or Y-Data)
and the output to be stored back into the default RAM memory space. However, the computational
intensive functions require that some operands reside in X-Data and Y-Data, so the operation can
take advantage of the dual data fetch capability of the PIC32A architecture.
However, the architecture does not mandate that specic operands be located in either the X or
Y-data space. For a few computationally intensive functions, placing them in the same data space
(whether X or Y) will result in sequential operand access, therefore, aecting data fetch eciency.
1.2.6. CORCON Register Usage
Many functions of the DSP Library place the device into a special operating mode by modifying the
CORCON register. On the entry of these functions, the CORCON register is pushed to the stack. It is
then modied to correctly perform the desired operation, and lastly, the CORCON register is popped
Bekijk gratis de handleiding van Microchip PIC32AK6416GC41064, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.
Productinformatie
Merk | Microchip |
Model | PIC32AK6416GC41064 |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 11302 MB |