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 specific 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, affecting data fetch efficiency.