Copyright: Version 1.00


Features
 DSPmon – CallPilot DSP Monitor

Overview of  Features

♦	DSP Status display and Status Bar

♦	Real-time monitoring of messages passing between the DSP and the Host

♦	Capturing DSP / Host messages to a file

♦	Capturing DSP Debug Information to a file

♦	PCM Captureand PCM Loop-back

♦	Trouble Shooting


Configuring DSPmon

Select a DSP from the drop down list in the left part of the ‘Status’ notebook page.   If no DSPs are displayed in the drop down list, check to see if the NTBUS and C52 device drivers have been started.  This can be checked using the Devices applet in the Control Panel.

On the left side of the DSP Status page is a series of 3 boxes, which display version information about the selected DSP:

The top box displays the Flash Memory Version ID, which specifies the DSP software load that was programmed into the Flash Memory.

The middle box displays the Component Version IDs, which specify the identity and software release ID for each of the different compiled software units that was programmed into the DSP.

The bottom box displays the LCA Firmware Version ID. ÔLCAÕ stands for ÔLogic Cell ArrayÕ, (also known as Field Programmable Gate Array or FPGA), which is a type of programmable hardware device that is used in the DSP circuitry.

Once a DSP has been selected, the Flash Memory  Version ID should display a valid software release.  If this remains blank or does not show a valid software release (e.g. NG206b 17/01/97) then the flash memory needs to be updated.  Flash programming can be performed using the COFFUP utility.


The DSP Status Display
The DSP Task Status Display

The right half of the DSP Status page is used to display real-time status information for each of the channel tasks running on the selected DSP.

Each channel task has the following information displayed:

•	a bar graph representation of the percentage of DSP CPU that is being consumed by that task. This can be used to provide an indication of the type of functionality being performed by the channel task. For example, a channel task that is providing voice processing services will show 70-90% CPU usage when it is playing or recording voice, but substantially less than this when it is not playing or recording voice.

•	a description of the type of Signal Processing Component (SPC) that is being executed by the task. e.g. “SPC 11: Voice” will be displayed for a channel task that is providing voice processing services.

•	the maximum amount of CPU that the channel task has used while the DSPmonitor has been monitoring the selected DSP, and the amount of CPU that the channel task was assigned. These amounts are displayed in 1/100ths of a MIP, which are called “Centi-MIPS” for short. If the task has ever required more CPU than it was allocated, it increments a “Timeout Count”, which is displayed in place of the Maximum CPU reading if it is non-zero.

At the bottom of the status display is a summary display of the total amount of CPU consumed by all of the tasks, along with the percentage of the total DSP processing power that this represents.

Two “radio buttons” are provided for switching the channel task bar graph meters between displaying the CPU utilization as a percentage of the CPU that was allocated to that channel or as a percentage of the entire DSP’s CPU.

A Refresh button is provided for clearing the maximum CPU values from the status display. If there were any Timeouts that were recorded on the display, these will be reset to zero.


The Status Bar

A Status bar is provided across the bottom of the display area. This provides information about whichever DSP and task running on that DSP was selected by the user via the GUI controls. Information includes:

•	the DSP Number selected by the user

•	the state of the selected DSP (in Reset, Running)

•	the status of the task that was selected by the user (Idle, Running, Exception)

•	the function being performed by the task that was selected by the user (e.g. Exec, or the Signal Processing Component that the Middleware configured the Channel task to run).

•	the DSP Timeslot that the selected channel has been configured to use to send and receive PCM data between the DSP and the Timeswitch hardware.


The Capture DSP Debug Info Button

This button allows the user to copy useful DSP debugging information into 2 files. These files can then be sent back to the MAS DSP designers for use in diagnosing DSP problems that have occurred in the field.

After clicking the button, the user is asked to specify a name for the first file. The file is given an extension of .bin, and contains a copy of all of the DSP’s SRAM and DRAM memory contents. The second file is given the same name as the first file, but with an extension of .dsp. This is a text file which captures all of the information displayed on the DSP Status page of the DSPmonitor utility.


Message Monitoring

DSPmon allows message queues between DSP and host to be monitored. There are many queues implemented on the DSP shared memory and provide the space for Host-DSP API.

Among those queues are To Exec Message Queue, From Exec Message Queue, and To Host Event Queue. These queues provide an interface between the DSP operating system (Exec) and Host Processor.

The ability to observe the interaction between DSP Channel tasks and the Host is also provided by following queues To Channel Message Queue, From Channel Message Queue, To Channel Data Queue, and From Channel Data Queue. These structures are used to communicate with tasks once these channel tasks have been created and are running on the DSP. For detailed information of the above queues refer to [1].

All the queues are controlled and referenced using a set of queue pointers and queue format information in their respective register page. Register pages are common spaces in the shared memory and are used mutually by the Host and DSP. The DSP operating system (Exec) and every channel task have a dedicated register page residing at the beginning of the taskÕs shared memory area and are used to store the above information.

Exec’s register page is initialized at reset time, while the channel’s register pages are generated and initialized by the Exec when a channel is created. When a message is left in any of Host to DSP or DSP to Host queues, the sender of the message has to update related pointers in the relevant register page. DSP monitor always checks queue pointers for any new message, and displays those messages. This step is done through the DSP DLL.

The DSP Monitor makes many function calls to the DSP DLL in order to display messages transferring between Host and DSP. Messages from Host to DSP, their parameters, and interpretation of the messages are displayed on line. All the messages from Host to DSP are responded in the form of “ACKs” (Acknowledgments) or “NACKs” (Negative Acknowledgments). These “ACKs” and “NACKs” are displayed by the same token. If a message from Host to DSP is NACKed, DSP has to send a reason for NACK with the response. The monitor will display the message along with the reason for NACK.

Messages from DSP to Host are sent through the same queue as “ACKs” or “NACKs”. These messages are monitored and displayed with the same process as discussed above. In addition, there is an event queue, associated with the DSP Exec, for identifying the source of interrupts sent by any of the DSP tasks to the Host. Events are displayed simultaneously with messages as well.

Monitoring queues is a real time process. All the messages between Host and DSP are displayed as long as the DSP Monitor is running. The monitor can be terminated by the user at any time.

The pointers to a Channel task’s queues are not valid before the channel task is created by the Exec. In fact, the DSP operating system generates and initializes a register page for each created channel task and passes this information to the Host through DSP DLL function. Therefore, in order to monitor channel messages, a monitor window has to be opened after a channel task has been created. Exec messages can be monitored as soon as the DSP is taken out of reset and initialized.


Configuring the Message Monitor

Selecting a Task to Monitor

A Drop-down list in the upper left corner of the Msg Monitor page allows the user to select either the Exec Task or any of the possible Channel Tasks to monitor. This drop down list only becomes accessible once the user has selected a DSP from the DSP Status page – please select a DSP before trying to use the message monitor.

The Decode Messages Check Box

Check this CheckBox if you wish DSPmonitor to provide a brief English description of the meaning of the various messages sent between the DSP and the host. This box is checked by default.

The ‘Show Data Queue’ Check Box

Check this CheckBox if you wish to display messages from the DSP to the Host that are passed via the channel task’s Data Queue. These messages include DTMF detection messages as well as end of block messages for recording and playing back voice recordings and fax documents.

The ‘Get Old Messages’ Button

Clicking this button causes all of the messages that are currently in the DSP’s queues to be displayed, even if they have already been read. New messages will still be added to the message display as they arrive.

The ‘Clear Messages’ Button

Clicking this button clears the DSPmon message display areas. Note that it has no effect on the actual DSP memory area used to store the messages.

The ‘Log Msgs In File’ Button

Clicking this button causes all of the incoming messages for the selected task to be stored in a user-specified file.  In response to the button being clicked, a dialog box is displayed which allows the user to specify the name of the file that the messages are to be stored in, as well as the directory that the file is to be stored in.  While messages are being stored, the caption on the button changes to ‘Stop Msg Logging’.


The Message Monitoring Display

The left side of the Msg Monitor display shows the Host to DSP Msg Queue. The most recent messages are displayed at the top of this queue area and push previous messages that have been displayed down the list.

The amount of space that is used to display the Host to DSP messages can be adjusted by the user via a vertical “Splitter” bar that separates the Host to DSP half of the display from the DSP to Host half of the display. The exact location of this splitter bar can be determined by dragging the mouse cursor across the display with no mouse buttons depressed, and seeing where the cursor changes to 2 vertical bars with small arrows pointing to the left and the right of the two bars. Clicking and dragging while the cursor is displaying this symbol will move the splitter bar to the left or the right, following the mouse. This will either decrease or increase the amount of space used to display the Host to DSP messages and the DSP to Host messages.

If the “Show Data Queue” check box is checked, and a channel task has been selected, the right side of the Msg Monitor display will be split vertically in half, with the upper half used to display DSP to Host message queue messages, and the lower half used to display DSP to Host data queue messages. A horizontal spliter bar is provided to allow the user to adjust how much space each half of the right side of the display is allocated to either of these queues.

If either the “Show Data Queue” check box is not checked, or the user has selected an Exec Task (which does not provide Data Queues to the host0, then no Data Queue area will be displayed.


The Get Diag Results Button

This button allows the user to view an English description of the results of a DSP diagnostic failure for the selected DSP. If the DSP has passed the diagnostics, it will display a message indicating that the DSP is running.


PCM Capture

DSP Firmware loads labeled NG303_ and later include DSP software which can capture incoming PCM and save them to a file.   This capability is available on channel tasks that are running either Voice (SPC 11), Outdial (SPC 21) or Fax (SPC 31).

Enabling PCM capture:

- on the DSP Status page, select the DSP that you wish to monitor in the drop-down list box

- on the “PCM Capture and Loopback” page, select the task that is receiving the PCM data that you are interested in capturing

- to start capturing the PCM data, click on the round record button labeled ‘Rec’.   If the DSP S/W load does not support PCM capture, a message box will appear which says that the DSP is not able to support PCM capture.  If the task is not running, a message box will appear which says that the task must be running before recording can be started.

Stopping PCM capture:

- to stop capturing the PCM data, click on the square button labeled ‘Stop’

- PCM Capture is disabled automatically after 3 minutes.  It is also automatically disabled when either the DSP selection or task selection is changed, and when DSPmon exits.

- to save the captured PCM data, choose File / Save PCM Capture Waveform As from the menu at the top of DSPmon.  This will bring up a dialog box that allows you to specify where you would like to save the file.  The file contains the raw 8-bit u-Law or A-law PCM data received by the DSP channel prior to any processing by the DSP.  You can view the contents of the file with either WaveView (another CallPilot Support Tool) or with shareware packages such as CoolEdit.

Zooming in on Captured PCM Data:

In the display window in the bottom part of the PCM Capture and Loopback page, you can use the mouse to select a portion of the waveform (right click and drag with the mouse button down to select a region).  Right clicking the mouse brings up a pop-up menu that allows you to zoom in to the selected region or to zoom out to the full waveform.


PCM Loop-back

DSP Firmware loads labeled NG303_ and later include DSP software which can loop back incoming PCM samples.   PCM Loop-back is available on channel tasks that are running either Voice (SPC 11), Outdial (SPC 21) or Fax (SPC 31).

Configuring a channel task for “Loop back” causes the task to transmit the same PCM samples that it is receiving.  Channel tasks can be configured to perform PCM capture and PCM loop-back simultaneously if required.

Enabling PCM Loop-back:

- on the DSP Status page, select the DSP that you wish to monitor in the drop-down list box

- on the “PCM Capture and Loopback” page, select the task that you are interested in performing the loop-back on.

- to start the PCM loop-back, check the “Loop Back PCM data” check box.   If the DSP S/W load does not support PCM loopback, a message box will appear which says that the DSP is not able to support PCM loop-back.  If the task is not running, a message box will appear which says that the task must be running before the loop-back can be started.

Disabling PCM Loop-back:

- to stop the PCM loop-back, uncheck the “Loop Back PCM data” check box.

PCM Loop-back is disabled automatically when either the DSP selection or task selection is changed, and when DSPmon exits.

Caution!

The channel task does not do any processing other than looping back PCM samples while PCM Loop-back is enabled, which may result in Middleware timing out waiting for the DSP task to reply to channel task audits.  If this occurs, the channel task may be restarted, which will cause the loopback to be taken down.


Trouble Shooting

DSPmon does not display any DSPs in the DSP Selection drop down box

- Verify that there are DSPs installed in the system.  For example, TRP systems require an MBP-16M board to be installed.

- Make sure that both the ntbus and c52 device drivers are running.

•	You can check this by running winmsd from a DOS box, selecting the services page and clicking the Devices button.

•	To start the ntbus device driver, type ‘net start ntbus’ at the DOS prompt.

•	To start the c52 device driver, type ‘net start c52’ at the DOS prompt.

•	You should always start ntbus before starting c52.  If you still have problems, reboot the machine and start again.

- Make sure that you have the file hwt.dll in either the same directory as DSPmon or in the search path specified for the system (set via the System icon in the Windows NT Settings | Control Panel).