AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 10

no-image

AN2108

Manufacturer Part Number
AN2108
Description
AN2108 Programming the DSP56307/DSP56311 EFCOP in C Using Taskings Tool Suite
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
3.2 FDM and FCM Source Code Declaration
3.3 EFCOP Register Access in TASKING C
10
TASKING Tool Suite
The FDM and FCM must be declared as arrays in the C source code with two specific names, FDM_buffer
and FCM_buffer, respectively. These names coincide with the section name declarations in the
Efcopdma.dsc
format of the DSP56300 family architecture and be placed in X and Y memory, respectively. To
achieve this match, use the _fract data type specifier and the _X and _Y memory specifiers.
Finally, the FDM and FCM must be modulo buffers and therefore the compiler must place the
two arrays,
specifiers. The overall declaration is represented as follows:
The correct memory mapping of the EFCOP array definition (that is, FDM_buffer and FCM_buffer) is the
result of the combination of the array definition explained here and the configuration specified in
Efcopdma.dsc
Efcopdma.dsc description file. If the described procedure is followed, the EFCOP arrays declared are
placed in shared (EFCOP/core) memory (that is, X:$0 .. X:$FFF and Y:$0 .. Y:$FFF). All arrays and
variables declared with any other names are placed in shared DMA/core memory (namely, X:$1000... and
Y:$1000...) unless the description file is modified to specify different section location addresses.
To facilitate reading and writing the EFCOP registers in C, TASKING provides a header file for the
DSP56307 processor (
peripherals. Each declaration is based on the combination of unions and structures of bit fields that allow
access to a complete register or to individual bits within a register. These unions have two members:
For instance, the union for the EFCOP Filter ALU Control Register (FACR) is:
I, a 24-bit integer.
B, a group of bit fields totalling 24 or 16 bits.
typedef union /* EFCOP ALU Control Register */
{
FDM_buffer and FCM_buffer, at modulo N addresses; this is achieved using the _circ
. The EDE automatically generates these section names, which are expected by the
description file. Also, the FDM and FCM buffers must match the fractional data
struct
{
_fract _X _circ FDM_buffer [FIR_FILTER_LENGTH] ;
_fract _Y _circ FCM_buffer [FIR_FILTER_LENGTH] ;
Programming the DSP56307/DSP56311 EFCOP in C
reg56307.h
Freescale Semiconductor, Inc.
For More Information On This Product,
unsigned
unsigned
int
int
int
int
) that defines a memory map of all the DSP registers, including
Go to: www.freescale.com
FSCL
FRM
FSM
FSA
FISL
: 2; /* 0: Filter Scaling */
: 2; /* 2: Filter Rounding Mode */
: 1; /* 4: Filter Saturation Mode*/
: 1; /* 5: Filter 16-bit Arithmetic
: 1; /* 6: Filter Input Scale */
:17; /* 7: Reserved */
Mode */

Related parts for AN2108