# Managing board DSP resources

This topic describes:

- Setting up a single resource pool

- Setting up multiple resource pools

- Using multiple resource pools

The CG 6060 board provides a flexible resource management scheme to allow you to reserve DSP resources at board boot time to ensure deterministic behavior under load. Resources are reserved in one or more pools. Each pool contains a number of DSPs loaded with a set of identical functions, and a number of logical DSP ports running on those DSPs. Each port within a pool is capable of running any of the loaded functions.

You must choose between using a single resource pool or multiple resource pools. Choose multiple resource pools under the following conditions:

- You have two sets of very different functions running on the board (for example, VoIP functions and IVR play/record functions) and you cannot achieve the required port density with a single pool.

- Because of switch blocking limitations, you need to place certain ports on certain physical DSPs.

Refer to DSP resource management keywords for more information.

## Setting up a single resource pool

In many cases, a single resource pool is all that is required. With a single pool, all ports on the board have the same capability, and each port uses a physical DSP core chosen by the board. The following example is a board keyword file that uses the resource management keywords in a single pool:

Resource[0].Name = RSC1
Resource[0].Size = 120
Resource[0].TCPs = nocc
Resource[0].Definitions = ( dtmf.det_all & echo.ln20_apt25 &\
ptf.det_2f & tone.gen & \
callp.gnc & ptf.det_4f & \
((voice.rec_32 & (voice.play_32_100 | voice.play_32_150 | \
voice.play_32_200)) | \
(gsm_ms.frgsm_rec & gsm_ms.frgsm_play) | \
g726.rec_32 | g726.play_32) )

Other than setting up these keywords, there is nothing special an application needs to use a single pool. All ports are taken from this pool, and their physical DSPs are chosen automatically.

## Setting up multiple resource pools

If you need to configure multiple resource pools, define the pools in the board keyword file and take steps at the application level to use those pools.

The following code sample shows a board keyword file that uses multiple resource pools. The first pool (POOL_A) specifies 120 ports (starting at timeslot 0) of the GSM vocoder and MF signaling, and places this pool on the 15 lowest numbered DSPs. The second pool (POOL_B) specifies 120 ports (starting at timeslot 120) of the G.726 vocoder and MF signaling, and places this pool on the 15 higher numbered DSPs.

Resource[0].Name = POOL_A
Resource[0].Size = 120
Resource[0].StartTimeSlot = 0
Resource[0].TCPs = nocc mfc0
Resource[0].DSPs = 2 4 5 6 8 9 10 11 12 13 14 15 16 17
Resource[0].Definitions = ( dtmf.det_all & echo.ln20_apt25 \
& ptf.det_2f & tone.gen & \
(gsm_ms.frgsm_rec & gsm_ms.frgsm_play))
Resource[1].Name = POOL_B
Resource[1].Size = 120
Resource[1].StartTimeSlot = 120
Resource[1].TCPs = mfc0 nocc
Resource[1].DSPs = 3 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Resource[1].Definitions = ( dtmf.det_all & echo.ln20_apt25 \
& ptf.det_2f & tone.gen & \
((voice.rec_32 & (voice.play_32_100 | \
voice.play_32_150 | voice.play_32_200)) | \
g726.rec_32 | g726.play_32) )

The Resource[x].StartTimeSlot keyword associates each of the pools with a set of logical timeslots that can be used by Natural Access. The pool is assigned to Resource[x].Size number of timeslots, starting with timeslot Resource[x].StartTimeSlot. Logical timeslots associated with a particular pool must be consecutive, and the timeslot ranges for each pool must not overlap.

## Using multiple resource pools

Since resource pools are bound to sets of logical timeslots, the pools can be chosen when opening a Natural Access port with the ctaOpenServices function. It is the application's responsibility to manage logical timeslot usage. The logical timeslot is specified in the CTA_MVIP_ADDR structure inside the CTA_SERVICE_DESC passed into ctaOpenServices. The ADI service must be one of the services opened.

DSP resources are obtained from the resource pool associated with a timeslot when the application calls ctaOpenServices to open a port.