# Customizing AG 2000 board functions

Complete the following steps to configure the AG 2000 boards in a system to use functions that are not in the default configuration:

Step | Action
1 | List all of the functions that you want to make available to your application in the connected call state for the ports on a given AG board.
2 | Determine which DSP files are required for the functions specified.
3 | Add an entry to the DSP.C5x[x].Files[y] keyword for each new DSP file that is required. The syntax for the statement is: DSP.C5x[x].Files = filename.m54 For example, to configure echo cancellation, specify the following DSP file: DSP.C5x[x].Files = echo.m54 where x = DSP file number.
4 | Check MIPS usage. Take the worst-case MIPS usage for each port on a board. Add up the total MIPS usage for all ports. This value must not exceed the available MIPS for any board in the system. If it does, reduce the number of ports used on that board by the application accordingly.
5 | Check the list of configuration restrictions.
6 | Initialize the boards by running oamsys.

This topic also includes:

- An example of configuring an AG 2000 board

- Data input and output queue constraints

## Example of configuring an AG 2000 board

This example describes how to configure a standard AG 2000 board to play and record OKI 6 kHz speech instead of NMS speech without using echo cancellation:

Step | Action
1 | List all functions used in the connected state: DTMF detector Cleardown detector Tone generator (for playing beeps) OKI play 6 kHz OKI record 6 kHz
2 | The required DSP files are: tone.m54 dtmf.m54 ptf.m54 oki.m54 signal.m54
3 | Calculate maximum MIPS usage per port and for the board. The MIPS requirements for the selected functions are: Bit detector = 0.44 MIPS DTMF detector = 1.94 MIPS Tone detector = 1.25 MIPS Tone generator = 0.75 MIPS OKI play 6kHz = 2.19 MIPS OKI record 6kHz = 2.25 MIPS Assume that the last three functions are mutually exclusive on each port. Only one of the three are active at any given time on a given port. Consequently, the per-port maximum MIPS usage is: 0.44 + 1.94 + 1.25 + 2.25 MIPS per port = 5.88 MIPS. The maximum board MIPS usage is: 8 ports * 5.88 MIPS per port = 47.04 MIPS. Since 90 MIPS are available, no restrictions apply.
4 | Edit the board keyword file to contain the following: DSP.C5x[x].Files = tone dtmf ptf oki signal This loads the files on all DSPs.
5 | Run oamsys with the edited board keyword file to load the DSP files.

## Data input and output queue constraints

Aside from MIPS requirements, the amount of DSP memory available per data input queue (DIQ) and data output queue (DOQ) per DSP can impose additional constraints on AG board resources. For example, each WAVE 11k 16-bit DPF (wave.m54) requires 112 words of input queue memory and 4 words of output queue memory to perform play functions. Since AG board DSPs provide a total of 703 words of data output queue memory per DSP, the boards can run a maximum of six instances (703/112) of the WAVE 11k 16-bit play function per DSP.

The following table shows DIQ and DOQ memory requirements for DSP functions to which data input and output queue constraints apply:

DSP program | Function | DIQ words | DOQ words | Functions allowed per DSP
--- | --- | --- | --- | ---
Total Available |  | 703 | 703 | 63
WAVE 11k 16-bit | Play | 112 | 4 | 6
| Record | 0 | 112 | 6
WAVE 11k 8-bit | Play | 57 | 4 | 12
| Record | 0 | 57 | 12
WAVE 8k 16-bit | Play | 82 | 4 | 8
| Record | 0 | 82 | 8
A-law/mu-law | Play | 42 | 4 | 16
| Record | 0 | 42 | 16
OKI 6 KHz | Play | 17 | 4 | 41
| Record | 0 | 17 | 41
OKI 8 KHz | Play | 22 | 4 | 31
| Record | 0 | 22 | 31
IMA 6 KHz | Play | 20 | 4 | 35
| Record | 0 | 20 | 35
IMA 8 KHz | Play | 25 | 4 | 28
| Record | 0 | 25 | 28
GSM_ms | Play | 67 | 4 | 10
| Record | 0 | 67 | 10
NMS 24 kbit/s | Play | 33 | 4 | 21
| Record | 0 | 33 | 21
NMS 32 kbit/s | Play | 43 | 4 | 16
| Record | 0 | 43 | 16
NMS 64 kbit/s | Play | 83 | 4 | 8
| Record | 0 | 83 | 8