VOLIB: VOLIB Package

  • Main Page
  • Files
  • Related Pages

VOLIB Package

Release 1.0.1.2

Page Contents

  1. Description
  2. Getting Started
  3. System Requirements
  4. VOLIB Components
  5. Integration
  6. Component Unit Test Examples
  7. Individual Component Documentation

Description

The Voice Library (VOLIB) provides components that allow a development team to reduce time-to-market by providing the major building blocks of a voice processing system. VOLIB comprises a collection of stand-alone voice processing packages that together can fulfill most voice channel processing requirements. The library contains reliable field-hardened voice processing building blocks. These blocks may be quickly linked with relative ease in order to suit the needs of most voice processing systems.

Each package comprises one or more Embedded Communication Object (ECO) components. An ECO is a collection of portable ANSI-C functions and data structures encapsulated in a strict object oriented manner to facilitate instantiation of multiple independent object instances. Each ECO has, at it's heart, an algorithm that has been optimized to operate efficiently in a real-time embedded communications environment.

VoLIB includes components that, at a minimum, perform:

  • Line echo cancellation
  • Single and multi-tone detection
  • Voice activity detection
  • Noise generation
  • Packet loss concealment
  • Caller ID generation and detection
  • High level compensation
  • Signal and noise level estimation
  • Voice quality enhancement

Figure 2 below provides a sample usage case for the components in VOLIB. Specifics regarding component use, integration, performance, etc. are provided below in Individual Component Documentation.

Figure 2. Typical Voice Application Block Diagram

Getting Started

Unless otherwise specified, the VOLIB package installs to the C:\Program Files\Texas Instruments directory. The package directory will follow the naming convention volib_<target>_<version> where <target> will be either C55 or C64P and the version string will be a four number string with underscore delimiters (e.g., 1_0_0_0). The directory structure of the installed package will look similar to that displayed below in Figure 1, though the release notes will be named to match the version and DSP core (target) of the particular installation.

Figure 1. VoLIB Directory Structure

Directory Structure

The VOLIB installation can be categorized as containing five file categories:

  1. Documentation
  2. Repository
  3. Component Directories
  4. Eclipse Plug-in
  5. Packaging

Documentation

The VOLIB delivery comes with the following documentation:

  • volib_<target>_<version>_release_notes.html
  • docs\VOLIB_Users_Manual.chm
  • docs\VOLIB_Users_Manual.html
  • docs\VOLIB_Software_Manifest.html
  • Software_License_Agreement.pdf

Note:
Files and paths are relative to the VOLIB root directory

Repository

The installation creates a directory named components in the VOLIB root folder. This directory serves as a repository for all RTSC packages included in the VOLIB installation. Each package in this repository is compressed.

Component Directories

The installation creates a directory named packages in the VOLIB root folder. This directory contains all component and dependent packages. This directory is created during the installation by expanding all of the compressed packages in the components directory. Individual component packages are in the packages\ti\mas directory (again, relative to the VOLIB root). The contents of each component directory are explained in VOLIB Components below.

Eclipse Directory

The eclipse directory contains all files required for VOLIB to be recognized by Eclipse (CCS Version 4) as a plug-in.

Packaging

VOLIB installs as a Real-Time Software Components (RTSC) package. As such, the installation comes with the required RTSC files and directories. These files are generally not of interest unless the library itself is being re-packaged for delivery as a part of a larger RTSC package. These files are (see Figure 1 above):

  • Version.h
  • Version.xdc
  • package.xdc
  • package (directory)

Component Unit Test Examples

Each component is delivered with a unit test code project prepared for load and execution in CCS. Though the code examples exhibit subtle variations in structure, each generally offers the ability to:

  1. Step through and understand the component lifecycle
  2. Tailor specific component configurations
  3. Change input and observe changes in execution

Each component provides specific instructions to get its associated test code example up and running in CCS. Follow the links below to get started with any of the components that comprise VOLIB.

  • ECU Simulation Users Manual
  • CID Simulation Users Manual
  • NMU Simulation Users Manual
  • PLC Simulation Users Manual
  • TDU Simulation Users Manual
  • VAU Simulation Users Manual
  • VPE Simulation Users Manual
  • VEU Simulation Users Manual

System Requirements

While VOLIB fulfills most all the algorithmically challenging needs of a voice/speech processing system, it is not a solution in itself. VoLIB provides components/modules that allow a development team to produce a high quality voice solution with minimal effort and resources. It does not however, provide the system-level processing that passes speech samples (framed or sample-by-sample) through each component as required for a specific solution. This would unnecessarily constrain the developer to a pre-defined system architecture. Rather, any RX or TX processing chains are defined by the developer by providing the "glue" to suitably order component processing.

VOLIB does not provide system routines to gather speech samples (framed or sample-by-sample) from any TDM or packet interface. These are the responsibility of the developer. Figure 1 above illustrates this via greyed sections and blocks on either end of an example speech path.

VOLIB Components

As VOLIB is a collection of individual components, we should clarify the what components comprise the VOLIB library and define the term component.

List

The following table provides a cross reference of the components that comprise the VOLIB delivery for each library.

VOLIB Component Cross Reference
Component | C55x Library | C64x+ Library
Caller ID (CID) | X | X
Echo Canceller Unit (ECU) | X | X
Noise Matching Unit (NMU) | X | X
Packet Loss Concealment (PLC) | X | X
Tone Detection Unit (TDU) | X | X
Voice Activity Detection Unit (VAU) | X | X
Voice Enhancement Unit (VEU) |  | X
Voice Processing Elements (VPE) | X | X

Packaging

All components are delivered as "zipped" packages in the packages directory. All packages follow a common naming convention that defines the contents:

        ti_mas_<COMP>_<FMT>_<TARG>_<VER>.zip

Where:

  • <COMP> represents the component name
  • <FMT> represents the delivery format
    • obj for object code delivery
    • src for source code delivery
  • <TARG> represents the target processor as specified in Target Processor String Reference
  • <VER> represents the version as specified in Package Version String Reference

When extracted, each package in VOLIB will expand to a similar directory structure. The path will be:

          <WORK>/ti/mas/<COMP>/

Where:

  • <COMP> represents the component name in lowercase (e.g., tdu)
  • <WORK> represents the working directory to which the package was extracted.

Each component root directory will have, at the very least, the following directories and files:

  1. A docs sub\-directory for all documentation
  2. A c<TARG> sub\-directory for the component libraries as specified in Target Processor Library/Directory Reference
  3. Release notes in HTML format
  4. A makefile for building the code using GNU make
  5. One or more API header files for the component modules

Component Modules

As stated above, VOLIB is a collection of individual components that each perform different voice processing algorithms. In this context, a component in general is a collection of modules that are algorithmically related. In many cases a component contains a single module that performs a specific algorithmic task. For example, the Packet Loss Concealment (PLC) component contains a single PLC module to accomplish its purpose. The Voice Processing Elements (VPE) component, on the other hand, contains several modules (SVD, SNL, etc.) that all perform simple voice processing tasks.

Each module that comprise a particular component has its own header file in the root directory of the component. This header file defines the modules API and all #defines, structures and enumerations required to interact with the API.

For example, the root directory for the Tone Detection Unit (TDU) is:

          /ti/mas/tdu/

Since the TDU has a single TDU module, the API for the TDU is defined by the header file:

          /ti/mas/tdu/tdu.h

The VPE component contains the HLC, SNL, SVD and SLM modules. The API for these modules are defined by the four header files:

          /ti/mas/vpe/hlc.h
          /ti/mas/vpe/snl.h
          /ti/mas/vpe/svd.h
          /ti/mas/vpe/slm.h

Component Modules

Each component in VOLIB has been pre\-compiled for a particular Texas Instruments processing core. The compilation produces, in most cases, three libraries:

  1. <COMP>_c.a<TARG>: C code routines library
  2. <COMP>_a.a<TARG>: Assembly code routines library
  3. <COMP>_cm.a<TARG>: C\-model of assembly routines library

Notes:
  1. <COMP> represents the component name in lowercase (e.g., tdu)
  2. <TARG> represents the target processor for which the code was compiled as specified in Target Processor Library/Directory Reference
  3. Only two libraries are required to link: The C library and the assembly library. The C\-model library is available for debugging and development purposes only.
  4. A component may have no need for assembly routines and, as such, will provide a single C library.
  5. A few components provide wideband (16 KHz) libraries as well as the default (8 KHz) libraries. These can be identified by the number "16" concatenated to the component name (e.g., ecu16)

Integration

Since VOLIB is a collection of individual components, any combination of the components that comprise VOLIB may be integrated into a system individually. Integration, for one or all components, is accomplished in four stages:

  1. Compile the VOLIB components (optional)
  2. Add API calls to system code
  3. Compile the system code
  4. Link with VOLIB libraries

Step #1:
All component object and source delivery packages include the libraries built and ready for link. Therefore, this step is only required for those components that have been both:

  1. Provided as a source code build
  2. Experienced changes to the source code

This ensures that the library is up-to-date and reflects the latest code chages.

Step #2:
The external API and call setup flow are provided with each component package as part of its internal documentation. See Individual Component Documentation below to reference this documentation for each VOLIB component.

Step #3:
The path to the component module header files must be provided to the compiler for those components whose API has been referenced in the system source code. The suggested process for this is provided below:

  1. Extract all component packages to a common working directory
  2. Provide this working directory to the compiler with a -I directive
  3. Reference all header files using their full path (i.e., #include <ti/mas/tdu/tdu.h>)

Step #4:
The link process requires that the libraries of the respective components be available to the linker. The path to the component libraries must be provided to the linker for those components whose API has been referenced in the system source code via the -l directive.

This may be handled on a per component basis.

Individual Component Documentation

Caller ID Package

Documentation: | CID Component Users Manual CID Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Echo Canceller Unit

Documentation: | ECU Component Users Manual ECU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Noise Matching Unit Package

Documentation: | NMU Component Users Manual NMU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Packet Loss Concealment Package

Documentation: | PLC Component Users Manual PLC Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Tone Detection Unit

Documentation: | TDU Component Users Manual TDU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Voice Activity Detection Unit Package

Documentation: | VAU Component Users Manual VAU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Voice Enhancement Unit Package

Documentation: | VEU Component Users Manual VEU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Voice Processing Elements Package

Documentation: | VPE Component Users Manual VPE Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements
Copyright 2011, Texas Instruments Incorporated


VOLIB: Target Processor String Reference

VOLIB Package

Target Processor String Reference

Processor String Reference
Processor | Endian | String
C55x DSP | N/A | c55l
C64x DSP | Little | c64le
C64x DSP | Big | c64be
C64x+ DSP | Little | c64Ple
C64x+ DSP | Big | c64Pbe


VOLIB: Package Version String Reference

VOLIB Package

Package Version String Reference

The version string used in package naming is composed of 4 underscore-delimited numbers followed by a release qualifier. Accordingly, the version string - represented by the letters M, m, p, b and qualifier Q have the format M_m_p_b[Q] (where [Q] indicates that this field is optional). The tables below provides a descriptive reference regarding the meaning of each package version string.

Package Version String Reference
Value | Meaning | Description
M | Major revision | Incremented when the new version is substantially different from the previous For example, a new module added or an existing module's algorithm significantly altered.
m | Minor revision | Incremented when the new version has changed but not in a major way. For example, some minor changes in the API or feature set.
p | Patch number | Incremented for all other source code changes. This include any packaging support code.
b | Build number | Incremented for each release delivery to CM. Reset for any change to M, m or p
Q | Release Qualifier | alpha: Substantial features included, but not fully tested beta: All features included, but not fully tested (empty): When the qualifier string is empty (not provided), the release has been fully tested and is an official release.


VOLIB: Target Processor Library/Directory Reference

VOLIB Package

Target Processor Library/Directory Reference

Processor Library/Directory Reference
Processor | Endian | Extension
C55x DSP | N/A | 55L
C64x DSP | Little | 64
C64x DSP | Big | 64e
C64x+ DSP | Little | 64P
C64x+ DSP | Big | 64Pe


VOLIB: File Index

VOLIB File List

Here is a list of all files with brief descriptions:
doxygen.h [code]


VOLIB: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


VOLIB: Page Index

VOLIB Related Pages

Here is a list of all related documentation pages:
  • Disclaimer


VOLIB:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VOLIB: doxygen.h Source File

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is the header file which doxygen parses to generate the main
00003  * documentation page
00004  *
00005  */
00006


VOLIB: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


CID: Version.h File Reference

  • Modules
  • Data Structures
  • Files
  • Related Pages
  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_cid_Version__top__
#define | __extern extern
#define | ti_mas_cid_Version___VERS 150
#define | ti_mas_cid_Version_MAJOR (2)
#define | ti_mas_cid_Version_MINOR (1)
#define | ti_mas_cid_Version_XVERTICAL (0)
#define | ti_mas_cid_Version_PATCH (1)
#define | ti_mas_cid_Version_BUILD (0)
#define | ti_mas_cid_Version_QUALITY (3)
#define | ti_mas_cid_Version_BTYPE (0)
#define | ti_mas_cid_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_cid_Version_MAJOR
#define | Version_MINOR ti_mas_cid_Version_MINOR
#define | Version_XVERTICAL ti_mas_cid_Version_XVERTICAL
#define | Version_PATCH ti_mas_cid_Version_PATCH
#define | Version_BUILD ti_mas_cid_Version_BUILD
#define | Version_QUALITY ti_mas_cid_Version_QUALITY
#define | Version_BTYPE ti_mas_cid_Version_BTYPE
#define | Version_WIDTH ti_mas_cid_Version_WIDTH

Define Documentation

#define ti_mas_cid_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_cid_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_cid_Version_MAJOR (2)

Definition at line 50 of file Version.h.

#define ti_mas_cid_Version_MINOR (1)

Definition at line 53 of file Version.h.

#define ti_mas_cid_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_cid_Version_PATCH (1)

Definition at line 59 of file Version.h.

#define ti_mas_cid_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_cid_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_cid_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_cid_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_cid_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_cid_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_cid_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_cid_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_cid_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_cid_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_cid_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_cid_Version_WIDTH

Definition at line 97 of file Version.h.


CID: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_cid_Version__include
00023 #define ti_mas_cid_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_cid_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_cid_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_cid_Version_MAJOR (2)
00051
00052 /* MINOR */
00053 #define ti_mas_cid_Version_MINOR (1)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_cid_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_cid_Version_PATCH (1)
00060
00061 /* BUILD */
00062 #define ti_mas_cid_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_cid_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_cid_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_cid_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_cid_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_cid_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_cid_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_cid_Version_MAJOR
00091 #define Version_MINOR      ti_mas_cid_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_cid_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_cid_Version_PATCH
00094 #define Version_BUILD      ti_mas_cid_Version_BUILD
00095 #define Version_QUALITY    ti_mas_cid_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_cid_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_cid_Version_WIDTH
00098 #endif


CID: Data Structures

  • Data Structures
  • Data Fields

CID Data Structures

Here are the data structures with brief descriptions:
cidBindConfig_t | Configuration structure passed to cidBind()
cidBindStandard_t | Standard related information in cidBindConfig_t structure
cidCreateConfig_t | Configuration structure passed to cidCreate()
cidCtlMsg_t Control message structure. Defines the message specific content fields for each
of the control messages passed to cidControl(). The value stored in the ctlCode field
determines which fields in the cidCtlMsg_t structure are to be set.
  • If a generator related control code is being passed, the fields in the gnrt structure are set.
  • If a detector related control code is being passed, the fields in the dtct structure are set.
  • If the cid_CTL_MULTI_RQST control code is being passed, the fields in the mgnrt structure are set
cidNewConfig_t | Configuration structure passed to cidNew()
cidOpenConfig_t | CID Open configuration structure. Contains parameters needed to open a CID instance


CID: cid.h File Reference

  • File List
  • Globals

cid.h File Reference

Detailed Description

external definitions and API's for the Caller ID module.

Copyright (c) Texas Instruments Incorporated 2002-2007

Use of this software is controlled by the terms and conditions found in the license agreement under which this software has been supplied or provided.

Definition in file cid.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for cid.h:

Go to the source code of this file.

Data Structures

struct | cidNewConfig_t
Configuration structure passed to cidNew(). More...
struct | cidCtlMsg_t
Control message structure. Defines the message specific content fields for each
of the control messages passed to cidControl(). The value stored in the ctlCode field
determines which fields in the cidCtlMsg_t structure are to be set.
  • If a generator related control code is being passed, the fields in the gnrt structure are set.
  • If a detector related control code is being passed, the fields in the dtct structure are set.
  • If the cid_CTL_MULTI_RQST control code is being passed, the fields in the mgnrt structure are set.
More...
struct | cidCreateConfig_t
Configuration structure passed to cidCreate(). More...
struct | cidBindStandard_t
Standard related information in cidBindConfig_t structure. More...
struct | cidBindConfig_t
Configuration structure passed to cidBind(). More...
struct | cidOpenConfig_t
CID Open configuration structure. Contains parameters needed to open a CID instance. More...

Defines

#define | cid_MAXNUM_STANDARDS 6
#define | cid_STD_US 0
#define | cid_STD_NTT 1
#define | cid_STD_ETSI 2
#define | cid_STD_YDN 3
#define | cid_STD_BT 4
#define | cid_STD_AUS 5
#define | cid_STD_UNDEFINED 0xffff
#define | cid_US_SDMF_MSGTYPE 0x04
#define | cid_US_MDMF_MSGTYPE 0x80
#define | cid_US_MWI_MSGTYPE 0x82
#define | cid_NTT_BYTE_SERVICE 0x40
#define | cid_NTT_RCCM_SERVICE 0x41
#define | cid_NTT_BYTE_SERVICE_CW 0x141
#define | cid_ETSI_CS_MSGTYPE 0x80
#define | cid_ETSI_MWI_MSGTYPE 0x82
#define | cid_ETSI_AOC_MSGTYPE 0x86
#define | cid_ETSI_SMS_MSGTYPE 0x89
#define | cid_ETSI_NOUMIN_MSGTYPE 0xf1
#define | cid_ETSI_NOUMAX_MSGTYPE 0xff
#define | cid_CTL_GNRT_US (2*cid_STD_US+1)
CID Control Codes used by cidControl().
#define | cid_CTL_DTCT_US (cid_CTL_GNRT_US+1)
#define | cid_CTL_GNRT_NTT (2*cid_STD_NTT+1)
#define | cid_CTL_DTCT_NTT (cid_CTL_GNRT_NTT+1)
#define | cid_CTL_GNRT_ETSI (2*cid_STD_ETSI+1)
#define | cid_CTL_DTCT_ETSI (cid_CTL_GNRT_ETSI+1)
#define | cid_CTL_GNRT_YDN (2*cid_STD_YDN+1)
#define | cid_CTL_DTCT_YDN (cid_CTL_GNRT_YDN+1)
#define | cid_CTL_GNRT_BT (2*cid_STD_BT+1)
#define | cid_CTL_DTCT_BT (cid_CTL_GNRT_BT+1)
#define | cid_CTL_GNRT_AUS (2*cid_STD_AUS+1)
#define | cid_CTL_DTCT_AUS (cid_CTL_GNRT_AUS+1)
#define | cid_LAST_DTGN_CTL cid_CTL_DTCT_AUS
#define | cid_CTL_DEACTIVATE cid_LAST_DTGN_CTL+1
#define | cid_CTL_MULTI_RQST cid_LAST_DTGN_CTL+2

Enumerations

CID Return Codes
enum {
cid_NOERR = 0, cid_ERROR_CREATE, cid_ERROR_CREATE_CFG, cid_ERROR_CREATE_PARAMS,
cid_ERROR_GS, cid_ERROR_NEW_PARAMS, cid_ERROR_NEW_BASE, cid_ERROR_NEW_MSG,
cid_ERROR_NEW_INST, cid_ERROR_NEW_DEM_INST, cid_ERROR_NEW_DEM_WORK, cid_ERROR_OPEN_CFG,
cid_ERROR_OPEN_OPN, cid_ERROR_OPEN_CREATE, cid_ERROR_OPEN_BND, cid_ERROR_OPEN_SAMP,
cid_ERROR_DEL_CLOSE, cid_ERROR_DEL_NBUFS, cid_ERROR_BIND_INST, cid_ERROR_BIND_BND,
cid_ERROR_BIND_CFG, cid_ERROR_BIND_CREATE, cid_ERROR_BIND_PARAMS, cid_ERROR_BIND_FSM
}
CID Report Codes
enum {
cid_RPT_VALID_DTCT = 0, cid_RPT_DTCT_START = 1, cid_RPT_TIMEOUT = 2, cid_RPT_DTCT_DEACT = 3,
cid_RPT_INVALID_CTL = 4, cid_RPT_NO_END_BIT = 5, cid_RPT_LONG_MARKS = 6, cid_RPT_TRNCTD_MSG = 7,
cid_RPT_BAD_CHCKSUM = 8, cid_RPT_LAST_DETECT = cid_RPT_BAD_CHCKSUM, cid_RPT_END_GNRT = 9, cid_RPT_GNRT_DEACT = 10,
cid_RPT_BAD_PARITY = 11, cid_RPT_BAD_CRC = 12, cid_RPT_BAD_STD = 13, cid_RPT_MULTI_RQST = 20,
cid_RPT_END_OF_ACTION = 21, cid_RPT_VALID_MULTI = 255
}
CID Exception Codes
enum {
cid_EXC_OPEN = 1, cid_EXC_DELETE = 2, cid_EXC_FRAMESIZE = 3, cid_EXC_CONTROL = 4,
cid_EXC_DST_NTT = 5, cid_EXC_GST_NTT = 6, cid_EXC_DST = 7
}

Functions

void | cidModulator (void *cidInst, linSample *frame)
Modulate Caller ID signal. Generate a linear PCM sample frame containing BFSK
modulated caller ID signal. If the CID signal finishes in the middle of a frame,
the rest samples in the frame will be filled with 0.
tbool | cidModCtrl (void *cidInst, cidCtlMsg_t *ctlMsg)
Control function for CID generation.
void | cidDetect (void *cidInst, linSample *frame)
Demodulate and detect in-band signal. The physical layer demodulator is invoked
8 followed by the data link layer state machine.
tbool | cidDemodCtrl (void *cidInst, cidCtlMsg_t *ctlMsg)
Control function for CID detection.
void | cidDtctFsmNtt (void *cidInst, tint bit)
Runs the NTT detector state machine for every demodulated bit at 1200 bps rate.
Reports the final message when completely received or in case of error.
tint | cidGnrtFsmNtt (void *cidInst)
Runs the NTT generator state machine to find the next bit to generate. Executes once
for each bit at 1200bps.
void | cidDtctFsmUsEtsi (void *cidInst, tint bit)
Runs the detector state machine for all supported standards except NTT for every demodulated
bit at 1200 bps rate. Reports the final message when completely received or in case of error.
tint | cidGnrtFsmUsEtsi (void *cidInst)
Runs the generator state machine to find the next bit to generate. Executes once for each bit at 1200bps.
ECO (Embedded Communication Object) APIs
When the system is initialized, cidCreate() must be called followed by cidBind() before any other
APIs are called. These functions have global scope and are not CID instance specific. Once these 2 global
functions have been called the instance specific functions can be called in the proper order to make an
instance ready for detection or generation: cidGetSizes(), cidNew() and cidOpen().
cidControl() is used for control operations.
cidSendIn() is called for CID detection in the PCM to Network direction.
cidReceiveIn() is called for CID detection or generation in the Network to PCM direction.
The instance can be deleted by calling cidClose() followed by cidDelete().

tint | cidCreate (cidCreateConfig_t *create_cfg)
Stores CID instance independent information needed during generation and detection.
It must be called during system initialization before any other API is called.
An error is returned if the function is called more than once.
tint | cidGetSizes (tint *nbufs, const ecomemBuffer_t **bufs)
Returns the number of buffers and the buffer descriptors.
cidCreate() must have been previously called to prevent cidGetSizes() from returning an error.
tint | cidNew (void **cidInst, tint nbufs, ecomemBuffer_t *bufs, cidNewConfig_t *cfg)
Creates a CID instance.
void | cidClose (void *cidInst)
Sets the state of a CID instance to indicate it's closed.
tint | cidDelete (void **cidInst, tint nbufs, ecomemBuffer_t *bufs)
Deletes an instance of the CID.
tint | cidBind (void *cidInst, cidBindConfig_t *cfg)
Binds implementations of supported CID features.
It must be called before cidOpen().
An error is returned if the function is called more than once.
tint | cidOpen (void *cidInst, cidOpenConfig_t *cfg)
Opens and configures a CID instance. cidBind() must have been previously called.
void | cidControl (void *cidInst, cidCtlMsg_t *ctlMsg)
Changes the operating mode of a CID instance.
void | cidReceiveIn (void *cidInst, void *samples_in, tbool gnrtPos, tbool *rxReplace)
Processes samples in the receive path (Packet/Rx side).
If generator is active, the linear input samples are replaced with the modulated caller ID signal.
If the detector is active, the linear input samples are demodulated. If caller ID is detected it is<br. reported with the cidCreateConfig_t::reportOutFcn callback.
void | cidSendIn (void *cidInst, void *samples_in)
Performs CID detection by processing linear PCM samples in the send path (PCM to Network).
If caller ID is detected it is reported with the cidCreateConfig_t::reportOutFcn callback.


CID: cid.h Source File

  • File List
  • Globals

cid.h

Go to the documentation of this file.
00001
00012 #ifndef _CID_H
00013 #define _CID_H
00014
00018 /* @{ */
00019
00020 /* System Utilities */
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/util/utl.h>
00023 #include <ti/mas/util/debug.h>
00024 #include <ti/mas/util/ecomem.h>
00025
00033 /* @{ */
00034 enum {
00035   cid_NOERR     = 0,
00037   /* Errors specific to cidCreate() */
00038   cid_ERROR_CREATE,
00039   cid_ERROR_CREATE_CFG,
00040   cid_ERROR_CREATE_PARAMS,
00042   /* Errors returned by cidGetSizes */
00043   cid_ERROR_GS,
00045   /* Errors returned by cidNew */
00046   cid_ERROR_NEW_PARAMS,
00050   cid_ERROR_NEW_BASE,
00051   cid_ERROR_NEW_MSG,
00052   cid_ERROR_NEW_INST,
00053   cid_ERROR_NEW_DEM_INST,
00054   cid_ERROR_NEW_DEM_WORK,
00056   /* Errors returned by cidOpen */
00057   cid_ERROR_OPEN_CFG,
00058   cid_ERROR_OPEN_OPN,
00059   cid_ERROR_OPEN_CREATE,
00060   cid_ERROR_OPEN_BND,
00061   cid_ERROR_OPEN_SAMP,
00063   /* Errors returned by cidDelete */
00064   cid_ERROR_DEL_CLOSE,
00065   cid_ERROR_DEL_NBUFS,
00067   /* Errors returned by cidBind */
00068   cid_ERROR_BIND_INST,
00069   cid_ERROR_BIND_BND,
00070   cid_ERROR_BIND_CFG,
00071   cid_ERROR_BIND_CREATE,
00072   cid_ERROR_BIND_PARAMS,
00078   cid_ERROR_BIND_FSM
00082 };
00083 /*  @} */
00086 /* Standards definitions */
00087 #define cid_MAXNUM_STANDARDS 6
00088 #define cid_STD_US      0
00089 #define cid_STD_NTT     1
00090 #define cid_STD_ETSI    2
00091 #define cid_STD_YDN     3
00092 #define cid_STD_BT      4
00093 #define cid_STD_AUS     5
00094 #define cid_STD_UNDEFINED 0xffff
00096 /* US - Telcordia allowed message types */
00097 #define cid_US_SDMF_MSGTYPE  0x04
00098 #define cid_US_MDMF_MSGTYPE  0x80
00099 #define cid_US_MWI_MSGTYPE   0x82
00101 /* NTT allowed message types */
00102 #define cid_NTT_BYTE_SERVICE 0x40
00103 #define cid_NTT_RCCM_SERVICE 0x41
00104 #define cid_NTT_BYTE_SERVICE_CW 0x141
00109 /* ETSI allowed message types */
00110 #define cid_ETSI_CS_MSGTYPE    0x80
00111 #define cid_ETSI_MWI_MSGTYPE   0x82
00112 #define cid_ETSI_AOC_MSGTYPE   0x86
00113 #define cid_ETSI_SMS_MSGTYPE   0x89
00114 #define cid_ETSI_NOUMIN_MSGTYPE  0xf1
00115 #define cid_ETSI_NOUMAX_MSGTYPE  0xff
00116
00118 #define cid_CTL_GNRT_US    (2*cid_STD_US+1)
00119 #define cid_CTL_DTCT_US    (cid_CTL_GNRT_US+1)
00120 #define cid_CTL_GNRT_NTT   (2*cid_STD_NTT+1)
00121 #define cid_CTL_DTCT_NTT   (cid_CTL_GNRT_NTT+1)
00122 #define cid_CTL_GNRT_ETSI  (2*cid_STD_ETSI+1)
00123 #define cid_CTL_DTCT_ETSI  (cid_CTL_GNRT_ETSI+1)
00124 #define cid_CTL_GNRT_YDN   (2*cid_STD_YDN+1)
00125 #define cid_CTL_DTCT_YDN   (cid_CTL_GNRT_YDN+1)
00126 #define cid_CTL_GNRT_BT    (2*cid_STD_BT+1)
00127 #define cid_CTL_DTCT_BT    (cid_CTL_GNRT_BT+1)
00128 #define cid_CTL_GNRT_AUS   (2*cid_STD_AUS+1)
00129 #define cid_CTL_DTCT_AUS   (cid_CTL_GNRT_AUS+1)
00130 #define cid_LAST_DTGN_CTL  cid_CTL_DTCT_AUS
00131 #define cid_CTL_DEACTIVATE cid_LAST_DTGN_CTL+1
00132 #define cid_CTL_MULTI_RQST cid_LAST_DTGN_CTL+2
00141 /* @{ */
00142 enum {
00143 /* Detector Report Codes */
00144   cid_RPT_VALID_DTCT  = 0,
00145   cid_RPT_DTCT_START  = 1,
00147   cid_RPT_TIMEOUT     = 2,
00148   cid_RPT_DTCT_DEACT  = 3,
00149   cid_RPT_INVALID_CTL = 4,
00150   cid_RPT_NO_END_BIT  = 5,
00151   cid_RPT_LONG_MARKS  = 6,
00152   cid_RPT_TRNCTD_MSG  = 7,
00153   cid_RPT_BAD_CHCKSUM = 8,
00154   cid_RPT_LAST_DETECT = cid_RPT_BAD_CHCKSUM,
00157   cid_RPT_END_GNRT    = 9,
00158   cid_RPT_GNRT_DEACT  = 10,
00159   cid_RPT_BAD_PARITY  = 11,
00160   cid_RPT_BAD_CRC     = 12,
00161   cid_RPT_BAD_STD     = 13,
00163   cid_RPT_MULTI_RQST    = 20,
00164   cid_RPT_END_OF_ACTION = 21,
00166   cid_RPT_VALID_MULTI = 255
00167 };
00168 /*  @} */
00178 /* @{ */
00179 enum {
00180    cid_EXC_OPEN      = 1,
00181    cid_EXC_DELETE    = 2,
00182    cid_EXC_FRAMESIZE = 3,
00183    cid_EXC_CONTROL   = 4,
00184    cid_EXC_DST_NTT   = 5,
00185    cid_EXC_GST_NTT   = 6,
00186    cid_EXC_DST       = 7
00187 };
00188 /*  @} */
00194 typedef struct {
00195   tuint ID;
00196 } cidNewConfig_t;
00197
00206 typedef struct {
00207   tint ctlCode;
00208   tbool call_waiting;
00210   union {
00211     struct {
00212       tuint  marks_gain;
00214       tint  msg_type;
00215       tint  msg_length;
00216       tuint *msg;
00217     }gnrt;
00218
00219     struct {
00220       tint fragment_offset;
00221       tint fragment_size;
00222       tuint *msg;
00223     }mgnrt ;
00224
00225     struct {
00226       tuint timeout;
00227       tint  direction;
00228       tint  leading_marks;
00229     }dtct ;
00230   }u;
00231 } cidCtlMsg_t;
00232
00233
00237 typedef struct {
00238   dbgInfo_t debugInfo;
00265   void (*reportOutFcn) (tuint ID, tint rcode, tint final_state,
00266                tint dropout_ct, tint bad_mtype_ct, tint type, tint len, tuint* msg, tint len_in_word);
00267
00268   tint maxSamplesPerFrame;
00270   tint maxFragmentSize;
00271 } cidCreateConfig_t;
00272
00273
00277 typedef struct {
00278   tuint standard;
00280   tint  (*gnrt_fsm)  (void*);
00282   void  (*dtct_fsm)  (void*, tint);
00284 } cidBindStandard_t;
00285
00289  typedef struct {
00290   void  (*mod)       (void*, linSample*);
00291   tbool (*modCtrl)   (void*, cidCtlMsg_t*);
00292   void  (*demod)     (void*, linSample*);
00293   tbool (*demodCtrl) (void*, cidCtlMsg_t*);
00294   cidBindStandard_t cidBindStandard[cid_MAXNUM_STANDARDS];
00295 } cidBindConfig_t;
00296
00300 typedef struct {
00301   tuint samples_per_frame;
00303 } cidOpenConfig_t;
00304
00316
00317
00331 tint  cidCreate     (cidCreateConfig_t *create_cfg);
00332
00333
00346 tint  cidGetSizes   (tint *nbufs, const ecomemBuffer_t **bufs);
00347
00348
00369 tint  cidNew        (void **cidInst, tint nbufs, ecomemBuffer_t *bufs,
00370                           cidNewConfig_t *cfg);
00371
00372
00379 void  cidClose      (void *cidInst);
00380
00381
00397 tint  cidDelete     (void **cidInst, tint nbufs, ecomemBuffer_t *bufs);
00398
00399
00536 tint cidBind   (void *cidInst, cidBindConfig_t *cfg);
00537
00551 tint  cidOpen       (void *cidInst, cidOpenConfig_t *cfg);
00552
00553
00561 void  cidControl    (void *cidInst, cidCtlMsg_t *ctlMsg);
00562
00563
00582 void  cidReceiveIn  (void *cidInst, void *samples_in, tbool gnrtPos,
00583                      tbool *rxReplace);
00594  void  cidSendIn     (void *cidInst, void *samples_in);
00596
00608 extern void cidModulator    (void *cidInst, linSample *frame);
00609
00610
00621 extern tbool cidModCtrl   (void *cidInst, cidCtlMsg_t *ctlMsg);
00622
00632 extern void cidDetect       (void *cidInst, linSample *frame);
00633
00634
00646 extern tbool cidDemodCtrl (void *cidInst, cidCtlMsg_t *ctlMsg);
00647
00648
00658 extern void cidDtctFsmNtt  (void *cidInst, tint bit);
00659
00660
00670 extern tint cidGnrtFsmNtt  (void *cidInst);
00671
00672
00682 extern void cidDtctFsmUsEtsi (void *cidInst, tint bit);
00683
00684
00693 extern tint cidGnrtFsmUsEtsi (void *cidInst);
00694
00695 /* @} */ /* ingroup CID */
00696
00697 #endif
00698 /* nothing past this point */
00699
00700


CID: CID by Region

CID (Caller ID) Package

CID by Region

CID Specifications by Region
 | China | United Kingdom | Europe | North America | Australia | Japan
Standard | YDN | BT SIN 227 | ETSI | Bellcore | DC.002 | NTT
FSK format | Bell 202 | V.23 | V.23 | Bell 202 | Bell 202 | V.23
Mark Frequency | 1200 Hz | 1300 Hz | 1300 Hz | 1200 Hz | 1200 Hz | 1300 Hz
Space Frequency | 2200 Hz | 2100 Hz | 2100 Hz | 2200 Hz | 2200 Hz | 2100 Hz
Channel Seizure Length | 300 bits | 96-315 bits | 300 bits | 300 bits | 300 bits | 300 bits
Mark Signal | 180 bits (on-hook), 80 bits (off-hook) | >=55 bits | 180 bits | 180 bits | 180 bits (onhook), 80 bits (off-hook) | 180 bits
Message Word | 7-bit data MSB = even parity | 7-bit data MSB = 0 | 7-bit data MSB = even parity | 8-bit ASCII | 7-bit data MSB = 0 | MSB = even parity
Checksum | 2’s complement sums | 2’s complement sums | CRC-16 | 2’s complement sums | 2’s complement sums | CRC-16
Transmission | LSB first | LSB first | LSB first | LSB first | LSB first | LSB first


CID: Detailed CID Description

CID (Caller ID) Package

Detailed CID Description

Description

The Caller ID component comes as an extension of Automatic Number Identification (ANI), a method used by telephone companies to identify the billing account for a toll call. The real Calling Number Delivery (CND) to the called party that allows one to see the number of the person who is ringing you became possible with the implementation of Signaling System 7 (SS7). This aspect of SS7 is known as Calling Party Number Message (CPNM).

The Caller ID signals are delivered embedded in the voice band with FSK modulation at a rate of 1200 bps. The Caller ID information is generated by the terminating central office and detected by the Customer Premise Equipment (CPE); for example: caller ID boxes, PBXs, recorders, or feature rich phones.

Only the Physical and Data Link layers of Caller ID generation and detection are supported by this component. The application/host must provide the information field and the message type, the CID component performs the necessary formatting, modulation/demodulation, and error detection (parity, CRC, and checksum). The CID component has no extra limitation on the message length, except limitations implied by CID Standards (see Standards Compliance).

Caller ID has two message types; Type I and Type II. Types I and II are used for on-hook and off-hook (call waiting) scenarios respectively.

Caller ID Generation

The CID generator performs message formatting and FSK modulation of the caller ID signals. The modulated signal is embedded in the voice signal and delivered in the voice-band.

The caller ID information, which includes the phone number, name, and time, is passed to the component through a control message. The generator is responsible for generating the modulated caller ID signal based on the message. The Caller ID generator provides both Type I and Type II support.

Caller ID Detection

The CID detector demodulates caller ID signals and detects caller ID messages. When the CID detector receives a message, it demodulates the message. If a valid caller ID message is detected, it reports the demodulated message. If any error condition occurred during the detection, it reports the error condition.


CID: CID Detector Configuration

CID (Caller ID) Package

CID Detector Configuration

CID Detector Confiuration Options

The following CID parameters are configurable:

  • Caller ID detector activation/deactivation
  • Caller ID with call waiting or simple caller ID
  • Detector timeout duration
  • Signal level and Mark count
  • Detector direction
  • Caller ID type
    • Telcordia (North America)
    • ETSI (Europe)
    • NTT (Japan)
    • BT (UK)
    • YDN (China)
    • AUS (Australian)
  • Number of Marks in front of the message


CID:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


CID: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


CID: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


CID: CID External API

CID (Caller ID) Package

CID External API

Page Contents

  1. Complete CID API
  2. CID Initialization Functions
  3. CID Creation Functions
  4. CID Configuration Functions
  5. CID Execution Functions
  6. CID Destruction Functions
  7. CID Return Codes

Complete CID API

  1. cidCreate()
  2. cidBind()
  3. cidGetSizes()
  4. cidNew()
  5. cidOpen()
  6. cidControl()
  7. cidReceiveIn()
  8. cidSendIn()
  9. cidClose()
  10. cidDelete()

CID Initialization Functions

When the system is initialized, cidCreate() must be called followed by cidBind() before any other API routines are called. These functions have global scope and are not CID instance specific. Once these 2 global functions have been called the instance specific functions can be called in the proper order to create CID instances for detection or generation.

CID Creation Functions

CID instance creation is a four step process. First, determine the CID memory requirements via cidGetSize() below. Second, allocate the CID memory buffers using any system-prescribed method. Create the CID instance by passing the allocated buffer information to cidNew(). Finally, open the CID instance for use via the cidOpen() API function. This process must be followed in the order given for proper operation. Once an CID instance is opened, it may be used for Caller ID generation and/or detection depending on the soecific configuration.

  1. cidGetSizes()
  2. cidNew()
  3. cidOpen()

CID Configuration Functions

The CID component has one external API configuration routine - cidControl(). This function requires an active CID instance that has been opened according to the procedure in CID Creation Functions above. The cidControl() routine calls the appropriate generator or detector control routine that was configured via cidBind() upon initialization.

  1. cidControl()

CID Execution Functions

The CID execution API consists of two routines, one per direction. The cidSendIn() API function operates on linear samples in the from-TDM-to-Network direction and is capable of performing Caller ID detection only.

The cidReceiveIn() API function operates on linear samples in the from-Network-to-TDM direction and can perform both Caller ID detection and generation.

The execution API functions require an active CID instance that has been opened according to the procedure in CID Creation Functions above.

  1. cidSendIn()
  2. cidReceiveIn()

CID Destruction Functions

CID instance destruction is a two step process. First, the CID must be closed using the cidClose() API function. Once the CID is closed it may be removed via the cidDelete() function.

Note:
  1. Once an instance has been closed, it may be re-opened via the cidOpen() routine. The instance memory should not be reallocated until the instance is deleted.

  1. cidClose()
  2. cidDelete()

CID Return Codes

The CID component provides various kinds of output to indicate errors in configuration, execution errors and to indicate CID detection or generation events.

  • ECO API return codes
  • CID Exception Codes
  • CID Report Codes


CID: File Index

  • File List
  • Globals

CID File List

Here is a list of all files with brief descriptions:
cid.h [code] External definitions and API's for the Caller ID module


CID: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • call_waiting : cidCtlMsg_t
  • cidBindStandard : cidBindConfig_t
  • ctlCode : cidCtlMsg_t
  • debugInfo : cidCreateConfig_t
  • demod : cidBindConfig_t
  • demodCtrl : cidBindConfig_t
  • direction : cidCtlMsg_t
  • dtct : cidCtlMsg_t
  • dtct_fsm : cidBindStandard_t
  • fragment_offset : cidCtlMsg_t
  • fragment_size : cidCtlMsg_t
  • gnrt : cidCtlMsg_t
  • gnrt_fsm : cidBindStandard_t
  • ID : cidNewConfig_t
  • leading_marks : cidCtlMsg_t
  • marks_gain : cidCtlMsg_t
  • maxFragmentSize : cidCreateConfig_t
  • maxSamplesPerFrame : cidCreateConfig_t
  • mgnrt : cidCtlMsg_t
  • mod : cidBindConfig_t
  • modCtrl : cidBindConfig_t
  • msg : cidCtlMsg_t
  • msg_length : cidCtlMsg_t
  • msg_type : cidCtlMsg_t
  • reportOutFcn : cidCreateConfig_t
  • samples_per_frame : cidOpenConfig_t
  • standard : cidBindStandard_t
  • timeout : cidCtlMsg_t
  • u : cidCtlMsg_t


CID: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • call_waiting : cidCtlMsg_t
  • cidBindStandard : cidBindConfig_t
  • ctlCode : cidCtlMsg_t
  • debugInfo : cidCreateConfig_t
  • demod : cidBindConfig_t
  • demodCtrl : cidBindConfig_t
  • direction : cidCtlMsg_t
  • dtct : cidCtlMsg_t
  • dtct_fsm : cidBindStandard_t
  • fragment_offset : cidCtlMsg_t
  • fragment_size : cidCtlMsg_t
  • gnrt : cidCtlMsg_t
  • gnrt_fsm : cidBindStandard_t
  • ID : cidNewConfig_t
  • leading_marks : cidCtlMsg_t
  • marks_gain : cidCtlMsg_t
  • maxFragmentSize : cidCreateConfig_t
  • maxSamplesPerFrame : cidCreateConfig_t
  • mgnrt : cidCtlMsg_t
  • mod : cidBindConfig_t
  • modCtrl : cidBindConfig_t
  • msg : cidCtlMsg_t
  • msg_length : cidCtlMsg_t
  • msg_type : cidCtlMsg_t
  • reportOutFcn : cidCreateConfig_t
  • samples_per_frame : cidOpenConfig_t
  • standard : cidBindStandard_t
  • timeout : cidCtlMsg_t
  • u : cidCtlMsg_t


CID: CID Generator Configuration

CID (Caller ID) Package

CID Generator Configuration

CID Generator Confiuration Options

The following parameters are configurable:

  • Caller ID generator activation/deactivation
  • Caller ID with call waiting or simple caller ID
  • Caller ID message to be generated
  • Signal level and Mark count
  • Caller ID type
    • Telcordia (North America)
    • ETSI (Europe)
    • NTT (Japan)
    • BT (UK)
    • YDN (China)
    • AUS (Australian)
  • Number of Marks in front of the message
  • Transmit gain


CID: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines
  • _
  • c
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h

- c -

  • cid_CTL_DEACTIVATE : cid.h
  • cid_CTL_DTCT_AUS : cid.h
  • cid_CTL_DTCT_BT : cid.h
  • cid_CTL_DTCT_ETSI : cid.h
  • cid_CTL_DTCT_NTT : cid.h
  • cid_CTL_DTCT_US : cid.h
  • cid_CTL_DTCT_YDN : cid.h
  • cid_CTL_GNRT_AUS : cid.h
  • cid_CTL_GNRT_BT : cid.h
  • cid_CTL_GNRT_ETSI : cid.h
  • cid_CTL_GNRT_NTT : cid.h
  • cid_CTL_GNRT_US : cid.h
  • cid_CTL_GNRT_YDN : cid.h
  • cid_CTL_MULTI_RQST : cid.h
  • cid_ERROR_BIND_BND : cid.h
  • cid_ERROR_BIND_CFG : cid.h
  • cid_ERROR_BIND_CREATE : cid.h
  • cid_ERROR_BIND_FSM : cid.h
  • cid_ERROR_BIND_INST : cid.h
  • cid_ERROR_BIND_PARAMS : cid.h
  • cid_ERROR_CREATE : cid.h
  • cid_ERROR_CREATE_CFG : cid.h
  • cid_ERROR_CREATE_PARAMS : cid.h
  • cid_ERROR_DEL_CLOSE : cid.h
  • cid_ERROR_DEL_NBUFS : cid.h
  • cid_ERROR_GS : cid.h
  • cid_ERROR_NEW_BASE : cid.h
  • cid_ERROR_NEW_DEM_INST : cid.h
  • cid_ERROR_NEW_DEM_WORK : cid.h
  • cid_ERROR_NEW_INST : cid.h
  • cid_ERROR_NEW_MSG : cid.h
  • cid_ERROR_NEW_PARAMS : cid.h
  • cid_ERROR_OPEN_BND : cid.h
  • cid_ERROR_OPEN_CFG : cid.h
  • cid_ERROR_OPEN_CREATE : cid.h
  • cid_ERROR_OPEN_OPN : cid.h
  • cid_ERROR_OPEN_SAMP : cid.h
  • cid_ETSI_AOC_MSGTYPE : cid.h
  • cid_ETSI_CS_MSGTYPE : cid.h
  • cid_ETSI_MWI_MSGTYPE : cid.h
  • cid_ETSI_NOUMAX_MSGTYPE : cid.h
  • cid_ETSI_NOUMIN_MSGTYPE : cid.h
  • cid_ETSI_SMS_MSGTYPE : cid.h
  • cid_EXC_CONTROL : cid.h
  • cid_EXC_DELETE : cid.h
  • cid_EXC_DST : cid.h
  • cid_EXC_DST_NTT : cid.h
  • cid_EXC_FRAMESIZE : cid.h
  • cid_EXC_GST_NTT : cid.h
  • cid_EXC_OPEN : cid.h
  • cid_LAST_DTGN_CTL : cid.h
  • cid_MAXNUM_STANDARDS : cid.h
  • cid_NOERR : cid.h
  • cid_NTT_BYTE_SERVICE : cid.h
  • cid_NTT_BYTE_SERVICE_CW : cid.h
  • cid_NTT_RCCM_SERVICE : cid.h
  • cid_RPT_BAD_CHCKSUM : cid.h
  • cid_RPT_BAD_CRC : cid.h
  • cid_RPT_BAD_PARITY : cid.h
  • cid_RPT_BAD_STD : cid.h
  • cid_RPT_DTCT_DEACT : cid.h
  • cid_RPT_DTCT_START : cid.h
  • cid_RPT_END_GNRT : cid.h
  • cid_RPT_END_OF_ACTION : cid.h
  • cid_RPT_GNRT_DEACT : cid.h
  • cid_RPT_INVALID_CTL : cid.h
  • cid_RPT_LAST_DETECT : cid.h
  • cid_RPT_LONG_MARKS : cid.h
  • cid_RPT_MULTI_RQST : cid.h
  • cid_RPT_NO_END_BIT : cid.h
  • cid_RPT_TIMEOUT : cid.h
  • cid_RPT_TRNCTD_MSG : cid.h
  • cid_RPT_VALID_DTCT : cid.h
  • cid_RPT_VALID_MULTI : cid.h
  • cid_STD_AUS : cid.h
  • cid_STD_BT : cid.h
  • cid_STD_ETSI : cid.h
  • cid_STD_NTT : cid.h
  • cid_STD_UNDEFINED : cid.h
  • cid_STD_US : cid.h
  • cid_STD_YDN : cid.h
  • cid_US_MDMF_MSGTYPE : cid.h
  • cid_US_MWI_MSGTYPE : cid.h
  • cid_US_SDMF_MSGTYPE : cid.h
  • cidBind() : cid.h
  • cidClose() : cid.h
  • cidControl() : cid.h
  • cidCreate() : cid.h
  • cidDelete() : cid.h
  • cidDemodCtrl() : cid.h
  • cidDetect() : cid.h
  • cidDtctFsmNtt() : cid.h
  • cidDtctFsmUsEtsi() : cid.h
  • cidGetSizes() : cid.h
  • cidGnrtFsmNtt() : cid.h
  • cidGnrtFsmUsEtsi() : cid.h
  • cidModCtrl() : cid.h
  • cidModulator() : cid.h
  • cidNew() : cid.h
  • cidOpen() : cid.h
  • cidReceiveIn() : cid.h
  • cidSendIn() : cid.h

- t -

  • ti_mas_cid_Version___VERS : Version.h
  • ti_mas_cid_Version__top__ : Version.h
  • ti_mas_cid_Version_BTYPE : Version.h
  • ti_mas_cid_Version_BUILD : Version.h
  • ti_mas_cid_Version_MAJOR : Version.h
  • ti_mas_cid_Version_MINOR : Version.h
  • ti_mas_cid_Version_PATCH : Version.h
  • ti_mas_cid_Version_QUALITY : Version.h
  • ti_mas_cid_Version_WIDTH : Version.h
  • ti_mas_cid_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


CID: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines
  • _
  • c
  • t
  • v

- _ -

  • __extern : Version.h

- c -

  • cid_CTL_DEACTIVATE : cid.h
  • cid_CTL_DTCT_AUS : cid.h
  • cid_CTL_DTCT_BT : cid.h
  • cid_CTL_DTCT_ETSI : cid.h
  • cid_CTL_DTCT_NTT : cid.h
  • cid_CTL_DTCT_US : cid.h
  • cid_CTL_DTCT_YDN : cid.h
  • cid_CTL_GNRT_AUS : cid.h
  • cid_CTL_GNRT_BT : cid.h
  • cid_CTL_GNRT_ETSI : cid.h
  • cid_CTL_GNRT_NTT : cid.h
  • cid_CTL_GNRT_US : cid.h
  • cid_CTL_GNRT_YDN : cid.h
  • cid_CTL_MULTI_RQST : cid.h
  • cid_ETSI_AOC_MSGTYPE : cid.h
  • cid_ETSI_CS_MSGTYPE : cid.h
  • cid_ETSI_MWI_MSGTYPE : cid.h
  • cid_ETSI_NOUMAX_MSGTYPE : cid.h
  • cid_ETSI_NOUMIN_MSGTYPE : cid.h
  • cid_ETSI_SMS_MSGTYPE : cid.h
  • cid_LAST_DTGN_CTL : cid.h
  • cid_MAXNUM_STANDARDS : cid.h
  • cid_NTT_BYTE_SERVICE : cid.h
  • cid_NTT_BYTE_SERVICE_CW : cid.h
  • cid_NTT_RCCM_SERVICE : cid.h
  • cid_STD_AUS : cid.h
  • cid_STD_BT : cid.h
  • cid_STD_ETSI : cid.h
  • cid_STD_NTT : cid.h
  • cid_STD_UNDEFINED : cid.h
  • cid_STD_US : cid.h
  • cid_STD_YDN : cid.h
  • cid_US_MDMF_MSGTYPE : cid.h
  • cid_US_MWI_MSGTYPE : cid.h
  • cid_US_SDMF_MSGTYPE : cid.h

- t -

  • ti_mas_cid_Version___VERS : Version.h
  • ti_mas_cid_Version__top__ : Version.h
  • ti_mas_cid_Version_BTYPE : Version.h
  • ti_mas_cid_Version_BUILD : Version.h
  • ti_mas_cid_Version_MAJOR : Version.h
  • ti_mas_cid_Version_MINOR : Version.h
  • ti_mas_cid_Version_PATCH : Version.h
  • ti_mas_cid_Version_QUALITY : Version.h
  • ti_mas_cid_Version_WIDTH : Version.h
  • ti_mas_cid_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


CID: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines
  • c

- c -

  • cid_ERROR_BIND_BND : cid.h
  • cid_ERROR_BIND_CFG : cid.h
  • cid_ERROR_BIND_CREATE : cid.h
  • cid_ERROR_BIND_FSM : cid.h
  • cid_ERROR_BIND_INST : cid.h
  • cid_ERROR_BIND_PARAMS : cid.h
  • cid_ERROR_CREATE : cid.h
  • cid_ERROR_CREATE_CFG : cid.h
  • cid_ERROR_CREATE_PARAMS : cid.h
  • cid_ERROR_DEL_CLOSE : cid.h
  • cid_ERROR_DEL_NBUFS : cid.h
  • cid_ERROR_GS : cid.h
  • cid_ERROR_NEW_BASE : cid.h
  • cid_ERROR_NEW_DEM_INST : cid.h
  • cid_ERROR_NEW_DEM_WORK : cid.h
  • cid_ERROR_NEW_INST : cid.h
  • cid_ERROR_NEW_MSG : cid.h
  • cid_ERROR_NEW_PARAMS : cid.h
  • cid_ERROR_OPEN_BND : cid.h
  • cid_ERROR_OPEN_CFG : cid.h
  • cid_ERROR_OPEN_CREATE : cid.h
  • cid_ERROR_OPEN_OPN : cid.h
  • cid_ERROR_OPEN_SAMP : cid.h
  • cid_EXC_CONTROL : cid.h
  • cid_EXC_DELETE : cid.h
  • cid_EXC_DST : cid.h
  • cid_EXC_DST_NTT : cid.h
  • cid_EXC_FRAMESIZE : cid.h
  • cid_EXC_GST_NTT : cid.h
  • cid_EXC_OPEN : cid.h
  • cid_NOERR : cid.h
  • cid_RPT_BAD_CHCKSUM : cid.h
  • cid_RPT_BAD_CRC : cid.h
  • cid_RPT_BAD_PARITY : cid.h
  • cid_RPT_BAD_STD : cid.h
  • cid_RPT_DTCT_DEACT : cid.h
  • cid_RPT_DTCT_START : cid.h
  • cid_RPT_END_GNRT : cid.h
  • cid_RPT_END_OF_ACTION : cid.h
  • cid_RPT_GNRT_DEACT : cid.h
  • cid_RPT_INVALID_CTL : cid.h
  • cid_RPT_LAST_DETECT : cid.h
  • cid_RPT_LONG_MARKS : cid.h
  • cid_RPT_MULTI_RQST : cid.h
  • cid_RPT_NO_END_BIT : cid.h
  • cid_RPT_TIMEOUT : cid.h
  • cid_RPT_TRNCTD_MSG : cid.h
  • cid_RPT_VALID_DTCT : cid.h
  • cid_RPT_VALID_MULTI : cid.h


CID: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines

  • cidBind() : cid.h
  • cidClose() : cid.h
  • cidControl() : cid.h
  • cidCreate() : cid.h
  • cidDelete() : cid.h
  • cidDemodCtrl() : cid.h
  • cidDetect() : cid.h
  • cidDtctFsmNtt() : cid.h
  • cidDtctFsmUsEtsi() : cid.h
  • cidGetSizes() : cid.h
  • cidGnrtFsmNtt() : cid.h
  • cidGnrtFsmUsEtsi() : cid.h
  • cidModCtrl() : cid.h
  • cidModulator() : cid.h
  • cidNew() : cid.h
  • cidOpen() : cid.h
  • cidReceiveIn() : cid.h
  • cidSendIn() : cid.h


CID: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


CID: CID

CID

Collaboration diagram for CID:

Detailed Description

Modules

ECO API return codes
CID Report Codes
CID Exception Codes

Data Structures

struct | cidNewConfig_t
Configuration structure passed to cidNew(). More...
struct | cidCtlMsg_t
Control message structure. Defines the message specific content fields for each
of the control messages passed to cidControl(). The value stored in the ctlCode field
determines which fields in the cidCtlMsg_t structure are to be set.
  • If a generator related control code is being passed, the fields in the gnrt structure are set.
  • If a detector related control code is being passed, the fields in the dtct structure are set.
  • If the cid_CTL_MULTI_RQST control code is being passed, the fields in the mgnrt structure are set.
More...
struct | cidCreateConfig_t
Configuration structure passed to cidCreate(). More...
struct | cidBindStandard_t
Standard related information in cidBindConfig_t structure. More...
struct | cidBindConfig_t
Configuration structure passed to cidBind(). More...
struct | cidOpenConfig_t
CID Open configuration structure. Contains parameters needed to open a CID instance. More...

ECO (Embedded Communication Object) APIs

When the system is initialized, cidCreate() must be called followed by cidBind() before any other
APIs are called. These functions have global scope and are not CID instance specific. Once these 2 global
functions have been called the instance specific functions can be called in the proper order to make an
instance ready for detection or generation: cidGetSizes(), cidNew() and cidOpen().
cidControl() is used for control operations.
cidSendIn() is called for CID detection in the PCM to Network direction.
cidReceiveIn() is called for CID detection or generation in the Network to PCM direction.
The instance can be deleted by calling cidClose() followed by cidDelete().

tint | cidCreate (cidCreateConfig_t *create_cfg)
Stores CID instance independent information needed during generation and detection.
It must be called during system initialization before any other API is called.
An error is returned if the function is called more than once.
tint | cidGetSizes (tint *nbufs, const ecomemBuffer_t **bufs)
Returns the number of buffers and the buffer descriptors.
cidCreate() must have been previously called to prevent cidGetSizes() from returning an error.
tint | cidNew (void **cidInst, tint nbufs, ecomemBuffer_t *bufs, cidNewConfig_t *cfg)
Creates a CID instance.
void | cidClose (void *cidInst)
Sets the state of a CID instance to indicate it's closed.
tint | cidDelete (void **cidInst, tint nbufs, ecomemBuffer_t *bufs)
Deletes an instance of the CID.
tint | cidBind (void *cidInst, cidBindConfig_t *cfg)
Binds implementations of supported CID features.
It must be called before cidOpen().
An error is returned if the function is called more than once.
tint | cidOpen (void *cidInst, cidOpenConfig_t *cfg)
Opens and configures a CID instance. cidBind() must have been previously called.
void | cidControl (void *cidInst, cidCtlMsg_t *ctlMsg)
Changes the operating mode of a CID instance.
void | cidReceiveIn (void *cidInst, void *samples_in, tbool gnrtPos, tbool *rxReplace)
Processes samples in the receive path (Packet/Rx side).
If generator is active, the linear input samples are replaced with the modulated caller ID signal.
If the detector is active, the linear input samples are demodulated. If caller ID is detected it is<br. reported with the cidCreateConfig_t::reportOutFcn callback.
void | cidSendIn (void *cidInst, void *samples_in)
Performs CID detection by processing linear PCM samples in the send path (PCM to Network).
If caller ID is detected it is reported with the cidCreateConfig_t::reportOutFcn callback.

Defines

#define | cid_MAXNUM_STANDARDS 6
#define | cid_STD_US 0
#define | cid_STD_NTT 1
#define | cid_STD_ETSI 2
#define | cid_STD_YDN 3
#define | cid_STD_BT 4
#define | cid_STD_AUS 5
#define | cid_STD_UNDEFINED 0xffff
#define | cid_US_SDMF_MSGTYPE 0x04
#define | cid_US_MDMF_MSGTYPE 0x80
#define | cid_US_MWI_MSGTYPE 0x82
#define | cid_NTT_BYTE_SERVICE 0x40
#define | cid_NTT_RCCM_SERVICE 0x41
#define | cid_NTT_BYTE_SERVICE_CW 0x141
#define | cid_ETSI_CS_MSGTYPE 0x80
#define | cid_ETSI_MWI_MSGTYPE 0x82
#define | cid_ETSI_AOC_MSGTYPE 0x86
#define | cid_ETSI_SMS_MSGTYPE 0x89
#define | cid_ETSI_NOUMIN_MSGTYPE 0xf1
#define | cid_ETSI_NOUMAX_MSGTYPE 0xff
#define | cid_CTL_GNRT_US (2*cid_STD_US+1)
CID Control Codes used by cidControl().
#define | cid_CTL_DTCT_US (cid_CTL_GNRT_US+1)
#define | cid_CTL_GNRT_NTT (2*cid_STD_NTT+1)
#define | cid_CTL_DTCT_NTT (cid_CTL_GNRT_NTT+1)
#define | cid_CTL_GNRT_ETSI (2*cid_STD_ETSI+1)
#define | cid_CTL_DTCT_ETSI (cid_CTL_GNRT_ETSI+1)
#define | cid_CTL_GNRT_YDN (2*cid_STD_YDN+1)
#define | cid_CTL_DTCT_YDN (cid_CTL_GNRT_YDN+1)
#define | cid_CTL_GNRT_BT (2*cid_STD_BT+1)
#define | cid_CTL_DTCT_BT (cid_CTL_GNRT_BT+1)
#define | cid_CTL_GNRT_AUS (2*cid_STD_AUS+1)
#define | cid_CTL_DTCT_AUS (cid_CTL_GNRT_AUS+1)
#define | cid_LAST_DTGN_CTL cid_CTL_DTCT_AUS
#define | cid_CTL_DEACTIVATE cid_LAST_DTGN_CTL+1
#define | cid_CTL_MULTI_RQST cid_LAST_DTGN_CTL+2

Functions

void | cidModulator (void *cidInst, linSample *frame)
Modulate Caller ID signal. Generate a linear PCM sample frame containing BFSK
modulated caller ID signal. If the CID signal finishes in the middle of a frame,
the rest samples in the frame will be filled with 0.
tbool | cidModCtrl (void *cidInst, cidCtlMsg_t *ctlMsg)
Control function for CID generation.
void | cidDetect (void *cidInst, linSample *frame)
Demodulate and detect in-band signal. The physical layer demodulator is invoked
8 followed by the data link layer state machine.
tbool | cidDemodCtrl (void *cidInst, cidCtlMsg_t *ctlMsg)
Control function for CID detection.
void | cidDtctFsmNtt (void *cidInst, tint bit)
Runs the NTT detector state machine for every demodulated bit at 1200 bps rate.
Reports the final message when completely received or in case of error.
tint | cidGnrtFsmNtt (void *cidInst)
Runs the NTT generator state machine to find the next bit to generate. Executes once
for each bit at 1200bps.
void | cidDtctFsmUsEtsi (void *cidInst, tint bit)
Runs the detector state machine for all supported standards except NTT for every demodulated
bit at 1200 bps rate. Reports the final message when completely received or in case of error.
tint | cidGnrtFsmUsEtsi (void *cidInst)
Runs the generator state machine to find the next bit to generate. Executes once for each bit at 1200bps.

Define Documentation

#define cid_MAXNUM_STANDARDS 6

Definition at line 87 of file cid.h.

#define cid_STD_US 0

US, Telcordia standard

Definition at line 88 of file cid.h.

#define cid_STD_NTT 1

Japanese, NTT standard

Definition at line 89 of file cid.h.

#define cid_STD_ETSI 2

European, ETSI standard

Definition at line 90 of file cid.h.

#define cid_STD_YDN 3

Chinese, YDN standard

Definition at line 91 of file cid.h.

#define cid_STD_BT 4

UK, BT standard

Definition at line 92 of file cid.h.

#define cid_STD_AUS 5

AUS, Australian standard

Definition at line 93 of file cid.h.

#define cid_STD_UNDEFINED 0xffff

undefined standard

Definition at line 94 of file cid.h.

#define cid_US_SDMF_MSGTYPE 0x04

message type of SDMF

Definition at line 97 of file cid.h.

#define cid_US_MDMF_MSGTYPE 0x80

message type of MDMF

Definition at line 98 of file cid.h.

#define cid_US_MWI_MSGTYPE 0x82

message waiting indicator

Definition at line 99 of file cid.h.

#define cid_NTT_BYTE_SERVICE 0x40

Definition at line 102 of file cid.h.

#define cid_NTT_RCCM_SERVICE 0x41

Definition at line 103 of file cid.h.

#define cid_NTT_BYTE_SERVICE_CW 0x141

message type of off-hook CID (during call waiting):

  • lower 8 bits represent the service ID which is the same as the ID the short message format uses
  • bit 8 is set to 1 to distinguish the off-hook CID and short message formats

Definition at line 104 of file cid.h.

#define cid_ETSI_CS_MSGTYPE 0x80

Call Setup

Definition at line 110 of file cid.h.

#define cid_ETSI_MWI_MSGTYPE 0x82

Message Waiting Indicator

Definition at line 111 of file cid.h.

#define cid_ETSI_AOC_MSGTYPE 0x86

Advice of Charge

Definition at line 112 of file cid.h.

#define cid_ETSI_SMS_MSGTYPE 0x89

Short Message Service

Definition at line 113 of file cid.h.

#define cid_ETSI_NOUMIN_MSGTYPE 0xf1

Reserved for Network Operator Use

Definition at line 114 of file cid.h.

#define cid_ETSI_NOUMAX_MSGTYPE 0xff

Definition at line 115 of file cid.h.

#define cid_CTL_GNRT_US (2*cid_STD_US+1)

CID Control Codes used by cidControl().

activate CID generator, Telcordia compliant

Definition at line 118 of file cid.h.

#define cid_CTL_DTCT_US (cid_CTL_GNRT_US+1)

activate CID detector, Telcordia compliant

Definition at line 119 of file cid.h.

#define cid_CTL_GNRT_NTT (2*cid_STD_NTT+1)

activate CID generator, NTT compliant

Definition at line 120 of file cid.h.

#define cid_CTL_DTCT_NTT (cid_CTL_GNRT_NTT+1)

activate CID detector, NTT compliant

Definition at line 121 of file cid.h.

#define cid_CTL_GNRT_ETSI (2*cid_STD_ETSI+1)

activate CID generator, ETSI compliant

Definition at line 122 of file cid.h.

#define cid_CTL_DTCT_ETSI (cid_CTL_GNRT_ETSI+1)

activate CID detector, ETSI compliant

Definition at line 123 of file cid.h.

#define cid_CTL_GNRT_YDN (2*cid_STD_YDN+1)

activate CID generator, YDN compliant

Definition at line 124 of file cid.h.

#define cid_CTL_DTCT_YDN (cid_CTL_GNRT_YDN+1)

activate CID detector, YDN compliant

Definition at line 125 of file cid.h.

#define cid_CTL_GNRT_BT (2*cid_STD_BT+1)

activate CID generator, BT compliant

Definition at line 126 of file cid.h.

#define cid_CTL_DTCT_BT (cid_CTL_GNRT_BT+1)

activate CID detector, BT compliant

Definition at line 127 of file cid.h.

#define cid_CTL_GNRT_AUS (2*cid_STD_AUS+1)

activate CID generator, Australian compliant

Definition at line 128 of file cid.h.

#define cid_CTL_DTCT_AUS (cid_CTL_GNRT_AUS+1)

activate CID detector, Australian compliant

Definition at line 129 of file cid.h.

#define cid_LAST_DTGN_CTL cid_CTL_DTCT_AUS

last detect/generation control code

Definition at line 130 of file cid.h.

#define cid_CTL_DEACTIVATE cid_LAST_DTGN_CTL+1

deactivate both subsystems

Definition at line 131 of file cid.h.

#define cid_CTL_MULTI_RQST cid_LAST_DTGN_CTL+2

Response to cid_RPT_MULTI_RQST report code

Definition at line 132 of file cid.h.

Function Documentation

tint cidCreate ( cidCreateConfig_t * create_cfg )

Stores CID instance independent information needed during generation and detection.
It must be called during system initialization before any other API is called.
An error is returned if the function is called more than once.

Parameters:
[in] *create_cfg Pointer to instance independent information.
Returns:
cid_NOERR
cid_ERROR_CREATE_PARAMS
cid_ERROR_CREATE

tint cidGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs
 | ) |  |

Returns the number of buffers and the buffer descriptors.
cidCreate() must have been previously called to prevent cidGetSizes() from returning an error.

Parameters:
[in,out] | *nbufs | Pointer to number of buffers.
[in,out] | **bufs | Address of pointer to buffer descriptors
Returns:
cid_NOERR
cid_ERROR_GS

tint cidNew | ( | void ** | cidInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | cidNewConfig_t * | cfg
 | ) |  |

Creates a CID instance.

Parameters:
[in,out] **cidInst Address of pointer to instance. After this function returns an instance
pointer, the functions cidOpen(), cidClose() and cidDelete() may be called.
[in] | nbufs | Number of memory buffers.
[in] | *bufs | Address of buffer descriptors.
[in] | *cfg | Pointer to configuration structure.
Returns:
cid_NOERR
cid_ERROR_NEW_PARAMS
cid_ERROR_NEW_BASE
cid_ERROR_NEW_MSG
cid_ERROR_NEW_INST
cid_ERROR_NEW_DEM_INST
cid_ERROR_NEW_DEM_WORK

void cidClose ( void * cidInst )

Sets the state of a CID instance to indicate it's closed.

Parameters:
[in] *cidInst Pointer to instance data.

tint cidDelete | ( | void ** | cidInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Deletes an instance of the CID.

Actual "deallocation" of instance should be done elsewhere after this function is
called. Hence, one has to save the buffer descriptors to make "deallocation" possible.

Parameters:
[in] | **cidInst | Address of pointer to instance data.
[in] | nbufs | Number of buffers to free
[in] | *bufs | Address of buffer descriptors
Returns:
cid_NOERR
cid_ERROR_DEL_CLOSE

tint cidBind | ( | void * | cidInst,
 |  | cidBindConfig_t * | cfg
 | ) |  |

Binds implementations of supported CID features.
It must be called before cidOpen().
An error is returned if the function is called more than once.

Parameters:
[in] | *cidInst | Instance pointer - must be NULL.
[in] | *cfg | Pointer to configuration structure of type cidBindConfig_t.
Returns:
cid_NOERR
cid_ERROR_BIND_BND
cid_ERROR_BIND_PARAMS
cid_ERROR_BIND_INST
cid_ERROR_BIND_CFG
cid_ERROR_BIND_CREATE
cid_ERROR_BIND_FSM
The cidBindConfig_t structure passed to cidBind() determines which caller ID features and standards are linked.
Linking only what is needed from the CID component library minimizes the size of the application image.
  • If CID generation is required, cidModulator() is in the "mod" field and cidModCtrl() is in the "modCtrl" field.
    These fields are NULL if CID generation is not needed.

  • If CID detection is required, cidDetect() is in the "demod" field and cidDemodCtrl() is in the "demodCtrl" field.
    These fields are NULL if CID detection is not needed.

  • The elements in the cidBindStandard[] array determine the standards to be used and whether they support generation
    or detection. In each element the "standard" field is one of the standard definitions starting at cid_STD_US. Using
    the cid_STD_UNDEFINED standard results in this element being ignored. When using cid_STD_UNDEFINED, the "gnrt_fsm"
    and "dtct_fsm" pointers MUST be defined as "NULL" to prevent linking unneeded functions.

    The "gnrt_fsm" field is set to cidGnrtFsmNtt() if the standard is cid_STD_NTT. The "gnrt_fsm" field is set to
    cidGnrtFsmUsEtsi() if the standard is cid_STD_US, cid_STD_ETSI, cid_STD_YDN, cid_STD_BT or cid_STD_AUS.
    Setting the "gnrt_fsm" field to NULL disables generation for this standard.

    The "dtct_fsm" field is set to cidDtctFsmNtt() if the standard is cid_STD_NTT. The "dtct_fsm" field is set to
    cidDtctFsmUsEtsi() if the standard is cid_STD_US, cid_STD_ETSI, cid_STD_YDN, cid_STD_BT or cid_STD_AUS.
    Setting the "dtct_fsm" field to NULL disables detection for this standard.

Example of cidBindConfig_t structure passed to cidBind() that includes generation and detection for all standards.

cidBindConfig_t cidBindConfig = {
  cidModulator,
  cidModCtrl,
  cidDetect,
  cidDemodCtrl,
  {

    {
      cid_STD_US,
      cidGnrtFsmUsEtsi,
      cidDtctFsmUsEtsi,
    },
    {
      cid_STD_AUS,
      cidGnrtFsmUsEtsi,
      cidDtctFsmUsEtsi,
    },
    {
      cid_STD_BT,
      cidGnrtFsmUsEtsi,
      cidDtctFsmUsEtsi,
    },
    {
      cid_STD_NTT,
      cidGnrtFsmNtt,
      cidDtctFsmNtt,
    },
    {
      cid_STD_ETSI,
      cidGnrtFsmUsEtsi,
      cidDtctFsmUsEtsi,
    },
    {
      cid_STD_YDN,
      cidGnrtFsmUsEtsi,
      cidDtctFsmUsEtsi,
    },

  }
};

Example of cidBindConfig_t structure passed to cidBind() that includes generation only for the US and Japanese standards.
Note that the "dtct_fsm" pointers MUST be defined to be "NULL" when using the "cid_STD_US" and "cid_STD_NTT" standards because
detection has been disabled.

When using the standard "cid_STD_UNDEFINED", the "gnrt_fsm" and "dtct_fsm" pointers MUST be defined as "NULL" to prevent
linking unneeded functions.

cidBindConfig_t cidBindConfig = {
  cidModulator,
  cidModCtrl,
  NULL,
  NULL,
  {

    {
      cid_STD_US,
      cidGnrtFsmUsEtsi,
      NULL,
    },
    {
      cid_STD_UNDEFINED,
      NULL,
      NULL,
    },
    {
      cid_STD_UNDEFINED,
      NULL,
      NULL,
    },
    {
      cid_STD_NTT,
      cidGnrtFsmNtt,
      NULL,
    },
    {
      cid_STD_UNDEFINED,
      NULL,
      NULL,
    },
    {
      cid_STD_UNDEFINED,
      NULL,
      NULL,
    },

  }
};

Calling cidBind():
if(cidBind(NULL, &cidBindConfig) != cid_NOERR)
{
-------error processing------
}

tint cidOpen | ( | void * | cidInst,
 |  | cidOpenConfig_t * | cfg
 | ) |  |

Opens and configures a CID instance. cidBind() must have been previously called.

Parameters:
[in] | *cidInst | Pointer to instance data.
[in] | *cfg | Pointer to configuration structure of type cidOpenConfig_t
Returns:
cid_NOERR
cid_ERROR_OPEN_CREATE
cid_ERROR_OPEN_BND
cid_ERROR_OPEN_SAMP
cid_ERROR_OPEN_OPN

void cidControl | ( | void * | cidInst,
 |  | cidCtlMsg_t * | ctlMsg
 | ) |  |

Changes the operating mode of a CID instance.

Parameters:
[in] | *cidInst | Pointer to instance data.
[in] | *ctlMsg | Pointer to control message of type cidCtlMsg_t.

void cidReceiveIn | ( | void * | cidInst,
 |  | void * | samples_in,
 |  | tbool | gnrtPos,
 |  | tbool * | rxReplace
 | ) |  |

Processes samples in the receive path (Packet/Rx side).
If generator is active, the linear input samples are replaced with the modulated caller ID signal.
If the detector is active, the linear input samples are demodulated. If caller ID is detected it is<br. reported with the cidCreateConfig_t::reportOutFcn callback.

Otherwise, the samples pass through.

Parameters:
[in] | cidInst | Pointer to instance data
[in,out] | samples_in | Pointer to input linear sample frame that will be replaced with modulated FSK samples
[in] | gnrtPos | If set to TRUE, generation is performed. If set to FALSE, detection is performed.
[in,out] rxReplace Pointer to flag that caller sets to FALSE if generation is to be performed. This
function sets the flag to TRUE if samples from the CID generator are produced.

void cidSendIn | ( | void * | cidInst,
 |  | void * | samples_in
 | ) |  |

Performs CID detection by processing linear PCM samples in the send path (PCM to Network).
If caller ID is detected it is reported with the cidCreateConfig_t::reportOutFcn callback.

Parameters:
[in] | cidInst | Pointer to instance data
[in] | samples_in | Pointer to input sample frame (linear buffer, linSample internal representation, buffer size is inst->samples_per_frame).

void cidModulator | ( | void * | cidInst,
 |  | linSample * | frame
 | ) |  |

Modulate Caller ID signal. Generate a linear PCM sample frame containing BFSK
modulated caller ID signal. If the CID signal finishes in the middle of a frame,
the rest samples in the frame will be filled with 0.

Parameters:
[in] | cidInst | Pointer to instance data.
[out] | *frame | output sample frame contains the CID signal.
length: inst->samples_per_frame.

tbool cidModCtrl | ( | void * | cidInst,
 |  | cidCtlMsg_t * | ctlMsg
 | ) |  |

Control function for CID generation.

Parameters:
[in] | cidInst | Pointer to instance data.
[in] | *ctlMsg | Pointer to control message cidCtlMsg_t.
Returns:
TRUE if message processed.

void cidDetect | ( | void * | cidInst,
 |  | linSample * | frame
 | ) |  |

Demodulate and detect in-band signal. The physical layer demodulator is invoked
8 followed by the data link layer state machine.

Parameters:
[in] | *cidInst | Pointer to instance data
[in] | *frame | Pointer to a frame of input samples

tbool cidDemodCtrl | ( | void * | cidInst,
 |  | cidCtlMsg_t * | ctlMsg
 | ) |  |

Control function for CID detection.

Parameters:
[in] | *cidInst | Pointer to instance data
[in] | *ctlMsg | Pointer to control message of type cidCtlMsg_t
Returns:
TRUE if message processed.

void cidDtctFsmNtt | ( | void * | cidInst,
 |  | tint | bit
 | ) |  |

Runs the NTT detector state machine for every demodulated bit at 1200 bps rate.
Reports the final message when completely received or in case of error.

Parameters:
[in] | *cidInst | Pointer to instance data
[in] | bit | The demodulated bit, 0 or 1.

tint cidGnrtFsmNtt ( void * cidInst )

Runs the NTT generator state machine to find the next bit to generate. Executes once
for each bit at 1200bps.

Parameters:
[in] *cidInst Pointer to instance data
Returns:
Next bit (0 or 1)

void cidDtctFsmUsEtsi | ( | void * | cidInst,
 |  | tint | bit
 | ) |  |

Runs the detector state machine for all supported standards except NTT for every demodulated
bit at 1200 bps rate. Reports the final message when completely received or in case of error.

Parameters:
[in] | *cidInst | Pointer to instance data
[in] | bit | The demodulated bit, 0 or 1.

tint cidGnrtFsmUsEtsi ( void * cidInst )

Runs the generator state machine to find the next bit to generate. Executes once for each bit at 1200bps.

Parameters:
[in] *cidInst Pointer to instance data
Returns:
Next bit (0 or 1)


CID: CID Report Codes

CID Report Codes
[CID]

Collaboration diagram for CID Report Codes:

Detailed Description

These are the report codes for the CID detector and generator.

CID Report Codes

enum {
cid_RPT_VALID_DTCT = 0, cid_RPT_DTCT_START = 1, cid_RPT_TIMEOUT = 2, cid_RPT_DTCT_DEACT = 3,
cid_RPT_INVALID_CTL = 4, cid_RPT_NO_END_BIT = 5, cid_RPT_LONG_MARKS = 6, cid_RPT_TRNCTD_MSG = 7,
cid_RPT_BAD_CHCKSUM = 8, cid_RPT_LAST_DETECT = cid_RPT_BAD_CHCKSUM, cid_RPT_END_GNRT = 9, cid_RPT_GNRT_DEACT = 10,
cid_RPT_BAD_PARITY = 11, cid_RPT_BAD_CRC = 12, cid_RPT_BAD_STD = 13, cid_RPT_MULTI_RQST = 20,
cid_RPT_END_OF_ACTION = 21, cid_RPT_VALID_MULTI = 255
}

Enumeration Type Documentation

anonymous enum

Enumerator:
cid_RPT_VALID_DTCT | a valid message reported
cid_RPT_DTCT_START | message detection has started, reported after mark signal has been found
cid_RPT_TIMEOUT | no msg received within timeout interval
cid_RPT_DTCT_DEACT | detector deactivated during detection
cid_RPT_INVALID_CTL | invalid control message
cid_RPT_NO_END_BIT | missing end bit in a received byte
cid_RPT_LONG_MARKS | >20 consecutive marks encountered in message
cid_RPT_TRNCTD_MSG | message length longer than the maximum length
cid_RPT_BAD_CHCKSUM | bad check sum
cid_RPT_LAST_DETECT | Equals last report code enum
cid_RPT_END_GNRT Generator Report Codes.

generator completed successfully

cid_RPT_GNRT_DEACT | generator deactivated during generation
cid_RPT_BAD_PARITY | bad parity bit detected - NTT standard
cid_RPT_BAD_CRC | message with bad CRC detected
cid_RPT_BAD_STD | standard not supported within the build
cid_RPT_MULTI_RQST | Generation message exceeded buffer - request additional fragment
cid_RPT_END_OF_ACTION | Request for object de-allocation
cid_RPT_VALID_MULTI | a valid message detected - part of multi-part message

Definition at line 142 of file cid.h.


CID: ECO API return codes

ECO API return codes
[CID]

Collaboration diagram for ECO API return codes:

Detailed Description

These are the return codes for the CID ECO API functions.

CID Return Codes

enum {
cid_NOERR = 0, cid_ERROR_CREATE, cid_ERROR_CREATE_CFG, cid_ERROR_CREATE_PARAMS,
cid_ERROR_GS, cid_ERROR_NEW_PARAMS, cid_ERROR_NEW_BASE, cid_ERROR_NEW_MSG,
cid_ERROR_NEW_INST, cid_ERROR_NEW_DEM_INST, cid_ERROR_NEW_DEM_WORK, cid_ERROR_OPEN_CFG,
cid_ERROR_OPEN_OPN, cid_ERROR_OPEN_CREATE, cid_ERROR_OPEN_BND, cid_ERROR_OPEN_SAMP,
cid_ERROR_DEL_CLOSE, cid_ERROR_DEL_NBUFS, cid_ERROR_BIND_INST, cid_ERROR_BIND_BND,
cid_ERROR_BIND_CFG, cid_ERROR_BIND_CREATE, cid_ERROR_BIND_PARAMS, cid_ERROR_BIND_FSM
}

Enumeration Type Documentation

anonymous enum

Enumerator:
cid_NOERR | success
cid_ERROR_CREATE | cidCreate() - cidCreate() called more than once
cid_ERROR_CREATE_CFG | cidCreate() - configuration parameter is NULL
cid_ERROR_CREATE_PARAMS | cidCreate() - reportOutFcn is NULL or maxFragmentSize<=0 or maxFragmentSize<=0
cid_ERROR_GS | cidGetSizes() - cidCreate() was not called
cid_ERROR_NEW_PARAMS cidNew() - one or more of the following parameter errors:
cidInst not NULL
nbufs != cid_NBUFS
cfg is NULL
cid_ERROR_NEW_BASE | cidNew() - somse buffers have NULL base address
cid_ERROR_NEW_MSG | cidNew() - maxFragmentSize < requested message buffer size
cid_ERROR_NEW_INST | cidNew() - CID instance buffer too small or has wrong alignment
cid_ERROR_NEW_DEM_INST | cidNew() - Demodulator instance buffer too small or has wrong alignment
cid_ERROR_NEW_DEM_WORK | cidNew() - Demodulator work area buffer too small or has wrong alignment
cid_ERROR_OPEN_CFG | cidOpen() - configuration parameter is NULL
cid_ERROR_OPEN_OPN | cidOpen() - instance is already opened
cid_ERROR_OPEN_CREATE | cidOpen() - cidCreate() was not called
cid_ERROR_OPEN_BND | cidOpen() - cidBind() was not called
cid_ERROR_OPEN_SAMP | cidOpen() - samples_per_frame > max passed to cidCreate()
cid_ERROR_DEL_CLOSE | cidDelete() - instance is not closed
cid_ERROR_DEL_NBUFS | cidDelete() - nbufs is less than number of allocated buffers
cid_ERROR_BIND_INST | cidBind() - instance pointer is not NULL
cid_ERROR_BIND_BND | cidBind() - cidBind() called more than once
cid_ERROR_BIND_CFG | cidBind() - configuration parameter is NULL
cid_ERROR_BIND_CREATE | cidBind() - cidCreate() was not called
cid_ERROR_BIND_PARAMS cidBind() - one or more of the following parameter errors:
mod not NULL and modCtrl is NULL
mod is NULL and modCtrl not NULL
demod not NULL and demodCtrl is NULL
demod is NULL and demodCtrl not NULL
mod and demod both NULL
cid_ERROR_BIND_FSM cidBind() - one or more of the following results in the linking of unused functions:
The standard is cid_STD_UNDEFINED and there is a non-NULL fsm pointer.
mod is NULL but one or more standards defines a non-NULL generation fsm pointer
demod is NULL but one or more standards defines a non-NULL detection fsm pointer

Definition at line 34 of file cid.h.


CID: CID Exception Codes

CID Exception Codes
[CID]

Collaboration diagram for CID Exception Codes:

Detailed Description

These are the exception codes for the CID component.

CID Exception Codes

enum {
cid_EXC_OPEN = 1, cid_EXC_DELETE = 2, cid_EXC_FRAMESIZE = 3, cid_EXC_CONTROL = 4,
cid_EXC_DST_NTT = 5, cid_EXC_GST_NTT = 6, cid_EXC_DST = 7
}

Enumeration Type Documentation

anonymous enum

Enumerator:
cid_EXC_OPEN | Opened an already open channel
cid_EXC_DELETE | Deleted an open instance
cid_EXC_FRAMESIZE | bad frame size
cid_EXC_CONTROL | Control request received by a closed channel
cid_EXC_DST_NTT | bad DST_NTT state
cid_EXC_GST_NTT | bad GST_NTT state
cid_EXC_DST | bad state

Definition at line 179 of file cid.h.


CID: CID (Caller ID) Package

CID (Caller ID) Package

Release 2.1.1.0

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The Caller ID Component (CID)

The Caller ID component comes as an extension of Automatic Number Identification (ANI), a method used by telephone companies to identify the billing account for a toll call. The real Calling Number Delivery (CND) to the called party that allows one to see the number of the person who is ringing you became possible with the implementation of Signaling System 7 (SS7). This aspect of SS7 is known as Calling Party Number Message (CPNM).

Additional links: Detailed CID Description

Integration

The CID component can be integrated into a system to provide Caller ID generation and detection as described at the below link. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the CID code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | CID External API
 | CID Integration

Default Configuration

Most configuration is performed during system initialization, prior to the creation of any CID instances. The majority of this pre-configuration is performed by the API function cidBind(). Follow the cidBind() link for further details.

The cidOpenConfig_t structure defines the required parameters to open a CID instance. The only configuration parameters specified in this structure is the operational frame size.

Additional links: | CID Generator Configuration
 | CID Detector Configuration
 | CID by Region

Performance

Only the Physical and Data Link layers of Caller ID generation and detection are supported. The application/host should provide the information field and the message type, while the CID component performs the necessary formatting, modulation/demodulation, and error detection (parity, CRC, and checksum). The CID component has no extra limitation on the message length, except any limitations implied by CID standards.

Generation

The caller ID information, which includes the phone number, name, and time, passed given via a control message. The generator is responsible for generatinge the modulated caller ID signal based on this message. The Caller ID generator provides both Type I and Type II support. Type II allows the support of Call Waiting functionality.

Generation

When the Caller ID detector receives a message, it demodulates the message. If a valid Caller ID message is detected, it reports the demodulated message. If any error condition occurred during the detection, it reports the error condition. In CID detection, if a preamble is detected, the voice path is muted by the CID.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

Besides the standard caller identification information, additional voice-band data listed below can be transmitted using the same Physical and Data Link layer functionalities.

  • Message Waiting Indicators.
  • Advice of Charge.
  • Short Message Services

However, as these additional features are part of Presentation layer, they are not supported in the CID module. The Caller ID Module supports (in-band) only the Physical and Data Link layers.

Another limitation in this implementation is that it is half-duplex operation, i.e., it is not possible to have the CID detector and generator running simultaneously.

Standards Compliance

There are two standards at the Physical layer to which the caller ID signal generation and detection comply:

  1. Bell 202 (Bellcore)
  2. V.23 (NTT and ETSI)

Important differences between the standards arise at the Data Link layer. The major standards are:

  1. New Zealand, Singapore, and USA
  2. BT standards in the UK
  3. DTMF-based in Brazil, Belgium, Denmark, Finland, Iceland, India, Netherlands, Saudi Arabia, Sweden, and Uruguay
  4. ETSI in France, Germany, Norway, Italy, Spain, South Africa, and Turkey
  5. NTT standard in Japan
  6. YDN standard in China

Additional links: | Detailed Standard Compliance
 | CID by Region

Dependent Packages

The CID package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

CID Required Packages
Package | File Name | Compatibility Key
ti.mas.cid | ti_mas_cid_<fmt>_c<rtarg>_2_1_0_0.zip | [3,0,1,0]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


CID: CID Integration

CID (Caller ID) Package

CID Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking CID with System
  • Initialization Structures

XDC Build Process

Required Tools

The following tools are required to build the CID component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.0.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the CID package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in CID Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the CID using the XDC tools, change to the CID directory and proceed.

With the environment configured, XDC may be eployed to build the CID and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the CID packages. The first two commands provide a means to clean and build the CID package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the CID and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., CID).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated CID build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the CID for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the CID as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated CID build files as in (1) above
    • Removes all generated build files for all CID dependent packages

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking CID with System

The CID and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /cid
               /types
               /util

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the CID API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/cid/cid.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., cid.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\cid\c<rtarg>\cid_c.a<rtarg>

Initialization Structures

The CID component "context" structure is initialized through the cidCreate() and cidBind() API functions. No static initialization is required.


CID: Memory Requirements

CID (Caller ID) Package

Memory Requirements

Page Contents

  1. Data Memory Requirements
  2. CID Program Memory Requirements
    • C55x Program Memory
    • C64x Program Memory
    • C64x+ Program Memory

Data Memory Requirements

CID Instance Buffers

Per Instance Data Buffers
Buffer | Size (bytes) | Alignment | Volatile | Purpose
0 | 44 | 1 | no | CID instance
1 | cidCreateConfig_t::maxFragmentSize * 2 | 0 | no | CID messages
2 | cidCreateConfig_t::maxSamplesPerFrame * 4 | 1 | yes | demodulation scratch area
3 | 44 | 1 | no | demodulator instance

Additional CID Data Memory

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 128
data/bss | 136

CID Program Memory Requirements

C55x Program Memory

C55x CID Program Memory Requirements
Section | Size | Placement | Description
.text | 6.3 Kbyte | Internal | Core CID code
.switch | 176 bytes | Internal | Switch tables
Total | 6.5 Kbyte | N/A | N/A

C64x Program Memory

C64x CID Program Memory Requirements
Section | Size | Placement | Description
.text | 13.6 Kbyte | Internal | Core CID code
.switch | 344 bytes | Internal | Switch tables
Total | 13.9 Kbyte | N/A | N/A

C64x+ Program Memory

C64x+ CID Program Memory Requirements
Section | Size | Placement | Description
.text | 11.8 Kbyte | Internal | Core CID code
.switch | 344 bytes | Internal | Switch tables
Total | 12.0 Kbyte | N/A | N/A

Notes:
  1. Kbyte in all tables above above represents 1024 bytes.


CID: MIPS Requirements

CID (Caller ID) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target

Assumptions

TBD

C55x Target

CID MIPS
Processing | Minimum | Average | Maximum
Send Direction | TBD | TBD | TBD
Receive Direction | TBD | TBD | TBD
Combined | TBD | TBD | TBD

C64x Target

CID MIPS
Processing | Minimum | Average | Maximum
Send Direction | TBD | TBD | TBD
Receive Direction | TBD | TBD | TBD
Combined | TBD | TBD | TBD

C64x+ Target

CID MIPS
Processing | Minimum | Average | Maximum
Send Direction | TBD | TBD | TBD
Receive Direction | TBD | TBD | TBD
Combined | TBD | TBD | TBD


CID: Module Index

CID Modules

Here is a list of all modules:
  • CID
    • ECO API return codes
    • CID Report Codes
    • CID Exception Codes


CID: Page Index

CID Related Pages

Here is a list of all related documentation pages:
  • Disclaimer


CID: Detailed Standard Compliance

CID (Caller ID) Package

Detailed Standard Compliance

The CID component complies with the following standards:

  • Bellcore Technical Reference TR-NWT-000031, issue 4, December 1992

  • Bellcore Special Report SR-3004, issue 2, January 1995

  • Bellcore Technical Reference TR-NWT-001188, issue 1, December 1991

  • Bellcore Generic Requirements GR-30-CORE, issue 1, December 1994

  • Bellcore Special Report SR-TSV-002476, issue 1, December 1992

  • Bell 212 A - Synchronous/ asynchronous data transmission, full-duplex operation over 2-wire leased or dialup lines; 1200-bps data rate

  • CLASSSM Feature: Calling Number Delivery

  • CLASSSM Feature: Calling Name Delivery Generic Requirements

  • LSSGR: Voiceband Data Transmission Interface Section 6.6

  • Customer Premises Equipment Compatibility Considerations for the Voiceband Data Transmission Interface

  • Testing Guidelines for Analog Type 1, 2, and 3 CPE as Described in SR-INS-002726

  • Subscriber line protocol over the local loop for display (and related) services, ETSI EN 300 659

  • YDN 069 - 1997, Chinese Caller ID Standard Draft

  • BT SIN 227, CDS Calling Line Identification Service

  • BT SIN 242, CDS Calling Line Identification Service

  • DC.002 Data Transmission to CPE for Presentation Features, Network Products Signaling, Interworking & Standards, Technical Reference - Analogue Supplementary Services, 4 June 1998.

  • Telephone Service Interfaces Edition 5 - Nippon Telegraph and Telephone Corporation (NTT)

  • ITU-T Recommendation V.23, 11-1988, 600/1200-baud modem standardized for use in the general switched telephone network


CID: cidBindConfig_t Struct Reference

  • Data Structures
  • Data Fields

cidBindConfig_t Struct Reference
[CID]

#include <cid.h>

Collaboration diagram for cidBindConfig_t:

[legend]

Detailed Description

Configuration structure passed to cidBind().

Definition at line 289 of file cid.h.

Data Fields

void(* | mod )(void *, linSample *)
tbool(* | modCtrl )(void *, cidCtlMsg_t *)
void(* | demod )(void *, linSample *)
tbool(* | demodCtrl )(void *, cidCtlMsg_t *)
cidBindStandard_t | cidBindStandard [cid_MAXNUM_STANDARDS]

Field Documentation

void(* cidBindConfig_t::mod)(void *, linSample *)

modulator function for generation

tbool(* cidBindConfig_t::modCtrl)(void *, cidCtlMsg_t *)

modulator control function

void(* cidBindConfig_t::demod)(void *, linSample *)

demodulator function for detection

tbool(* cidBindConfig_t::demodCtrl)(void *, cidCtlMsg_t *)

demodulator control function

cidBindStandard_t cidBindConfig_t::cidBindStandard[cid_MAXNUM_STANDARDS]

Definition at line 294 of file cid.h.

The documentation for this struct was generated from the following file:
  • cid.h


CID: cidBindStandard_t Struct Reference

  • Data Structures
  • Data Fields

cidBindStandard_t Struct Reference
[CID]

#include <cid.h>

Detailed Description

Standard related information in cidBindConfig_t structure.

Definition at line 277 of file cid.h.

Data Fields

tuint | standard
tint(* | gnrt_fsm )(void *)
void(* | dtct_fsm )(void *, tint)

Field Documentation

tuint cidBindStandard_t::standard

CID standard. Definitions start at cid_STD_US.
disables caller ID in this element

Definition at line 278 of file cid.h.

tint(* cidBindStandard_t::gnrt_fsm)(void *)

generation FSM function pointer: cidGnrtFsmUsEtsi(), cidGnrtFsmNtt() or NULL (generation disabled for this standard)

void(* cidBindStandard_t::dtct_fsm)(void *, tint)

detection FSM function pointer: cidDtctFsmUsEtsi(), cidDtctFsmNtt() or NULL (detection disabled for this standard)

The documentation for this struct was generated from the following file:
  • cid.h


CID: cidCreateConfig_t Struct Reference

  • Data Structures
  • Data Fields

cidCreateConfig_t Struct Reference
[CID]

#include <cid.h>

Detailed Description

Configuration structure passed to cidCreate().

Definition at line 237 of file cid.h.

Data Fields

dbgInfo_t | debugInfo
void(* | reportOutFcn )(tuint ID, tint rcode, tint final_state, tint dropout_ct, tint bad_mtype_ct, tint type, tint len, tuint *msg, tint len_in_word)
reportOutFcn is a callback function to report generator or detector events.
tint | maxSamplesPerFrame
tint | maxFragmentSize

Field Documentation

dbgInfo_t cidCreateConfig_t::debugInfo

Debug callback function. dbgInfo_t is defined in the ti.mas.util package.

Definition at line 238 of file cid.h.

void(* cidCreateConfig_t::reportOutFcn)(tuint ID, tint rcode, tint final_state, tint dropout_ct, tint bad_mtype_ct, tint type, tint len, tuint *msg, tint len_in_word)

reportOutFcn is a callback function to report generator or detector events.

Parameters:
[in] ID Instance ID passed to cidNew.
[in] rcode Report code. Definitions start at cid_RPT_VALID_DTCT.
[in] final_state Detector or generator state.
[in] dropout_ct Dropout count. The detector increments this count when an error in the Channel Seizure Signal is found.
[in] bad_mtype_ct Bad message type count. The detector increments this count when an undefined message type is found.
[in] type Message type as defined by CID standard being used.
[in] len Total number of bytes in CID message or the offset within the message of where the segment starts if the
generator requests a new segment.
[in] msg Pointer to CID message.
[in] len_in_word Number of words in current CID message or the number of words requested if the generator is requesting
a new segment.

tint cidCreateConfig_t::maxSamplesPerFrame

Maximum number of samples per frame. Used by cidGetSizes() to determine the size of the demodulation work buffer.

Definition at line 268 of file cid.h.

tint cidCreateConfig_t::maxFragmentSize

Maximum count of type tuint that can fit into message buffer.

Definition at line 270 of file cid.h.

The documentation for this struct was generated from the following file:
  • cid.h


CID: cidCtlMsg_t Struct Reference

  • Data Structures
  • Data Fields

cidCtlMsg_t Struct Reference
[CID]

#include <cid.h>

Detailed Description

Control message structure. Defines the message specific content fields for each
of the control messages passed to cidControl(). The value stored in the ctlCode field
determines which fields in the cidCtlMsg_t structure are to be set.
  • If a generator related control code is being passed, the fields in the gnrt structure are set.
  • If a detector related control code is being passed, the fields in the dtct structure are set.
  • If the cid_CTL_MULTI_RQST control code is being passed, the fields in the mgnrt structure are set.

Definition at line 206 of file cid.h.

Data Fields

tint | ctlCode
tbool | call_waiting
union {
struct {
tuint marks_gain
tint msg_type
tint msg_length
tuint * msg
} gnrt
struct {
tint fragment_offset
tint fragment_size
tuint * msg
} mgnrt
struct {
tuint timeout
tint direction
tint leading_marks
} dtct
} u

Field Documentation

tint cidCtlMsg_t::ctlCode

control code

Definition at line 207 of file cid.h.

tbool cidCtlMsg_t::call_waiting

TRUE: caller ID with call waiting FALSE: simple caller ID

Definition at line 208 of file cid.h.

tuint cidCtlMsg_t::marks_gain

bit field indicating count of leading marks (upper 10 bits) and output gain (lower 6 bits)

Definition at line 212 of file cid.h.

tint cidCtlMsg_t::msg_type

low 8 bits contains message type

Definition at line 214 of file cid.h.

tint cidCtlMsg_t::msg_length

message length in bytes

Definition at line 215 of file cid.h.

tuint* cidCtlMsg_t::msg

msg bytes packeted in words(big endian)

Definition at line 216 of file cid.h.

struct { ... } cidCtlMsg_t::gnrt

tint cidCtlMsg_t::fragment_offset

Fragment byte offset (w.r. complete long message)

Definition at line 220 of file cid.h.

tint cidCtlMsg_t::fragment_size

Fragment size in bytes

Definition at line 221 of file cid.h.

tuint* cidCtlMsg_t::msg

Definition at line 222 of file cid.h.

struct { ... } cidCtlMsg_t::mgnrt

tuint cidCtlMsg_t::timeout

the time interval (in ms) within which the msg must be detected

Definition at line 226 of file cid.h.

tint cidCtlMsg_t::direction

detector position determination

Definition at line 227 of file cid.h.

tint cidCtlMsg_t::leading_marks

min qualification count of marks

Definition at line 228 of file cid.h.

struct { ... } cidCtlMsg_t::dtct

union { ... } cidCtlMsg_t::u

The documentation for this struct was generated from the following file:
  • cid.h


CID: cidNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

cidNewConfig_t Struct Reference
[CID]

#include <cid.h>

Detailed Description

Configuration structure passed to cidNew().

Definition at line 194 of file cid.h.

Data Fields

tuint ID

Field Documentation

tuint cidNewConfig_t::ID

! ID used to identify this instance.

Definition at line 195 of file cid.h.

The documentation for this struct was generated from the following file:
  • cid.h


CID: cidOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

cidOpenConfig_t Struct Reference
[CID]

#include <cid.h>

Detailed Description

CID Open configuration structure. Contains parameters needed to open a CID instance.

Definition at line 300 of file cid.h.

Data Fields

tuint samples_per_frame

Field Documentation

tuint cidOpenConfig_t::samples_per_frame

Used by generator and detector when each frame is processed. Cannot exceed the maximum allowed value passed to cidCreate()

Definition at line 301 of file cid.h.

The documentation for this struct was generated from the following file:
  • cid.h


CID Test: Data Structures

  • Data Structures
  • Data Fields

CID Test Data Structures

Here are the data structures with brief descriptions:
gmpData_t |
gmpGmcSim_t |
siuCHSMPars_t |
siuInst_t |
siuSetup_t |
siuSGNPars_t | Control information that may be set-up from the simulator to change operating parameters


CID Test: ccs2pcm.c File Reference

  • File List
  • Globals

ccs2pcm.c File Reference

#include <stdio.h>
#include <stdlib.h>

Include dependency graph for ccs2pcm.c:

Go to the source code of this file.

Functions

void main (int argc, char *argv[])

Function Documentation

void main | ( | int | argc,
 |  | char * | argv[]
 | ) |  |

Definition at line 4 of file ccs2pcm.c.


CID Test: ccs2pcm.c Source File

  • File List
  • Globals

ccs2pcm.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003
00004 void main(int argc, char *argv[]) {
00005 FILE *fin = fopen (argv[1], "rt");
00006 FILE *fout = fopen (argv[2], "wb");
00007 int i;
00008 char line_in[80];
00009 short sample_out;
00010
00011 fgets(line_in, 80, fin);
00012 for (i = 0; ; i ++) {
00013   if(fgets(line_in, 80, fin) == NULL)
00014     break;
00015   if(argv[3][0] == 'h')
00016     sscanf(line_in, "%x", &sample_out);
00017   else
00018     sscanf(line_in, "%d", &sample_out);
00019
00020   printf ("%5d", sample_out);
00021   fwrite(&sample_out, sizeof(short), 1, fout);
00022 }
00023 printf ("%d samples converted\n", i);
00024 fclose(fin);
00025 fclose(fout);
00026 }


CID Test: cidsim.c File Reference

  • File List
  • Globals

cidsim.c File Reference

Detailed Description

CID test main program.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file cidsim.c.

#include <stdio.h>
#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/cid/cid.h>
#include <ti/mas/util/wng.h>
#include <ti/mas/sdk/sgn.h>

Include dependency graph for cidsim.c:

Go to the source code of this file.

Data Structures

struct | siuInst_t
struct | siuSGNPars_t
Control information that may be set-up from the simulator to change operating parameters. More...
struct | siuCHSMPars_t
struct | siuSetup_t

Defines

#define | SIU_FRAME_LENGTH 40
#define | SIU_NUMBER_OF_CHANNELS 2
#define | SIU_MAX_FRAME_LENGTH 44
#define | SIU_MAX_BYTES 39
#define | NUMBER_OF_FRAMES 1
#define | MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
#define | MSG_BUF_LEN 50
#define | SIU_DBGMSG_SIZE 256
#define | loop for(;;)
#define | NTT_MSG_LENGTH 90
#define | BELLCORE_MSG_LENGTH 26

Functions

void | tstgmpInit ()
static void | siuDebugInternal (tuint id, char *str)
Debug & exception functions.
void | siuException (tuint id, char *s)
void | siuDebugInfo (void *moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *messageData)
sgnFileIo_t * | siu_rx_file (sgnFileIo_t *dsc)
void | generate_rx_frame (tint frame_size, linSample *frame)
Generate rx sample frames.
void | siuChSim (void *sample_in)
Simulate PCM channel, introduce distortion, etc.
void | siuCidRptIn (tuint ID, tint rcode, tint final_state, tint dropout_ct, tint bad_mtype_ct, tint type, tint len, tuint *msg, tint len_in_word)
Save the CID report into buffer.
void | siu_new_cid (tint chnum)
Creates a CID instance.
void | siu_open_cid (tint chnum)
Opens a CID instance.
void | siu_close_cid (tint chnum)
void | siu_delete_cid (tint chnum)
void | siu_open_csm ()
Open channel simulator.
void | siu_open_rxsgn (tint chnum)
Open Rx Signal Generator.
void | siu_set_sgn (void *inst, siuSGNPars_t *sgn)
Set signal generator parameters.
int | main (int argc, char *argv[])

Variables

linSample | siuRxInStream [MAX_STREAM_SIZE]
linSample | siuPcmOutStream [MAX_STREAM_SIZE]
linSample | siuPcmInStream [MAX_STREAM_SIZE]
tint | v21_flags = 0x7e7e
const tint | tblUlaw []
const tint | tblAlaw []
siuInst_t | siuInst [SIU_NUMBER_OF_CHANNELS]
linSample * | frame_in
char | siu_dbg_message [SIU_DBGMSG_SIZE]
tuint | siu_dbg_id
tint | rptBuff
tuint | multi_msg_idx = 0
tuint | multi_msg_len = 0
tint * | multi_msg
void * | sgnRxInst = (void *) NULL
tint | flog = 0
struct {
tint nscale
tuint rng_state
} csmInst
cidBindConfig_t | cidBindConfig
tint | ntt_message []
tint | bellcore_message []
siuSetup_t siuSetup
volatile tbool | glob_flg
tuint | glob_msgLength
tuint | glob_moduleID
tuint | glob_msgType
tuint | glob_messageCode
tuint | glob_msgData [4]

Variable Documentation

tint nscale

Definition at line 89 of file cidsim.c.

tuint rng_state

Definition at line 90 of file cidsim.c.


CID Test: cidsim.c Source File

  • File List
  • Globals

cidsim.c

Go to the documentation of this file.
00001
00011 /* @{ */
00012
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/util/ecomem.h>
00018 #include <ti/mas/fract/fract.h>
00019 #include <ti/mas/util/utl.h>
00020
00021 #include <ti/mas/cid/cid.h>
00022 //#include <ti/mas/cid/src/cidloc.h>
00023
00024 /* Test include files */
00025 #include <ti/mas/util/wng.h>
00026 #include <ti/mas/sdk/sgn.h>
00027
00028 /* Current frame length */
00029 #define SIU_FRAME_LENGTH 40
00030
00031 #define SIU_NUMBER_OF_CHANNELS 2
00032
00033 #define SIU_MAX_FRAME_LENGTH 44 /* 5.5 ms */
00034 /* Bellcore - 39, ETSI - 106, NTT - 39. Bounds imposed by SIU message buffer
00035  * limitation. */
00036 #define SIU_MAX_BYTES       39
00037
00038 #define NUMBER_OF_FRAMES    1   /* # of frames to save */
00039 #define MAX_STREAM_SIZE    (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
00040 #define MSG_BUF_LEN         50  /* message buffer length */
00041
00042 /* PCM streams */
00043 linSample siuRxInStream[MAX_STREAM_SIZE];
00044 linSample siuPcmOutStream[MAX_STREAM_SIZE];
00045 linSample siuPcmInStream[MAX_STREAM_SIZE];
00047 /* For SGN FSK */
00048 tint v21_flags = 0x7e7e;
00049
00050 extern void tstgmpInit();
00051
00052 extern const tint tblUlaw[];
00053 extern const tint tblAlaw[];
00054
00055 /* Global SIU instance structure */
00056 typedef struct {
00057   ecomemBuffer_t *cidBufs;  /* Pointer to base of CID buffer space */
00058
00059   /* CID elements */
00060   tuint ID;                 /* ID of current SIU instance */
00061   void  *cidInst;           /* CID instance pointer */
00062   tint  cidNbufs;           /* Number of allocated CID buffers */
00063   tint  cid_heap_size;      /* Heap allocation for CID */
00064
00065   /* Other elements */
00066   tint aux_heap_size;       /* Auxiliary heap allocation */
00067 } siuInst_t;
00068
00069
00070 /* Global variables */
00071 siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS];
00072 linSample *frame_in;
00073
00074
00075 #define SIU_DBGMSG_SIZE 256
00076 char siu_dbg_message [SIU_DBGMSG_SIZE];
00077 tuint siu_dbg_id;
00078 tint rptBuff;
00079 tuint multi_msg_idx = 0;
00080 tuint multi_msg_len = 0;
00081 tint *multi_msg;
00082
00083 /* Signal Generator Instances */
00084 void *sgnRxInst = (void *) NULL;
00085 tint flog = 0;
00086
00087 /* Channel Simulator Instance */
00088 struct {
00089   tint    nscale;
00090   tuint   rng_state;
00091 } csmInst;
00092
00093 /* Useful macros */
00094 #define loop    for(;;)     /* endless loop */
00095
00096 cidBindConfig_t cidBindConfig = {
00097   cidModulator,
00098   cidModCtrl,
00099   cidDetect,
00100   cidDemodCtrl,
00101   {
00102
00103     {
00104       cid_STD_US,
00105       cidGnrtFsmUsEtsi,
00106       cidDtctFsmUsEtsi,
00107     },
00108     {
00109       cid_STD_AUS,
00110       cidGnrtFsmUsEtsi,
00111       cidDtctFsmUsEtsi,
00112     },
00113     {
00114       cid_STD_BT,
00115       cidGnrtFsmUsEtsi,
00116       cidDtctFsmUsEtsi,
00117     },
00118     {
00119       cid_STD_NTT,
00120       cidGnrtFsmNtt,
00121       cidDtctFsmNtt,
00122     },
00123     {
00124       cid_STD_ETSI,
00125       cidGnrtFsmUsEtsi,
00126       cidDtctFsmUsEtsi,
00127     },
00128     {
00129       cid_STD_YDN,
00130       cidGnrtFsmUsEtsi,
00131       cidDtctFsmUsEtsi,
00132     },
00133
00134   }
00135 };
00136
00137 #define NTT_MSG_LENGTH 90
00138 tint ntt_message[] =
00139 {
00140   0x020a, 0x1011, 0x1213, 0x1415, 0x1617, 0x1819, 0x2021, 0x2223, 0x2425,
00141   0x2627, 0x2829, 0x3031, 0x3233, 0x3435, 0x3637, 0x3839, 0x4041, 0x4243,
00142   0x4445, 0x4647, 0x4849, 0x5051, 0x5253, 0x5455, 0x5657, 0x5859, 0x6061,
00143   0x6263, 0x6465, 0x6667, 0x6869, 0x7071, 0x7273, 0x7475, 0x7677, 0x7879,
00144   0x1a1b, 0x1c1d, 0x1e1f, 0x2a2b, 0x2c2d, 0x2e2f, 0x3a3b, 0x3c3d, 0x3e3f
00145 };
00146
00147 #define BELLCORE_MSG_LENGTH 26
00148 tint bellcore_message[] =
00149 {
00150   0x0216, 0x3033, 0x3531, 0x2d33, 0x3231, 0x3030, 0x3334,
00151           0x3536, 0x3738, 0x3930, 0x3132, 0x3334, 0x3938
00152 };
00153
00157 typedef struct {
00158   tbool      state;
00159   linSample dcoffset;
00160   tint      wftype;
00161   tint      f1;
00162   tint      f2;
00163   linSample amp1;
00164   linSample amp2;
00165   tint      nlevel;
00166   tuint     nseed;
00167   tint      ntype;
00168   tint      pow_level;
00169   tuint     hoth_seed;
00170 } siuSGNPars_t;
00171
00172 /* Channel Simulator Parameters */
00173 typedef struct {
00174   tbool      chnl_sim_on;
00175   tint      nlevel;
00176   tuint     nseed;
00177 } siuCHSMPars_t;
00178
00179 typedef struct {
00180   tint          pcm_bits;
00181   tint          frame_size;
00182   tint          tog_cid1;
00183   cidCtlMsg_t   cid_ctlMsg1;
00184   tint          tog_cid2;
00185   cidCtlMsg_t   cid_ctlMsg2;
00186   tbool          tog_chnl_sim;
00187   siuCHSMPars_t chSim;
00188   tbool          tog_rx_SGN;
00189   siuSGNPars_t  rxSGN;
00190 } siuSetup_t;
00191
00192 siuSetup_t siuSetup = {
00193   8,
00194   40,
00195   FALSE,
00197   /* cidCtlMsg_t cid_ctlMsg1 for channel 1 */
00198   {
00199     -1,
00200     FALSE,
00202     /* union for gnrt structure */
00203     {
00204       0x0000,
00205       0x080,
00206       BELLCORE_MSG_LENGTH,
00207       (tuint *)bellcore_message
00208     },
00209
00210   },
00211
00212   FALSE,
00214   /* cidCtlMsg_t cid_ctlMsg2 for channel 2 */
00215   {
00216     -1,
00217     FALSE,
00219     /* union for dtct structure */
00220     {
00221       9999,
00222       0
00223     },
00224
00225   },
00226
00227
00228   FALSE,
00230   /* siuCHSMPars_t chSim: Channel Simulator Parameters */
00231   {
00232     FALSE,
00233     -40,
00234     1531
00235   },
00236
00237
00238   FALSE,
00240   /* siuSGNPars_t rxSGN: Rx Signal Generator Parameters */
00241   {
00242     TRUE,
00243     0,
00244     sgn_WFT_SAWTOOTH,
00245     1000, 0,
00246     0, 0,
00247     0,
00248     1531,
00249     sgn_NT_GAUSS,
00250     -70,
00251     18401
00252   },
00253 };
00254
00257 static inline void siuDebugInternal (tuint id, char *str)
00258 {
00259   tint i;
00260   char *src;
00261   char *dst;
00262
00263   printf("ID=%d %s\n", id, str);
00264
00265   /* Copy id and message in a safe place */
00266   siu_dbg_id = id;
00267   src = str;
00268   dst = (char*) &siu_dbg_message[0];
00269   for (i=0; i<SIU_DBGMSG_SIZE; i++) {
00270     *dst++ = *src++;
00271   }
00272 } /* siuDebugInternal */
00273
00274 void siuException (tuint id, char *s)
00275 {
00276   volatile tint exit_code = 0;
00277   siuDebugInternal (id, s);
00278
00279   loop {
00280     if(exit_code)
00281       break;
00282   };     /* loop forever */
00283 } /* siuException */
00284
00285 volatile tbool glob_flg;
00286 tuint glob_msgLength;
00287 tuint glob_moduleID, glob_msgType, glob_messageCode;
00288 tuint glob_msgData[4];
00289
00290 void siuDebugInfo (void * moduleID, tuint msgType, tuint messageCode,
00291                    tuint msgLength, tuint *messageData) {
00292   tint i;
00293   glob_flg         = TRUE;
00294   glob_moduleID    = *((tuint *) moduleID);
00295   glob_msgType     = msgType;
00296   glob_messageCode = messageCode;
00297   glob_msgLength   = msgLength;
00298   for (i = 0; i < msgLength; i ++)
00299     glob_msgData[i++] = messageData[i];
00300
00301   /* get stuck here, as long as glob_flg is TRUE */
00302   while(glob_msgLength);
00303
00304 } /* debug info */
00305
00306 /* Rx file inputs */
00307 sgnFileIo_t *siu_rx_file (sgnFileIo_t *dsc)
00308 {
00309 #ifndef _HWDKST
00310   asm (" nop");
00311   asm (" nop");
00312   asm (" nop");
00313   asm (" nop");
00314   asm (" nop");
00315   asm (" nop");
00316 #endif
00317   return (dsc);
00318 } /* siu_rx_file */
00319
00320 /* ============ generate_rx_frame () ========== */
00329 void generate_rx_frame (tint frame_size, linSample *frame)
00330 {
00331   int k;
00332
00333   if (siuSetup.rxSGN.state) {                         /* rx SGN is on */
00334     sgnGenerateFrame (sgnRxInst, frame_size, frame);  /* Generate a frame */
00335   }
00336   else {                                              /* SGN is off */
00337     for (k = 0; k < frame_size; k++)                  /* send a 0 frame */
00338       frame[k] = 0;
00339   }
00340 } /* generate_rx_frame */
00341
00342 /* ============ siuChSim () ========== */
00349 void siuChSim (void *sample_in)
00350 {
00351   int i;
00352   linSample *sample = (linSample *) sample_in;
00353
00354   /* Save output from CID generator into buffer */
00355   for (i = 0; i < siuSetup.frame_size; i++) {
00356     siuPcmOutStream[i] = sample[i];
00357   }
00358
00359   /* Channel Simulator */
00360   if (siuSetup.chSim.chnl_sim_on) {
00361     /* add noise */
00362     for (i=0; i<siuSetup.frame_size; i++) {
00363       sample[i] += wngGenNoiseSample (csmInst.nscale, &csmInst.rng_state);
00364     }
00365   }
00366 } /* siuChSim */
00367
00368
00369 /* ============ siuCidRptIn () ========== */
00392 void siuCidRptIn (tuint ID, tint rcode, tint final_state,
00393                   tint dropout_ct, tint bad_mtype_ct, tint type, tint len,
00394                   tuint *msg, tint len_in_word)
00395 {
00396   tint  i;
00397
00398   printf ("siuCidRptIn(): ID=%d rcode=%d length=%d word length=%d\n", ID, rcode,
00399           len, len_in_word);
00400
00401   if (rcode == cid_RPT_MULTI_RQST) {
00402     multi_msg_idx = len;
00403     multi_msg_len = len_in_word;
00404     siuSetup.tog_cid1 = 9; /* This will initiate a cid_CTL_MULTI_RQST message */
00405   }
00406   else if (rcode == cid_RPT_GNRT_DEACT) {
00407     if (ID == 1) {
00408       siuSetup.tog_cid1 = 10;
00409     }
00410     else {
00411       siuSetup.tog_cid2 = 10;
00412     }
00413   }
00414   else {
00415     for (i=0; i<len_in_word; i++) {
00416       printf("msg[%d]=0x%x\n", i, msg[i]);
00417     }
00418   }
00419 } /* siuCidRptIn */
00420
00421
00422 /* ============ siu_new_cid () ========== */
00429 void siu_new_cid (tint chnum)
00430 {
00431   int i;
00432   tint stat, cidNbufs;
00433   siuInst_t            *inst = &siuInst[chnum - 1];
00434   const ecomemBuffer_t *bufs;
00435   ecomemBuffer_t       *cidBufs;
00436   cidNewConfig_t        cidCfgNew;
00437
00438   /* CID get sizes */
00439   stat = cidGetSizes (&cidNbufs, &bufs);
00440
00441   if (stat != cid_NOERR) {
00442     siuException (chnum, "Error in GetSizes");
00443   }
00444
00445   cidBufs = (ecomemBuffer_t*)malloc (cidNbufs*sizeof(ecomemBuffer_t));
00446   inst->aux_heap_size += cidNbufs * sizeof(ecomemBuffer_t);
00447
00448   if (cidBufs == NULL) {
00449     siuException (chnum, "No memory");
00450   }
00451
00452   /* assume all buffers are in external memory, no alignment requests */
00453   for (i = 0; i < cidNbufs; i++) {
00454     cidBufs[i] = bufs[i];
00455     cidBufs[i].volat  = FALSE;
00456     if(bufs[i].size) {
00457       cidBufs[i].base   = malloc (bufs[i].size);
00458       if (cidBufs[i].base == NULL) {
00459         siuException (chnum, "No memory");
00460       }
00461     }
00462     else {
00463       cidBufs[i].base   = NULL;
00464     }
00465   }
00466
00467   /* cidNew */
00468   cidCfgNew.ID        = chnum;
00469
00470   /* Need these as a handle to delete this channel's CID someday */
00471   inst->cidInst = NULL;
00472   inst->cidNbufs = cidNbufs;
00473   inst->cidBufs  = &cidBufs[0];
00474
00475   stat = cidNew (&inst->cidInst, cidNbufs, cidBufs, &cidCfgNew);
00476   if (stat != cid_NOERR) {
00477     siuException (chnum, "Errors in cidNew");
00478   }
00479 } /* siu_new_cid */
00480
00481
00482 /* ============ siu_open_cid () ========== */
00489 void siu_open_cid (tint chnum)
00490 {
00491   cidOpenConfig_t cidCfg;
00492   tint stat;
00493   siuInst_t      *inst = &siuInst[chnum - 1];
00494
00495   cidCfg.samples_per_frame = SIU_FRAME_LENGTH;
00496
00497   stat = cidOpen (inst->cidInst, &cidCfg);
00498
00499   if (stat != cid_NOERR) {
00500     siuException (chnum, "Error in cidOpen");
00501   }
00502 } /* siu_open_cid */
00503
00504 /******************************************************************************
00505  * FUNCTION PURPOSE: Close CID module
00506  ******************************************************************************
00507  * DESCRIPTION: Closes one instance of a CID module
00508  *
00509  * CALLING FORMAT:
00510  *   siu_close_cid   (tint chnum)      - channel number
00511  *
00512  * RETURN VALUES:
00513  *   None
00514  *
00515  *****************************************************************************/
00516
00517 void siu_close_cid (tint chnum)
00518 {
00519   siuInst_t *inst = &siuInst[chnum - 1];
00520   cidClose (inst->cidInst);
00521 } /* siu_close_cid */
00522
00523
00524 /******************************************************************************
00525  * FUNCTION PURPOSE: Delete CID module
00526  ******************************************************************************
00527  * DESCRIPTION: Deletes one instance of a CID module
00528  *
00529  * CALLING FORMAT:
00530  *   siu_delete_cid  (tint chnum)      - channel number
00531  *
00532  * RETURN VALUES:
00533  *   None
00534  *
00535  *****************************************************************************/
00536 void siu_delete_cid (tint chnum)
00537 {
00538   tint i;
00539   siuInst_t *inst = &siuInst[chnum - 1];
00540   cidDelete (&(inst->cidInst),inst->cidNbufs,inst->cidBufs);
00541
00542   /* Free memory allocated for CID buffers & adjust cid_heap_size */
00543   for (i = 0; i < inst->cidNbufs; i++)
00544   {
00545      free (inst->cidBufs[i].base);
00546    inst->cid_heap_size -= inst->cidBufs[i].size;
00547   }
00548
00549   /* Free memory for CID buffer descriptors & adjust aux_heap_size */
00550   free (inst->cidBufs);
00551   inst->cidBufs = NULL;
00552   inst->aux_heap_size -= inst->cidNbufs * sizeof(ecomemBuffer_t);
00553   inst->cidNbufs = 0;
00554 } /* siu_delete_cid */
00555
00556 /* ============ siu_open_csm () ========== */
00561 void siu_open_csm ()
00562 {
00563   /* initialize white noise generator */
00564   wngInit (siuSetup.chSim.nlevel, siuSetup.chSim.nseed, &csmInst.nscale,
00565            &csmInst.rng_state);
00566 } /* siu_open_csm */
00567
00568 /* ============ siu_open_csm () ========== */
00573 void siu_open_rxsgn (tint chnum)
00574 {
00575   sgnConfig_t cfg;
00576   tint sgnSize;
00577   tint retVal;
00578
00579   /* Init SGN */
00580   retVal = sgnGetSizes(&sgnSize);
00581   if (retVal != sgn_NOERR){
00582     siuException (chnum, "Error in sgnCreate");
00583   }
00584   sgnRxInst = malloc (sgnSize);
00585
00586   /* Configure SGN */
00587   cfg.dc_offset     = siuSetup.rxSGN.dcoffset;
00588   cfg.wf_type       = siuSetup.rxSGN.wftype;
00589   cfg.f1            = siuSetup.rxSGN.f1;
00590   cfg.f2            = siuSetup.rxSGN.f2;
00591   cfg.t_amp1        = siuSetup.rxSGN.amp1;
00592   cfg.t_amp2        = siuSetup.rxSGN.amp2;
00593   cfg.pr_period     = 1000;       /* # of samples between phase reversals */
00594   cfg.pr_enable     = FALSE;      /* disable phase reversal */
00595   cfg.noise_level   = siuSetup.rxSGN.nlevel;
00596   cfg.noise_seed    = siuSetup.rxSGN.nseed;
00597   cfg.noise_type    = siuSetup.rxSGN.ntype;
00598   cfg.fsk_duration  = 90;         /* 90/300 = 300ms */
00599   cfg.fsk_dataptr   = &v21_flags;
00600   cfg.fsk_numword   = 1;          /* 1 word for V21 flags */
00601   cfg.power_level   = siuSetup.rxSGN.pow_level;
00602   cfg.hoth_wng_seed = siuSetup.rxSGN.hoth_seed;
00603   cfg.file_io_fcn   = siu_rx_file;
00604   cfg.exception     = siuException;
00605   cfg.debug         = siuDebugInternal;
00606
00607   sgnInit (sgnRxInst, &cfg);
00608 } /* siu_open_rxsgn */
00609
00610 /* ============ siu_set_sgn () ========== */
00619 void siu_set_sgn (void *inst, siuSGNPars_t *sgn)
00620 {
00621   sgnControl_t  ctl;
00622
00623   if (sgn->state) {
00624     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00625       ctl.code          = sgn_CTL_CSS_POW;
00626       ctl.u.power_level = sgn->pow_level;
00627     }
00628     else if (sgn->wftype == sgn_WFT_HOTH) {
00629       ctl.code          = sgn_CTL_HOTH_POW;
00630       ctl.u.power_level = sgn->pow_level;
00631     }
00632     else {
00633       ctl.code      = sgn_CTL_TONE;
00634       ctl.u.t.f1    = sgn->f1;
00635       ctl.u.t.f2    = sgn->f2;
00636       ctl.u.t.amp1  = sgn->amp1;
00637       ctl.u.t.amp2  = sgn->amp2;
00638     }
00639     sgnControl (inst, &ctl);
00640
00641     ctl.code           = sgn_CTL_NOISE;
00642     ctl.u.noise_level  = sgn->nlevel;
00643   }
00644   else {
00645     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00646       ctl.code          = sgn_CTL_CSS_POW;
00647       ctl.u.power_level = -80;
00648     }
00649     else if (sgn->wftype == sgn_WFT_HOTH) {
00650       ctl.code          = sgn_CTL_HOTH_POW;
00651       ctl.u.power_level = -80;
00652     }
00653     else {
00654       ctl.code     = sgn_CTL_TONE;
00655       ctl.u.t.f1   = sgn->f1;
00656       ctl.u.t.f2   = sgn->f2;
00657       ctl.u.t.amp1 = 0;
00658       ctl.u.t.amp2 = 0;
00659     }
00660     sgnControl (inst, &ctl);
00661
00662     ctl.code           = sgn_CTL_NOISE;
00663     ctl.u.noise_level  = -80;
00664   }
00665   sgnControl (inst, &ctl);
00666 } /* siu_set_sgn */
00667
00668
00669 /******************************************************************************
00670  * FUNCTION PURPOSE: Main program.
00671  ******************************************************************************
00672  * DESCRIPTION: Main program. Starts the system.
00673  *
00674  *****************************************************************************/
00675 int main (int argc, char *argv[])
00676 {
00677   int i;
00678   tbool rxReplace, genWork;
00679   tint chnum, frame_size, error;
00680   cidCreateConfig_t create_cfg;
00681
00682   printf("START TEST\n");
00683
00684   /*-----------------------------*/
00685   /* Initialize DSP Architecture */
00686   /*-----------------------------*/
00687
00688   frame_size = siuSetup.frame_size;
00689   /* Allocate linear PCM sample buffer */
00690   frame_in = (linSample*) malloc (frame_size*sizeof(linSample));
00691   if (frame_in == NULL) {
00692    siuException (3, "Can not allocate memory for frame");
00693   }
00694
00695   /* Open Rx Signal Generator */
00696   chnum = 1;
00697   siu_open_rxsgn (chnum);
00698
00699   /* Open channel simulator */
00700   siu_open_csm ();
00701
00702 #if cid_USE_GMP
00703   tstgmpInit (); /* GMP simulation initialization */
00704 #endif
00705
00706   /* Create channel independent context */
00707   create_cfg.debugInfo          = siuDebugInfo;
00708   create_cfg.reportOutFcn       = siuCidRptIn;
00709   create_cfg.maxSamplesPerFrame = SIU_MAX_FRAME_LENGTH;
00710   create_cfg.maxFragmentSize    = 20;
00711
00712   error = cidCreate (&create_cfg);
00713   if (error != cid_NOERR) {
00714     siuException (chnum, "Error in cidCreate");
00715   }
00716
00717   error = cidBind (NULL, &cidBindConfig);
00718   if (error != cid_NOERR) {
00719     siuException (chnum, "Error in cidBind");
00720   }
00721
00722   /* Configure, initialize and open all CID instances */
00723    for (chnum=1; chnum<=SIU_NUMBER_OF_CHANNELS; chnum ++) {
00724      siu_new_cid  (chnum);           /* Create CID module*/
00725      siu_open_cid (chnum);           /* Open   CID module*/
00726    }
00727
00728   /* Enter main loop */
00729   loop {
00730     if (siuSetup.tog_cid1 == -1) {
00731       siuSetup.tog_cid1 = 0;
00732       siu_close_cid (1);
00733       siu_delete_cid (1);
00734       printf("Channel 1 closed and deleted\n");
00735     }
00736
00737     /* Toggle the CID for ch1 (generator) */
00738     if (siuSetup.tog_cid1 != 0) {
00739       /* 1 - US, 2- NTT, 3 - ETSI, 4 - YDN, 5 - BT 6 - AUS*/
00740       siuSetup.cid_ctlMsg1.ctlCode = ((siuSetup.tog_cid1 - 1) << 1) + 1;
00741       if (siuSetup.tog_cid1 == 1) {
00742         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_SDMF_MSGTYPE; /* SDMF, US */
00743         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00744         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*) bellcore_message;
00745         multi_msg = bellcore_message;
00746       }
00747       else if (siuSetup.tog_cid1 == 2) {
00748         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_NTT_BYTE_SERVICE; /* NTT */
00749         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = NTT_MSG_LENGTH;
00750         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)ntt_message;
00751         multi_msg = ntt_message;
00752       }
00753       else if (siuSetup.tog_cid1 == 3) {
00754         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_ETSI_SMS_MSGTYPE; /* SMS, ETSI only */
00755         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00756         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00757         multi_msg = bellcore_message;
00758       }
00759       else if (siuSetup.tog_cid1 == 4) {
00760         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_MDMF_MSGTYPE; /* MDMF, YDN */
00761         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00762         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00763         multi_msg = bellcore_message;
00764       }
00765       else if (siuSetup.tog_cid1 == 5) {
00766         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_SDMF_MSGTYPE; /* SDMF, BT */
00767         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00768         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00769         multi_msg = bellcore_message;
00770       }
00771       else if (siuSetup.tog_cid1 == 6) {
00772         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_MDMF_MSGTYPE; /* MDMF, AUS */
00773         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00774         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00775         multi_msg = bellcore_message;
00776       }
00777       else if (siuSetup.tog_cid1 == 9) {
00778         siuSetup.cid_ctlMsg1.ctlCode = cid_CTL_MULTI_RQST; /* Multi-part message */
00779         siuSetup.cid_ctlMsg1.u.mgnrt.fragment_offset = multi_msg_idx;
00780         siuSetup.cid_ctlMsg1.u.mgnrt.fragment_size   = multi_msg_len;
00781         siuSetup.cid_ctlMsg1.u.mgnrt.msg             = (tuint*)(&multi_msg[(multi_msg_idx >> 1)]);
00782       }
00783       else if (siuSetup.tog_cid1 == 10) {
00784         siuSetup.cid_ctlMsg1.ctlCode = cid_CTL_DEACTIVATE;
00785       }
00786
00787       siuSetup.tog_cid1 = 0;
00788       printf ("Send CID control message %d to channel 1\n", siuSetup.cid_ctlMsg1.ctlCode);
00789       cidControl (siuInst[0].cidInst, &siuSetup.cid_ctlMsg1);
00790     }
00791
00792     if (siuSetup.tog_cid2 == -1) {
00793       siuSetup.tog_cid2 = 0;
00794       siu_close_cid (2);
00795       siu_delete_cid (2);
00796       printf ("Channel 2 closed and deleted\n");
00797     }
00798     else if (siuSetup.tog_cid2 == 10) {
00799       siuSetup.tog_cid2 = 0;
00800       siuSetup.cid_ctlMsg2.ctlCode = cid_CTL_DEACTIVATE;
00801       cidControl (siuInst[1].cidInst, &siuSetup.cid_ctlMsg2);
00802     }
00803
00804     /* Toggle the CID for ch2 (detector) */
00805     if (siuSetup.tog_cid2 != 0) {
00806       /* 1 - US, 2- NTT, 3 - ETSI, 4 - YDN, 5 - BT 6 - AUS. This code should be same as tog_cid1, to
00807        * provide compatible operation */
00808       siuSetup.cid_ctlMsg2.ctlCode = ((siuSetup.tog_cid2 - 1) << 1) + 2;
00809       siuSetup.tog_cid2 = 0;
00810       printf ("Send CID control message %d to channel 2\n", siuSetup.cid_ctlMsg2.ctlCode);
00811       cidControl (siuInst[1].cidInst, &siuSetup.cid_ctlMsg2);
00812     }
00813
00814     /* Toggle the channel simulator */
00815     if (siuSetup.tog_chnl_sim) {
00816       siuSetup.tog_chnl_sim = FALSE;
00817       siuSetup.chSim.chnl_sim_on = !siuSetup.chSim.chnl_sim_on;
00818     }
00819
00820     /* Toggle the RX signal generator */
00821     if (siuSetup.tog_rx_SGN) {
00822       siuSetup.tog_rx_SGN = FALSE;
00823       siuSetup.rxSGN.state = !siuSetup.rxSGN.state;
00824       siu_set_sgn (sgnRxInst, (siuSGNPars_t*)&siuSetup.rxSGN);
00825     }
00826
00827     /* RX Frames MUST be generated before cidReceiveIn() starts!!! */
00828     generate_rx_frame (frame_size, frame_in);
00829
00830     /* Save input to CID generator into buffer */
00831     for (i=0; i<frame_size; i++) {
00832       siuRxInStream[i] = frame_in[i];
00833     }
00834
00835     /* CID generator */
00836     rptBuff = 0;
00837
00838     /* This flag is set to TRUE by function cidReceiveIn, if samples are created by CID generator */
00839     rxReplace = FALSE;
00840
00841     /* If set to TRUE, only generator can work */
00842     genWork   = TRUE;
00843     /* Input samples are replaced with CID generated sequence */
00844
00845     cidReceiveIn (siuInst[0].cidInst, frame_in, genWork, &rxReplace);
00846     /* Save input to CID detector into buffer */
00847     for (i=0; i<frame_size; i++) {
00848       siuPcmInStream[i] = frame_in[i];
00849     }
00850
00851     siuChSim (frame_in);
00852
00853     /* CID detector */
00854     rptBuff = 1;
00855     cidSendIn (siuInst[1].cidInst, frame_in);
00856   }
00857 } /* main */
00858
00859 /* @} */ /* ingroup */
00860
00861 /* nothing past this point */


CID Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

All simulation configuration parameters are in the siuSetup structure. This structure needs to be configured before running any test. It is suggested that this structure be opened in a Watch Window for easy access.

  1. Set the CID type for the test
    • Set siuSetup->tog_cid1 and siuSetup->tog_cid2 to desired specification code from the table below.

  1. Run the simulation and observe the received CID message
  2. Ensure the received message matches the sent message

CID Specification Codes for Unit Test
Code | Region | Standard
1 | North America | Telcordia
2 | Japan | NTT
3 | Europe | ETSI
4 | China | YDN
5 | United Kingdom | BT
6 | Australia | AUS


CID Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


CID Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


CID Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


CID Test: File Index

  • File List
  • Globals

CID Test File List

Here is a list of all files with brief descriptions:
ccs2pcm.c [code]
cidsim.c [code] | CID test main program
doxygen.h [code]
tstgmp.c [code] | Global Memory Pool functions for CID test


CID Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • d
  • f
  • h
  • i
  • n
  • p
  • r
  • s
  • t
  • w

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • amp1 : siuSGNPars_t
  • amp2 : siuSGNPars_t
  • array : gmpData_t
  • aux_heap_size : siuInst_t
  • avail : gmpGmcSim_t , gmpData_t

- c -

  • chnl_sim_on : siuCHSMPars_t
  • chSim : siuSetup_t
  • cid_ctlMsg1 : siuSetup_t
  • cid_ctlMsg2 : siuSetup_t
  • cid_heap_size : siuInst_t
  • cidBufs : siuInst_t
  • cidInst : siuInst_t
  • cidNbufs : siuInst_t

- d -

  • dcoffset : siuSGNPars_t

- f -

  • f1 : siuSGNPars_t
  • f2 : siuSGNPars_t
  • frame_size : siuSetup_t

- h -

  • hoth_seed : siuSGNPars_t

- i -

  • ID : siuInst_t

- n -

  • nlevel : siuSGNPars_t , siuCHSMPars_t
  • nseed : siuSGNPars_t , siuCHSMPars_t
  • ntype : siuSGNPars_t

- p -

  • payload : gmpGmcSim_t
  • pcm_bits : siuSetup_t
  • pow_level : siuSGNPars_t

- r -

  • read_ix : gmpData_t
  • rxSGN : siuSetup_t

- s -

  • state : siuSGNPars_t

- t -

  • tog_chnl_sim : siuSetup_t
  • tog_cid1 : siuSetup_t
  • tog_cid2 : siuSetup_t
  • tog_rx_SGN : siuSetup_t

- w -

  • wftype : siuSGNPars_t
  • write_ix : gmpData_t


CID Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • d
  • f
  • h
  • i
  • n
  • p
  • r
  • s
  • t
  • w

- a -

  • amp1 : siuSGNPars_t
  • amp2 : siuSGNPars_t
  • array : gmpData_t
  • aux_heap_size : siuInst_t
  • avail : gmpGmcSim_t , gmpData_t

- c -

  • chnl_sim_on : siuCHSMPars_t
  • chSim : siuSetup_t
  • cid_ctlMsg1 : siuSetup_t
  • cid_ctlMsg2 : siuSetup_t
  • cid_heap_size : siuInst_t
  • cidBufs : siuInst_t
  • cidInst : siuInst_t
  • cidNbufs : siuInst_t

- d -

  • dcoffset : siuSGNPars_t

- f -

  • f1 : siuSGNPars_t
  • f2 : siuSGNPars_t
  • frame_size : siuSetup_t

- h -

  • hoth_seed : siuSGNPars_t

- i -

  • ID : siuInst_t

- n -

  • nlevel : siuSGNPars_t , siuCHSMPars_t
  • nseed : siuSGNPars_t , siuCHSMPars_t
  • ntype : siuSGNPars_t

- p -

  • payload : gmpGmcSim_t
  • pcm_bits : siuSetup_t
  • pow_level : siuSGNPars_t

- r -

  • read_ix : gmpData_t
  • rxSGN : siuSetup_t

- s -

  • state : siuSGNPars_t

- t -

  • tog_chnl_sim : siuSetup_t
  • tog_cid1 : siuSetup_t
  • tog_cid2 : siuSetup_t
  • tog_rx_SGN : siuSetup_t

- w -

  • wftype : siuSGNPars_t
  • write_ix : gmpData_t


CID Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines
  • b
  • c
  • f
  • g
  • l
  • m
  • n
  • r
  • s
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

  • bellcore_message : cidsim.c
  • BELLCORE_MSG_LENGTH : cidsim.c

- c -

  • cidBindConfig : cidsim.c
  • csmInst : cidsim.c

- f -

  • flog : cidsim.c
  • frame_in : cidsim.c

- g -

  • generate_rx_frame() : cidsim.c
  • glob_flg : cidsim.c
  • glob_messageCode : cidsim.c
  • glob_moduleID : cidsim.c
  • glob_msgData : cidsim.c
  • glob_msgLength : cidsim.c
  • glob_msgType : cidsim.c
  • gmp_array : tstgmp.c
  • gmp_gmcs : tstgmp.c
  • gmpAllocGmc() : tstgmp.c
  • gmpCreate() : tstgmp.c
  • gmpDelete() : tstgmp.c
  • gmpFreeGmc() : tstgmp.c
  • gmpRead() : tstgmp.c
  • gmpWrite() : tstgmp.c

- l -

  • loop : cidsim.c

- m -

  • main() : ccs2pcm.c , wav2ccs.c , cidsim.c
  • MAX_STREAM_SIZE : cidsim.c
  • MSG_BUF_LEN : cidsim.c
  • multi_msg : cidsim.c
  • multi_msg_idx : cidsim.c
  • multi_msg_len : cidsim.c

- n -

  • nscale : cidsim.c
  • ntt_message : cidsim.c
  • NTT_MSG_LENGTH : cidsim.c
  • NUMBER_OF_FRAMES : cidsim.c

- r -

  • rng_state : cidsim.c
  • rptBuff : cidsim.c

- s -

  • sgnRxInst : cidsim.c
  • siu_close_cid() : cidsim.c
  • siu_dbg_id : cidsim.c
  • siu_dbg_message : cidsim.c
  • SIU_DBGMSG_SIZE : cidsim.c
  • siu_delete_cid() : cidsim.c
  • SIU_FRAME_LENGTH : cidsim.c
  • SIU_MAX_BYTES : cidsim.c
  • SIU_MAX_FRAME_LENGTH : cidsim.c
  • siu_new_cid() : cidsim.c
  • SIU_NUMBER_OF_CHANNELS : cidsim.c
  • siu_open_cid() : cidsim.c
  • siu_open_csm() : cidsim.c
  • siu_open_rxsgn() : cidsim.c
  • siu_rx_file() : cidsim.c
  • siu_set_sgn() : cidsim.c
  • siuChSim() : cidsim.c
  • siuCidRptIn() : cidsim.c
  • siuDebugInfo() : cidsim.c
  • siuDebugInternal() : cidsim.c
  • siuException() : tstgmp.c , cidsim.c
  • siuInst : cidsim.c
  • siuPcmInStream : cidsim.c
  • siuPcmOutStream : cidsim.c
  • siuRxInStream : cidsim.c
  • siuSetup : cidsim.c

- t -

  • tblAlaw : cidsim.c
  • tblUlaw : cidsim.c
  • TSTGMP_GMC_ITEMS : tstgmp.c
  • TSTGMP_ITEMS : tstgmp.c
  • tstgmpInit() : tstgmp.c , cidsim.c
  • TSTTDU_GMC_STORAGE : tstgmp.c
  • TSTTDU_MAX_STORAGE : tstgmp.c

- v -

  • v21_flags : cidsim.c


CID Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines

  • BELLCORE_MSG_LENGTH : cidsim.c
  • loop : cidsim.c
  • MAX_STREAM_SIZE : cidsim.c
  • MSG_BUF_LEN : cidsim.c
  • NTT_MSG_LENGTH : cidsim.c
  • NUMBER_OF_FRAMES : cidsim.c
  • SIU_DBGMSG_SIZE : cidsim.c
  • SIU_FRAME_LENGTH : cidsim.c
  • SIU_MAX_BYTES : cidsim.c
  • SIU_MAX_FRAME_LENGTH : cidsim.c
  • SIU_NUMBER_OF_CHANNELS : cidsim.c
  • TSTGMP_GMC_ITEMS : tstgmp.c
  • TSTGMP_ITEMS : tstgmp.c
  • TSTTDU_GMC_STORAGE : tstgmp.c
  • TSTTDU_MAX_STORAGE : tstgmp.c


CID Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines

  • generate_rx_frame() : cidsim.c
  • gmpAllocGmc() : tstgmp.c
  • gmpCreate() : tstgmp.c
  • gmpDelete() : tstgmp.c
  • gmpFreeGmc() : tstgmp.c
  • gmpRead() : tstgmp.c
  • gmpWrite() : tstgmp.c
  • main() : ccs2pcm.c , wav2ccs.c , cidsim.c
  • siu_close_cid() : cidsim.c
  • siu_delete_cid() : cidsim.c
  • siu_new_cid() : cidsim.c
  • siu_open_cid() : cidsim.c
  • siu_open_csm() : cidsim.c
  • siu_open_rxsgn() : cidsim.c
  • siu_rx_file() : cidsim.c
  • siu_set_sgn() : cidsim.c
  • siuChSim() : cidsim.c
  • siuCidRptIn() : cidsim.c
  • siuDebugInfo() : cidsim.c
  • siuDebugInternal() : cidsim.c
  • siuException() : cidsim.c , tstgmp.c
  • tstgmpInit() : cidsim.c , tstgmp.c


CID Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines
  • b
  • c
  • f
  • g
  • m
  • n
  • r
  • s
  • t
  • v

- b -

  • bellcore_message : cidsim.c

- c -

  • cidBindConfig : cidsim.c
  • csmInst : cidsim.c

- f -

  • flog : cidsim.c
  • frame_in : cidsim.c

- g -

  • glob_flg : cidsim.c
  • glob_messageCode : cidsim.c
  • glob_moduleID : cidsim.c
  • glob_msgData : cidsim.c
  • glob_msgLength : cidsim.c
  • glob_msgType : cidsim.c
  • gmp_array : tstgmp.c
  • gmp_gmcs : tstgmp.c

- m -

  • multi_msg : cidsim.c
  • multi_msg_idx : cidsim.c
  • multi_msg_len : cidsim.c

- n -

  • nscale : cidsim.c
  • ntt_message : cidsim.c

- r -

  • rng_state : cidsim.c
  • rptBuff : cidsim.c

- s -

  • sgnRxInst : cidsim.c
  • siu_dbg_id : cidsim.c
  • siu_dbg_message : cidsim.c
  • siuInst : cidsim.c
  • siuPcmInStream : cidsim.c
  • siuPcmOutStream : cidsim.c
  • siuRxInStream : cidsim.c
  • siuSetup : cidsim.c

- t -

  • tblAlaw : cidsim.c
  • tblUlaw : cidsim.c

- v -

  • v21_flags : cidsim.c


CID Test: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


CID Test: CIDTEST

CIDTEST

Detailed Description

Data Structures

struct | siuInst_t
struct | siuSGNPars_t
Control information that may be set-up from the simulator to change operating parameters. More...
struct | siuCHSMPars_t
struct | siuSetup_t

Defines

#define | SIU_FRAME_LENGTH 40
#define | SIU_NUMBER_OF_CHANNELS 2
#define | SIU_MAX_FRAME_LENGTH 44
#define | SIU_MAX_BYTES 39
#define | NUMBER_OF_FRAMES 1
#define | MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
#define | MSG_BUF_LEN 50
#define | SIU_DBGMSG_SIZE 256
#define | loop for(;;)
#define | NTT_MSG_LENGTH 90
#define | BELLCORE_MSG_LENGTH 26

Functions

void | tstgmpInit ()
static void | siuDebugInternal (tuint id, char *str)
Debug & exception functions.
void | siuException (tuint id, char *s)
void | siuDebugInfo (void *moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *messageData)
sgnFileIo_t * | siu_rx_file (sgnFileIo_t *dsc)
void | generate_rx_frame (tint frame_size, linSample *frame)
Generate rx sample frames.
void | siuChSim (void *sample_in)
Simulate PCM channel, introduce distortion, etc.
void | siuCidRptIn (tuint ID, tint rcode, tint final_state, tint dropout_ct, tint bad_mtype_ct, tint type, tint len, tuint *msg, tint len_in_word)
Save the CID report into buffer.
void | siu_new_cid (tint chnum)
Creates a CID instance.
void | siu_open_cid (tint chnum)
Opens a CID instance.
void | siu_close_cid (tint chnum)
void | siu_delete_cid (tint chnum)
void | siu_open_csm ()
Open channel simulator.
void | siu_open_rxsgn (tint chnum)
Open Rx Signal Generator.
void | siu_set_sgn (void *inst, siuSGNPars_t *sgn)
Set signal generator parameters.
int | main (int argc, char *argv[])

Variables

linSample | siuRxInStream [MAX_STREAM_SIZE]
linSample | siuPcmOutStream [MAX_STREAM_SIZE]
linSample | siuPcmInStream [MAX_STREAM_SIZE]
tint | v21_flags = 0x7e7e
const tint | tblUlaw []
const tint | tblAlaw []
siuInst_t | siuInst [SIU_NUMBER_OF_CHANNELS]
linSample * | frame_in
char | siu_dbg_message [SIU_DBGMSG_SIZE]
tuint | siu_dbg_id
tint | rptBuff
tuint | multi_msg_idx = 0
tuint | multi_msg_len = 0
tint * | multi_msg
void * | sgnRxInst = (void *) NULL
tint | flog = 0
struct {
tint nscale
tuint rng_state
} csmInst
cidBindConfig_t | cidBindConfig
tint | ntt_message []
tint | bellcore_message []
siuSetup_t siuSetup
volatile tbool | glob_flg
tuint | glob_msgLength
tuint | glob_moduleID
tuint | glob_msgType
tuint | glob_messageCode
tuint | glob_msgData [4]

Define Documentation

#define SIU_FRAME_LENGTH 40

< for cidGetSizes(), cidNew(), cidOpen(),...

Definition at line 29 of file cidsim.c.

Referenced by siu_open_cid().

#define SIU_NUMBER_OF_CHANNELS 2

Definition at line 31 of file cidsim.c.

Referenced by main().

#define SIU_MAX_FRAME_LENGTH 44

Definition at line 33 of file cidsim.c.

Referenced by main().

#define SIU_MAX_BYTES 39

Definition at line 36 of file cidsim.c.

#define NUMBER_OF_FRAMES 1

Definition at line 38 of file cidsim.c.

#define MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)

Definition at line 39 of file cidsim.c.

#define MSG_BUF_LEN 50

Definition at line 40 of file cidsim.c.

#define SIU_DBGMSG_SIZE 256

Definition at line 75 of file cidsim.c.

Referenced by siuDebugInternal().

#define loop for(;;)

Definition at line 94 of file cidsim.c.

Referenced by main(), and siuException().

#define NTT_MSG_LENGTH 90

Definition at line 137 of file cidsim.c.

Referenced by main().

#define BELLCORE_MSG_LENGTH 26

Definition at line 147 of file cidsim.c.

Referenced by main().

Function Documentation

void tstgmpInit ( )

Definition at line 37 of file tstgmp.c.

References gmp_array, gmp_gmcs, TSTGMP_GMC_ITEMS, and TSTGMP_ITEMS.

Referenced by main().

static void siuDebugInternal | ( | tuint | id,
 |  | char * | str |
 | ) |  |  | [inline, static]

Debug & exception functions.

Definition at line 257 of file cidsim.c.

References siu_dbg_id, siu_dbg_message, and SIU_DBGMSG_SIZE.

Referenced by siu_open_rxsgn(), and siuException().

void siuException | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 274 of file cidsim.c.

References loop, and siuDebugInternal().

Referenced by gmpRead(), gmpWrite(), main(), siu_new_cid(), siu_open_cid(), and siu_open_rxsgn().

Here is the call graph for this function:

void siuDebugInfo | ( | void * | moduleID,
 |  | tuint | msgType,
 |  | tuint | messageCode,
 |  | tuint | msgLength,
 |  | tuint * | messageData
 | ) |  |

Definition at line 290 of file cidsim.c.

Referenced by main().

sgnFileIo_t* siu_rx_file ( sgnFileIo_t * dsc )

Definition at line 307 of file cidsim.c.

Referenced by siu_open_rxsgn().

void generate_rx_frame | ( | tint | frame_size,
 |  | linSample * | frame
 | ) |  |

Generate rx sample frames.

Parameters:
[in] | frame_size | # samples in frame
[in,out] | *frame | Pointer to linear PCM sample buffer

Definition at line 329 of file cidsim.c.

References siuSetup_t::rxSGN, sgnRxInst, siuSetup, and siuSGNPars_t::state.

Referenced by main().

void siuChSim ( void * sample_in )

Simulate PCM channel, introduce distortion, etc.

Parameters:
[in,out] *sample_in Pointer to linear PCM sample buffer

Definition at line 349 of file cidsim.c.

References siuCHSMPars_t::chnl_sim_on, siuSetup_t::chSim, csmInst, siuSetup_t::frame_size, siuPcmOutStream, and siuSetup.

Referenced by main().

void siuCidRptIn | ( | tuint | ID,
 |  | tint | rcode,
 |  | tint | final_state,
 |  | tint | dropout_ct,
 |  | tint | bad_mtype_ct,
 |  | tint | type,
 |  | tint | len,
 |  | tuint * | msg,
 |  | tint | len_in_word
 | ) |  |

Save the CID report into buffer.

Parameters:
[in] | ID | Channel number.
[in] | rcode | Report code.
[in] | final_state | Final state of generator or detector.
[in] | dropout_ct | Count of state machine errors.
[in] | bad_mtype_ct | Count of bad msg types.
[in] | type | Caller ID message type.
[in] | len | Length of message in bytes.
[in] | *msg | Pointer to message.
[in] | len_in_word | Length of message in words.

Definition at line 392 of file cidsim.c.

References multi_msg_idx, multi_msg_len, siuSetup, siuSetup_t::tog_cid1, and siuSetup_t::tog_cid2.

Referenced by main().

void siu_new_cid ( tint chnum )

Creates a CID instance.

Parameters:
[in] chnum Channel number

Definition at line 429 of file cidsim.c.

References siuInst_t::aux_heap_size, siuInst_t::cidBufs, siuInst_t::cidInst, siuInst_t::cidNbufs, siuException(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_cid ( tint chnum )

Opens a CID instance.

Parameters:
[in] chnum Channel number

Definition at line 489 of file cidsim.c.

References siuInst_t::cidInst, SIU_FRAME_LENGTH, siuException(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_close_cid ( tint chnum )

Definition at line 517 of file cidsim.c.

References siuInst_t::cidInst, and siuInst.

Referenced by main().

void siu_delete_cid ( tint chnum )

Definition at line 536 of file cidsim.c.

References siuInst_t::aux_heap_size, siuInst_t::cid_heap_size, siuInst_t::cidBufs, siuInst_t::cidInst, siuInst_t::cidNbufs, and siuInst.

Referenced by main().

void siu_open_csm ( )

Open channel simulator.

Definition at line 561 of file cidsim.c.

References siuSetup_t::chSim, csmInst, siuCHSMPars_t::nlevel, siuCHSMPars_t::nseed, and siuSetup.

Referenced by main().

void siu_open_rxsgn ( tint chnum )

Open Rx Signal Generator.

Definition at line 573 of file cidsim.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuSGNPars_t::dcoffset, siuSGNPars_t::f1, siuSGNPars_t::f2, siuSGNPars_t::hoth_seed, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSGNPars_t::pow_level, siuSetup_t::rxSGN, sgnRxInst, siu_rx_file(), siuDebugInternal(), siuException(), siuSetup, v21_flags, and siuSGNPars_t::wftype.

Referenced by main().

Here is the call graph for this function:

void siu_set_sgn | ( | void * | inst,
 |  | siuSGNPars_t * | sgn
 | ) |  |

Set signal generator parameters.

Parameters:
[in] | *inst | Pointer to sgnInst_t instance.
[in] | *sgn | Parameters.

Definition at line 619 of file cidsim.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuSGNPars_t::f1, siuSGNPars_t::f2, siuSGNPars_t::nlevel, siuSGNPars_t::pow_level, siuSGNPars_t::state, and siuSGNPars_t::wftype.

Referenced by main().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |  |

Definition at line 675 of file cidsim.c.

References bellcore_message, BELLCORE_MSG_LENGTH, siuCHSMPars_t::chnl_sim_on, siuSetup_t::chSim, siuSetup_t::cid_ctlMsg1, siuSetup_t::cid_ctlMsg2, cidBindConfig, frame_in, siuSetup_t::frame_size, generate_rx_frame(), loop, multi_msg, multi_msg_idx, multi_msg_len, ntt_message, NTT_MSG_LENGTH, rptBuff, siuSetup_t::rxSGN, sgnRxInst, siu_close_cid(), siu_delete_cid(), SIU_MAX_FRAME_LENGTH, siu_new_cid(), SIU_NUMBER_OF_CHANNELS, siu_open_cid(), siu_open_csm(), siu_open_rxsgn(), siu_set_sgn(), siuChSim(), siuCidRptIn(), siuDebugInfo(), siuException(), siuInst, siuPcmInStream, siuRxInStream, siuSetup, siuSGNPars_t::state, siuSetup_t::tog_chnl_sim, siuSetup_t::tog_cid1, siuSetup_t::tog_cid2, siuSetup_t::tog_rx_SGN, and tstgmpInit().

Here is the call graph for this function:

Variable Documentation

linSample siuRxInStream[MAX_STREAM_SIZE]

Rx input samples to GNRT

Definition at line 43 of file cidsim.c.

Referenced by main().

linSample siuPcmOutStream[MAX_STREAM_SIZE]

PCM output samples from GNRT

Definition at line 44 of file cidsim.c.

Referenced by siuChSim().

linSample siuPcmInStream[MAX_STREAM_SIZE]

PCM input samples to DTCT

Definition at line 45 of file cidsim.c.

Referenced by main().

tint v21_flags = 0x7e7e

Definition at line 48 of file cidsim.c.

Referenced by siu_open_rxsgn().

const tint tblUlaw[]

const tint tblAlaw[]

siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS]

Definition at line 71 of file cidsim.c.

Referenced by main(), siu_close_cid(), siu_delete_cid(), siu_new_cid(), and siu_open_cid().

linSample* frame_in

Definition at line 72 of file cidsim.c.

Referenced by main().

char siu_dbg_message[SIU_DBGMSG_SIZE]

Definition at line 76 of file cidsim.c.

Referenced by siuDebugInternal().

tuint siu_dbg_id

Definition at line 77 of file cidsim.c.

Referenced by siuDebugInternal().

tint rptBuff

Indicator of instance

Definition at line 78 of file cidsim.c.

Referenced by main().

tuint multi_msg_idx = 0

Definition at line 79 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

tuint multi_msg_len = 0

Definition at line 80 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

tint* multi_msg

Definition at line 81 of file cidsim.c.

Referenced by main().

void* sgnRxInst = (void *) NULL

Definition at line 84 of file cidsim.c.

Referenced by generate_rx_frame(), main(), and siu_open_rxsgn().

tint flog = 0

Definition at line 85 of file cidsim.c.

struct { ... } csmInst

Referenced by siu_open_csm(), and siuChSim().

tint { ... } nscale [inherited]

Definition at line 89 of file cidsim.c.

tuint { ... } rng_state [inherited]

Definition at line 90 of file cidsim.c.

cidBindConfig_t cidBindConfig

Definition at line 96 of file cidsim.c.

Referenced by main().

tint ntt_message[]

Initial value:

{
  0x020a, 0x1011, 0x1213, 0x1415, 0x1617, 0x1819, 0x2021, 0x2223, 0x2425,
  0x2627, 0x2829, 0x3031, 0x3233, 0x3435, 0x3637, 0x3839, 0x4041, 0x4243,
  0x4445, 0x4647, 0x4849, 0x5051, 0x5253, 0x5455, 0x5657, 0x5859, 0x6061,
  0x6263, 0x6465, 0x6667, 0x6869, 0x7071, 0x7273, 0x7475, 0x7677, 0x7879,
  0x1a1b, 0x1c1d, 0x1e1f, 0x2a2b, 0x2c2d, 0x2e2f, 0x3a3b, 0x3c3d, 0x3e3f
}

Definition at line 138 of file cidsim.c.

Referenced by main().

tint bellcore_message[]

Initial value:

{
  0x0216, 0x3033, 0x3531, 0x2d33, 0x3231, 0x3030, 0x3334,
          0x3536, 0x3738, 0x3930, 0x3132, 0x3334, 0x3938
}

Definition at line 148 of file cidsim.c.

Referenced by main().

siuSetup_t siuSetup

Definition at line 192 of file cidsim.c.

Referenced by generate_rx_frame(), main(), siu_open_csm(), siu_open_rxsgn(), siuChSim(), and siuCidRptIn().

volatile tbool glob_flg

Definition at line 285 of file cidsim.c.

tuint glob_msgLength

Definition at line 286 of file cidsim.c.

tuint glob_moduleID

Definition at line 287 of file cidsim.c.

tuint glob_msgType

Definition at line 287 of file cidsim.c.

tuint glob_messageCode

Definition at line 287 of file cidsim.c.

tuint glob_msgData[4]

Definition at line 288 of file cidsim.c.


CID Test: CID Unit Test

CID Unit Test

Release 1.1.0.0

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the CID. This is not a regression test, its purpose is to show how the CID module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Test code details: CIDTEST

Building Unit Test

The CID Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the CID Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main CID documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The CID Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the CID Unit Test image for the target of interest
    • Will reside in the cid\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the CID project for the target of interest
    • Will be a subdirectory off the cid\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the cid\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)


CID Test: Module Index

CID Test Modules

Here is a list of all modules:
  • CIDTEST


CID Test: Page Index

CID Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


CID Test: gmpData_t Struct Reference

  • Data Structures
  • Data Fields

gmpData_t Struct Reference

Detailed Description

Definition at line 21 of file tstgmp.c.

Data Fields

tuint | read_ix
tuint | write_ix
tbool | avail
tuint | array [TSTTDU_MAX_STORAGE]

Field Documentation

tuint gmpData_t::read_ix

Definition at line 22 of file tstgmp.c.

Referenced by gmpCreate(), and gmpRead().

tuint gmpData_t::write_ix

Definition at line 23 of file tstgmp.c.

Referenced by gmpCreate(), gmpRead(), and gmpWrite().

tbool gmpData_t::avail

Definition at line 24 of file tstgmp.c.

Referenced by gmpDelete().

tuint gmpData_t::array[TSTTDU_MAX_STORAGE]

Definition at line 25 of file tstgmp.c.

Referenced by gmpRead(), and gmpWrite().

The documentation for this struct was generated from the following file:
  • tstgmp.c


CID Test: gmpGmcSim_t Struct Reference

  • Data Structures
  • Data Fields

gmpGmcSim_t Struct Reference

Detailed Description

Definition at line 30 of file tstgmp.c.

Data Fields

tbool | avail
tuint | payload [TSTTDU_GMC_STORAGE]

Field Documentation

tbool gmpGmcSim_t::avail

Definition at line 31 of file tstgmp.c.

tuint gmpGmcSim_t::payload[TSTTDU_GMC_STORAGE]

Definition at line 32 of file tstgmp.c.

Referenced by gmpAllocGmc().

The documentation for this struct was generated from the following file:
  • tstgmp.c


CID Test: siuCHSMPars_t Struct Reference

  • Data Structures
  • Data Fields

siuCHSMPars_t Struct Reference
[CIDTEST]

Detailed Description

Definition at line 173 of file cidsim.c.

Data Fields

tbool | chnl_sim_on
tint | nlevel
tuint | nseed

Field Documentation

tbool siuCHSMPars_t::chnl_sim_on

TRUE: channel simulator is on

Definition at line 174 of file cidsim.c.

Referenced by main(), and siuChSim().

tint siuCHSMPars_t::nlevel

channel noise level in dBm0

Definition at line 175 of file cidsim.c.

Referenced by siu_open_csm().

tuint siuCHSMPars_t::nseed

channel noise seed

Definition at line 176 of file cidsim.c.

Referenced by siu_open_csm().

The documentation for this struct was generated from the following file:
  • cidsim.c


CID Test: siuInst_t Struct Reference

  • Data Structures
  • Data Fields

siuInst_t Struct Reference
[CIDTEST]

Detailed Description

Definition at line 56 of file cidsim.c.

Data Fields

ecomemBuffer_t * | cidBufs
tuint | ID
void * | cidInst
tint | cidNbufs
tint | cid_heap_size
tint | aux_heap_size

Field Documentation

ecomemBuffer_t* siuInst_t::cidBufs

Definition at line 57 of file cidsim.c.

Referenced by siu_delete_cid(), and siu_new_cid().

tuint siuInst_t::ID

Definition at line 60 of file cidsim.c.

void* siuInst_t::cidInst

Definition at line 61 of file cidsim.c.

Referenced by siu_close_cid(), siu_delete_cid(), siu_new_cid(), and siu_open_cid().

tint siuInst_t::cidNbufs

Definition at line 62 of file cidsim.c.

Referenced by siu_delete_cid(), and siu_new_cid().

tint siuInst_t::cid_heap_size

Definition at line 63 of file cidsim.c.

Referenced by siu_delete_cid().

tint siuInst_t::aux_heap_size

Definition at line 66 of file cidsim.c.

Referenced by siu_delete_cid(), and siu_new_cid().

The documentation for this struct was generated from the following file:
  • cidsim.c


CID Test: siuSGNPars_t Struct Reference

  • Data Structures
  • Data Fields

siuSGNPars_t Struct Reference
[CIDTEST]

Detailed Description

Control information that may be set-up from the simulator to change operating parameters.

Definition at line 157 of file cidsim.c.

Data Fields

tbool | state
linSample | dcoffset
tint | wftype
tint | f1
tint | f2
linSample | amp1
linSample | amp2
tint | nlevel
tuint | nseed
tint | ntype
tint | pow_level
tuint | hoth_seed

Field Documentation

tbool siuSGNPars_t::state

TRUE: generator is on.

Definition at line 158 of file cidsim.c.

Referenced by generate_rx_frame(), main(), and siu_set_sgn().

linSample siuSGNPars_t::dcoffset

dc offset (Q0 format)

Definition at line 159 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::wftype

one of sgn_WFT_'s

Definition at line 160 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tint siuSGNPars_t::f1

the first frequency in Hz

Definition at line 161 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tint siuSGNPars_t::f2

the second frequency in Hz

Definition at line 162 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

linSample siuSGNPars_t::amp1

amplitude of the first component (Q0)

Definition at line 163 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

linSample siuSGNPars_t::amp2

amplitude of the second component (Q0)

Definition at line 164 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tint siuSGNPars_t::nlevel

idle noise level in dBm0

Definition at line 165 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tuint siuSGNPars_t::nseed

idle noise seed

Definition at line 166 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::ntype

noise type sgn_NT_xxx

Definition at line 167 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::pow_level

Hoth or CSS power level in dBm0

Definition at line 168 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tuint siuSGNPars_t::hoth_seed

Hoth noise seed

Definition at line 169 of file cidsim.c.

Referenced by siu_open_rxsgn().

The documentation for this struct was generated from the following file:
  • cidsim.c


CID Test: siuSetup_t Struct Reference

  • Data Structures
  • Data Fields

siuSetup_t Struct Reference
[CIDTEST]

Collaboration diagram for siuSetup_t:

[legend]

Detailed Description

Definition at line 179 of file cidsim.c.

Data Fields

tint | pcm_bits
tint | frame_size
tint | tog_cid1
cidCtlMsg_t | cid_ctlMsg1
tint | tog_cid2
cidCtlMsg_t | cid_ctlMsg2
tbool | tog_chnl_sim
siuCHSMPars_t chSim
tbool | tog_rx_SGN
siuSGNPars_t rxSGN

Field Documentation

tint siuSetup_t::pcm_bits

(1-16), number of bits in a pcm-sample

Definition at line 180 of file cidsim.c.

tint siuSetup_t::frame_size

# samples in frame (80 for 10ms frame)

Definition at line 181 of file cidsim.c.

Referenced by main(), and siuChSim().

tint siuSetup_t::tog_cid1

TRUE: change CID control parameters in cid_ctlMsg1 for ch1

Definition at line 182 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

cidCtlMsg_t siuSetup_t::cid_ctlMsg1

CID control message for ch1

Definition at line 183 of file cidsim.c.

Referenced by main().

tint siuSetup_t::tog_cid2

TRUE: change CID control parameters for ch2

Definition at line 184 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

cidCtlMsg_t siuSetup_t::cid_ctlMsg2

CID control message in cid_ctlMsg2 for ch2

Definition at line 185 of file cidsim.c.

Referenced by main().

tbool siuSetup_t::tog_chnl_sim

TRUE: toggle channel simulator

Definition at line 186 of file cidsim.c.

Referenced by main().

siuCHSMPars_t siuSetup_t::chSim

channel simulator parameters

Definition at line 187 of file cidsim.c.

Referenced by main(), siu_open_csm(), and siuChSim().

tbool siuSetup_t::tog_rx_SGN

TRUE: toggle rx signal generator

Definition at line 188 of file cidsim.c.

Referenced by main().

siuSGNPars_t siuSetup_t::rxSGN

Rx Signal Generator Parameters

Definition at line 189 of file cidsim.c.

Referenced by generate_rx_frame(), main(), and siu_open_rxsgn().

The documentation for this struct was generated from the following file:
  • cidsim.c


CID Test: tstgmp.c File Reference

  • File List
  • Globals

tstgmp.c File Reference

Detailed Description

Global Memory Pool functions for CID test.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file tstgmp.c.

#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>

Include dependency graph for tstgmp.c:

Go to the source code of this file.

Data Structures

struct | gmpData_t
struct | gmpGmcSim_t

Defines

#define | TSTTDU_MAX_STORAGE (40)
#define | TSTTDU_GMC_STORAGE (22)
#define | TSTGMP_ITEMS 6
#define | TSTGMP_GMC_ITEMS 8

Functions

void | siuException (tuint id, char *s)
void | tstgmpInit (void)
void * | gmpAllocGmc (tuint input_MID)
tbool | gmpFreeGmc (tuint input_MID, void *to_free)
void * | gmpCreate (tuint input_MID, tuint mode, tuint recordSize)
void | gmpDelete (tuint input_MID, void *headIn)
void | gmpWrite (tuint input_MID, void *head, void *srcIn, tint records_to_copy)
tint | gmpRead (tuint input_MID, void *head, void *dstOut, tint records_to_copy)

Variables

gmpData_t | gmp_array [TSTGMP_ITEMS]
gmpGmcSim_t | gmp_gmcs [TSTGMP_GMC_ITEMS]

Define Documentation

#define TSTTDU_MAX_STORAGE (40)

Definition at line 15 of file tstgmp.c.

Referenced by gmpWrite().

#define TSTTDU_GMC_STORAGE (22)

Definition at line 16 of file tstgmp.c.

#define TSTGMP_ITEMS 6

Definition at line 17 of file tstgmp.c.

Referenced by gmpCreate(), and tstgmpInit().

#define TSTGMP_GMC_ITEMS 8

Definition at line 18 of file tstgmp.c.

Referenced by gmpAllocGmc(), gmpFreeGmc(), and tstgmpInit().

Function Documentation

void* gmpAllocGmc ( tuint input_MID )

Definition at line 48 of file tstgmp.c.

References gmp_gmcs, gmpGmcSim_t::payload, and TSTGMP_GMC_ITEMS.

tbool gmpFreeGmc | ( | tuint | input_MID,
 |  | void * | to_free
 | ) |  |

Definition at line 59 of file tstgmp.c.

References gmp_gmcs, and TSTGMP_GMC_ITEMS.

void* gmpCreate | ( | tuint | input_MID,
 |  | tuint | mode,
 |  | tuint | recordSize
 | ) |  |

Definition at line 71 of file tstgmp.c.

References gmp_array, gmpData_t::read_ix, TSTGMP_ITEMS, and gmpData_t::write_ix.

void gmpDelete | ( | tuint | input_MID,
 |  | void * | headIn
 | ) |  |

Definition at line 89 of file tstgmp.c.

References gmpData_t::avail.

void gmpWrite | ( | tuint | input_MID,
 |  | void * | head,
 |  | void * | srcIn,
 |  | tint | records_to_copy
 | ) |  |

Definition at line 97 of file tstgmp.c.

References gmpData_t::array, siuException(), TSTTDU_MAX_STORAGE, and gmpData_t::write_ix.

Here is the call graph for this function:

tint gmpRead | ( | tuint | input_MID,
 |  | void * | head,
 |  | void * | dstOut,
 |  | tint | records_to_copy
 | ) |  |

Definition at line 109 of file tstgmp.c.

References gmpData_t::array, gmpData_t::read_ix, siuException(), and gmpData_t::write_ix.

Here is the call graph for this function:

Variable Documentation

gmpData_t gmp_array[TSTGMP_ITEMS]

Definition at line 28 of file tstgmp.c.

Referenced by gmpCreate(), and tstgmpInit().

gmpGmcSim_t gmp_gmcs[TSTGMP_GMC_ITEMS]

Definition at line 35 of file tstgmp.c.

Referenced by gmpAllocGmc(), gmpFreeGmc(), and tstgmpInit().


CID Test: tstgmp.c Source File

  • File List
  • Globals

tstgmp.c

Go to the documentation of this file.
00001
00008 #include <stdlib.h>
00009 #include <string.h>
00010
00011 #include <ti/mas/types/types.h>
00012 #include <ti/mas/util/utl.h>
00013
00014
00015 #define TSTTDU_MAX_STORAGE  (40)
00016 #define TSTTDU_GMC_STORAGE  (22)
00017 #define TSTGMP_ITEMS 6
00018 #define TSTGMP_GMC_ITEMS 8
00019 extern void siuException (tuint id, char *s);
00020
00021 typedef struct {
00022   tuint read_ix;
00023   tuint write_ix;
00024   tbool  avail;
00025   tuint array[TSTTDU_MAX_STORAGE];
00026 } gmpData_t;
00027
00028 gmpData_t gmp_array[TSTGMP_ITEMS]; /* room for 5 GMCs */
00029
00030 typedef struct {
00031   tbool  avail;
00032   tuint payload[TSTTDU_GMC_STORAGE];
00033 } gmpGmcSim_t;
00034
00035 gmpGmcSim_t gmp_gmcs[TSTGMP_GMC_ITEMS];
00036
00037 void tstgmpInit(void) {
00038 tint i;
00039   for (i = 0; i < TSTGMP_ITEMS; i ++) {
00040     gmp_array[i].avail   = TRUE;
00041   }
00042   for (i = 0; i < TSTGMP_GMC_ITEMS; i ++) {
00043     gmp_gmcs[i].avail   = TRUE;
00044   }
00045 }
00046
00047
00048 void *gmpAllocGmc(tuint input_MID) {
00049 tint i;
00050   for (i = 0; i < TSTGMP_GMC_ITEMS; i ++) {
00051     if(gmp_gmcs[i].avail) {
00052       gmp_gmcs[i].avail = FALSE;
00053       return &gmp_gmcs[i].payload;
00054     }
00055   }
00056   return NULL;
00057 }
00058
00059 tbool gmpFreeGmc(tuint input_MID, void *to_free) {
00060 tint i;
00061   for (i = 0; i < TSTGMP_GMC_ITEMS; i ++) {
00062     if(gmp_gmcs[i].payload == to_free) {
00063       gmp_gmcs[i].avail = TRUE;
00064       return TRUE;
00065     }
00066   }
00067   return FALSE;
00068 }
00069
00070 /* Creation of FILE-like structure, mode is ignored at the moment */
00071 void *gmpCreate (tuint input_MID, tuint mode, tuint recordSize)
00072 {
00073   void *gmp_ptr;
00074   tint  i;
00075
00076   gmp_ptr = (tuint *)NULL;
00077   for (i = 0; i < TSTGMP_ITEMS; i ++) {
00078     if(gmp_array[i].avail) {
00079       gmp_array[i].avail = FALSE;
00080       gmp_array[i].read_ix = gmp_array[i].write_ix = 0;
00081       gmp_ptr = (void *)&gmp_array[i];
00082       break;
00083     }
00084   }
00085   return (gmp_ptr);
00086 }
00087
00088 /* FILE-like structure is deleted */
00089 void gmpDelete (tuint input_MID, void *headIn)
00090 {
00091   gmpData_t *gmp_sim = (gmpData_t *)headIn;
00092   gmp_sim->avail = TRUE;
00093 }
00094
00095 /* Write data into GMP based FILE-like structure. Append mode is assumed. No
00096  * limitation on amount of data to be written */
00097 void gmpWrite (tuint input_MID, void *head, void *srcIn, tint records_to_copy)
00098 {
00099   gmpData_t *gmp_sim = (gmpData_t *)head;
00100
00101   if(head == NULL)
00102     siuException(input_MID, "Null pointer for write");
00103   memcpy (&(gmp_sim->array[gmp_sim->write_ix]), srcIn, records_to_copy);
00104   gmp_sim->write_ix += records_to_copy;
00105   if(gmp_sim->write_ix >= TSTTDU_MAX_STORAGE)
00106     siuException(input_MID, "Max storage exceeded(W)");
00107 }
00108 /* Copy data from GMP into linear buffer. Internal read position marker is updated */
00109 tint gmpRead (tuint input_MID, void *head, void *dstOut, tint records_to_copy)
00110 {
00111   gmpData_t *gmp_sim = (gmpData_t *)head;
00112   tint ret_val;
00113
00114   if(head == NULL)
00115     siuException(input_MID, "Null pointer for read");
00116
00117   ret_val = records_to_copy;
00118   if((gmp_sim->read_ix + records_to_copy) >= gmp_sim->write_ix) {
00119     ret_val = gmp_sim->write_ix - gmp_sim->read_ix;
00120   }
00121   memcpy (dstOut, &(gmp_sim->array[gmp_sim->read_ix]), ret_val);
00122   gmp_sim->read_ix += ret_val;
00123   return ret_val;
00124 }
00125 /* nothing past this point */
00126


CID Test: wav2ccs.c File Reference

  • File List
  • Globals

wav2ccs.c File Reference

#include <stdio.h>
#include <stdlib.h>

Include dependency graph for wav2ccs.c:

Go to the source code of this file.

Functions

void main (int argc, char *argv[])

Function Documentation

void main | ( | int | argc,
 |  | char * | argv[]
 | ) |  |

Definition at line 4 of file wav2ccs.c.


CID Test: wav2ccs.c Source File

  • File List
  • Globals

wav2ccs.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003
00004 void main (int argc, char *argv[]) {
00005 FILE *fin, *fout;
00006 short sample_in;
00007 int i;
00008
00009 if(argc != 3) {
00010   printf ("\nUsage: %s fileinput.wav fileoutput.dat\n", argv[0]);
00011   exit (0);
00012 }
00013
00014 if((fin  = fopen (argv[1], "rb")) == NULL)
00015 {
00016    printf ("\nCan not open %s for reading\n", argv[1]);
00017    exit(0);
00018 }
00019
00020 if((fout  = fopen (argv[2], "wt")) == NULL)
00021 {
00022    printf ("\nCan not open %s for writting\n", argv[2]);
00023    exit(0);
00024 }
00025
00026
00027 printf ("\nUsing 40-samples frames");
00028 printf ("\nRewinding through first 44 bytes (wav format)\n");
00029 fseek(fin, 44, SEEK_SET);
00030
00031 fprintf (fout, "1651 2 0 1 40\n");
00032 for (i = 0; ; i ++) {
00033   if(fread (&sample_in, sizeof(short), 1, fin) != 1)
00034     break;
00035   fprintf (fout, "%d\n", sample_in);
00036 }
00037
00038 fclose (fout);
00039 fclose (fin);
00040
00041 printf ("\n%d samples converted into %s file\n", i, argv[2]);
00042
00043 }
00044


ECU: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_ecu_Version__top__
#define | __extern extern
#define | ti_mas_ecu_Version___VERS 150
#define | ti_mas_ecu_Version_MAJOR (10)
#define | ti_mas_ecu_Version_MINOR (91)
#define | ti_mas_ecu_Version_XVERTICAL (0)
#define | ti_mas_ecu_Version_PATCH (1)
#define | ti_mas_ecu_Version_BUILD (1)
#define | ti_mas_ecu_Version_QUALITY (3)
#define | ti_mas_ecu_Version_BTYPE (0)
#define | ti_mas_ecu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_ecu_Version_MAJOR
#define | Version_MINOR ti_mas_ecu_Version_MINOR
#define | Version_XVERTICAL ti_mas_ecu_Version_XVERTICAL
#define | Version_PATCH ti_mas_ecu_Version_PATCH
#define | Version_BUILD ti_mas_ecu_Version_BUILD
#define | Version_QUALITY ti_mas_ecu_Version_QUALITY
#define | Version_BTYPE ti_mas_ecu_Version_BTYPE
#define | Version_WIDTH ti_mas_ecu_Version_WIDTH

Define Documentation

#define ti_mas_ecu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_ecu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_ecu_Version_MAJOR (10)

Definition at line 50 of file Version.h.

#define ti_mas_ecu_Version_MINOR (91)

Definition at line 53 of file Version.h.

#define ti_mas_ecu_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_ecu_Version_PATCH (1)

Definition at line 59 of file Version.h.

#define ti_mas_ecu_Version_BUILD (1)

Definition at line 62 of file Version.h.

#define ti_mas_ecu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_ecu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_ecu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_ecu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_ecu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_ecu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_ecu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_ecu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_ecu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_ecu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_ecu_Version_WIDTH

Definition at line 97 of file Version.h.


ECU: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_ecu_Version__include
00023 #define ti_mas_ecu_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_ecu_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_ecu_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_ecu_Version_MAJOR (10)
00051
00052 /* MINOR */
00053 #define ti_mas_ecu_Version_MINOR (91)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_ecu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_ecu_Version_PATCH (1)
00060
00061 /* BUILD */
00062 #define ti_mas_ecu_Version_BUILD (1)
00063
00064 /* QUALITY */
00065 #define ti_mas_ecu_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_ecu_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_ecu_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_ecu_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_ecu_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_ecu_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_ecu_Version_MAJOR
00091 #define Version_MINOR      ti_mas_ecu_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_ecu_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_ecu_Version_PATCH
00094 #define Version_BUILD      ti_mas_ecu_Version_BUILD
00095 #define Version_QUALITY    ti_mas_ecu_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_ecu_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_ecu_Version_WIDTH
00098 #endif


ECU: Data Structures

  • Data Structures
  • Data Fields

ECU Data Structures

Here are the data structures with brief descriptions:
ecuConfig_t | ECU configuration structure
ecuConfigParam_t | ECU configuration parameter structure
ecuContext_s | ECU context Structure
ecuControl_t | ECU Control structure
ecuNewConfig_t | Creation configuration structure
ecuPerform_t | ECU Performance Parameters
ecuUpdateStat_t | Update statistics
ecuVersion_t | ECU Version structure


ECU: Detailed ECU Description

ECU (Echo Canceller Unit) Package

Detailed ECU Description

Description

The ECU component provides line echo cancellation functionality in a telephone network. The echo cancellation is performed with respect to the TDM side. This means that TDM-side echo is cancelled and prevented from reaching the packet network. The ECU may be configured to operate as either a multiple segment or single segment (full filter) echo canceller to attain line echo cancellation. In general, the echo canceller is configured for multiple segments only when the tail length exceeds 32ms.

The ECU employs the following features:

  1. Adaptative filtering via the Normalized Least Mean Square (NLMS) algorithm
  2. Dual filter approach for increased stability
  3. Multiple filter segments for reduced MIPS and increased stability
  4. Zero delay frame-based echo removal
  5. Nonlinear processing (NLP)
    1. Mixing the residual echo with comfort noise
    2. Triggers for far-end signal activity and the near-end signal absence
    3. Adapts comfort noise level to match near-end noise activity
  6. Double-talk detection for enhanced stability by pausing adaptation
  7. Diagnostic support - API to access:
    1. Filter coefficients
    2. Performance statistics
    3. State information
  8. Four-wire detection logic
  9. Wideband (16 KHz) support

The Echo Canceller Unit (ECU), uses the NLMS algorithm for filter adaptation. The NLMS adaptation is performed on two filters; one "search" filter to identify sources of hybrid echo using a proprietary hybrid identification algorithm, and a "background" filter, which adapts the coefficients identified by the search algorithm.

Additional stability is achieved by periodically switching the background filter coefficients to a "foreground" filter as gains in performance (as dictated by relative residual error) are achieved. The foreground filter is used exclusively for echo removal. This dual-filter approach provides the additional stability required for non-stationary signals such as voice.

The ECU operates as a sparsely populated model when configured for tail lengths above 32 msec (i.e., 64ms or 128ms). The aggregate temporal coverage for both the foreground and background filters (not combined, but for each) is generally limited to 32ms, with up to three distinct coefficient segments. These limitations are not strict though and may be initialized via the ecuContext_t structure.

Important Notes:
  1. The ECU does not provide internal V.25 detection for disabling. This is the responsibility of the system in which it is integrated.
  2. The ECU assumes zero-mean signals, though it does not perform DC offset removal. This too, is the responsibility of the system in which it is integrated.


ECU:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


ECU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


ECU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


ECU: ecu.h File Reference

  • File List
  • Globals

ecu.h File Reference

Detailed Description

Contains external APIs for the ECU module.

(C) Copyright 2008, Texas Instruments, Inc.

Definition in file ecu.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for ecu.h:

Go to the source code of this file.

Data Structures

struct | ecuVersion_t
ECU Version structure. More...
struct | ecuControl_t
ECU Control structure. More...
struct | ecuNewConfig_t
Creation configuration structure. More...
struct | ecuConfigParam_t
ECU configuration parameter structure. More...
struct | ecuConfig_t
ECU configuration structure. More...
struct | ecuPerform_t
ECU Performance Parameters. More...
struct | ecuUpdateStat_t
Update statistics. More...
struct | ecuContext_s
ECU context Structure. More...

Defines

ECU_CTL_MASK mode bits used by ecuControl
Remarks:
unless specified otherwise, the following bits will enable the corresponding functionality when SET, and disable when UNSET.

#define | ecu_ENABLE_ECHO_CANCELLER 0x0001
#define | ecu_ENABLE_UPDATE 0x0002
#define | ecu_ENABLE_NLP 0x0004
#define | ecu_RESERVED_1 0x0008
#define | ecu_ENABLE_AUTO_UPDATE 0x0010
#define | ecu_RESERVED_2 0x0020
#define | ecu_ENABLE_SEARCH 0x0040
#define | ecu_ENABLE_CNG_ADAPT 0x0080
#define | ecu_ENABLE_OPNLP_DETECT 0x0100
#define | ecu_CLEAR_FG 0x0200
#define | ecu_CLEAR_BG 0x0400
#define | ecu_CLEAR_SEARCH 0x0800
#define | ecu_DISABLE_DEMEANING 0x1000
#define | ecu_TEST_BIT_2 0x2000
#define | ecu_FORCED_NLP_CNG 0x4000
#define | ecu_NLP_NORMAL_LEVEL 0x8000
ECU_CTL_MASK mode1 bits used by ecuControl
Remarks:
unless specified otherwise, the following bits will enable the corresponding functionality when SET, and disable when CLEARED.

#define | ecu_ENABLE_NLP_PHASE_RND 0x0001
#define | ecu_ERL_CONFIG_BIT_0 0x0002
#define | ecu_ERL_CONFIG_BIT_1 0x0004
#define | ecu_ENABLE_ECP_CHG_DETECT 0x0008
#define | ecu_ENABLE_CPD_DETECT 0x0010
#define | ecu_ENABLE_NONLINEAR_EP 0x0020
#define | ecu_ENABLE_FAST_CPS 0x0040
#define | ecu_ENABLE_WIDEBAND 0x0080
#define | ECU_ENABLE_RECEIVE_CPS 0x0100
ECU state bitfield 0 definitions
#define | ecu_CTRL0_BIT_FIRST_TIME 0x0001
#define | ecu_CTRL0_BIT_FREEZE_EC 0x0002
#define | ecu_CTRL0_BIT_USE_NLP 0x0004
#define | ecu_CTRL0_BIT_ENABLE_EC 0x0008
#define | ecu_CTRL0_BIT_CONVERGED 0x0010
#define | ecu_CTRL0_BIT_NO_SEARCH 0x0020
#define | ecu_CTRL0_BIT_SLOW_LMS_EN 0x0040
#define | ecu_CTRL0_BIT_FORCE_SLOW_LMS 0x0080
#define | ecu_CTRL0_BIT_OPNLP_FOUND 0x0100
#define | ecu_CTRL0_BIT_FORCE_SLOW_SRCH 0x0200
#define | ecu_CTRL0_BIT_RESERVED_2 0x0400
#define | ecu_CTRL0_BIT_RESERVED_3 0x0800
#define | ecu_CTRL0_BIT_NLP_ADAPT 0x1000
#define | ecu_CTRL0_BIT_OPNLP_EN 0x2000
#define | ecu_CTRL0_BIT_FREEZE_SRCH 0x4000
#define | ecu_CTRL0_BIT_DEMEAN_EN 0x8000
ECU state bitfield 1 definitions
#define | ecu_CTRL1_BIT_TONE_PRESENT 0x0001
#define | ecu_CTRL1_BIT_FORCED_NLP_CNG 0x0002
#define | ecu_CTRL1_BIT_NLP_NORM_LEV 0x0004
#define | ecu_CTRL1_BIT_ENABLE_SRCH 0x0008
#define | ecu_CTRL1_BIT_ENABLE_UPDATE 0x0010
#define | ecu_CTRL1_BIT_NLP_PHASE_RND_EN 0x0020
#define | ecu_CTRL1_0DB_CONFIG 0x0040
#define | ecu_CTRL1_3DB_CONFIG 0x0080
#define | ecu_CTRL1_ECP_CHG_DETECT_EN 0x0100
#define | ecu_CTRL1_CPD_DETECT_EN 0x0200
#define | ecu_CTRL1_PLACEMENT_OCCUR 0x0400
#define | ecu_CTRL1_NONLINEAR_ECHO_PATH 0x0800
#define | ecu_CTRL1_FAST_CPS 0x1000
#define | ecu_CTRL1_WIDEBAND 0x2000
#define | ecu_CTRL1_CPT_SUSPECT 0x4000
#define | ECU_CTRL1_RECEIVE_CPS 0x8000
ecu_VERF MASK mode bits
#define | ecu_VERF_MULTISEGMENT 0x0001
#define | ecu_VERF_5P5MS_FRAME 0x0002
#define | ecu_VERF_DLINE_COMPRESS 0x0004
#define | ecu_VERF_DEBUG_STREAM 0x0008
#define | ecu_VERF_NEAR_MODE 0x0010
#define | ecu_VERF_03DB_CONFIG 0x0040
#define | ecu_VERF_CONST_PCM_DETECT 0x0080
#define | ecu_VERF_INST_RELOCATION 0x0100
#define | ecu_VERF_RERL_ESTIMATE 0x0200
#define | ecu_VERF_WIDE_BAND 0x0400
#define | ecu_VERF_TELOGY_ECAN 0x8000

Typedefs

typedef void | ecuSizeConfig_t
Size configuration structure.
typedef void(*) | vfnptr (void)
Void function pointer.
typedef ecuContext_s | ecuContext_t
ECU context Structure.

Enumerations

ECU Return Codes
enum | { ecu_NOMEMORY = -1, ecu_NOERR = 0, ecu_ERROR = 1 }
ecu filter selection codes - ecuGetFilter()
enum | { ecu_FLT_FOREGROUND = 0, ecu_FLT_BACKGROUND = 1, ecu_FLT_SEARCH = 2 }
ECU Control Code
enum {
ecu_CTL_MASK = 0, ecu_CTL_BG_LMS_SPEED = 1, ecu_CTL_BG_LMS_ENABLE = 2, ecu_CTL_SEARCH_LMS_SPEED = 3,
ecu_CTL_SEARCH_LMS_ENABLE = 4, ecu_CTL_FIXED_NOISE_LEVEL = 5, ecu_CTL_NLP_AGGRESSIVE = 6, ecu_CTL_NLP_CN_CONFIG = 7
}
ECU speed selection modes - ecuControl()
enum | { ecu_FORCE_SLOW = 0, ecu_ALLOW_FAST = 1 }
ECU Resource management notification bits
enum | { ecu_BIT_ACTION_SET = 0, ecu_BIT_ACTION_CLR = 1 }
ECU search preparation events - (*ecuSrchPrep()), e.g. swapping
enum | { ecu_SEARCH_REQUEST = 0, ecu_SEARCH_FINISH = 1 }
ECU Exception Codes
enum {
ecu_EXC_OPEN = 1, ecu_EXC_DELETE = 2, ecu_EXC_SIZE = 3, ecu_EXC_PXBUFSIZE = 4,
ecu_EXC_OPEN_NLP = 5
}

Functions

ECU External API
void | ecuClose (void *ecuInst)
To close an instance of ECU.
tint | ecuControl (void *ecuInst, ecuControl_t *ctl)
Changes the operational mode of the ECU.
void | ecuDelete (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs)
To delete an instance of ECU.
tint | ecuGetFilter (void *ecuInst, tint select, tint start, tint num, Fract *hbuf)
Returns the current EC filter coefficients.
void | ecuGetPerformance (void *ecuInst, tint *state_bf, ecuVersion_t *version, ecuPerform_t *perform, ecuUpdateStat_t *ustat, LFract *noise_x, LFract *noise_y, Fract *rerl, tint *tail_len, tbool rustat)
Returns ECU performance parameters.
void | ecuOpen (void *ecuInst, ecuConfig_t *cfg)
Open and configure an instance of ECU.
tint | ecuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, ecuSizeConfig_t *cfg)
Calculate the worst case buffer sizes for the ECU.
tint | ecuNew (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs, ecuNewConfig_t *cfg)
Creates an instance of ECU and initializes memory buffers.
tint | ecuRelocate (void **ecuInst, tint *numEcoBufs, tword *bufAdrs[])
void | ecuSendIn (void *ecuInst, void *vsend_in, void *vrecv_in, void *vsend_out)
Signal an ECU to perform echo cancellation.
void | ecuReceiveIn (void *ecuInst, void *speech_samples)
Perform Rx path processing for ECU.

Variables

ecuContext_t ecuContext


ECU: ecu.h Source File

  • File List
  • Globals

ecu.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Echo Canceller Unit Definitions and API.
00003  ******************************************************************************
00004  * FILE NAME:   ecu.h
00005  *
00006  * DESCRIPTION: Contains definitions and API for the echo canceller unit.
00007  *
00008  * TABS: NONE
00009  *****************************************************************************/
00010 #ifndef _ECU_H
00011 #define _ECU_H
00012
00068 /* System include files */
00069 #include <ti/mas/types/types.h>
00070
00071 /* System utilities' API's */
00072 #include <ti/mas/util/ecomem.h>
00073
00074
00082 /* @{ */
00083 enum {
00084   ecu_NOMEMORY  = -1,
00085   ecu_NOERR     = 0,
00086   ecu_ERROR     = 1
00087 };
00088 /*  @} */
00096 enum {
00097   ecu_FLT_FOREGROUND = 0,
00098   ecu_FLT_BACKGROUND = 1,
00099   ecu_FLT_SEARCH     = 2
00100 };
00101
00105 enum {
00106   ecu_CTL_MASK              = 0,
00107   ecu_CTL_BG_LMS_SPEED      = 1,
00108   ecu_CTL_BG_LMS_ENABLE     = 2,
00109   ecu_CTL_SEARCH_LMS_SPEED  = 3,
00110   ecu_CTL_SEARCH_LMS_ENABLE = 4,
00111   ecu_CTL_FIXED_NOISE_LEVEL = 5,
00112   ecu_CTL_NLP_AGGRESSIVE    = 6,
00113   ecu_CTL_NLP_CN_CONFIG     = 7
00114 };
00115
00119 enum {
00120   ecu_FORCE_SLOW = 0,
00122   ecu_ALLOW_FAST = 1
00123 };
00124
00131 #define ecu_ENABLE_ECHO_CANCELLER   0x0001
00134 #define ecu_ENABLE_UPDATE           0x0002
00135 #define ecu_ENABLE_NLP              0x0004
00136 #define ecu_RESERVED_1              0x0008
00137 #define ecu_ENABLE_AUTO_UPDATE      0x0010
00141 #define ecu_RESERVED_2              0x0020
00142 #define ecu_ENABLE_SEARCH           0x0040
00144 #define ecu_ENABLE_CNG_ADAPT        0x0080
00145 #define ecu_ENABLE_OPNLP_DETECT     0x0100
00146 #define ecu_CLEAR_FG                0x0200
00147 #define ecu_CLEAR_BG                0x0400
00148 #define ecu_CLEAR_SEARCH            0x0800
00150 #define ecu_DISABLE_DEMEANING       0x1000
00151 #define ecu_TEST_BIT_2              0x2000
00152 #define ecu_FORCED_NLP_CNG          0x4000
00153 #define ecu_NLP_NORMAL_LEVEL        0x8000
00163 #define ecu_ENABLE_NLP_PHASE_RND    0x0001
00164 #define ecu_ERL_CONFIG_BIT_0        0x0002
00166 #define ecu_ERL_CONFIG_BIT_1        0x0004
00195 #define ecu_ENABLE_ECP_CHG_DETECT   0x0008
00197 #define ecu_ENABLE_CPD_DETECT       0x0010
00198 #define ecu_ENABLE_NONLINEAR_EP     0x0020
00200 #define ecu_ENABLE_FAST_CPS         0x0040
00202 #define ecu_ENABLE_WIDEBAND         0x0080
00204 #define ECU_ENABLE_RECEIVE_CPS      0x0100
00209 #define ecu_CTRL0_BIT_FIRST_TIME       0x0001
00210 #define ecu_CTRL0_BIT_FREEZE_EC        0x0002
00211 #define ecu_CTRL0_BIT_USE_NLP          0x0004
00212 #define ecu_CTRL0_BIT_ENABLE_EC        0x0008
00213 #define ecu_CTRL0_BIT_CONVERGED        0x0010
00214 #define ecu_CTRL0_BIT_NO_SEARCH        0x0020
00215 #define ecu_CTRL0_BIT_SLOW_LMS_EN      0x0040
00216 #define ecu_CTRL0_BIT_FORCE_SLOW_LMS   0x0080
00217 #define ecu_CTRL0_BIT_OPNLP_FOUND      0x0100
00218 #define ecu_CTRL0_BIT_FORCE_SLOW_SRCH  0x0200
00219 #define ecu_CTRL0_BIT_RESERVED_2       0x0400
00220 #define ecu_CTRL0_BIT_RESERVED_3       0x0800
00221 #define ecu_CTRL0_BIT_NLP_ADAPT        0x1000
00223 #define ecu_CTRL0_BIT_OPNLP_EN         0x2000
00224 #define ecu_CTRL0_BIT_FREEZE_SRCH      0x4000
00225 #define ecu_CTRL0_BIT_DEMEAN_EN        0x8000
00230 #define ecu_CTRL1_BIT_TONE_PRESENT     0x0001
00231 #define ecu_CTRL1_BIT_FORCED_NLP_CNG   0x0002
00232 #define ecu_CTRL1_BIT_NLP_NORM_LEV     0x0004
00233 #define ecu_CTRL1_BIT_ENABLE_SRCH      0x0008
00234 #define ecu_CTRL1_BIT_ENABLE_UPDATE    0x0010
00235 #define ecu_CTRL1_BIT_NLP_PHASE_RND_EN 0x0020
00236 #define ecu_CTRL1_0DB_CONFIG           0x0040
00237 #define ecu_CTRL1_3DB_CONFIG           0x0080
00238 #define ecu_CTRL1_ECP_CHG_DETECT_EN    0x0100
00239 #define ecu_CTRL1_CPD_DETECT_EN        0x0200
00240 #define ecu_CTRL1_PLACEMENT_OCCUR      0x0400
00241 #define ecu_CTRL1_NONLINEAR_ECHO_PATH  0x0800
00242 #define ecu_CTRL1_FAST_CPS             0x1000
00243 #define ecu_CTRL1_WIDEBAND             0x2000
00244 #define ecu_CTRL1_CPT_SUSPECT          0x4000
00245 #define ECU_CTRL1_RECEIVE_CPS          0x8000
00250 #define ecu_VERF_MULTISEGMENT          0x0001
00251 #define ecu_VERF_5P5MS_FRAME           0x0002
00252 #define ecu_VERF_DLINE_COMPRESS        0x0004
00253 #define ecu_VERF_DEBUG_STREAM          0x0008
00254 #define ecu_VERF_NEAR_MODE             0x0010
00255 #define ecu_VERF_03DB_CONFIG           0x0040
00256 #define ecu_VERF_CONST_PCM_DETECT      0x0080
00257 #define ecu_VERF_INST_RELOCATION       0x0100
00258 #define ecu_VERF_RERL_ESTIMATE         0x0200
00259 #define ecu_VERF_WIDE_BAND             0x0400
00260 #define ecu_VERF_TELOGY_ECAN           0x8000
00266 enum {
00267   ecu_BIT_ACTION_SET = 0,
00268   ecu_BIT_ACTION_CLR = 1
00269 };
00270
00275 enum {
00276   ecu_SEARCH_REQUEST = 0,
00277   ecu_SEARCH_FINISH  = 1
00278 };
00279
00288 /* @{ */
00289 enum {
00290    ecu_EXC_OPEN      = 1,
00291    ecu_EXC_DELETE    = 2,
00292    ecu_EXC_SIZE      = 3,
00293    ecu_EXC_PXBUFSIZE = 4,
00294    ecu_EXC_OPEN_NLP  = 5
00295 };
00296 /*  @} */
00299
00306 typedef struct {
00307   tuint version;
00308   tuint revision;
00309   tuint patch;
00310   tuint build;
00311   tuint feature;
00312 } ecuVersion_t;
00313
00321 typedef struct {
00322   tint  ctl_code;
00323   union {
00324     tint  ctl_mask[2];
00325     tint  bg_speed;
00326     tint  srch_speed;
00327     tint  place_speed;
00328     tbool enable;
00329     tint  n_level;
00330     tuint nlp_aggress;
00333     Fract cn_config;
00335   } u;
00336 } ecuControl_t;
00337
00345 typedef void ecuSizeConfig_t;
00346
00354 typedef struct {
00355   tuint ID;
00356 } ecuNewConfig_t;
00357
00365 typedef struct {
00366   tint  filter_length;
00368   tint  config_bitfield;
00370   tint  config_bitfield1;
00372   tint  noise_level;
00375   Fract nlp_aggress;
00377   Fract cn_config;
00381 } ecuConfigParam_t;
00382
00390 typedef struct {
00391   tint              samples_per_frame;
00392   tint              y2x_delay;
00393   void              *sendOutInst;
00394   void              *recOutInst;
00395   ecuConfigParam_t  *cfgParam;
00398   const tint        *pcm_expand_tbl;
00399   tuint             pcm_zero;
00400 } ecuConfig_t;
00401
00411 typedef struct {
00412   LFract  Px;
00413   LFract  Py;
00414   LFract  Pe;
00415   Fract   erlest;
00416   Fract   acomest;
00417 } ecuPerform_t;
00418
00427 typedef struct {
00428   tulong attempt_update;
00429   tulong attempt_search;
00430   tulong erle_bypass;
00431   tulong xtone_bypass;
00432   tulong other_bypass;
00434   tulong xidle;
00435   tuint  double_talk;
00436   tuint  dt_cps;
00437   tuint  dt_cpt;
00438   tuint  nlp;
00439   tuint  divergence;
00440   tuint  srch_divergence;
00441   tuint  fg_switch;
00442   tuint  bg_switch;
00443   tuint  openloop_found;
00444   tuint  numseg_change;
00446   tuint  segment_change;
00448   tuint  converge_exit;
00449   tuint  txbssat_events;
00450   tuint  rxbssat_events;
00451 } ecuUpdateStat_t;
00452
00460 typedef void (*vfnptr)(void);
00461
00469 typedef struct ecuContext_s {
00470   vfnptr exception;
00471   void (*debugStrmWrite)  (tuint id, tuint n,
00472                            tuint chan, void *vptr, tuint type);
00473   void (*mipsEcuInstEvt)  (void *inst, tint event);
00474   void (*srchPrep)        (tuint ID, tint event);
00475   void (*sendOutFcn)      (void *targetInst,
00476                            void *send_out_ptr);
00478   void (*receiveOutFcn)   (void *targetInst,
00479                            void *receive_out_ptr);
00481   tint max_samples_per_frame;
00482   tint max_filter_length;
00483   tint max_filter_seg_length;
00484   tint max_filter_seg_count;
00485   tint max_y2x_delay;
00486   tulong     expanded_bf;
00488   linSample  *rxout_buf_base;
00489   linSample  *expand_ptr;
00490   tword      *pack_ptr;
00491 } ecuContext_t;
00492
00493 /* ECU context */
00494 extern ecuContext_t ecuContext;
00495
00500 /* ECU.c */
00509 void  ecuClose          (void *ecuInst);
00510
00523 tint  ecuControl        (void *ecuInst, ecuControl_t *ctl);
00524
00536 void  ecuDelete         (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs);
00537
00556 tint  ecuGetFilter      (void *ecuInst, tint select, tint start,
00557                          tint num, Fract *hbuf);
00558
00581 void  ecuGetPerformance (void *ecuInst, tint *state_bf, ecuVersion_t *version,
00582                          ecuPerform_t *perform, ecuUpdateStat_t *ustat,
00583                          LFract *noise_x, LFract *noise_y, Fract *rerl, tint *tail_len,
00584                          tbool rustat);
00594 void  ecuOpen           (void *ecuInst, ecuConfig_t *cfg);
00595
00596 /* ECUINIT.c */
00609 tint  ecuGetSizes       (tint *nbufs, const ecomemBuffer_t **bufs,
00610                          ecuSizeConfig_t *cfg);
00611
00628 tint  ecuNew            (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs,
00629                          ecuNewConfig_t *cfg);
00630 tint  ecuRelocate       (void **ecuInst, tint *numEcoBufs, tword *bufAdrs[]);
00631
00632 /* ECUFG.c */
00633
00649 void  ecuSendIn     (void *ecuInst, void *vsend_in, void *vrecv_in, void *vsend_out);
00650
00660 void  ecuReceiveIn  (void *ecuInst, void *speech_samples);
00661
00662
00666 #endif /* _ECU_H */
00667 /* nothing past this point */


ECU: ECU External API

ECU (Echo Canceller Unit) Package

ECU External API

Page Contents

  1. Complete ECU API
  2. ECU Creation Functions
  3. ECU Configuration Functions
  4. ECU Execution Functions
  5. ECU Destruction Functions
  6. ECU Return Codes

Complete ECU API

  1. ecuGetSizes()
  2. ecuNew()
  3. ecuOpen()
  4. ecuRelocate()
  5. ecuControl()
  6. ecuGetPerformance()
  7. ecuGetFilter()
  8. ecuSendIn()
  9. ecuReceiveIn()
  10. ecuClose()
  11. ecuDelete()

ECU Creation Functions

ECU instance creation is a four step process. First, determine the ECU memory requirements via ecuGetSize() below. Second, allocate the ECU memory buffers using any system-prescribed method. Create the ECU instance by passing the allocated buffer information to ecuNew(). Finally, open the ECU instance for use via the ecuOpen() API function. This process must be followed in the order given for proper operation. Once an ECU instance is opened, it may be used for echo cancellation.

  1. ecuGetSizes()
  2. ecuNew()
  3. ecuOpen()

ECU Configuration Functions

The ECU component has three external API configuration routines; one to configure the instance -- ecuControl(), and two to gather operational information -- ecuGetPerformance() and ecuGetFilter(). These external API functions require an active ECU instance that has been opened according to the procedure in ECU Creation Functions above.

  1. ecuControl()
  2. ecuGetPerformance()
  3. ecuGetFilter()

ECU Execution Functions

The ECU execution API consists of two routines, one per direction. The ecuSendIn() API function operates on linear samples in the from-TDM-to-Network direction. This is currently the only execution required for echo removal. To ensure proper synchronization, the ecuSendIn() routine accepts frames of linear PCM samples for both the TX and RX paths. Proper synchronization of these samples is the responsibility of the system or calling function.

The ecuReceiveIn() API function does not currently perform any processing. This routine should, however, be integrated into the system's RX processing path to ensure that future processing incorporated into this routine will be performed.

The execution API functions require an active ECU instance that has been opened according to the procedure in ECU Creation Functions above.

  1. ecuSendIn()
  2. ecuReceiveIn()
  3. ecuRelocate()

ECU Destruction Functions

ECU instance desctruction is a two step process. First, the ECU must be closed using the ecuClose() API function. Once the ECU is closed it may be removed via the ecuDelete() function.

Note:
  1. Once an instance has been closed, it may be re-opened via the ecuOpen() routine. The instance memory should not be reallocated until the instance is deleted.

  1. ecuClose()
  2. ecuDelete()

ECU Return Codes

The ECU module provides various kinds of output to indicate errors in configuration and/or execution.

  • ECO API return codes
  • Exception codes


ECU: File Index

  • File List
  • Globals

ECU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
ecu.h [code] Contains external APIs for the ECU module


ECU: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • acomest : ecuPerform_t
  • attempt_search : ecuUpdateStat_t
  • attempt_update : ecuUpdateStat_t

- b -

  • bg_speed : ecuControl_t
  • bg_switch : ecuUpdateStat_t
  • build : ecuVersion_t

- c -

  • cfgParam : ecuConfig_t
  • cn_config : ecuControl_t , ecuConfigParam_t
  • config_bitfield : ecuConfigParam_t
  • config_bitfield1 : ecuConfigParam_t
  • converge_exit : ecuUpdateStat_t
  • ctl_code : ecuControl_t
  • ctl_mask : ecuControl_t

- d -

  • debugStrmWrite : ecuContext_s
  • divergence : ecuUpdateStat_t
  • double_talk : ecuUpdateStat_t
  • dt_cps : ecuUpdateStat_t
  • dt_cpt : ecuUpdateStat_t

- e -

  • enable : ecuControl_t
  • erle_bypass : ecuUpdateStat_t
  • erlest : ecuPerform_t
  • exception : ecuContext_s
  • expand_ptr : ecuContext_s
  • expanded_bf : ecuContext_s

- f -

  • feature : ecuVersion_t
  • fg_switch : ecuUpdateStat_t
  • filter_length : ecuConfigParam_t

- i -

  • ID : ecuNewConfig_t

- m -

  • max_filter_length : ecuContext_s
  • max_filter_seg_count : ecuContext_s
  • max_filter_seg_length : ecuContext_s
  • max_samples_per_frame : ecuContext_s
  • max_y2x_delay : ecuContext_s
  • mipsEcuInstEvt : ecuContext_s

- n -

  • n_level : ecuControl_t
  • nlp : ecuUpdateStat_t
  • nlp_aggress : ecuControl_t , ecuConfigParam_t
  • noise_level : ecuConfigParam_t
  • numseg_change : ecuUpdateStat_t

- o -

  • openloop_found : ecuUpdateStat_t
  • other_bypass : ecuUpdateStat_t

- p -

  • pack_ptr : ecuContext_s
  • patch : ecuVersion_t
  • pcm_expand_tbl : ecuConfig_t
  • pcm_zero : ecuConfig_t
  • Pe : ecuPerform_t
  • place_speed : ecuControl_t
  • Px : ecuPerform_t
  • Py : ecuPerform_t

- r -

  • receiveOutFcn : ecuContext_s
  • recOutInst : ecuConfig_t
  • revision : ecuVersion_t
  • rxbssat_events : ecuUpdateStat_t
  • rxout_buf_base : ecuContext_s

- s -

  • samples_per_frame : ecuConfig_t
  • segment_change : ecuUpdateStat_t
  • sendOutFcn : ecuContext_s
  • sendOutInst : ecuConfig_t
  • srch_divergence : ecuUpdateStat_t
  • srch_speed : ecuControl_t
  • srchPrep : ecuContext_s

- t -

  • txbssat_events : ecuUpdateStat_t

- u -

  • u : ecuControl_t

- v -

  • version : ecuVersion_t

- x -

  • xidle : ecuUpdateStat_t
  • xtone_bypass : ecuUpdateStat_t

- y -

  • y2x_delay : ecuConfig_t


ECU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- a -

  • acomest : ecuPerform_t
  • attempt_search : ecuUpdateStat_t
  • attempt_update : ecuUpdateStat_t

- b -

  • bg_speed : ecuControl_t
  • bg_switch : ecuUpdateStat_t
  • build : ecuVersion_t

- c -

  • cfgParam : ecuConfig_t
  • cn_config : ecuControl_t , ecuConfigParam_t
  • config_bitfield : ecuConfigParam_t
  • config_bitfield1 : ecuConfigParam_t
  • converge_exit : ecuUpdateStat_t
  • ctl_code : ecuControl_t
  • ctl_mask : ecuControl_t

- d -

  • debugStrmWrite : ecuContext_s
  • divergence : ecuUpdateStat_t
  • double_talk : ecuUpdateStat_t
  • dt_cps : ecuUpdateStat_t
  • dt_cpt : ecuUpdateStat_t

- e -

  • enable : ecuControl_t
  • erle_bypass : ecuUpdateStat_t
  • erlest : ecuPerform_t
  • exception : ecuContext_s
  • expand_ptr : ecuContext_s
  • expanded_bf : ecuContext_s

- f -

  • feature : ecuVersion_t
  • fg_switch : ecuUpdateStat_t
  • filter_length : ecuConfigParam_t

- i -

  • ID : ecuNewConfig_t

- m -

  • max_filter_length : ecuContext_s
  • max_filter_seg_count : ecuContext_s
  • max_filter_seg_length : ecuContext_s
  • max_samples_per_frame : ecuContext_s
  • max_y2x_delay : ecuContext_s
  • mipsEcuInstEvt : ecuContext_s

- n -

  • n_level : ecuControl_t
  • nlp : ecuUpdateStat_t
  • nlp_aggress : ecuControl_t , ecuConfigParam_t
  • noise_level : ecuConfigParam_t
  • numseg_change : ecuUpdateStat_t

- o -

  • openloop_found : ecuUpdateStat_t
  • other_bypass : ecuUpdateStat_t

- p -

  • pack_ptr : ecuContext_s
  • patch : ecuVersion_t
  • pcm_expand_tbl : ecuConfig_t
  • pcm_zero : ecuConfig_t
  • Pe : ecuPerform_t
  • place_speed : ecuControl_t
  • Px : ecuPerform_t
  • Py : ecuPerform_t

- r -

  • receiveOutFcn : ecuContext_s
  • recOutInst : ecuConfig_t
  • revision : ecuVersion_t
  • rxbssat_events : ecuUpdateStat_t
  • rxout_buf_base : ecuContext_s

- s -

  • samples_per_frame : ecuConfig_t
  • segment_change : ecuUpdateStat_t
  • sendOutFcn : ecuContext_s
  • sendOutInst : ecuConfig_t
  • srch_divergence : ecuUpdateStat_t
  • srch_speed : ecuControl_t
  • srchPrep : ecuContext_s

- t -

  • txbssat_events : ecuUpdateStat_t

- u -

  • u : ecuControl_t

- v -

  • version : ecuVersion_t

- x -

  • xidle : ecuUpdateStat_t
  • xtone_bypass : ecuUpdateStat_t

- y -

  • y2x_delay : ecuConfig_t


ECU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines
  • _
  • e
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h

- e -

  • ecu_ALLOW_FAST : ecu.h
  • ecu_BIT_ACTION_CLR : ecu.h
  • ecu_BIT_ACTION_SET : ecu.h
  • ecu_CLEAR_BG : ecu.h
  • ecu_CLEAR_FG : ecu.h
  • ecu_CLEAR_SEARCH : ecu.h
  • ecu_CTL_BG_LMS_ENABLE : ecu.h
  • ecu_CTL_BG_LMS_SPEED : ecu.h
  • ecu_CTL_FIXED_NOISE_LEVEL : ecu.h
  • ecu_CTL_MASK : ecu.h
  • ecu_CTL_NLP_AGGRESSIVE : ecu.h
  • ecu_CTL_NLP_CN_CONFIG : ecu.h
  • ecu_CTL_SEARCH_LMS_ENABLE : ecu.h
  • ecu_CTL_SEARCH_LMS_SPEED : ecu.h
  • ecu_CTRL0_BIT_CONVERGED : ecu.h
  • ecu_CTRL0_BIT_DEMEAN_EN : ecu.h
  • ecu_CTRL0_BIT_ENABLE_EC : ecu.h
  • ecu_CTRL0_BIT_FIRST_TIME : ecu.h
  • ecu_CTRL0_BIT_FORCE_SLOW_LMS : ecu.h
  • ecu_CTRL0_BIT_FORCE_SLOW_SRCH : ecu.h
  • ecu_CTRL0_BIT_FREEZE_EC : ecu.h
  • ecu_CTRL0_BIT_FREEZE_SRCH : ecu.h
  • ecu_CTRL0_BIT_NLP_ADAPT : ecu.h
  • ecu_CTRL0_BIT_NO_SEARCH : ecu.h
  • ecu_CTRL0_BIT_OPNLP_EN : ecu.h
  • ecu_CTRL0_BIT_OPNLP_FOUND : ecu.h
  • ecu_CTRL0_BIT_RESERVED_2 : ecu.h
  • ecu_CTRL0_BIT_RESERVED_3 : ecu.h
  • ecu_CTRL0_BIT_SLOW_LMS_EN : ecu.h
  • ecu_CTRL0_BIT_USE_NLP : ecu.h
  • ecu_CTRL1_0DB_CONFIG : ecu.h
  • ecu_CTRL1_3DB_CONFIG : ecu.h
  • ecu_CTRL1_BIT_ENABLE_SRCH : ecu.h
  • ecu_CTRL1_BIT_ENABLE_UPDATE : ecu.h
  • ecu_CTRL1_BIT_FORCED_NLP_CNG : ecu.h
  • ecu_CTRL1_BIT_NLP_NORM_LEV : ecu.h
  • ecu_CTRL1_BIT_NLP_PHASE_RND_EN : ecu.h
  • ecu_CTRL1_BIT_TONE_PRESENT : ecu.h
  • ecu_CTRL1_CPD_DETECT_EN : ecu.h
  • ecu_CTRL1_CPT_SUSPECT : ecu.h
  • ecu_CTRL1_ECP_CHG_DETECT_EN : ecu.h
  • ecu_CTRL1_FAST_CPS : ecu.h
  • ecu_CTRL1_NONLINEAR_ECHO_PATH : ecu.h
  • ecu_CTRL1_PLACEMENT_OCCUR : ecu.h
  • ECU_CTRL1_RECEIVE_CPS : ecu.h
  • ecu_CTRL1_WIDEBAND : ecu.h
  • ecu_DISABLE_DEMEANING : ecu.h
  • ecu_ENABLE_AUTO_UPDATE : ecu.h
  • ecu_ENABLE_CNG_ADAPT : ecu.h
  • ecu_ENABLE_CPD_DETECT : ecu.h
  • ecu_ENABLE_ECHO_CANCELLER : ecu.h
  • ecu_ENABLE_ECP_CHG_DETECT : ecu.h
  • ecu_ENABLE_FAST_CPS : ecu.h
  • ecu_ENABLE_NLP : ecu.h
  • ecu_ENABLE_NLP_PHASE_RND : ecu.h
  • ecu_ENABLE_NONLINEAR_EP : ecu.h
  • ecu_ENABLE_OPNLP_DETECT : ecu.h
  • ECU_ENABLE_RECEIVE_CPS : ecu.h
  • ecu_ENABLE_SEARCH : ecu.h
  • ecu_ENABLE_UPDATE : ecu.h
  • ecu_ENABLE_WIDEBAND : ecu.h
  • ecu_ERL_CONFIG_BIT_0 : ecu.h
  • ecu_ERL_CONFIG_BIT_1 : ecu.h
  • ecu_ERROR : ecu.h
  • ecu_EXC_DELETE : ecu.h
  • ecu_EXC_OPEN : ecu.h
  • ecu_EXC_OPEN_NLP : ecu.h
  • ecu_EXC_PXBUFSIZE : ecu.h
  • ecu_EXC_SIZE : ecu.h
  • ecu_FLT_BACKGROUND : ecu.h
  • ecu_FLT_FOREGROUND : ecu.h
  • ecu_FLT_SEARCH : ecu.h
  • ecu_FORCE_SLOW : ecu.h
  • ecu_FORCED_NLP_CNG : ecu.h
  • ecu_NLP_NORMAL_LEVEL : ecu.h
  • ecu_NOERR : ecu.h
  • ecu_NOMEMORY : ecu.h
  • ecu_RESERVED_1 : ecu.h
  • ecu_RESERVED_2 : ecu.h
  • ecu_SEARCH_FINISH : ecu.h
  • ecu_SEARCH_REQUEST : ecu.h
  • ecu_TEST_BIT_2 : ecu.h
  • ecu_VERF_03DB_CONFIG : ecu.h
  • ecu_VERF_5P5MS_FRAME : ecu.h
  • ecu_VERF_CONST_PCM_DETECT : ecu.h
  • ecu_VERF_DEBUG_STREAM : ecu.h
  • ecu_VERF_DLINE_COMPRESS : ecu.h
  • ecu_VERF_INST_RELOCATION : ecu.h
  • ecu_VERF_MULTISEGMENT : ecu.h
  • ecu_VERF_NEAR_MODE : ecu.h
  • ecu_VERF_RERL_ESTIMATE : ecu.h
  • ecu_VERF_TELOGY_ECAN : ecu.h
  • ecu_VERF_WIDE_BAND : ecu.h
  • ecuClose() : ecu.h
  • ecuContext : ecu.h
  • ecuContext_t : ecu.h
  • ecuControl() : ecu.h
  • ecuDelete() : ecu.h
  • ecuGetFilter() : ecu.h
  • ecuGetPerformance() : ecu.h
  • ecuGetSizes() : ecu.h
  • ecuNew() : ecu.h
  • ecuOpen() : ecu.h
  • ecuReceiveIn() : ecu.h
  • ecuRelocate() : ecu.h
  • ecuSendIn() : ecu.h
  • ecuSizeConfig_t : ecu.h

- t -

  • ti_mas_ecu_Version___VERS : Version.h
  • ti_mas_ecu_Version__top__ : Version.h
  • ti_mas_ecu_Version_BTYPE : Version.h
  • ti_mas_ecu_Version_BUILD : Version.h
  • ti_mas_ecu_Version_MAJOR : Version.h
  • ti_mas_ecu_Version_MINOR : Version.h
  • ti_mas_ecu_Version_PATCH : Version.h
  • ti_mas_ecu_Version_QUALITY : Version.h
  • ti_mas_ecu_Version_WIDTH : Version.h
  • ti_mas_ecu_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h
  • vfnptr : ecu.h


ECU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines
  • _
  • e
  • t
  • v

- _ -

  • __extern : Version.h

- e -

  • ecu_CLEAR_BG : ecu.h
  • ecu_CLEAR_FG : ecu.h
  • ecu_CLEAR_SEARCH : ecu.h
  • ecu_CTRL0_BIT_CONVERGED : ecu.h
  • ecu_CTRL0_BIT_DEMEAN_EN : ecu.h
  • ecu_CTRL0_BIT_ENABLE_EC : ecu.h
  • ecu_CTRL0_BIT_FIRST_TIME : ecu.h
  • ecu_CTRL0_BIT_FORCE_SLOW_LMS : ecu.h
  • ecu_CTRL0_BIT_FORCE_SLOW_SRCH : ecu.h
  • ecu_CTRL0_BIT_FREEZE_EC : ecu.h
  • ecu_CTRL0_BIT_FREEZE_SRCH : ecu.h
  • ecu_CTRL0_BIT_NLP_ADAPT : ecu.h
  • ecu_CTRL0_BIT_NO_SEARCH : ecu.h
  • ecu_CTRL0_BIT_OPNLP_EN : ecu.h
  • ecu_CTRL0_BIT_OPNLP_FOUND : ecu.h
  • ecu_CTRL0_BIT_RESERVED_2 : ecu.h
  • ecu_CTRL0_BIT_RESERVED_3 : ecu.h
  • ecu_CTRL0_BIT_SLOW_LMS_EN : ecu.h
  • ecu_CTRL0_BIT_USE_NLP : ecu.h
  • ecu_CTRL1_0DB_CONFIG : ecu.h
  • ecu_CTRL1_3DB_CONFIG : ecu.h
  • ecu_CTRL1_BIT_ENABLE_SRCH : ecu.h
  • ecu_CTRL1_BIT_ENABLE_UPDATE : ecu.h
  • ecu_CTRL1_BIT_FORCED_NLP_CNG : ecu.h
  • ecu_CTRL1_BIT_NLP_NORM_LEV : ecu.h
  • ecu_CTRL1_BIT_NLP_PHASE_RND_EN : ecu.h
  • ecu_CTRL1_BIT_TONE_PRESENT : ecu.h
  • ecu_CTRL1_CPD_DETECT_EN : ecu.h
  • ecu_CTRL1_CPT_SUSPECT : ecu.h
  • ecu_CTRL1_ECP_CHG_DETECT_EN : ecu.h
  • ecu_CTRL1_FAST_CPS : ecu.h
  • ecu_CTRL1_NONLINEAR_ECHO_PATH : ecu.h
  • ecu_CTRL1_PLACEMENT_OCCUR : ecu.h
  • ECU_CTRL1_RECEIVE_CPS : ecu.h
  • ecu_CTRL1_WIDEBAND : ecu.h
  • ecu_DISABLE_DEMEANING : ecu.h
  • ecu_ENABLE_AUTO_UPDATE : ecu.h
  • ecu_ENABLE_CNG_ADAPT : ecu.h
  • ecu_ENABLE_CPD_DETECT : ecu.h
  • ecu_ENABLE_ECHO_CANCELLER : ecu.h
  • ecu_ENABLE_ECP_CHG_DETECT : ecu.h
  • ecu_ENABLE_FAST_CPS : ecu.h
  • ecu_ENABLE_NLP : ecu.h
  • ecu_ENABLE_NLP_PHASE_RND : ecu.h
  • ecu_ENABLE_NONLINEAR_EP : ecu.h
  • ecu_ENABLE_OPNLP_DETECT : ecu.h
  • ECU_ENABLE_RECEIVE_CPS : ecu.h
  • ecu_ENABLE_SEARCH : ecu.h
  • ecu_ENABLE_UPDATE : ecu.h
  • ecu_ENABLE_WIDEBAND : ecu.h
  • ecu_ERL_CONFIG_BIT_0 : ecu.h
  • ecu_ERL_CONFIG_BIT_1 : ecu.h
  • ecu_FORCED_NLP_CNG : ecu.h
  • ecu_NLP_NORMAL_LEVEL : ecu.h
  • ecu_RESERVED_1 : ecu.h
  • ecu_RESERVED_2 : ecu.h
  • ecu_TEST_BIT_2 : ecu.h
  • ecu_VERF_03DB_CONFIG : ecu.h
  • ecu_VERF_5P5MS_FRAME : ecu.h
  • ecu_VERF_CONST_PCM_DETECT : ecu.h
  • ecu_VERF_DEBUG_STREAM : ecu.h
  • ecu_VERF_DLINE_COMPRESS : ecu.h
  • ecu_VERF_INST_RELOCATION : ecu.h
  • ecu_VERF_MULTISEGMENT : ecu.h
  • ecu_VERF_NEAR_MODE : ecu.h
  • ecu_VERF_RERL_ESTIMATE : ecu.h
  • ecu_VERF_TELOGY_ECAN : ecu.h
  • ecu_VERF_WIDE_BAND : ecu.h

- t -

  • ti_mas_ecu_Version___VERS : Version.h
  • ti_mas_ecu_Version__top__ : Version.h
  • ti_mas_ecu_Version_BTYPE : Version.h
  • ti_mas_ecu_Version_BUILD : Version.h
  • ti_mas_ecu_Version_MAJOR : Version.h
  • ti_mas_ecu_Version_MINOR : Version.h
  • ti_mas_ecu_Version_PATCH : Version.h
  • ti_mas_ecu_Version_QUALITY : Version.h
  • ti_mas_ecu_Version_WIDTH : Version.h
  • ti_mas_ecu_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


ECU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • ecu_ALLOW_FAST : ecu.h
  • ecu_BIT_ACTION_CLR : ecu.h
  • ecu_BIT_ACTION_SET : ecu.h
  • ecu_CTL_BG_LMS_ENABLE : ecu.h
  • ecu_CTL_BG_LMS_SPEED : ecu.h
  • ecu_CTL_FIXED_NOISE_LEVEL : ecu.h
  • ecu_CTL_MASK : ecu.h
  • ecu_CTL_NLP_AGGRESSIVE : ecu.h
  • ecu_CTL_NLP_CN_CONFIG : ecu.h
  • ecu_CTL_SEARCH_LMS_ENABLE : ecu.h
  • ecu_CTL_SEARCH_LMS_SPEED : ecu.h
  • ecu_ERROR : ecu.h
  • ecu_EXC_DELETE : ecu.h
  • ecu_EXC_OPEN : ecu.h
  • ecu_EXC_OPEN_NLP : ecu.h
  • ecu_EXC_PXBUFSIZE : ecu.h
  • ecu_EXC_SIZE : ecu.h
  • ecu_FLT_BACKGROUND : ecu.h
  • ecu_FLT_FOREGROUND : ecu.h
  • ecu_FLT_SEARCH : ecu.h
  • ecu_FORCE_SLOW : ecu.h
  • ecu_NOERR : ecu.h
  • ecu_NOMEMORY : ecu.h
  • ecu_SEARCH_FINISH : ecu.h
  • ecu_SEARCH_REQUEST : ecu.h


ECU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • ecuClose() : ecu.h
  • ecuControl() : ecu.h
  • ecuDelete() : ecu.h
  • ecuGetFilter() : ecu.h
  • ecuGetPerformance() : ecu.h
  • ecuGetSizes() : ecu.h
  • ecuNew() : ecu.h
  • ecuOpen() : ecu.h
  • ecuReceiveIn() : ecu.h
  • ecuRelocate() : ecu.h
  • ecuSendIn() : ecu.h


ECU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • ecuContext_t : ecu.h
  • ecuSizeConfig_t : ecu.h
  • vfnptr : ecu.h


ECU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • ecuContext : ecu.h


ECU: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


ECU: Echo Canceller Unit (ECU)

Echo Canceller Unit (ECU)

Collaboration diagram for Echo Canceller Unit (ECU):

Detailed Description

The ECU is a multi-segment echo canceller (MSEC) implemented to cancel the echo that's generated by the hybrid in the telephone network due to impedance mismatch.
There are three functional blocks:
  1. initialization, configuration, and control block
  2. foreground processing block
    • Echo removal
    • Power measurements
    • Doubletalk detection
    • Nonlinear processor
    • Preparation of update parameters
  3. background processing block
    • Convergence tracking and update control
    • filter update (step size calculation, echo removal, coefficient update)
    • search filter update (coefficient update, segment placement) Each ECU instance references up to fifteen buffers. Three of the buffers are necessary only if the ECU is configured for operation as an MSEC. One additional context buffer is shared by all instances.

The ECU implementation makes several important assumptions:

  1. Zero mean signals - all input signals (near-end and far-end) are assumed to be zero mean (desirable when implementing block LMS adaptive algorithm.)
  2. Power levels - all signals are scaled in such a way that a digital sine wave of amplitude 32768 corresponds to the +3dBm0 analog sine wave. This is also the saturation point for all signals.
  3. Synchronization and delay - the near-end and far-end signals are assumed to be synchronized in time when presented to the echo canceller. Far-end delay line is assumed to be of proper length to accommodate for all sources of signal delay inside and outside of the DSP platform.
  4. Minimum hybrid loss - the minimum hybrid loss is assumed to be at least 6dB. Otherwise the echo canceller may still work, but with degraded performance.
  5. Nonlinearities - it is assumed that there is no clipping in the input signals and that the nonlinear distortion is negligible since the hybrid model is linear. Clipping of the far-end signal may sometimes be acceptable if the near-end echo path does not introduce additional nonlinear distortion or clipping, i.e. if the far-end signal on its path towards the near-end input is not additionally distorted.
  6. Tone detection at near-end - the tone detection at near-end is not performed. It is assumed that such processing will be done outside the echo canceller when necessary. In such a case echo canceller may be disabled from the outside. Doubletalk detection would take care of preventing the filter updates when tones are present at the near-end in normal operation.

Modules

ECO API return codes
Exception codes

Data Structures

struct | ecuVersion_t
ECU Version structure. More...
struct | ecuControl_t
ECU Control structure. More...
struct | ecuNewConfig_t
Creation configuration structure. More...
struct | ecuConfigParam_t
ECU configuration parameter structure. More...
struct | ecuConfig_t
ECU configuration structure. More...
struct | ecuPerform_t
ECU Performance Parameters. More...
struct | ecuUpdateStat_t
Update statistics. More...
struct | ecuContext_s
ECU context Structure. More...

ecu filter selection codes - ecuGetFilter()

enum | { ecu_FLT_FOREGROUND = 0, ecu_FLT_BACKGROUND = 1, ecu_FLT_SEARCH = 2 }

ECU Control Code

enum {
ecu_CTL_MASK = 0, ecu_CTL_BG_LMS_SPEED = 1, ecu_CTL_BG_LMS_ENABLE = 2, ecu_CTL_SEARCH_LMS_SPEED = 3,
ecu_CTL_SEARCH_LMS_ENABLE = 4, ecu_CTL_FIXED_NOISE_LEVEL = 5, ecu_CTL_NLP_AGGRESSIVE = 6, ecu_CTL_NLP_CN_CONFIG = 7
}

ECU speed selection modes - ecuControl()

enum | { ecu_FORCE_SLOW = 0, ecu_ALLOW_FAST = 1 }

ECU Resource management notification bits

enum | { ecu_BIT_ACTION_SET = 0, ecu_BIT_ACTION_CLR = 1 }

ECU search preparation events - (*ecuSrchPrep()), e.g. swapping

enum | { ecu_SEARCH_REQUEST = 0, ecu_SEARCH_FINISH = 1 }

ECU External API

void | ecuClose (void *ecuInst)
To close an instance of ECU.
tint | ecuControl (void *ecuInst, ecuControl_t *ctl)
Changes the operational mode of the ECU.
void | ecuDelete (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs)
To delete an instance of ECU.
tint | ecuGetFilter (void *ecuInst, tint select, tint start, tint num, Fract *hbuf)
Returns the current EC filter coefficients.
void | ecuGetPerformance (void *ecuInst, tint *state_bf, ecuVersion_t *version, ecuPerform_t *perform, ecuUpdateStat_t *ustat, LFract *noise_x, LFract *noise_y, Fract *rerl, tint *tail_len, tbool rustat)
Returns ECU performance parameters.
void | ecuOpen (void *ecuInst, ecuConfig_t *cfg)
Open and configure an instance of ECU.
tint | ecuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, ecuSizeConfig_t *cfg)
Calculate the worst case buffer sizes for the ECU.
tint | ecuNew (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs, ecuNewConfig_t *cfg)
Creates an instance of ECU and initializes memory buffers.
tint | ecuRelocate (void **ecuInst, tint *numEcoBufs, tword *bufAdrs[])
void | ecuSendIn (void *ecuInst, void *vsend_in, void *vrecv_in, void *vsend_out)
Signal an ECU to perform echo cancellation.
void | ecuReceiveIn (void *ecuInst, void *speech_samples)
Perform Rx path processing for ECU.

ECU_CTL_MASK mode bits used by ecuControl

Remarks:
unless specified otherwise, the following bits will enable the corresponding functionality when SET, and disable when UNSET.

#define | ecu_ENABLE_ECHO_CANCELLER 0x0001
#define | ecu_ENABLE_UPDATE 0x0002
#define | ecu_ENABLE_NLP 0x0004
#define | ecu_RESERVED_1 0x0008
#define | ecu_ENABLE_AUTO_UPDATE 0x0010
#define | ecu_RESERVED_2 0x0020
#define | ecu_ENABLE_SEARCH 0x0040
#define | ecu_ENABLE_CNG_ADAPT 0x0080
#define | ecu_ENABLE_OPNLP_DETECT 0x0100
#define | ecu_CLEAR_FG 0x0200
#define | ecu_CLEAR_BG 0x0400
#define | ecu_CLEAR_SEARCH 0x0800
#define | ecu_DISABLE_DEMEANING 0x1000
#define | ecu_TEST_BIT_2 0x2000
#define | ecu_FORCED_NLP_CNG 0x4000
#define | ecu_NLP_NORMAL_LEVEL 0x8000

ECU_CTL_MASK mode1 bits used by ecuControl

Remarks:
unless specified otherwise, the following bits will enable the corresponding functionality when SET, and disable when CLEARED.

#define | ecu_ENABLE_NLP_PHASE_RND 0x0001
#define | ecu_ERL_CONFIG_BIT_0 0x0002
#define | ecu_ERL_CONFIG_BIT_1 0x0004
#define | ecu_ENABLE_ECP_CHG_DETECT 0x0008
#define | ecu_ENABLE_CPD_DETECT 0x0010
#define | ecu_ENABLE_NONLINEAR_EP 0x0020
#define | ecu_ENABLE_FAST_CPS 0x0040
#define | ecu_ENABLE_WIDEBAND 0x0080
#define | ECU_ENABLE_RECEIVE_CPS 0x0100

ECU state bitfield 0 definitions

#define | ecu_CTRL0_BIT_FIRST_TIME 0x0001
#define | ecu_CTRL0_BIT_FREEZE_EC 0x0002
#define | ecu_CTRL0_BIT_USE_NLP 0x0004
#define | ecu_CTRL0_BIT_ENABLE_EC 0x0008
#define | ecu_CTRL0_BIT_CONVERGED 0x0010
#define | ecu_CTRL0_BIT_NO_SEARCH 0x0020
#define | ecu_CTRL0_BIT_SLOW_LMS_EN 0x0040
#define | ecu_CTRL0_BIT_FORCE_SLOW_LMS 0x0080
#define | ecu_CTRL0_BIT_OPNLP_FOUND 0x0100
#define | ecu_CTRL0_BIT_FORCE_SLOW_SRCH 0x0200
#define | ecu_CTRL0_BIT_RESERVED_2 0x0400
#define | ecu_CTRL0_BIT_RESERVED_3 0x0800
#define | ecu_CTRL0_BIT_NLP_ADAPT 0x1000
#define | ecu_CTRL0_BIT_OPNLP_EN 0x2000
#define | ecu_CTRL0_BIT_FREEZE_SRCH 0x4000
#define | ecu_CTRL0_BIT_DEMEAN_EN 0x8000

ECU state bitfield 1 definitions

#define | ecu_CTRL1_BIT_TONE_PRESENT 0x0001
#define | ecu_CTRL1_BIT_FORCED_NLP_CNG 0x0002
#define | ecu_CTRL1_BIT_NLP_NORM_LEV 0x0004
#define | ecu_CTRL1_BIT_ENABLE_SRCH 0x0008
#define | ecu_CTRL1_BIT_ENABLE_UPDATE 0x0010
#define | ecu_CTRL1_BIT_NLP_PHASE_RND_EN 0x0020
#define | ecu_CTRL1_0DB_CONFIG 0x0040
#define | ecu_CTRL1_3DB_CONFIG 0x0080
#define | ecu_CTRL1_ECP_CHG_DETECT_EN 0x0100
#define | ecu_CTRL1_CPD_DETECT_EN 0x0200
#define | ecu_CTRL1_PLACEMENT_OCCUR 0x0400
#define | ecu_CTRL1_NONLINEAR_ECHO_PATH 0x0800
#define | ecu_CTRL1_FAST_CPS 0x1000
#define | ecu_CTRL1_WIDEBAND 0x2000
#define | ecu_CTRL1_CPT_SUSPECT 0x4000
#define | ECU_CTRL1_RECEIVE_CPS 0x8000

ecu_VERF MASK mode bits

#define | ecu_VERF_MULTISEGMENT 0x0001
#define | ecu_VERF_5P5MS_FRAME 0x0002
#define | ecu_VERF_DLINE_COMPRESS 0x0004
#define | ecu_VERF_DEBUG_STREAM 0x0008
#define | ecu_VERF_NEAR_MODE 0x0010
#define | ecu_VERF_03DB_CONFIG 0x0040
#define | ecu_VERF_CONST_PCM_DETECT 0x0080
#define | ecu_VERF_INST_RELOCATION 0x0100
#define | ecu_VERF_RERL_ESTIMATE 0x0200
#define | ecu_VERF_WIDE_BAND 0x0400
#define | ecu_VERF_TELOGY_ECAN 0x8000

Typedefs

typedef void | ecuSizeConfig_t
Size configuration structure.
typedef void(*) | vfnptr (void)
Void function pointer.
typedef ecuContext_s | ecuContext_t
ECU context Structure.

Variables

ecuContext_t ecuContext

Define Documentation

#define ecu_ENABLE_ECHO_CANCELLER 0x0001

Enable/disable echo canceller If enabled (set to 1), the echo canceller will be processing the near-end signal in attempt to remove the echo

Definition at line 131 of file ecu.h.

#define ecu_ENABLE_UPDATE 0x0002

Enable/disable adaptation

Definition at line 134 of file ecu.h.

#define ecu_ENABLE_NLP 0x0004

Enable/disable NLP

Definition at line 135 of file ecu.h.

#define ecu_RESERVED_1 0x0008

reserved

Definition at line 136 of file ecu.h.

#define ecu_ENABLE_AUTO_UPDATE 0x0010

Enables/disable the automatic switch between fast and slow filter updates. If enabled, the echo canceller automatically switches to slow filter updates after convergence

Definition at line 137 of file ecu.h.

#define ecu_RESERVED_2 0x0020

reserved

Definition at line 141 of file ecu.h.

#define ecu_ENABLE_SEARCH 0x0040

Enables/disable the search filter updates as well as filter segment placement

Definition at line 142 of file ecu.h.

#define ecu_ENABLE_CNG_ADAPT 0x0080

Enables/disable adaptive comfort noise generation

Definition at line 144 of file ecu.h.

#define ecu_ENABLE_OPNLP_DETECT 0x0100

Enables/disable detection for 4-wire condition

Definition at line 145 of file ecu.h.

#define ecu_CLEAR_FG 0x0200

Set: clear foreground filter coefficients

Definition at line 146 of file ecu.h.

#define ecu_CLEAR_BG 0x0400

Set: clear background filter coefficients

Definition at line 147 of file ecu.h.

#define ecu_CLEAR_SEARCH 0x0800

Set: clear search filter and initializes the hybrid search algorithm and related variables

Definition at line 148 of file ecu.h.

#define ecu_DISABLE_DEMEANING 0x1000

Enables/disable demeaning of search filter

Definition at line 150 of file ecu.h.

#define ecu_TEST_BIT_2 0x2000

test bit

Definition at line 151 of file ecu.h.

#define ecu_FORCED_NLP_CNG 0x4000

Enables/disable constant comfort noise generation

Definition at line 152 of file ecu.h.

#define ecu_NLP_NORMAL_LEVEL 0x8000

Enables/disable further NLP aggressiveness if it is known that the near-end and far-end levels are balanced. Note: should be disabled by default

Definition at line 153 of file ecu.h.

#define ecu_ENABLE_NLP_PHASE_RND 0x0001

Enables/disable NLP phase randomization

Definition at line 163 of file ecu.h.

#define ecu_ERL_CONFIG_BIT_0 0x0002

0/3dB ERL configuration bit 0
see table below

Definition at line 164 of file ecu.h.

#define ecu_ERL_CONFIG_BIT_1 0x0004

0/3dB ERL configuration bit 1
Bit 1 | Bit 0 | Minimum ERL Assumption
0 | 0 | 6 dB
0 | 1 | 3 dB
1 | 0 | 0 dB
1 | 1 | Not Valid

Definition at line 166 of file ecu.h.

#define ecu_ENABLE_ECP_CHG_DETECT 0x0008

Enables/disable echo path change detection. Note: should be disabled by default

Definition at line 195 of file ecu.h.

#define ecu_ENABLE_CPD_DETECT 0x0010

Enables/disable constant PCM pattern detection

Definition at line 197 of file ecu.h.

#define ecu_ENABLE_NONLINEAR_EP 0x0020

Enables/disable non-linear echo path handling. Note: should be disabled by default

Definition at line 198 of file ecu.h.

#define ecu_ENABLE_FAST_CPS 0x0040

Enables/disables fast constant power signal detection. This feature is used to better handle modem signals

Definition at line 200 of file ecu.h.

#define ecu_ENABLE_WIDEBAND 0x0080

Enables/disables wideband operational mode. Only applies if ECU has been compiled with "wband" option

Definition at line 202 of file ecu.h.

#define ECU_ENABLE_RECEIVE_CPS 0x0100

Enables/disables receive direction constant power signal detection.

Definition at line 204 of file ecu.h.

#define ecu_CTRL0_BIT_FIRST_TIME 0x0001

SET: next open is the first one

Definition at line 209 of file ecu.h.

#define ecu_CTRL0_BIT_FREEZE_EC 0x0002

SET: stop updating the BG filter

Definition at line 210 of file ecu.h.

#define ecu_CTRL0_BIT_USE_NLP 0x0004

SET: use nonlinear processor

Definition at line 211 of file ecu.h.

#define ecu_CTRL0_BIT_ENABLE_EC 0x0008

SET: EC is enabled

Definition at line 212 of file ecu.h.

#define ecu_CTRL0_BIT_CONVERGED 0x0010

SET: FG filter is fully converged

Definition at line 213 of file ecu.h.

#define ecu_CTRL0_BIT_NO_SEARCH 0x0020

SET: do short tail ecu

Definition at line 214 of file ecu.h.

#define ecu_CTRL0_BIT_SLOW_LMS_EN 0x0040

SET: enable slow BG LMS update

Definition at line 215 of file ecu.h.

#define ecu_CTRL0_BIT_FORCE_SLOW_LMS 0x0080

SET: force slow BG LMS update

Definition at line 216 of file ecu.h.

#define ecu_CTRL0_BIT_OPNLP_FOUND 0x0100

SET: 4-wire currently detected

Definition at line 217 of file ecu.h.

#define ecu_CTRL0_BIT_FORCE_SLOW_SRCH 0x0200

SET: force slow search LMS update

Definition at line 218 of file ecu.h.

#define ecu_CTRL0_BIT_RESERVED_2 0x0400

Reserved bitfield position

Definition at line 219 of file ecu.h.

#define ecu_CTRL0_BIT_RESERVED_3 0x0800

Reserved bitfield position

Definition at line 220 of file ecu.h.

#define ecu_CTRL0_BIT_NLP_ADAPT 0x1000

SET: NLP uses adaptive comfort noise ELSE: NLP uses fixed comfort noise

Definition at line 221 of file ecu.h.

#define ecu_CTRL0_BIT_OPNLP_EN 0x2000

SET: open loop detection enabled

Definition at line 223 of file ecu.h.

#define ecu_CTRL0_BIT_FREEZE_SRCH 0x4000

SET: stop updating the search filter

Definition at line 224 of file ecu.h.

#define ecu_CTRL0_BIT_DEMEAN_EN 0x8000

SET: enable search filter demeaning

Definition at line 225 of file ecu.h.

#define ecu_CTRL1_BIT_TONE_PRESENT 0x0001

SET: Far-end tone present

Definition at line 230 of file ecu.h.

#define ecu_CTRL1_BIT_FORCED_NLP_CNG 0x0002

SET: force NLP CN generation

Definition at line 231 of file ecu.h.

#define ecu_CTRL1_BIT_NLP_NORM_LEV 0x0004

SET: assume normal levels

Definition at line 232 of file ecu.h.

#define ecu_CTRL1_BIT_ENABLE_SRCH 0x0008

SET: search is enabled

Definition at line 233 of file ecu.h.

#define ecu_CTRL1_BIT_ENABLE_UPDATE 0x0010

SET: enable BG LMS update

Definition at line 234 of file ecu.h.

#define ecu_CTRL1_BIT_NLP_PHASE_RND_EN 0x0020

SET: enable phase randomization

Definition at line 235 of file ecu.h.

#define ecu_CTRL1_0DB_CONFIG 0x0040

SET: 0dB ERL configuration

Definition at line 236 of file ecu.h.

#define ecu_CTRL1_3DB_CONFIG 0x0080

SET: 3dB ERL configuration

Definition at line 237 of file ecu.h.

#define ecu_CTRL1_ECP_CHG_DETECT_EN 0x0100

SET: enable echo path change detect

Definition at line 238 of file ecu.h.

#define ecu_CTRL1_CPD_DETECT_EN 0x0200

SET: enable constant PCM pattern detect

Definition at line 239 of file ecu.h.

#define ecu_CTRL1_PLACEMENT_OCCUR 0x0400

SET: placement occurred since reset

Definition at line 240 of file ecu.h.

#define ecu_CTRL1_NONLINEAR_ECHO_PATH 0x0800

SET: expect nonlinear echo path

Definition at line 241 of file ecu.h.

#define ecu_CTRL1_FAST_CPS 0x1000

SET: do fast const power signal detection

Definition at line 242 of file ecu.h.

#define ecu_CTRL1_WIDEBAND 0x2000

SET: enable wideband processing

Definition at line 243 of file ecu.h.

#define ecu_CTRL1_CPT_SUSPECT 0x4000

SET: suspect CPT signal, block FG transfer

Definition at line 244 of file ecu.h.

#define ECU_CTRL1_RECEIVE_CPS 0x8000

SET: do RCV constant power signal detection

Definition at line 245 of file ecu.h.

#define ecu_VERF_MULTISEGMENT 0x0001

ecu_TAIL=YES

Definition at line 250 of file ecu.h.

#define ecu_VERF_5P5MS_FRAME 0x0002

ecu_5P5MS=YES

Definition at line 251 of file ecu.h.

#define ecu_VERF_DLINE_COMPRESS 0x0004

ecu_DLCOMP=YES

Definition at line 252 of file ecu.h.

#define ecu_VERF_DEBUG_STREAM 0x0008

ecu_DEBUG=YES

Definition at line 253 of file ecu.h.

#define ecu_VERF_NEAR_MODE 0x0010

ecu_NEAR=YES

Definition at line 254 of file ecu.h.

#define ecu_VERF_03DB_CONFIG 0x0040

ecu_03DB=YES

Definition at line 255 of file ecu.h.

#define ecu_VERF_CONST_PCM_DETECT 0x0080

ecu_CPD=YES

Definition at line 256 of file ecu.h.

#define ecu_VERF_INST_RELOCATION 0x0100

ecu_RELOC=YES

Definition at line 257 of file ecu.h.

#define ecu_VERF_RERL_ESTIMATE 0x0200

ecu_RERL=YES

Definition at line 258 of file ecu.h.

#define ecu_VERF_WIDE_BAND 0x0400

ecu_WB=YES

Definition at line 259 of file ecu.h.

#define ecu_VERF_TELOGY_ECAN 0x8000

it's Telogy EC

Definition at line 260 of file ecu.h.

Typedef Documentation

typedef void ecuSizeConfig_t

Size configuration structure.

Defined as void. All prior variables are in context.

Definition at line 345 of file ecu.h.

typedef void(*) vfnptr(void)

Void function pointer.

Void function pointer for use in ECU context.

Definition at line 460 of file ecu.h.

typedef struct ecuContext_s ecuContext_t

ECU context Structure.

Contains information shared amongst ECU instances.

Enumeration Type Documentation

anonymous enum

Enumerator:
ecu_FLT_FOREGROUND | get foreground filter
ecu_FLT_BACKGROUND | get background filter
ecu_FLT_SEARCH | get search filter

Definition at line 96 of file ecu.h.

anonymous enum

Enumerator:
ecu_CTL_MASK | control bits such as enable, freeze, etc.
ecu_CTL_BG_LMS_SPEED | slow or fast LMS in BG
ecu_CTL_BG_LMS_ENABLE | enable/disable BG update
ecu_CTL_SEARCH_LMS_SPEED | slow or fast LMS in search
ecu_CTL_SEARCH_LMS_ENABLE | enable/disable search update
ecu_CTL_FIXED_NOISE_LEVEL | fixed comfort noise level control
ecu_CTL_NLP_AGGRESSIVE | NLP aggressiveness control
ecu_CTL_NLP_CN_CONFIG | NLP comfort noise configuration

Definition at line 105 of file ecu.h.

anonymous enum

Enumerator:
ecu_FORCE_SLOW for ecu_CTL_BG_LMS_SPEED
and ecu_CTL_SEARCH_LMS_SPEED
ecu_ALLOW_FAST

Definition at line 119 of file ecu.h.

anonymous enum

Enumerator:
ecu_BIT_ACTION_SET | notify manager that an ECU control bit is set
ecu_BIT_ACTION_CLR | notify manager that an ECU control bit is cleared

Definition at line 266 of file ecu.h.

anonymous enum

Enumerator:
ecu_SEARCH_REQUEST | request swapping or similar
ecu_SEARCH_FINISH | indicate previous request if finished

Definition at line 275 of file ecu.h.

Function Documentation

void ecuClose ( void * ecuInst )

To close an instance of ECU.

Parameters:
[in,out] ecuInst Pointer to the ECU instance.
Returns:
void

tint ecuControl | ( | void * | ecuInst,
 |  | ecuControl_t * | ctl
 | ) |  |

Changes the operational mode of the ECU.

Change ECU mode by setting/clearing control flags and/or states within the ECU.

Parameters:
[in,out] | ecuInst | Pointer to the ECU instance.
[in] | ctl | Pointer to code/mode information
Returns:
ecu_NOERR,
ecu_ERROR (invalid control code or ecu not open)

void ecuDelete | ( | void ** | ecuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

To delete an instance of ECU.

Parameters:
[in,out] | ecuInst | Address of memory location that contains a pointer to the ECU instance structure
[in] | nbufs | Number of memory buffers.
[in,out] | bufs | A vector of buffer descriptors.
Returns:
void

tint ecuGetFilter | ( | void * | ecuInst,
 |  | tint | select,
 |  | tint | start,
 |  | tint | num,
 |  | Fract * | hbuf
 | ) |  |

Returns the current EC filter coefficients.

Remarks:
It may be necessary to call it several times for each filter (BG, FG) if the output buffer is not big enough to hold all coefficients.
Parameters:
[in,out] | ecuInst | Pointer to the ECU instance.
[in] | select | FG/BG filter selection
[in] | start | index of a starting coefficient
[in] | num | number of coefficients to copy
[in,out] | hbuf | pointer to output buffer
Returns:
ecu_NOERR,
ecu_ERROR(invalid input arguments, or ECU not open)

void ecuGetPerformance | ( | void * | ecuInst,
 |  | tint * | state_bf,
 |  | ecuVersion_t * | version,
 |  | ecuPerform_t * | perform,
 |  | ecuUpdateStat_t * | ustat,
 |  | LFract * | noise_x,
 |  | LFract * | noise_y,
 |  | Fract * | rerl,
 |  | tint * | tail_len,
 |  | tbool | rustat
 | ) |  |

Returns ECU performance parameters.

Remarks:
Statistics must be read in order to reset it. That is, rustat flag would not be tested unless ustat != NULL.
Parameters:
[in,out] | ecuInst | Pointer to the ECU instance.
[in,out] | state_bf | pointer to state bit fields (2 elements)
[in,out] | version | pointer to ECU version structure
[in,out] | perform | pointer to performance output buffer
[in,out] | ustat | pointer to update statistics buffer
[in,out] | noise_x | pointer to far-end noise estimate
[in,out] | noise_y | pointer to near-end noise estimate
[in,out] | rerl | pointer to RERL estimate
[in,out] | tail_len | pointer to tail length
[in] | rustat | TRUE: reset update statistics
Returns:
void

void ecuOpen | ( | void * | ecuInst,
 |  | ecuConfig_t * | cfg
 | ) |  |

Open and configure an instance of ECU.

Parameters:
[in,out] | ecuInst | Pointer to ECU instance
[in] | cfg | Pointer to ECU configuration structure
Returns:
void

tint ecuGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | ecuSizeConfig_t * | cfg
 | ) |  |

Calculate the worst case buffer sizes for the ECU.

Parameters:
[in,out] | nbufs | Number of buffers.
[in,out] | bufs | Buffer descriptors
[in] | cfg | Information to be used in estimating the worst case buffer sizes (see ecu.h)
Returns:
ecu_NOERR,
ecu_ERROR (invalid maximum frame length)

tint ecuNew | ( | void ** | ecuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | ecuNewConfig_t * | cfg
 | ) |  |

Creates an instance of ECU and initializes memory buffers.

Parameters:
[in,out] | ecuInst | An address of memory location that will receive a pointer to instance structure
[in] | nbufs | Number of memory buffers
[in] | bufs | A vector of buffer descriptors
[in] | cfg | Pointer to configuration structure
Returns:
ecu_NOERR,
ecu_NOMEMORY (some buffers have base address NULL),
ecu_ERROR (invalid input parameters)

tint ecuRelocate | ( | void ** | ecuInst,
 |  | tint * | numEcoBufs,
 |  | tword * | bufAdrs[]
 | ) |  |

void ecuSendIn | ( | void * | ecuInst,
 |  | void * | vsend_in,
 |  | void * | vrecv_in,
 |  | void * | vsend_out
 | ) |  |

Signal an ECU to perform echo cancellation.

This function causes the ECU to perform echo cancellation on a frame of input data.

Parameters:
[in,out] | ecuInst | Pointer to ECU instance
[in,out] | vsend_in | Send-in signal buffer pointer (linear buffer)
[in,out] | vrecv_in | Recv-out signal buffer pointer (HW circular buffer)
[in,out] | vsend_out | Send-out signal buffer pointer (linear buffer)
Returns:
void

void ecuReceiveIn | ( | void * | ecuInst,
 |  | void * | speech_samples
 | ) |  |

Perform Rx path processing for ECU.

Parameters:
[in,out] | ecuInst | Pointer to ECU instance
[in,out] | speech_samples | Pointer to a segment of voice samples
Returns:
void

Variable Documentation

ecuContext_t ecuContext


ECU: ECO API return codes

ECO API return codes
[Echo Canceller Unit (ECU)]

Collaboration diagram for ECO API return codes:

Detailed Description

These codes are the return codes used by ecGetSizes() and ecuNew() APIs.

ECU Return Codes

enum { ecu_NOMEMORY = -1, ecu_NOERR = 0, ecu_ERROR = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
ecu_NOMEMORY | no enough memory
ecu_NOERR | success
ecu_ERROR | with error

Definition at line 83 of file ecu.h.


ECU: Exception codes

Exception codes
[Echo Canceller Unit (ECU)]

Collaboration diagram for Exception codes:

Detailed Description

These are fatal exceptions generally because of improper interaction between the system and the ECU component

ECU Exception Codes

enum {
ecu_EXC_OPEN = 1, ecu_EXC_DELETE = 2, ecu_EXC_SIZE = 3, ecu_EXC_PXBUFSIZE = 4,
ecu_EXC_OPEN_NLP = 5
}

Enumeration Type Documentation

anonymous enum

Enumerator:
ecu_EXC_OPEN | open one ECU instance
ecu_EXC_DELETE | delete one ECU instance
ecu_EXC_SIZE | sizes of different buffers
ecu_EXC_PXBUFSIZE | size of far-end energy buffer
ecu_EXC_OPEN_NLP | 4-wire detection

Definition at line 289 of file ecu.h.


ECU: ECU (Echo Canceller Unit) Package

ECU (Echo Canceller Unit) Package

Release 10.91.1.1

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The Echo Canceller Unit (ECU)

The ECU component provides line echo cancellation functionality in a telephone network. The echo cancellation is performed with respect to the TDM side. This means that TDM-side echo is cancelled and prevented from reaching the packet network. The ECU may be configured to operate as either a multiple segment or single segment (full filter) echo canceller to attain line echo cancellation. In general, the echo canceller is configured for multiple segments only when the tail length exceeds 32ms.

The ECU employs the following features:

  1. Adaptative filtering via the Normalized Least Mean Square (NLMS) algorithm
  2. Dual filter approach for increased stability
  3. Multiple filter segments for reduced MIPS and increased stability
  4. Zero delay frame-based echo removal
  5. Nonlinear processing (NLP)
    1. Mixing the residual echo with comfort noise
    2. Triggers for far-end signal activity and the near-end signal absence
    3. Adapts comfort noise level to match near-end noise activity
  6. Double-talk detection for enhanced stability by pausing adaptation
  7. Diagnostic support - API to access:
    1. Filter coefficients
    2. Performance statistics
    3. State information
  8. Four-wire detection logic
  9. Wideband (16 KHz) support

Additional links: Detailed ECU Description

Integration

The ECU component can be integrated into a system to provide reliable echo cancellation following the link below. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the ECU code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | ECU External API
 | ECU Integration

Default Configuration

The ecuConfig_t structure defines the required parameters to open the ECU instance. All configuration parameters must be specified in this structure prior to opening the ECU for operation.

Performance

The ECU component has several optimizations and/or configurations that help achieve a balance between resource requirements and performance. Some are built-in, others configurable (either on open, or run-time via the ecuControl() API function).

Examples of performance optimizatinos and configurations are listed below. All options are described in detail in ECU External API.

  1. Steady state MIPS reduction
  2. Low ERL configuration
  3. Four-wire environment detection
  4. Comfort noise pink/white noise mixture

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

Following is a list of ECU limitations:

  • Echo tail lengths limited to: 128ms, 64ms, 32ms, 16ms, 8ms
  • 0dB minimum configrable ERL
  • Three filter segments totalling 32ms in coverage

Standards Compliance

The multi-segment ECU line echo canceller performance is fully compliant with ITU-T Recommendation G.168 (2007): Digital network echo cancellers.

Dependent Packages

The ECU package depends on the following packages for build and/or integration.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

ECU Required Packages
Package | File Name
ti.mas.ecu | ti_mas_ecu_<fmt>_c<rtarg>_<ver>.zip
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_<ver>.zip
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_<ver>.zip
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_<ver>.zip
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_<ver>.zip

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. <ver> above represents the package version and will have the format specified in the release notes.
  4. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


ECU: ECU Integration

ECU (Echo Canceller Unit) Package

ECU Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking ECU with System
  • Initialization Structures

XDC Build Process

Required Tools

The following tools are required to build the ECU component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.0.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the ECU package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in ECU Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the ECU using the XDC tools, change to the ECU directory and proceed.

With the environment configured, XDC may be eployed to build the ECU and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the ECU packages. The first two commands provide a means to clean and build the ECU package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the ECU and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., ECU).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated ECU build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the ECU for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the ECU as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated ECU build files as in (1) above
    • Removes all generated build files for all ECU dependent packages

Notes:
  1. The command-line option aalfrm may be added to XDCARGS to compile in AAL1/AAL2 compatible frame sizes (5.5ms/11ms)
  2. The command-line option mseg may be added to XDCARGS to compile in support for multiple segment ECU (sparse filter). This option is required for 64ms or 128ms support.
  3. The command-line option loerl may be added to XDCARGS to compile in support for low ERL hybrids. When used, this option provides configurable support for ERLS down to 0dB or 3dB.
  4. The command-line option dlcomp may be added to XDCARGS to compile in delay-line compression. Note that this option is not compatible with the wide-band ECU.
  5. The command-line option rerl may be added to XDCARGS to compile in RERL reporting as required by RTCP-XR and defined in RFC 3611.
  6. The command-line option reloc may be added to XDCARGS to compile in ECU instance relocation support.
  7. The command-line option cpdet may be added to XDCARGS to compile in constant PCM pattern detection for IDLE code detection.

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking ECU with System

The ECU and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /ecu
               /types
               /util

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the ECU API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/ecu/ecu.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., ecu.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\ecu\c<rtarg>\ecu_a.a<rtarg>
  4. ti\mas\ecu\c<rtarg>\ecu_c.a<rtarg>

Initialization Structures

The ECU component employs a "context" structure to define global settings for all ECU instances. This structure must be initialized at boot or anytime prior to calling any of the ECU API functions.

For more information refer to the ecuContext_s documentation.


ECU: Memory Requirements

ECU (Echo Canceller Unit) Package

Memory Requirements

Page Contents

  1. Assumptions
  2. C55x 8KHz Target
    • C55x 8KHz ECU Data Memory Requirements
    • C55x 8KHz ECU Program Memory Requirements
  3. C55x 16KHz Target
    • C55x 16KHz ECU Data Memory Requirements
    • C55x 16KHz ECU Program Memory Requirements
  4. C64x/C64x+ Target
    • C64x/C64x+ 8KHz ECU Data Memory Requirements
    • C64x 8KHz ECU Program Memory Requirements
    • C64x+ 8KHz ECU Program Memory Requirements
  5. C64x/C64x+ 16KHz Target
    • C64x/C64x+ 16KHz ECU Data Memory Requirements
    • C64x 16KHz ECU Program Memory Requirements
    • C64x+ 16KHz ECU Program Memory Requirements

Assumptions

The data memory numbers provided here were gathered for the ECU configured with the following configuration:

  1. Maximum frame size of 10ms (80/160 samples)
  2. Zero Y-to-X processing delay
  3. Zero Y processing delay
  4. Three segment maximum (multi-segment only)
  5. 32ms maximum filter coverage (multi-segment only)

Notes:
  1. A non-zero Y-to-X delay will add to the memory requirements for buffer index 4 only.
  2. Memory requirements are provided for both wideband (16 KHz) and default (8 KHz) libraries - ensure you view the proper table.

C55x 8KHz Target

C55x 8KHz ECU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (16-bit words) | Size (16-bit words) |  |  |  |  | Scratch/Dedicated
 |  | 8ms | 16ms | 32ms | 64ms | 128ms
0 | 2 | 326 | 326 | 326 | 326 | 326 | Dedicated
1 | 2 | 64 | 128 | 256 | 256 | 256 | Dedicated
2 | 2 | 64 | 128 | 256 | 256 | 256 | Dedicated
3 | 1 | 40 | 40 | 40 | 40 | 40 | Scratch
4 | 1 | 72 | 104 | 168 | 296 | 552 | Dedicated
5 | (See Note 1 below) | 144 | 208 | 336 | 592 | 1104 | Scratch
6 | 1 | 64 | 128 | 256 | 512 | 1024 | Scratch
7 | 2 | 6 | 6 | 6 | 8 | 14 | Dedicated
8 | 1 | 8 | 8 | 8 | 14 | 27 | Dedicated
9 | 1 | 8 | 8 | 8 | 14 | 27 | Dedicated
10 | 1 | 2 | 2 | 2 | 6 | 6 | Dedicated
11 | 1 | 2 | 2 | 2 | 6 | 6 | Dedicated
12 | 1 | 0 | 0 | 0 | 0 | 0 | Dedicated
13 | 1 | 0 | 0 | 0 | 0 | 0 | Scratch
14 | 2 | 0 | 0 | 0 | 512 | 1024 | Dedicated
15 | 2 | 0 | 0 | 0 | 128 | 256 | Scratch
16 | 1 | 0 | 0 | 0 | 64 | 128 | Dedicated

Notes:
  1. Alignment required is the next-highest power of 2 (e.g., 1104 requires alignment on 2048 boundary)
  2. Memory requirements are based on MAXIMUM requirements as set in ecuContext, not the configuration specified at open time.

Additional Data Memory
Category/Structure | Requirement (16-bit words)
Tables | 48
data/bss | 102
ecuContext | 26

C55x 8KHz ECU Program Memory Requirements

C55x 8KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 18.0 Kbyte | Internal | Core ECU code
.switch | 16 Byte | Internal | Switch tables
Total | 18.0 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.

C55x 16KHz Target

C55x 16KHz ECU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (16-bit words) | Size (16-bit words) |  |  |  |  | Scratch/Dedicated
 |  | 8ms | 16ms | 32ms | 64ms | 128ms
0 | 2 | 332 | 332 | 332 | 332 | 332 | Dedicated
1 | 2 | 64 | 128 | 256 | 256 | 256 | Dedicated
2 | 2 | 64 | 128 | 256 | 256 | 256 | Dedicated
3 | 1 | 40 | 40 | 40 | 40 | 40 | Scratch
4 | (See Note 1 below) | 224 | 288 | 416 | 672 | 1184 | Dedicated
5 | 1 | 0 | 0 | 0 | 0 | 0 | Scratch
6 | 1 | 64 | 128 | 256 | 512 | 1024 | Scratch
7 | 2 | 6 | 6 | 6 | 8 | 14 | Dedicated
8 | 1 | 8 | 8 | 8 | 14 | 27 | Dedicated
9 | 1 | 8 | 8 | 8 | 14 | 27 | Dedicated
10 | 1 | 2 | 2 | 2 | 6 | 6 | Dedicated
11 | 1 | 2 | 2 | 2 | 6 | 6 | Dedicated
12 | 1 | 128 | 128 | 128 | 128 | 128 | Dedicated
13 | 1 | 192 | 192 | 192 | 192 | 192 | Scratch
14 | 2 | 0 | 0 | 0 | 512 | 1024 | Dedicated
15 | 2 | 0 | 0 | 0 | 128 | 256 | Scratch
16 | 1 | 0 | 0 | 0 | 64 | 128 | Dedicated

Notes:
  1. Alignment required is the next-highest power of 2 (e.g., 672 requires alignment on 1024 boundary)
  2. Memory requirements are based on MAXIMUM requirements as set in ecuContext, not the configuration specified at open time.

Additional Data Memory
Category/Structure | Requirement (16-bit words)
Tables | 65
data/bss | 102
ecuContext | 26

C55x 16KHz ECU Program Memory Requirements

C55x 16KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 26.8 Kbyte | Internal | Core ECU code
.switch | 16 Byte | Internal | Switch tables
Total | 26.8 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.

C64x/C64x+ Target

C64x/C64x+ 8KHz ECU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  |  |  |  | Scratch/Dedicated
 |  | 8ms | 16ms | 32ms | 64ms | 128ms
0 | 8 | 656 | 656 | 656 | 656 | 656 | Dedicated
1 | 2 | 128 | 256 | 512 | 512 | 512 | Dedicated
2 | 2 | 128 | 256 | 512 | 512 | 512 | Dedicated
3 | 2 | 80 | 80 | 80 | 80 | 80 | Scratch
4 | 2 | 144 | 208 | 336 | 592 | 1104 | Dedicated
5 | (See Note 1 below) | 288 | 416 | 672 | 1184 | 2208 | Scratch
6 | 2 | 128 | 256 | 512 | 1024 | 2048 | Scratch
7 | 2 | 12 | 12 | 12 | 16 | 28 | Dedicated
8 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
9 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
10 | 2 | 4 | 4 | 4 | 12 | 12 | Dedicated
11 | 2 | 4 | 4 | 4 | 12 | 12 | Dedicated
12 | 2 | 0 | 0 | 0 | 0 | 0 | Dedicated
13 | 2 | 0 | 0 | 0 | 0 | 0 | Scratch
14 | 2 | 0 | 0 | 0 | 1024 | 2048 | Dedicated
15 | 2 | 0 | 0 | 0 | 256 | 512 | Scratch
16 | 2 | 0 | 0 | 0 | 128 | 256 | Dedicated

Notes:
  1. Alignment required is the next-highest power of 2 (e.g., 1184 requires alignment on 2048 boundary)
  2. Memory requirements are based on MAXIMUM requirements as set in ecuContext, not the configuration specified at open time.

Additional Data Memory
Category/Structure | Requirement (Bytes)
Tables | 96
data/bss | 204
ecuContext | 52

C64x 8KHz ECU Program Memory Requirements

C64x 8KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 44.1 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables
Total | 44.2 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.

C64x+ 8KHz ECU Program Memory Requirements

C64x 8KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 36.2 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables
Total | 36.3 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.

C64x/C64x+ 16KHz Target

C64x/C64x+ 16KHz ECU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  |  |  |  | Scratch/Dedicated
 |  | 0 | 8 | 668 | 668 | 668 |  | 668 | 668 | Dedicated
1 | 2 | 128 | 256 | 512 | 512 | 512 | Dedicated
2 | 2 | 128 | 256 | 512 | 512 | 512 | Dedicated
3 | 2 | 80 | 80 | 80 | 80 | 80 | Scratch
4 | (See Note 1 below) | 448 | 576 | 832 | 1344 | 2368 | Dedicated
5 | 2 | 0 | 0 | 0 | 0 | 0 | Scratch
6 | 2 | 128 | 256 | 512 | 1024 | 2048 | Scratch
7 | 2 | 12 | 12 | 12 | 16 | 28 | Dedicated
8 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
9 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
10 | 2 | 4 | 4 | 4 | 12 | 12 | Dedicated
11 | 2 | 4 | 4 | 4 | 12 | 12 | Dedicated
12 | 2 | 256 | 256 | 256 | 256 | 256 | Dedicated
13 | 2 | 384 | 384 | 384 | 384 | 384 | Scratch
14 | 2 | 0 | 0 | 0 | 1024 | 2048 | Dedicated
15 | 2 | 0 | 0 | 0 | 256 | 512 | Scratch
16 | 2 | 0 | 0 | 0 | 128 | 256 | Dedicated

Notes:
  1. Alignment required is the next-highest power of 2 (e.g., 576 requires alignment on 1024 boundary)
  2. Memory requirements are based on MAXIMUM requirements as set in ecuContext, not the configuration specified at open time.

Additional Data Memory
Category/Structure | Requirement (Bytes)
Tables | 130
data/bss | 204
ecuContext | 52

C64x 16KHz ECU Program Memory Requirements

C64x 16KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 46.1 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables
Total | 46.2 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.

C64x+ 16KHz ECU Program Memory Requirements

C64x+ 16KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 37.4 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables
Total | 37.4 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.


ECU: MIPS Requirements

ECU (Echo Canceller Unit) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target

Assumptions

Profiling is captured under two scenarios:

  1. Initial convergence
  2. Steady state (converged)

For both initial and steady state convergence we apply the composite source signal (CSS), defined in ITU-T Standard G.168, as the far-end signal. For the echo path we use G.168 hybrid model M1 at 4ms delay and 6dB ERL.

All profiling data is measured assuming ideal buffer and code placement as detailed in the documentation.

Notes:
  1. Profiling is performed for all configurable tail lengths.
  2. All tests are performed with 10ms frames.

C55x Target

ECU MIPS - Full Filter Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
8ms | 3.5 | 2.8
16ms | 4.6 | 3.4
32ms | 6.0 | 4.7

ECU MIPS - Multisegment Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
64ms | 10.4 | 7.2
128ms | 13.4 | 10.2

C64x Target

ECU MIPS - Full Filter Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
8ms | 2.5 | 2.2
16ms | 2.8 | 2.4
32ms | 3.8 | 2.8

ECU MIPS - Multisegment Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
64ms | 5.2 | 4.4
128ms | 6.4 | 5.5

C64x+ Target

ECU MIPS - Full Filter Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
8ms | 2.5 | 2.2
16ms | 2.8 | 2.4
32ms | 3.7 | 2.7

ECU MIPS - Multisegment Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
64ms | 4.7 | 4.4
128ms | 5.6 | 4.4


ECU: Module Index

ECU Modules

Here is a list of all modules:
  • Echo Canceller Unit (ECU)
    • ECO API return codes
    • Exception codes


ECU: Page Index

ECU Related Pages

Here is a list of all related documentation pages:
  • Standard Compliance
  • Disclaimer


ECU: Standard Compliance

Standard Compliance

The multi-segment ECU line echo canceller performance is fully compliant with ITU-T Recommendation G.168 (2007): Digital network echo cancellers.


ECU: ecuConfig_t Struct Reference

  • Data Structures
  • Data Fields

ecuConfig_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Collaboration diagram for ecuConfig_t:

[legend]

Detailed Description

ECU configuration structure.

Contains parameters needed to open an instance of ECU.

Definition at line 390 of file ecu.h.

Data Fields

tint | samples_per_frame
tint | y2x_delay
void * | sendOutInst
void * | recOutInst
ecuConfigParam_t * cfgParam
const tint * | pcm_expand_tbl
tuint | pcm_zero

Field Documentation

tint ecuConfig_t::samples_per_frame

number of samples per frame

Definition at line 391 of file ecu.h.

tint ecuConfig_t::y2x_delay

extra system delay in samples

Definition at line 392 of file ecu.h.

void* ecuConfig_t::sendOutInst

Send-out object instance pointer

Definition at line 393 of file ecu.h.

void* ecuConfig_t::recOutInst

Receive-out object instance pointer

Definition at line 394 of file ecu.h.

ecuConfigParam_t* ecuConfig_t::cfgParam

Pointer to structure containing CN level, tail length and configuration bitfield.

Definition at line 395 of file ecu.h.

const tint* ecuConfig_t::pcm_expand_tbl

PCM expansion table pointer

Definition at line 398 of file ecu.h.

tuint ecuConfig_t::pcm_zero

PCM representation of 0

Definition at line 399 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuConfigParam_t Struct Reference

  • Data Structures
  • Data Fields

ecuConfigParam_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

ECU configuration parameter structure.

Contains parameters that may be passed from the Micro for ECU configuration.

Definition at line 365 of file ecu.h.

Data Fields

tint | filter_length
tint | config_bitfield
tint | config_bitfield1
tint | noise_level
Fract | nlp_aggress
Fract | cn_config

Field Documentation

tint ecuConfigParam_t::filter_length

Tail length in taps (options=-v1)

Definition at line 366 of file ecu.h.

tint ecuConfigParam_t::config_bitfield

Configuation bitfield part 1 (options=-h-v3)

Definition at line 368 of file ecu.h.

tint ecuConfigParam_t::config_bitfield1

Configuration bitfield, part 2 (options=-h-v3)

Definition at line 370 of file ecu.h.

tint ecuConfigParam_t::noise_level

Fixed noise level in dBm0 (0 means default -70). Range: [-30,-70] (options=-v3)

Definition at line 372 of file ecu.h.

Fract ecuConfigParam_t::nlp_aggress

NLP Agressiveness (-1 to 1 in Q15) (options=-v3)

Definition at line 375 of file ecu.h.

Fract ecuConfigParam_t::cn_config

Ratio of white noise and pink noise (0-1 in Q15) 0 indicates pink noise while 32767 indicates white noise (options=-v3)

Definition at line 377 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuContext_s Struct Reference

  • Data Structures
  • Data Fields

ecuContext_s Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

ECU context Structure.

Contains information shared amongst ECU instances.

Definition at line 469 of file ecu.h.

Data Fields

vfnptr exception
void(* | debugStrmWrite )(tuint id, tuint n, tuint chan, void *vptr, tuint type)
void(* | mipsEcuInstEvt )(void *inst, tint event)
void(* | srchPrep )(tuint ID, tint event)
void(* | sendOutFcn )(void *targetInst, void *send_out_ptr)
void(* | receiveOutFcn )(void *targetInst, void *receive_out_ptr)
tint | max_samples_per_frame
tint | max_filter_length
tint | max_filter_seg_length
tint | max_filter_seg_count
tint | max_y2x_delay
tulong | expanded_bf
linSample * | rxout_buf_base
linSample * | expand_ptr
tword * | pack_ptr

Field Documentation

vfnptr ecuContext_s::exception

For exception function pointer (typecast internally)

Definition at line 470 of file ecu.h.

void(* ecuContext_s::debugStrmWrite)(tuint id, tuint n, tuint chan, void *vptr, tuint type)

void(* ecuContext_s::mipsEcuInstEvt)(void *inst, tint event)

MAG ECU event handler

void(* ecuContext_s::srchPrep)(tuint ID, tint event)

search preparation

void(* ecuContext_s::sendOutFcn)(void *targetInst, void *send_out_ptr)

Send out function pointer

void(* ecuContext_s::receiveOutFcn)(void *targetInst, void *receive_out_ptr)

Receive out function pointer

tint ecuContext_s::max_samples_per_frame

Maximum number of samples per frame

Definition at line 481 of file ecu.h.

tint ecuContext_s::max_filter_length

Maximum filter length in taps

Definition at line 482 of file ecu.h.

tint ecuContext_s::max_filter_seg_length

Maximum filter segment buffer length in taps

Definition at line 483 of file ecu.h.

tint ecuContext_s::max_filter_seg_count

Maximum allowed active filter segments

Definition at line 484 of file ecu.h.

tint ecuContext_s::max_y2x_delay

Maximum extra system delay in samples

Definition at line 485 of file ecu.h.

tulong ecuContext_s::expanded_bf

Bitfield representing those portions of the delay line already expanded.

Definition at line 486 of file ecu.h.

linSample* ecuContext_s::rxout_buf_base

Pointer to base of the scratch delay line

Definition at line 488 of file ecu.h.

linSample* ecuContext_s::expand_ptr

TDM aligned pointer within scratch delay line

Definition at line 489 of file ecu.h.

tword* ecuContext_s::pack_ptr

TDM aligned pointer within packed delay line

Definition at line 490 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuControl_t Struct Reference

  • Data Structures
  • Data Fields

ecuControl_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

ECU Control structure.

Contains parameters required for calls to ecuControl().

Definition at line 321 of file ecu.h.

Data Fields

tint ctl_code
union {
tint ctl_mask [2]
tint bg_speed
tint srch_speed
tint place_speed
tbool enable
tint n_level
tuint nlp_aggress
Fract cn_config
} u

Field Documentation

tint ecuControl_t::ctl_code

Code indicating what ECU function will be controlled

Definition at line 322 of file ecu.h.

tint ecuControl_t::ctl_mask[2]

Mask used to enable/disable selected features

Definition at line 324 of file ecu.h.

tint ecuControl_t::bg_speed

BG LMS speed: ecu_FORCE_SLOW/ecu_ALLOW_FAST

Definition at line 325 of file ecu.h.

tint ecuControl_t::srch_speed

Search LMS speed: ecu_FORCE_SLOW/ecu_ALLOW_FAST

Definition at line 326 of file ecu.h.

tint ecuControl_t::place_speed

Search placement speed:

Definition at line 327 of file ecu.h.

tbool ecuControl_t::enable

BG/Search LMS enable/disable

Definition at line 328 of file ecu.h.

tint ecuControl_t::n_level

Fixed comfort noise level

Definition at line 329 of file ecu.h.

tuint ecuControl_t::nlp_aggress

packed NLP aggressiveness, -1 to 1 in Q7 MSB: NLP aggressiveness during steady state LSB: NLP aggressiveness during 6dB NLP

Definition at line 330 of file ecu.h.

Fract ecuControl_t::cn_config

ecu_SET_NLPAGR_6DB Mix ratio of white and pink noise, 0 to 1 in Q15

Definition at line 333 of file ecu.h.

union { ... } ecuControl_t::u

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

ecuNewConfig_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

Creation configuration structure.

Contains parameters needed at the creation of an ECU instance.

Definition at line 354 of file ecu.h.

Data Fields

tuint ID

Field Documentation

tuint ecuNewConfig_t::ID

ECU instance ID

Definition at line 355 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuPerform_t Struct Reference

  • Data Structures
  • Data Fields

ecuPerform_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

ECU Performance Parameters.

Contains parameters that indicate ECU performance. Px, Py, and Pe reflect performance of the foreground filter. They are measured whenever the coefficients of a background filter are updated.

Definition at line 411 of file ecu.h.

Data Fields

LFract | Px
LFract | Py
LFract | Pe
Fract | erlest
Fract | acomest

Field Documentation

LFract ecuPerform_t::Px

power in x over last 20ms of update (Lrin) S31.0

Definition at line 412 of file ecu.h.

LFract ecuPerform_t::Py

power in y over last 20ms of update (Lsin) S31.0

Definition at line 413 of file ecu.h.

LFract ecuPerform_t::Pe

power in e over last 20ms of update (Lres) S31.0

Definition at line 414 of file ecu.h.

Fract ecuPerform_t::erlest

estimated erl in Q4

Definition at line 415 of file ecu.h.

Fract ecuPerform_t::acomest

estimated acom in Q4

Definition at line 416 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuUpdateStat_t Struct Reference

  • Data Structures
  • Data Fields

ecuUpdateStat_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

Update statistics.

This structure contains various counters that are useful in debugging or analyzing the performance of the filter update.

Definition at line 427 of file ecu.h.

Data Fields

tulong | attempt_update
tulong | attempt_search
tulong | erle_bypass
tulong | xtone_bypass
tulong | other_bypass
tulong | xidle
tuint | double_talk
tuint | dt_cps
tuint | dt_cpt
tuint | nlp
tuint | divergence
tuint | srch_divergence
tuint | fg_switch
tuint | bg_switch
tuint | openloop_found
tuint | numseg_change
tuint | segment_change
tuint | converge_exit
tuint | txbssat_events
tuint | rxbssat_events

Field Documentation

tulong ecuUpdateStat_t::attempt_update

# times ecu_adaptive_filter() executed

Definition at line 428 of file ecu.h.

tulong ecuUpdateStat_t::attempt_search

# blocks for which we called search FSM

Definition at line 429 of file ecu.h.

tulong ecuUpdateStat_t::erle_bypass

# update bypasses due to high ERLE

Definition at line 430 of file ecu.h.

tulong ecuUpdateStat_t::xtone_bypass

# blocks bypassed due to presence of tones in x

Definition at line 431 of file ecu.h.

tulong ecuUpdateStat_t::other_bypass

# blocks bypassed for other reasons (e.g. delayed divergence)

Definition at line 432 of file ecu.h.

tulong ecuUpdateStat_t::xidle

# segments declared as x-idle (see ecufg.c)

Definition at line 434 of file ecu.h.

tuint ecuUpdateStat_t::double_talk

# segments declared as double talk (see ecufg.c)

Definition at line 435 of file ecu.h.

tuint ecuUpdateStat_t::dt_cps

# segs declared as const power signal DT (ecufg.c)

Definition at line 436 of file ecu.h.

tuint ecuUpdateStat_t::dt_cpt

# segs declared as const power tone DT (ecufg.c)

Definition at line 437 of file ecu.h.

tuint ecuUpdateStat_t::nlp

# segments nlp engaged (see ecufg.c)

Definition at line 438 of file ecu.h.

tuint ecuUpdateStat_t::divergence

# times filters were reset due to divergence

Definition at line 439 of file ecu.h.

tuint ecuUpdateStat_t::srch_divergence

# times search filter was reset due to divergence

Definition at line 440 of file ecu.h.

tuint ecuUpdateStat_t::fg_switch

# times FG filter was reset by BG filter

Definition at line 441 of file ecu.h.

tuint ecuUpdateStat_t::bg_switch

# times BG filter was reset by FG filter

Definition at line 442 of file ecu.h.

tuint ecuUpdateStat_t::openloop_found

# of times open loop was detected

Definition at line 443 of file ecu.h.

tuint ecuUpdateStat_t::numseg_change

# times the number of bg filter segments has been changed by the segment placement routine

Definition at line 444 of file ecu.h.

tuint ecuUpdateStat_t::segment_change

# times the filter segment placement changed while the number of segments remained constant

Definition at line 446 of file ecu.h.

tuint ecuUpdateStat_t::converge_exit

# times the converged state was exited

Definition at line 448 of file ecu.h.

tuint ecuUpdateStat_t::txbssat_events

wide band tx saturation

Definition at line 449 of file ecu.h.

tuint ecuUpdateStat_t::rxbssat_events

wide band rx saturation

Definition at line 450 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU: ecuVersion_t Struct Reference

  • Data Structures
  • Data Fields

ecuVersion_t Struct Reference
[Echo Canceller Unit (ECU)]

#include <ecu.h>

Detailed Description

ECU Version structure.

Contains ECU version information.

Definition at line 306 of file ecu.h.

Data Fields

tuint | version
tuint | revision
tuint | patch
tuint | build
tuint | feature

Field Documentation

tuint ecuVersion_t::version

ECU version

Definition at line 307 of file ecu.h.

tuint ecuVersion_t::revision

ECU revision

Definition at line 308 of file ecu.h.

tuint ecuVersion_t::patch

ECU patch

Definition at line 309 of file ecu.h.

tuint ecuVersion_t::build

ECU build number

Definition at line 310 of file ecu.h.

tuint ecuVersion_t::feature

ECU compile time features for this build

Definition at line 311 of file ecu.h.

The documentation for this struct was generated from the following file:
  • ecu.h


ECU test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

All simulation configuration parameters are in the siuSetup structure. This structure needs to be configured before running any test. It is suggested that this structure be opened in a Watch Window for easy access.

By default, the unit test is configured for an 8 kHz sampling rate. To test the (wideband) 16 kHz sampling rate, the linker command file in the \lnkr\<targ> directory will need to be altered to link the wideband ECU libraries. Furthermore, siuSetup->Fs will need to be changed from 8000 to 16000 and the frame length must reflect a minimum of 80 samples.

  1. Set a breakpoint at ecu_halt()
  2. Run and let the simulation halt at the prescribed breakpoint
  3. Set siuSetup->exec to the value 1,
  4. Choose a signal source:
    • By default, siuSetup->sig_src is set to 0. This implies that signal input is from files. By default, input signal data is read from the PCM files ecu\test\testvec\rin.pcm, and ecu\test\testvec\sin.pcm. Note that rin represents the far-end signal (receive-in) and sin represents the near-end signal (send-in). The files that provide signal input may be changed via siuSetup->rin->fname , siuSetup->sin->fname and siuSetup->baseDir.
    • The data files may be linear 16-bit PCM format (little Endian) Ulaw or Alaw, though the siuSetup->pcm_format setting must match the file format (0 = Alaw, 1 = Ulaw, 2 = Linear). The default is Ulaw.
    • When siuSetup->sig_src is set to 1, internal signal generators (SGN) are used as the signal source. Two signal generators are used; one for each of the two directions (receive-in and send-in). Each signal generator can be configured independently at any point during simulation. Configuration requires setting siuSetup->toggle_tx_sg or siuSetup->toggle_rx_sg (or both) to 1 to toggle a re-configuration, while setting the fields in siuSetup->txSGN and/or siuSetup->rxSGN for the far-end to the desired values.
    • Note that the signal source must be chosen prior to initiating the simulation and can not be changed during execution.
  5. Choose hybrid type (echo path):
    • This option is only valid when the signal source is the signal generators. The hybrid is selected by setting siuSetup->toggle_hyb to 1, and configuring the fields in siuSetup->hybCtl. All G168 (2007) hybrids are available and may be re-configured at any time during the simulation.
    • Multiple hybrids are also supported.
  6. Configure the ECU:
    • The ECU may also be configured at any point during simulation by setting siuSetup->toggle_ecu to 1, and configuring the siuSetup->ecuCtl structure values (see ecu.h).
  7. Frame size:
    • The frame size specifies the size of the ECU processing frame in PCM samples. This can be configured at the beginning of the simulation only, and must be a multiple of 5ms smaller than the maximum supported simulation frame size. The default value is 5ms, 40 samples at 8kHz sampling rate.


ECU test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


ECU test: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


ECU test: doxygen.h Source File

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


ECU test: File Index

ECU test File List

Here is a list of all files with brief descriptions:
doxygen.h [code]


ECU test: ECU Unit Test

ECU Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the ECU. This is not a regression test, its purpose is to show how the ECU module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Building Unit Test

The ECU Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the ECU Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main ECU documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The ECU Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the ECU Unit Test image for the target of interest
    • Will reside in the ecu\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the ECU project for the target of interest
    • Will be a subdirectory off the ecu\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the ecu\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)
  • ti.mas.mhm (Multiple heap manager)
  • ti.mas.vpe (Voice processing elements)


ECU test: Page Index

ECU test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


NMU: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_nmu_Version__top__
#define | __extern extern
#define | ti_mas_nmu_Version___VERS 150
#define | ti_mas_nmu_Version_MAJOR (1)
#define | ti_mas_nmu_Version_MINOR (4)
#define | ti_mas_nmu_Version_XVERTICAL (0)
#define | ti_mas_nmu_Version_PATCH (2)
#define | ti_mas_nmu_Version_BUILD (0)
#define | ti_mas_nmu_Version_QUALITY (3)
#define | ti_mas_nmu_Version_BTYPE (0)
#define | ti_mas_nmu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_nmu_Version_MAJOR
#define | Version_MINOR ti_mas_nmu_Version_MINOR
#define | Version_XVERTICAL ti_mas_nmu_Version_XVERTICAL
#define | Version_PATCH ti_mas_nmu_Version_PATCH
#define | Version_BUILD ti_mas_nmu_Version_BUILD
#define | Version_QUALITY ti_mas_nmu_Version_QUALITY
#define | Version_BTYPE ti_mas_nmu_Version_BTYPE
#define | Version_WIDTH ti_mas_nmu_Version_WIDTH

Define Documentation

#define ti_mas_nmu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_nmu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_nmu_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_nmu_Version_MINOR (4)

Definition at line 53 of file Version.h.

#define ti_mas_nmu_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_nmu_Version_PATCH (2)

Definition at line 59 of file Version.h.

#define ti_mas_nmu_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_nmu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_nmu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_nmu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_nmu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_nmu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_nmu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_nmu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_nmu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_nmu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_nmu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_nmu_Version_WIDTH

Definition at line 97 of file Version.h.


NMU: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_nmu_Version__include
00023 #define ti_mas_nmu_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_nmu_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_nmu_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_nmu_Version_MAJOR (1)
00051
00052 /* MINOR */
00053 #define ti_mas_nmu_Version_MINOR (4)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_nmu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_nmu_Version_PATCH (2)
00060
00061 /* BUILD */
00062 #define ti_mas_nmu_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_nmu_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_nmu_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_nmu_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_nmu_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_nmu_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_nmu_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_nmu_Version_MAJOR
00091 #define Version_MINOR      ti_mas_nmu_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_nmu_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_nmu_Version_PATCH
00094 #define Version_BUILD      ti_mas_nmu_Version_BUILD
00095 #define Version_QUALITY    ti_mas_nmu_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_nmu_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_nmu_Version_WIDTH
00098 #endif


NMU: Data Structures

  • Data Structures
  • Data Fields

NMU Data Structures

Here are the data structures with brief descriptions:
nmurxNewConfig_t | Create time configuration parameters
nmurxOpenConfig_t | Open time configuration parameters
nmurxSizeConfig_t | Size query time configuration parameters
nmurxXdaisAllocParams_t | Configuration parameters overloading for algAlloc API
nmurxXdaisCallTable_t | NMU Rx's XDAIS call table definition
nmurxXdaisInitParams_t | Configuration parameters overloading for algInit API
nmutxNewConfig_t | Create time configuration parameters
nmutxOpenConfig_t | Open time configuration parameters
nmutxSizeConfig_t | Size query time configuration parameters
nmutxStats_s | Statistics reported by NMU Tx
nmutxXdaisAllocParams_t | Configuration parameters overloading for algAlloc API
nmutxXdaisCallTable_t | NMU Tx's XDAIS call table definition
nmutxXdaisInitParams_t | Configuration parameters overloading for algInit API


NMU: Detailed NMU Description

NMU (Noise Matching Unit) Package

Detailed NMU Description

Description

The purpose of noise matching is to improve the speech quality during discontinuous transmission (DTX). Due to the presence of background noise, the absence of noise transmission can cause audible artifacts in the speech output at the receiving side (RX) during transitions between voice (in which background noise is present) and noise. Therefore, noise information (transmitted as packets) can reduce the audible artifacts and provide better speech quality at the cost of bandwidth during non-speech periods. In the absence of transmission of noise information in any form, at a minimum, the receiver needs to generate comfort noise (CNG) during silence periods to give a feeling to the user that the connection is alive (complete silence can make user uncomfortable and may interpret as loss of connection). In all the documentation, tx will be use to refer to the direction towards packet i.e where noise estimation is done and rx will be used to refer to the direction from packet i.e where noise generation needs to be done. The NMU package actually consists of two modules as per the direction, NMUTX for tx direction and NMURX for rx direction. Nmutx works using an upstream VAD (Voice Activity Detection) module decision of voice/no-voice. During no-voice periods, the NMUTX estimates level and/or spectral character of noise and sends updates of noise information for NMURX to generate noise based on this information. The NMURX generates noise during every single silence frame based on the last updated information about the noise characteristics from the received noise information payload. Nmutx always generates noise information on every transition from voice to silence.

Features

Different noise matching methods allow the realization of the trade-offs among speech quality, bandwidth savings and computational/algorithmic complexity. There are three types of NMU algorithms supported.

Fixed Level CNG

This is applicable in the rx direction only. It gives ability to the user to generate noise at a fixed configured level no matter what NMURX receives. Generally, but not necessarily, this configuration is used together with NMUTX configured to "none" mode, where it only generates noise payload with level -70 dBm when there is voice to no-voice transition but no updates during no-voice, it does not estimate the level. This gives maximum bandwidth savings. A default level of -70 dBm is used in absence of a user configured level by NMURX. Because there is no estimating/tracking by tx/rx of actual noise, this is not really noise matching in the strictest sense. The generated noise is pink.

Level (only) Matching

This is applicable for both tx and rx directions. The NMUTX estimates noise level based on energy of noise and generates single byte packet payload representing level information as per RFC3389. The NMURX generates pink noise at a level that is the same as the one in the single byte packet payload it receives as per RFC3389 i.e. it tries to track the level based on transmitted information it receives. Until NMURX gets the first packet payload containing noise infomration, if receiver is asked to generate noise, it will use a user configured noise level (default of -70 dBm if user has not configured). If a packet payload contains more than 1 byte i.e more than level information (e.g spectrum information), the extra payload is ignored by NMURX. This combination of tx and rx allows noise matching in terms of level character of the noise, but not the spectral character of noise. The DTX (discontinuous transmission) logic in nmu tx will decide during silence periods when to send updates, for example when noise level changes by more than a certain amount over a certain time. No DTX configurability is currently provided to the user to realize a tradeoff between quality and bandwidth. Because this type of noise matching does not really match the spectral character, DTX is designed to be relatively conservative compared to the spectrum matching i.e. the updates are not as frequent as spectrally matched noise. So this setting is recommended when bandwidth savings are more important than quality of noise matching. Level matching can be used for any sampling rate.

Spectrum Matching G.711 Appendix II

G.711 Appendix II is used in spectrum matching. G.711 Appendix II defines a comfort noise payload format, which consists of a description of the noise level and spectral information in the form of reflection coefficients in the all-pole model. Spectral information is optional and can vary based on selected LP (Linear Prediction) order. G.711 Appendix II also presents an example solution of how to generate and use the defined comfort noise payload format but does not specify the DTX logic, which is TI proprietary. G.711 Appendix II is intended for packet-based systems with a large header overhead where the packet transmission rate plays a significant role in the overall system bit-rate compared to the payload size, so a small increase in payload such as going from a single byte payload containing level only to a 11 byte payload containing level and 10 spectral coefficients does not siginficantly affect the bandwidth, but provides better quality due to spectral matching.

The NMUTX estimates noise level and spectrum and generates multi-byte packet payload representing level and spectrum information as per RFC3389. The NMURX generates noise using spectrum and level information that it receives from transmitter i.e. it tries to track the noise character based on transmitted information it receives. Both NMUTX and NMURX can be configured for an LP order ranging from 0 to 10. The NMUTX will generate paylod of 1 byte (for level) plus additional bytes equal to the LP order containing spectrum information. The NMURX will only use up to the configured LP order bytes to generate noise even if it receives bigger payload representing more LP bytes than it is configured to handle. If NMURX receives packet payload of size representing LP coefficients less than LP order it is configured for, it will use whatever packet payload bytes are available. Thus, NMURX, even when configured for a certain LP order is flexible to handle any kind of packet payload size, so rx and tx configurations are completely independent. The DTX (discontinuous transmission) logic in nmu tx will decide during silence periods when to send updates, for example when noise level or spectum changes by more than a certain amount over a certain time occur.

No DTX configurability is currently provided to the user to realize a tradeoff between quality and bandwidth. Because this type of noise matching matches best the character of noise compared to level only matching, the DTX logic in NMUTX is designed to be relatively more sensitive to changes in level and spectrum compared to that of the level matching one, so that rapid changes in level and spectrum, such as for complex noise like office, street, cafe, pub etc will result in a higher rate of noise updates. So this setting is recommended when bandwidth savings are less important than quality of noise matching, such as aforementioned complex noise scenarios where level only matching or slow updates can cause annoying artifacts. However, for relatively steady noise (in terms of level and spectrum), the DTX will not generate unnecessary updates. Note that even with a DTX logic that is more sensitive to changes in noise character, there is still good bandwidth savings because noise is coded at much lower bandwidth than voice (at least for PCM codec which codes 80 bytes in a 10 ms frame of voice whereas only 11 bytes are required for noise).

(Voice Activity Detection) Alert for better tracking.

The NMUTX requires an alert indication from an upstream VAD module so that it can start an early estimation of noise character before the actual voice to noise transition happens. This allows level to be tracked and prevent artifacts when noise character may change during long periods of active speech and not doing this will cause a change in noise perceived during the active speech period and the transition to noise. VAD is expected to give an early indication about 80 ms or more in advance of the end of its hangover period. Generally VAD hangover periods are in excess of 100 ms. If the alert was a false alarm, the NMUTX will reset its estimation so that the voice does not influence noise estimation. This also helps prevent artifact of first voice to noise transition (e.g if a voice call starts with active speech) because of NMUTX not getting an opportunity to learn anything about the background noise character before the first voice to noise transition, due to this capabilitiy, it will be able to learn before the transition happens.


NMU:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


NMU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


NMU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


NMU: NMU External API

NMU (Noise Matching Unit) Package

NMU External API

Page Contents

  1. NMURX ECO API
  2. NMU ECO Creation Functions
  3. NMU ECO Configuration Functions
  4. NMU ECO Execution Functions
  5. NMU ECO Destruction Functions
  6. NMU ECO Return Codes
  7. NMU XDais API

NMURX ECO API

Since the NMU ECO RX and TX modules are so similar, the APIs for both will be described together in the following sections. Any differences will be duly noted.

The NMU Embedded Communication Object (ECO) receive path (RX) and send path (TX) APIs consist of the following routines for instance creation, configuration, destruction and execution.

NMURX NMUTX
  1. nmurxGetSizes()
  2. nmurxNew()
  3. nmurxOpen()
  4. nmurxControl()
  5. nmurxRelocate()
  6. nmurxProcess()
  7. nmurxIsAlgSupported()
  8. nmurxClose()
  9. nmurxDelete()
  1. nmutxGetSizes()
  2. nmutxNew()
  3. nmutxOpen()
  4. nmutxControl()
  5. nmutxRelocate()
  6. nmutxProcess()
  7. nmutxIsAlgSupported()
  8. nmutxGetStats()
  9. nmutxClose()
  10. nmutxDelete()

NMU ECO Creation Functions

NMU (RX or TX) instance creation is a four step process. First, determine the module memory requirements via the modules GetSizes routine. Second, allocate the module memory buffers using any system-prescribed method. Create the module instance by passing the allocated buffer information to the associated New API routine. Finally, open the instance for use via the associated OpenAPI function.

This process must be followed in the order given for proper operation. Once an NMU instance is opened, it may be applied for noise estimation or generation.

NMURX NMUTX
  1. nmurxGetSizes()
  2. nmurxNew()
  3. nmurxOpen()
  1. nmutxGetSizes()
  2. nmutxNew()
  3. nmutxOpen()

NMU ECO Configuration Functions

The NMU component has two common external API configuration routines; one to configure the module instance - nmurxControl or nmutxControl, and one to to query for algorithmic support - nmurxIsAlgSupported or nmutxIsAlgSupported. The NMUTX module offers one additional API routine to gather operatoinal statistics - nmutxGetStats. Follow the links below for further details.

NMURX NMUTX
  1. nmurxControl()
  2. nmurxIsAlgSupported()
  1. nmutxControl()
  2. nmutxIsAlgSupported()
  3. nmutxGetStats()

NMU ECO Execution Functions

The NMU execution API consists of two routines, one for RX or TX processing - nmurxProcess or nmutxProcess, and one for module instance relocation - nmurxRelocate or nmutxRelocate. The execution API functions require an active NMU module instance that has been opened according to the procedure in NMU ECO Creation Functions above. Follow the links below for further details.

NMURX NMUTX
  1. nmurxProcess()
  2. nmurxRelocate()
  1. nmutxProcess()
  2. nmutxRelocate()

NMU ECO Destruction Functions

NMU module instance desctruction is a two step process. First, the NMU module (RX or TX) must be closed via the associated ECO Close API function. Once the NMU module is closed it may be removed via the approppriate ECO Delete function. Follow the links below for further details.

NMURX NMUTX
  1. nmurxClose()
  2. nmurxDelete()
  1. nmutxClose()
  2. nmutxDelete()

Note:
  1. Once an instance has been closed, it may be re-opened via the associated ECO Open routine. The instance memory should not be reallocated until the instance is deleted.

NMU ECO Return Codes

The NMU modules provide both warning and error output to indicate problems calling the NMU API functions. Follow the links below for further details.

NMURX NMUTX
  1. NMU RX Warning Codes
  2. NMU RX Exception Codes
  3. NMU RX Error Codes
  1. NMU RX Warning Codes
  2. NMU TX Exception Codes
  3. NMU TX Error Codes

NMU XDais API

The NMU modules also offer the eXpressDsp Algorithm Interoperability Standard (XDAIS) API. This API is available via the nmurxXdaisCallTable for NMURX and nmutxXdaisCallTable for NMUTX. These call tables provide the control and process API functions.


NMU: File Index

  • File List
  • Globals

NMU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
nmurx.h [code] | Contains definitions and external APIs for NMU Rx
nmutx.h [code] | Contains definitions and external APIs for the NMU Tx


NMU: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • c
  • d
  • f
  • g
  • i
  • l
  • p
  • s

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- c -

  • cfg : nmurxXdaisAllocParams_t , nmutxXdaisAllocParams_t
  • cfgNew : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • cfgOpen : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • config : nmurxOpenConfig_t , nmutxSizeConfig_t , nmutxOpenConfig_t , nmurxSizeConfig_t
  • control : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • curr_bg_noise : nmutxStats_s

- d -

  • debugInfo : nmurxNewConfig_t , nmutxNewConfig_t

- f -

  • frame_size : nmurxOpenConfig_t , nmutxOpenConfig_t

- g -

  • g711a2TxProcessDecimateInterval : nmutxNewConfig_t

- i -

  • ialg : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • ID : nmurxNewConfig_t , nmutxNewConfig_t
  • isSidAllowed : nmutxNewConfig_t

- l -

  • level_format : nmurxOpenConfig_t , nmutxOpenConfig_t

- p -

  • param : nmurxXdaisAllocParams_t , nmurxXdaisInitParams_t , nmutxXdaisInitParams_t , nmutxXdaisAllocParams_t
  • process : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t

- s -

  • sizeCfg : nmurxNewConfig_t , nmutxNewConfig_t


NMU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • c
  • d
  • f
  • g
  • i
  • l
  • p
  • s

- c -

  • cfg : nmurxXdaisAllocParams_t , nmutxXdaisAllocParams_t
  • cfgNew : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • cfgOpen : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • config : nmurxOpenConfig_t , nmutxSizeConfig_t , nmutxOpenConfig_t , nmurxSizeConfig_t
  • control : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • curr_bg_noise : nmutxStats_s

- d -

  • debugInfo : nmurxNewConfig_t , nmutxNewConfig_t

- f -

  • frame_size : nmurxOpenConfig_t , nmutxOpenConfig_t

- g -

  • g711a2TxProcessDecimateInterval : nmutxNewConfig_t

- i -

  • ialg : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • ID : nmurxNewConfig_t , nmutxNewConfig_t
  • isSidAllowed : nmutxNewConfig_t

- l -

  • level_format : nmurxOpenConfig_t , nmutxOpenConfig_t

- p -

  • param : nmurxXdaisAllocParams_t , nmurxXdaisInitParams_t , nmutxXdaisInitParams_t , nmutxXdaisAllocParams_t
  • process : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t

- s -

  • sizeCfg : nmurxNewConfig_t , nmutxNewConfig_t


NMU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines
  • _
  • n
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h

- n -

  • nmurx_E1 : nmurx.h
  • nmurx_ERROR : nmurx.h
  • nmurx_EXC_INVALID_MODE : nmurx.h
  • nmurx_G711A2_MAX_LP_ORDER : nmurx.h
  • nmurx_LEVEL_FORMAT_dBm : nmurx.h
  • nmurx_LEVEL_FORMAT_dBov : nmurx.h
  • nmurx_NOERR : nmurx.h
  • nmurx_NOMEMORY : nmurx.h
  • nmurx_W1 : nmurx.h
  • nmurx_W10 : nmurx.h
  • nmurx_W11 : nmurx.h
  • nmurx_W2 : nmurx.h
  • nmurx_W3 : nmurx.h
  • nmurx_W4 : nmurx.h
  • nmurx_W5 : nmurx.h
  • nmurx_W6 : nmurx.h
  • nmurx_W7 : nmurx.h
  • nmurx_W8 : nmurx.h
  • nmurx_W9 : nmurx.h
  • nmurx_WARN_CTL_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_CTL_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmurx_WARN_NEW_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmurxClose() : nmurx.h
  • nmurxControl() : nmurx.h
  • nmurxDelete() : nmurx.h
  • nmurxGetSizes() : nmurx.h
  • nmurxIsAlgSupported() : nmurx.h
  • nmurxNew() : nmurx.h
  • nmurxOpen() : nmurx.h
  • nmurxProcess() : nmurx.h
  • nmurxRelocate() : nmurx.h
  • nmurxXdaisCallTable : nmurx.h
  • nmutx_E1 : nmutx.h
  • nmutx_ERROR : nmutx.h
  • nmutx_EXC_INVALID_MODE : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS : nmutx.h
  • nmutx_LEVEL_FORMAT_dBm : nmutx.h
  • nmutx_LEVEL_FORMAT_dBov : nmutx.h
  • nmutx_NOERR : nmutx.h
  • nmutx_NOMEMORY : nmutx.h
  • nmutx_W1 : nmutx.h
  • nmutx_W10 : nmutx.h
  • nmutx_W2 : nmutx.h
  • nmutx_W3 : nmutx.h
  • nmutx_W4 : nmutx.h
  • nmutx_W5 : nmutx.h
  • nmutx_W6 : nmutx.h
  • nmutx_W7 : nmutx.h
  • nmutx_W8 : nmutx.h
  • nmutx_W9 : nmutx.h
  • nmutx_WARN_CTL_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_CTL_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmutx.h
  • nmutx_WARN_NEW_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmutx.h
  • nmutxClose() : nmutx.h
  • nmutxControl() : nmutx.h
  • nmutxDelete() : nmutx.h
  • nmutxGetSizes() : nmutx.h
  • nmutxGetStats() : nmutx.h
  • nmutxIsAlgSupported() : nmutx.h
  • nmutxNew() : nmutx.h
  • nmutxOpen() : nmutx.h
  • nmutxProcess() : nmutx.h
  • nmutxRelocate() : nmutx.h
  • nmutxStats_t : nmutx.h
  • nmutxXdaisCallTable : nmutx.h

- t -

  • ti_mas_nmu_Version___VERS : Version.h
  • ti_mas_nmu_Version__top__ : Version.h
  • ti_mas_nmu_Version_BTYPE : Version.h
  • ti_mas_nmu_Version_BUILD : Version.h
  • ti_mas_nmu_Version_MAJOR : Version.h
  • ti_mas_nmu_Version_MINOR : Version.h
  • ti_mas_nmu_Version_PATCH : Version.h
  • ti_mas_nmu_Version_QUALITY : Version.h
  • ti_mas_nmu_Version_WIDTH : Version.h
  • ti_mas_nmu_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


NMU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines
  • _
  • n
  • t
  • v

- _ -

  • __extern : Version.h

- n -

  • nmurx_E1 : nmurx.h
  • nmurx_ERROR : nmurx.h
  • nmurx_G711A2_MAX_LP_ORDER : nmurx.h
  • nmurx_LEVEL_FORMAT_dBm : nmurx.h
  • nmurx_LEVEL_FORMAT_dBov : nmurx.h
  • nmurx_NOERR : nmurx.h
  • nmurx_NOMEMORY : nmurx.h
  • nmurx_W1 : nmurx.h
  • nmurx_W10 : nmurx.h
  • nmurx_W11 : nmurx.h
  • nmurx_W2 : nmurx.h
  • nmurx_W3 : nmurx.h
  • nmurx_W4 : nmurx.h
  • nmurx_W5 : nmurx.h
  • nmurx_W6 : nmurx.h
  • nmurx_W7 : nmurx.h
  • nmurx_W8 : nmurx.h
  • nmurx_W9 : nmurx.h
  • nmutx_E1 : nmutx.h
  • nmutx_ERROR : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS : nmutx.h
  • nmutx_LEVEL_FORMAT_dBm : nmutx.h
  • nmutx_LEVEL_FORMAT_dBov : nmutx.h
  • nmutx_NOERR : nmutx.h
  • nmutx_NOMEMORY : nmutx.h
  • nmutx_W1 : nmutx.h
  • nmutx_W10 : nmutx.h
  • nmutx_W2 : nmutx.h
  • nmutx_W3 : nmutx.h
  • nmutx_W4 : nmutx.h
  • nmutx_W5 : nmutx.h
  • nmutx_W6 : nmutx.h
  • nmutx_W7 : nmutx.h
  • nmutx_W8 : nmutx.h
  • nmutx_W9 : nmutx.h

- t -

  • ti_mas_nmu_Version___VERS : Version.h
  • ti_mas_nmu_Version__top__ : Version.h
  • ti_mas_nmu_Version_BTYPE : Version.h
  • ti_mas_nmu_Version_BUILD : Version.h
  • ti_mas_nmu_Version_MAJOR : Version.h
  • ti_mas_nmu_Version_MINOR : Version.h
  • ti_mas_nmu_Version_PATCH : Version.h
  • ti_mas_nmu_Version_QUALITY : Version.h
  • ti_mas_nmu_Version_WIDTH : Version.h
  • ti_mas_nmu_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


NMU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • nmurx_EXC_INVALID_MODE : nmurx.h
  • nmurx_WARN_CTL_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_CTL_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmurx_WARN_NEW_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmutx_EXC_INVALID_MODE : nmutx.h
  • nmutx_WARN_CTL_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_CTL_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmutx.h
  • nmutx_WARN_NEW_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmutx.h


NMU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • nmurxClose() : nmurx.h
  • nmurxControl() : nmurx.h
  • nmurxDelete() : nmurx.h
  • nmurxGetSizes() : nmurx.h
  • nmurxIsAlgSupported() : nmurx.h
  • nmurxNew() : nmurx.h
  • nmurxOpen() : nmurx.h
  • nmurxProcess() : nmurx.h
  • nmurxRelocate() : nmurx.h
  • nmutxClose() : nmutx.h
  • nmutxControl() : nmutx.h
  • nmutxDelete() : nmutx.h
  • nmutxGetSizes() : nmutx.h
  • nmutxGetStats() : nmutx.h
  • nmutxIsAlgSupported() : nmutx.h
  • nmutxNew() : nmutx.h
  • nmutxOpen() : nmutx.h
  • nmutxProcess() : nmutx.h
  • nmutxRelocate() : nmutx.h


NMU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • nmutxStats_t : nmutx.h


NMU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines

  • nmurxXdaisCallTable : nmurx.h
  • nmutxXdaisCallTable : nmutx.h


NMU: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


NMU: NMURX

NMURX

Collaboration diagram for NMURX:

Detailed Description

Modules

NMU RX Warning Codes
NMU Rx Warning Messages.
NMU RX Exception Codes
Exception Messages.
NMU RX Error Codes

Data Structures

struct | nmurxSizeConfig_t
Size query time configuration parameters. More...
struct | nmurxNewConfig_t
Create time configuration parameters. More...
struct | nmurxOpenConfig_t
Open time configuration parameters. More...
struct | nmurxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmurxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmurxXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | nmurxXdaisCallTable_t
NMU Rx's XDAIS call table definition. More...

XDAIS APIs

nmurxXdaisCallTable_t nmurxXdaisCallTable

ECO (Telogy Embedded Communication Object) APIs

Remarks:
new, delete, getSizes, Open, Close and relocate are standard ECO APIs so are not described here in detail. Return codes may be one of nmurx_ERROR or nmurx_NOERR.

tint | nmurxNew (void **nmurxInst, tint nbufs, ecomemBuffer_t *bufs, nmurxNewConfig_t *cfg)
void | nmurxDelete (void **nmurxInst)
tint | nmurxGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, nmurxSizeConfig_t *cfg)
tint | nmurxOpen (void *nmurxInst, nmurxOpenConfig_t *cfg)
void | nmurxClose (void *nmurxInst)
tint | nmurxRelocate (void **nmurxInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
void | nmurxProcess (void *nmurxInst, ISPHDEC1_FrameType frameType, tint inCwsegSize, tword *inCwseg, linSample *samples)
NMU Rx Processing.
void | nmurxControl (void *nmurxInst, ifnmurxConfig_t *cfg)
Control API.
tbool | nmurxIsAlgSupported (tuint mode)
API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).

Defines

#define | nmurx_G711A2_MAX_LP_ORDER 10
#define | nmurx_W1 nmurx_WARN_NEW_BAD_NOISE_MODE_CFG, "New: Bad Noise Mode Config"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open: Noise Mode Config rejected"
#define | nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open: Bad Noise Mode Config"
#define | nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open: Bad Frame Size Config"
#define | nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open: Bad Level Format Config"
#define | nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER, "Open: Bad LP order Config"
#define | nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED, "Open: LP order Rejected"
#define | nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"
#define | nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order Config"
#define | nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
#define | nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"
#define | nmurx_E1 nmurx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Define Documentation

#define nmurx_G711A2_MAX_LP_ORDER 10

Definition at line 23 of file nmurx.h.

#define nmurx_W1 nmurx_WARN_NEW_BAD_NOISE_MODE_CFG, "New: Bad Noise Mode Config"

Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.

Definition at line 61 of file nmurx.h.

#define nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open: Noise Mode Config rejected"

Definition at line 62 of file nmurx.h.

#define nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open: Bad Noise Mode Config"

Definition at line 63 of file nmurx.h.

#define nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open: Bad Frame Size Config"

Definition at line 64 of file nmurx.h.

#define nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open: Bad Level Format Config"

Definition at line 65 of file nmurx.h.

#define nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER, "Open: Bad LP order Config"

Definition at line 66 of file nmurx.h.

#define nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED, "Open: LP order Rejected"

Definition at line 67 of file nmurx.h.

#define nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"

Definition at line 68 of file nmurx.h.

#define nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order Config"

Definition at line 69 of file nmurx.h.

#define nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"

Definition at line 70 of file nmurx.h.

#define nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"

Definition at line 71 of file nmurx.h.

#define nmurx_E1 nmurx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"

Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Definition at line 90 of file nmurx.h.

Function Documentation

tint nmurxNew | ( | void ** | nmurxInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | nmurxNewConfig_t * | cfg
 | ) |  |

void nmurxDelete ( void ** nmurxInst )

tint nmurxGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | nmurxSizeConfig_t * | cfg
 | ) |  |

tint nmurxOpen | ( | void * | nmurxInst,
 |  | nmurxOpenConfig_t * | cfg
 | ) |  |

void nmurxClose ( void * nmurxInst )

tint nmurxRelocate | ( | void ** | nmurxInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | tuint * | relocBufBitMaskPtr
 | ) |  |

void nmurxProcess | ( | void * | nmurxInst,
 |  | ISPHDEC1_FrameType | frameType,
 |  | tint | inCwsegSize,
 |  | tword * | inCwseg,
 |  | linSample * | samples
 | ) |  |

NMU Rx Processing.

Parameters:
[in] | nmurxInst | Algorithm instance handle
[in] | frameType | Input: frame type which is either ISPHDEC1_FTYPE_SPEECHGOOD or ISPHENC1_FTYPE_SIDUPDATE all other frame types are interpreted as ISPHDEC1_FTYPE_NODATA.
[in] | inCwsegSize | Input codeword segment size i.e size of packet payload for SID in bits. This input is ignored if frame type is anything other than SIDUPDATE
[in] | inCwseg | Pointer to input codeword segment i.e. packet payload of SID, stored packed in MAU (minimum addressable unit). Because SID is in bytes, if MAU is 1 byte, it is matched format so there is no ambiguity but if MAU is 2 bytes (such as for 55x, 54x), the payload is assumed to be packed as cwseg[0] = [byte[0],byte[1]], cwseg[1] = [byte[2],byte[3]] and so on. This input is ignored for all frame types other than SIDUPDATE.
[in,out] | samples | Pointer to input 16-bit linear samples when frameType is ISPHDEC1_FTYPE_SPEECHGOOD and for all other frame types, it is has the output samples generated by nmurx (synthesized noise)

void nmurxControl | ( | void * | nmurxInst,
 |  | ifnmurxConfig_t * | cfg
 | ) |  |

Control API.

Parameters:
[in] | nmurxInst | Algorithm instance handle.
[in] | cfg | Pointer to nmurx configuration structure defined in ifnmu external interface (ifnmurx.h)
Remarks:
nmurxControl() Allows run-time configuration of parameters specified in the ifnmu external interface.

tbool nmurxIsAlgSupported ( tuint mode )

API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).

Parameters:
[in] mode One of the possible noise_mode values as specified in ifnmu external interface (ifnmurx.h)
Return values:
ret TRUE if mode requested is supported in the image, FALSE otherwise

Variable Documentation

nmurxXdaisCallTable_t nmurxXdaisCallTable


NMU: NMUTX

NMUTX

Collaboration diagram for NMUTX:

Detailed Description

Modules

NMU RX Warning Codes
NMU Tx Warning Messages.
NMU TX Exception Codes
Exception Messages.
NMU TX Error Codes

Data Structures

struct | nmutxSizeConfig_t
Size query time configuration parameters. More...
struct | nmutxNewConfig_t
Create time configuration parameters. More...
struct | nmutxOpenConfig_t
Open time configuration parameters. More...
struct | nmutxStats_s
Statistics reported by NMU Tx. More...
struct | nmutxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmutxXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | nmutxXdaisCallTable_t
NMU Tx's XDAIS call table definition. More...

XDAIS APIs

nmutxXdaisCallTable_t nmutxXdaisCallTable

ECO (Telogy Embedded Communication Object) APIs

Remarks:
new, delete, getSizes, Open and Close are standard ECO APIs so are not described here in detail. Return codes may be one of nmutx_ERROR or nmutx_NOERR.

tint | nmutxGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, nmutxSizeConfig_t *cfg)
tint | nmutxNew (void **nmutxInst, tint nbufs, ecomemBuffer_t *bufs, nmutxNewConfig_t *cfg)
void | nmutxDelete (void **nmutxInst)
tint | nmutxOpen (void *nmutxInst, nmutxOpenConfig_t *cfg)
void | nmutxClose (void *nmutxInst)
tint | nmutxRelocate (void **nmutxInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
tuint | nmutxProcess (void *nmutxInst, ISPHENC1_FrameType *frameType, tbool vadAlertFlag, linSample *inSamples, tint *outCwsegSize, tword *outCwseg)
NMU Tx Processing.
void | nmutxControl (void *nmutxInst, ifnmutxConfig_t *cfg)
Control API.
tbool | nmutxIsAlgSupported (tuint mode)
API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).
void | nmutxGetStats (void *nmutxInst, tbool reset, nmutxStats_t *stats)
API to query statistics.

Defines

#define | nmutx_W1 nmutx_WARN_NEW_BAD_NOISE_MODE_CFG, "New/algInit: Bad Noise Mode Config"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | nmutx_W2 nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open/algInit: Noise Mode Config rejected"
#define | nmutx_W3 nmutx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open/algInit: Bad Noise Mode Config"
#define | nmutx_W4 nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open/algInit: Bad Frame Size Config"
#define | nmutx_W5 nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open/algInit: Bad Level Format Config"
#define | nmutx_W6 nmutx_WARN_OPN_LP_ORDER_REJECTED, "Open/algInit: LP order Rejected"
#define | nmutx_W7 nmutx_WARN_OPN_BAD_LP_ORDER, "Open/algInit: Bad LP order Config"
#define | nmutx_W8 nmutx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"
#define | nmutx_W9 nmutx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order"
#define | nmutx_W10 nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
#define | nmutx_E1 nmutx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Typedefs

typedef nmutxStats_s | nmutxStats_t
Statistics reported by NMU Tx.

Define Documentation

#define nmutx_W1 nmutx_WARN_NEW_BAD_NOISE_MODE_CFG, "New/algInit: Bad Noise Mode Config"

Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.

Definition at line 68 of file nmutx.h.

#define nmutx_W2 nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open/algInit: Noise Mode Config rejected"

Definition at line 69 of file nmutx.h.

#define nmutx_W3 nmutx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open/algInit: Bad Noise Mode Config"

Definition at line 70 of file nmutx.h.

#define nmutx_W4 nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open/algInit: Bad Frame Size Config"

Definition at line 71 of file nmutx.h.

#define nmutx_W5 nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open/algInit: Bad Level Format Config"

Definition at line 72 of file nmutx.h.

#define nmutx_W6 nmutx_WARN_OPN_LP_ORDER_REJECTED, "Open/algInit: LP order Rejected"

Definition at line 73 of file nmutx.h.

#define nmutx_W7 nmutx_WARN_OPN_BAD_LP_ORDER, "Open/algInit: Bad LP order Config"

Definition at line 74 of file nmutx.h.

#define nmutx_W8 nmutx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"

Definition at line 75 of file nmutx.h.

#define nmutx_W9 nmutx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order"

Definition at line 76 of file nmutx.h.

#define nmutx_W10 nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"

Definition at line 77 of file nmutx.h.

#define nmutx_E1 nmutx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"

Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Definition at line 96 of file nmutx.h.

Typedef Documentation

typedef struct nmutxStats_s nmutxStats_t

Statistics reported by NMU Tx.

Remarks:
nmutxGetStats API is presently available for ECO API only, not for XDAIS

Function Documentation

tint nmutxGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | nmutxSizeConfig_t * | cfg
 | ) |  |

tint nmutxNew | ( | void ** | nmutxInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | nmutxNewConfig_t * | cfg
 | ) |  |

void nmutxDelete ( void ** nmutxInst )

tint nmutxOpen | ( | void * | nmutxInst,
 |  | nmutxOpenConfig_t * | cfg
 | ) |  |

void nmutxClose ( void * nmutxInst )

tint nmutxRelocate | ( | void ** | nmutxInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | tuint * | relocBufBitMaskPtr
 | ) |  |

tuint nmutxProcess | ( | void * | nmutxInst,
 |  | ISPHENC1_FrameType * | frameType,
 |  | tbool | vadAlertFlag,
 |  | linSample * | inSamples,
 |  | tint * | outCwsegSize,
 |  | tword * | outCwseg
 | ) |  |

NMU Tx Processing.

Parameters:
[in] | nmutxInst | Algorithm instance handle
[in,out] | frameType | Input: frame type which is either ISPHENC1_FTYPE_SPEECH or ISPHENC1_FTYPE_NODATA basically it is voice activity detector's (VAD) decision. Output: one of ISPHENC1_FTYPE_SPEECH, ISPHENC1_FTYPE_NODATA (when there is no SID packet required to be sent) or ISPHENC1_FTYPE_SIDFRAME when SID packet is to be sent.
[in] | vadAlertFlag | Early no-voice (no-data) indication from upstream VAD module to start early estimate of noise character.
[in] | inSamples | Input speech samples
[out] | outCwsegSize | Pointer to output codeword segment size i.e size of packet payload for SID in bits. Note this output is undefined when no SID is indicated i.e when output frameType is not ISPHENC1_FTYPE_SIDFRAME
[out] | outCwseg | Pointer to output codeword segment i.e. packet payload of SID, stored packed in MAU (minimum addressable unit). Because SID is in bytes, if MAU is 1 byte, it is matched format so there is no ambiguity but if MAU is 2 bytes (such as for 55x, 54x), the payload is packed as cwseg[0] = [byte[0],byte[1]], cwseg[1] = [byte[2],byte[3]] and so on. Note this output is undefined when no SID is indicated i.e when output frameType is not ISPHENC1_FTYPE_SIDFRAME
Return values:
sidallowed Returns 0 if SID packet is determined by nmutx to be generated but not allowed (blocked) by isSidAllowed API configured call-back function or when input frame is voice, otherwise returns 1 i.e for non-sid noise or sid generated and allowed by isSidAllowed call-back API

void nmutxControl | ( | void * | nmutxInst,
 |  | ifnmutxConfig_t * | cfg
 | ) |  |

Control API.

Parameters:
[in] | nmutxInst | Algorithm instance handle.
[in] | cfg | Pointer to nmutx configuration structure defined in ifnmu external interface (ifnmutx.h)
Remarks:
nmutxControl() Allows run-time configuration of parameters specified in the ifnmu external interface.

tbool nmutxIsAlgSupported ( tuint mode )

API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).

Parameters:
[in] mode One of the possible noise_mode values as specified in ifnmu external interface (ifnmutx.h)
Return values:
ret TRUE if mode requested is supported in the image, FALSE otherwise

void nmutxGetStats | ( | void * | nmutxInst,
 |  | tbool | reset,
 |  | nmutxStats_t * | stats
 | ) |  |

API to query statistics.

Parameters:
[in] | nmutxInst | Algorithm instance handle
[in] | reset | If TRUE, stats are requested to be reset after they are output.
[out] | stats | Pointer to nmutxStats_t containing nmutx statistics.
Return values:
ret TRUE if mode requested is supported in the image, FALSE otherwise

Variable Documentation

nmutxXdaisCallTable_t nmutxXdaisCallTable


NMU: NMU RX Error Codes

NMU RX Error Codes
[NMURX]

Collaboration diagram for NMU RX Error Codes:

Detailed Description

Defines

#define | nmurx_NOMEMORY (-1)
#define | nmurx_NOERR 0
#define | nmurx_ERROR 1

Define Documentation

#define nmurx_NOMEMORY (-1)

Reserved for future use

Definition at line 95 of file nmurx.h.

#define nmurx_NOERR 0

API returned with no error

Definition at line 96 of file nmurx.h.

#define nmurx_ERROR 1

API returned with some error

Definition at line 97 of file nmurx.h.


NMU: NMU RX Exception Codes

NMU RX Exception Codes
[NMURX]

Collaboration diagram for NMU RX Exception Codes:

Detailed Description

Exception Messages.

Remarks:
These are mostly fatal, usually due to memory corruption, traps based on these help debugging.

Enumerations

enum { nmurx_EXC_INVALID_MODE = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
nmurx_EXC_INVALID_MODE Invalid NMU Rx type at processing time i.e in nmuRxProcess/process(XDAIS) API

Definition at line 82 of file nmurx.h.


NMU: NMU RX Warning Codes

NMU RX Warning Codes
[NMURX]

Collaboration diagram for NMU RX Warning Codes:

Detailed Description

NMU Rx Warning Messages.

Enumerations

enum {
nmurx_WARN_NEW_BAD_NOISE_MODE_CFG = 1, nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED = 2, nmurx_WARN_OPN_BAD_NOISE_MODE_CFG = 3, nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG = 4,
nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG = 5, nmurx_WARN_OPN_BAD_LP_ORDER = 6, nmurx_WARN_OPN_LP_ORDER_REJECTED = 7, nmurx_WARN_CTL_BAD_LP_ORDER = 8,
nmurx_WARN_CTL_LP_ORDER_REJECTED = 9, nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED = 10, nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED = 11
}

Enumeration Type Documentation

anonymous enum

Enumerator:
nmurx_WARN_NEW_BAD_NOISE_MODE_CFG | New/Init: Invalid noise mode
nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED | New/Init: noise mode config may be valid value but rejected due to not being allowed at the time of configuration
nmurx_WARN_OPN_BAD_NOISE_MODE_CFG | Open/Init: invalid noise mode
nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG | Open/Init: invalid frame size
nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG | Open/Init: invalid level format
nmurx_WARN_OPN_BAD_LP_ORDER
nmurx_WARN_OPN_LP_ORDER_REJECTED | Open/Init: LP order may be valid value but rejected due to not being allowed to be configured at the time of configuration
nmurx_WARN_CTL_BAD_LP_ORDER | Control: Invalid LP order i.e out of range
nmurx_WARN_CTL_LP_ORDER_REJECTED | Control: LP order may be valid value but rejected due to not being allowed to be configured at the time of configuration
nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED | Control: Noise mode may be valid but rejected due to not being allowed at the time e.g. because of a different selection during New/Open/Init that does not have sufficient memory resources to support the requested one
nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED | Control: Invalid idle noise level

Definition at line 31 of file nmurx.h.


NMU: NMU TX Error Codes

NMU TX Error Codes
[NMUTX]

Collaboration diagram for NMU TX Error Codes:

Detailed Description

Defines

#define | nmutx_NOMEMORY (-1)
#define | nmutx_NOERR 0
#define | nmutx_ERROR 1

Define Documentation

#define nmutx_NOMEMORY (-1)

Reserved for future use

Definition at line 101 of file nmutx.h.

#define nmutx_NOERR 0

API returned with no error

Definition at line 102 of file nmutx.h.

#define nmutx_ERROR 1

API returned with some error

Definition at line 103 of file nmutx.h.


NMU: NMU TX Exception Codes

NMU TX Exception Codes
[NMUTX]

Collaboration diagram for NMU TX Exception Codes:

Detailed Description

Exception Messages.

Remarks:
These are mostly fatal, usually due to memory corruption, traps based on these help debugging.

Enumerations

enum { nmutx_EXC_INVALID_MODE = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
nmutx_EXC_INVALID_MODE Invalid NMU Tx type at processing time i.e in nmuTxProcess/process(XDAIS) API

Definition at line 88 of file nmutx.h.


NMU: NMU RX Warning Codes

NMU RX Warning Codes
[NMUTX]

Collaboration diagram for NMU RX Warning Codes:

Detailed Description

NMU Tx Warning Messages.

Enumerations

enum {
nmutx_WARN_NEW_BAD_NOISE_MODE_CFG = 1, nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED = 2, nmutx_WARN_OPN_BAD_NOISE_MODE_CFG = 3, nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG = 4,
nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG = 5, nmutx_WARN_OPN_BAD_LP_ORDER = 6, nmutx_WARN_OPN_LP_ORDER_REJECTED = 7, nmutx_WARN_CTL_BAD_LP_ORDER = 8,
nmutx_WARN_CTL_LP_ORDER_REJECTED = 9, nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED = 10
}

Enumeration Type Documentation

anonymous enum

Enumerator:
nmutx_WARN_NEW_BAD_NOISE_MODE_CFG | New/Init: Invalid noise mode
nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED | New/Init: noise mode config may be valid value but rejected due to not being allowed at the time of configuration
nmutx_WARN_OPN_BAD_NOISE_MODE_CFG | Open/Init: invalid noise mode
nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG | Open/Init: invalid frame size
nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG | Open/Init: invalid level format
nmutx_WARN_OPN_BAD_LP_ORDER | Open/Init: invalid LP order i.e. out of range
nmutx_WARN_OPN_LP_ORDER_REJECTED | Open/Init: LP order may be valid value but rejected due to not being allowed to be configured at the time of configuration
nmutx_WARN_CTL_BAD_LP_ORDER | Control: Invalid LP order i.e out of range
nmutx_WARN_CTL_LP_ORDER_REJECTED | Control: LP order may be valid value but rejected due to not being allowed to be configured at the time of configuration
nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED | Control: Noise mode may be valid but rejected due to not being allowed at the time e.g. because of a different selection during New/Open/Init that does not have sufficient memory resources to support the requested one.

Definition at line 30 of file nmutx.h.


NMU: NMU (Noise Matching Unit) Package

NMU (Noise Matching Unit) Package

Release 1.4.2.0

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The purpose of noise matching is to improve the speech quality during discontinuous transmission (DTX). Due to the presence of background noise, the absence of noise transmission can cause audible artifacts in the speech output at the receiving side (RX) during transitions between voice (in which background noise is present) and noise.

Additional links: Detailed NMU Description

Integration

The NMU component can be integrated into a system to perform voice activity detection as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the NMU code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | NMU External API
 | NMU Integration

Default Configuration

NMU configuration is defined in the external ifnmu interface (ifnmutx.h and ifnmurx.h)

NMU Tx Configuration

  1. None. This is no tracking of noise character during noise periods. Noise payload is generated only when voice to noise transition occurs with a fixed level in the payload of -70 dBm.
  2. Level. This is level matching i.e. level is tracked during noise periods.
  3. G.711 Appendix II. This is spectral matching.
  4. LP (Linear Prediction) order from 0 to 10

NMU Rx Configuration

  1. Fixed. This is NMURX generating fixed level as per configuration.
  2. Level adaptive. This is level matching.
  3. G.711 Appendix II. This is spectral matching.
  4. LP order from 0 to 10.
  5. Idle noise level. This is the fixed level corresponding to selection of Fixed Level CNG. It is also used for Level (only) Matching above by the receiver to generate this level of noise until it gets the first packet payload from the transmitter and it is asked to generate noise (this is typical of a situation when a call is established).

Interoperability between different configurations of TX and RX

Any configuration on TX is interoperable with any configuration on RX. The behavior for a particular combination of TX configuration with RX configuration can be determined by referring to Detailed NMU Description. For example, if NMUTX is configured as G.711 Appendix II with LP order 5 and NMURX is configured to be level adaptive, the NMUTX will send payloads with level and 5 spectral parameters and when NMURX receives this payload, it will only use the level information to generate pink noise of that level and ignore all the spectral parameters.

Performance

Performance measures for the NMU modules are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

N/A

Standards Compliance

Fixed Level

N/A

Level Matching

  • RFC3389 Real-time Transport Protocol for Comfort Noise

Spectrum Matching

  • Spectral matching CNG is compliant with G.711 Appendix II.
  • RFC3389 Real-time Transport Protocol for Comfort Noise

Dependent Packages

The NMU package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

NMU Required Packages
Package | File Name | Compatibility Key
ti.mas.nmu | ti_mas_nmu_<fmt>_c<rtarg>_1_4_1_0.zip | [4,4,0,0]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]
ti.mas.iface.ifnmu | ti_mas_iface_ifnmu_<fmt>_c<rtarg>_1_2_0_0.zip | [3,0,0,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


NMU: NMU Integration

NMU (Noise Matching Unit) Package

NMU Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking NMU with System
  • Initialization Structures

XDC Build Process

Required Tools

The following tools are required to build the NMU component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.00.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the NMU package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in NMU Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the NMU using the XDC tools, change to the NMU directory and proceed.

With the environment configured, XDC may be eployed to build the NMU and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the NMU packages. The first two commands provide a means to clean and build the NMU package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the NMU and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., NMU).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated NMU build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the NMU for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the NMU as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated NMU build files as in (1) above
    • Removes all generated build files for all NMU dependent packages

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking NMU with System

The NMU and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /nmu
               /types
               /util
               /iface/ifnmu

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the NMU API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/nmu/nmurx.h>
  3. #include <ti/mas/nmu/nmutx.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., nmurx.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\nmu\c<rtarg>\nmu_c.a<rtarg>
  4. ti\mas\nmu\c<rtarg>\nmu_a.a<rtarg>

Initialization Structures

N/A.


NMU: Memory Requirements

NMU (Noise Matching Unit) Package

Memory Requirements

Page Contents

  1. Assumptions
  2. C55x Target
    • C55x NMU Data Memory Requirements
    • C55x NMU Program Memory Requirements
  3. C64x/C64x+ Target
    • C64x/C64x+ NMU Data Memory Requirements
    • C64x NMU Program Memory Requirements
    • C64x+ NMU Program Memory Requirements

Assumptions

The data memory numbers provided here were gathered for the NMU configured with the default unit test configuration. To view the defaults, load the desired image and observe the "config" structure.

C55x Target

C55x NMU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  |  |  | Scratch/Dedicated
 |  | NMURX |  | NMUTX
 |  | XDAIS | ECO | XDAIS | ECO
0 | 4 | 68 | 24 | 112 | 68 | Dedicated
1 | 4 | 62 | 62 | 520 | 520 | Dedicated
2 | 4 | 588 | 588 | 588 | 588 | Scratch
3 | 4 | 400 | 400 | 400 | 400 | Scratch

Notes:
  1. There is no size configuration for XDAIS, so data above is for worst case (16 KHz)
  2. Size configuration for ECO is for default of 8 KHz

Additional Data Memory
Category/Structure | Requirement (Bytes)
 | XDAIS | ECO
Tables | 468 | 468
data/bss | 372 | 192

Caution: The following should not be placed in external memory otherwise there maybe unexpected results or even crashes.
  1. Buffer ID 3 of NMUTX
  2. Buffer ID 3 of NMURX
  3. Tables (.const section) of g711a2Tables.o55L object

C55x NMU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 7.58 | 6.82 | Core NMU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x/C64x+ Target

C64x/C64x+ NMU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  |  |  | Scratch/Dedicated
 |  | NMURX |  | NMUTX
 |  | XDAIS | ECO | XDAIS | ECO
0 | 8 | 68 | 24 | 112 | 68 | Dedicated
1 | 8 | 62 | 62 | 520 | 520 | Dedicated
2 | 8 | 988 | 988 | 988 | 988 | Scratch

Notes:
  1. There is no size configuration for XDAIS, so data above is for worst case (16 KHz)
  2. Size configuration for ECO is for default of 8 KHz

Additional Data Memory
Category/Structure | Requirement (Bytes)
 | XDAIS | ECO
Tables | 472 | 472
data/bss | 356 | 172

C64x NMU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 22.94 | 21.69 | Core NMU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x+ NMU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 17.81 | 16.00 | Core NMU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.


NMU: MIPS Requirements

NMU (Noise Matching Unit) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x/C64x+ Targets

Assumptions

The MIPS numbers are per execution of the unit test images using the memory mapping indicated in each respective .map files. The following assumptions also apply:

  1. Cache flushed every frame (where applicable)
  2. XDAIS interface used (ECO numbers expected to be slightly lower)
  3. Speech input from in.raw file

Notes:
  1. In the MIPS tables we use the terminology Mega-Cycles Per Second (MCPS) since several instructions can occur in parallel per cycle.

C55x Target

Profiling was performed using a 5510 EVM with volatile buffers (scratch) in DARAM block, tables/bss in SARAM block, and channelized buffers in separate SARAM block. Program is in external memory with I-cache flushed every processing frame. See .map file for more details. Cycles information for every frame can be found in file test\logs\cycles.txt generated by running the image.

Further details regarding the external SDRAM :

  1. 32-bits wide
  2. Clocked at 1/2 speed (100 MHz) of CPU (200 MHz)

NMU MIPS - C55x
Image Name | NMUTX |  | NMURX
 | Peak (MCPS) | Average (MCPS) | Peak (MCPS) | Average (MCPS)
test_rel_C5510 | 1.33 | 0.43 | 0.56 | 0.18

C64x/C64x+ Targets

Profiling was performed on cycle accurate simulators of DM6446 (64x+) and C6455 (64x+) as well as C6416 EVM. For placement, refer to individual .map files. Cycles information for every frame can be found in file test\logs\cycles.txt generated by running each image.

NMU MIPS - C64x/C64x+
Image Name | NMUTX |  | NMURX
 | Peak (MCPS) | Average (MCPS) | Peak (MCPS) | Average (MCPS)
test_rel_DM6446 | 2.86 | 1.11 | 1.15 | 0.54
test_rel_C6455 | 1.14 | 0.37 | 0.36 | 0.10
test_rel_C6416le | 1.16 | 0.35 | 0.39 | 0.10


NMU: Module Index

NMU Modules

Here is a list of all modules:
  • NMURX
    • NMU RX Warning Codes
    • NMU RX Exception Codes
    • NMU RX Error Codes
  • NMUTX
    • NMU RX Warning Codes
    • NMU TX Exception Codes
    • NMU TX Error Codes


NMU: nmurx.h File Reference

  • File List
  • Globals

nmurx.h File Reference

Detailed Description

Contains definitions and external APIs for NMU Rx.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file nmurx.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/iface/ifnmu/ifnmurx.h>
#include <ti/xdais/dm/isphdec1.h>

Include dependency graph for nmurx.h:

Go to the source code of this file.

Data Structures

struct | nmurxSizeConfig_t
Size query time configuration parameters. More...
struct | nmurxNewConfig_t
Create time configuration parameters. More...
struct | nmurxOpenConfig_t
Open time configuration parameters. More...
struct | nmurxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmurxXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | nmurxXdaisCallTable_t
NMU Rx's XDAIS call table definition. More...

Defines

#define | nmurx_G711A2_MAX_LP_ORDER 10
#define | nmurx_W1 nmurx_WARN_NEW_BAD_NOISE_MODE_CFG, "New: Bad Noise Mode Config"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open: Noise Mode Config rejected"
#define | nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open: Bad Noise Mode Config"
#define | nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open: Bad Frame Size Config"
#define | nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open: Bad Level Format Config"
#define | nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER, "Open: Bad LP order Config"
#define | nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED, "Open: LP order Rejected"
#define | nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"
#define | nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order Config"
#define | nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
#define | nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"
#define | nmurx_E1 nmurx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.
#define | nmurx_NOMEMORY (-1)
#define | nmurx_NOERR 0
#define | nmurx_ERROR 1
#define | nmurx_LEVEL_FORMAT_dBov 0
#define | nmurx_LEVEL_FORMAT_dBm 1

Enumerations

enum {
nmurx_WARN_NEW_BAD_NOISE_MODE_CFG = 1, nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED = 2, nmurx_WARN_OPN_BAD_NOISE_MODE_CFG = 3, nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG = 4,
nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG = 5, nmurx_WARN_OPN_BAD_LP_ORDER = 6, nmurx_WARN_OPN_LP_ORDER_REJECTED = 7, nmurx_WARN_CTL_BAD_LP_ORDER = 8,
nmurx_WARN_CTL_LP_ORDER_REJECTED = 9, nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED = 10, nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED = 11
}
enum | { nmurx_EXC_INVALID_MODE = 1 }

Functions

ECO (Telogy Embedded Communication Object) APIs
Remarks:
new, delete, getSizes, Open, Close and relocate are standard ECO APIs so are not described here in detail. Return codes may be one of nmurx_ERROR or nmurx_NOERR.

tint | nmurxNew (void **nmurxInst, tint nbufs, ecomemBuffer_t *bufs, nmurxNewConfig_t *cfg)
void | nmurxDelete (void **nmurxInst)
tint | nmurxGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, nmurxSizeConfig_t *cfg)
tint | nmurxOpen (void *nmurxInst, nmurxOpenConfig_t *cfg)
void | nmurxClose (void *nmurxInst)
tint | nmurxRelocate (void **nmurxInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
void | nmurxProcess (void *nmurxInst, ISPHDEC1_FrameType frameType, tint inCwsegSize, tword *inCwseg, linSample *samples)
NMU Rx Processing.
void | nmurxControl (void *nmurxInst, ifnmurxConfig_t *cfg)
Control API.
tbool | nmurxIsAlgSupported (tuint mode)
API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).

Variables

XDAIS APIs

nmurxXdaisCallTable_t nmurxXdaisCallTable

Define Documentation

#define nmurx_LEVEL_FORMAT_dBov 0

level_format: This (dB relative to system overload) format is used for RTP and Appendix II specifies this format also

Definition at line 133 of file nmurx.h.

#define nmurx_LEVEL_FORMAT_dBm 1

Definition at line 136 of file nmurx.h.


NMU: nmurx.h Source File

  • File List
  • Globals

nmurx.h

Go to the documentation of this file.
00001 #ifndef _NMURX_H
00002 #define _NMURX_H
00003
00014 /* @{ */
00015
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/util/ecomem.h>
00018 #include <ti/mas/util/debug.h>
00019 #include <ti/mas/iface/ifnmu/ifnmurx.h>
00020 #include <ti/xdais/dm/isphdec1.h>
00021
00022 /* limits of config params */
00023 #define nmurx_G711A2_MAX_LP_ORDER   10
00024
00030 /* @{ */
00031 enum {
00032   nmurx_WARN_NEW_BAD_NOISE_MODE_CFG       = 1,
00033   nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED  = 2,
00037   nmurx_WARN_OPN_BAD_NOISE_MODE_CFG       = 3,
00038   nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG       = 4,
00039   nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG       = 5,
00040   nmurx_WARN_OPN_BAD_LP_ORDER             = 6,
00041   nmurx_WARN_OPN_LP_ORDER_REJECTED        = 7,
00044   nmurx_WARN_CTL_BAD_LP_ORDER             = 8,
00045   nmurx_WARN_CTL_LP_ORDER_REJECTED        = 9,
00048   nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED  = 10,
00054   nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED = 11
00055 };
00056 /* @} */
00057
00061 #define nmurx_W1 nmurx_WARN_NEW_BAD_NOISE_MODE_CFG,       "New: Bad Noise Mode Config"
00062 #define nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED,  "Open: Noise Mode Config rejected"
00063 #define nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG,       "Open: Bad Noise Mode Config"
00064 #define nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG,       "Open: Bad Frame Size Config"
00065 #define nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG,       "Open: Bad Level Format Config"
00066 #define nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER,             "Open: Bad LP order Config"
00067 #define nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED,        "Open: LP order Rejected"
00068 #define nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED,        "Control: LP order Rejected"
00069 #define nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER,             "Control: Bad LP order Config"
00070 #define nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
00071 #define nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"
00072
00081 /* @{ */
00082 enum {
00083   nmurx_EXC_INVALID_MODE = 1
00084 };
00085 /* @} */
00086
00090 #define nmurx_E1 nmurx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
00091
00094 /* @{ */
00095 #define nmurx_NOMEMORY  (-1)
00096 #define nmurx_NOERR       0
00097 #define nmurx_ERROR       1
00098 /* @} */
00099
00107 typedef struct {
00108   ifnmurxConfig_t config;
00109 } nmurxSizeConfig_t;
00110
00116 typedef struct {
00117   tuint     ID;
00118   dbgInfo_t debugInfo;
00119   nmurxSizeConfig_t sizeCfg;
00120 } nmurxNewConfig_t;
00121
00128 typedef struct {
00129   tuint     frame_size;
00133 #define nmurx_LEVEL_FORMAT_dBov 0
00136 #define nmurx_LEVEL_FORMAT_dBm  1       /* This format is dBm, used for AAL2 */
00137   tuint     level_format;
00139   ifnmurxConfig_t config;
00140 } nmurxOpenConfig_t;
00141
00147 /* @{ */
00148 tint      nmurxNew(void **nmurxInst, tint nbufs, ecomemBuffer_t * bufs,
00149                    nmurxNewConfig_t * cfg);
00150 void      nmurxDelete(void **nmurxInst);
00151 tint      nmurxGetSizes(tint * nbufs, const ecomemBuffer_t ** bufs,
00152                         nmurxSizeConfig_t * cfg);
00153 tint      nmurxOpen(void *nmurxInst, nmurxOpenConfig_t * cfg);
00154 void      nmurxClose(void *nmurxInst);
00155 tint      nmurxRelocate(void **nmurxInst, tint nbufs, ecomemBuffer_t * bufs,
00156                         tuint * relocBufBitMaskPtr);
00157
00179 void      nmurxProcess(void *nmurxInst, ISPHDEC1_FrameType frameType, tint inCwsegSize,
00180                        tword *inCwseg, linSample *samples);
00181
00191 void      nmurxControl(void *nmurxInst, ifnmurxConfig_t * cfg);
00192
00199 tbool     nmurxIsAlgSupported(tuint mode);
00200 /* @} */
00201
00225 /* @{ */
00226 typedef struct {
00227   IALG_Params param;
00228   nmurxSizeConfig_t cfg;
00229 } nmurxXdaisAllocParams_t;
00230
00270 typedef struct {
00271   IALG_Params param;
00272   nmurxNewConfig_t  cfgNew;
00273   nmurxOpenConfig_t cfgOpen;
00274 } nmurxXdaisInitParams_t;
00275
00279 typedef struct {
00280     IALG_Fxns   ialg;
00286     void  (*process) (IALG_Handle handle, ISPHDEC1_FrameType frameType, tint inCwsegSize,
00287                        tword *inCwseg, linSample *outSamples);
00288
00293     void (*control)(IALG_Handle handle, ifnmurxConfig_t * cfg);
00294 } nmurxXdaisCallTable_t;
00295
00296 extern nmurxXdaisCallTable_t nmurxXdaisCallTable;
00297
00298 /* @} */ /* @name XDAIS APIs */
00299 /* @} */ /* ingroup */
00300
00301 #endif                          /* _NMURX_H */
00302 /* nothing past this point */


NMU: nmutx.h File Reference

  • File List
  • Globals

nmutx.h File Reference

Detailed Description

Contains definitions and external APIs for the NMU Tx.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file nmutx.h.

#include <ti/xdais/xdas.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/iface/ifnmu/ifnmutx.h>
#include <ti/xdais/dm/isphenc1.h>

Include dependency graph for nmutx.h:

Go to the source code of this file.

Data Structures

struct | nmutxSizeConfig_t
Size query time configuration parameters. More...
struct | nmutxNewConfig_t
Create time configuration parameters. More...
struct | nmutxOpenConfig_t
Open time configuration parameters. More...
struct | nmutxStats_s
Statistics reported by NMU Tx. More...
struct | nmutxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmutxXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | nmutxXdaisCallTable_t
NMU Tx's XDAIS call table definition. More...

Defines

#define | nmutx_W1 nmutx_WARN_NEW_BAD_NOISE_MODE_CFG, "New/algInit: Bad Noise Mode Config"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | nmutx_W2 nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open/algInit: Noise Mode Config rejected"
#define | nmutx_W3 nmutx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open/algInit: Bad Noise Mode Config"
#define | nmutx_W4 nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open/algInit: Bad Frame Size Config"
#define | nmutx_W5 nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open/algInit: Bad Level Format Config"
#define | nmutx_W6 nmutx_WARN_OPN_LP_ORDER_REJECTED, "Open/algInit: LP order Rejected"
#define | nmutx_W7 nmutx_WARN_OPN_BAD_LP_ORDER, "Open/algInit: Bad LP order Config"
#define | nmutx_W8 nmutx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"
#define | nmutx_W9 nmutx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order"
#define | nmutx_W10 nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
#define | nmutx_E1 nmutx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.
#define | nmutx_NOMEMORY (-1)
#define | nmutx_NOERR 0
#define | nmutx_ERROR 1
#define | nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS 80
#define | nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS 160
#define | nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS 240
#define | nmutx_LEVEL_FORMAT_dBov 0
#define | nmutx_LEVEL_FORMAT_dBm 1

Typedefs

typedef nmutxStats_s | nmutxStats_t
Statistics reported by NMU Tx.

Enumerations

enum {
nmutx_WARN_NEW_BAD_NOISE_MODE_CFG = 1, nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED = 2, nmutx_WARN_OPN_BAD_NOISE_MODE_CFG = 3, nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG = 4,
nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG = 5, nmutx_WARN_OPN_BAD_LP_ORDER = 6, nmutx_WARN_OPN_LP_ORDER_REJECTED = 7, nmutx_WARN_CTL_BAD_LP_ORDER = 8,
nmutx_WARN_CTL_LP_ORDER_REJECTED = 9, nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED = 10
}
enum | { nmutx_EXC_INVALID_MODE = 1 }

Functions

ECO (Telogy Embedded Communication Object) APIs
Remarks:
new, delete, getSizes, Open and Close are standard ECO APIs so are not described here in detail. Return codes may be one of nmutx_ERROR or nmutx_NOERR.

tint | nmutxGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, nmutxSizeConfig_t *cfg)
tint | nmutxNew (void **nmutxInst, tint nbufs, ecomemBuffer_t *bufs, nmutxNewConfig_t *cfg)
void | nmutxDelete (void **nmutxInst)
tint | nmutxOpen (void *nmutxInst, nmutxOpenConfig_t *cfg)
void | nmutxClose (void *nmutxInst)
tint | nmutxRelocate (void **nmutxInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
tuint | nmutxProcess (void *nmutxInst, ISPHENC1_FrameType *frameType, tbool vadAlertFlag, linSample *inSamples, tint *outCwsegSize, tword *outCwseg)
NMU Tx Processing.
void | nmutxControl (void *nmutxInst, ifnmutxConfig_t *cfg)
Control API.
tbool | nmutxIsAlgSupported (tuint mode)
API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).
void | nmutxGetStats (void *nmutxInst, tbool reset, nmutxStats_t *stats)
API to query statistics.

Variables

XDAIS APIs

nmutxXdaisCallTable_t nmutxXdaisCallTable

Define Documentation

#define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS 80

10 ms processing

Definition at line 126 of file nmutx.h.

#define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS 160

20 ms processing

Definition at line 127 of file nmutx.h.

#define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS 240

30 ms processing

Definition at line 128 of file nmutx.h.

#define nmutx_LEVEL_FORMAT_dBov 0

level_format: This (dB relative to system overload) format is used for RTP and Appendix II specifies this format also

Definition at line 166 of file nmutx.h.

#define nmutx_LEVEL_FORMAT_dBm 1

level_format: This format is dBm, used for AAL2

Definition at line 169 of file nmutx.h.


NMU: nmutx.h Source File

  • File List
  • Globals

nmutx.h

Go to the documentation of this file.
00001 #ifndef _NMUTX_H
00002 #define _NMUTX_H
00003
00014 /* @{ */
00015
00016 #include <ti/xdais/xdas.h>
00017 #include <ti/xdais/ialg.h>
00018 #include <ti/mas/types/types.h>
00019 #include <ti/mas/util/ecomem.h>
00020 #include <ti/mas/util/debug.h>
00021 #include <ti/mas/iface/ifnmu/ifnmutx.h>
00022 #include <ti/xdais/dm/isphenc1.h>
00023
00029 /* @{ */
00030 enum {
00031   nmutx_WARN_NEW_BAD_NOISE_MODE_CFG = 1,
00032   nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED = 2,
00036   nmutx_WARN_OPN_BAD_NOISE_MODE_CFG = 3,
00037   nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG = 4,
00038   nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG = 5,
00039   nmutx_WARN_OPN_BAD_LP_ORDER = 6,
00040   nmutx_WARN_OPN_LP_ORDER_REJECTED = 7,
00045   nmutx_WARN_CTL_BAD_LP_ORDER = 8,
00046   nmutx_WARN_CTL_LP_ORDER_REJECTED = 9,
00050   nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED = 10
00062 };
00063 /* @} */
00064
00068 #define nmutx_W1 nmutx_WARN_NEW_BAD_NOISE_MODE_CFG,      "New/algInit: Bad Noise Mode Config"
00069 #define nmutx_W2 nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open/algInit: Noise Mode Config rejected"
00070 #define nmutx_W3 nmutx_WARN_OPN_BAD_NOISE_MODE_CFG,      "Open/algInit: Bad Noise Mode Config"
00071 #define nmutx_W4 nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG,      "Open/algInit: Bad Frame Size Config"
00072 #define nmutx_W5 nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG,      "Open/algInit: Bad Level Format Config"
00073 #define nmutx_W6 nmutx_WARN_OPN_LP_ORDER_REJECTED,       "Open/algInit: LP order Rejected"
00074 #define nmutx_W7 nmutx_WARN_OPN_BAD_LP_ORDER,            "Open/algInit: Bad LP order Config"
00075 #define nmutx_W8 nmutx_WARN_CTL_LP_ORDER_REJECTED,       "Control: LP order Rejected"
00076 #define nmutx_W9 nmutx_WARN_CTL_BAD_LP_ORDER,            "Control: Bad LP order"
00077 #define nmutx_W10 nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
00078
00087 /* @{ */
00088 enum {
00089   nmutx_EXC_INVALID_MODE = 1
00090 };
00091 /* @} */
00092
00096 #define nmutx_E1 nmutx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
00097
00100 /* @{ */
00101 #define nmutx_NOMEMORY  (-1)
00102 #define nmutx_NOERR       0
00103 #define nmutx_ERROR       1
00104 /* @} */
00105
00113 typedef struct {
00114   ifnmutxConfig_t config;
00115 } nmutxSizeConfig_t;
00116
00122 typedef struct {
00123   tuint     ID;
00124   dbgInfo_t debugInfo;
00126 #define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS   80
00127 #define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS  160
00128 #define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS  240
00129   tint      g711a2TxProcessDecimateInterval;
00151   tuint (*isSidAllowed) (tuint ID);
00152
00153   nmutxSizeConfig_t sizeCfg;
00154 } nmutxNewConfig_t;
00155
00162 typedef struct {
00163   tuint     frame_size;
00166 #define nmutx_LEVEL_FORMAT_dBov 0
00169 #define nmutx_LEVEL_FORMAT_dBm  1
00170   tuint     level_format;
00172   ifnmutxConfig_t config;
00173 } nmutxOpenConfig_t;
00174
00178 typedef struct nmutxStats_s {
00179   tint      curr_bg_noise;
00180 } nmutxStats_t;
00181
00187 /* @{ */
00188 tint      nmutxGetSizes(tint * nbufs, const ecomemBuffer_t ** bufs,
00189                         nmutxSizeConfig_t * cfg);
00190 tint      nmutxNew(void **nmutxInst, tint nbufs, ecomemBuffer_t * bufs,
00191                    nmutxNewConfig_t * cfg);
00192 void      nmutxDelete(void **nmutxInst);
00193 tint      nmutxOpen(void *nmutxInst, nmutxOpenConfig_t * cfg);
00194 void      nmutxClose(void *nmutxInst);
00195 tint      nmutxRelocate(void **nmutxInst, tint nbufs, ecomemBuffer_t * bufs,
00196                         tuint * relocBufBitMaskPtr);
00228 tuint     nmutxProcess(void *nmutxInst, ISPHENC1_FrameType *frameType, tbool vadAlertFlag,
00229                        linSample *inSamples, tint *outCwsegSize, tword *outCwseg);
00230
00240 void      nmutxControl(void *nmutxInst, ifnmutxConfig_t * cfg);
00241
00248 tbool     nmutxIsAlgSupported(tuint mode);
00249
00258 void      nmutxGetStats(void *nmutxInst, tbool reset, nmutxStats_t * stats);
00259 /* @} */
00260
00284 /* @ {*/
00285 typedef struct {
00286   IALG_Params param;
00287   nmutxSizeConfig_t cfg;
00288 } nmutxXdaisAllocParams_t;
00289
00329 typedef struct {
00330   IALG_Params param;
00331   nmutxNewConfig_t  cfgNew;
00332   nmutxOpenConfig_t cfgOpen;
00333 } nmutxXdaisInitParams_t;
00334
00338 typedef struct {
00339     IALG_Fxns   ialg;
00345     void  (*process) (IALG_Handle handle, ISPHENC1_FrameType *frameType, tbool vadAlertFlag,
00346                        linSample *inSamples, tint *outCwsegSize, tword *outCwseg);
00347
00352     void (*control)(IALG_Handle handle, ifnmutxConfig_t * cfg);
00353 } nmutxXdaisCallTable_t;
00354
00355 extern nmutxXdaisCallTable_t nmutxXdaisCallTable;
00356 /* @} */ /* @name XDAIS APIs */
00357 /* @} */ /* ingroup */
00358
00359 #endif                          /* _NMUTX_H */
00360 /* nothing past this point */


NMU: Page Index

NMU Related Pages

Here is a list of all related documentation pages:
  • Standard Compliance
  • Disclaimer


NMU: Standard Compliance

Standard Compliance

Fixed Level

N/A

Level Matching

  • RFC3389 Real-time Transport Protocol for Comfort Noise

Spectrum Matching

  • Spectral matching CNG is compliant with G.711 Appendix II.
  • RFC3389 Real-time Transport Protocol for Comfort Noise


NMU: nmurxNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

nmurxNewConfig_t Struct Reference
[NMURX]

#include <nmurx.h>

Collaboration diagram for nmurxNewConfig_t:

[legend]

Detailed Description

Create time configuration parameters.

Remarks:
For eco API nmurxNew and included as part of structure of for XDAIS API algInit alg specific parameters nmurxXdaisInitParams_t

Definition at line 116 of file nmurx.h.

Data Fields

tuint | ID
dbgInfo_t | debugInfo
nmurxSizeConfig_t sizeCfg

Field Documentation

tuint nmurxNewConfig_t::ID

Instance identifier, for call-back identification, XDAIS default is NULL

Definition at line 117 of file nmurx.h.

dbgInfo_t nmurxNewConfig_t::debugInfo

Generic call-back API for debug/exception, XDAIS default is NULL

Definition at line 118 of file nmurx.h.

nmurxSizeConfig_t nmurxNewConfig_t::sizeCfg

Definition at line 119 of file nmurx.h.

The documentation for this struct was generated from the following file:
  • nmurx.h


NMU: nmurxOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

nmurxOpenConfig_t Struct Reference
[NMURX]

#include <nmurx.h>

Detailed Description

Open time configuration parameters.

Remarks:
Used for eco API nmurxOpen and included as part of configuration structure of for XDAIS API algInit nmurxXdaisInitParams_t alg specific parameters

Definition at line 128 of file nmurx.h.

Data Fields

tuint | frame_size
tuint | level_format
ifnmurxConfig_t | config

Field Documentation

tuint nmurxOpenConfig_t::frame_size

Frame Size in samples, minimum 5 ms @ 8 KHz (=40), max 10 ms @ 16 KHz (=160), 16 KHz rate only applicable for level matching, should be multiple of 40.

Definition at line 129 of file nmurx.h.

tuint nmurxOpenConfig_t::level_format

level_format: This format is dBm, used for AAL2

Definition at line 137 of file nmurx.h.

ifnmurxConfig_t nmurxOpenConfig_t::config

Configuration as per ifnmu external interface (ifnmurx.h)

Definition at line 139 of file nmurx.h.

The documentation for this struct was generated from the following file:
  • nmurx.h


NMU: nmurxSizeConfig_t Struct Reference

  • Data Structures
  • Data Fields

nmurxSizeConfig_t Struct Reference
[NMURX]

#include <nmurx.h>

Detailed Description

Size query time configuration parameters.

Remarks:
For eco, this is used by the nmurxGetSizes API and for XDAIS, is used for algAlloc API alg specific parameters nmurxXdaisAllocParams_t and also as substructure it is included as sub-structure in nmurxNewConfig_t which in turn

Definition at line 107 of file nmurx.h.

Data Fields

ifnmurxConfig_t config

Field Documentation

ifnmurxConfig_t nmurxSizeConfig_t::config

Configuration as per ifnmu external interface

Definition at line 108 of file nmurx.h.

The documentation for this struct was generated from the following file:
  • nmurx.h


NMU: nmurxXdaisAllocParams_t Struct Reference

  • Data Structures
  • Data Fields

nmurxXdaisAllocParams_t Struct Reference
[NMURX, NMURX]

#include <nmurx.h>

Collaboration diagram for nmurxXdaisAllocParams_t:

[legend]

Detailed Description

configuration parameters overloading for algAlloc API

Remarks:
Defaults for this structure are as below..
 *
 *  #define ifnmurxConfig_t_default_params \
 *     (ifnmurx_CONFIG_VALID_NOISE_MODE | ifnmurx_CONFIG_VALID_NOISE_LP_ORDER), // valid_params \
 *     ifnmurx_CONFIG_NOISE_MODE_G711A2, // noise_mode  \
 *     ifnmurx_CONFIG_MAX_LP_ORDER,      // LP order  \
 *     0 // idle_noise_level, don't care since we haven't set valid params, will be set to default \
 *          level by algorithm, is not necessary to specify for size configuration
 *	{
 *    sizeof(nmurxXdaisAllocParams_t) // IALG_Params from ialg.h (size field)
 *  },
 *
 *	// nmurxSizeConfig_t
 *  {
 *    // ifnmurxConfig_t, should be worst case size maximizing configuration
 *    { ifnmurxConfig_t_default_params }
 *  }
 *

Definition at line 226 of file nmurx.h.

Data Fields

IALG_Params param
nmurxSizeConfig_t cfg

Field Documentation

IALG_Params nmurxXdaisAllocParams_t::param

Base type as per IALG requirement

Definition at line 227 of file nmurx.h.

nmurxSizeConfig_t nmurxXdaisAllocParams_t::cfg

refer to nmurxSizeConfig_t

Definition at line 228 of file nmurx.h.

The documentation for this struct was generated from the following file:
  • nmurx.h


NMU: nmurxXdaisCallTable_t Struct Reference

  • Data Structures
  • Data Fields

nmurxXdaisCallTable_t Struct Reference
[NMURX]

#include <nmurx.h>

Detailed Description

NMU Rx's XDAIS call table definition.

Definition at line 279 of file nmurx.h.

Data Fields

IALG_Fxns | ialg
void(* | process )(IALG_Handle handle, ISPHDEC1_FrameType frameType, tint inCwsegSize, tword *inCwseg, linSample *outSamples)
processing API
void(* | control )(IALG_Handle handle, ifnmurxConfig_t *cfg)
control API

Field Documentation

IALG_Fxns nmurxXdaisCallTable_t::ialg

Standard IALG functions

Definition at line 280 of file nmurx.h.

void(* nmurxXdaisCallTable_t::process)(IALG_Handle handle, ISPHDEC1_FrameType frameType, tint inCwsegSize, tword *inCwseg, linSample *outSamples)

processing API

Remarks:
Algorithm specific processing API, same definition as ECO API nmurxProcess

void(* nmurxXdaisCallTable_t::control)(IALG_Handle handle, ifnmurxConfig_t *cfg)

control API

Remarks:
Algorithm specific control API, same definition as ECO API nmurxControl

The documentation for this struct was generated from the following file:
  • nmurx.h


NMU: nmurxXdaisInitParams_t Struct Reference

  • Data Structures
  • Data Fields

nmurxXdaisInitParams_t Struct Reference
[NMURX]

#include <nmurx.h>

Collaboration diagram for nmurxXdaisInitParams_t:

[legend]

Detailed Description

configuration parameters overloading for algInit API

Remarks:
Defaults for this structure are as below..
 *
 *	#define ifnmurxConfig_t_default_params \
 * 	   (ifnmurx_CONFIG_VALID_NOISE_MODE | ifnmurx_CONFIG_VALID_NOISE_LP_ORDER), // valid_params \
 * 	   ifnmurx_CONFIG_NOISE_MODE_G711A2, // noise_mode  \
 * 	   ifnmurx_CONFIG_MAX_LP_ORDER,      // LP order  \
 * 	   0 // idle_noise_level, don't care since we haven't set valid params, will be set to default \
 *	        level by algorithm, is not necessary to specify for size configuration
 *
 * 	{
 * 	sizeof(nmurxXdaisInitParams_t) // IALG_Params from ialg.h (size field)
 *	},
 *
 * 	// nmurxNewConfig_t
 * 	{
 * 	  0, // ID
 * 	  NULL, // debug Info
 *
 * 	  // sizeConfig_t
 * 	  {
 * 	    // ifnmurxConfig_t
 * 	    {	ifnmurxConfig_t_default_params }
 * 	  }
 * 	},
 *
 * 	// nmurxOpenConfig_t
 * 	{
 * 	  80,  // frame size
 * 	  nmurx_LEVEL_FORMAT_dBov,
 *
 *	  // ifnmurxConfig_t
 * 	  { ifnmurxConfig_t_default_params }
 * 	}
 *

Definition at line 270 of file nmurx.h.

Data Fields

IALG_Params param
nmurxNewConfig_t cfgNew
nmurxOpenConfig_t cfgOpen

Field Documentation

IALG_Params nmurxXdaisInitParams_t::param

Base type as per IALG requirement

Definition at line 271 of file nmurx.h.

nmurxNewConfig_t nmurxXdaisInitParams_t::cfgNew

refer to nmurxNewConfig_t

Definition at line 272 of file nmurx.h.

nmurxOpenConfig_t nmurxXdaisInitParams_t::cfgOpen

refer to nmurxOpenConfig_t

Definition at line 273 of file nmurx.h.

The documentation for this struct was generated from the following file:
  • nmurx.h


NMU: nmutxNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

nmutxNewConfig_t Struct Reference
[NMUTX]

#include <nmutx.h>

Collaboration diagram for nmutxNewConfig_t:

[legend]

Detailed Description

Create time configuration parameters.

Remarks:
For eco API nmutxNew and included as part of structure of for XDAIS API algInit alg specific parameters nmutxXdaisInitParams_t

Definition at line 122 of file nmutx.h.

Data Fields

tuint | ID
dbgInfo_t | debugInfo
tint | g711a2TxProcessDecimateInterval
tuint(* | isSidAllowed )(tuint ID)
SID (Silence Insertion Descriptor i.e. noise information packet) Allowed Call back API.
nmutxSizeConfig_t sizeCfg

Field Documentation

tuint nmutxNewConfig_t::ID

Instance identifier, for call-back identification, XDAIS default is NULL

Definition at line 123 of file nmutx.h.

dbgInfo_t nmutxNewConfig_t::debugInfo

Generic call-back API for debug/exception, XDAIS default is NULL

Definition at line 124 of file nmutx.h.

tint nmutxNewConfig_t::g711a2TxProcessDecimateInterval

Use different settings for MHz versus performance trade-offs. For CPE, since channel density is low, it is best to use 10 ms setting. For higher channel density, use setting based on number of active channels with g711a2 configuration. This setting can be changed anytime although too fast changes should be avoided for performance purposes. Default is 10 ms, the best for quality.

Definition at line 129 of file nmutx.h.

tuint(* nmutxNewConfig_t::isSidAllowed)(tuint ID)

SID (Silence Insertion Descriptor i.e. noise information packet) Allowed Call back API.

Parameters:
[in] ID Component wil call back with its Instance identifier, as configured earlier.
Return values:
API is expected to return a flag indicating whether SID is allowed to be generated by the algorithm. Although it appears this could be done outside of the nmutx, because nmutx always needs to generate packet payload for the first voice to noise transition, it may need to hold this until allowed by this call back in a later frame.
Remarks:
This call back feature is useful for AAL2 protocol and not RTP (Since G711A2 is for RTP). Since G711 Appendix II is only used with RTP, this configuration is ineffective for G711 Appendix II. For NONE and LEVEL, it will be applicable if configured. This field must be configured to NULL if not to be used for NONE and LEVEL (e.g when RTP) unless entire input configuration structure was set to NULL in XDAIS for default parameters.

nmutxSizeConfig_t nmutxNewConfig_t::sizeCfg

Configuration as per ifnmu external interface (ifnmutx.h)

Definition at line 153 of file nmutx.h.

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU: nmutxOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

nmutxOpenConfig_t Struct Reference
[NMUTX]

#include <nmutx.h>

Detailed Description

Open time configuration parameters.

Remarks:
Used for eco API nmutxOpen and included as part of configuration structure of for XDAIS API algInit nmutxXdaisInitParams_t alg specific parameters

Definition at line 162 of file nmutx.h.

Data Fields

tuint | frame_size
tuint | level_format
ifnmutxConfig_t | config

Field Documentation

tuint nmutxOpenConfig_t::frame_size

Frame Size in samples, minimum 5 ms @ 8 KHz (=40), max 10 ms @ 16 KHz (=160), 16 KHz rate only applicable for level matching, should be multiple of 40

Definition at line 163 of file nmutx.h.

tuint nmutxOpenConfig_t::level_format

format of level in packet (SID) payload

Definition at line 170 of file nmutx.h.

ifnmutxConfig_t nmutxOpenConfig_t::config

Definition at line 172 of file nmutx.h.

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU: nmutxSizeConfig_t Struct Reference

  • Data Structures
  • Data Fields

nmutxSizeConfig_t Struct Reference
[NMUTX]

#include <nmutx.h>

Detailed Description

Size query time configuration parameters.

Remarks:
For eco, this is used by the nmutxGetSizes API and for XDAIS, is used for algAlloc API alg specific parameters nmutxXdaisAllocParams_t and also as substructure it is included as sub-structure in nmutxNewConfig_t which in turn

Definition at line 113 of file nmutx.h.

Data Fields

ifnmutxConfig_t config

Field Documentation

ifnmutxConfig_t nmutxSizeConfig_t::config

Configuration as per ifnmu external interface

Definition at line 114 of file nmutx.h.

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU: nmutxStats_s Struct Reference

  • Data Structures
  • Data Fields

nmutxStats_s Struct Reference
[NMUTX]

#include <nmutx.h>

Detailed Description

Statistics reported by NMU Tx.

Remarks:
nmutxGetStats API is presently available for ECO API only, not for XDAIS

Definition at line 178 of file nmutx.h.

Data Fields

tint curr_bg_noise

Field Documentation

tint nmutxStats_s::curr_bg_noise

Last estimated background Noise level in dBm0

Definition at line 179 of file nmutx.h.

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU: nmutxXdaisAllocParams_t Struct Reference

  • Data Structures
  • Data Fields

nmutxXdaisAllocParams_t Struct Reference
[NMUTX]

#include <nmutx.h>

Collaboration diagram for nmutxXdaisAllocParams_t:

[legend]

Detailed Description

configuration parameters overloading for algAlloc API

Remarks:
Defaults for this structure are as below..
 *
 *   #define ifnmutxConfig_t_default_params \
 *     (ifnmutx_CONFIG_VALID_NOISE_MODE | ifnmutx_CONFIG_VALID_NOISE_LP_ORDER), //valid_params \
 *     ifnmutx_CONFIG_NOISE_MODE_G711A2, //noise_mode \
 *     ifnmutx_CONFIG_MAX_LP_ORDER,      //LP order  \
 *
 *     {
 *     sizeof(nmutxXdaisAllocParams_t)
 *
 *     },
 *
 *     // nmutxSizeConfig_t
 *     {
 *       // ifnmutxConfig_t, should be worst case size maximizing configuration
 *       { ifnmutxConfig_t_default_params }
 *     }
 *

Definition at line 285 of file nmutx.h.

Data Fields

IALG_Params param
nmutxSizeConfig_t cfg

Field Documentation

IALG_Params nmutxXdaisAllocParams_t::param

Base type as per IALG requirement

Definition at line 286 of file nmutx.h.

nmutxSizeConfig_t nmutxXdaisAllocParams_t::cfg

refer to nmutxSizeConfig_t

Definition at line 287 of file nmutx.h.

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU: nmutxXdaisCallTable_t Struct Reference

  • Data Structures
  • Data Fields

nmutxXdaisCallTable_t Struct Reference
[NMUTX]

#include <nmutx.h>

Detailed Description

NMU Tx's XDAIS call table definition.

Definition at line 338 of file nmutx.h.

Data Fields

IALG_Fxns | ialg
void(* | process )(IALG_Handle handle, ISPHENC1_FrameType *frameType, tbool vadAlertFlag, linSample *inSamples, tint *outCwsegSize, tword *outCwseg)
processing API
void(* | control )(IALG_Handle handle, ifnmutxConfig_t *cfg)
control API

Field Documentation

IALG_Fxns nmutxXdaisCallTable_t::ialg

Standard IALG functions

Definition at line 339 of file nmutx.h.

void(* nmutxXdaisCallTable_t::process)(IALG_Handle handle, ISPHENC1_FrameType *frameType, tbool vadAlertFlag, linSample *inSamples, tint *outCwsegSize, tword *outCwseg)

processing API

Remarks:
Algorithm specific processing API, same definition as ECO API nmutxProcess

void(* nmutxXdaisCallTable_t::control)(IALG_Handle handle, ifnmutxConfig_t *cfg)

control API

Remarks:
Algorithm specific control API, same definition as ECO API nmutxControl

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU: nmutxXdaisInitParams_t Struct Reference

  • Data Structures
  • Data Fields

nmutxXdaisInitParams_t Struct Reference
[NMUTX]

#include <nmutx.h>

Collaboration diagram for nmutxXdaisInitParams_t:

[legend]

Detailed Description

configuration parameters overloading for algInit API

Remarks:
Defaults for this structure are as below..
 *
 *   #define ifnmutxConfig_t_default_params \
 *     (ifnmutx_CONFIG_VALID_NOISE_MODE | ifnmutx_CONFIG_VALID_NOISE_LP_ORDER), //valid_params \
 *     ifnmutx_CONFIG_NOISE_MODE_G711A2, //noise_mode \
 *     ifnmutx_CONFIG_MAX_LP_ORDER,      //LP order  \
 *
 *  {
 *  sizeof(nmutxXdaisInitParams_t)
 *  },
 *
 *  // nmutxNewConfig_t
 *  {
 *    0, //ID
 *    NULL, //debug Info
 *    nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS,
 *    NULL, //isSidAllowed
 *
 *    // sizeConfig_t
 *    {
 *      //ifnmutxConfig_t
 *      {   ifnmutxConfig_t_default_params }
 *    }
 *  },
 *
 *  //nmutxOpenConfig_t
 *  {
 *    80,  // frame size
 *    nmutx_LEVEL_FORMAT_dBov,
 *
 *    //ifnmutxConfig_t
 *    { ifnmutxConfig_t_default_params }
 *  }
 *

Definition at line 329 of file nmutx.h.

Data Fields

IALG_Params param
nmutxNewConfig_t cfgNew
nmutxOpenConfig_t cfgOpen

Field Documentation

IALG_Params nmutxXdaisInitParams_t::param

Base type as per IALG requirement

Definition at line 330 of file nmutx.h.

nmutxNewConfig_t nmutxXdaisInitParams_t::cfgNew

refer to nmutxNewConfig_t

Definition at line 331 of file nmutx.h.

nmutxOpenConfig_t nmutxXdaisInitParams_t::cfgOpen

refer to nmutxOpenConfig_t

Definition at line 332 of file nmutx.h.

The documentation for this struct was generated from the following file:
  • nmutx.h


NMU VAU Test: Data Structures

  • Data Structures
  • Data Fields

NMU VAU Test Data Structures

Here are the data structures with brief descriptions:
config_s | Global test configuration structure definition
cycles_s | For accumulation of cycle statistics
msgTable_t |
msgTables_t |
siuInst_s | System Integration Unit (siu) structure for book-keeping of modules
siuMemHeap_t |
vauSim_s |


NMU VAU Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

  1. Run the simulation to completion.
  2. The simulation will produce the file out.raw in directory nmu\test\vectors\out\
  3. Open Matlab and change the Matlab directory to nmu\test\vectors\ and run the Matlab script process.m (provided).
  4. This will parse the input and output vectors and generate plots of power level for both input and output as well as the delta (as side information). It will also play the input and output for subjective listening and to identify artifacts. Also, it will indicate if bit-exactness is satisfied. If bit-exactness is not satisfied it will print the first index (1 based) where the mis-match occurred. Note that bit-exactness depends on the configuration. If the configuration is changed before running the test, bit-exactness will likely fail.


NMU VAU Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


NMU VAU Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


NMU VAU Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


NMU VAU Test: File Index

  • File List
  • Globals

NMU VAU Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
mem.c [code] |
mem.h [code] |
test.c [code] | NMU and VAD test


NMU VAU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • e
  • f
  • h
  • i
  • m
  • n
  • o
  • p
  • s
  • v
  • w
  • x

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • allNoiseAfterFirstVoice2Noise : config_s
  • avg : cycles_s
  • AzFilePtr : siuInst_s

- c -

  • countOnOff : vauSim_s
  • cyclesNmuRx : siuInst_s
  • cyclesNmuTx : siuInst_s
  • cyclesOverhead : siuInst_s
  • cyclesVau : siuInst_s

- e -

  • excTbl : msgTables_t

- f -

  • frameCount : siuInst_s
  • frameSize : config_s

- h -

  • heapBase : siuMemHeap_t

- i -

  • ID : msgTables_t
  • indx : siuMemHeap_t
  • inFrameFilePtr : siuInst_s
  • inFrameInitialSilenceFrames : siuInst_s
  • isVoice : siuInst_s

- m -

  • max : cycles_s
  • msgCode : msgTable_t
  • msgString : msgTable_t

- n -

  • name : msgTables_t
  • nmurxConfig : config_s
  • nmurxInst : siuInst_s
  • nmurxXdaisInst : siuInst_s
  • nmutxConfig : config_s
  • nmutxInst : siuInst_s
  • nmutxXdaisInst : siuInst_s
  • numSIDs : siuInst_s

- o -

  • outFrameFilePtr : siuInst_s

- p -

  • prevSIDframeCount : siuInst_s

- s -

  • SIDfilePtr : siuInst_s
  • size : siuMemHeap_t
  • sizeExcTbl : msgTables_t
  • sizeWarnTbl : msgTables_t
  • state : vauSim_s

- v -

  • vadAlertFlag : vauSim_s
  • vauBypass : config_s
  • vauConfig : config_s
  • vauControl : config_s
  • vauInst : siuInst_s
  • vauSim : siuInst_s
  • vauXdaisInst : siuInst_s

- w -

  • warnTbl : msgTables_t

- x -

  • xdaisBufsMallocFreeCounter : siuInst_s
  • xdaisDefaultCfgFlag : config_s
  • xdaisFlag : config_s


NMU VAU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • e
  • f
  • h
  • i
  • m
  • n
  • o
  • p
  • s
  • v
  • w
  • x

- a -

  • allNoiseAfterFirstVoice2Noise : config_s
  • avg : cycles_s
  • AzFilePtr : siuInst_s

- c -

  • countOnOff : vauSim_s
  • cyclesNmuRx : siuInst_s
  • cyclesNmuTx : siuInst_s
  • cyclesOverhead : siuInst_s
  • cyclesVau : siuInst_s

- e -

  • excTbl : msgTables_t

- f -

  • frameCount : siuInst_s
  • frameSize : config_s

- h -

  • heapBase : siuMemHeap_t

- i -

  • ID : msgTables_t
  • indx : siuMemHeap_t
  • inFrameFilePtr : siuInst_s
  • inFrameInitialSilenceFrames : siuInst_s
  • isVoice : siuInst_s

- m -

  • max : cycles_s
  • msgCode : msgTable_t
  • msgString : msgTable_t

- n -

  • name : msgTables_t
  • nmurxConfig : config_s
  • nmurxInst : siuInst_s
  • nmurxXdaisInst : siuInst_s
  • nmutxConfig : config_s
  • nmutxInst : siuInst_s
  • nmutxXdaisInst : siuInst_s
  • numSIDs : siuInst_s

- o -

  • outFrameFilePtr : siuInst_s

- p -

  • prevSIDframeCount : siuInst_s

- s -

  • SIDfilePtr : siuInst_s
  • size : siuMemHeap_t
  • sizeExcTbl : msgTables_t
  • sizeWarnTbl : msgTables_t
  • state : vauSim_s

- v -

  • vadAlertFlag : vauSim_s
  • vauBypass : config_s
  • vauConfig : config_s
  • vauControl : config_s
  • vauInst : siuInst_s
  • vauSim : siuInst_s
  • vauXdaisInst : siuInst_s

- w -

  • warnTbl : msgTables_t

- x -

  • xdaisBufsMallocFreeCounter : siuInst_s
  • xdaisDefaultCfgFlag : config_s
  • xdaisFlag : config_s


NMU VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines
  • a
  • c
  • h
  • i
  • m
  • n
  • o
  • p
  • s
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • align : mem.c

- c -

  • config : test.c
  • config_t : test.c
  • cycles_t : test.c

- h -

  • hw_init() : test.c

- i -

  • inFrame : test.c

- m -

  • main() : test.c
  • MAX_FRAME_SIZE : test.c
  • msgTables : test.c

- n -

  • NMURX_ID : test.c
  • nmuRxExceptions : test.c
  • nmuRxWarnings : test.c
  • NMUTX_ID : test.c
  • nmuTxExceptions : test.c
  • nmuTxWarnings : test.c

- o -

  • outFrame : test.c

- p -

  • print_buffer() : mem.c
  • print_footer() : mem.c
  • print_header() : mem.c

- s -

  • siu_alloc_eco_mem() : mem.c , mem.h
  • siu_alloc_xdais_mem() : mem.c , mem.h
  • siu_close() : test.c
  • siu_dealloc_ialg_mem() : test.c
  • siu_dealloc_xdais_mem() : mem.c , mem.h
  • siu_debug_info() : test.c
  • siu_init_heaps() : mem.c , mem.h
  • SIU_INITIAL_SILENCE_FRAMES : test.c
  • siu_malloc() : mem.c
  • SIU_MAX_ERR_MSG_STRING_LENGTH : test.c
  • SIU_MAX_MODULE_NBUFS : test.c
  • siu_mem_heap_alloc() : mem.c
  • siu_mem_heap_init() : mem.c
  • SIU_MEM_NONVOLATILE_HEAP_SIZE : mem.c
  • SIU_MEM_VOLATILE_HEAP_SIZE : mem.c
  • siu_new_open_config_modules() : test.c
  • siu_open() : test.c
  • siu_process_txrx() : test.c
  • siu_pvp_control() : test.c
  • siu_read_inFrame() : test.c
  • SIU_VAU_ALERT_IN_FRAMES : test.c
  • SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES : test.c
  • siu_write_outFrame() : test.c
  • siuGetMsg() : test.c
  • siuInst : test.c
  • siuInst_t : test.c
  • siuMemHeapNonVolatile : mem.c
  • siuMemHeapVolatile : mem.c
  • siuNonVolatileMemBufs : mem.c
  • siuVolatileMemBufs : mem.c

- t -

  • ti_mas_nmu_Version__nolocalnames : test.c
  • ti_mas_vau_Version__nolocalnames : test.c

- v -

  • vauSim_t : test.c


NMU VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • align : mem.c
  • MAX_FRAME_SIZE : test.c
  • NMURX_ID : test.c
  • NMUTX_ID : test.c
  • SIU_INITIAL_SILENCE_FRAMES : test.c
  • SIU_MAX_ERR_MSG_STRING_LENGTH : test.c
  • SIU_MAX_MODULE_NBUFS : test.c
  • SIU_MEM_NONVOLATILE_HEAP_SIZE : mem.c
  • SIU_MEM_VOLATILE_HEAP_SIZE : mem.c
  • SIU_VAU_ALERT_IN_FRAMES : test.c
  • SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES : test.c
  • ti_mas_nmu_Version__nolocalnames : test.c
  • ti_mas_vau_Version__nolocalnames : test.c


NMU VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • hw_init() : test.c
  • main() : test.c
  • print_buffer() : mem.c
  • print_footer() : mem.c
  • print_header() : mem.c
  • siu_alloc_eco_mem() : mem.c , mem.h
  • siu_alloc_xdais_mem() : mem.h , mem.c
  • siu_close() : test.c
  • siu_dealloc_ialg_mem() : test.c
  • siu_dealloc_xdais_mem() : mem.h , mem.c
  • siu_debug_info() : test.c
  • siu_init_heaps() : mem.c , mem.h
  • siu_malloc() : mem.c
  • siu_mem_heap_alloc() : mem.c
  • siu_mem_heap_init() : mem.c
  • siu_new_open_config_modules() : test.c
  • siu_open() : test.c
  • siu_process_txrx() : test.c
  • siu_pvp_control() : test.c
  • siu_read_inFrame() : test.c
  • siu_write_outFrame() : test.c
  • siuGetMsg() : test.c


NMU VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • config_t : test.c
  • cycles_t : test.c
  • siuInst_t : test.c
  • vauSim_t : test.c


NMU VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • config : test.c
  • inFrame : test.c
  • msgTables : test.c
  • nmuRxExceptions : test.c
  • nmuRxWarnings : test.c
  • nmuTxExceptions : test.c
  • nmuTxWarnings : test.c
  • outFrame : test.c
  • siuInst : test.c
  • siuMemHeapNonVolatile : mem.c
  • siuMemHeapVolatile : mem.c
  • siuNonVolatileMemBufs : mem.c
  • siuVolatileMemBufs : mem.c


NMU VAU Test: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


NMU VAU Test: NMUVADTEST

NMUVADTEST

Detailed Description

Data Structures

struct | config_s
global test configuration structure definition More...
struct | cycles_s
for accumulation of cycle statistics More...
struct | vauSim_s
struct | siuInst_s
System Integration Unit (siu) structure for book-keeping of modules. More...
struct | msgTable_t
struct | msgTables_t

Defines

#define | ti_mas_nmu_Version__nolocalnames
#define | ti_mas_vau_Version__nolocalnames
#define | SIU_MAX_MODULE_NBUFS 100
#define | MAX_FRAME_SIZE 80
#define | SIU_INITIAL_SILENCE_FRAMES 20
#define | SIU_MAX_ERR_MSG_STRING_LENGTH 100
#define | NMUTX_ID 1
#define | NMURX_ID 2

Typedefs

typedef config_s | config_t
global test configuration structure definition
typedef cycles_s | cycles_t
for accumulation of cycle statistics
typedef vauSim_s | vauSim_t
typedef siuInst_s | siuInst_t
System Integration Unit (siu) structure for book-keeping of modules.

Functions

void | siu_open (void)
void | siu_dealloc_ialg_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
void | siu_close (void)
tuint | siu_pvp_control (tuint ID)
char * | siuGetMsg (msgTable_t *tbl, tuint size, tuint msgCode)
void | siu_debug_info (void *inID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | siu_new_open_config_modules (config_t *config)
void | siu_process_txrx (linSample *framePtr, linSample **outFramePtr)
tint | siu_read_inFrame (linSample *inFramePtr, tint numSamples)
tint | siu_write_outFrame (linSample *outFramePtr, tint numSamples)
void | hw_init (void)
void | main (void)

Variables

config_t config
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.
siuInst_t siuInst
msgTable_t nmuTxWarnings []
msgTable_t nmuTxExceptions []
msgTable_t nmuRxWarnings []
msgTable_t nmuRxExceptions []
msgTables_t msgTables []
linSample | inFrame [MAX_FRAME_SIZE]
linSample | outFrame [MAX_FRAME_SIZE]

Define Documentation

#define ti_mas_nmu_Version__nolocalnames

Definition at line 42 of file test.c.

#define ti_mas_vau_Version__nolocalnames

Definition at line 43 of file test.c.

#define SIU_MAX_MODULE_NBUFS 100

required for ECO API memory descriptors, not for XDAIS APIs

Definition at line 58 of file test.c.

Referenced by siu_new_open_config_modules().

#define MAX_FRAME_SIZE 80

10 ms frame

Definition at line 59 of file test.c.

#define SIU_INITIAL_SILENCE_FRAMES 20

20*5 = 100 ms initial silence

Definition at line 60 of file test.c.

Referenced by siu_open().

#define SIU_MAX_ERR_MSG_STRING_LENGTH 100

Definition at line 338 of file test.c.

#define NMUTX_ID 1

Definition at line 349 of file test.c.

Referenced by siu_new_open_config_modules().

#define NMURX_ID 2

Definition at line 350 of file test.c.

Referenced by siu_new_open_config_modules().

Typedef Documentation

typedef struct config_s config_t

global test configuration structure definition

typedef struct cycles_s cycles_t

for accumulation of cycle statistics

typedef struct vauSim_s vauSim_t

typedef struct siuInst_s siuInst_t

System Integration Unit (siu) structure for book-keeping of modules.

Function Documentation

void siu_open ( void )

Definition at line 180 of file test.c.

References siuInst_s::AzFilePtr, siuInst_s::cyclesOverhead, siuInst_s::inFrameFilePtr, siuInst_s::inFrameInitialSilenceFrames, siuInst_s::outFrameFilePtr, siuInst_s::SIDfilePtr, siu_init_heaps(), SIU_INITIAL_SILENCE_FRAMES, siuInst, vauSim_s::state, vauSim_s::vadAlertFlag, and siuInst_s::vauSim.

Referenced by main().

Here is the call graph for this function:

void siu_dealloc_ialg_mem | ( | IALG_Fxns * | ialgFxnsPtr,
 |  | IALG_Handle | xdaisInstPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 251 of file test.c.

References siu_dealloc_xdais_mem().

Referenced by siu_close().

Here is the call graph for this function:

void siu_close ( void )

Definition at line 267 of file test.c.

References siuInst_s::AzFilePtr, config, siuInst_s::inFrameFilePtr, siuInst_s::nmurxXdaisInst, siuInst_s::nmutxXdaisInst, siuInst_s::numSIDs, siuInst_s::outFrameFilePtr, siuInst_s::SIDfilePtr, siu_dealloc_ialg_mem(), siuInst, siuInst_s::vauXdaisInst, siuInst_s::xdaisBufsMallocFreeCounter, and config_s::xdaisFlag.

Referenced by main().

Here is the call graph for this function:

tuint siu_pvp_control ( tuint ID )

Definition at line 293 of file test.c.

Referenced by siu_new_open_config_modules().

char* siuGetMsg | ( | msgTable_t * | tbl,
 |  | tuint | size,
 |  | tuint | msgCode
 | ) |  |

Definition at line 357 of file test.c.

Referenced by siu_debug_info().

void siu_debug_info | ( | void * | inID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 370 of file test.c.

References msgTables_t::excTbl, msgTables, msgTables_t::name, siuGetMsg(), msgTables_t::sizeExcTbl, msgTables_t::sizeWarnTbl, and msgTables_t::warnTbl.

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_new_open_config_modules ( config_t * config )

Definition at line 423 of file test.c.

References config, config_s::frameSize, NMURX_ID, config_s::nmurxConfig, siuInst_s::nmurxInst, siuInst_s::nmurxXdaisInst, NMUTX_ID, config_s::nmutxConfig, siuInst_s::nmutxInst, siuInst_s::nmutxXdaisInst, siu_alloc_eco_mem(), siu_alloc_xdais_mem(), siu_debug_info(), SIU_MAX_MODULE_NBUFS, siu_pvp_control(), siuInst, config_s::vauConfig, config_s::vauControl, siuInst_s::vauInst, siuInst_s::vauXdaisInst, siuInst_s::xdaisBufsMallocFreeCounter, config_s::xdaisDefaultCfgFlag, and config_s::xdaisFlag.

Referenced by main().

Here is the call graph for this function:

void siu_process_txrx | ( | linSample * | framePtr,
 |  | linSample ** | outFramePtr
 | ) |  |

Definition at line 738 of file test.c.

References config_s::allNoiseAfterFirstVoice2Noise, config, vauSim_s::countOnOff, siuInst_s::cyclesNmuTx, siuInst_s::cyclesVau, siuInst_s::frameCount, config_s::frameSize, siuInst_s::isVoice, siuInst_s::nmurxXdaisInst, siuInst_s::nmutxInst, siuInst_s::nmutxXdaisInst, siuInst_s::numSIDs, siuInst_s::prevSIDframeCount, siuInst_s::SIDfilePtr, SIU_VAU_ALERT_IN_FRAMES, SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES, siuInst, vauSim_s::state, vauSim_s::vadAlertFlag, config_s::vauBypass, siuInst_s::vauInst, siuInst_s::vauSim, siuInst_s::vauXdaisInst, and config_s::xdaisFlag.

Referenced by main().

tint siu_read_inFrame | ( | linSample * | inFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 976 of file test.c.

References siuInst_s::inFrameFilePtr, and siuInst.

Referenced by main().

tint siu_write_outFrame | ( | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 997 of file test.c.

References siuInst_s::outFrameFilePtr, and siuInst.

Referenced by main().

void hw_init ( void )

Definition at line 1008 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 1027 of file test.c.

References config, siuInst_s::frameCount, config_s::frameSize, hw_init(), siuInst_s::inFrameInitialSilenceFrames, siu_close(), siu_new_open_config_modules(), siu_open(), siu_process_txrx(), siu_read_inFrame(), siu_write_outFrame(), siuInst, and config_s::xdaisFlag.

Here is the call graph for this function:

Variable Documentation

config_t config

Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.

Definition at line 92 of file test.c.

Referenced by hw_init(), main(), siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

siuInst_t siuInst

Definition at line 178 of file test.c.

Referenced by main(), siu_close(), siu_new_open_config_modules(), siu_open(), siu_process_txrx(), siu_read_inFrame(), and siu_write_outFrame().

msgTable_t nmuTxWarnings[]

Initial value:

 {
  nmutx_W1,
  nmutx_W2,
  nmutx_W3,
  nmutx_W4,
  nmutx_W5,
  nmutx_W6,
  nmutx_W7,
  nmutx_W8,
  nmutx_W9,
  nmutx_W10
}

Definition at line 303 of file test.c.

msgTable_t nmuTxExceptions[]

Initial value:

 {
  nmutx_E1
}

Definition at line 316 of file test.c.

msgTable_t nmuRxWarnings[]

Initial value:

 {
  nmurx_W1,
  nmurx_W2,
  nmurx_W3,
  nmurx_W4,
  nmurx_W5,
  nmurx_W6,
  nmurx_W7,
  nmurx_W8,
  nmurx_W9,
  nmurx_W10,
  nmurx_W11
}

Definition at line 320 of file test.c.

msgTable_t nmuRxExceptions[]

Initial value:

 {
  nmurx_E1
}

Definition at line 334 of file test.c.

msgTables_t msgTables[]

Initial value:

 {
  {NMUTX_ID, "nmuTx", nmuTxWarnings, sizeof(nmuTxWarnings)/sizeof(msgTable_t), nmuTxExceptions, sizeof(nmuTxExceptions)/sizeof(msgTable_t)},
  {NMURX_ID, "nmuRx", nmuRxWarnings, sizeof(nmuRxWarnings)/sizeof(msgTable_t), nmuRxExceptions, sizeof(nmuRxExceptions)/sizeof(msgTable_t)},
}

Definition at line 352 of file test.c.

Referenced by siu_debug_info().

linSample inFrame[MAX_FRAME_SIZE]

Definition at line 1025 of file test.c.

linSample outFrame[MAX_FRAME_SIZE]

Definition at line 1025 of file test.c.


NMU VAU Test: NMU Unit Test

NMU Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the NMU. This is not a regression test, its purpose is to show how the NMU module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Test code details: NMUVADTEST

Building Unit Test

The NMU Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the NMU Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main NMU documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The NMU Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the NMU Unit Test image for the target of interest
    • Will reside in the nmu\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the NMU project for the target of interest
    • Will be a subdirectory off the nmu\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the nmu\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)
  • ti.mas.ifnmu (External nmu tx and rx interface)
  • ti.mas.xdais (for XDAIS/IALG defines and XDM 1.0 isphenc1.h and isphdec1.h)
  • ti.mas.sdk (test infrastructure software)
  • ti.mas.ifvau (External interface for voice activity detector)
  • ti.mas.vau (Voice activity detector to be tested)


NMU VAU Test: mem.c File Reference

  • File List
  • Globals

mem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xdc/std.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/nmu/test/src/mem.h>

Include dependency graph for mem.c:

Go to the source code of this file.

Data Structures

struct | siuMemHeap_t

Defines

#define | align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
#define | SIU_MEM_VOLATILE_HEAP_SIZE 5000
#define | SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Functions

void | siu_mem_heap_init (siuMemHeap_t *ptr, tword *heapBase, tulong size)
tword * | siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
void | siu_init_heaps (void)
tword * | siu_malloc (tint size, tbool volat)
static void | print_header (void)
static void | print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
static void | print_footer (void)
void | siu_alloc_eco_mem (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr)
void | siu_alloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
void | siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)

Variables

tword | siuVolatileMemBufs [SIU_MEM_VOLATILE_HEAP_SIZE]
tword | siuNonVolatileMemBufs [SIU_MEM_NONVOLATILE_HEAP_SIZE]
siuMemHeap_t siuMemHeapVolatile
siuMemHeap_t siuMemHeapNonVolatile

Define Documentation

#define align | ( | Addr,
 |  | Algnmt | ) | (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))

Definition at line 10 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

#define SIU_MEM_VOLATILE_HEAP_SIZE 5000

Definition at line 39 of file mem.c.

Referenced by siu_init_heaps().

#define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Definition at line 40 of file mem.c.

Referenced by siu_init_heaps().

Function Documentation

void siu_mem_heap_init | ( | siuMemHeap_t * | ptr,
 |  | tword * | heapBase,
 |  | tulong | size
 | ) |  |

Definition at line 18 of file mem.c.

References siuMemHeap_t::heapBase, siuMemHeap_t::indx, and siuMemHeap_t::size.

Referenced by siu_init_heaps().

tword* siu_mem_heap_alloc | ( | siuMemHeap_t * | ptr,
 |  | tint | size
 | ) |  |

Definition at line 28 of file mem.c.

References siuMemHeap_t::heapBase, siuMemHeap_t::indx, and siuMemHeap_t::size.

Referenced by siu_malloc().

void siu_init_heaps ( void )

Definition at line 51 of file mem.c.

References siu_mem_heap_init(), SIU_MEM_NONVOLATILE_HEAP_SIZE, SIU_MEM_VOLATILE_HEAP_SIZE, siuMemHeapNonVolatile, siuMemHeapVolatile, siuNonVolatileMemBufs, and siuVolatileMemBufs.

Referenced by siu_open().

Here is the call graph for this function:

tword* siu_malloc | ( | tint | size,
 |  | tbool | volat
 | ) |  |

Definition at line 57 of file mem.c.

References siu_mem_heap_alloc(), siuMemHeapNonVolatile, and siuMemHeapVolatile.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

Here is the call graph for this function:

static void print_header ( void ) [inline, static]

Definition at line 67 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

static void print_buffer | ( | tint | ID,
 |  | tint | linAlign,
 |  | tint | sizeMAUs,
 |  | tbool | isVolat |
 | ) |  |  | [inline, static]

Definition at line 76 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

static void print_footer ( void ) [inline, static]

Definition at line 82 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

void siu_alloc_eco_mem | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr
 | ) |  |

Definition at line 87 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_alloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 122 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 157 of file mem.c.

Referenced by siu_dealloc_ialg_mem().

Variable Documentation

tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE]

Definition at line 43 of file mem.c.

Referenced by siu_init_heaps().

tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE]

Definition at line 46 of file mem.c.

Referenced by siu_init_heaps().

siuMemHeap_t siuMemHeapVolatile

Definition at line 48 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().

siuMemHeap_t siuMemHeapNonVolatile

Definition at line 49 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().


NMU VAU Test: mem.c Source File

  • File List
  • Globals

mem.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include <xdc/std.h>
00005 #include <ti/mas/types/types.h>
00006 #include <ti/mas/util/ecomem.h>
00007 #include <ti/xdais/ialg.h>
00008 #include <ti/mas/nmu/test/src/mem.h>
00009
00010 #define align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
00011
00012 typedef struct {
00013   tword *heapBase;
00014   tulong indx;
00015   tulong size;
00016 } siuMemHeap_t;
00017
00018 void siu_mem_heap_init(siuMemHeap_t *ptr, tword *heapBase, tulong size)
00019 {
00020   ptr->heapBase = heapBase;
00021   ptr->size = size;
00022   ptr->indx = 0;
00023
00024   /* Note : memory is not initialized deliberately to expose
00025             uninitialized memory read problems */
00026 }
00027
00028 tword *siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
00029 {
00030   tword *alloc = NULL;
00031
00032   if ((ptr->indx + size) <= ptr->size) {
00033     alloc = &ptr->heapBase[ptr->indx];
00034     ptr->indx += size;
00035   }
00036   return(alloc);
00037 }
00038
00039 #define SIU_MEM_VOLATILE_HEAP_SIZE 5000
00040 #define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000
00041
00042 #pragma DATA_SECTION (siuVolatileMemBufs, ".volatileMemBufs");
00043 tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE];
00044
00045 #pragma DATA_SECTION (siuNonVolatileMemBufs, ".nonVolatileMemBufs");
00046 tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE];
00047
00048 siuMemHeap_t siuMemHeapVolatile;
00049 siuMemHeap_t siuMemHeapNonVolatile;
00050
00051 void siu_init_heaps(void)
00052 {
00053   siu_mem_heap_init ( &siuMemHeapVolatile, siuVolatileMemBufs, SIU_MEM_VOLATILE_HEAP_SIZE);
00054   siu_mem_heap_init ( &siuMemHeapNonVolatile, siuNonVolatileMemBufs, SIU_MEM_NONVOLATILE_HEAP_SIZE);
00055 }
00056
00057 tword *siu_malloc (tint size, tbool volat)
00058 {
00059   if (volat == TRUE) /* Scratchpad type */ {
00060     return ( siu_mem_heap_alloc (&siuMemHeapVolatile, size) );
00061   }
00062   else {
00063     return ( siu_mem_heap_alloc (&siuMemHeapNonVolatile, size) );
00064   }
00065 }
00066
00067 static inline void print_header (void)
00068 {
00069   printf("+-----------+-----------+-----------+-------------+\n");
00070   printf("| Buffer ID | Alignment |   Size    | Volatility  |\n");
00071   printf("|           |  (Bytes)  | (Bytes)   |             |\n");
00072   printf("+-----------+-----------+-----------+-------------+\n");
00073 /*printf("| %9d | %9d | %9d | %11s |\n");*/
00074 }
00075
00076 static inline void print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
00077 {
00078   printf("| %9d | %9d | %9d | %11s |\n", ID, linAlign * (TYP_TWORD_SIZE/8),
00079         sizeMAUs * (TYP_TWORD_SIZE/8), (isVolat == TRUE)? "scratch" : "non-scratch" );
00080 }
00081
00082 static inline void print_footer (void)
00083 {
00084   printf("+-----------+-----------+-----------+-------------+\n");
00085 }
00086
00087 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00088                    ecomemBuffer_t * ecoBufsPtr)
00089 {
00090   tint      i;
00091   void     *allocPtr;
00092   tuint     linAlign, log2align;
00093   tbool     isVolat;
00094
00095   print_header();
00096
00097   for (i = 0; i < nbufs; i++) {
00098     ecoBufsPtr[i] = sizeBufsPtr[i];
00099
00100     isVolat = ecoBufsPtr[i].volat;
00101
00102     log2align = sizeBufsPtr[i].log2align;
00103     linAlign = (tuint) 1 << log2align;
00104
00105     print_buffer (i, linAlign, sizeBufsPtr[i].size, isVolat);
00106
00107     if (sizeBufsPtr[i].size == 0) {
00108       ecoBufsPtr[i].base = NULL;
00109       continue;
00110     }
00111
00112     if ((allocPtr = (void *) siu_malloc((sizeBufsPtr[i].size + linAlign - 1), isVolat)) == NULL) {
00113       printf("Not enough heap, exiting\n");
00114       exit(0);
00115     }
00116     ecoBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00117   }
00118
00119   print_footer();
00120 }
00121
00122 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00123 {
00124   tint      i;
00125   void     *allocPtr;
00126   tint     linAlign;
00127   tint      alignmentAdjustedSize;
00128   tbool    isVolat;
00129
00130   print_header();
00131
00132   for (i = 0; i < nbufs; i++) {
00133
00134     isVolat = (xdaisBufsPtr[i].attrs == IALG_SCRATCH) ? TRUE : FALSE;
00135     linAlign = (tint) xdaisBufsPtr[i].alignment;
00136
00137     print_buffer (i, linAlign, xdaisBufsPtr[i].size, isVolat);
00138
00139     if (xdaisBufsPtr[i].size == 0) {
00140       xdaisBufsPtr[i].base = NULL;
00141       continue;
00142     }
00143
00144     alignmentAdjustedSize = xdaisBufsPtr[i].size + linAlign - 1;
00145     if ((allocPtr = (void *) siu_malloc(alignmentAdjustedSize, isVolat)
00146         ) == NULL) {
00147       printf("Not enough heap, exiting\n");
00148       exit(0);
00149     }
00150     *mallocedSizeCounter += alignmentAdjustedSize;
00151     xdaisBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00152   }
00153
00154   print_footer();
00155 }
00156
00157 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00158 {
00159   tint i;
00160
00161   for(i = 0; i < nbufs; i++) {
00162     *mallocedSizeCounter -= (xdaisBufsPtr[i].size + xdaisBufsPtr[i].alignment - 1);
00163     if (xdaisBufsPtr[i].base) {
00164
00165     /* Note the free below may not have the right pointers as were in malloc because
00166        the module was fed aligned pointers, it is not possible to reverse and derive
00167        original unaligned pointer, so don't do free */
00168       //free(xdaisBufsPtr[i].base);
00169     }
00170   }
00171 }
00172
00173 /* Nothing past this point */


NMU VAU Test: mem.h File Reference

  • File List
  • Globals

mem.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/xdais/ialg.h>

Include dependency graph for mem.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | siu_init_heaps (void)
void | siu_alloc_eco_mem (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr)
void | siu_alloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
void | siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)

Function Documentation

void siu_init_heaps ( void )

Definition at line 51 of file mem.c.

References siu_mem_heap_init(), SIU_MEM_NONVOLATILE_HEAP_SIZE, SIU_MEM_VOLATILE_HEAP_SIZE, siuMemHeapNonVolatile, siuMemHeapVolatile, siuNonVolatileMemBufs, and siuVolatileMemBufs.

Referenced by siu_open().

Here is the call graph for this function:

void siu_alloc_eco_mem | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr
 | ) |  |

Definition at line 87 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_alloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 122 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 157 of file mem.c.

Referenced by siu_dealloc_ialg_mem().


NMU VAU Test: mem.h Source File

  • File List
  • Globals

mem.h

Go to the documentation of this file.
00001 #include <ti/mas/types/types.h>
00002 #include <ti/mas/util/ecomem.h>
00003 #include <ti/xdais/ialg.h>
00004
00005 void siu_init_heaps(void);
00006 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00007                    ecomemBuffer_t * ecoBufsPtr);
00008
00009 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00010 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00011
00012 /* Nothing past this point */


NMU VAU Test: Module Index

NMU VAU Test Modules

Here is a list of all modules:
  • NMUVADTEST


NMU VAU Test: Page Index

NMU VAU Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


NMU VAU Test: config_s Struct Reference

  • Data Structures
  • Data Fields

config_s Struct Reference
[NMUVADTEST]

Detailed Description

global test configuration structure definition

Definition at line 64 of file test.c.

Data Fields

tbool | xdaisFlag
tbool | xdaisDefaultCfgFlag
tint | frameSize
tint | vauBypass
tint | allNoiseAfterFirstVoice2Noise
ifvauConfig_t | vauConfig
ifvauControl_t | vauControl
ifnmutxConfig_t | nmutxConfig
ifnmurxConfig_t | nmurxConfig

Field Documentation

tbool config_s::xdaisFlag

1 if desired to exercise xdais else ECO interface for components

Definition at line 65 of file test.c.

Referenced by main(), siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

tbool config_s::xdaisDefaultCfgFlag

1 if desired to use default configuration for XDAIS case,

applicable only when flag xdaisFlag is 1

Definition at line 67 of file test.c.

Referenced by siu_new_open_config_modules().

tint config_s::frameSize

in 8 KHz samples, only 5 ms (=40) or 10 ms (=80) allowed

Definition at line 71 of file test.c.

Referenced by main(), siu_new_open_config_modules(), and siu_process_txrx().

tint config_s::vauBypass

set to 1 if want to bypass vau and simulate a vau profile instead

Definition at line 73 of file test.c.

Referenced by siu_process_txrx().

tint config_s::allNoiseAfterFirstVoice2Noise

when vau is bypassed, if 1, after first voice to noise transition, stays in noise

Definition at line 75 of file test.c.

Referenced by siu_process_txrx().

ifvauConfig_t config_s::vauConfig

VAD (setup time) configuration, see ifvau external interface

Definition at line 79 of file test.c.

Referenced by siu_new_open_config_modules().

ifvauControl_t config_s::vauControl

VAD control, see ifvau external interface

Definition at line 80 of file test.c.

Referenced by siu_new_open_config_modules().

ifnmutxConfig_t config_s::nmutxConfig

NMU tx configuration, see ifnmu (ifnmutx.h) external interface

Definition at line 81 of file test.c.

Referenced by siu_new_open_config_modules().

ifnmurxConfig_t config_s::nmurxConfig

NMU rx configuration, see ifnmu (ifnmurx.h) external interface

Definition at line 82 of file test.c.

Referenced by siu_new_open_config_modules().

The documentation for this struct was generated from the following file:
  • test.c


NMU VAU Test: cycles_s Struct Reference

  • Data Structures
  • Data Fields

cycles_s Struct Reference
[NMUVADTEST]

Detailed Description

for accumulation of cycle statistics

Definition at line 132 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

running maximum of cycles

Definition at line 133 of file test.c.

tlong cycles_s::avg

running average of cycles (using exponential averaging)

Definition at line 134 of file test.c.

The documentation for this struct was generated from the following file:
  • test.c


NMU VAU Test: msgTable_t Struct Reference

  • Data Structures
  • Data Fields

msgTable_t Struct Reference
[NMUVADTEST]

Detailed Description

Definition at line 298 of file test.c.

Data Fields

tuint | msgCode
char | msgString [200]

Field Documentation

tuint msgTable_t::msgCode

Definition at line 299 of file test.c.

char msgTable_t::msgString[200]

Definition at line 300 of file test.c.

The documentation for this struct was generated from the following file:
  • test.c


NMU VAU Test: msgTables_t Struct Reference

  • Data Structures
  • Data Fields

msgTables_t Struct Reference
[NMUVADTEST]

Collaboration diagram for msgTables_t:

[legend]

Detailed Description

Definition at line 340 of file test.c.

Data Fields

tuint | ID
char | name [SIU_MAX_ERR_MSG_STRING_LENGTH]
msgTable_t * warnTbl
tuint | sizeWarnTbl
msgTable_t * excTbl
tuint | sizeExcTbl

Field Documentation

tuint msgTables_t::ID

Definition at line 341 of file test.c.

char msgTables_t::name[SIU_MAX_ERR_MSG_STRING_LENGTH]

Definition at line 342 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::warnTbl

Definition at line 343 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeWarnTbl

Definition at line 344 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::excTbl

Definition at line 345 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeExcTbl

Definition at line 346 of file test.c.

Referenced by siu_debug_info().

The documentation for this struct was generated from the following file:
  • test.c


NMU VAU Test: siuInst_s Struct Reference

  • Data Structures
  • Data Fields

siuInst_s Struct Reference
[NMUVADTEST]

Collaboration diagram for siuInst_s:

[legend]

Detailed Description

System Integration Unit (siu) structure for book-keeping of modules.

Definition at line 149 of file test.c.

Data Fields

void * | vauInst
IALG_Handle | vauXdaisInst
void * | nmutxInst
IALG_Handle | nmutxXdaisInst
void * | nmurxInst
IALG_Handle | nmurxXdaisInst
tlong | frameCount
tlong | prevSIDframeCount
FILE * | inFrameFilePtr
FILE * | outFrameFilePtr
FILE * | AzFilePtr
FILE * | SIDfilePtr
tint | inFrameInitialSilenceFrames
tlong | cyclesOverhead
cycles_t cyclesVau
cycles_t cyclesNmuTx
cycles_t cyclesNmuRx
tint | isVoice
tuint | numSIDs
vauSim_t vauSim
tulong | xdaisBufsMallocFreeCounter

Field Documentation

void* siuInst_s::vauInst

vau's ECO instance

Definition at line 150 of file test.c.

Referenced by siu_new_open_config_modules(), and siu_process_txrx().

IALG_Handle siuInst_s::vauXdaisInst

vau's XDAIS instance

Definition at line 151 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

void* siuInst_s::nmutxInst

nmu tx's ECO instance

Definition at line 152 of file test.c.

Referenced by siu_new_open_config_modules(), and siu_process_txrx().

IALG_Handle siuInst_s::nmutxXdaisInst

nmu tx's XDAIS instance

Definition at line 153 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

void* siuInst_s::nmurxInst

nmu rx's ECO instance

Definition at line 154 of file test.c.

Referenced by siu_new_open_config_modules().

IALG_Handle siuInst_s::nmurxXdaisInst

nmurx's XDAIS instance

Definition at line 155 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

tlong siuInst_s::frameCount

Definition at line 156 of file test.c.

Referenced by main(), and siu_process_txrx().

tlong siuInst_s::prevSIDframeCount

Definition at line 157 of file test.c.

Referenced by siu_process_txrx().

FILE* siuInst_s::inFrameFilePtr

Definition at line 158 of file test.c.

Referenced by siu_close(), siu_open(), and siu_read_inFrame().

FILE* siuInst_s::outFrameFilePtr

Definition at line 159 of file test.c.

Referenced by siu_close(), siu_open(), and siu_write_outFrame().

FILE* siuInst_s::AzFilePtr

Definition at line 163 of file test.c.

Referenced by siu_close(), and siu_open().

FILE* siuInst_s::SIDfilePtr

Definition at line 164 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process_txrx().

tint siuInst_s::inFrameInitialSilenceFrames

Definition at line 165 of file test.c.

Referenced by main(), and siu_open().

tlong siuInst_s::cyclesOverhead

to measure fixed overhead in cycle measurement

Definition at line 166 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesVau

Vau's cycle statistics

Definition at line 167 of file test.c.

Referenced by siu_process_txrx().

cycles_t siuInst_s::cyclesNmuTx

NMU Tx's cycles statistics

Definition at line 168 of file test.c.

Referenced by siu_process_txrx().

cycles_t siuInst_s::cyclesNmuRx

NMU Rx's cycles statistics

Definition at line 169 of file test.c.

tint siuInst_s::isVoice

set to 1 if voice frame post nmutx, else 0

Definition at line 170 of file test.c.

Referenced by siu_process_txrx().

tuint siuInst_s::numSIDs

total number of SIDs over the test case, printed at the end

Definition at line 171 of file test.c.

Referenced by siu_close(), and siu_process_txrx().

vauSim_t siuInst_s::vauSim

structure to maintain simulation state of simulated VAU

Definition at line 172 of file test.c.

Referenced by siu_open(), and siu_process_txrx().

tulong siuInst_s::xdaisBufsMallocFreeCounter

to see if malloc and free for module memory allocation in XDAIS are same i.e this should be zero at the end of the test

Definition at line 173 of file test.c.

Referenced by siu_close(), and siu_new_open_config_modules().

The documentation for this struct was generated from the following file:
  • test.c


NMU VAU Test: siuMemHeap_t Struct Reference

  • Data Structures
  • Data Fields

siuMemHeap_t Struct Reference

Detailed Description

Definition at line 12 of file mem.c.

Data Fields

tword * | heapBase
tulong | indx
tulong | size

Field Documentation

tword* siuMemHeap_t::heapBase

Definition at line 13 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::indx

Definition at line 14 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::size

Definition at line 15 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

The documentation for this struct was generated from the following file:
  • mem.c


NMU VAU Test: vauSim_s Struct Reference

  • Data Structures
  • Data Fields

vauSim_s Struct Reference
[NMUVADTEST]

Detailed Description

Definition at line 138 of file test.c.

Data Fields

tint | countOnOff
ISPHENC1_FrameType | state
tbool | vadAlertFlag

Field Documentation

tint vauSim_s::countOnOff

to count on and off segments

Definition at line 142 of file test.c.

Referenced by siu_process_txrx().

ISPHENC1_FrameType vauSim_s::state

SPEECH or NO_DATA

Definition at line 143 of file test.c.

Referenced by siu_open(), and siu_process_txrx().

tbool vauSim_s::vadAlertFlag

whether or not voice alert

Definition at line 144 of file test.c.

Referenced by siu_open(), and siu_process_txrx().

The documentation for this struct was generated from the following file:
  • test.c


NMU VAU Test: test.c File Reference

  • File List
  • Globals

test.c File Reference

Detailed Description

NMU and VAD test.

Remarks:
This test connects vad, nmu tx and nmu rx to create a sub-system for testing VAD/DTX operations, takes an input file and produces output file of samples for desired configuration. Input file is Intel 16-bit binary called vectors\in\in.raw and output file is a binary file vectors\out\out.raw (Intel 16-bit), Load code, go to main and set config structure to desired configuration and run. Matlab file process.m can be used to plot the results and check for bit-exactness with reference. SID information will be printed out during the run as well as logged in a file under "logs" directory.
(C) Copyright 2007, Texas Instruments, Inc.

Definition in file test.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xdc/std.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/pkt.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/iface/ifvau/ifvau.h>
#include <ti/mas/vau/vau.h>
#include <ti/mas/iface/ifnmu/ifnmutx.h>
#include <ti/mas/iface/ifnmu/ifnmurx.h>
#include <ti/mas/nmu/nmutx.h>
#include <ti/mas/nmu/nmurx.h>
#include <ti/xdais/dm/isphenc1.h>
#include <ti/xdais/dm/isphdec1.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/nmu/test/src/mem.h>
#include <ti/mas/vau/Version.h>
#include <ti/mas/nmu/Version.h>

Include dependency graph for test.c:

Go to the source code of this file.

Data Structures

struct | config_s
global test configuration structure definition More...
struct | cycles_s
for accumulation of cycle statistics More...
struct | vauSim_s
struct | siuInst_s
System Integration Unit (siu) structure for book-keeping of modules. More...
struct | msgTable_t
struct | msgTables_t

Defines

#define | ti_mas_nmu_Version__nolocalnames
#define | ti_mas_vau_Version__nolocalnames
#define | SIU_MAX_MODULE_NBUFS 100
#define | MAX_FRAME_SIZE 80
#define | SIU_INITIAL_SILENCE_FRAMES 20
#define | SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES 15
#define | SIU_VAU_ALERT_IN_FRAMES 8
#define | SIU_MAX_ERR_MSG_STRING_LENGTH 100
#define | NMUTX_ID 1
#define | NMURX_ID 2

Typedefs

typedef config_s | config_t
global test configuration structure definition
typedef cycles_s | cycles_t
for accumulation of cycle statistics
typedef vauSim_s | vauSim_t
typedef siuInst_s | siuInst_t
System Integration Unit (siu) structure for book-keeping of modules.

Functions

void | siu_open (void)
void | siu_dealloc_ialg_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
void | siu_close (void)
tuint | siu_pvp_control (tuint ID)
char * | siuGetMsg (msgTable_t *tbl, tuint size, tuint msgCode)
void | siu_debug_info (void *inID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | siu_new_open_config_modules (config_t *config)
void | siu_process_txrx (linSample *framePtr, linSample **outFramePtr)
tint | siu_read_inFrame (linSample *inFramePtr, tint numSamples)
tint | siu_write_outFrame (linSample *outFramePtr, tint numSamples)
void | hw_init (void)
void | main (void)

Variables

config_t config
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.
siuInst_t siuInst
msgTable_t nmuTxWarnings []
msgTable_t nmuTxExceptions []
msgTable_t nmuRxWarnings []
msgTable_t nmuRxExceptions []
msgTables_t msgTables []
linSample | inFrame [MAX_FRAME_SIZE]
linSample | outFrame [MAX_FRAME_SIZE]

Define Documentation

#define SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES 15

on for this frames, off for this frames and repeat

Definition at line 139 of file test.c.

Referenced by siu_process_txrx().

#define SIU_VAU_ALERT_IN_FRAMES 8

Definition at line 141 of file test.c.

Referenced by siu_process_txrx().


NMU VAU Test: test.c Source File

  • File List
  • Globals

test.c

Go to the documentation of this file.
00001
00021 /* @{ */
00022
00023 #include <stdio.h>
00024 #include <stdlib.h>
00025 #include <string.h>
00026 #include <xdc/std.h>
00027 #include <ti/mas/types/types.h>
00028 #include <ti/mas/util/utl.h>
00029 #include <ti/mas/util/pkt.h>
00030 #include <ti/mas/util/debug.h>
00031 #include <ti/mas/iface/ifvau/ifvau.h>
00032 #include <ti/mas/vau/vau.h>
00033 #include <ti/mas/iface/ifnmu/ifnmutx.h>
00034 #include <ti/mas/iface/ifnmu/ifnmurx.h>
00035 #include <ti/mas/nmu/nmutx.h>
00036 #include <ti/mas/nmu/nmurx.h>
00037 #include <ti/xdais/dm/isphenc1.h>
00038 #include <ti/xdais/dm/isphdec1.h>
00039 #include <ti/xdais/ialg.h>
00040 #include <ti/mas/nmu/test/src/mem.h>
00041
00042 #define ti_mas_nmu_Version__nolocalnames
00043 #define ti_mas_vau_Version__nolocalnames
00044
00045 #include <ti/mas/vau/Version.h>
00046 #include <ti/mas/nmu/Version.h>
00047
00048 // #define AZ_INFO_AVAILABLE
00049
00050 #ifdef USE_CACHE
00051 #include <ti/mas/sdk/memArchCfg.h>
00052 #endif
00053
00054 #ifdef PROFILE_CYCLES
00055 #include <ti/mas/sdk/profile.h>
00056 #endif
00057
00058 #define SIU_MAX_MODULE_NBUFS 100
00059 #define MAX_FRAME_SIZE 80
00060 #define SIU_INITIAL_SILENCE_FRAMES 20
00064 typedef struct config_s {
00065   tbool     xdaisFlag;
00067   tbool     xdaisDefaultCfgFlag;
00071   tint      frameSize;
00073   tint      vauBypass;
00075   tint      allNoiseAfterFirstVoice2Noise;
00079   ifvauConfig_t vauConfig;
00080   ifvauControl_t vauControl;
00081   ifnmutxConfig_t nmutxConfig;
00082   ifnmurxConfig_t nmurxConfig;
00083 #ifdef USE_CACHE
00084   tint  doCacheFlush;
00085   tint  doCacheEnable;
00086 #endif
00087 } config_t;
00088
00092 config_t  config = {
00093   1,  /* xdaisFlag */
00094   0,  /* don't use default configuration for xdais */
00095   80,                           /* 10 ms default frame size */
00096   0,                            /* do not bypass VAU */
00097   0,                            /* no setting permanently to noise after first
00098                                    transition */
00099
00100   /* vauConfig */
00101   {
00102    ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
00103    ifvau_TYPE_ADAPTIVE,
00104    0,
00105    180},
00106
00107   /* vauControl */
00108   {
00109    ifvau_VALID_CONTROL,
00110    ifvau_ENABLE},
00111
00112   /* nmutxConfig */
00113   {
00114    ifnmutx_CONFIG_VALID_NOISE_MODE | ifnmutx_CONFIG_VALID_NOISE_LP_ORDER,
00115    ifnmutx_CONFIG_NOISE_MODE_G711A2,
00116    ifnmutx_CONFIG_MAX_LP_ORDER,
00117    },
00118
00119   /* nmurxConfig */
00120   {
00121    ifnmurx_CONFIG_VALID_NOISE_MODE | ifnmurx_CONFIG_VALID_NOISE_LP_ORDER,
00122    ifnmurx_CONFIG_NOISE_MODE_G711A2,
00123    ifnmurx_CONFIG_MAX_LP_ORDER,
00124    }
00125 #ifdef USE_CACHE
00126  ,1, /* doCacheFlush */
00127   1  /* doCacheEnable */
00128 #endif
00129 };
00130
00132 typedef struct cycles_s {
00133   tlong     max;
00134   tlong     avg;
00135 } cycles_t;
00136
00137
00138 typedef struct vauSim_s {
00139 #define SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES 15
00141 #define SIU_VAU_ALERT_IN_FRAMES 8
00142   tint      countOnOff;
00143   ISPHENC1_FrameType state;
00144   tbool     vadAlertFlag;
00145 } vauSim_t;
00146
00149 typedef struct siuInst_s {
00150   void     *vauInst;
00151   IALG_Handle vauXdaisInst;
00152   void     *nmutxInst;
00153   IALG_Handle nmutxXdaisInst;
00154   void     *nmurxInst;
00155   IALG_Handle nmurxXdaisInst;
00156   tlong     frameCount;
00157   tlong     prevSIDframeCount;
00158   FILE     *inFrameFilePtr;
00159   FILE     *outFrameFilePtr;
00160 #ifdef PROFILE_CYCLES
00161   FILE   *outCyclesFilePtr;
00162 #endif
00163   FILE     *AzFilePtr;
00164   FILE     *SIDfilePtr;
00165   tint      inFrameInitialSilenceFrames;
00166   tlong     cyclesOverhead;
00167   cycles_t  cyclesVau;
00168   cycles_t  cyclesNmuTx;
00169   cycles_t  cyclesNmuRx;
00170   tint      isVoice;
00171   tuint     numSIDs;
00172   vauSim_t  vauSim;
00173   tulong   xdaisBufsMallocFreeCounter;
00176 } siuInst_t;
00177
00178 siuInst_t siuInst;
00179
00180 void siu_open(void)
00181 {
00182 #ifdef PROFILE_CYCLES
00183   volatile tlong cycles;
00184 #endif
00185
00186   memset(&siuInst, 0, sizeof(siuInst_t));
00187
00188   siu_init_heaps();
00189
00190   if ((siuInst.inFrameFilePtr = fopen("..\\..\\vectors\\inp\\in.raw", "rb")) == NULL) {
00191     printf(" Error opening in.raw\n");
00192     exit(0);
00193   }
00194
00195   if ((siuInst.outFrameFilePtr =
00196        fopen("..\\..\\vectors\\out\\out.raw", "wb")) == NULL) {
00197     printf(" Error opening out.raw\n");
00198     exit(0);
00199   }
00200
00201   if ((siuInst.AzFilePtr = fopen("..\\..\\logs\\Az.csv", "wt")) == NULL) {
00202     printf(" Error opening Az.csv\n");
00203     exit(0);
00204   }
00205
00206   if ((siuInst.SIDfilePtr = fopen("..\\..\\logs\\SID.csv", "wt")) == NULL) {
00207     printf(" Error opening SID.csv\n");
00208     exit(0);
00209   }
00210
00211   siuInst.inFrameInitialSilenceFrames = SIU_INITIAL_SILENCE_FRAMES;
00212
00213   siuInst.vauSim.state = ISPHENC1_FTYPE_SPEECH;
00214   siuInst.vauSim.vadAlertFlag = FALSE;
00215
00216   /* measure measurement overhead of cycles */
00217
00218 #ifdef PROFILE_CYCLES
00219   if ((siuInst.outCyclesFilePtr =
00220     fopen("..\\..\\logs\\cycles.txt", "wt")) == NULL) {
00221     printf(" Error opening cycles.txt\n");
00222     exit(0);
00223   }
00224   cycles = profile_getCPUcycleCount();
00225 #endif
00226
00227 #ifdef PROFILE_CYCLES
00228   cycles = (profile_getCPUcycleCount() - cycles);
00229   siuInst.cyclesOverhead = cycles;
00230 #endif
00231
00232 }
00233
00234 #ifdef PROFILE_CYCLES
00235 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00236                                          tlong overhead)
00237 {
00238   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00239          (long) cyclesPtr->max - (long) overhead,
00240          (long) cyclesPtr->avg - (long) overhead);
00241 }
00242
00243 void siu_print_cycles(void)
00244 {
00245   siu_print_cycles_util(&siuInst.cyclesVau, "Vau", siuInst.cyclesOverhead);
00246   siu_print_cycles_util(&siuInst.cyclesNmuTx, "Nmu Tx", siuInst.cyclesOverhead);
00247   siu_print_cycles_util(&siuInst.cyclesNmuRx, "Nmu Rx", siuInst.cyclesOverhead);
00248 }
00249 #endif
00250
00251 void siu_dealloc_ialg_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
00252 {
00253   Int nbufs;
00254   IALG_MemRec *xdaisBufsPtr;
00255
00256   nbufs = ialgFxnsPtr->algNumAlloc();
00257   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00258
00259   nbufs = ialgFxnsPtr->algFree(xdaisInstPtr, xdaisBufsPtr);
00260
00261   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00262
00263   free(xdaisBufsPtr);
00264 }
00265
00266
00267 void siu_close(void)
00268 {
00269   fclose(siuInst.inFrameFilePtr);
00270   fclose(siuInst.outFrameFilePtr);
00271   fclose(siuInst.AzFilePtr);
00272   fclose(siuInst.SIDfilePtr);
00273   printf(" Number of SIDs = %d\n", siuInst.numSIDs);
00274
00275 #ifdef PROFILE_CYCLES
00276   fclose(siuInst.outCyclesFilePtr);
00277   siu_print_cycles();
00278   profile_closeCycleProfiling();
00279 #endif
00280
00281   if (config.xdaisFlag) {
00282     siu_dealloc_ialg_mem (&nmurxXdaisCallTable.ialg, siuInst.nmurxXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00283     siu_dealloc_ialg_mem (&nmutxXdaisCallTable.ialg, siuInst.nmutxXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00284     siu_dealloc_ialg_mem (&vauXdaisCallTable.ialg, siuInst.vauXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00285     if (siuInst.xdaisBufsMallocFreeCounter) {
00286       printf(" Error: mismatched malloc-free\n");
00287     }
00288   }
00289
00290   memset(&siuInst, 0, sizeof(siuInst_t));
00291 }
00292
00293 tuint siu_pvp_control(tuint ID)
00294 {
00295   return (1);
00296 }
00297
00298 typedef struct {
00299  tuint msgCode;
00300  char  msgString[200];
00301 } msgTable_t;
00302
00303 msgTable_t nmuTxWarnings[] = {
00304   nmutx_W1,
00305   nmutx_W2,
00306   nmutx_W3,
00307   nmutx_W4,
00308   nmutx_W5,
00309   nmutx_W6,
00310   nmutx_W7,
00311   nmutx_W8,
00312   nmutx_W9,
00313   nmutx_W10
00314 };
00315
00316 msgTable_t nmuTxExceptions[] = {
00317   nmutx_E1
00318 };
00319
00320 msgTable_t nmuRxWarnings[] = {
00321   nmurx_W1,
00322   nmurx_W2,
00323   nmurx_W3,
00324   nmurx_W4,
00325   nmurx_W5,
00326   nmurx_W6,
00327   nmurx_W7,
00328   nmurx_W8,
00329   nmurx_W9,
00330   nmurx_W10,
00331   nmurx_W11
00332 };
00333
00334 msgTable_t nmuRxExceptions[] = {
00335   nmurx_E1
00336 };
00337
00338 #define SIU_MAX_ERR_MSG_STRING_LENGTH 100
00339
00340 typedef struct {
00341   tuint ID;
00342   char  name[SIU_MAX_ERR_MSG_STRING_LENGTH];
00343   msgTable_t *warnTbl;
00344   tuint sizeWarnTbl;
00345   msgTable_t *excTbl;
00346   tuint sizeExcTbl;
00347 } msgTables_t;
00348
00349 #define NMUTX_ID 1
00350 #define NMURX_ID 2
00351
00352 msgTables_t msgTables[] = {
00353   {NMUTX_ID, "nmuTx", nmuTxWarnings, sizeof(nmuTxWarnings)/sizeof(msgTable_t), nmuTxExceptions, sizeof(nmuTxExceptions)/sizeof(msgTable_t)},
00354   {NMURX_ID, "nmuRx", nmuRxWarnings, sizeof(nmuRxWarnings)/sizeof(msgTable_t), nmuRxExceptions, sizeof(nmuRxExceptions)/sizeof(msgTable_t)},
00355 };
00356
00357 char *siuGetMsg(msgTable_t *tbl, tuint size, tuint msgCode)
00358 {
00359   int i;
00360   for (i = 0; i < size; i++) {
00361     if (tbl[i].msgCode == msgCode) {
00362       return(tbl[i].msgString);
00363     }
00364   }
00365   printf(" Fatal: Table entry not found\n");
00366   exit(0);
00367   return(NULL);
00368 }
00369
00370 void siu_debug_info(void * inID, tuint msgType, tuint msgCode, tuint msgLength,
00371                     tuint * supportingData)
00372 {
00373   int i;
00374   int doExit = 0, found;
00375   msgTables_t *msgTblPtr;
00376   tuint ID = *((tuint *) inID);
00377
00378   for (i = 0, found = 0; i < sizeof(msgTables)/sizeof(msgTables_t); i++) {
00379     if (msgTables[i].ID == ID) {
00380       found = 1;
00381       msgTblPtr = &msgTables[i];
00382     }
00383   }
00384
00385   if (! found) {
00386      printf("Message from unknown module of ID %d received, quitting..\n", ID);
00387      exit(0);
00388   }
00389
00390   printf("%s :", msgTblPtr->name);
00391
00392   switch (msgType) {
00393     case  dbg_TRACE_INFO:
00394       printf("Trace Info: ");
00395     break;
00396     case dbg_WARNING:
00397       printf("Warning in ");
00398       printf("%s\n",siuGetMsg(msgTblPtr->warnTbl, msgTblPtr->sizeWarnTbl, msgCode));
00399     break;
00400     case dbg_EXCEPTION_FATAL:
00401       printf("Exception: ");
00402       printf("%s\n",siuGetMsg(msgTblPtr->excTbl, msgTblPtr->sizeExcTbl, msgCode));
00403       doExit = 1;
00404     break;
00405     default:
00406       printf(" Invalid diagnostic message, exiting..");
00407     break;
00408   }
00409
00410   if (msgLength) {
00411     printf("\nSupporting Data: ");
00412     for (i = 0; i < msgLength; i++) {
00413       printf("%d\n",supportingData[i]);
00414     }
00415   }
00416
00417   if (doExit) {
00418     printf("\n Exiting.. ");
00419     exit(0);
00420   }
00421 }
00422
00423 void siu_new_open_config_modules(config_t * config)
00424 {
00425   tint      nbufs, ret;
00426   const ecomemBuffer_t *sizeBufs;
00427   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00428   const IALG_Params *paramsPtr;
00429   IALG_MemRec *xdaisBufsPtr;
00430
00431   vauSizeConfig_t vauSizeCfg;
00432   vauOpenConfig_t vauOpenCfg;
00433
00434   vauXdaisInitParams_t vauXdaisInitParams;
00435
00436   nmutxSizeConfig_t nmutxSizeCfg;
00437   nmutxNewConfig_t nmutxNewCfg;
00438   nmutxOpenConfig_t nmutxOpenCfg;
00439
00440   nmutxXdaisAllocParams_t nmutxXdaisAllocParams;
00441   nmutxXdaisInitParams_t nmutxXdaisInitParams;
00442
00443   nmurxSizeConfig_t nmurxSizeCfg;
00444   nmurxNewConfig_t nmurxNewCfg;
00445   nmurxOpenConfig_t nmurxOpenCfg;
00446
00447   nmurxXdaisAllocParams_t nmurxXdaisAllocParams;
00448   nmurxXdaisInitParams_t nmurxXdaisInitParams;
00449
00450   vauXdaisInitParams.param.size = (Int) sizeof(vauXdaisInitParams_t);
00451
00452   nmutxXdaisAllocParams.param.size = (Int) sizeof(nmutxXdaisAllocParams_t);
00453   nmutxXdaisInitParams.param.size = (Int) sizeof(nmutxXdaisInitParams_t);
00454
00455   nmurxXdaisAllocParams.param.size = (Int) sizeof(nmurxXdaisAllocParams_t);
00456   nmurxXdaisInitParams.param.size = (Int) sizeof(nmurxXdaisInitParams_t);
00457
00458   printf("Querying VAU Memory Requirements\n");
00459
00460   vauSizeCfg.max_frame_size = config->frameSize;
00461   vauSizeCfg.max_sampling_rate_8k_multiple = vau_SAMP_RATE_8KHZ;
00462
00463   if (config->xdaisFlag) {
00464     nbufs = (tint) vauXdaisCallTable.ialg.algNumAlloc();
00465     if (nbufs == 0) {
00466       printf(" algNumAlloc error, exiting\n");
00467       exit(0);
00468     }
00469
00470     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00471     if (xdaisBufsPtr == NULL) {
00472       printf("Not enough heap for VAU memory records, exiting\n");
00473       exit(0);
00474     }
00475     if (config->xdaisDefaultCfgFlag) {
00476       paramsPtr = NULL;
00477     }
00478     else {
00479       /* currently no config supported in vau for alloc, but if introduce in
00480          future, refer to that configuration */
00481       paramsPtr = NULL;
00482     }
00483     vauXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00484   }
00485   else {
00486     if (vauGetSizes(&nbufs, &sizeBufs, &vauSizeCfg) != vau_NOERR) {
00487       printf(" Vau get sizes error, exiting \n");
00488       exit(0);
00489     }
00490   }
00491
00492   printf("Allocating VAU memory \n");
00493
00494   if (config->xdaisFlag) {
00495     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00496     siuInst.vauXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00497   }
00498   else {
00499     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00500   }
00501
00502   vauOpenCfg.frame_size = config->frameSize;
00503   vauOpenCfg.sampling_rate_8k_multiple = vau_SAMP_RATE_8KHZ;
00504   vauOpenCfg.config = config->vauConfig;
00505
00506   if (config->xdaisFlag) {
00507     if (config->xdaisDefaultCfgFlag) {
00508       paramsPtr = NULL;
00509     }
00510     else {
00511       vauXdaisInitParams.cfgOpen = vauOpenCfg;
00512       paramsPtr = (IALG_Params *) &vauXdaisInitParams;
00513     }
00514     ret = vauXdaisCallTable.ialg.algInit(siuInst.vauXdaisInst,
00515                                    xdaisBufsPtr, NULL, paramsPtr);
00516
00517     free(xdaisBufsPtr);
00518
00519     if (ret == IALG_EFAIL) {
00520       printf("algInit() failure, exiting\n");
00521       exit(0);
00522     }
00523   }
00524   else {
00525     if (vauNew(&(siuInst.vauInst), nbufs, ecoBufs) != vau_NOERR) {
00526       printf(" Vau New error, exiting \n");
00527       exit(0);
00528     }
00529     vauOpen(siuInst.vauInst, &vauOpenCfg);
00530   }
00531
00532   if (config->xdaisFlag) {
00533     vauXdaisCallTable.control (siuInst.vauXdaisInst, &(config->vauConfig), &(config->vauControl));
00534   }
00535   else {
00536     vauControl(siuInst.vauInst, &(config->vauConfig), &(config->vauControl));
00537   }
00538
00539   printf("Querying NMU Tx Memory Requirements\n");
00540
00541   /* nmu Tx */
00542   nmutxSizeCfg.config = config->nmutxConfig;
00543
00544   if (config->xdaisFlag) {
00545     nbufs = (tint) nmutxXdaisCallTable.ialg.algNumAlloc();
00546     if (nbufs == 0) {
00547       printf(" algNumAlloc error, exiting\n");
00548       exit(0);
00549     }
00550
00551     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00552     if (xdaisBufsPtr == NULL) {
00553       printf("Not enough heap for nmu tx memory records, exiting\n");
00554       exit(0);
00555     }
00556     if (config->xdaisDefaultCfgFlag) {
00557       paramsPtr = NULL;
00558     }
00559     else {
00560       nmutxXdaisAllocParams.cfg = nmutxSizeCfg;
00561       paramsPtr = (IALG_Params *) &nmutxXdaisAllocParams;
00562     }
00563     nmutxXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00564   }
00565   else {
00566     if (nmutxGetSizes(&nbufs, &sizeBufs, &nmutxSizeCfg) != nmutx_NOERR) {
00567       printf(" Nmu Tx get sizes error, exiting \n");
00568       exit(0);
00569     }
00570   }
00571
00572   printf("Allocating NMU Tx memory \n");
00573
00574   if (config->xdaisFlag) {
00575     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00576     siuInst.nmutxXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00577   }
00578   else {
00579     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00580   }
00581
00582   nmutxNewCfg.ID = NMUTX_ID;
00583   nmutxNewCfg.debugInfo = siu_debug_info;
00584   nmutxNewCfg.sizeCfg = nmutxSizeCfg;
00585   nmutxNewCfg.isSidAllowed = siu_pvp_control;
00586   nmutxNewCfg.g711a2TxProcessDecimateInterval =
00587       nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS;
00588   nmutxOpenCfg.level_format = nmutx_LEVEL_FORMAT_dBov;
00589   nmutxOpenCfg.frame_size = config->frameSize;
00590   nmutxOpenCfg.config = config->nmutxConfig;
00591
00592   if (config->xdaisFlag) {
00593     if (config->xdaisDefaultCfgFlag) {
00594       paramsPtr = NULL;
00595     }
00596     else {
00597       nmutxXdaisInitParams.cfgNew = nmutxNewCfg;
00598       nmutxXdaisInitParams.cfgOpen = nmutxOpenCfg;
00599       paramsPtr = (IALG_Params *) &nmutxXdaisInitParams;
00600     }
00601     ret = nmutxXdaisCallTable.ialg.algInit(siuInst.nmutxXdaisInst,
00602                                    xdaisBufsPtr, NULL, paramsPtr);
00603
00604     free(xdaisBufsPtr);
00605
00606     if (ret == IALG_EFAIL) {
00607       printf("algInit() failure, exiting\n");
00608       exit(0);
00609     }
00610   }
00611   else {
00612     if (nmutxNew(&siuInst.nmutxInst, nbufs, ecoBufs, &nmutxNewCfg) != nmutx_NOERR) {
00613       printf(" Nmu Tx New error, exiting \n");
00614       exit(0);
00615     }
00616
00617     nmutxOpen(siuInst.nmutxInst, &nmutxOpenCfg);
00618   }
00619
00620   /* although control is not necessary to exercise here, it is good to test to
00621      see if it does not produce side effects, real test is to issue
00622      control during frame processing */
00623   if (config->xdaisFlag) {
00624     nmutxXdaisCallTable.control (siuInst.nmutxXdaisInst, &(config->nmutxConfig));
00625   }
00626   else {
00627     nmutxControl(siuInst.nmutxInst, &(config->nmutxConfig));
00628   }
00629
00630   printf("Querying NMU Rx Memory Requirements\n");
00631
00632   nmurxSizeCfg.config = config->nmurxConfig;
00633
00634   if (config->xdaisFlag) {
00635     nbufs = (tint) nmurxXdaisCallTable.ialg.algNumAlloc();
00636     if (nbufs == 0) {
00637       printf(" algNumAlloc error, exiting\n");
00638       exit(0);
00639     }
00640
00641     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00642     if (xdaisBufsPtr == NULL) {
00643       printf("Not enough heap for nmu rx memory records, exiting\n");
00644       exit(0);
00645     }
00646     if (config->xdaisDefaultCfgFlag) {
00647       paramsPtr = NULL;
00648     }
00649     else {
00650       nmurxXdaisAllocParams.cfg = nmurxSizeCfg;
00651       paramsPtr = (IALG_Params *) &nmurxXdaisAllocParams;
00652     }
00653     nmurxXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00654   }
00655   else {
00656     /* nmu Rx */
00657     if (nmurxGetSizes(&nbufs, &sizeBufs, &nmurxSizeCfg) != nmurx_NOERR) {
00658       printf(" Nmu Rx get sizes error, exiting \n");
00659       exit(0);
00660     }
00661   }
00662
00663   printf("Allocating NMU Rx memory \n");
00664
00665   if (config->xdaisFlag) {
00666     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00667     siuInst.nmurxXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00668   }
00669   else {
00670     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00671   }
00672
00673   nmurxNewCfg.ID = NMURX_ID;
00674   nmurxNewCfg.debugInfo = siu_debug_info;
00675   nmurxNewCfg.sizeCfg = nmurxSizeCfg;
00676   nmurxOpenCfg.level_format = nmurx_LEVEL_FORMAT_dBov;
00677   nmurxOpenCfg.frame_size = config->frameSize;
00678   nmurxOpenCfg.config = config->nmurxConfig;
00679
00680   if (config->xdaisFlag) {
00681     if (config->xdaisDefaultCfgFlag) {
00682       paramsPtr = NULL;
00683     }
00684     else {
00685       nmurxXdaisInitParams.cfgNew = nmurxNewCfg;
00686       nmurxXdaisInitParams.cfgOpen = nmurxOpenCfg;
00687       paramsPtr = (IALG_Params *) &nmurxXdaisInitParams;
00688     }
00689     ret = nmurxXdaisCallTable.ialg.algInit(siuInst.nmurxXdaisInst,
00690                                    xdaisBufsPtr, NULL, paramsPtr);
00691
00692     free(xdaisBufsPtr);
00693
00694     if (ret == IALG_EFAIL) {
00695       printf("algInit() failure, exiting\n");
00696       exit(0);
00697     }
00698   }
00699   else {
00700     if (nmurxNew(&siuInst.nmurxInst, nbufs, ecoBufs, &nmurxNewCfg) != nmurx_NOERR) {
00701       printf(" Nmu Rx New error, exiting \n");
00702       exit(0);
00703     }
00704
00705     nmurxOpen(siuInst.nmurxInst, &nmurxOpenCfg);
00706   }
00707
00708   /* although control is not necessary to exercise here, it is good to test to
00709      see if it does not produce side effects, real test is to issue
00710      control during frame processing */
00711   if (config->xdaisFlag) {
00712     nmurxXdaisCallTable.control (siuInst.nmurxXdaisInst, &(config->nmurxConfig));
00713   }
00714   else {
00715     nmurxControl(siuInst.nmurxInst, &(config->nmurxConfig));
00716   }
00717 }
00718
00719 #ifdef PROFILE_CYCLES
00720 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00721 {
00722   if (cycles > cyclesPtr->max) {
00723     cyclesPtr->max = cycles;
00724   }
00725
00726   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00727 }
00728 #endif
00729
00730 #ifdef AZ_INFO_AVAILABLE
00731 extern tint glob_Az[];
00732 #endif
00733
00734 #if 0
00735 int       nmurxCount = 1;
00736 #endif
00737
00738 void siu_process_txrx(linSample * framePtr, linSample ** outFramePtr)
00739 {
00740   linSample *vauOutSamplesPtr = *outFramePtr;
00741   ISPHENC1_FrameType vauFrameType;
00742   tword *nmutxOutCwseg;
00743   tint  nmutxOutCwsegSize;
00744   ISPHDEC1_FrameType nmu_rx_frame_type;
00745   tint      i;
00746   tword    *cwseg;
00747   tbool     vadAlertFlag = FALSE;
00748
00749 #ifdef PROFILE_CYCLES
00750   volatile tlong cycles;
00751 #endif
00752 #ifdef AZ_INFO_AVAILABLE
00753   tint      sidDeclared;
00754 #endif
00755   tword     cwsegPackedMem[utlNbytes2NtwordsCeil(ifnmutx_CONFIG_MAX_LP_ORDER + 1)];
00756   tword     cwsegUnpacked[ifnmutx_CONFIG_MAX_LP_ORDER + 1];
00757   tint      numBytes;
00758
00759   nmutxOutCwseg = cwsegPackedMem;
00760
00761 #ifdef USE_CACHE
00762   if (config.doCacheFlush) {
00763     memarchcfg_cacheFlush();
00764   }
00765 #endif
00766
00767   if (config.vauBypass) {
00768     memcpy(vauOutSamplesPtr, framePtr, sizeof(linSample) * config.frameSize);
00769
00770     switch (siuInst.vauSim.state) {
00771       case ISPHENC1_FTYPE_SPEECH:
00772         if (siuInst.vauSim.countOnOff ==
00773             (SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES - SIU_VAU_ALERT_IN_FRAMES)) {
00774           siuInst.vauSim.vadAlertFlag = TRUE;
00775         }
00776         break;
00777       case ISPHENC1_FTYPE_NODATA:
00778         if ((!config.allNoiseAfterFirstVoice2Noise) &&
00779             (siuInst.vauSim.countOnOff == SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES)) {
00780           siuInst.vauSim.state = ISPHENC1_FTYPE_SPEECH;
00781           siuInst.vauSim.countOnOff = 0;
00782         }
00783         break;
00784       default:
00785         break;
00786     }
00787
00788     vadAlertFlag = siuInst.vauSim.vadAlertFlag;
00789
00790     if (siuInst.vauSim.vadAlertFlag) {
00791       if (siuInst.vauSim.countOnOff == SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES - 1) {
00792         siuInst.vauSim.state = ISPHENC1_FTYPE_NODATA;
00793         siuInst.vauSim.countOnOff = 0;
00794         siuInst.vauSim.vadAlertFlag = FALSE;
00795       }
00796     }
00797
00798     siuInst.vauSim.countOnOff++;
00799     vauFrameType = siuInst.vauSim.state;
00800   }
00801   else {
00802
00803 #ifdef PROFILE_CYCLES
00804     cycles = profile_getCPUcycleCount();
00805 #endif
00806
00807     if (config.xdaisFlag) {
00808       vadAlertFlag =
00809       vauXdaisCallTable.process(siuInst.vauXdaisInst, framePtr, &vauOutSamplesPtr,
00810                   &vauFrameType);
00811     }
00812     else {
00813       vadAlertFlag =
00814       vauProcess(siuInst.vauInst, framePtr, &vauOutSamplesPtr,
00815                 &vauFrameType);
00816     }
00817
00818 #if 0
00819     printf("c = %ld, f = %d a = %d\n", (long) siuInst.frameCount, vauFrameType,
00820            vadAlertFlag);
00821
00822     if (siuInst.frameCount > 279) {
00823       int       i, j, k;
00824
00825       printf("f = %d\n", (long) siuInst.frameCount);
00826       for (j = 0, k = 0; j < 8; j++) {
00827         for (i = 0; i < 10; i++) {
00828           printf("%7d ", (int) vauOutSamplesPtr[k++]);
00829         }
00830         printf("\n");
00831       }
00832     }
00833 #endif
00834
00835 #ifdef PROFILE_CYCLES
00836     cycles = (profile_getCPUcycleCount() - cycles);
00837     siu_process_cycles(cycles, &siuInst.cyclesVau);
00838 #endif
00839
00840   }
00841
00842 #ifdef USE_CACHE
00843   if (config.doCacheFlush) {
00844     memarchcfg_cacheFlush();
00845   }
00846 #endif
00847
00848 #ifdef PROFILE_CYCLES
00849   cycles = profile_getCPUcycleCount();
00850 #endif
00851
00852   /* vau above will classify as voice, noise (no-data) and generate alert flag,
00853      nmutx will classify as voice, sid or noise */
00854   if (config.xdaisFlag) {
00855     nmutxXdaisCallTable.process(siuInst.nmutxXdaisInst, &vauFrameType, vadAlertFlag,
00856                                 vauOutSamplesPtr, &nmutxOutCwsegSize, nmutxOutCwseg);
00857   }
00858   else {
00859     nmutxProcess(siuInst.nmutxInst, &vauFrameType, vadAlertFlag, vauOutSamplesPtr,
00860                  &nmutxOutCwsegSize, nmutxOutCwseg);
00861   }
00862
00863 #ifdef PROFILE_CYCLES
00864   cycles = (profile_getCPUcycleCount() - cycles);
00865   siu_process_cycles(cycles, &siuInst.cyclesNmuTx);
00866   fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00867 #endif
00868
00869   /* translate to appropriate frame types to be understood by rx nmu */
00870 #ifdef AZ_INFO_AVAILABLE
00871   sidDeclared = 0;
00872 #endif
00873   switch (vauFrameType) {
00874     case ISPHENC1_FTYPE_SIDFRAME:
00875       nmu_rx_frame_type = ISPHDEC1_FTYPE_SIDUPDATE;
00876       if (siuInst.isVoice) {
00877         printf(" SID tx ( first)");
00878       }
00879       else {
00880         printf(" SID tx (update)");
00881       }
00882       printf(" at frame %10ld, deltaTime = %5ld, SID = ", (long) siuInst.frameCount,
00883              (long) (siuInst.frameCount - siuInst.prevSIDframeCount));
00884       siuInst.prevSIDframeCount = siuInst.frameCount;
00885       cwseg = nmutxOutCwseg;
00886       numBytes = nmutxOutCwsegSize / 8;
00887
00888       /* unpacking only for printing/logging purpose */
00889       pktUnpackWordsIntoBytes(cwseg, cwsegUnpacked, numBytes, 0);
00890       for (i = 0; i < numBytes; i++) {
00891         printf("%d ", cwsegUnpacked[i]);
00892         fprintf(siuInst.SIDfilePtr, "%5d, ", cwsegUnpacked[i]);
00893       }
00894       printf("\n");
00895       fprintf(siuInst.SIDfilePtr, "\n");
00896
00897       siuInst.isVoice = 0;
00898
00899 #ifdef AZ_INFO_AVAILABLE
00900       sidDeclared = 1;
00901 #endif
00902
00903       siuInst.numSIDs++;
00904
00905       break;
00906
00907     case ISPHENC1_FTYPE_SPEECH:
00908       nmu_rx_frame_type = ISPHDEC1_FTYPE_SPEECHGOOD;
00909       siuInst.isVoice = 1;
00910       break;
00911
00912     case ISPHENC1_FTYPE_NODATA:
00913       nmu_rx_frame_type = ISPHDEC1_FTYPE_NODATA;
00914       siuInst.isVoice = 0;
00915       break;
00916
00917     default:
00918       printf(" Bad nmu Tx out frame type\n");
00919       exit(0);
00920       break;
00921   }
00922
00923 #ifdef USE_CACHE
00924   if (config.doCacheFlush) {
00925     memarchcfg_cacheFlush();
00926   }
00927 #endif
00928
00929 #ifdef PROFILE_CYCLES
00930   cycles = profile_getCPUcycleCount();
00931 #endif
00932
00933 #if 0
00934   {
00935     int       i;
00936
00937     printf("\nNmu Rx call %d\n", nmurxCount++);
00938     printf("frameType %d\n", nmu_rx_frame_type);
00939     // printf("cwseg_size %d\n",nmutxOutCwsegSize);
00940     if (nmu_rx_frame_type == ISPHDEC1_FTYPE_SPEECHGOOD) {
00941       for (i = 0; i < 80; i++) {
00942         printf("%d\n", (int) vauOutSamplesPtr[i]);
00943       }
00944     }
00945   }
00946 #endif
00947
00948   if (config.xdaisFlag) {
00949     nmurxXdaisCallTable.process(siuInst.nmurxXdaisInst, nmu_rx_frame_type,
00950                                 nmutxOutCwsegSize, cwseg, vauOutSamplesPtr);
00951   }
00952   else {
00953     nmurxProcess(siuInst.nmurxInst, nmu_rx_frame_type, nmutxOutCwsegSize, cwseg, vauOutSamplesPtr);
00954   }
00955
00956 #ifdef PROFILE_CYCLES
00957   cycles = (profile_getCPUcycleCount() - cycles);
00958   siu_process_cycles(cycles, &siuInst.cyclesNmuRx);
00959 #endif
00960
00961 #ifdef AZ_INFO_AVAILABLE
00962   if (sidDeclared) {
00963     int       i;
00964
00965     fprintf(siuInst.AzFilePtr, "%ld,", (long) siuInst.frameCount);
00966     for (i = 0; i <= 10; i++) {
00967       fprintf(siuInst.AzFilePtr, "%f,", (float) glob_Az[i] / 4096.0);
00968     }
00969     fprintf(siuInst.AzFilePtr, "\n");
00970   }
00971 #endif
00972
00973   *outFramePtr = vauOutSamplesPtr;
00974 }
00975
00976 tint siu_read_inFrame(linSample * inFramePtr, tint numSamples)
00977 {
00978   int       i;
00979
00980   for (i = 0; i < numSamples; i++) {
00981     int       lsb, msb;
00982
00983     lsb = fgetc(siuInst.inFrameFilePtr);
00984     msb = fgetc(siuInst.inFrameFilePtr);
00985     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00986   }
00987
00988   if (feof(siuInst.inFrameFilePtr)) {
00989     /* silence the last frame as it could have garbage */
00990     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00991     return (0);
00992   }
00993   else {
00994     return (1);
00995   }
00996 }
00997 tint siu_write_outFrame(linSample * outFramePtr, tint numSamples)
00998 {
00999   int       i;
01000
01001   for (i = 0; i < numSamples; i++) {
01002     fputc(outFramePtr[i] & 0xFF, siuInst.outFrameFilePtr);
01003     fputc(((outFramePtr[i] >> 8) & 0xFF), siuInst.outFrameFilePtr);
01004   }
01005   return (0);
01006 }
01007
01008 void hw_init(void)
01009 {
01010 #ifdef PROFILE_CYCLES
01011   if (!profile_initCycleProfiling()) {
01012     printf("Could not acquire profiling resources..Exiting\n");
01013     exit(0);
01014   }
01015 #endif
01016
01017 #ifdef USE_CACHE
01018   if (config.doCacheEnable) {
01019     memarchcfg_cacheEnable();
01020   }
01021 #endif
01022 }
01023
01024
01025 linSample inFrame[MAX_FRAME_SIZE], outFrame[MAX_FRAME_SIZE];
01026
01027 void main(void)
01028 {
01029   linSample *outFramePtr = outFrame;
01030
01031   printf("Version Information of modules tested:\n");
01032   printf("VAU %d.%d.%d.%d\n",
01033           ti_mas_vau_Version_MAJOR, ti_mas_vau_Version_MINOR,
01034           ti_mas_vau_Version_XVERTICAL, ti_mas_vau_Version_PATCH);
01035
01036   printf("NMU %d.%d.%d.%d\n\n",
01037           ti_mas_nmu_Version_MAJOR, ti_mas_nmu_Version_MINOR,
01038           ti_mas_nmu_Version_XVERTICAL, ti_mas_nmu_Version_PATCH);
01039
01040   if (config.xdaisFlag) {
01041     printf("Using XDAIS APIs\n");
01042   }
01043   else {
01044     printf("Using ECO APIs\n");
01045   }
01046
01047   hw_init();
01048
01049   siu_open();
01050
01051   siu_new_open_config_modules(&config);
01052
01053   printf("Processing Frames..\n");
01054
01055   /* send some initial silence, this is the assumed background in which files will
01056      be piped in */
01057   while (siuInst.inFrameInitialSilenceFrames) {
01058     memset(inFrame, 0, config.frameSize * sizeof(linSample));
01059     siuInst.inFrameInitialSilenceFrames--;
01060     siu_process_txrx(inFrame, &outFramePtr);
01061   }
01062
01063   while (siu_read_inFrame(inFrame, config.frameSize)) {
01064     siuInst.frameCount++;
01065
01066     siu_process_txrx(inFrame, &outFramePtr);
01067
01068     if (siu_write_outFrame(outFramePtr, config.frameSize)) {
01069       printf(" Error writing output frame, exiting \n");
01070       exit(0);
01071
01072     }
01073
01074   }
01075
01076   siu_close();
01077
01078 }
01079
01080
01081 /* @} */ /* ingroup */
01082
01083 /* Nothing past this point */


PLC: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_plc_Version__top__
#define | __extern extern
#define | ti_mas_plc_Version___VERS 150
#define | ti_mas_plc_Version_MAJOR (1)
#define | ti_mas_plc_Version_MINOR (2)
#define | ti_mas_plc_Version_XVERTICAL (0)
#define | ti_mas_plc_Version_PATCH (2)
#define | ti_mas_plc_Version_BUILD (0)
#define | ti_mas_plc_Version_QUALITY (3)
#define | ti_mas_plc_Version_BTYPE (0)
#define | ti_mas_plc_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_plc_Version_MAJOR
#define | Version_MINOR ti_mas_plc_Version_MINOR
#define | Version_XVERTICAL ti_mas_plc_Version_XVERTICAL
#define | Version_PATCH ti_mas_plc_Version_PATCH
#define | Version_BUILD ti_mas_plc_Version_BUILD
#define | Version_QUALITY ti_mas_plc_Version_QUALITY
#define | Version_BTYPE ti_mas_plc_Version_BTYPE
#define | Version_WIDTH ti_mas_plc_Version_WIDTH

Define Documentation

#define ti_mas_plc_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_plc_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_plc_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_plc_Version_MINOR (2)

Definition at line 53 of file Version.h.

#define ti_mas_plc_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_plc_Version_PATCH (2)

Definition at line 59 of file Version.h.

#define ti_mas_plc_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_plc_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_plc_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_plc_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_plc_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_plc_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_plc_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_plc_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_plc_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_plc_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_plc_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_plc_Version_WIDTH

Definition at line 97 of file Version.h.


PLC: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_plc_Version__include
00023 #define ti_mas_plc_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_plc_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_plc_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_plc_Version_MAJOR (1)
00051
00052 /* MINOR */
00053 #define ti_mas_plc_Version_MINOR (2)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_plc_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_plc_Version_PATCH (2)
00060
00061 /* BUILD */
00062 #define ti_mas_plc_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_plc_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_plc_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_plc_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_plc_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_plc_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_plc_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_plc_Version_MAJOR
00091 #define Version_MINOR      ti_mas_plc_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_plc_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_plc_Version_PATCH
00094 #define Version_BUILD      ti_mas_plc_Version_BUILD
00095 #define Version_QUALITY    ti_mas_plc_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_plc_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_plc_Version_WIDTH
00098 #endif


PLC: Data Structures

  • Data Structures
  • Data Fields

PLC Data Structures

Here are the data structures with brief descriptions:
plcNewConfig_t | Create time configuration parameters
plcOpenConfig_t | Open time configuration parameters
plcSizeConfig_t | Size query time configuration parameters
plcXdaisAllocParams_t | Configuration parameters overloading for algAlloc API
plcXdaisCallTable_t | PLC's XDAIS call table definition
plcXdaisInitParams_t | Configuration parameters overloading for algInit API


PLC: Detailed PLC Description

PLC (Packet Loss Concealment) Package

Detailed PLC Description

Description

Packet Loss Concealment (PLC) is a mechanism to synthesize the missing signal during the period of packet loss. PLC algorithms, also known as frame erasure concealment algorithms, hide transmission losses in an audio system where the input signal is encoded and packetized at a transmitter, sent over a network, and received at a receiver that decodes the packet and plays out the output. PLC algorithms are designed to eliminate or minimize the speech-quality distortion and annoying impairments, such as pops, clicks, glitches, and harshness. Many speech coders have their own PLC algorithm built into the corresponding standards. The details of PLC algorithms can be found in corresponding codec descriptions.

This package includes the implementation of ITU-T Recommendation G.711 Appendix I, which is a high-quality, low-complexity algorithm for packet loss concealment. It requires a 47.85 msec. history buffer and has a 3.75 msec. algorithm delay. The PLC algorithm of ITU-T Recommendation G.711 Appendix I is capable of concealing errors when packets include up to 50 msec. of speech, and is effective when packet loss rates are as high as 20%. Annoying impairments, such as clicks, pops, and harshness are minimized, though intelligibility may suffer when packet loss rates are high.


PLC:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


PLC: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


PLC: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


PLC: PLC External API

PLC (Packet Loss Concealment) Package

PLC External API

Page Contents

  1. PLC ECO API
  2. PLC ECO Creation Functions
  3. PLC ECO Configuration Functions
  4. PLC ECO Execution Functions
  5. PLC ECO Destruction Functions
  6. PLC ECO Return Codes
  7. PLC XDais API

PLC ECO API

The PLC Embedded Communication Object (ECO) API consists of the following nine routines for PLC instance creation, configuration, destruction and execution.

  1. plcGetSizes()
  2. plcNew()
  3. plcOpen()
  4. plcControl()
  5. plcIsAlgSupported()
  6. plcRelocate()
  7. plcProcess()
  8. plcClose()
  9. plcDelete()

PLC ECO Creation Functions

PLC instance creation is a four step process. First, determine the PLC memory requirements via plcGetSizes below. Second, allocate the PLC memory buffers using any system-prescribed method. Create the PLC instance by passing the allocated buffer information to plcNew. Finally, open the PLC instance for use via the plcOpen API function. This process must be followed in the order given for proper operation. Once an PLC instance is opened, it may be used for packet concealment. Follow the links below for further details.

  1. plcGetSizes()
  2. plcNew()
  3. plcOpen()

PLC ECO Configuration Functions

The PLC component has two external API configuration routines; one to configure the instance - plcControl(), and one to to query for algorithmic support - plcIsAlgSupported. These external API functions require an active PLC instance that has been opened according to the procedure in PLC ECO Creation Functions above. Follow the links below for further details.

  1. plcControl()
  2. plcIsAlgSupported()

PLC ECO Execution Functions

The PLC execution API consists of two routines, one for RX path (Network-to_TDM) processing - plcProcess, and one for module instance relocation - plcRelocate. The execution API functions require an active PLC module instance that has been opened according to the procedure in PLC ECO Creation Functions above. Follow the links below for further details.

  1. plcProcess()
  2. plcRelocate()

PLC ECO Destruction Functions

PLC instance desctruction is a two step process. First, the PLC must be closed using the plcClose API function. Once the PLC is closed it may be removed via the plcDelete function.

  1. plcClose()
  2. plcDelete()

Note:
  1. Once an instance has been closed, it may be re-opened via the plcOpen() routine. The instance memory should not be reallocated until the instance is deleted.

PLC ECO Return Codes

The PLC module provides various kinds of output to indicate errors in configuration and/or execution.

  • PLC Warning Codes
  • PLC Error Codes
  • PLC Exception Codes

PLC XDais API

The PLC eXpressDsp Algorithm Interoperability Standard (XDAIS) API is available via plcXdaisCallTable. This call table provides the control and process API functions.


PLC: File Index

  • File List
  • Globals

PLC File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
plc.h [code] API definitions for the PLC component. Includes XDAIS and ECO (Telogy-proprietary) API definitions


PLC: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • cfg : plcXdaisAllocParams_t
  • cfgNew : plcXdaisInitParams_t
  • cfgOpen : plcXdaisInitParams_t
  • codingType : plcOpenConfig_t
  • config : plcSizeConfig_t , plcOpenConfig_t
  • control : plcXdaisCallTable_t
  • debugInfo : plcNewConfig_t
  • frame_size : plcOpenConfig_t
  • ialg : plcXdaisCallTable_t
  • ID : plcNewConfig_t
  • param : plcXdaisAllocParams_t , plcXdaisInitParams_t
  • process : plcXdaisCallTable_t
  • sizeCfg : plcNewConfig_t


PLC: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • cfg : plcXdaisAllocParams_t
  • cfgNew : plcXdaisInitParams_t
  • cfgOpen : plcXdaisInitParams_t
  • codingType : plcOpenConfig_t
  • config : plcSizeConfig_t , plcOpenConfig_t
  • control : plcXdaisCallTable_t
  • debugInfo : plcNewConfig_t
  • frame_size : plcOpenConfig_t
  • ialg : plcXdaisCallTable_t
  • ID : plcNewConfig_t
  • param : plcXdaisAllocParams_t , plcXdaisInitParams_t
  • process : plcXdaisCallTable_t
  • sizeCfg : plcNewConfig_t


PLC: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines
  • _
  • p
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h

- p -

  • plc_CODING_TYPE_ALAW : plc.h
  • plc_CODING_TYPE_MULAW : plc.h
  • plc_E1 : plc.h
  • plc_ERROR : plc.h
  • plc_EXC_INVALID_TYPE : plc.h
  • plc_NOERR : plc.h
  • plc_NOMEMORY : plc.h
  • plc_W1 : plc.h
  • plc_W2 : plc.h
  • plc_WARN_NEW_BAD_PLC_TYPE : plc.h
  • plc_WARN_OPN_BAD_PLC_TYPE : plc.h
  • plcClose() : plc.h
  • plcControl() : plc.h
  • plcDelete() : plc.h
  • plcGetSizes() : plc.h
  • plcIsAlgSupported() : plc.h
  • plcNew() : plc.h
  • plcOpen() : plc.h
  • plcProcess() : plc.h
  • plcRelocate() : plc.h
  • plcXdaisCallTable : plc.h

- t -

  • ti_mas_plc_Version___VERS : Version.h
  • ti_mas_plc_Version__top__ : Version.h
  • ti_mas_plc_Version_BTYPE : Version.h
  • ti_mas_plc_Version_BUILD : Version.h
  • ti_mas_plc_Version_MAJOR : Version.h
  • ti_mas_plc_Version_MINOR : Version.h
  • ti_mas_plc_Version_PATCH : Version.h
  • ti_mas_plc_Version_QUALITY : Version.h
  • ti_mas_plc_Version_WIDTH : Version.h
  • ti_mas_plc_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


PLC: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines

  • __extern : Version.h
  • plc_CODING_TYPE_ALAW : plc.h
  • plc_CODING_TYPE_MULAW : plc.h
  • plc_E1 : plc.h
  • plc_ERROR : plc.h
  • plc_NOERR : plc.h
  • plc_NOMEMORY : plc.h
  • plc_W1 : plc.h
  • plc_W2 : plc.h
  • ti_mas_plc_Version___VERS : Version.h
  • ti_mas_plc_Version__top__ : Version.h
  • ti_mas_plc_Version_BTYPE : Version.h
  • ti_mas_plc_Version_BUILD : Version.h
  • ti_mas_plc_Version_MAJOR : Version.h
  • ti_mas_plc_Version_MINOR : Version.h
  • ti_mas_plc_Version_PATCH : Version.h
  • ti_mas_plc_Version_QUALITY : Version.h
  • ti_mas_plc_Version_WIDTH : Version.h
  • ti_mas_plc_Version_XVERTICAL : Version.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


PLC: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines

  • plc_EXC_INVALID_TYPE : plc.h
  • plc_WARN_NEW_BAD_PLC_TYPE : plc.h
  • plc_WARN_OPN_BAD_PLC_TYPE : plc.h


PLC: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines

  • plcClose() : plc.h
  • plcControl() : plc.h
  • plcDelete() : plc.h
  • plcGetSizes() : plc.h
  • plcIsAlgSupported() : plc.h
  • plcNew() : plc.h
  • plcOpen() : plc.h
  • plcProcess() : plc.h
  • plcRelocate() : plc.h


PLC: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines

  • plcXdaisCallTable : plc.h


PLC: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


PLC: PLC Error Codes

PLC Error Codes
[PLC]

Collaboration diagram for PLC Error Codes:

Detailed Description

Error codes returned by PLC APIs.

Defines

#define | plc_NOMEMORY (-1)
#define | plc_NOERR 0
#define | plc_ERROR 1

Define Documentation

#define plc_NOMEMORY (-1)

Not used presently

Definition at line 75 of file plc.h.

#define plc_NOERR 0

Definition at line 76 of file plc.h.

#define plc_ERROR 1

Definition at line 77 of file plc.h.


PLC: PLC Exception Codes

PLC Exception Codes
[PLC]

Collaboration diagram for PLC Exception Codes:

Detailed Description

Exception messages.

Remarks:
These are mostly fatal, usually due to memory corruption, traps based on these help debugging.

Defines

#define | plc_E1 plc_EXC_INVALID_TYPE, "Processing: Invalid plc type"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Enumerations

enum | { plc_EXC_INVALID_TYPE = 1 }

Define Documentation

#define plc_E1 plc_EXC_INVALID_TYPE, "Processing: Invalid plc type"

Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Definition at line 66 of file plc.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
plc_EXC_INVALID_TYPE Invalid PLC type at processing time i.e in plcProcess/process(XDAIS)

Definition at line 58 of file plc.h.


PLC: PLC

PLC

Collaboration diagram for PLC:

Detailed Description

Modules

PLC Warning Codes
PLC Warning Messages.
PLC Exception Codes
Exception messages.
PLC Error Codes
Error codes returned by PLC APIs.

Data Structures

struct | plcSizeConfig_t
Size query time configuration parameters. More...
struct | plcNewConfig_t
Create time configuration parameters. More...
struct | plcOpenConfig_t
Open time configuration parameters. More...
struct | plcXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | plcXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | plcXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | plcXdaisCallTable_t
PLC's XDAIS call table definition. More...

XDAIS APIs

plcXdaisCallTable_t plcXdaisCallTable
reference of PLC XDAIS call table

ECO (Telogy Embedded Communication Object) APIs

Remarks:
new, delete, getSizes, open, close, relocate are standard ECO APIs so are not described here in detail.

tint | plcNew (void **plcInst, tint nbufs, ecomemBuffer_t *bufs, plcNewConfig_t *cfg)
void | plcDelete (void **plcInst)
tint | plcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, plcSizeConfig_t *cfg)
tint | plcOpen (void *plcInst, plcOpenConfig_t *cfg)
void | plcClose (void *plcInst)
tint | plcRelocate (void **plcInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMask)
void | plcProcess (void *plcInst, linSample *cwIn, linSample *inSamples, ISPHDEC1_FrameType frameType, tint bufferDepth)
Processing API.
tuint | plcControl (void *plcInst, ifplcConfig_t *cfg)
Control API.
tbool | plcIsAlgSupported (tuint mode)
API to query if plc_mode is supported in the image (does not mean it is enabled/disabled).

Function Documentation

tint plcNew | ( | void ** | plcInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | plcNewConfig_t * | cfg
 | ) |  |

void plcDelete ( void ** plcInst )

tint plcGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | plcSizeConfig_t * | cfg
 | ) |  |

tint plcOpen | ( | void * | plcInst,
 |  | plcOpenConfig_t * | cfg
 | ) |  |

void plcClose ( void * plcInst )

tint plcRelocate | ( | void ** | plcInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | tuint * | relocBufBitMask
 | ) |  |

void plcProcess | ( | void * | plcInst,
 |  | linSample * | cwIn,
 |  | linSample * | inSamples,
 |  | ISPHDEC1_FrameType | frameType,
 |  | tint | bufferDepth
 | ) |  |

Processing API.

Parameters:
[in] | plcInst | Algorithm instance handle.
[in] | cwIn | Currently not used, can be anything.
[in,out] | inSamples | Pointer to input frame of linear 16-bit samples and output produced by PLC processing when it is asked to generate concealment. The contents will be changed by PLC during speech (i.e not loss) also, the signal will be delayed by 3.75 ms. If PLC is disabled (plc type NONE in the configuration), input samples are left untouched unless loss was requested in which case output is silenced (linear 0s).
[in] | frameType | Type of frame, the ISPHDEC1_FrameType is as per XDM 1.0 (see its documentation), PLC will do concealment when frame type is SPEECHLOST and for all other frame types, it will update its history buffer and generate delayed output.
[in] | bufferDepth | Currently not used, can be anything.
Remarks:
plcProcess() performs actual concealment when requested.

tuint plcControl | ( | void * | plcInst,
 |  | ifplcConfig_t * | cfg
 | ) |  |

Control API.

Parameters:
[in] | plcInst | Algorithm instance handle.
[in] | cfg | Pointer to plc configuration structure defined in ifplc external interface
Return values:
PLC error code.
Remarks:
plcControl() Allows run-time configuration of parameters specified in the ifplc external interface. Restrictions apply based on what type of PLC was created and unserviced requests will be returned with error code and/or warning messages.

tbool plcIsAlgSupported ( tuint mode )

API to query if plc_mode is supported in the image (does not mean it is enabled/disabled).

Parameters:
[in] mode One of the possible noise_mode values as specified in ifplc external interface (ifplc.h)
Return values:
ret TRUE if mode requested is supported in the image, FALSE otherwise

Variable Documentation

plcXdaisCallTable_t plcXdaisCallTable

reference of PLC XDAIS call table


PLC: PLC Warning Codes

PLC Warning Codes
[PLC]

Collaboration diagram for PLC Warning Codes:

Detailed Description

PLC Warning Messages.

Defines

#define | plc_W1 plc_WARN_NEW_BAD_PLC_TYPE, "plcNew/algInit: Bad PLC type"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | plc_W2 plc_WARN_OPN_BAD_PLC_TYPE, "plcOpen/algInit: Bad PLC type"

Enumerations

enum | { plc_WARN_NEW_BAD_PLC_TYPE = 1, plc_WARN_OPN_BAD_PLC_TYPE = 2 }

Define Documentation

#define plc_W1 plc_WARN_NEW_BAD_PLC_TYPE, "plcNew/algInit: Bad PLC type"

Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.

Definition at line 44 of file plc.h.

#define plc_W2 plc_WARN_OPN_BAD_PLC_TYPE, "plcOpen/algInit: Bad PLC type"

Definition at line 45 of file plc.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
plc_WARN_NEW_BAD_PLC_TYPE | Invalid PLC type in plcNew/algInit
plc_WARN_OPN_BAD_PLC_TYPE | Invalid PLC type in plcOpen/algInit

Definition at line 35 of file plc.h.


PLC: PLC (Packet Loss Concealment) Package

PLC (Packet Loss Concealment) Package

Release 1.2.2.0

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

Packet Loss Concealment (PLC) is a mechanism to synthesize the missing signal during the period of packet loss. PLC algorithms, also known as frame erasure concealment algorithms, hide transmission losses in an audio system where the input signal is encoded and packetized at a transmitter, sent over a network, and received at a receiver that decodes the packet and plays out the output. PLC algorithms are designed to eliminate or minimize the speech-quality distortion and annoying impairments, such as pops, clicks, glitches, and harshness. Many speech coders have their own PLC algorithm built into the corresponding standards.

Additional links: Detailed PLC Description

Integration

The PLC component can be integrated into a system to perform voice activity detection as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the PLC code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | PLC External API
 | PLC Integration

Default Configuration

The following PLC parameters are configurable at instance creation (plcOpen):

  • Frame size (required)
  • Coding type (a-law/u-law required for ECO only)
  • Mode (ifplc_TYPE_NONE/ifplc_TYPE_G711A1)

The following PLC parameters are run-time configurable:

  • Mode (ifplc_TYPE_NONE/ifplc_TYPE_G711A1)

See plcControl() for more information.

Performance

The performance of the PLC algorithm depends on the specific codec implementation, speech signal characteristics, and packet loss patterns relative to the speech signal.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

N/A.

Standards Compliance

  • Packet loss concealment (PLC) is compliant with G.711 Appendix I.

Dependent Packages

The PLC package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

PLC Required Packages
Package | File Name | Compatibility Key
ti.mas.plc | ti_mas_plc_<fmt>_c<rtarg>_1_2_1_0.zip | [2,0,2,0]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]
ti.mas.iface.ifplc | ti_mas_iface_ifplc_<fmt>_c<rtarg>_1_1_0_0.zip | [2,0,0,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


PLC: PLC Integration

PLC (Packet Loss Concealment) Package

PLC Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking PLC with System
  • Initialization Structures

XDC Build Process

Required Tools

The following tools are required to build the PLC component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.00.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the PLC package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in PLC Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the PLC using the XDC tools, change to the PLC directory and proceed.

With the environment configured, XDC may be eployed to build the PLC and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the PLC packages. The first two commands provide a means to clean and build the PLC package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the PLC and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., PLC).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated PLC build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the PLC for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the PLC as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated PLC build files as in (1) above
    • Removes all generated build files for all PLC dependent packages

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking PLC with System

The PLC and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /plc
               /types
               /util
               /iface/ifplc

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the PLC API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/plc/plc.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., plc.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\plc\c<rtarg>\plc_c.a<rtarg>
  4. ti\mas\plc\c<rtarg>\plc_a.a<rtarg>

Initialization Structures

N/A.


PLC: Memory Requirements

PLC (Packet Loss Concealment) Package

Memory Requirements

Page Contents

  1. Assumptions
  2. C55x Target
    • C55x PLC Data Memory Requirements
    • C55x PLC Program Memory Requirements
  3. C64x/C64x+ Target
    • C64x/C64x+ PLC Data Memory Requirements
    • C64x PLC Program Memory Requirements
    • C64x+ PLC Program Memory Requirements

Assumptions

The data memory numbers provided here were gathered for the PLC configured with the default unit test configuration. To view the defaults, load the desired image and observe the "config" structure.

C55x Target

C55x PLC Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  | Scratch/Dedicated
 |  | XDAIS | ECO
0 | 4 | 104 | 60 | Dedicated
1 | 4 | 568 | 568 | Scratch
2 | 4 | 1680 | 1680 | Dedicated
3 | 4 | 560 | 560 | Scratch
4 | 2 | 0 | 0 | Scratch

Notes:
  1. There is no size configuration for XDAIS, so data above is for worst case (16 KHz)
  2. Size configuration for ECO is for default of 8 KHz

Caution: The following should not be placed in external memory otherwise there may be unexpected results or even crashes.
  1. Buffer ID 3

Additional Data Memory
Category/Structure | Requirement (Bytes)
 | XDAIS | ECO
Tables | 98 | 98
data/bss | 196 | 124

C55x PLC Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 3.23 | 2.84 | Core PLC code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x/C64x+ Target

C64x/C64x+ PLC Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  | Scratch/Dedicated
 |  | XDAIS | ECO
0 | 1 | 100 | 56 | Dedicated
1 | 128 | 588 | 588 | Scratch
2 | 2 | 1680 | 1680 | Dedicated
3 | 2 | 0 | 0 | Scratch
4 | 2 | 0 | 0 | Scratch

Notes:
  1. There is no size configuration for XDAIS, so data above is for worst case (16 KHz)
  2. Size configuration for ECO is for default of 8 KHz

Caution: The following should not be placed in external memory otherwise there may be unexpected results or even crashes.
  1. Buffer ID 3

Additional Data Memory
Category/Structure | Requirement (Bytes)
 | XDAIS | ECO
Tables | 130 | 130
data/bss | 200 | 124

C64x PLC Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 7.75 | 7.16 | Core PLC code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x+ PLC Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 6.78 | 6.34 | Core PLC code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.


PLC: MIPS Requirements

PLC (Packet Loss Concealment) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x/C64x+ Targets

Assumptions

The MIPS numbers are per execution of the unit test images using the memory mapping indicated in each respective .map files. The following assumptions also apply:

  1. All tests are performed with 5ms frames.
  2. XDAIS interface used (ECO numbers expected to be slightly lower)
  3. Speech input from in.raw file

Notes:
  1. In the MIPS tables we use the terminology Mega-Cycles Per Second (MCPS) since several instructions can occur in parallel per cycle.

C55x Target

Profiling was performed using a 5510 EVM with volatile buffers (scratch) in DARAM block, tables/bss in SARAM block, and channelized buffers in separate SARAM block. Program is in external memory with I-cache flushed every processing frame. See .map file for more details. Cycles information for every frame can be found in file test\logs\cycles.txt generated by running the image.

Further details regarding the external SDRAM :

  1. 32-bits wide
  2. Clocked at 1/2 speed (100 MHz) of CPU (200 MHz)

PLC MIPS - C55x
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_C5510 | 1.23 | 0.18

C64x/C64x+ Targets

Profiling was performed on cycle accurate simulators of DM6446 (64x+) and C6455 (64x+) as well as C6416 EVM. For placement, refer to individual .map files. Cycles information for every frame can be found in file test\logs\cycles.txt generated by running each image.

PLC MIPS - C64x/C64x+
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_DM6446 | 3.08 | 0.66
test_rel_C6455 | 2.28 | 0.18
test_rel_C6416le | 2.00 | 0.15

Notes:
  1. PLC takes most MCPS only when there is a packet loss, so average MCPS greatly depends on the rate of packet loss. This should be considered when budgeting for MCPS in a system.


PLC: Module Index

PLC Modules

Here is a list of all modules:
  • PLC
    • PLC Warning Codes
    • PLC Exception Codes
    • PLC Error Codes


PLC: Page Index

PLC Related Pages

Here is a list of all related documentation pages:
  • Standard Compliance
  • Disclaimer


PLC: plc.h File Reference

  • File List
  • Globals

plc.h File Reference

Detailed Description

API definitions for the PLC component. Includes XDAIS and ECO (Telogy-proprietary) API definitions.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file plc.h.

#include <ti/xdais/xdas.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/types/types.h>
#include <ti/xdais/dm/isphdec1.h>
#include <ti/mas/iface/ifplc/ifplc.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for plc.h:

Go to the source code of this file.

Data Structures

struct | plcSizeConfig_t
Size query time configuration parameters. More...
struct | plcNewConfig_t
Create time configuration parameters. More...
struct | plcOpenConfig_t
Open time configuration parameters. More...
struct | plcXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | plcXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | plcXdaisCallTable_t
PLC's XDAIS call table definition. More...

Defines

#define | plc_W1 plc_WARN_NEW_BAD_PLC_TYPE, "plcNew/algInit: Bad PLC type"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | plc_W2 plc_WARN_OPN_BAD_PLC_TYPE, "plcOpen/algInit: Bad PLC type"
#define | plc_E1 plc_EXC_INVALID_TYPE, "Processing: Invalid plc type"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.
#define | plc_NOMEMORY (-1)
#define | plc_NOERR 0
#define | plc_ERROR 1
#define | plc_CODING_TYPE_MULAW 0
#define | plc_CODING_TYPE_ALAW 1

Enumerations

enum | { plc_WARN_NEW_BAD_PLC_TYPE = 1, plc_WARN_OPN_BAD_PLC_TYPE = 2 }
enum | { plc_EXC_INVALID_TYPE = 1 }

Functions

ECO (Telogy Embedded Communication Object) APIs
Remarks:
new, delete, getSizes, open, close, relocate are standard ECO APIs so are not described here in detail.

tint | plcNew (void **plcInst, tint nbufs, ecomemBuffer_t *bufs, plcNewConfig_t *cfg)
void | plcDelete (void **plcInst)
tint | plcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, plcSizeConfig_t *cfg)
tint | plcOpen (void *plcInst, plcOpenConfig_t *cfg)
void | plcClose (void *plcInst)
tint | plcRelocate (void **plcInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMask)
void | plcProcess (void *plcInst, linSample *cwIn, linSample *inSamples, ISPHDEC1_FrameType frameType, tint bufferDepth)
Processing API.
tuint | plcControl (void *plcInst, ifplcConfig_t *cfg)
Control API.
tbool | plcIsAlgSupported (tuint mode)
API to query if plc_mode is supported in the image (does not mean it is enabled/disabled).

Variables

XDAIS APIs

plcXdaisCallTable_t plcXdaisCallTable
reference of PLC XDAIS call table

Define Documentation

#define plc_CODING_TYPE_MULAW 0

Definition at line 109 of file plc.h.

#define plc_CODING_TYPE_ALAW 1

Definition at line 110 of file plc.h.


PLC: plc.h Source File

  • File List
  • Globals

plc.h

Go to the documentation of this file.
00001 #ifndef _PLC_H
00002 #define _PLC_H
00003
00014 /* @{ */
00015 #include <ti/xdais/xdas.h>
00016 #include <ti/xdais/ialg.h>
00017 #include <ti/mas/types/types.h>
00018 #include <ti/xdais/dm/isphdec1.h>
00019 #include <ti/mas/iface/ifplc/ifplc.h>
00020 #include <ti/mas/util/debug.h>
00021 #include <ti/mas/util/ecomem.h>
00022
00023 #ifdef G711A1_USE_GMP
00024 #ifndef G711A1
00025 #error G711A1_USE_GMP can only be defined when G711A1 is defined - Correct Makefile Parameters
00026 #endif
00027 #endif
00028
00034 /* @{ */
00035 enum {
00036   plc_WARN_NEW_BAD_PLC_TYPE = 1,
00037   plc_WARN_OPN_BAD_PLC_TYPE = 2
00038 };
00039
00044 #define plc_W1 plc_WARN_NEW_BAD_PLC_TYPE, "plcNew/algInit: Bad PLC type"
00045 #define plc_W2 plc_WARN_OPN_BAD_PLC_TYPE, "plcOpen/algInit: Bad PLC type"
00046 /* @} */
00047
00048
00057 /* @{ */
00058 enum {
00059   plc_EXC_INVALID_TYPE = 1
00060 };
00061
00066 #define plc_E1 plc_EXC_INVALID_TYPE, "Processing: Invalid plc type"
00067 /* @} */
00068
00074 /* @{ */
00075 #define plc_NOMEMORY  (-1)
00076 #define plc_NOERR       0
00077 #define plc_ERROR       1
00078 /* @} */
00079
00086 typedef struct {
00087   ifplcConfig_t config;
00088 } plcSizeConfig_t;
00089
00095 typedef struct {
00096   tuint     ID;
00097   dbgInfo_t debugInfo;
00098   plcSizeConfig_t sizeCfg;
00099 } plcNewConfig_t;
00100
00107 typedef struct {
00108   tuint     frame_size;
00109 #define    plc_CODING_TYPE_MULAW  0
00110 #define    plc_CODING_TYPE_ALAW   1
00111   tuint     codingType;
00115   ifplcConfig_t config;
00116 } plcOpenConfig_t;
00117
00122 /* @{ */
00123 tint      plcNew(void **plcInst, tint nbufs, ecomemBuffer_t * bufs,
00124                  plcNewConfig_t * cfg);
00125 void      plcDelete(void **plcInst);
00126 tint      plcGetSizes(tint * nbufs, const ecomemBuffer_t ** bufs,
00127                       plcSizeConfig_t * cfg);
00128 tint      plcOpen(void *plcInst, plcOpenConfig_t * cfg);
00129 void      plcClose(void *plcInst);
00130 tint      plcRelocate(void **plcInst, tint nbufs, ecomemBuffer_t * bufs,
00131                       tuint * relocBufBitMask);
00153 void      plcProcess(void *plcInst, linSample * cwIn, linSample * inSamples,
00154                         ISPHDEC1_FrameType frameType, tint bufferDepth);
00167 tuint     plcControl(void *plcInst, ifplcConfig_t * cfg);
00168
00175 tbool     plcIsAlgSupported(tuint mode);
00176
00177 #ifdef G711A1_USE_GMP
00178 void      g711a1ResetHistory(void *plcInst);
00179 void      g711a1UpdateHistory(void *plcInst, void *gmp_ptr);
00180 tuint     g711a1GetGmpUsage(void *plcInst);
00181 void      g711a1DropGmp(void *plcInst);
00182 void      g711a1FreeGmc(void *plcInst);
00183 #endif
00184 /* @} */ /* @name ECO APIs */
00185
00186
00206 /* @{ */
00207 typedef struct {
00208   IALG_Params param;
00209   plcSizeConfig_t cfg;
00210 } plcXdaisAllocParams_t;
00211
00247 typedef struct {
00248   IALG_Params param;
00249   plcNewConfig_t  cfgNew;
00250   plcOpenConfig_t cfgOpen;
00251 } plcXdaisInitParams_t;
00252
00256 typedef struct {
00257     IALG_Fxns   ialg;
00262     void  (*process) (IALG_Handle handle, linSample * cw_in, linSample * smpin,
00263                         ISPHDEC1_FrameType frame_type, tint bufferDepth);
00264
00269     tuint (*control)(IALG_Handle handle, ifplcConfig_t * cfg);
00270 } plcXdaisCallTable_t;
00271
00275 extern plcXdaisCallTable_t plcXdaisCallTable;
00276 /* @} */ /* @name XDAIS APIs */
00277 /* @} */ /* ingroup PLC */
00278
00279 #endif                          /* _PLC_H */
00280
00281 /* nothing past this point */


PLC: Standard Compliance

Standard Compliance

  • Packet loss concealment (PLC) is compliant with G.711 Appendix I.


PLC: plcNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

plcNewConfig_t Struct Reference
[PLC]

#include <plc.h>

Collaboration diagram for plcNewConfig_t:

[legend]

Detailed Description

Create time configuration parameters.

Remarks:
For eco API plcNew and included as structure of for XDAIS API algInit alg specific parameters

Definition at line 95 of file plc.h.

Data Fields

tuint | ID
dbgInfo_t | debugInfo
plcSizeConfig_t sizeCfg

Field Documentation

tuint plcNewConfig_t::ID

Instance identifier, for call-back identification, XDAIS default is NULL

Definition at line 96 of file plc.h.

dbgInfo_t plcNewConfig_t::debugInfo

Generic call-back API for debug/exception, XDAIS default is NULL

Definition at line 97 of file plc.h.

plcSizeConfig_t plcNewConfig_t::sizeCfg

size configuration as described in the structure definition

Definition at line 98 of file plc.h.

The documentation for this struct was generated from the following file:
  • plc.h


PLC: plcOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

plcOpenConfig_t Struct Reference
[PLC]

#include <plc.h>

Detailed Description

Open time configuration parameters.

Remarks:
Used for eco API plcOpen and included as structure of for XDAIS API algInit alg specific parameters

Definition at line 107 of file plc.h.

Data Fields

tuint | frame_size
tuint | codingType
ifplcConfig_t | config

Field Documentation

tuint plcOpenConfig_t::frame_size

Frame Size in samples

Definition at line 108 of file plc.h.

tuint plcOpenConfig_t::codingType

Alaw or mulaw PCM for compressed stored delay line in case of PCM, only applicable for ECO when using GMP, not applicable for XDAIS

Definition at line 111 of file plc.h.

ifplcConfig_t plcOpenConfig_t::config

Configuration as per ifplc external interface

Definition at line 115 of file plc.h.

The documentation for this struct was generated from the following file:
  • plc.h


PLC: plcSizeConfig_t Struct Reference

  • Data Structures
  • Data Fields

plcSizeConfig_t Struct Reference
[PLC]

#include <plc.h>

Detailed Description

Size query time configuration parameters.

Remarks:
For eco, this is used by the plcGetSizes API and for XDAIS, it is included as sub-structure in plcNewConfig_t which in turn is used for algAlloc API alg specific parameters

Definition at line 86 of file plc.h.

Data Fields

ifplcConfig_t config

Field Documentation

ifplcConfig_t plcSizeConfig_t::config

Configuration as per ifplc external interface

Definition at line 87 of file plc.h.

The documentation for this struct was generated from the following file:
  • plc.h


PLC: plcXdaisAllocParams_t Struct Reference

  • Data Structures
  • Data Fields

plcXdaisAllocParams_t Struct Reference
[PLC, PLC]

#include <plc.h>

Collaboration diagram for plcXdaisAllocParams_t:

[legend]

Detailed Description

configuration parameters overloading for algAlloc API

Remarks:
Default parameters are as below..
 *
 *  {
 *    sizeof(plcXdaisAllocParams_t)  // IALG_Params from ialg.h (size field)
 *  }
 *
 *    // plcSizeConfig_t
 *    {
 *      // ifplcConfig_t
 *      {
 *        ifplc_TYPE_G711A1 // worst case size configuration
 *      }
 *  }
 *

Definition at line 207 of file plc.h.

Data Fields

IALG_Params param
plcSizeConfig_t cfg

Field Documentation

IALG_Params plcXdaisAllocParams_t::param

Base type as per IALG requirement

Definition at line 208 of file plc.h.

plcSizeConfig_t plcXdaisAllocParams_t::cfg

refer to plcSizeConfig_t definition

Definition at line 209 of file plc.h.

The documentation for this struct was generated from the following file:
  • plc.h


PLC: plcXdaisCallTable_t Struct Reference

  • Data Structures
  • Data Fields

plcXdaisCallTable_t Struct Reference
[PLC]

#include <plc.h>

Detailed Description

PLC's XDAIS call table definition.

Definition at line 256 of file plc.h.

Data Fields

IALG_Fxns | ialg
void(* | process )(IALG_Handle handle, linSample *cw_in, linSample *smpin, ISPHDEC1_FrameType frame_type, tint bufferDepth)
processing API
tuint(* | control )(IALG_Handle handle, ifplcConfig_t *cfg)
control API

Field Documentation

IALG_Fxns plcXdaisCallTable_t::ialg

IALG standard algorithm interface.

Definition at line 257 of file plc.h.

void(* plcXdaisCallTable_t::process)(IALG_Handle handle, linSample *cw_in, linSample *smpin, ISPHDEC1_FrameType frame_type, tint bufferDepth)

processing API

Remarks:
Algorithm specific processing API, same definition as ECO API plcProcess

tuint(* plcXdaisCallTable_t::control)(IALG_Handle handle, ifplcConfig_t *cfg)

control API

Remarks:
Algorithm specific control API, same definition as ECO API plcControl

The documentation for this struct was generated from the following file:
  • plc.h


PLC: plcXdaisInitParams_t Struct Reference

  • Data Structures
  • Data Fields

plcXdaisInitParams_t Struct Reference
[PLC]

#include <plc.h>

Collaboration diagram for plcXdaisInitParams_t:

[legend]

Detailed Description

configuration parameters overloading for algInit API

Remarks:
Default parameters are as below..
 *
 *  {
 *    sizeof(plcXdaisInitParams_t) // IALG_Params from ialg.h (size field)
 *  },
 *
 *    // plcNewConfig_t
 *    {
 *      0, // ID
 *      NULL, // debug Info
 *
 *      // sizeConfig_t
 *      {
 *        // config_t
 *        {
 *          ifplc_TYPE_G711A1
 *        }
 *      }
 *    },
 *
 *    // plcOpenConfig_t
 *    {
 *      80,                // frame size
 *      plc_CODING_TYPE_MULAW,
 *
 *      // ifplcConfig_t
 *      {
 *        ifplc_TYPE_G711A1
 *      }
 *  }
 *

Definition at line 247 of file plc.h.

Data Fields

IALG_Params param
plcNewConfig_t cfgNew
plcOpenConfig_t cfgOpen

Field Documentation

IALG_Params plcXdaisInitParams_t::param

Base type as per IALG requirement

Definition at line 248 of file plc.h.

plcNewConfig_t plcXdaisInitParams_t::cfgNew

refer to plcNewConfig_t definition

Definition at line 249 of file plc.h.

plcOpenConfig_t plcXdaisInitParams_t::cfgOpen

refer to plcOpenConfig_t definition

Definition at line 250 of file plc.h.

The documentation for this struct was generated from the following file:
  • plc.h


PLC Test: Data Structures

  • Data Structures
  • Data Fields

PLC Test Data Structures

Here are the data structures with brief descriptions:
config_s | Global test configuration structure definition
cycles_s |
msgTable_t |
msgTables_t |
siuInst_s |
siuMemHeap_t |


PLC Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

  1. Run the simulation to completion.
  2. The simulation will produce the file out.raw in directory plc\test\vectors\out\
  3. Open Matlab and change the Matlab directory to plc\test\vectors\ and run the Matlab script process.m (provided).
  4. This will parse the input and output vectors and generate plots of the output with and without PLC and indicate if bit-exactness is satisfied. If bit-exactness is not satisfied, process.m will print the first index (1 based) where a mis-match occurred. It will also allow the user to play the files for subjective listening.


PLC Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


PLC Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


PLC Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


PLC Test: File Index

  • File List
  • Globals

PLC Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
mem.c [code] |
mem.h [code] |
test.c [code] | PLC test


PLC Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • avg : cycles_s
  • cyclesOverhead : siuInst_s
  • cyclesPlc : siuInst_s
  • eraseFilePtr : siuInst_s
  • excTbl : msgTables_t
  • frameCount : siuInst_s
  • frameLength : config_s
  • frameToBeErased : siuInst_s
  • heapBase : siuMemHeap_t
  • ID : msgTables_t
  • indx : siuMemHeap_t
  • inFrameFilePtr : siuInst_s
  • max : cycles_s
  • msgCode : msgTable_t
  • msgString : msgTable_t
  • name : msgTables_t
  • outFrameFilePtrNoPLC : siuInst_s
  • outFrameFilePtrPLC : siuInst_s
  • plcConfig : config_s
  • plcInst : siuInst_s
  • plcXdaisInst : siuInst_s
  • size : siuMemHeap_t
  • sizeExcTbl : msgTables_t
  • sizeWarnTbl : msgTables_t
  • warnTbl : msgTables_t
  • xdaisBufsMallocFreeCounter : siuInst_s
  • xdaisDefaultCfgFlag : config_s
  • xdaisFlag : config_s


PLC Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • avg : cycles_s
  • cyclesOverhead : siuInst_s
  • cyclesPlc : siuInst_s
  • eraseFilePtr : siuInst_s
  • excTbl : msgTables_t
  • frameCount : siuInst_s
  • frameLength : config_s
  • frameToBeErased : siuInst_s
  • heapBase : siuMemHeap_t
  • ID : msgTables_t
  • indx : siuMemHeap_t
  • inFrameFilePtr : siuInst_s
  • max : cycles_s
  • msgCode : msgTable_t
  • msgString : msgTable_t
  • name : msgTables_t
  • outFrameFilePtrNoPLC : siuInst_s
  • outFrameFilePtrPLC : siuInst_s
  • plcConfig : config_s
  • plcInst : siuInst_s
  • plcXdaisInst : siuInst_s
  • size : siuMemHeap_t
  • sizeExcTbl : msgTables_t
  • sizeWarnTbl : msgTables_t
  • warnTbl : msgTables_t
  • xdaisBufsMallocFreeCounter : siuInst_s
  • xdaisDefaultCfgFlag : config_s
  • xdaisFlag : config_s


PLC Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines
  • a
  • c
  • h
  • i
  • m
  • o
  • p
  • s

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • align : mem.c

- c -

  • config : test.c
  • config_t : test.c
  • cycles_t : test.c

- h -

  • hw_init() : test.c

- i -

  • inFrame : test.c

- m -

  • main() : test.c
  • MAX_FRAME_LENGTH : test.c
  • msgTables : test.c

- o -

  • outFrameNoPLC : test.c
  • outFramePLC : test.c

- p -

  • PLC_ID : test.c
  • plcExceptions : test.c
  • plcWarnings : test.c
  • print_buffer() : mem.c
  • print_footer() : mem.c
  • print_header() : mem.c

- s -

  • siu_alloc_eco_mem() : mem.c , mem.h
  • siu_alloc_xdais_mem() : mem.c , mem.h
  • siu_close() : test.c
  • siu_dealloc_plc_xdais_mem() : test.c
  • siu_dealloc_xdais_mem() : mem.c , mem.h
  • siu_debug_info() : test.c
  • siu_init_heaps() : mem.h , mem.c
  • siu_malloc() : mem.c
  • SIU_MAX_ERR_MSG_STRING_LENGTH : test.c
  • SIU_MAX_MODULE_NBUFS : test.c
  • siu_mem_heap_alloc() : mem.c
  • siu_mem_heap_init() : mem.c
  • SIU_MEM_NONVOLATILE_HEAP_SIZE : mem.c
  • SIU_MEM_VOLATILE_HEAP_SIZE : mem.c
  • siu_new_open_config_modules() : test.c
  • siu_open() : test.c
  • siu_process() : test.c
  • siu_read_inFrame() : test.c
  • siu_write_outFrame() : test.c
  • siuGetMsg() : test.c
  • siuInst : test.c
  • siuInst_t : test.c
  • siuMemHeapNonVolatile : mem.c
  • siuMemHeapVolatile : mem.c
  • siuNonVolatileMemBufs : mem.c
  • siuVolatileMemBufs : mem.c


PLC Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • align : mem.c
  • MAX_FRAME_LENGTH : test.c
  • PLC_ID : test.c
  • SIU_MAX_ERR_MSG_STRING_LENGTH : test.c
  • SIU_MAX_MODULE_NBUFS : test.c
  • SIU_MEM_NONVOLATILE_HEAP_SIZE : mem.c
  • SIU_MEM_VOLATILE_HEAP_SIZE : mem.c


PLC Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • hw_init() : test.c
  • main() : test.c
  • print_buffer() : mem.c
  • print_footer() : mem.c
  • print_header() : mem.c
  • siu_alloc_eco_mem() : mem.c , mem.h
  • siu_alloc_xdais_mem() : mem.h , mem.c
  • siu_close() : test.c
  • siu_dealloc_plc_xdais_mem() : test.c
  • siu_dealloc_xdais_mem() : mem.h , mem.c
  • siu_debug_info() : test.c
  • siu_init_heaps() : mem.c , mem.h
  • siu_malloc() : mem.c
  • siu_mem_heap_alloc() : mem.c
  • siu_mem_heap_init() : mem.c
  • siu_new_open_config_modules() : test.c
  • siu_open() : test.c
  • siu_process() : test.c
  • siu_read_inFrame() : test.c
  • siu_write_outFrame() : test.c
  • siuGetMsg() : test.c


PLC Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • config_t : test.c
  • cycles_t : test.c
  • siuInst_t : test.c


PLC Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • config : test.c
  • inFrame : test.c
  • msgTables : test.c
  • outFrameNoPLC : test.c
  • outFramePLC : test.c
  • plcExceptions : test.c
  • plcWarnings : test.c
  • siuInst : test.c
  • siuMemHeapNonVolatile : mem.c
  • siuMemHeapVolatile : mem.c
  • siuNonVolatileMemBufs : mem.c
  • siuVolatileMemBufs : mem.c


PLC Test: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


PLC Test: PLCTEST

PLCTEST

Detailed Description

Data Structures

struct | config_s
global test configuration structure definition More...
struct | cycles_s
struct | siuInst_s
struct | msgTable_t
struct | msgTables_t

Defines

#define | SIU_MAX_MODULE_NBUFS 100
#define | MAX_FRAME_LENGTH 80
#define | SIU_MAX_ERR_MSG_STRING_LENGTH 100
#define | PLC_ID 1

Typedefs

typedef config_s | config_t
global test configuration structure definition
typedef cycles_s | cycles_t
typedef siuInst_s | siuInst_t

Functions

char * | siuGetMsg (msgTable_t *tbl, tuint size, tuint msgCode)
void | siu_debug_info (void *inID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | siu_dealloc_plc_xdais_mem (IALG_Handle plcXdaisInstPtr, tulong *mallocedSizeCounter)
void | siu_open (void)
void | siu_close (void)
void | siu_new_open_config_modules (config_t *config)
void | siu_process (linSample *framePtr, linSample *outFramePtrPLC, linSample *outFramePtrNoPLC)
tint | siu_read_inFrame (FILE *filePtr, linSample *inFramePtr, tint numSamples)
tint | siu_write_outFrame (FILE *filePtr, linSample *outFramePtr, tint numSamples)
void | hw_init (void)
void | main (void)

Variables

config_t config
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.
siuInst_t siuInst
msgTable_t plcWarnings []
msgTable_t plcExceptions []
msgTables_t msgTables []
linSample | inFrame [MAX_FRAME_LENGTH]
linSample | outFramePLC [MAX_FRAME_LENGTH]
linSample | outFrameNoPLC [MAX_FRAME_LENGTH]

Define Documentation

#define SIU_MAX_MODULE_NBUFS 100

required for ECO API memory descriptors, not for XDAIS APIs

Definition at line 47 of file test.c.

Referenced by siu_new_open_config_modules().

#define MAX_FRAME_LENGTH 80

10 ms frame

Definition at line 48 of file test.c.

#define SIU_MAX_ERR_MSG_STRING_LENGTH 100

Definition at line 121 of file test.c.

#define PLC_ID 1

Definition at line 132 of file test.c.

Referenced by siu_new_open_config_modules().

Typedef Documentation

typedef struct config_s config_t

global test configuration structure definition

typedef struct cycles_s cycles_t

typedef struct siuInst_s siuInst_t

Function Documentation

char* siuGetMsg | ( | msgTable_t * | tbl,
 |  | tuint | size,
 |  | tuint | msgCode
 | ) |  |

Definition at line 139 of file test.c.

Referenced by siu_debug_info().

void siu_debug_info | ( | void * | inID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 153 of file test.c.

References msgTables_t::excTbl, msgTables, msgTables_t::name, siuGetMsg(), msgTables_t::sizeExcTbl, msgTables_t::sizeWarnTbl, and msgTables_t::warnTbl.

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_plc_xdais_mem | ( | IALG_Handle | plcXdaisInstPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 206 of file test.c.

References siu_dealloc_xdais_mem().

Referenced by siu_close().

Here is the call graph for this function:

void siu_open ( void )

Definition at line 221 of file test.c.

References siuInst_s::cyclesOverhead, siuInst_s::eraseFilePtr, siuInst_s::frameToBeErased, siuInst_s::inFrameFilePtr, siuInst_s::outFrameFilePtrNoPLC, siuInst_s::outFrameFilePtrPLC, siu_init_heaps(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_close ( void )

Definition at line 292 of file test.c.

References config, siuInst_s::eraseFilePtr, siuInst_s::inFrameFilePtr, siuInst_s::outFrameFilePtrNoPLC, siuInst_s::outFrameFilePtrPLC, siuInst_s::plcXdaisInst, siu_dealloc_plc_xdais_mem(), siuInst, siuInst_s::xdaisBufsMallocFreeCounter, and config_s::xdaisFlag.

Referenced by main().

Here is the call graph for this function:

void siu_new_open_config_modules ( config_t * config )

Definition at line 315 of file test.c.

References config, config_s::frameLength, PLC_ID, config_s::plcConfig, siuInst_s::plcInst, siuInst_s::plcXdaisInst, siu_alloc_eco_mem(), siu_alloc_xdais_mem(), siu_debug_info(), SIU_MAX_MODULE_NBUFS, siuInst, siuInst_s::xdaisBufsMallocFreeCounter, config_s::xdaisDefaultCfgFlag, and config_s::xdaisFlag.

Referenced by main().

Here is the call graph for this function:

void siu_process | ( | linSample * | framePtr,
 |  | linSample * | outFramePtrPLC,
 |  | linSample * | outFramePtrNoPLC
 | ) |  |

Definition at line 422 of file test.c.

References config, siuInst_s::cyclesPlc, siuInst_s::eraseFilePtr, siuInst_s::frameCount, config_s::frameLength, siuInst_s::frameToBeErased, siuInst_s::plcInst, siuInst_s::plcXdaisInst, siuInst, and config_s::xdaisFlag.

Referenced by main().

tint siu_read_inFrame | ( | FILE * | filePtr,
 |  | linSample * | inFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 477 of file test.c.

Referenced by main().

tint siu_write_outFrame | ( | FILE * | filePtr,
 |  | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 499 of file test.c.

Referenced by main().

void hw_init ( void )

Definition at line 516 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 535 of file test.c.

References config, siuInst_s::frameCount, config_s::frameLength, hw_init(), siuInst_s::inFrameFilePtr, siuInst_s::outFrameFilePtrNoPLC, siuInst_s::outFrameFilePtrPLC, siu_close(), siu_new_open_config_modules(), siu_open(), siu_process(), siu_read_inFrame(), siu_write_outFrame(), siuInst, and config_s::xdaisFlag.

Here is the call graph for this function:

Variable Documentation

config_t config

Initial value:

 {
  1,
  0,
  80,

  {
   ifplc_TYPE_G711A1
  }

}
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.

Definition at line 68 of file test.c.

Referenced by hw_init(), main(), siu_close(), siu_new_open_config_modules(), and siu_process().

siuInst_t siuInst

Definition at line 105 of file test.c.

Referenced by main(), siu_close(), siu_new_open_config_modules(), siu_open(), and siu_process().

msgTable_t plcWarnings[]

Initial value:

 {
  plc_W1,
  plc_W2
}

Definition at line 112 of file test.c.

msgTable_t plcExceptions[]

Initial value:

 {
  plc_E1
}

Definition at line 117 of file test.c.

msgTables_t msgTables[]

Initial value:

 {
  {PLC_ID, "plc", plcWarnings, sizeof(plcWarnings) / sizeof(msgTable_t),
   plcExceptions, sizeof(plcExceptions) / sizeof(msgTable_t)}
}

Definition at line 134 of file test.c.

Referenced by siu_debug_info().

linSample inFrame[MAX_FRAME_LENGTH]

Definition at line 532 of file test.c.

linSample outFramePLC[MAX_FRAME_LENGTH]

Definition at line 532 of file test.c.

linSample outFrameNoPLC[MAX_FRAME_LENGTH]

Definition at line 532 of file test.c.


PLC Test: PLC Unit Test

PLC Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the PLC. This is not a regression test, its purpose is to show how the PLC module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Test code details: PLCTEST

Building Unit Test

The PLC Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the PLC Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main PLC documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The PLC Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the PLC Unit Test image for the target of interest
    • Will reside in the plc\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the PLC project for the target of interest
    • Will be a subdirectory off the plc\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the plc\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)
  • ti.mas.ifplc (External PLC configuration interface)
  • ti.mas.xdais (for XDAIS/IALG defines and XDM 1.0 isphdec1.h)


PLC Test: mem.c File Reference

  • File List
  • Globals

mem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xdc/std.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/plc/test/src/mem.h>

Include dependency graph for mem.c:

Go to the source code of this file.

Data Structures

struct | siuMemHeap_t

Defines

#define | align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
#define | SIU_MEM_VOLATILE_HEAP_SIZE 5000
#define | SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Functions

void | siu_mem_heap_init (siuMemHeap_t *ptr, tword *heapBase, tulong size)
tword * | siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
void | siu_init_heaps (void)
tword * | siu_malloc (tint size, tbool volat)
static void | print_header (void)
static void | print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
static void | print_footer (void)
void | siu_alloc_eco_mem (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr)
void | siu_alloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
void | siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)

Variables

tword | siuVolatileMemBufs [SIU_MEM_VOLATILE_HEAP_SIZE]
tword | siuNonVolatileMemBufs [SIU_MEM_NONVOLATILE_HEAP_SIZE]
siuMemHeap_t siuMemHeapVolatile
siuMemHeap_t siuMemHeapNonVolatile

Define Documentation

#define align | ( | Addr,
 |  | Algnmt | ) | (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))

Definition at line 11 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

#define SIU_MEM_VOLATILE_HEAP_SIZE 5000

Definition at line 40 of file mem.c.

Referenced by siu_init_heaps().

#define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Definition at line 41 of file mem.c.

Referenced by siu_init_heaps().

Function Documentation

void siu_mem_heap_init | ( | siuMemHeap_t * | ptr,
 |  | tword * | heapBase,
 |  | tulong | size
 | ) |  |

Definition at line 19 of file mem.c.

References siuMemHeap_t::heapBase, siuMemHeap_t::indx, and siuMemHeap_t::size.

Referenced by siu_init_heaps().

tword* siu_mem_heap_alloc | ( | siuMemHeap_t * | ptr,
 |  | tint | size
 | ) |  |

Definition at line 29 of file mem.c.

References siuMemHeap_t::heapBase, siuMemHeap_t::indx, and siuMemHeap_t::size.

Referenced by siu_malloc().

void siu_init_heaps ( void )

Definition at line 52 of file mem.c.

References siu_mem_heap_init(), SIU_MEM_NONVOLATILE_HEAP_SIZE, SIU_MEM_VOLATILE_HEAP_SIZE, siuMemHeapNonVolatile, siuMemHeapVolatile, siuNonVolatileMemBufs, and siuVolatileMemBufs.

Referenced by siu_open().

Here is the call graph for this function:

tword* siu_malloc | ( | tint | size,
 |  | tbool | volat
 | ) |  |

Definition at line 58 of file mem.c.

References siu_mem_heap_alloc(), siuMemHeapNonVolatile, and siuMemHeapVolatile.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

Here is the call graph for this function:

static void print_header ( void ) [inline, static]

Definition at line 68 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

static void print_buffer | ( | tint | ID,
 |  | tint | linAlign,
 |  | tint | sizeMAUs,
 |  | tbool | isVolat |
 | ) |  |  | [inline, static]

Definition at line 77 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

static void print_footer ( void ) [inline, static]

Definition at line 83 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

void siu_alloc_eco_mem | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr
 | ) |  |

Definition at line 88 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_alloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 123 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 158 of file mem.c.

Referenced by siu_dealloc_plc_xdais_mem().

Variable Documentation

tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE]

Definition at line 44 of file mem.c.

Referenced by siu_init_heaps().

tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE]

Definition at line 47 of file mem.c.

Referenced by siu_init_heaps().

siuMemHeap_t siuMemHeapVolatile

Definition at line 49 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().

siuMemHeap_t siuMemHeapNonVolatile

Definition at line 50 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().


PLC Test: mem.c Source File

  • File List
  • Globals

mem.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include <xdc/std.h>
00005
00006 #include <ti/mas/types/types.h>
00007 #include <ti/mas/util/ecomem.h>
00008 #include <ti/xdais/ialg.h>
00009 #include <ti/mas/plc/test/src/mem.h>
00010
00011 #define align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
00012
00013 typedef struct {
00014   tword *heapBase;
00015   tulong indx;
00016   tulong size;
00017 } siuMemHeap_t;
00018
00019 void siu_mem_heap_init(siuMemHeap_t *ptr, tword *heapBase, tulong size)
00020 {
00021   ptr->heapBase = heapBase;
00022   ptr->size = size;
00023   ptr->indx = 0;
00024
00025   /* Note : memory is not initialized deliberately to expose
00026             uninitialized memory read problems */
00027 }
00028
00029 tword *siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
00030 {
00031   tword *alloc = NULL;
00032
00033   if ((ptr->indx + size) <= ptr->size) {
00034     alloc = &ptr->heapBase[ptr->indx];
00035     ptr->indx += size;
00036   }
00037   return(alloc);
00038 }
00039
00040 #define SIU_MEM_VOLATILE_HEAP_SIZE 5000
00041 #define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000
00042
00043 #pragma DATA_SECTION (siuVolatileMemBufs, ".volatileMemBufs");
00044 tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE];
00045
00046 #pragma DATA_SECTION (siuNonVolatileMemBufs, ".nonVolatileMemBufs");
00047 tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE];
00048
00049 siuMemHeap_t siuMemHeapVolatile;
00050 siuMemHeap_t siuMemHeapNonVolatile;
00051
00052 void siu_init_heaps(void)
00053 {
00054   siu_mem_heap_init ( &siuMemHeapVolatile, siuVolatileMemBufs, SIU_MEM_VOLATILE_HEAP_SIZE);
00055   siu_mem_heap_init ( &siuMemHeapNonVolatile, siuNonVolatileMemBufs, SIU_MEM_NONVOLATILE_HEAP_SIZE);
00056 }
00057
00058 tword *siu_malloc (tint size, tbool volat)
00059 {
00060   if (volat == TRUE) /* Scratchpad type */ {
00061     return ( siu_mem_heap_alloc (&siuMemHeapVolatile, size) );
00062   }
00063   else {
00064     return ( siu_mem_heap_alloc (&siuMemHeapNonVolatile, size) );
00065   }
00066 }
00067
00068 static inline void print_header (void)
00069 {
00070   printf("+-----------+-----------+-----------+-------------+\n");
00071   printf("| Buffer ID | Alignment |   Size    | Volatility  |\n");
00072   printf("|           |  (Bytes)  | (Bytes)   |             |\n");
00073   printf("+-----------+-----------+-----------+-------------+\n");
00074 /*printf("| %9d | %9d | %9d | %11s |\n");*/
00075 }
00076
00077 static inline void print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
00078 {
00079   printf("| %9d | %9d | %9d | %11s |\n", ID, linAlign * (TYP_TWORD_SIZE/8),
00080         sizeMAUs * (TYP_TWORD_SIZE/8), (isVolat == TRUE)? "scratch" : "non-scratch" );
00081 }
00082
00083 static inline void print_footer (void)
00084 {
00085   printf("+-----------+-----------+-----------+-------------+\n");
00086 }
00087
00088 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00089                    ecomemBuffer_t * ecoBufsPtr)
00090 {
00091   tint      i;
00092   void     *allocPtr;
00093   tuint     linAlign, log2align;
00094   tbool     isVolat;
00095
00096   print_header();
00097
00098   for (i = 0; i < nbufs; i++) {
00099     ecoBufsPtr[i] = sizeBufsPtr[i];
00100
00101     isVolat = ecoBufsPtr[i].volat;
00102
00103     log2align = sizeBufsPtr[i].log2align;
00104     linAlign = (tuint) 1 << log2align;
00105
00106     print_buffer (i, linAlign, sizeBufsPtr[i].size, isVolat);
00107
00108     if (sizeBufsPtr[i].size == 0) {
00109       ecoBufsPtr[i].base = NULL;
00110       continue;
00111     }
00112
00113     if ((allocPtr = (void *) siu_malloc((sizeBufsPtr[i].size + linAlign - 1), isVolat)) == NULL) {
00114       printf("Not enough heap, exiting\n");
00115       exit(0);
00116     }
00117     ecoBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00118   }
00119
00120   print_footer();
00121 }
00122
00123 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00124 {
00125   tint      i;
00126   void     *allocPtr;
00127   tint     linAlign;
00128   tint      alignmentAdjustedSize;
00129   tbool    isVolat;
00130
00131   print_header();
00132
00133   for (i = 0; i < nbufs; i++) {
00134
00135     isVolat = (xdaisBufsPtr[i].attrs == IALG_SCRATCH) ? TRUE : FALSE;
00136     linAlign = (tint) xdaisBufsPtr[i].alignment;
00137
00138     print_buffer (i, linAlign, xdaisBufsPtr[i].size, isVolat);
00139
00140     if (xdaisBufsPtr[i].size == 0) {
00141       xdaisBufsPtr[i].base = NULL;
00142       continue;
00143     }
00144
00145     alignmentAdjustedSize = xdaisBufsPtr[i].size + linAlign - 1;
00146     if ((allocPtr = (void *) siu_malloc(alignmentAdjustedSize, isVolat)
00147         ) == NULL) {
00148       printf("Not enough heap, exiting\n");
00149       exit(0);
00150     }
00151     *mallocedSizeCounter += alignmentAdjustedSize;
00152     xdaisBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00153   }
00154
00155   print_footer();
00156 }
00157
00158 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00159 {
00160   tint i;
00161
00162   for(i = 0; i < nbufs; i++) {
00163     if(xdaisBufsPtr[i].size)
00164   {
00165     *mallocedSizeCounter -= (xdaisBufsPtr[i].size + xdaisBufsPtr[i].alignment - 1);
00166   }
00167     if (xdaisBufsPtr[i].base) {
00168
00169     /* Note the free below may not have the right pointers as were in malloc because
00170        the module was fed aligned pointers, it is not possible to reverse and derive
00171        original unaligned pointer, so don't do free */
00172       //free(xdaisBufsPtr[i].base);
00173     }
00174   }
00175 }
00176
00177 /* Nothing past this point */


PLC Test: mem.h File Reference

  • File List
  • Globals

mem.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/xdais/ialg.h>

Include dependency graph for mem.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | siu_init_heaps (void)
void | siu_alloc_eco_mem (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr)
void | siu_alloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
void | siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)

Function Documentation

void siu_init_heaps ( void )

Definition at line 52 of file mem.c.

References siu_mem_heap_init(), SIU_MEM_NONVOLATILE_HEAP_SIZE, SIU_MEM_VOLATILE_HEAP_SIZE, siuMemHeapNonVolatile, siuMemHeapVolatile, siuNonVolatileMemBufs, and siuVolatileMemBufs.

Referenced by siu_open().

Here is the call graph for this function:

void siu_alloc_eco_mem | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr
 | ) |  |

Definition at line 88 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_alloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 123 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 158 of file mem.c.

Referenced by siu_dealloc_plc_xdais_mem().


PLC Test: mem.h Source File

  • File List
  • Globals

mem.h

Go to the documentation of this file.
00001 #include <ti/mas/types/types.h>
00002 #include <ti/mas/util/ecomem.h>
00003 #include <ti/xdais/ialg.h>
00004
00005 void siu_init_heaps(void);
00006 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00007                    ecomemBuffer_t * ecoBufsPtr);
00008
00009 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00010 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00011
00012 /* Nothing past this point */


PLC Test: Module Index

PLC Test Modules

Here is a list of all modules:
  • PLCTEST


PLC Test: Page Index

PLC Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


PLC Test: config_s Struct Reference

  • Data Structures
  • Data Fields

config_s Struct Reference
[PLCTEST]

Detailed Description

global test configuration structure definition

Definition at line 52 of file test.c.

Data Fields

tbool | xdaisFlag
tbool | xdaisDefaultCfgFlag
tint | frameLength
ifplcConfig_t | plcConfig

Field Documentation

tbool config_s::xdaisFlag

1 if desired to exercise xdais else ECO interface for components

Definition at line 53 of file test.c.

Referenced by main(), siu_close(), siu_new_open_config_modules(), and siu_process().

tbool config_s::xdaisDefaultCfgFlag

1 if desired to use default configuration for XDAIS case, applicable only when flag xdaisFlag is 1

Definition at line 54 of file test.c.

Referenced by siu_new_open_config_modules().

tint config_s::frameLength

in 8 KHz samples, only 5 ms (=40) or 10 ms (=80) allowed

Definition at line 56 of file test.c.

Referenced by main(), siu_new_open_config_modules(), and siu_process().

ifplcConfig_t config_s::plcConfig

PLC configuration, see ifplc external interface

Definition at line 58 of file test.c.

Referenced by siu_new_open_config_modules().

The documentation for this struct was generated from the following file:
  • test.c


PLC Test: cycles_s Struct Reference

  • Data Structures
  • Data Fields

cycles_s Struct Reference
[PLCTEST]

Detailed Description

Definition at line 83 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

Definition at line 84 of file test.c.

tlong cycles_s::avg

Definition at line 85 of file test.c.

The documentation for this struct was generated from the following file:
  • test.c


PLC Test: msgTable_t Struct Reference

  • Data Structures
  • Data Fields

msgTable_t Struct Reference
[PLCTEST]

Detailed Description

Definition at line 107 of file test.c.

Data Fields

tuint | msgCode
char | msgString [200]

Field Documentation

tuint msgTable_t::msgCode

Definition at line 108 of file test.c.

char msgTable_t::msgString[200]

Definition at line 109 of file test.c.

The documentation for this struct was generated from the following file:
  • test.c


PLC Test: msgTables_t Struct Reference

  • Data Structures
  • Data Fields

msgTables_t Struct Reference
[PLCTEST]

Collaboration diagram for msgTables_t:

[legend]

Detailed Description

Definition at line 123 of file test.c.

Data Fields

tuint | ID
char | name [SIU_MAX_ERR_MSG_STRING_LENGTH]
msgTable_t * warnTbl
tuint | sizeWarnTbl
msgTable_t * excTbl
tuint | sizeExcTbl

Field Documentation

tuint msgTables_t::ID

Definition at line 124 of file test.c.

char msgTables_t::name[SIU_MAX_ERR_MSG_STRING_LENGTH]

Definition at line 125 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::warnTbl

Definition at line 126 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeWarnTbl

Definition at line 127 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::excTbl

Definition at line 128 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeExcTbl

Definition at line 129 of file test.c.

Referenced by siu_debug_info().

The documentation for this struct was generated from the following file:
  • test.c


PLC Test: siuInst_s Struct Reference

  • Data Structures
  • Data Fields

siuInst_s Struct Reference
[PLCTEST]

Collaboration diagram for siuInst_s:

[legend]

Detailed Description

Definition at line 88 of file test.c.

Data Fields

void * | plcInst
IALG_Handle | plcXdaisInst
tlong | frameCount
FILE * | inFrameFilePtr
FILE * | outFrameFilePtrNoPLC
FILE * | outFrameFilePtrPLC
tlong | cyclesOverhead
cycles_t cyclesPlc
FILE * | eraseFilePtr
tuint | frameToBeErased
tulong | xdaisBufsMallocFreeCounter

Field Documentation

void* siuInst_s::plcInst

Definition at line 89 of file test.c.

Referenced by siu_new_open_config_modules(), and siu_process().

IALG_Handle siuInst_s::plcXdaisInst

Definition at line 90 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process().

tlong siuInst_s::frameCount

Definition at line 91 of file test.c.

Referenced by main(), and siu_process().

FILE* siuInst_s::inFrameFilePtr

Definition at line 92 of file test.c.

Referenced by main(), siu_close(), and siu_open().

FILE* siuInst_s::outFrameFilePtrNoPLC

Definition at line 93 of file test.c.

Referenced by main(), siu_close(), and siu_open().

FILE* siuInst_s::outFrameFilePtrPLC

Definition at line 94 of file test.c.

Referenced by main(), siu_close(), and siu_open().

tlong siuInst_s::cyclesOverhead

Definition at line 98 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesPlc

Definition at line 99 of file test.c.

Referenced by siu_process().

FILE* siuInst_s::eraseFilePtr

Definition at line 100 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process().

tuint siuInst_s::frameToBeErased

Definition at line 101 of file test.c.

Referenced by siu_open(), and siu_process().

tulong siuInst_s::xdaisBufsMallocFreeCounter

Definition at line 102 of file test.c.

Referenced by siu_close(), and siu_new_open_config_modules().

The documentation for this struct was generated from the following file:
  • test.c


PLC Test: siuMemHeap_t Struct Reference

  • Data Structures
  • Data Fields

siuMemHeap_t Struct Reference

Detailed Description

Definition at line 13 of file mem.c.

Data Fields

tword * | heapBase
tulong | indx
tulong | size

Field Documentation

tword* siuMemHeap_t::heapBase

Definition at line 14 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::indx

Definition at line 15 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::size

Definition at line 16 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

The documentation for this struct was generated from the following file:
  • mem.c


PLC Test: test.c File Reference

  • File List
  • Globals

test.c File Reference

Detailed Description

PLC test.

Remarks:
This test takes two input files, one the speech itself and other a marker file to indicate which of the 5 ms frames are to be dropped It produces two outputs, one without any PLC action and one with PLC action of the configured PLC algorithm. Input file is Intel 16-bit binary called in.raw and output files are binary files outNoPLC.raw (Intel 16-bit), and outPLC.raw Load code, go to main and set "config" structure to desired configuration and run. Matlab file process.m can be used to generate wav files and compare output with reference for bit-exactness
(C) Copyright 2007, Texas Instruments, Inc.

Definition in file test.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xdc/std.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/iface/ifplc/ifplc.h>
#include <ti/mas/plc/plc.h>
#include <ti/xdais/dm/isphdec1.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/plc/Version.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/plc/test/src/mem.h>

Include dependency graph for test.c:

Go to the source code of this file.

Data Structures

struct | config_s
global test configuration structure definition More...
struct | cycles_s
struct | siuInst_s
struct | msgTable_t
struct | msgTables_t

Defines

#define | SIU_MAX_MODULE_NBUFS 100
#define | MAX_FRAME_LENGTH 80
#define | SIU_MAX_ERR_MSG_STRING_LENGTH 100
#define | PLC_ID 1

Typedefs

typedef config_s | config_t
global test configuration structure definition
typedef cycles_s | cycles_t
typedef siuInst_s | siuInst_t

Functions

char * | siuGetMsg (msgTable_t *tbl, tuint size, tuint msgCode)
void | siu_debug_info (void *inID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | siu_dealloc_plc_xdais_mem (IALG_Handle plcXdaisInstPtr, tulong *mallocedSizeCounter)
void | siu_open (void)
void | siu_close (void)
void | siu_new_open_config_modules (config_t *config)
void | siu_process (linSample *framePtr, linSample *outFramePtrPLC, linSample *outFramePtrNoPLC)
tint | siu_read_inFrame (FILE *filePtr, linSample *inFramePtr, tint numSamples)
tint | siu_write_outFrame (FILE *filePtr, linSample *outFramePtr, tint numSamples)
void | hw_init (void)
void | main (void)

Variables

config_t config
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.
siuInst_t siuInst
msgTable_t plcWarnings []
msgTable_t plcExceptions []
msgTables_t msgTables []
linSample | inFrame [MAX_FRAME_LENGTH]
linSample | outFramePLC [MAX_FRAME_LENGTH]
linSample | outFrameNoPLC [MAX_FRAME_LENGTH]


PLC Test: test.c Source File

  • File List
  • Globals

test.c

Go to the documentation of this file.
00001
00022 /* @{ */
00023
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <string.h>
00027 #include <xdc/std.h>
00028
00029 #include <ti/mas/types/types.h>
00030 #include <ti/mas/util/utl.h>
00031 #include <ti/mas/iface/ifplc/ifplc.h>
00032 #include <ti/mas/plc/plc.h>
00033 #include <ti/xdais/dm/isphdec1.h>
00034 #include <ti/mas/util/ecomem.h>
00035 #include <ti/mas/plc/Version.h>
00036 #include <ti/xdais/ialg.h>
00037 #include <ti/mas/plc/test/src/mem.h>
00038
00039 #ifdef USE_CACHE
00040 #include <ti/mas/sdk/memArchCfg.h>
00041 #endif
00042
00043 #ifdef PROFILE_CYCLES
00044 #include <ti/mas/sdk/profile.h>
00045 #endif
00046
00047 #define SIU_MAX_MODULE_NBUFS 100
00048 #define MAX_FRAME_LENGTH 80
00052 typedef struct config_s {
00053   tbool     xdaisFlag;
00054   tbool     xdaisDefaultCfgFlag;
00056   tint      frameLength;
00058   ifplcConfig_t plcConfig;
00059 #ifdef USE_CACHE
00060   tint  doCacheFlush;
00061   tint  doCacheEnable;
00062 #endif
00063 } config_t;
00064
00068 config_t  config = {
00069   1,  /* xdaisFlag */
00070   0,  /* don't use default configuration for xdais */
00071   80,                           /* 10 ms default frame size */
00072
00073   /* plcConfig */
00074   {
00075    ifplc_TYPE_G711A1
00076   }
00077 #ifdef USE_CACHE
00078  ,1, /* doCacheFlush */
00079   1  /* doCacheEnable */
00080 #endif
00081 };
00082
00083 typedef struct cycles_s {
00084   tlong     max;
00085   tlong     avg;
00086 } cycles_t;
00087
00088 typedef struct siuInst_s {
00089   void     *plcInst;
00090   IALG_Handle plcXdaisInst;
00091   tlong     frameCount;
00092   FILE     *inFrameFilePtr;
00093   FILE     *outFrameFilePtrNoPLC;
00094   FILE     *outFrameFilePtrPLC;
00095 #ifdef PROFILE_CYCLES
00096   FILE   *outCyclesFilePtr;
00097 #endif
00098   tlong     cyclesOverhead;
00099   cycles_t  cyclesPlc;
00100   FILE     *eraseFilePtr;
00101   tuint    frameToBeErased;
00102   tulong   xdaisBufsMallocFreeCounter;
00103 } siuInst_t;
00104
00105 siuInst_t siuInst;
00106
00107 typedef struct {
00108   tuint     msgCode;
00109   char      msgString[200];
00110 } msgTable_t;
00111
00112 msgTable_t plcWarnings[] = {
00113   plc_W1,
00114   plc_W2
00115 };
00116
00117 msgTable_t plcExceptions[] = {
00118   plc_E1
00119 };
00120
00121 #define SIU_MAX_ERR_MSG_STRING_LENGTH 100
00122
00123 typedef struct {
00124   tuint     ID;
00125   char      name[SIU_MAX_ERR_MSG_STRING_LENGTH];
00126   msgTable_t *warnTbl;
00127   tuint     sizeWarnTbl;
00128   msgTable_t *excTbl;
00129   tuint     sizeExcTbl;
00130 } msgTables_t;
00131
00132 #define PLC_ID 1
00133
00134 msgTables_t msgTables[] = {
00135   {PLC_ID, "plc", plcWarnings, sizeof(plcWarnings) / sizeof(msgTable_t),
00136    plcExceptions, sizeof(plcExceptions) / sizeof(msgTable_t)}
00137 };
00138
00139 char     *siuGetMsg(msgTable_t * tbl, tuint size, tuint msgCode)
00140 {
00141   int       i;
00142
00143   for (i = 0; i < size; i++) {
00144     if (tbl[i].msgCode == msgCode) {
00145       return (tbl[i].msgString);
00146     }
00147   }
00148   printf(" Fatal: Table entry not found\n");
00149   exit(0);
00150   return (NULL);
00151 }
00152
00153 void siu_debug_info(void *inID, tuint msgType, tuint msgCode, tuint msgLength,
00154                     tuint * supportingData)
00155 {
00156   int       i;
00157   int       doExit = 0, found;
00158   msgTables_t *msgTblPtr;
00159   tuint ID = *((tuint *) inID);
00160
00161   for (i = 0, found = 0; i < sizeof(msgTables) / sizeof(msgTables_t); i++) {
00162     if (msgTables[i].ID == ID) {
00163       found = 1;
00164       msgTblPtr = &msgTables[i];
00165     }
00166   }
00167
00168   if (!found) {
00169     printf("Message from unknown module of ID %d received, quitting..\n", ID);
00170     exit(0);
00171   }
00172
00173   printf("%s :", msgTblPtr->name);
00174
00175   switch (msgType) {
00176     case dbg_TRACE_INFO:
00177       printf("Trace Info: ");
00178       break;
00179     case dbg_WARNING:
00180       printf("Warning in ");
00181       printf("%s\n", siuGetMsg(msgTblPtr->warnTbl, msgTblPtr->sizeWarnTbl, msgCode));
00182       break;
00183     case dbg_EXCEPTION_FATAL:
00184       printf("Exception: ");
00185       printf("%s\n", siuGetMsg(msgTblPtr->excTbl, msgTblPtr->sizeExcTbl, msgCode));
00186       doExit = 1;
00187       break;
00188     default:
00189       printf(" Invalid diagnostic message, exiting..");
00190       break;
00191   }
00192
00193   if (msgLength) {
00194     printf("\nSupporting Data: ");
00195     for (i = 0; i < msgLength; i++) {
00196       printf("%d\n", supportingData[i]);
00197     }
00198   }
00199
00200   if (doExit) {
00201     printf("\n Exiting.. ");
00202     exit(0);
00203   }
00204 }
00205
00206 void siu_dealloc_plc_xdais_mem (IALG_Handle plcXdaisInstPtr, tulong *mallocedSizeCounter)
00207 {
00208   Int nbufs;
00209   IALG_MemRec *xdaisBufsPtr;
00210
00211   nbufs = plcXdaisCallTable.ialg.algNumAlloc();
00212   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00213
00214   nbufs = plcXdaisCallTable.ialg.algFree(plcXdaisInstPtr, xdaisBufsPtr);
00215
00216   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00217
00218   free(xdaisBufsPtr);
00219 }
00220
00221 void siu_open(void)
00222 {
00223 #ifdef PROFILE_CYCLES
00224   volatile tlong cycles;
00225 #endif
00226
00227   memset(&siuInst, 0, sizeof(siuInst_t));
00228
00229   siu_init_heaps();
00230
00231   if ((siuInst.inFrameFilePtr = fopen("..\\..\\vectors\\inp\\in.raw", "rb")) == NULL) {
00232     printf(" Error opening in.raw\n");
00233     exit(0);
00234   }
00235
00236   if ((siuInst.eraseFilePtr = fopen("..\\..\\vectors\\inp\\inFE.txt", "rt")) == NULL) {
00237     printf(" Error opening inFE.txt\n");
00238     exit(0);
00239   }
00240   else {
00241     if (!feof(siuInst.eraseFilePtr)) {
00242       int i;
00243       fscanf(siuInst.eraseFilePtr, "%d\n", &i);
00244       siuInst.frameToBeErased = (tuint) i;
00245     }
00246   }
00247
00248   if ((siuInst.outFrameFilePtrNoPLC =
00249        fopen("..\\..\\vectors\\out\\outNoPLC.raw", "wb")) == NULL) {
00250     printf(" Error opening out.raw\n");
00251     exit(0);
00252   }
00253
00254   if ((siuInst.outFrameFilePtrPLC =
00255        fopen("..\\..\\vectors\\out\\outPLC.raw", "wb")) == NULL) {
00256     printf(" Error opening out.raw\n");
00257     exit(0);
00258   }
00259
00260   /* measure measurement overhead of cycles */
00261 #ifdef PROFILE_CYCLES
00262   if ((siuInst.outCyclesFilePtr =
00263     fopen("..\\..\\logs\\cycles.txt", "wt")) == NULL) {
00264     printf(" Error opening cycles.txt\n");
00265     exit(0);
00266   }
00267   cycles = profile_getCPUcycleCount();
00268 #endif
00269
00270 #ifdef PROFILE_CYCLES
00271   cycles = (profile_getCPUcycleCount() - cycles);
00272   siuInst.cyclesOverhead = cycles;
00273 #endif
00274
00275 }
00276
00277 #ifdef PROFILE_CYCLES
00278 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00279                                          tlong overhead)
00280 {
00281   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00282          (long) cyclesPtr->max - (long) overhead,
00283          (long) cyclesPtr->avg - (long) overhead);
00284 }
00285
00286 void siu_print_cycles(void)
00287 {
00288   siu_print_cycles_util(&siuInst.cyclesPlc, "Plc", siuInst.cyclesOverhead);
00289 }
00290 #endif
00291
00292 void siu_close(void)
00293 {
00294   fclose(siuInst.inFrameFilePtr);
00295   fclose(siuInst.outFrameFilePtrNoPLC);
00296   fclose(siuInst.outFrameFilePtrPLC);
00297   fclose(siuInst.eraseFilePtr);
00298
00299 #ifdef PROFILE_CYCLES
00300   fclose(siuInst.outCyclesFilePtr);
00301   siu_print_cycles();
00302   profile_closeCycleProfiling();
00303 #endif
00304
00305   if (config.xdaisFlag) {
00306     siu_dealloc_plc_xdais_mem (siuInst.plcXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00307     if (siuInst.xdaisBufsMallocFreeCounter) {
00308       printf(" Error: mismatched malloc-free\n");
00309     }
00310   }
00311
00312   memset(&siuInst, 0, sizeof(siuInst_t));
00313 }
00314
00315 void siu_new_open_config_modules(config_t * config)
00316 {
00317   tint      nbufs, ret;
00318   const ecomemBuffer_t *sizeBufs;
00319   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00320
00321   plcSizeConfig_t plcSizeCfg;
00322   plcOpenConfig_t plcOpenCfg;
00323   plcNewConfig_t plcNewCfg;
00324
00325   IALG_MemRec *xdaisBufsPtr;
00326   plcXdaisAllocParams_t plcXdaisAllocParams;
00327   plcXdaisInitParams_t plcXdaisInitParams;
00328   const IALG_Params *paramsPtr;
00329
00330   plcXdaisAllocParams.param.size = (Int) sizeof(plcXdaisAllocParams_t);
00331   plcXdaisInitParams.param.size = (Int) sizeof(plcXdaisInitParams_t);
00332
00333   printf(" Querying PLC Memory Requirements\n");
00334
00335   plcSizeCfg.config = config->plcConfig;
00336
00337   if (config->xdaisFlag) {
00338     nbufs = (tint) plcXdaisCallTable.ialg.algNumAlloc();
00339     if (nbufs == 0) {
00340       printf(" algNumAlloc error, exiting\n");
00341       exit(0);
00342     }
00343
00344     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00345     if (xdaisBufsPtr == NULL) {
00346       printf("Not enough heap for PLC memory records, exiting\n");
00347       exit(0);
00348     }
00349     if (config->xdaisDefaultCfgFlag) {
00350       paramsPtr = NULL;
00351     }
00352     else {
00353       plcXdaisAllocParams.cfg = plcSizeCfg;
00354       paramsPtr = (const IALG_Params *) &plcXdaisAllocParams;
00355     }
00356     plcXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00357   }
00358   else {
00359     if (plcGetSizes(&nbufs, &sizeBufs, &plcSizeCfg) != plc_NOERR) {
00360       printf(" PLC get sizes error, exiting \n");
00361       exit(0);
00362     }
00363   }
00364
00365   printf(" Allocating PLC memory \n");
00366   if (config->xdaisFlag) {
00367     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00368     siuInst.plcXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00369   }
00370   else {
00371     siu_alloc_eco_mem (nbufs, sizeBufs, ecoBufs);
00372   }
00373
00374   plcNewCfg.sizeCfg = plcSizeCfg;
00375   plcNewCfg.ID = PLC_ID;
00376   plcNewCfg.debugInfo = siu_debug_info;
00377   plcOpenCfg.frame_size = config->frameLength;
00378   plcOpenCfg.codingType = plc_CODING_TYPE_MULAW;        /* only meaningful for GMP
00379                                                            usage */
00380   plcOpenCfg.config = config->plcConfig;
00381
00382   if (config->xdaisFlag) {
00383     if (config->xdaisDefaultCfgFlag) {
00384       paramsPtr = NULL;
00385     }
00386     else {
00387       plcXdaisInitParams.cfgNew = plcNewCfg;
00388       plcXdaisInitParams.cfgOpen = plcOpenCfg;
00389       paramsPtr = (IALG_Params *) &plcXdaisInitParams;
00390     }
00391     ret = plcXdaisCallTable.ialg.algInit((IALG_Handle) siuInst.plcXdaisInst,
00392                                    xdaisBufsPtr, NULL, paramsPtr);
00393
00394     free(xdaisBufsPtr);
00395
00396     if (ret == IALG_EFAIL) {
00397       printf("algInit() failure, exiting\n");
00398       exit(0);
00399     }
00400
00401   }
00402   else {
00403     if (plcNew(&(siuInst.plcInst), nbufs, ecoBufs, &plcNewCfg) != plc_NOERR) {
00404       printf(" PLC New error, exiting \n");
00405       exit(0);
00406     }
00407     plcOpen(siuInst.plcInst, &plcOpenCfg);
00408   }
00409 }
00410
00411 #ifdef PROFILE_CYCLES
00412 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00413 {
00414   if (cycles > cyclesPtr->max) {
00415     cyclesPtr->max = cycles;
00416   }
00417
00418   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00419 }
00420 #endif
00421
00422 void siu_process(linSample * framePtr, linSample * outFramePtrPLC,
00423                  linSample * outFramePtrNoPLC)
00424 {
00425   ISPHDEC1_FrameType frameType;
00426
00427 #ifdef PROFILE_CYCLES
00428   volatile tlong cycles;
00429 #endif
00430
00431   frameType = ISPHDEC1_FTYPE_SPEECHGOOD;
00432   if (siuInst.frameToBeErased == siuInst.frameCount) {
00433
00434     /* read next one if there */
00435     if (!feof(siuInst.eraseFilePtr)) {
00436       int i;
00437       fscanf(siuInst.eraseFilePtr, "%d\n", &i);
00438       siuInst.frameToBeErased = (tuint) i;
00439     }
00440
00441     frameType = ISPHDEC1_FTYPE_SPEECHLOST;
00442     memset(outFramePtrNoPLC, 0, config.frameLength * sizeof(linSample));
00443     printf(" Erasure at frame %d\n", (int) siuInst.frameCount);
00444   }
00445
00446   if (frameType == ISPHDEC1_FTYPE_SPEECHGOOD) {
00447     memcpy(outFramePtrNoPLC, framePtr, config.frameLength * sizeof(linSample));
00448   }
00449
00450 #ifdef USE_CACHE
00451   if (config.doCacheFlush) {
00452     memarchcfg_cacheFlush();
00453   }
00454 #endif
00455
00456 #ifdef PROFILE_CYCLES
00457   cycles = profile_getCPUcycleCount();
00458 #endif
00459
00460   if (config.xdaisFlag) {
00461     plcXdaisCallTable.process (siuInst.plcXdaisInst, NULL, framePtr, frameType, 0);
00462   }
00463   else {
00464     plcProcess(siuInst.plcInst, NULL, framePtr, frameType, 0);
00465   }
00466
00467 #ifdef PROFILE_CYCLES
00468   cycles = (profile_getCPUcycleCount() - cycles);
00469   siu_process_cycles(cycles, &siuInst.cyclesPlc);
00470   fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00471 #endif
00472
00473   memcpy(outFramePtrPLC, framePtr, config.frameLength * sizeof(linSample));
00474
00475 }
00476
00477 tint siu_read_inFrame(FILE * filePtr, linSample * inFramePtr, tint numSamples)
00478 {
00479   int       i;
00480
00481   for (i = 0; i < numSamples; i++) {
00482     int       lsb, msb;
00483
00484     lsb = fgetc(filePtr);
00485     msb = fgetc(filePtr);
00486     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00487   }
00488
00489   if (feof(filePtr)) {
00490     /* silence the last frame as it could have garbage */
00491     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00492     return (0);
00493   }
00494   else {
00495     return (1);
00496   }
00497 }
00498
00499 tint siu_write_outFrame(FILE * filePtr, linSample * outFramePtr, tint numSamples)
00500 {
00501   int       i;
00502
00503   for (i = 0; i < numSamples; i++) {
00504     fputc(outFramePtr[i] & 0xFF, filePtr);
00505     fputc(((outFramePtr[i] >> 8) & 0xFF), filePtr);
00506   }
00507
00508   if (feof(filePtr)) {
00509     return (1);
00510   }
00511   else {
00512     return (0);
00513   }
00514 }
00515
00516 void hw_init(void)
00517 {
00518 #ifdef PROFILE_CYCLES
00519   if (!profile_initCycleProfiling()) {
00520     printf("Could not acquire profiling resources..Exiting\n");
00521     exit(0);
00522   }
00523 #endif
00524
00525 #ifdef USE_CACHE
00526   if (config.doCacheEnable) {
00527     memarchcfg_cacheEnable();
00528   }
00529 #endif
00530 }
00531
00532 linSample inFrame[MAX_FRAME_LENGTH], outFramePLC[MAX_FRAME_LENGTH],
00533     outFrameNoPLC[MAX_FRAME_LENGTH];
00534
00535 void main(void)
00536 {
00537   linSample *outFramePtrPLC = outFramePLC;
00538   linSample *outFramePtrNoPLC = outFrameNoPLC;
00539
00540   printf("Testing PLC version %d.%d.%d.%d\n",
00541           ti_mas_plc_Version_MAJOR, ti_mas_plc_Version_MINOR,
00542           ti_mas_plc_Version_XVERTICAL, ti_mas_plc_Version_PATCH);
00543
00544   if (config.xdaisFlag) {
00545     printf("Using XDAIS APIs\n");
00546   }
00547   else {
00548     printf("Using ECO APIs\n");
00549   }
00550
00551   hw_init();
00552
00553   siu_open();
00554
00555   siu_new_open_config_modules(&config);
00556
00557   printf("Processing Frames..\n");
00558
00559   while (siu_read_inFrame(siuInst.inFrameFilePtr, inFrame, config.frameLength)) {
00560     siuInst.frameCount++;
00561     siu_process(inFrame, outFramePtrPLC, outFramePtrNoPLC);
00562     if (siu_write_outFrame
00563         (siuInst.outFrameFilePtrPLC, outFramePtrPLC, config.frameLength)) {
00564       printf(" Error writing output frame, exiting \n");
00565       exit(0);
00566     }
00567     if (siu_write_outFrame
00568         (siuInst.outFrameFilePtrNoPLC, outFramePtrNoPLC, config.frameLength)) {
00569       printf(" Error writing output frame, exiting \n");
00570       exit(0);
00571     }
00572   }
00573
00574   siu_close();
00575 }
00576
00577 /* @} */ /* ingroup */
00578
00579 /* Nothing past this point */


TDU: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_tdu_Version__top__
#define | __extern extern
#define | ti_mas_tdu_Version___VERS 150
#define | ti_mas_tdu_Version_MAJOR (2)
#define | ti_mas_tdu_Version_MINOR (3)
#define | ti_mas_tdu_Version_XVERTICAL (0)
#define | ti_mas_tdu_Version_PATCH (1)
#define | ti_mas_tdu_Version_BUILD (0)
#define | ti_mas_tdu_Version_QUALITY (3)
#define | ti_mas_tdu_Version_BTYPE (0)
#define | ti_mas_tdu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_tdu_Version_MAJOR
#define | Version_MINOR ti_mas_tdu_Version_MINOR
#define | Version_XVERTICAL ti_mas_tdu_Version_XVERTICAL
#define | Version_PATCH ti_mas_tdu_Version_PATCH
#define | Version_BUILD ti_mas_tdu_Version_BUILD
#define | Version_QUALITY ti_mas_tdu_Version_QUALITY
#define | Version_BTYPE ti_mas_tdu_Version_BTYPE
#define | Version_WIDTH ti_mas_tdu_Version_WIDTH

Define Documentation

#define ti_mas_tdu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_tdu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_tdu_Version_MAJOR (2)

Definition at line 50 of file Version.h.

#define ti_mas_tdu_Version_MINOR (3)

Definition at line 53 of file Version.h.

#define ti_mas_tdu_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_tdu_Version_PATCH (1)

Definition at line 59 of file Version.h.

#define ti_mas_tdu_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_tdu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_tdu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_tdu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_tdu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_tdu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_tdu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_tdu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_tdu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_tdu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_tdu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_tdu_Version_WIDTH

Definition at line 97 of file Version.h.


TDU: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_tdu_Version__include
00023 #define ti_mas_tdu_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_tdu_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_tdu_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_tdu_Version_MAJOR (2)
00051
00052 /* MINOR */
00053 #define ti_mas_tdu_Version_MINOR (3)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_tdu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_tdu_Version_PATCH (1)
00060
00061 /* BUILD */
00062 #define ti_mas_tdu_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_tdu_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_tdu_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_tdu_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_tdu_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_tdu_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_tdu_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_tdu_Version_MAJOR
00091 #define Version_MINOR      ti_mas_tdu_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_tdu_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_tdu_Version_PATCH
00094 #define Version_BUILD      ti_mas_tdu_Version_BUILD
00095 #define Version_QUALITY    ti_mas_tdu_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_tdu_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_tdu_Version_WIDTH
00098 #endif


TDU: Data Structures

  • Data Structures
  • Data Fields

TDU Data Structures

Here are the data structures with brief descriptions:
tduCallTable_t |
tduCfgCtl_t | Configuration structure passed to TDU through tduControl() API. This contains several unionized substructures. Each substructure is used with a specific control code in a specific use case/call flow
tduCfgCtlStd_s | Single frequency detector configuration structure. Use case: Non-MF tone detection ON
tduConfig_t | Configuration structure passed to tduOpen() API
tduContext_s |
tduCptCfgCtl_t | Call progress tone detector configuration structure. Use case: Non-MF tone detection ON
tduCptSmartRep_t | Additional information about TDU detection event. This structure is shared by several detectors inside TDU
tduDetContext_t | This is the definition of detector context structure. Usage information of this structure is at Individual detector contexts
tduDigitFilterCfgCtl_s | Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions
tduIntFwTable_t | Internal framework call table
tduMfCfgCtl_t | MF detection configuration structure. Use case: MF tone detection
tduMfState_t | Structure used for saving/restoring MF detector configuration parameters Use case: Digit Signalling
tduNewConfig_t | Configuration structure for creation of TDU instance. This structure is passed to tduNew() API. It contains unique ID in the system to be used for this TDU instance
tduPosition_t | Configuration structure for setting position of TDU in system. Use case: TDU Position
tduQueryState_t | Structure used by TDU to report its internal state in response to tdu_CTL_QUERY_STATE control code Use case: Digit Signalling
tduRepStats_s | TDU reporting statistics structure. This structure is passed to the tduGetStats() API function. It contains false detection statistics
tduSfdPeek_t | Structure for querying and returning TDU's internal configuration for SS7 COT and SS7 COR detectors. Use case: Autocot generation
tduSizeConfig_t | Size configuration structure. This structure is passed to tduGetSizes() and tduNew() APIs. It contains the worst case input frame length, and whether TDU is being instantiated in lite mode or full mode
tduTable_t | Call table definition for control and process funcitons of individual detectors
tduToneFilterCfgCtl_t | Configuration structure to enable/disable tone detection reports Use case: Enable Detection Reports
tduTxDelayLine_t | Structure used by TDU to return pointer to memory relinquished (TDU's internal delay line buffer) Use case: Relinquish Memory


TDU: Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » Bell 103 Ans. (2225Hz) Modem SFD

Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD

Description

Bell 103 is a full-duplex modem using frequency multiplex (1070 Hz-1270 Hz for the originating channel and 2025 Hz-2225 Hz for the answering channel). This type of signal is recognized by a preamble consisting of consecutive marks in either channel.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.18, 11-2000, Operational and interworking requirements for DCEs operating in the text telephone mode
  2. ITU-T Recommendation V.18, V.18 (2000) Amendment 1, 11-2002, Harmonization with ANSI TIA/EIA-825 (2000) text phones
  3. ITU-T Recommendation V.150.1, 01-2003, Modem-over-IP networks: Procedures for the end-to-end connection of V-series DCEs
  4. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band data over IP networks

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: Bell 103 Ans. (2225Hz) Modem SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

Bell 103 Ans. (2225Hz) Modem SFD

Description

Same as the Bell 103 ans detector in the Primary Direction (see Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD).

This detector is configured simultaneously with the Bell 103 ans Primary Direction detector. The same configuration parameters are used.

The detector is automatically disabled if any of the following events are detected: V.25, V.21, V.23, V.8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).


TDU: Bell 202: 1200 Hz or 2200 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

Bell 202: 1200 Hz or 2200 Hz SFD

Description

Bell 202 is a half-duplex FSK modem protocol using frequency multiplex with 1200 bps baud rate. This type of signal is recognized by a preamble consisting of consecutive marks or spaces. Both single tone events (1200 Hz or 2200 Hz) are detected.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, or UNS1.

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band data over IP networks
  2. Bell 103 - Asynchronous data transmission, full-duplex operation over 2-wire dialup or leased lines; 300-bps data rate
  3. Bell 212 A - Synchronous/ asynchronous data transmission, full-duplex operation over 2-wire leased or dialup lines; 1200-bps data rate

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.25 Detection (CED) 2100 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » V.25 Detection 2100 Hz SFD

V.25 Detection (CED) 2100 Hz SFD

Description

This detector detects following events:

  1. ANS (or CED) is a 2100 Hz tone transmitted by the answering DCE at its nominal power level. The frequency tolerance is specified by ITU-T Recommendation G.164 as ±15 Hz. The signal duration is defined by V.25 and T.30 and should be in a 2.6 - 4.0 second window. CED does not include phase reversals.

  2. ANSam is the Answer Tone generated by a V.8-capable answering DCE. This modified answering tone is amplitude modulated by a sine wave at 15 Hz. The depth of modulation is 20% of the average amplitude.

  3. ANS/ and ANSam/ represent a phase reversal to the ANS or ANSam signals. These phase reversals are 180 degrees ±10 degrees, in a one ms window, repeating over a 450 ms period ±25 ms.

If configured to do so, the detector can internally generate early alert after 6 0 ms causing voice path squelching (this can be used to prevent 2100 Hz leak and its detection at the remote end).

The final decision, reported after 570-600 ms, includes discrimination between ANS and ANS/. Based on the final decision, the DSP can perform automatic reconfiguration actions. If it is ANS/ (2100 Hz with phase reversal) the echo canceller may be disabled. If it is a CED event (2100 Hz without phase reversal), the echo canceller NLP may be disabled. After detection of a bidirectional silence condition, the echo canceller may be restored to it's previous state.

Three tests need to be passed continuously for an event to be qualified:

  • Peak frequency test
  • Absolute power threshold test (power has to be between minimum and maximum power thresholds)
  • Tone-to-the-rest-of-signal ratio

All three tests have to be continuously passed for the run-time configurable time (default value is 330 ms).

After initial qualification, a phase reversal search is started for the next 250 ms. During that interval, phase reversal can be suspended for 20 ms, on the PKT side (if the PKT-side 2100 Hz tone is detected), if a decoder switchover is detected, or a packet loss appears.

If a phase reversal is detected, additional tone qualification, (the three tests listed before) for the next 130 ms, is executed.

Finally, if a tone gets qualified, it is reported as an ANS/ event. If a phase reversal is not detected, a CED (ANS) event is reported.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, and hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate, detection direction, and timestamp of an internal clock.

Standards Compliance

  1. ITU-T Recommendation V.25, 10-1996, Automatic answering equipment and general procedures for automatic calling equipment on the general switched telephone network including procedures for disabling of echo control devices for both manually and automatically established calls
  2. ITU-T Recommendation G.164, 11-1988, Echo suppressors
  3. ITU-T Recommendation G.165, 03-1993, Echo cancellers
  4. ITU-T Recommendation G.168, 06-2002, Digital network echo cancellers

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.25 Detection 2100 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.25 Detection 2100 Hz SFD

Description

This is the same as the V.25 (CED) detector in Primary Direction (see V.25 Detection (CED) 2100 Hz SFD).

This detector is configured simultaneously with the V.25 Primary Direction detector. The same configuration parameters are used.


TDU: CID CAS 2130 Hz & 2750 Hz Dual Tone Detector

TDU (Tone Detection Unit) Package » Detailed TDU Description

CID CAS 2130 Hz & 2750 Hz Dual Tone Detector

Description

The caller ID with call waiting service (CIDCW) defines the protocol for reliable delivery of caller information under these conditions. The CPE is alerted by a single tone (subscriber alerting signal 400 Hz) followed by a dual tone (2130 + 2750 Hz). It can be used by the application to cut the voice connection during the FSK signal. A report is generated to the application indicating: tone ID, frequency estimation of each tone, total power, type of event (on/off), and the internal timestamp.

Four tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test for each tone
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds) for each tone
  3. Tone-to-the-rest-of-signal ratio.
  4. Twist test (power difference between two tones)

Standards Compliance

  1. GR-30-CORE, CLASS Feature: Calling Number Delivery FSD 01-02-1051, Bellcore, December 1994

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: T.30 Calling Tone (CNG) 1100 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

T.30 Calling Tone (CNG) 1100 Hz SFD

Description

This tone may optionally be generated by an originating FAX machine, and if so, it is the first in-band signal that may indicate FAX transmission. Since usage is not mandatory, this signal alone is not a sufficient indication of a FAX transmission. As soon as CED is detected from the opposite direction, the CNG tone generation is stopped.

Per ITU-T Recommendation T.30, its cadence is well defined: 500 ms of 1100 Hz tone, followed by 3000 ms of silence. The pattern is repeated.

Three tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation T.30, 07-2003, Procedures for document facsimile transmission in the general switched telephone network

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: SS7 Continuity Test Tone Detection (Auto COT)

TDU (Tone Detection Unit) Package » Detailed TDU Description

SS7 Continuity Test Tone Detection (Auto COT)

Description

Because the bearer path is distinct from the signaling path, SS7 requires a specific means to validate the bearer channel before the call is established. If there is some inherent check for faulty conditions built into the transmission system, the continuity path check is not needed. But if the circuit-type is not known to the SS7 signaling, the continuity path check should be performed. This is of particular interest for analog circuits and international traffic.

Continuity (voice path presence) check (or Continuity Test - COT) is usually performed after initial addressing information, and might be repeated few times during complete voice path establishment, and before final confirmation that addressing is completed.

Continuity check is accomplished through tonal-based handshaking. There are two types of COT tests: Loopback and Transponder. In the 4-wire case, the originating side transmits a 2000/2010 Hz tone. The terminating end can establish the loopback, or it can detect the 2000/2010 Hz tone and respond with 2000/2010 Hz tone. In the 2-wire case, the originating side transmits a 2000/2010 Hz tone and the terminating end responds with a 1780 Hz tone.

The TDU provides support for standard continuity checks to allow voice path verification capabilities over TDM and Network paths.

Existing SS7 2000/2010Hz and 1780Hz detectors are used for automatic COT, i.e. they are temporarily dedicated for this operation.

Standards Compliance

  1. ITU-T Recommendation Q.724, 11-1988, Telephone user part signaling procedure
  2. GR-246-CORE Annex B, 12-1994, Telcordia Technologies Specification of Signaling System Number 7, Annex B

Limitations

N/A

Configuration

  • Mode of operation (originating/terminating)
  • Tones involved (2000Hz or 2010Hz or 1780Hz)
  • Minimum detection power threshold
  • Minimum detection qualification time
  • Time to wait for action of remote end (action is determined by detecting presence/absence of remote tone).


TDU: Call Progress Tone Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

Call Progress Tone Detection

Description

There are many single- or dual-tone events in the lower frequency band (300-650 Hz) which indicate various line conditions, events that are primarily intended for human use: ringback, busy, idle, and so on.

Administrations use different sets of frequencies and cadence for tonal events. In most cases, one or two tones are used simultaneously. But, there are few cases with three-tone events, or modulated low frequency signals.

Recognition of specific call progress tone events is accomplished by the host using the DSP estimated number of tones and their frequencies, and their detected cadence (on/off indications).

Three tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation Q.35/E.180, 03-1998, Technical characteristics of tones for the telephone service
  2. E.180 Supplement 2

Limitations

  • Host needs to filter out many false alerts in presence of speech, using cadence and frequency information provided by the DSP detector.
  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 10 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: Detailed TDU Description

TDU (Tone Detection Unit) Package

Detailed TDU Description

Page Contents

  • Description
  • Primary Direction Detectors
  • Secondary Direction Detectors
  • Auto COT

Description

The Tone Detection Unit (TDU) is able to detect various types of line events encountered in a voice band channel. In the PSTN, tones are generated at different places. Some detectors are needed even before a voice path is established (trunk events), and are actually a prerequisite for voice path establishment (e.g., PTS). Some tone events need to be detected and transported through the packet network with descriptive attributes. These events and attributes are also used for proper tone restoration on the remote side (low bit-rate voice codecs cannot guarantee the reproduction of some tone signals accurately for automatic recognition), or for out-of-band signaling. By defining separate payload formats for tone events, additional bandwidth compression is achieved.

There are two options for this module to handle digits and events. First, it can detect and measure frequency components of the voice band signals. In this mode of operation no attempt is made to discern the meaning of the tones, but just to distinguish tones from speech signals. This is of particular interest for operation in conjunction with low bit rate codecs and line echo cancellers. Another option is to recognize the tones and translate them into a name, i.e. to recognize the meaning of the tone.

Tone events handled by the TDU are classified by the following four groups:

  1. Single Tone Events
    • Frequency of tone to be detected
      • Central frequency of band where tone detection should be performed
    • Allowed offset from central frequency
      • Can be absolute (Hz) or relative (%), depending on the standard.
      • Tone detection should be performed in frequency band around the central frequency.
      • The width of band is defined by allowed frequency offset (from central frequency offset to central frequency + offset)
    • Minimum time of tone presence before tone event is declared
      • Minimum time interval before declaring tone event. Absolute threshold test, relative (SNR) test and frequency offset must be passed during this period.
    • Minimum absolute power of tone to declare event
      • Lowest power of tone peak.
    • Minimum ratio of tone power to total signal power during tone detection
      • This ratio is passed as linear parameter (Q15 format), but, internally is converted to logarithmic value (Q4 format).
    • Tone-off power histeresis
      • During On-to-Off transition detection, test of absolute tone power is performed against lower value than during Off-to-On transition. The difference between these two thresholds is defined by histeresis (linear, Q15).

  2. Dual Tone Events
    • Dual-Tone Multi-Frequency (DTMF)
    • MF R1
    • MF R2 forward signaling
    • MF R2 backward signaling

  3. Band-Pass Energy Events
    • Absolute power threshold of signal content in frequency band (dB units)
    • Relative ratio of signal within frequency band and total signal power (Q15, linear)
    • Minimum tone duration exceeding the aforementioned thresholds.

  4. Repeated FSK Pattern Events
    • V.21 flags
    • CM signal (Call Menu V.8 signal)

Tone events may be used by a system to automatically reconfigure a voice channel in some scenarios, like echo canceller (ECAN) disabling and bidirectional silence detector activation after V.25 tone detection. Internal system notification may be used to trigger specific processing, such as in-band relay, tone generation/detection protocols,and echo canceller control. External host notification may be exploited to enables processing at the host processor's discretion for control of operations such as voice/fax switchover.

Primary Direction Detectors

The primary detection direction in many cases is from the TDM interface and after echo removal. The majority of the tone detectors are located in the primary direction. If requested, the primary direction can be changed to the direction from the network interface (after the voice decoder). This configuration is useful only if the decoder is a waveform codec such as G.711 or ADPCM. In this configuration, tone detectors that are normally bidirectional (V.25, Bell 103, and V.22) become unidirectional, and provide detection only from the primary side.

Primary Detector Details

  • DTMF Detection
  • MFR1 and R2 Detection
  • Signaling Frequency 2600 Hz SFD
  • V.21(H) HDLC Flags Detection
  • V.8 Call Menu (CM) & Call Indicator(CI) Detection
  • V.25 Detection (CED) 2100 Hz SFD
  • T.30 Calling Tone (CNG) 1100 Hz SFD
  • Call Progress Tone Detection
  • V.18A 1400 Hz or 1800 Hz SFD
  • SS7 COT 2010 Hz or 1780 Hz SFD
  • Test Tones 1000/1004 Hz SFD
  • CID CAS 2130 Hz & 2750 Hz Dual Tone Detector
  • V.22 Unscrambled Binary Ones (USB1) 2250 Hz SFD
  • Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD
  • V.23 Marks: 1300 Hz (fwd) or 390 Hz (bkwd) SFD
  • V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD
  • Bell 202: 1200 Hz or 2200 Hz SFD
  • V.8bis Dual Tone (1375 Hz & 2002 Hz) or (1529 Hz, 2225 Hz) Detection
  • V.32 Ext (2100 Hz followed by 1800 Hz in secondary direction)
  • SIA

Secondary Direction Detectors

The secondary direction in many cases is the direction from the Packet Network Interface. There are few detectors operating in this direction: V.25, Bell 103 answering tone , V.22 unscrambled binary ones, V.21 tones, V.18a tones, and V32 Ext tones. These detectors are bidirectional.

Secondary Detector Details

  • V.25 Detection 2100 Hz SFD
  • V.22 Unscrambled Binary Ones (UNS1) (2250 Hz) SFD
  • Bell 103 Ans. (2225Hz) Modem SFD
  • V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD
  • V.18A 1400 Hz or 1800Hz SFD
  • V.32 Ext (2100 Hz followed by 1800 Hz in primary direction)
  • SIA

Auto COT

  • SS7 Continuity Test Tone Detection (Auto COT)


TDU:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


TDU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


TDU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


TDU: DTMF Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

DTMF Detection

Description

The Dual-tone Multi-Frequency detector detects voice band dual-tone events, such as those generated by multi-frequency push-button terminals. Two tones are simultaneously generated by a device, one from the lower frequency group: 697, 770, 852, and 941Hz and one from the upper frequency group: 1209, 1336, 1477, and 1633 Hz. There are 16 events: (0-9, ‘*’, ‘#’, ‘A’, ’B’, ‘C’, and ‘D’).

This feature is used in multiple configurations: digit collection, digit in-band relay, digitupspeed, and digit removal for out-of-band relay.

The detector executes multiple tests to qualify a digit event. These tests include: frequency tolerance of each tone, power of each tone, overall SNR, power twist, and minimum duration.

Hard-coded configuration parameters are: frequency detection window, qualification time, and hangover time.

The detection report includes digit ID, frequency estimation of each tone, combined power, and internal timestamp.

Standards Compliance

  1. ITU-T Recommendation Q.23, 11-1988, Technical features of push-button telephone sets
  2. ITU-T Recommendation Q.24, 11-1988, Multifrequency push-button signal reception
  3. GR-506, 06-1996, LSSGR: Signaling for Analog Interfaces

Limitations

No digits shorter than 25 ms. are detected, and no digits longer than 38 ms. are missed. Digits with duration 25-38 ms. may or may not be detected. There is grey area of 3 dBm0 above the minimum tone power threshold where digits may or may not be detected.

A digit alert is used by relay processing to suppress the voice path, and is generated 10-15 ms. after a tone starts. Therefore, the digit leakage, as voice before relay begins, may be up to 15 ms. in duration.

Configuration

Set of power threshold parameters that are run-time configurable:

  1. Minimum tone power threshold (tones below this value are rejected)
  2. Maximum tone power threshold (tones above this value are rejected)
  3. Positive twist (maximum power difference between lower and upper tone)
  4. Negative twist (maximum power difference between upper and lower tone)
  5. Break threshold (tones below this value are declared off, after being initially reported as on)

Special digit report filtering can be provisioned for four digit groups (0-9, "*", "#", and A-D) based on:

  1. Digit edge (on / off), e.g., only digit-on events are reported.
  2. Duration of long digits


TDU: TDU External API

TDU (Tone Detection Unit) Package

TDU External API

Page Contents

  1. Complete TDU API
  2. TDU Creation Functions
  3. TDU Configuration Functions
  4. TDU Execution Functions
  5. TDU Destruction Functions
  6. TDU Return Codes

Complete TDU API

  1. tduGetSizes()
  2. tduNew()
  3. tduOpen()
  4. tduControl()
  5. tduGetStats()
  6. tduSendIn()
  7. tduReceiveIn()
  8. tduClose()
  9. tduDelete()

TDU Creation Functions

TDU instance creation is a four step process. First, determine the TDU memory requirements via tduGetSize() below. Second, allocate the TDU memory buffers using any system-prescribed method. Create the TDU instance by passing the allocated buffer information to tduNew(). Finally, open the TDU instance for use via the tduOpen() API function. This process must be followed in the order given for proper operation.

  1. tduGetSizes()
  2. tduNew()
  3. tduOpen()

TDU Configuration Functions

The TDU component has two external API configuration routines; one to configure the instance -- tduControl(), and one to gather operational statistics -- tduGetStats(). These external API functions require an active TDU instance that has been opened according to the procedure in TDU Creation Functions above.

  1. tduControl()
  2. tduGetStats()

TDU Execution Functions

The TDU execution API consists of two routines, one per direction. The tduSendIn() API function operates on linear samples in the from-TDM-to-Network direction. This is considered the "primary" direction for tone detection. The tduReceiveIn() API function operates on linear samples in the from-Network-to-TDM direction. This is considered the "secondary" direction for tone detection.

The execution API functions require an active TDU instance that has been opened according to the procedure in TDU Creation Functions above.

  1. tduSendIn()
  2. tduReceiveIn()

TDU Destruction Functions

TDU instance desctruction is a two step process. First, the TDU must be closed using the tduClose() API function. Once the TDU is closed it may be removed via the tduDelete() function.

Note:
  1. Once an instance has been closed, it may be re-opened via the tduOpen() routine. The instance memory should never be reallocated until the instance is deleted.

  1. tduClose()
  2. tduDelete()

TDU Return Codes

The TDU module provides various kinds of output to indicate errors in configuration, execution errors and to indicate tone detections.

  • ECO API return codes
  • Exception codes
  • Detection report codes


TDU: File Index

  • File List
  • Globals

TDU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
tdu.h [code] Contains definitions and external APIs for TDU


TDU: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • active_tone_reports : tduQueryState_t

- b -

  • base : tduTxDelayLine_t
  • baudotReport : tduContext_s
  • bdtew : tduIntFwTable_t
  • bellTid : tduIntFwTable_t
  • bfield1 : tduMfState_t
  • breakThresh : tduMfCfgCtl_t

- c -

  • c_code_off : tduDetContext_t
  • c_code_on : tduDetContext_t
  • changed_bfield : tduToneFilterCfgCtl_t
  • Control : tduTable_t
  • cpt : tduIntFwTable_t , tduCfgCtl_t

- d -

  • debugInfo : tduContext_s
  • detId : tduDetContext_t
  • detInstVec : tduContext_s
  • detNum : tduContext_s
  • detNumSFDF : tduContext_s
  • detNumSFDT : tduContext_s
  • detSlot : tduDetContext_t
  • detState : tduQueryState_t
  • dfilt : tduCfgCtl_t
  • digit_echo : tduContext_s
  • digit_filter : tduIntFwTable_t
  • digit_sent : tduCfgCtl_t

- e -

  • endFreq : tduCptCfgCtl_t

- f -

  • FalseAlert : tduRepStats_s
  • filter_bfield : tduDigitFilterCfgCtl_s
  • frame_size : tduConfig_t
  • freq1 : tduCptSmartRep_t
  • freq2 : tduCptSmartRep_t
  • freq_pow_thresh_high : tduMfState_t
  • freq_pow_thresh_low : tduMfState_t
  • freqPowThreshHigh : tduMfCfgCtl_t
  • freqPowThreshLow : tduMfCfgCtl_t

- g -

  • gmpAllocGmc : tduContext_s
  • gmpCreate : tduContext_s
  • gmpDelete : tduContext_s
  • gmpFreeGmc : tduContext_s
  • gmpRead : tduContext_s
  • gmpWrite : tduContext_s

- h -

  • hot_detectors : tduQueryState_t

- i -

  • ID : tduNewConfig_t

- l -

  • length : tduTxDelayLine_t
  • lite : tduCfgCtl_t , tduSizeConfig_t
  • local_buf : tduContext_s
  • long_digit_bfield : tduDigitFilterCfgCtl_s
  • long_digit_hangover : tduDigitFilterCfgCtl_s

- m -

  • magnitudes : tduContext_s
  • maxSamplesPerFrame : tduSizeConfig_t
  • mf : tduIntFwTable_t , tduCfgCtl_t
  • mf_cidcas_ctl : tduIntFwTable_t
  • mf_coin_tones_ctl : tduIntFwTable_t
  • mf_v8bis_fs_ctl : tduIntFwTable_t
  • mfstate : tduCfgCtl_t

- o -

  • operation : tduSfdPeek_t

- p -

  • params : tduMfState_t , tduDetContext_t
  • peek : tduCfgCtl_t
  • position : tduCfgCtl_t
  • Process : tduTable_t

- r -

  • reports_bfield : tduToneFilterCfgCtl_t

- s -

  • sfd_llmr_ANSam : tduIntFwTable_t
  • sfd_llmr_ANSam_reset : tduIntFwTable_t
  • sfd_llmr_ANSam_test : tduIntFwTable_t
  • sfdf : tduIntFwTable_t
  • sfdt : tduIntFwTable_t
  • sizeCfg : tduNewConfig_t
  • slot : tduSfdPeek_t
  • slotInstSize : tduDetContext_t
  • startFreq : tduCptCfgCtl_t
  • state : tduCfgCtl_t
  • std : tduCfgCtl_t , tduCptCfgCtl_t , tduSfdPeek_t
  • switched : tduMfState_t

- t -

  • tableId_dir : tduDetContext_t
  • tdu_send_out : tduContext_s
  • tduClose : tduCallTable_t
  • tduControl : tduCallTable_t
  • tduDelete : tduCallTable_t
  • tduGetSizes : tduCallTable_t
  • tduNew : tduCallTable_t
  • tduOpen : tduCallTable_t
  • tduReceiveIn : tduCallTable_t
  • tduRxSaveSize : tduContext_s
  • tduSendIn : tduCallTable_t
  • tfilt : tduCfgCtl_t
  • tone1bw : tduCptSmartRep_t
  • tone2bw : tduCptSmartRep_t
  • toneOnConfirmDuration : tduCfgCtlStd_s
  • toneOnEnergy : tduCfgCtlStd_s
  • toneOnSnr : tduCfgCtlStd_s
  • twistNegative : tduMfCfgCtl_t
  • twistPositive : tduMfCfgCtl_t
  • tx_delay_line : tduCfgCtl_t

- u -

  • u : tduCfgCtl_t

- v -

  • v21 : tduIntFwTable_t
  • valid_bitfield : tduPosition_t
  • value_bitfield : tduPosition_t
  • voice_disc : tduIntFwTable_t
  • voice_disc_ctl : tduIntFwTable_t

- w -

  • work_buf : tduContext_s


TDU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • active_tone_reports : tduQueryState_t

- b -

  • base : tduTxDelayLine_t
  • baudotReport : tduContext_s
  • bdtew : tduIntFwTable_t
  • bellTid : tduIntFwTable_t
  • bfield1 : tduMfState_t
  • breakThresh : tduMfCfgCtl_t

- c -

  • c_code_off : tduDetContext_t
  • c_code_on : tduDetContext_t
  • changed_bfield : tduToneFilterCfgCtl_t
  • Control : tduTable_t
  • cpt : tduIntFwTable_t , tduCfgCtl_t

- d -

  • debugInfo : tduContext_s
  • detId : tduDetContext_t
  • detInstVec : tduContext_s
  • detNum : tduContext_s
  • detNumSFDF : tduContext_s
  • detNumSFDT : tduContext_s
  • detSlot : tduDetContext_t
  • detState : tduQueryState_t
  • dfilt : tduCfgCtl_t
  • digit_echo : tduContext_s
  • digit_filter : tduIntFwTable_t
  • digit_sent : tduCfgCtl_t

- e -

  • endFreq : tduCptCfgCtl_t

- f -

  • FalseAlert : tduRepStats_s
  • filter_bfield : tduDigitFilterCfgCtl_s
  • frame_size : tduConfig_t
  • freq1 : tduCptSmartRep_t
  • freq2 : tduCptSmartRep_t
  • freq_pow_thresh_high : tduMfState_t
  • freq_pow_thresh_low : tduMfState_t
  • freqPowThreshHigh : tduMfCfgCtl_t
  • freqPowThreshLow : tduMfCfgCtl_t

- g -

  • gmpAllocGmc : tduContext_s
  • gmpCreate : tduContext_s
  • gmpDelete : tduContext_s
  • gmpFreeGmc : tduContext_s
  • gmpRead : tduContext_s
  • gmpWrite : tduContext_s

- h -

  • hot_detectors : tduQueryState_t

- i -

  • ID : tduNewConfig_t

- l -

  • length : tduTxDelayLine_t
  • lite : tduCfgCtl_t , tduSizeConfig_t
  • local_buf : tduContext_s
  • long_digit_bfield : tduDigitFilterCfgCtl_s
  • long_digit_hangover : tduDigitFilterCfgCtl_s

- m -

  • magnitudes : tduContext_s
  • maxSamplesPerFrame : tduSizeConfig_t
  • mf : tduIntFwTable_t , tduCfgCtl_t
  • mf_cidcas_ctl : tduIntFwTable_t
  • mf_coin_tones_ctl : tduIntFwTable_t
  • mf_v8bis_fs_ctl : tduIntFwTable_t
  • mfstate : tduCfgCtl_t

- o -

  • operation : tduSfdPeek_t

- p -

  • params : tduMfState_t , tduDetContext_t
  • peek : tduCfgCtl_t
  • position : tduCfgCtl_t
  • Process : tduTable_t

- r -

  • reports_bfield : tduToneFilterCfgCtl_t

- s -

  • sfd_llmr_ANSam : tduIntFwTable_t
  • sfd_llmr_ANSam_reset : tduIntFwTable_t
  • sfd_llmr_ANSam_test : tduIntFwTable_t
  • sfdf : tduIntFwTable_t
  • sfdt : tduIntFwTable_t
  • sizeCfg : tduNewConfig_t
  • slot : tduSfdPeek_t
  • slotInstSize : tduDetContext_t
  • startFreq : tduCptCfgCtl_t
  • state : tduCfgCtl_t
  • std : tduCfgCtl_t , tduCptCfgCtl_t , tduSfdPeek_t
  • switched : tduMfState_t

- t -

  • tableId_dir : tduDetContext_t
  • tdu_send_out : tduContext_s
  • tduClose : tduCallTable_t
  • tduControl : tduCallTable_t
  • tduDelete : tduCallTable_t
  • tduGetSizes : tduCallTable_t
  • tduNew : tduCallTable_t
  • tduOpen : tduCallTable_t
  • tduReceiveIn : tduCallTable_t
  • tduRxSaveSize : tduContext_s
  • tduSendIn : tduCallTable_t
  • tfilt : tduCfgCtl_t
  • tone1bw : tduCptSmartRep_t
  • tone2bw : tduCptSmartRep_t
  • toneOnConfirmDuration : tduCfgCtlStd_s
  • toneOnEnergy : tduCfgCtlStd_s
  • toneOnSnr : tduCfgCtlStd_s
  • twistNegative : tduMfCfgCtl_t
  • twistPositive : tduMfCfgCtl_t
  • tx_delay_line : tduCfgCtl_t

- u -

  • u : tduCfgCtl_t

- v -

  • v21 : tduIntFwTable_t
  • valid_bitfield : tduPosition_t
  • value_bitfield : tduPosition_t
  • voice_disc : tduIntFwTable_t
  • voice_disc_ctl : tduIntFwTable_t

- w -

  • work_buf : tduContext_s


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

  • MF_ALERT_ONLY : tdu.h
  • MF_CONFIRMED_OR_ALERT_ON : tdu.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

  • tdu_CTL_B202_TONES_OFF : tdu.h
  • tdu_CTL_B202_TONES_ON : tdu.h
  • tdu_CTL_BDTEW_OFF : tdu.h
  • tdu_CTL_BDTEW_ON : tdu.h
  • tdu_CTL_BELL_OFF : tdu.h
  • tdu_CTL_BELL_ON : tdu.h
  • tdu_CTL_CIDCAS_ALL_OFF : tdu.h
  • tdu_CTL_CIDCAS_ALL_ON : tdu.h
  • tdu_CTL_CNG_OFF : tdu.h
  • tdu_CTL_CNG_ON : tdu.h
  • tdu_CTL_COIN_TONES_OFF : tdu.h
  • tdu_CTL_CPT_OFF : tdu.h
  • tdu_CTL_CPT_ON : tdu.h
  • tdu_CTL_CRE2_OFF : tdu.h
  • tdu_CTL_CRE2_ON : tdu.h
  • tdu_CTL_CRE_OFF : tdu.h
  • tdu_CTL_CRE_ON : tdu.h
  • tdu_CTL_DIGIT_FILTER : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_OFF : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_ON : tdu.h
  • tdu_CTL_GET_LITE : tdu.h
  • tdu_CTL_LLMR_OFF : tdu.h
  • tdu_CTL_LLMR_ON : tdu.h
  • tdu_CTL_MF_CIDCAS_ON : tdu.h
  • tdu_CTL_MF_COIN_TONES_ON : tdu.h
  • tdu_CTL_MF_CRE1_OFF : tdu.h
  • tdu_CTL_MF_CRE1_ON : tdu.h
  • tdu_CTL_MF_DTMF : tdu.h
  • tdu_CTL_MF_MAX : tdu.h
  • tdu_CTL_MF_MIN : tdu.h
  • tdu_CTL_MF_R1 : tdu.h
  • tdu_CTL_MF_R2BW : tdu.h
  • tdu_CTL_MF_R2FW : tdu.h
  • tdu_CTL_MF_RELAY_OFF : tdu.h
  • tdu_CTL_MF_STD_OFF : tdu.h
  • tdu_CTL_MF_STD_ON : tdu.h
  • tdu_CTL_MFSTD_RESTORE : tdu.h
  • tdu_CTL_MFSTD_SAVE : tdu.h
  • tdu_CTL_MULTIPLE_TONES : tdu.h
  • tdu_CTL_NONE : tdu.h
  • tdu_CTL_OFF_FIRST : tdu.h
  • tdu_CTL_OFF_LAST : tdu.h
  • tdu_CTL_ON_FIRST : tdu.h
  • tdu_CTL_ON_LAST : tdu.h
  • tdu_CTL_PEEK_SFD : tdu.h
  • tdu_CTL_POSITION : tdu.h
  • tdu_CTL_PR_SEARCH_RST : tdu.h
  • tdu_CTL_QUERY_STATE : tdu.h
  • tdu_CTL_RELEASE : tdu.h
  • tdu_CTL_RESTART : tdu.h
  • tdu_CTL_RSVD1 : tdu.h
  • tdu_CTL_RSVD2 : tdu.h
  • tdu_CTL_RSVD3 : tdu.h
  • tdu_CTL_RSVD4 : tdu.h
  • tdu_CTL_SF_OFF : tdu.h
  • tdu_CTL_SF_ON : tdu.h
  • tdu_CTL_SFDT_CIDCAS_OFF : tdu.h
  • tdu_CTL_SFDT_CIDCAS_ON : tdu.h
  • tdu_CTL_SIA_OFF : tdu.h
  • tdu_CTL_SIA_ON : tdu.h
  • tdu_CTL_SS7COR_OFF : tdu.h
  • tdu_CTL_SS7COR_ON : tdu.h
  • tdu_CTL_SS7COT_OFF : tdu.h
  • tdu_CTL_SS7COT_ON : tdu.h
  • tdu_CTL_STOP : tdu.h
  • tdu_CTL_SUSSPEND : tdu.h
  • tdu_CTL_THRE_MAX : tdu.h
  • tdu_CTL_THRE_MIN : tdu.h
  • tdu_CTL_TT1khz_OFF : tdu.h
  • tdu_CTL_TT1khz_ON : tdu.h
  • tdu_CTL_UMF_OFF : tdu.h
  • tdu_CTL_V18A_OFF : tdu.h
  • tdu_CTL_V18A_ON : tdu.h
  • tdu_CTL_V21_CM_FAX_OFF : tdu.h
  • tdu_CTL_V21_CM_FAX_ON : tdu.h
  • tdu_CTL_V21_OFF : tdu.h
  • tdu_CTL_V21_ON : tdu.h
  • tdu_CTL_V21_TONES_OFF : tdu.h
  • tdu_CTL_V21_TONES_ON : tdu.h
  • tdu_CTL_V21_V8DATA_OFF : tdu.h
  • tdu_CTL_V21_V8DATA_ON : tdu.h
  • tdu_CTL_V23_TONES_OFF : tdu.h
  • tdu_CTL_V23_TONES_ON : tdu.h
  • tdu_CTL_V25_OFF : tdu.h
  • tdu_CTL_V25_ON : tdu.h
  • tdu_CTL_V8BIS_TONES_OFF : tdu.h
  • tdu_CTL_V8BIS_TONES_ON : tdu.h
  • tdu_CTL_VOICE_DISC_OFF : tdu.h
  • tdu_CTL_VOICE_DISC_ON : tdu.h
  • tdu_DET_DIR_MASK : tdu.h
  • tdu_DET_ID_CASH : tdu.h
  • tdu_DET_ID_CASL : tdu.h
  • tdu_DET_ID_CIDCAS : tdu.h
  • tdu_DET_ID_CNG : tdu.h
  • tdu_DET_ID_COIN_TONES : tdu.h
  • tdu_DET_ID_CPT : tdu.h
  • tdu_DET_ID_CRE2 : tdu.h
  • tdu_DET_ID_DTMF : tdu.h
  • tdu_DET_ID_MODEMDISC : tdu.h
  • tdu_DET_ID_NONE : tdu.h
  • tdu_DET_ID_R1 : tdu.h
  • tdu_DET_ID_R2BW : tdu.h
  • tdu_DET_ID_R2FW : tdu.h
  • tdu_DET_ID_SF : tdu.h
  • tdu_DET_ID_SIA : tdu.h
  • tdu_DET_ID_SS7COR : tdu.h
  • tdu_DET_ID_SS7COT : tdu.h
  • tdu_DET_ID_TT1khz : tdu.h
  • tdu_DET_ID_V18A : tdu.h
  • tdu_DET_ID_V21 : tdu.h
  • tdu_DET_ID_V25LLMR : tdu.h
  • tdu_DET_ID_V8BIS_FS : tdu.h
  • tdu_DET_RXDIR : tdu.h
  • tdu_DET_TABLEID_MASK : tdu.h
  • tdu_DET_TXDIR : tdu.h
  • tdu_digit_filter() : tdu.h
  • tdu_ERROR : tdu.h
  • tdu_EXC_DELETE : tdu.h
  • tdu_EXC_FRAMESIZE : tdu.h
  • tdu_EXC_MEMORY : tdu.h
  • tdu_EXC_MFDET : tdu.h
  • tdu_EXC_OPEN : tdu.h
  • tdu_EXC_RECEIVEIN : tdu.h
  • tdu_EXC_SENDIN : tdu.h
  • tdu_FALSE_ALERT_CNT_MASK : tdu.h
  • tdu_GET_FALSE_ALERT_CNT : tdu.h
  • tdu_GET_ON_OFF_FLAG : tdu.h
  • tdu_MAX_SLOT : tdu.h
  • tdu_MAX_SLOT_RX : tdu.h
  • tdu_MAX_SLOT_TX : tdu.h
  • tdu_mf_cidcas_ctl() : tdu.h
  • tdu_mf_coin_tones_ctl() : tdu.h
  • tdu_MF_DIGIT_ALERT_OFF : tdu.h
  • tdu_MF_DIGIT_ALERT_ON : tdu.h
  • tdu_MF_DIGIT_OFF : tdu.h
  • tdu_MF_DIGIT_ON : tdu.h
  • tdu_mf_v8bis_fs_ctl() : tdu.h
  • tdu_NOERR : tdu.h
  • tdu_NOMEMORY : tdu.h
  • tdu_OPERATION_DIR_MASK : tdu.h
  • tdu_OPERATION_ENABLED : tdu.h
  • tdu_POSITION_MF_TESTS_CHANGED : tdu.h
  • tdu_POSITION_MF_TESTS_PREDIGIT_SNR : tdu.h
  • tdu_POSITION_MF_TESTS_SHIFT : tdu.h
  • tdu_POSITION_MF_TESTS_STEP_RISE : tdu.h
  • tdu_POSITION_PRI_AC : tdu.h
  • tdu_POSITION_PRI_ACBC_CHANGED : tdu.h
  • tdu_POSITION_RX : tdu.h
  • tdu_POSITION_SEC_AC : tdu.h
  • tdu_POSITION_SEC_ACBC_CHANGED : tdu.h
  • tdu_POSITION_TXRX_CHANGED : tdu.h
  • tdu_POSITION_TYPE : tdu.h
  • tdu_RX_AFTER_CONF : tdu.h
  • tdu_RX_BEFORE_CONF : tdu.h
  • tdu_RX_ONLY : tdu.h
  • tdu_SET_FALSE_ALERT_CNT : tdu.h
  • tdu_SET_ON_OFF_FLAG : tdu.h
  • tdu_sfd_llmr_ANSam() : tdu.h
  • tdu_sfd_llmr_ANSam_reset() : tdu.h
  • tdu_sfd_llmr_ANSam_test() : tdu.h
  • tdu_SFDT_DET_2225_2250_2300_RX : tdu.h
  • tdu_SFDT_DET_2225_RX : tdu.h
  • tdu_SFDT_DET_2250_RX : tdu.h
  • tdu_SFDT_DET_CASH_RX : tdu.h
  • tdu_SFDT_DET_CASL_RX : tdu.h
  • tdu_SFDT_DET_CIDCAS_RX : tdu.h
  • tdu_SFDT_DET_NONE_RX : tdu.h
  • tdu_SFDT_DET_SIA_RX : tdu.h
  • tdu_SFDT_DET_SIA_S_RX : tdu.h
  • tdu_SFDT_DET_SS7COT_RX : tdu.h
  • tdu_SFDT_DET_V18A_RX : tdu.h
  • tdu_SFDT_DET_V18A_S_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_S_RX : tdu.h
  • tdu_SFDT_DET_V23FW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V25_RX : tdu.h
  • tdu_SIZECFG_FULL : tdu.h
  • tdu_SIZECFG_LITE : tdu.h
  • tdu_SLOT_B202_M : tdu.h
  • tdu_SLOT_B202_S : tdu.h
  • tdu_SLOT_BDTEW : tdu.h
  • tdu_SLOT_BELLRX1 : tdu.h
  • tdu_SLOT_BELLRX2 : tdu.h
  • tdu_SLOT_BELLTX1 : tdu.h
  • tdu_SLOT_BELLTX2 : tdu.h
  • tdu_SLOT_CASH_RX : tdu.h
  • tdu_SLOT_CASL_RX : tdu.h
  • tdu_SLOT_CNG : tdu.h
  • tdu_SLOT_CPT : tdu.h
  • tdu_SLOT_MAX : tdu.h
  • tdu_SLOT_MAX_RX : tdu.h
  • tdu_SLOT_MAX_TX : tdu.h
  • tdu_SLOT_MF_RSVD1 : tdu.h
  • tdu_SLOT_MF_RSVD2 : tdu.h
  • tdu_SLOT_MF_RSVD3 : tdu.h
  • tdu_SLOT_MF_STD : tdu.h
  • tdu_SLOT_MF_USER : tdu.h
  • tdu_SLOT_MF_USER1 : tdu.h
  • tdu_SLOT_NONE : tdu.h
  • tdu_SLOT_SF : tdu.h
  • tdu_SLOT_SFDT_DUMMY1 : tdu.h
  • tdu_SLOT_SFDT_DUMMY2 : tdu.h
  • tdu_SLOT_SFDT_DUMMY3 : tdu.h
  • tdu_SLOT_SIA : tdu.h
  • tdu_SLOT_SIA_RX : tdu.h
  • tdu_SLOT_SIA_S : tdu.h
  • tdu_SLOT_SIA_S_RX : tdu.h
  • tdu_SLOT_SS7COR : tdu.h
  • tdu_SLOT_SS7COT : tdu.h
  • tdu_SLOT_SS7COT_RX : tdu.h
  • tdu_SLOT_TT1khz : tdu.h
  • tdu_SLOT_V18A : tdu.h
  • tdu_SLOT_V18A_RX : tdu.h
  • tdu_SLOT_V18A_S : tdu.h
  • tdu_SLOT_V18A_S_RX : tdu.h
  • tdu_SLOT_V21 : tdu.h
  • tdu_SLOT_V21LOW_MARKS : tdu.h
  • tdu_SLOT_V21LOW_MARKS_RX : tdu.h
  • tdu_SLOT_V21LOW_S_RX : tdu.h
  • tdu_SLOT_V21LOW_SPACES : tdu.h
  • tdu_SLOT_V21UPPER_MARKS : tdu.h
  • tdu_SLOT_V23BW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS_RX : tdu.h
  • tdu_SLOT_V25RX : tdu.h
  • tdu_SLOT_V25TX : tdu.h
  • tdu_TID_ANSAM : tdu.h
  • tdu_TID_ANSAM_PR : tdu.h
  • tdu_TID_ANSAM_PR_RX : tdu.h
  • tdu_TID_ANSAM_RX : tdu.h
  • tdu_TID_B202_TONES : tdu.h
  • tdu_TID_BDTEW1400 : tdu.h
  • tdu_TID_BDTEW1800 : tdu.h
  • tdu_TID_BELL : tdu.h
  • tdu_TID_CAS_T : tdu.h
  • tdu_TID_CIDCAS : tdu.h
  • tdu_TID_CIDCAS_RX : tdu.h
  • tdu_TID_CNG : tdu.h
  • tdu_TID_COIN_TONES : tdu.h
  • tdu_TID_CPT : tdu.h
  • tdu_TID_CRE2 : tdu.h
  • tdu_TID_FIRST : tdu.h
  • tdu_TID_FIRST_EXT : tdu.h
  • tdu_TID_LAST : tdu.h
  • tdu_TID_LAST_EXT : tdu.h
  • tdu_TID_LONG_DIGIT : tdu.h
  • tdu_TID_MASK_ID : tdu.h
  • tdu_TID_MASKED : tdu.h
  • tdu_TID_NULL : tdu.h
  • tdu_TID_PARALLEL_MASK : tdu.h
  • tdu_TID_RXDIR : tdu.h
  • tdu_TID_SF : tdu.h
  • tdu_TID_SIA : tdu.h
  • tdu_TID_SS7COR : tdu.h
  • tdu_TID_SS7COT : tdu.h
  • tdu_TID_TONE0 : tdu.h
  • tdu_TID_TONE1 : tdu.h
  • tdu_TID_TONE10 : tdu.h
  • tdu_TID_TONE11 : tdu.h
  • tdu_TID_TONE12 : tdu.h
  • tdu_TID_TONE13 : tdu.h
  • tdu_TID_TONE14 : tdu.h
  • tdu_TID_TONE15 : tdu.h
  • tdu_TID_TONE16 : tdu.h
  • tdu_TID_TONE2 : tdu.h
  • tdu_TID_TONE3 : tdu.h
  • tdu_TID_TONE4 : tdu.h
  • tdu_TID_TONE5 : tdu.h
  • tdu_TID_TONE6 : tdu.h
  • tdu_TID_TONE7 : tdu.h
  • tdu_TID_TONE8 : tdu.h
  • tdu_TID_TONE9 : tdu.h
  • tdu_TID_TT1khz : tdu.h
  • tdu_TID_TXDIR : tdu.h
  • tdu_TID_TYPE00 : tdu.h
  • tdu_TID_TYPE01 : tdu.h
  • tdu_TID_TYPE02 : tdu.h
  • tdu_TID_TYPE03 : tdu.h
  • tdu_TID_TYPE_MASK : tdu.h
  • tdu_TID_V18A : tdu.h
  • tdu_TID_V21 : tdu.h
  • tdu_TID_V21_CI : tdu.h
  • tdu_TID_V21_CM : tdu.h
  • tdu_TID_V21_CM_FAX : tdu.h
  • tdu_TID_V21_LOWER : tdu.h
  • tdu_TID_V21_TONES : tdu.h
  • tdu_TID_V23_TONES : tdu.h
  • tdu_TID_V25 : tdu.h
  • tdu_TID_V25_EARLY_REPORT_ALERT : tdu.h
  • tdu_TID_V25_EARLY_REPORT_FALSE : tdu.h
  • tdu_TID_V25_PR : tdu.h
  • tdu_TID_V25_RX : tdu.h
  • tdu_TID_V25_RX_PR : tdu.h
  • tdu_TID_V8BIS_TONES : tdu.h
  • tdu_TID_VOICE_DISC : tdu.h
  • tdu_TX_AFTER_CONF : tdu.h
  • tdu_TX_BEFORE_CONF : tdu.h
  • tdu_TX_DELAY_BUF_NUM : tdu.h
  • tdu_TX_ONLY : tdu.h
  • tdu_V8_OFFSET : tdu.h
  • tduBDTEWControl() : tdu.h
  • tduBDTEWProcess() : tdu.h
  • tduBellTid() : tdu.h
  • tduCfgCtlStd_t : tdu.h
  • tduClose() : tdu.h
  • tduContext_t : tdu.h
  • tduControl() : tdu.h
  • tduCPTControl() : tdu.h
  • tduCPTProcess() : tdu.h
  • tduDelete() : tdu.h
  • tduDetContexts : tdu.h
  • tduDigitFilterCfgCtl_t : tdu.h
  • tduDummyControl() : tdu.h
  • tduDummyProcess() : tdu.h
  • tduGetSizes() : tdu.h
  • tduGetStats() : tdu.h
  • tduIncB202_MARKS_F : tdu.h
  • tduIncB202_SPACES_F : tdu.h
  • tduIncBELLRX1_T : tdu.h
  • tduIncBELLRX2_T : tdu.h
  • tduIncBELLTX1_F : tdu.h
  • tduIncBELLTX2_F : tdu.h
  • tduIncCASH_T_RX : tdu.h
  • tduIncCASL_T_RX : tdu.h
  • tduIncCIDCAS : tdu.h
  • tduIncCNG_F : tdu.h
  • tduIncCNG_T : tdu.h
  • tduIncCOIN_TONES : tdu.h
  • tduIncCPT : tdu.h
  • tduIncDTMF : tdu.h
  • tduIncR1 : tdu.h
  • tduIncR2BW : tdu.h
  • tduIncR2FW : tdu.h
  • tduIncSF_F : tdu.h
  • tduIncSFDT_DUMMY1_T : tdu.h
  • tduIncSFDT_DUMMY2_T : tdu.h
  • tduIncSFDT_DUMMY3_T : tdu.h
  • tduIncSIA_F : tdu.h
  • tduIncSIA_S_F : tdu.h
  • tduIncSIA_S_T_RX : tdu.h
  • tduIncSIA_T_RX : tdu.h
  • tduIncSS7COR_F : tdu.h
  • tduIncSS7COT_F : tdu.h
  • tduIncSS7COT_T : tdu.h
  • tduIncTT1khz_F : tdu.h
  • tduIncUMF : tdu.h
  • tduIncV18A_F : tdu.h
  • tduIncV18A_S_F : tdu.h
  • tduIncV18A_S_T_RX : tdu.h
  • tduIncV18A_T_RX : tdu.h
  • tduIncV21 : tdu.h
  • tduIncV21CM : tdu.h
  • tduIncV21LOW_MARKS_F : tdu.h
  • tduIncV21LOW_MARKS_T : tdu.h
  • tduIncV21LOW_MARKS_T_RX : tdu.h
  • tduIncV21LOW_SPACES_F : tdu.h
  • tduIncV21LOW_SPACES_T_RX : tdu.h
  • tduIncV21UPPER_MARKS_F : tdu.h
  • tduIncV21UPPER_MARKS_LITE_T : tdu.h
  • tduIncV23BW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_T : tdu.h
  • tduIncV25_F : tdu.h
  • tduIncV25_T_RX : tdu.h
  • tduIncV25_T_TX : tdu.h
  • tduIncV25RX_DUMMY_T : tdu.h
  • tduIncV825_F : tdu.h
  • tduIncV8BIS_FS_F : tdu.h
  • tduIntFwTable : tdu.h
  • tduMFControl() : tdu.h
  • tduMFProcess() : tdu.h
  • tduNew() : tdu.h
  • tduOpen() : tdu.h
  • tduReceiveIn() : tdu.h
  • tduRepStats_t : tdu.h
  • tduRxLocation_t : tdu.h
  • tduSendIn() : tdu.h
  • tduSFDControl() : tdu.h
  • tduSFDFProcess() : tdu.h
  • tduSFDTProcess() : tdu.h
  • tduTxLocation_t : tdu.h
  • tduV21Control() : tdu.h
  • tduV21Process() : tdu.h
  • tduVoiceDiscCtl() : tdu.h
  • tduVoiceDiscProcess() : tdu.h
  • ti_mas_tdu_Version___VERS : Version.h
  • ti_mas_tdu_Version__top__ : Version.h
  • ti_mas_tdu_Version_BTYPE : Version.h
  • ti_mas_tdu_Version_BUILD : Version.h
  • ti_mas_tdu_Version_MAJOR : Version.h
  • ti_mas_tdu_Version_MINOR : Version.h
  • ti_mas_tdu_Version_PATCH : Version.h
  • ti_mas_tdu_Version_QUALITY : Version.h
  • ti_mas_tdu_Version_WIDTH : Version.h
  • ti_mas_tdu_Version_XVERTICAL : Version.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

- _ -

  • __extern : Version.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

- m -

  • MF_ALERT_ONLY : tdu.h
  • MF_CONFIRMED_OR_ALERT_ON : tdu.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

- t -

  • tdu_CTL_B202_TONES_OFF : tdu.h
  • tdu_CTL_B202_TONES_ON : tdu.h
  • tdu_CTL_BDTEW_OFF : tdu.h
  • tdu_CTL_BDTEW_ON : tdu.h
  • tdu_CTL_BELL_OFF : tdu.h
  • tdu_CTL_BELL_ON : tdu.h
  • tdu_CTL_CIDCAS_ALL_OFF : tdu.h
  • tdu_CTL_CIDCAS_ALL_ON : tdu.h
  • tdu_CTL_CNG_OFF : tdu.h
  • tdu_CTL_CNG_ON : tdu.h
  • tdu_CTL_COIN_TONES_OFF : tdu.h
  • tdu_CTL_CPT_OFF : tdu.h
  • tdu_CTL_CPT_ON : tdu.h
  • tdu_CTL_CRE2_OFF : tdu.h
  • tdu_CTL_CRE2_ON : tdu.h
  • tdu_CTL_CRE_OFF : tdu.h
  • tdu_CTL_CRE_ON : tdu.h
  • tdu_CTL_DIGIT_FILTER : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_OFF : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_ON : tdu.h
  • tdu_CTL_GET_LITE : tdu.h
  • tdu_CTL_LLMR_OFF : tdu.h
  • tdu_CTL_LLMR_ON : tdu.h
  • tdu_CTL_MF_CIDCAS_ON : tdu.h
  • tdu_CTL_MF_COIN_TONES_ON : tdu.h
  • tdu_CTL_MF_CRE1_OFF : tdu.h
  • tdu_CTL_MF_CRE1_ON : tdu.h
  • tdu_CTL_MF_DTMF : tdu.h
  • tdu_CTL_MF_MAX : tdu.h
  • tdu_CTL_MF_MIN : tdu.h
  • tdu_CTL_MF_R1 : tdu.h
  • tdu_CTL_MF_R2BW : tdu.h
  • tdu_CTL_MF_R2FW : tdu.h
  • tdu_CTL_MF_RELAY_OFF : tdu.h
  • tdu_CTL_MF_STD_OFF : tdu.h
  • tdu_CTL_MF_STD_ON : tdu.h
  • tdu_CTL_MFSTD_RESTORE : tdu.h
  • tdu_CTL_MFSTD_SAVE : tdu.h
  • tdu_CTL_MULTIPLE_TONES : tdu.h
  • tdu_CTL_NONE : tdu.h
  • tdu_CTL_OFF_FIRST : tdu.h
  • tdu_CTL_OFF_LAST : tdu.h
  • tdu_CTL_ON_FIRST : tdu.h
  • tdu_CTL_ON_LAST : tdu.h
  • tdu_CTL_PEEK_SFD : tdu.h
  • tdu_CTL_POSITION : tdu.h
  • tdu_CTL_PR_SEARCH_RST : tdu.h
  • tdu_CTL_QUERY_STATE : tdu.h
  • tdu_CTL_RELEASE : tdu.h
  • tdu_CTL_RESTART : tdu.h
  • tdu_CTL_RSVD1 : tdu.h
  • tdu_CTL_RSVD2 : tdu.h
  • tdu_CTL_RSVD3 : tdu.h
  • tdu_CTL_RSVD4 : tdu.h
  • tdu_CTL_SF_OFF : tdu.h
  • tdu_CTL_SF_ON : tdu.h
  • tdu_CTL_SFDT_CIDCAS_OFF : tdu.h
  • tdu_CTL_SFDT_CIDCAS_ON : tdu.h
  • tdu_CTL_SIA_OFF : tdu.h
  • tdu_CTL_SIA_ON : tdu.h
  • tdu_CTL_SS7COR_OFF : tdu.h
  • tdu_CTL_SS7COR_ON : tdu.h
  • tdu_CTL_SS7COT_OFF : tdu.h
  • tdu_CTL_SS7COT_ON : tdu.h
  • tdu_CTL_STOP : tdu.h
  • tdu_CTL_SUSSPEND : tdu.h
  • tdu_CTL_THRE_MAX : tdu.h
  • tdu_CTL_THRE_MIN : tdu.h
  • tdu_CTL_TT1khz_OFF : tdu.h
  • tdu_CTL_TT1khz_ON : tdu.h
  • tdu_CTL_UMF_OFF : tdu.h
  • tdu_CTL_V18A_OFF : tdu.h
  • tdu_CTL_V18A_ON : tdu.h
  • tdu_CTL_V21_CM_FAX_OFF : tdu.h
  • tdu_CTL_V21_CM_FAX_ON : tdu.h
  • tdu_CTL_V21_OFF : tdu.h
  • tdu_CTL_V21_ON : tdu.h
  • tdu_CTL_V21_TONES_OFF : tdu.h
  • tdu_CTL_V21_TONES_ON : tdu.h
  • tdu_CTL_V21_V8DATA_OFF : tdu.h
  • tdu_CTL_V21_V8DATA_ON : tdu.h
  • tdu_CTL_V23_TONES_OFF : tdu.h
  • tdu_CTL_V23_TONES_ON : tdu.h
  • tdu_CTL_V25_OFF : tdu.h
  • tdu_CTL_V25_ON : tdu.h
  • tdu_CTL_V8BIS_TONES_OFF : tdu.h
  • tdu_CTL_V8BIS_TONES_ON : tdu.h
  • tdu_CTL_VOICE_DISC_OFF : tdu.h
  • tdu_CTL_VOICE_DISC_ON : tdu.h
  • tdu_DET_DIR_MASK : tdu.h
  • tdu_DET_ID_CASH : tdu.h
  • tdu_DET_ID_CASL : tdu.h
  • tdu_DET_ID_CIDCAS : tdu.h
  • tdu_DET_ID_CNG : tdu.h
  • tdu_DET_ID_COIN_TONES : tdu.h
  • tdu_DET_ID_CPT : tdu.h
  • tdu_DET_ID_CRE2 : tdu.h
  • tdu_DET_ID_DTMF : tdu.h
  • tdu_DET_ID_MODEMDISC : tdu.h
  • tdu_DET_ID_NONE : tdu.h
  • tdu_DET_ID_R1 : tdu.h
  • tdu_DET_ID_R2BW : tdu.h
  • tdu_DET_ID_R2FW : tdu.h
  • tdu_DET_ID_SF : tdu.h
  • tdu_DET_ID_SIA : tdu.h
  • tdu_DET_ID_SS7COR : tdu.h
  • tdu_DET_ID_SS7COT : tdu.h
  • tdu_DET_ID_TT1khz : tdu.h
  • tdu_DET_ID_V18A : tdu.h
  • tdu_DET_ID_V21 : tdu.h
  • tdu_DET_ID_V25LLMR : tdu.h
  • tdu_DET_ID_V8BIS_FS : tdu.h
  • tdu_DET_RXDIR : tdu.h
  • tdu_DET_TABLEID_MASK : tdu.h
  • tdu_DET_TXDIR : tdu.h
  • tdu_FALSE_ALERT_CNT_MASK : tdu.h
  • tdu_GET_FALSE_ALERT_CNT : tdu.h
  • tdu_GET_ON_OFF_FLAG : tdu.h
  • tdu_MAX_SLOT : tdu.h
  • tdu_MAX_SLOT_RX : tdu.h
  • tdu_MAX_SLOT_TX : tdu.h
  • tdu_MF_DIGIT_ALERT_OFF : tdu.h
  • tdu_MF_DIGIT_ALERT_ON : tdu.h
  • tdu_MF_DIGIT_OFF : tdu.h
  • tdu_MF_DIGIT_ON : tdu.h
  • tdu_OPERATION_DIR_MASK : tdu.h
  • tdu_OPERATION_ENABLED : tdu.h
  • tdu_POSITION_MF_TESTS_CHANGED : tdu.h
  • tdu_POSITION_MF_TESTS_PREDIGIT_SNR : tdu.h
  • tdu_POSITION_MF_TESTS_SHIFT : tdu.h
  • tdu_POSITION_MF_TESTS_STEP_RISE : tdu.h
  • tdu_POSITION_PRI_AC : tdu.h
  • tdu_POSITION_PRI_ACBC_CHANGED : tdu.h
  • tdu_POSITION_RX : tdu.h
  • tdu_POSITION_SEC_AC : tdu.h
  • tdu_POSITION_SEC_ACBC_CHANGED : tdu.h
  • tdu_POSITION_TXRX_CHANGED : tdu.h
  • tdu_POSITION_TYPE : tdu.h
  • tdu_SET_FALSE_ALERT_CNT : tdu.h
  • tdu_SET_ON_OFF_FLAG : tdu.h
  • tdu_SFDT_DET_2225_2250_2300_RX : tdu.h
  • tdu_SFDT_DET_2225_RX : tdu.h
  • tdu_SFDT_DET_2250_RX : tdu.h
  • tdu_SFDT_DET_CASH_RX : tdu.h
  • tdu_SFDT_DET_CASL_RX : tdu.h
  • tdu_SFDT_DET_CIDCAS_RX : tdu.h
  • tdu_SFDT_DET_NONE_RX : tdu.h
  • tdu_SFDT_DET_SIA_RX : tdu.h
  • tdu_SFDT_DET_SIA_S_RX : tdu.h
  • tdu_SFDT_DET_SS7COT_RX : tdu.h
  • tdu_SFDT_DET_V18A_RX : tdu.h
  • tdu_SFDT_DET_V18A_S_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_S_RX : tdu.h
  • tdu_SFDT_DET_V23FW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V25_RX : tdu.h
  • tdu_SIZECFG_FULL : tdu.h
  • tdu_SIZECFG_LITE : tdu.h
  • tdu_SLOT_B202_M : tdu.h
  • tdu_SLOT_B202_S : tdu.h
  • tdu_SLOT_BDTEW : tdu.h
  • tdu_SLOT_BELLRX1 : tdu.h
  • tdu_SLOT_BELLRX2 : tdu.h
  • tdu_SLOT_BELLTX1 : tdu.h
  • tdu_SLOT_BELLTX2 : tdu.h
  • tdu_SLOT_CASH_RX : tdu.h
  • tdu_SLOT_CASL_RX : tdu.h
  • tdu_SLOT_CNG : tdu.h
  • tdu_SLOT_CPT : tdu.h
  • tdu_SLOT_MAX : tdu.h
  • tdu_SLOT_MAX_RX : tdu.h
  • tdu_SLOT_MAX_TX : tdu.h
  • tdu_SLOT_MF_RSVD1 : tdu.h
  • tdu_SLOT_MF_RSVD2 : tdu.h
  • tdu_SLOT_MF_RSVD3 : tdu.h
  • tdu_SLOT_MF_STD : tdu.h
  • tdu_SLOT_MF_USER : tdu.h
  • tdu_SLOT_MF_USER1 : tdu.h
  • tdu_SLOT_NONE : tdu.h
  • tdu_SLOT_SF : tdu.h
  • tdu_SLOT_SFDT_DUMMY1 : tdu.h
  • tdu_SLOT_SFDT_DUMMY2 : tdu.h
  • tdu_SLOT_SFDT_DUMMY3 : tdu.h
  • tdu_SLOT_SIA : tdu.h
  • tdu_SLOT_SIA_RX : tdu.h
  • tdu_SLOT_SIA_S : tdu.h
  • tdu_SLOT_SIA_S_RX : tdu.h
  • tdu_SLOT_SS7COR : tdu.h
  • tdu_SLOT_SS7COT : tdu.h
  • tdu_SLOT_SS7COT_RX : tdu.h
  • tdu_SLOT_TT1khz : tdu.h
  • tdu_SLOT_V18A : tdu.h
  • tdu_SLOT_V18A_RX : tdu.h
  • tdu_SLOT_V18A_S : tdu.h
  • tdu_SLOT_V18A_S_RX : tdu.h
  • tdu_SLOT_V21 : tdu.h
  • tdu_SLOT_V21LOW_MARKS : tdu.h
  • tdu_SLOT_V21LOW_MARKS_RX : tdu.h
  • tdu_SLOT_V21LOW_S_RX : tdu.h
  • tdu_SLOT_V21LOW_SPACES : tdu.h
  • tdu_SLOT_V21UPPER_MARKS : tdu.h
  • tdu_SLOT_V23BW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS_RX : tdu.h
  • tdu_SLOT_V25RX : tdu.h
  • tdu_SLOT_V25TX : tdu.h
  • tdu_TID_ANSAM : tdu.h
  • tdu_TID_ANSAM_PR : tdu.h
  • tdu_TID_ANSAM_PR_RX : tdu.h
  • tdu_TID_ANSAM_RX : tdu.h
  • tdu_TID_B202_TONES : tdu.h
  • tdu_TID_BDTEW1400 : tdu.h
  • tdu_TID_BDTEW1800 : tdu.h
  • tdu_TID_BELL : tdu.h
  • tdu_TID_CAS_T : tdu.h
  • tdu_TID_CIDCAS : tdu.h
  • tdu_TID_CIDCAS_RX : tdu.h
  • tdu_TID_CNG : tdu.h
  • tdu_TID_COIN_TONES : tdu.h
  • tdu_TID_CPT : tdu.h
  • tdu_TID_CRE2 : tdu.h
  • tdu_TID_FIRST : tdu.h
  • tdu_TID_FIRST_EXT : tdu.h
  • tdu_TID_LAST : tdu.h
  • tdu_TID_LAST_EXT : tdu.h
  • tdu_TID_LONG_DIGIT : tdu.h
  • tdu_TID_MASK_ID : tdu.h
  • tdu_TID_MASKED : tdu.h
  • tdu_TID_NULL : tdu.h
  • tdu_TID_PARALLEL_MASK : tdu.h
  • tdu_TID_RXDIR : tdu.h
  • tdu_TID_SF : tdu.h
  • tdu_TID_SIA : tdu.h
  • tdu_TID_SS7COR : tdu.h
  • tdu_TID_SS7COT : tdu.h
  • tdu_TID_TONE0 : tdu.h
  • tdu_TID_TONE1 : tdu.h
  • tdu_TID_TONE10 : tdu.h
  • tdu_TID_TONE11 : tdu.h
  • tdu_TID_TONE12 : tdu.h
  • tdu_TID_TONE13 : tdu.h
  • tdu_TID_TONE14 : tdu.h
  • tdu_TID_TONE15 : tdu.h
  • tdu_TID_TONE16 : tdu.h
  • tdu_TID_TONE2 : tdu.h
  • tdu_TID_TONE3 : tdu.h
  • tdu_TID_TONE4 : tdu.h
  • tdu_TID_TONE5 : tdu.h
  • tdu_TID_TONE6 : tdu.h
  • tdu_TID_TONE7 : tdu.h
  • tdu_TID_TONE8 : tdu.h
  • tdu_TID_TONE9 : tdu.h
  • tdu_TID_TT1khz : tdu.h
  • tdu_TID_TXDIR : tdu.h
  • tdu_TID_TYPE00 : tdu.h
  • tdu_TID_TYPE01 : tdu.h
  • tdu_TID_TYPE02 : tdu.h
  • tdu_TID_TYPE03 : tdu.h
  • tdu_TID_TYPE_MASK : tdu.h
  • tdu_TID_V18A : tdu.h
  • tdu_TID_V21 : tdu.h
  • tdu_TID_V21_CI : tdu.h
  • tdu_TID_V21_CM : tdu.h
  • tdu_TID_V21_CM_FAX : tdu.h
  • tdu_TID_V21_LOWER : tdu.h
  • tdu_TID_V21_TONES : tdu.h
  • tdu_TID_V23_TONES : tdu.h
  • tdu_TID_V25 : tdu.h
  • tdu_TID_V25_EARLY_REPORT_ALERT : tdu.h
  • tdu_TID_V25_EARLY_REPORT_FALSE : tdu.h
  • tdu_TID_V25_PR : tdu.h
  • tdu_TID_V25_RX : tdu.h
  • tdu_TID_V25_RX_PR : tdu.h
  • tdu_TID_V8BIS_TONES : tdu.h
  • tdu_TID_VOICE_DISC : tdu.h
  • tdu_TX_DELAY_BUF_NUM : tdu.h
  • tdu_V8_OFFSET : tdu.h
  • ti_mas_tdu_Version___VERS : Version.h
  • ti_mas_tdu_Version__top__ : Version.h
  • ti_mas_tdu_Version_BTYPE : Version.h
  • ti_mas_tdu_Version_BUILD : Version.h
  • ti_mas_tdu_Version_MAJOR : Version.h
  • ti_mas_tdu_Version_MINOR : Version.h
  • ti_mas_tdu_Version_PATCH : Version.h
  • ti_mas_tdu_Version_QUALITY : Version.h
  • ti_mas_tdu_Version_WIDTH : Version.h
  • ti_mas_tdu_Version_XVERTICAL : Version.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • m
  • t
  • v

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • tduRxLocation_t : tdu.h
  • tduTxLocation_t : tdu.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • tdu_ERROR : tdu.h
  • tdu_EXC_DELETE : tdu.h
  • tdu_EXC_FRAMESIZE : tdu.h
  • tdu_EXC_MEMORY : tdu.h
  • tdu_EXC_MFDET : tdu.h
  • tdu_EXC_OPEN : tdu.h
  • tdu_EXC_RECEIVEIN : tdu.h
  • tdu_EXC_SENDIN : tdu.h
  • tdu_NOERR : tdu.h
  • tdu_NOMEMORY : tdu.h
  • tdu_RX_AFTER_CONF : tdu.h
  • tdu_RX_BEFORE_CONF : tdu.h
  • tdu_RX_ONLY : tdu.h
  • tdu_TX_AFTER_CONF : tdu.h
  • tdu_TX_BEFORE_CONF : tdu.h
  • tdu_TX_ONLY : tdu.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • t

- t -

  • tdu_digit_filter() : tdu.h
  • tdu_mf_cidcas_ctl() : tdu.h
  • tdu_mf_coin_tones_ctl() : tdu.h
  • tdu_mf_v8bis_fs_ctl() : tdu.h
  • tdu_sfd_llmr_ANSam() : tdu.h
  • tdu_sfd_llmr_ANSam_reset() : tdu.h
  • tdu_sfd_llmr_ANSam_test() : tdu.h
  • tduBDTEWControl() : tdu.h
  • tduBDTEWProcess() : tdu.h
  • tduBellTid() : tdu.h
  • tduClose() : tdu.h
  • tduControl() : tdu.h
  • tduCPTControl() : tdu.h
  • tduCPTProcess() : tdu.h
  • tduDelete() : tdu.h
  • tduDummyControl() : tdu.h
  • tduDummyProcess() : tdu.h
  • tduGetSizes() : tdu.h
  • tduGetStats() : tdu.h
  • tduMFControl() : tdu.h
  • tduMFProcess() : tdu.h
  • tduNew() : tdu.h
  • tduOpen() : tdu.h
  • tduReceiveIn() : tdu.h
  • tduSendIn() : tdu.h
  • tduSFDControl() : tdu.h
  • tduSFDFProcess() : tdu.h
  • tduSFDTProcess() : tdu.h
  • tduV21Control() : tdu.h
  • tduV21Process() : tdu.h
  • tduVoiceDiscCtl() : tdu.h
  • tduVoiceDiscProcess() : tdu.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • tduCfgCtlStd_t : tdu.h
  • tduContext_t : tdu.h
  • tduDigitFilterCfgCtl_t : tdu.h
  • tduRepStats_t : tdu.h


TDU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • t

- t -

  • tduDetContexts : tdu.h
  • tduIncB202_MARKS_F : tdu.h
  • tduIncB202_SPACES_F : tdu.h
  • tduIncBELLRX1_T : tdu.h
  • tduIncBELLRX2_T : tdu.h
  • tduIncBELLTX1_F : tdu.h
  • tduIncBELLTX2_F : tdu.h
  • tduIncCASH_T_RX : tdu.h
  • tduIncCASL_T_RX : tdu.h
  • tduIncCIDCAS : tdu.h
  • tduIncCNG_F : tdu.h
  • tduIncCNG_T : tdu.h
  • tduIncCOIN_TONES : tdu.h
  • tduIncCPT : tdu.h
  • tduIncDTMF : tdu.h
  • tduIncR1 : tdu.h
  • tduIncR2BW : tdu.h
  • tduIncR2FW : tdu.h
  • tduIncSF_F : tdu.h
  • tduIncSFDT_DUMMY1_T : tdu.h
  • tduIncSFDT_DUMMY2_T : tdu.h
  • tduIncSFDT_DUMMY3_T : tdu.h
  • tduIncSIA_F : tdu.h
  • tduIncSIA_S_F : tdu.h
  • tduIncSIA_S_T_RX : tdu.h
  • tduIncSIA_T_RX : tdu.h
  • tduIncSS7COR_F : tdu.h
  • tduIncSS7COT_F : tdu.h
  • tduIncSS7COT_T : tdu.h
  • tduIncTT1khz_F : tdu.h
  • tduIncUMF : tdu.h
  • tduIncV18A_F : tdu.h
  • tduIncV18A_S_F : tdu.h
  • tduIncV18A_S_T_RX : tdu.h
  • tduIncV18A_T_RX : tdu.h
  • tduIncV21 : tdu.h
  • tduIncV21CM : tdu.h
  • tduIncV21LOW_MARKS_F : tdu.h
  • tduIncV21LOW_MARKS_T : tdu.h
  • tduIncV21LOW_MARKS_T_RX : tdu.h
  • tduIncV21LOW_SPACES_F : tdu.h
  • tduIncV21LOW_SPACES_T_RX : tdu.h
  • tduIncV21UPPER_MARKS_F : tdu.h
  • tduIncV21UPPER_MARKS_LITE_T : tdu.h
  • tduIncV23BW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_T : tdu.h
  • tduIncV25_F : tdu.h
  • tduIncV25_T_RX : tdu.h
  • tduIncV25_T_TX : tdu.h
  • tduIncV25RX_DUMMY_T : tdu.h
  • tduIncV825_F : tdu.h
  • tduIncV8BIS_FS_F : tdu.h
  • tduIntFwTable : tdu.h


TDU: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


TDU: Tone Detection Unit

Tone Detection Unit

Collaboration diagram for Tone Detection Unit:

Modules

Inband relay regeneration
Non-MF tone detection ON
Non-MF tone detection OFF
TDU Instance Slots
MF Tone Detection
TDU Position
Modem Relay
Configure Digit Actions
Enable Detection Reports
MIPS Savings
Autocot generation
Digit Signalling
Signal Interruption
Relinquish Memory
Lite mode
CED early alert control
ECO API return codes
Exception codes
Detection report codes

Data Structures

struct | tduCfgCtlStd_s
Single frequency detector configuration structure. Use case: Non-MF tone detection ON. More...
struct | tduCptCfgCtl_t
Call progress tone detector configuration structure. Use case: Non-MF tone detection ON. More...
struct | tduCfgCtl_t
Configuration structure passed to TDU through tduControl() API. This contains several unionized substructures. Each substructure is used with a specific control code in a specific use case/call flow. More...
struct | tduCptSmartRep_t
additional information about TDU detection event. This structure is shared by several detectors inside TDU. More...

Defines

#define | tdu_CTL_MF_STD_ON 0
#define | tdu_CTL_THRE_MIN 2
#define | tdu_DET_ID_DTMF 0
#define | tdu_DET_ID_R1 1
#define | tdu_DET_ID_R2FW 2
#define | tdu_DET_ID_R2BW 3
#define | tdu_DET_ID_V21 4
#define | tdu_DET_ID_CPT 5
#define | tdu_DET_ID_MODEMDISC 6
#define | tdu_DET_ID_V18A 7
#define | tdu_DET_ID_SS7COT 8
#define | tdu_DET_ID_SF 9
#define | tdu_DET_ID_CNG 10
#define | tdu_DET_ID_TT1khz 11
#define | tdu_DET_ID_SS7COR 12
#define | tdu_DET_ID_CIDCAS 13
#define | tdu_DET_ID_CASL 14
#define | tdu_DET_ID_CASH 15
#define | tdu_DET_ID_V8BIS_FS 16
#define | tdu_DET_ID_CRE2 17
#define | tdu_DET_ID_V25LLMR 18
#define | tdu_DET_ID_COIN_TONES 19
#define | tdu_DET_ID_SIA 20
#define | tdu_DET_ID_NONE 255
#define | tdu_CTL_MF_RELAY_OFF 130
#define | tdu_CTL_NONE 255

Typedefs

typedef tduCfgCtlStd_s | tduCfgCtlStd_t
Single frequency detector configuration structure. Use case: Non-MF tone detection ON.

Define Documentation

#define tdu_CTL_MF_STD_ON 0

Turn ON MF detector

Definition at line 35 of file tdu.h.

#define tdu_CTL_THRE_MIN 2

TDU internal use. First control code that eventually modifies wb energy threshold

Definition at line 39 of file tdu.h.

#define tdu_DET_ID_DTMF 0

Definition at line 190 of file tdu.h.

#define tdu_DET_ID_R1 1

Definition at line 191 of file tdu.h.

#define tdu_DET_ID_R2FW 2

Definition at line 192 of file tdu.h.

#define tdu_DET_ID_R2BW 3

Definition at line 193 of file tdu.h.

#define tdu_DET_ID_V21 4

Definition at line 194 of file tdu.h.

#define tdu_DET_ID_CPT 5

Definition at line 195 of file tdu.h.

#define tdu_DET_ID_MODEMDISC 6

Definition at line 196 of file tdu.h.

#define tdu_DET_ID_V18A 7

Definition at line 197 of file tdu.h.

#define tdu_DET_ID_SS7COT 8

Definition at line 198 of file tdu.h.

#define tdu_DET_ID_SF 9

Definition at line 199 of file tdu.h.

#define tdu_DET_ID_CNG 10

Definition at line 200 of file tdu.h.

#define tdu_DET_ID_TT1khz 11

Definition at line 201 of file tdu.h.

#define tdu_DET_ID_SS7COR 12

Definition at line 202 of file tdu.h.

#define tdu_DET_ID_CIDCAS 13

Definition at line 203 of file tdu.h.

#define tdu_DET_ID_CASL 14

Definition at line 204 of file tdu.h.

#define tdu_DET_ID_CASH 15

Definition at line 206 of file tdu.h.

#define tdu_DET_ID_V8BIS_FS 16

Definition at line 208 of file tdu.h.

#define tdu_DET_ID_CRE2 17

Definition at line 209 of file tdu.h.

#define tdu_DET_ID_V25LLMR 18

Definition at line 210 of file tdu.h.

#define tdu_DET_ID_COIN_TONES 19

Definition at line 211 of file tdu.h.

#define tdu_DET_ID_SIA 20

Definition at line 212 of file tdu.h.

#define tdu_DET_ID_NONE 255

Definition at line 213 of file tdu.h.

#define tdu_CTL_MF_RELAY_OFF 130

TODO: What is this? SIU does not use this

Definition at line 688 of file tdu.h.

#define tdu_CTL_NONE 255

TDU internal use: dummy control code

Definition at line 690 of file tdu.h.

Typedef Documentation

typedef struct tduCfgCtlStd_s tduCfgCtlStd_t

Single frequency detector configuration structure. Use case: Non-MF tone detection ON.


TDU: Autocot generation

Autocot generation
[Tone Detection Unit]

Collaboration diagram for Autocot generation:

Detailed Description

Before Autocot generation, system queries TDU's internal SS7 COT and SS7 COR configuration parameters.

At end of Autocot generation, system restores the save configuration through tdu_CTL_SS7COT_ON/tdu_CTL_SS7COR_ON control codes

Data Structures

struct | tduSfdPeek_t
Structure for querying and returning TDU's internal configuration for SS7 COT and SS7 COR detectors. Use case: Autocot generation. More...

Auto COT

#define | tdu_CTL_PEEK_SFD 120

Define Documentation

#define tdu_CTL_PEEK_SFD 120

Query internal configuration from SS7 COT SS7 COR detection slots

Definition at line 514 of file tdu.h.


TDU: CED early alert control

CED early alert control
[Tone Detection Unit]

Collaboration diagram for CED early alert control:

Detailed Description

System may enable/disable TDU to report CED early alert ON and CED early alert OFF events.

CED Early Alert

#define | tdu_CTL_EARLY_ALERT_SUPPRESS_ON 128
#define | tdu_CTL_EARLY_ALERT_SUPPRESS_OFF 129

Define Documentation

#define tdu_CTL_EARLY_ALERT_SUPPRESS_ON 128

enable CED early alert event report

Definition at line 683 of file tdu.h.

#define tdu_CTL_EARLY_ALERT_SUPPRESS_OFF 129

disable CED early alert event report

Definition at line 684 of file tdu.h.


TDU: Configure Digit Actions

Configure Digit Actions
[Tone Detection Unit]

Collaboration diagram for Configure Digit Actions:

Detailed Description

System should use the following control code to configure digit actions so as to suppress/enable digit detection reports (long digits, digit OFFs):

Data Structures

struct | tduDigitFilterCfgCtl_s
Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions. More...

Digit Actions

typedef tduDigitFilterCfgCtl_s | tduDigitFilterCfgCtl_t
Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions.
#define | tdu_CTL_DIGIT_FILTER 110

Define Documentation

#define tdu_CTL_DIGIT_FILTER 110

Configure actions upon digit detection

Definition at line 399 of file tdu.h.

Typedef Documentation

typedef struct tduDigitFilterCfgCtl_s tduDigitFilterCfgCtl_t

Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions.


TDU: Detection report codes

Detection report codes
[Tone Detection Unit]

Collaboration diagram for Detection report codes:

Detailed Description

These are the tone detection report codes reported by TDU in response to input signal.

TDU Detection Report Codes

#define | tdu_TID_TONE0 0
#define | tdu_TID_TONE1 1
#define | tdu_TID_TONE2 2
#define | tdu_TID_TONE3 3
#define | tdu_TID_TONE4 4
#define | tdu_TID_TONE5 5
#define | tdu_TID_TONE6 6
#define | tdu_TID_TONE7 7
#define | tdu_TID_TONE8 8
#define | tdu_TID_TONE9 9
#define | tdu_TID_TONE10 10
#define | tdu_TID_TONE11 11
#define | tdu_TID_TONE12 12
#define | tdu_TID_TONE13 13
#define | tdu_TID_TONE14 14
#define | tdu_TID_TONE15 15
#define | tdu_TID_TONE16 16
#define | tdu_TID_NULL -1
#define | tdu_TID_FIRST 17
#define | tdu_TID_V21 17
#define | tdu_TID_V25 18
#define | tdu_TID_V25_PR 19
#define | tdu_TID_CPT 20
#define | tdu_TID_V18A 21
#define | tdu_TID_SS7COT 22
#define | tdu_TID_SF 23
#define | tdu_TID_CNG 24
#define | tdu_TID_SS7COR 25
#define | tdu_TID_TT1khz 26
#define | tdu_TID_CIDCAS 27
#define | tdu_TID_CIDCAS_RX 28
#define | tdu_TID_V25_RX 32
#define | tdu_TID_V25_RX_PR 33
#define | tdu_TID_BELL 34
#define | tdu_TID_FIRST_EXT tdu_TID_BELL
#define | tdu_TID_V8BIS_TONES 35
#define | tdu_TID_V21_TONES 36
#define | tdu_TID_V23_TONES 37
#define | tdu_TID_V21_CM_FAX 38
#define | tdu_TID_V21_CI 39
#define | tdu_TID_B202_TONES 40
#define | tdu_TID_VOICE_DISC 44
#define | tdu_TID_LAST_EXT tdu_TID_VOICE_DISC
#define | tdu_TID_COIN_TONES 45
#define | tdu_TID_V21_CM 47
#define | tdu_TID_ANSAM 48
#define | tdu_TID_ANSAM_PR 49
#define | tdu_TID_V21_LOWER 50
#define | tdu_TID_CRE2 51
#define | tdu_TID_ANSAM_RX 62
#define | tdu_TID_ANSAM_PR_RX 63
#define | tdu_TID_V25_EARLY_REPORT_ALERT 64
#define | tdu_TID_V25_EARLY_REPORT_FALSE 65
#define | tdu_TID_SIA 66
#define | tdu_TID_LAST 66
#define | tdu_TID_BDTEW1400 96
#define | tdu_TID_BDTEW1800 97
#define | tdu_TID_MASKED 0x4000
#define | tdu_TID_LONG_DIGIT 0x2000
#define | tdu_TID_TXDIR 0x0100
#define | tdu_TID_RXDIR 0x0200
#define | tdu_TID_MASK_ID 0x00ff
#define | tdu_TID_TYPE00 (0 << 10)
#define | tdu_TID_TYPE01 (1 << 10)
#define | tdu_TID_TYPE02 (2 << 10)
#define | tdu_TID_TYPE03 (3 << 10)
#define | tdu_TID_TYPE_MASK (3 << 10)
#define | tdu_V8_OFFSET 30
#define | tdu_TID_PARALLEL_MASK 0x0080
#define | tdu_TID_CAS_T (tdu_TID_CIDCAS_RX | tdu_TID_PARALLEL_MASK)

MF ON/OFF codes

The following are ON/OFF codes reported upon MF detection event. The on_off parameter for tdu_send_out call out function is assigned one of these values.

#define | tdu_MF_DIGIT_OFF 0
#define | tdu_MF_DIGIT_ON 1
#define | tdu_MF_DIGIT_ALERT_OFF 2
#define | tdu_MF_DIGIT_ALERT_ON 3
#define | MF_CONFIRMED_OR_ALERT_ON (tdu_MF_DIGIT_ON & tdu_MF_DIGIT_ALERT_ON)
#define | MF_ALERT_ONLY (tdu_MF_DIGIT_ALERT_OFF & tdu_MF_DIGIT_ALERT_ON)

Define Documentation

#define tdu_TID_TONE0 0

Definition at line 795 of file tdu.h.

#define tdu_TID_TONE1 1

Definition at line 796 of file tdu.h.

#define tdu_TID_TONE2 2

Definition at line 797 of file tdu.h.

#define tdu_TID_TONE3 3

Definition at line 798 of file tdu.h.

#define tdu_TID_TONE4 4

Definition at line 799 of file tdu.h.

#define tdu_TID_TONE5 5

Definition at line 800 of file tdu.h.

#define tdu_TID_TONE6 6

Definition at line 801 of file tdu.h.

#define tdu_TID_TONE7 7

Definition at line 802 of file tdu.h.

#define tdu_TID_TONE8 8

Definition at line 803 of file tdu.h.

#define tdu_TID_TONE9 9

Definition at line 804 of file tdu.h.

#define tdu_TID_TONE10 10

Definition at line 805 of file tdu.h.

#define tdu_TID_TONE11 11

Definition at line 806 of file tdu.h.

#define tdu_TID_TONE12 12

Definition at line 807 of file tdu.h.

#define tdu_TID_TONE13 13

Definition at line 808 of file tdu.h.

#define tdu_TID_TONE14 14

Definition at line 809 of file tdu.h.

#define tdu_TID_TONE15 15

Definition at line 810 of file tdu.h.

#define tdu_TID_TONE16 16

Definition at line 811 of file tdu.h.

#define tdu_TID_NULL -1

Definition at line 812 of file tdu.h.

#define tdu_TID_FIRST 17

Definition at line 814 of file tdu.h.

#define tdu_TID_V21 17

Definition at line 817 of file tdu.h.

#define tdu_TID_V25 18

Definition at line 819 of file tdu.h.

#define tdu_TID_V25_PR 19

Definition at line 820 of file tdu.h.

#define tdu_TID_CPT 20

Definition at line 822 of file tdu.h.

#define tdu_TID_V18A 21

Definition at line 823 of file tdu.h.

#define tdu_TID_SS7COT 22

Definition at line 825 of file tdu.h.

#define tdu_TID_SF 23

Definition at line 827 of file tdu.h.

#define tdu_TID_CNG 24

Definition at line 832 of file tdu.h.

#define tdu_TID_SS7COR 25

Definition at line 834 of file tdu.h.

#define tdu_TID_TT1khz 26

Definition at line 836 of file tdu.h.

#define tdu_TID_CIDCAS 27

Definition at line 837 of file tdu.h.

#define tdu_TID_CIDCAS_RX 28

Definition at line 839 of file tdu.h.

#define tdu_TID_V25_RX 32

Definition at line 845 of file tdu.h.

#define tdu_TID_V25_RX_PR 33

Definition at line 848 of file tdu.h.

#define tdu_TID_BELL 34

Definition at line 851 of file tdu.h.

#define tdu_TID_FIRST_EXT tdu_TID_BELL

Definition at line 854 of file tdu.h.

#define tdu_TID_V8BIS_TONES 35

Definition at line 855 of file tdu.h.

#define tdu_TID_V21_TONES 36

Definition at line 857 of file tdu.h.

#define tdu_TID_V23_TONES 37

Definition at line 859 of file tdu.h.

#define tdu_TID_V21_CM_FAX 38

Definition at line 862 of file tdu.h.

#define tdu_TID_V21_CI 39

Definition at line 863 of file tdu.h.

#define tdu_TID_B202_TONES 40

Definition at line 864 of file tdu.h.

#define tdu_TID_VOICE_DISC 44

Definition at line 865 of file tdu.h.

#define tdu_TID_LAST_EXT tdu_TID_VOICE_DISC

Definition at line 866 of file tdu.h.

#define tdu_TID_COIN_TONES 45

Definition at line 868 of file tdu.h.

#define tdu_TID_V21_CM 47

Definition at line 870 of file tdu.h.

#define tdu_TID_ANSAM 48

Definition at line 872 of file tdu.h.

#define tdu_TID_ANSAM_PR 49

Definition at line 873 of file tdu.h.

#define tdu_TID_V21_LOWER 50

Definition at line 874 of file tdu.h.

#define tdu_TID_CRE2 51

Definition at line 875 of file tdu.h.

#define tdu_TID_ANSAM_RX 62

Definition at line 876 of file tdu.h.

#define tdu_TID_ANSAM_PR_RX 63

Definition at line 877 of file tdu.h.

#define tdu_TID_V25_EARLY_REPORT_ALERT 64

Early report of 2100 Hz detection.

Definition at line 879 of file tdu.h.

#define tdu_TID_V25_EARLY_REPORT_FALSE 65

Report of early 2100 Hz detection was false.

Definition at line 881 of file tdu.h.

#define tdu_TID_SIA 66

Definition at line 883 of file tdu.h.

#define tdu_TID_LAST 66

Last valid report code

Definition at line 884 of file tdu.h.

#define tdu_TID_BDTEW1400 96

Definition at line 886 of file tdu.h.

#define tdu_TID_BDTEW1800 97

Definition at line 887 of file tdu.h.

#define tdu_TID_MASKED 0x4000

Bit value indicates the tone event report did not pass event filter checks

Definition at line 889 of file tdu.h.

#define tdu_TID_LONG_DIGIT 0x2000

indication of a long digit

Definition at line 891 of file tdu.h.

#define tdu_TID_TXDIR 0x0100

Bit value indicates tone event reported for signal in from TDM direction

Definition at line 893 of file tdu.h.

#define tdu_TID_RXDIR 0x0200

Bit value indicates tone event reported for signal in from Network direction

Definition at line 895 of file tdu.h.

#define tdu_TID_MASK_ID 0x00ff

Bit mask for tone detection event main type

Definition at line 897 of file tdu.h.

#define tdu_TID_TYPE00 (0 << 10)

Tone detector sub-type 0

Definition at line 899 of file tdu.h.

#define tdu_TID_TYPE01 (1 << 10)

Tone detector sub-type 1

Definition at line 900 of file tdu.h.

#define tdu_TID_TYPE02 (2 << 10)

Tone detector sub-type 2

Definition at line 901 of file tdu.h.

#define tdu_TID_TYPE03 (3 << 10)

Tone detector sub-type 3

Definition at line 902 of file tdu.h.

#define tdu_TID_TYPE_MASK (3 << 10)

Tone detector sub-type mask

Definition at line 903 of file tdu.h.

#define tdu_V8_OFFSET 30

TODO: what is this?

Definition at line 905 of file tdu.h.

#define tdu_TID_PARALLEL_MASK 0x0080

TODO: what is this?

Definition at line 907 of file tdu.h.

#define tdu_TID_CAS_T (tdu_TID_CIDCAS_RX | tdu_TID_PARALLEL_MASK)

TODO: what is this?

Definition at line 908 of file tdu.h.

#define tdu_MF_DIGIT_OFF 0

Digit OFF event

Definition at line 915 of file tdu.h.

#define tdu_MF_DIGIT_ON 1

Digit confirmed ON event

Definition at line 916 of file tdu.h.

#define tdu_MF_DIGIT_ALERT_OFF 2

Digit early warning OFF event

Definition at line 917 of file tdu.h.

#define tdu_MF_DIGIT_ALERT_ON 3

Digit early warning ON event

Definition at line 918 of file tdu.h.

#define MF_CONFIRMED_OR_ALERT_ON (tdu_MF_DIGIT_ON & tdu_MF_DIGIT_ALERT_ON)

TDU internal use

Definition at line 920 of file tdu.h.

#define MF_ALERT_ONLY (tdu_MF_DIGIT_ALERT_OFF & tdu_MF_DIGIT_ALERT_ON)

TDU internal use

Definition at line 921 of file tdu.h.


TDU: Detector context pointers

Detector context pointers

Detailed Description

Following are the pointers to individual detector contexts defined by TDU. These are to be used by system to populate the constant array tduDetContexts.

The constant array should be populated with pointers only in the following particular order. (TODO: Detector groups must be grouped into a sub-structures so that ordering is naturally enforced.)

  • Single frequency detectors - from TDM: If a particular detector in this group is not to be linked into the system, the pointer should not be populated in the array. No particular order within the group is required.
  • Single frequency detectors - from Network: In this group, pointers for all detectors must be populated in the constant array. However, if a particular detector in this group is not to be linked into the system, tduIncSFDT_DUMMY1_T should be used. Order within the group must also be maintained as given in the list.
  • Multi-tone/Miscellaneous detectors: Remaining detectors come at the end of the constant array after above two groups. Here, system should populate only those pointers which detectors must be linked.

The constant array must be terminated by NULL pointer.

Single frequency detectors - from TDM

const tduDetContext_t | tduIncV23BW_MARKS_F
const tduDetContext_t | tduIncTT1khz_F
const tduDetContext_t | tduIncCNG_F
const tduDetContext_t | tduIncV21LOW_MARKS_F
const tduDetContext_t | tduIncV21LOW_SPACES_F
const tduDetContext_t | tduIncV21UPPER_MARKS_F
const tduDetContext_t | tduIncV21LOW_MARKS_T_RX
const tduDetContext_t | tduIncV21LOW_SPACES_T_RX
const tduDetContext_t | tduIncB202_MARKS_F
const tduDetContext_t | tduIncBELLTX2_F
const tduDetContext_t | tduIncV23FW_MARKS_F
const tduDetContext_t | tduIncV18A_F
const tduDetContext_t | tduIncSS7COR_F
const tduDetContext_t | tduIncV18A_S_F
const tduDetContext_t | tduIncV18A_T_RX
const tduDetContext_t | tduIncV18A_S_T_RX
const tduDetContext_t | tduIncSS7COT_F
const tduDetContext_t | tduIncV25_F
const tduDetContext_t | tduIncB202_SPACES_F
const tduDetContext_t | tduIncBELLTX1_F
const tduDetContext_t | tduIncSF_F
const tduDetContext_t | tduIncSIA_F
const tduDetContext_t | tduIncSIA_S_F
const tduDetContext_t | tduIncSIA_T_RX
const tduDetContext_t | tduIncSIA_S_T_RX

Single frequency detectors - from Network

const tduDetContext_t | tduIncV23FW_MARKS_T
const tduDetContext_t | tduIncSS7COT_T
const tduDetContext_t | tduIncV25_T_RX
const tduDetContext_t | tduIncV25RX_DUMMY_T
const tduDetContext_t | tduIncBELLRX1_T
const tduDetContext_t | tduIncBELLRX2_T
const tduDetContext_t | tduIncV21LOW_MARKS_T
const tduDetContext_t | tduIncSFDT_DUMMY1_T
const tduDetContext_t | tduIncSFDT_DUMMY2_T
const tduDetContext_t | tduIncSFDT_DUMMY3_T
#define | tdu_SFDT_DET_NONE_RX 0
#define | tdu_SFDT_DET_V23FW_MARKS_RX 1
#define | tdu_SFDT_DET_SS7COT_RX 2
#define | tdu_SFDT_DET_V25_RX 3
#define | tdu_SFDT_DET_2225_2250_2300_RX 4
#define | tdu_SFDT_DET_2225_RX 4
#define | tdu_SFDT_DET_2250_RX 5
#define | tdu_SFDT_DET_V18A_RX 6
#define | tdu_SFDT_DET_V18A_S_RX 7
#define | tdu_SFDT_DET_V21LOW_MARKS_RX 8
#define | tdu_SFDT_DET_V21LOW_S_RX 9
#define | tdu_SFDT_DET_CIDCAS_RX 10
#define | tdu_SFDT_DET_CASL_RX 10
#define | tdu_SFDT_DET_CASH_RX 11
#define | tdu_SFDT_DET_SIA_RX 6
#define | tdu_SFDT_DET_SIA_S_RX 7

Multi-tone/miscellaneous detectors

const tduDetContext_t | tduIncDTMF
const tduDetContext_t | tduIncR1
const tduDetContext_t | tduIncR2FW
const tduDetContext_t | tduIncR2BW
const tduDetContext_t | tduIncUMF
const tduDetContext_t | tduIncV8BIS_FS_F
const tduDetContext_t | tduIncV21
const tduDetContext_t | tduIncCPT
const tduDetContext_t | tduIncCOIN_TONES
const tduDetContext_t | tduIncCIDCAS
const tduDetContext_t | tduIncV825_F
const tduDetContext_t | tduIncV21CM

TODO: Are these supported

const tduDetContext_t | tduIncCASL_T_RX
const tduDetContext_t | tduIncCASH_T_RX
const tduDetContext_t | tduIncV25_T_TX
const tduDetContext_t | tduIncCNG_T
const tduDetContext_t | tduIncV21UPPER_MARKS_LITE_T

Define Documentation

#define tdu_SFDT_DET_NONE_RX 0

Definition at line 1060 of file tdu.h.

#define tdu_SFDT_DET_V23FW_MARKS_RX 1

Offset of V23FW Marks (from Net) detector context in tduDetContexts array

Definition at line 1062 of file tdu.h.

#define tdu_SFDT_DET_SS7COT_RX 2

Offset of SS7 COT (from Net) detector context in tduDetContexts array

Definition at line 1066 of file tdu.h.

#define tdu_SFDT_DET_V25_RX 3

Offset of V25 (from Net) detector context in tduDetContexts array

Definition at line 1070 of file tdu.h.

#define tdu_SFDT_DET_2225_2250_2300_RX 4

Internal use

Definition at line 1075 of file tdu.h.

#define tdu_SFDT_DET_2225_RX 4

Offset of Bell 2225Hz (from Net) detector context in tduDetContexts array

Definition at line 1076 of file tdu.h.

#define tdu_SFDT_DET_2250_RX 5

Offset of Bell 2250Hz (from Net) detector context in tduDetContexts array

Definition at line 1080 of file tdu.h.

#define tdu_SFDT_DET_V18A_RX 6

Definition at line 1084 of file tdu.h.

#define tdu_SFDT_DET_V18A_S_RX 7

Definition at line 1085 of file tdu.h.

#define tdu_SFDT_DET_V21LOW_MARKS_RX 8

Definition at line 1086 of file tdu.h.

#define tdu_SFDT_DET_V21LOW_S_RX 9

Definition at line 1087 of file tdu.h.

#define tdu_SFDT_DET_CIDCAS_RX 10

Definition at line 1088 of file tdu.h.

#define tdu_SFDT_DET_CASL_RX 10

Definition at line 1089 of file tdu.h.

#define tdu_SFDT_DET_CASH_RX 11

Definition at line 1090 of file tdu.h.

#define tdu_SFDT_DET_SIA_RX 6

Definition at line 1091 of file tdu.h.

#define tdu_SFDT_DET_SIA_S_RX 7

Definition at line 1092 of file tdu.h.

Variable Documentation

const tduDetContext_t tduIncV23BW_MARKS_F

const tduDetContext_t tduIncTT1khz_F

const tduDetContext_t tduIncCNG_F

const tduDetContext_t tduIncV21LOW_MARKS_F

const tduDetContext_t tduIncV21LOW_SPACES_F

const tduDetContext_t tduIncV21UPPER_MARKS_F

const tduDetContext_t tduIncV21LOW_MARKS_T_RX

const tduDetContext_t tduIncV21LOW_SPACES_T_RX

const tduDetContext_t tduIncB202_MARKS_F

const tduDetContext_t tduIncBELLTX2_F

const tduDetContext_t tduIncV23FW_MARKS_F

const tduDetContext_t tduIncV18A_F

const tduDetContext_t tduIncSS7COR_F

const tduDetContext_t tduIncV18A_S_F

const tduDetContext_t tduIncV18A_T_RX

const tduDetContext_t tduIncV18A_S_T_RX

const tduDetContext_t tduIncSS7COT_F

const tduDetContext_t tduIncV25_F

const tduDetContext_t tduIncB202_SPACES_F

const tduDetContext_t tduIncBELLTX1_F

const tduDetContext_t tduIncSF_F

const tduDetContext_t tduIncSIA_F

const tduDetContext_t tduIncSIA_S_F

const tduDetContext_t tduIncSIA_T_RX

const tduDetContext_t tduIncSIA_S_T_RX

const tduDetContext_t tduIncV23FW_MARKS_T

V23FW Marks (from Net) detector context

const tduDetContext_t tduIncSS7COT_T

SS7 COT (from Net) detector context

const tduDetContext_t tduIncV25_T_RX

V.25 (from Net) detector context

const tduDetContext_t tduIncV25RX_DUMMY_T

TODO: how used?

const tduDetContext_t tduIncBELLRX1_T

Bell 2225Hz (from Net) detector context

const tduDetContext_t tduIncBELLRX2_T

Bell 2250Hz (from Net) detector context

const tduDetContext_t tduIncV21LOW_MARKS_T

TODO: how used? What offset?

const tduDetContext_t tduIncSFDT_DUMMY1_T

TODO: how used?

const tduDetContext_t tduIncSFDT_DUMMY2_T

TODO: how used?

const tduDetContext_t tduIncSFDT_DUMMY3_T

TODO: how used?

const tduDetContext_t tduIncDTMF

DTMF detector context

const tduDetContext_t tduIncR1

MR R1 detector context

const tduDetContext_t tduIncR2FW

MR R2 forward detector context

const tduDetContext_t tduIncR2BW

MR R2 backward detector context

const tduDetContext_t tduIncUMF

User defined MF detector context. TODO: how is this used?

const tduDetContext_t tduIncV8BIS_FS_F

Dual tone CRE1 detector (single pair) context

const tduDetContext_t tduIncV21

V.21 flags detector context

const tduDetContext_t tduIncCPT

CPT detector context

const tduDetContext_t tduIncCOIN_TONES

const tduDetContext_t tduIncCIDCAS

const tduDetContext_t tduIncV825_F

const tduDetContext_t tduIncV21CM

const tduDetContext_t tduIncCASL_T_RX

const tduDetContext_t tduIncCASH_T_RX

const tduDetContext_t tduIncV25_T_TX

const tduDetContext_t tduIncCNG_T

const tduDetContext_t tduIncV21UPPER_MARKS_LITE_T


TDU: Digit Signalling

Digit Signalling
[Tone Detection Unit]

Collaboration diagram for Digit Signalling:

Detailed Description

Before starting compelled digit signaling generation, system should query state of MF detectors. If a detector is in progress, system should reject digit signaling generation request.

For digit reception (compelled/non-compelled signalling) and digit transmission(compelled) system should enable MF detector. System could enable MF detector with MF tone detection control codes.

Before enabling MF detector for digit signalling, system should save the configuration parameters of MF detectors in a system structure. At end of digit signalling operation, system should restore the configuration parameters of MF detectors like it was before.

Data Structures

struct | tduQueryState_t
Structure used by TDU to report its internal state in response to tdu_CTL_QUERY_STATE control code Use case: Digit Signalling. More...
struct | tduMfState_t
Structure used for saving/restoring MF detector configuration parameters Use case: Digit Signalling. More...

Digit Signalling

#define | tdu_CTL_QUERY_STATE 121
#define | tdu_CTL_MFSTD_SAVE 122
#define | tdu_CTL_MFSTD_RESTORE 123
#define | tdu_SLOT_MF_STD 0

Define Documentation

#define tdu_CTL_QUERY_STATE 121

Check if any detectors are hot

Definition at line 560 of file tdu.h.

#define tdu_CTL_MFSTD_SAVE 122

Save configuration parameters from MF STD slot in a system structure

Definition at line 561 of file tdu.h.

#define tdu_CTL_MFSTD_RESTORE 123

Restore configuration parameters into the the MF STD slot from system structure

Definition at line 563 of file tdu.h.

#define tdu_SLOT_MF_STD 0

Slot number of MF tone detector

Definition at line 566 of file tdu.h.


TDU: ECO API return codes

ECO API return codes
[Tone Detection Unit]

Collaboration diagram for ECO API return codes:

Detailed Description

These codes are the return codes used by tduGetSizes() and tduNew() APIs.

TDU Return Codes

enum { tdu_NOMEMORY = -1, tdu_NOERR = 0, tdu_ERROR = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
tdu_NOMEMORY | One of the buffers to be allocated by system for TDU has invalid base address. Error code returned by tduNew.
tdu_NOERR | Success code. The APIs passed all internal checks and executed to completions
tdu_ERROR | Error code is returned by tduGetSizes() if maxSamplesPerFrame in tduSizeConfig_t is out of expected range. Error code is returned by tduNew() in one of the following conditions: (1) tduInst was created already by a prior call to tduNew. (2) number of buffers provided is not same as what TDU requires (3) alignment or size check fails on one of the buffers

Definition at line 744 of file tdu.h.


TDU: Enable Detection Reports

Enable Detection Reports
[Tone Detection Unit]

Collaboration diagram for Enable Detection Reports:

Detailed Description

System can selectively enable/disable reports for various tone detections.

Data Structures

struct | tduToneFilterCfgCtl_t
Configuration structure to enable/disable tone detection reports Use case: Enable Detection Reports. More...

Digit Actions

#define | tdu_CTL_MULTIPLE_TONES 111

Define Documentation

#define tdu_CTL_MULTIPLE_TONES 111

Configure reports upon tone detections

Definition at line 469 of file tdu.h.


TDU: Exception codes

Exception codes
[Tone Detection Unit]

Collaboration diagram for Exception codes:

Detailed Description

These are fatal exceptions generally because of improper interaction between system and TDU component

TDU Exception Codes

enum {
tdu_EXC_OPEN = 1, tdu_EXC_DELETE = 2, tdu_EXC_FRAMESIZE = 3, tdu_EXC_MEMORY = 4,
tdu_EXC_RECEIVEIN = 5, tdu_EXC_SENDIN = 6, tdu_EXC_MFDET = 7
}

Enumeration Type Documentation

anonymous enum

Enumerator:
tdu_EXC_OPEN | Exception from tduOpen() API, if the TDU instance was already open
tdu_EXC_DELETE | Exception from tduDelete() API, if the TDU instance is still open
tdu_EXC_FRAMESIZE | Exception from tduOpen() API, if bad frame size is supplied in configuration structure
tdu_EXC_MEMORY | Reserved for future use
tdu_EXC_RECEIVEIN | Reserved for future use
tdu_EXC_SENDIN | Reserved for future use
tdu_EXC_MFDET | Exception from MF detector indicating corruption in in the TDU instance

Definition at line 769 of file tdu.h.


TDU: Inband relay regeneration

Inband relay regeneration
[Tone Detection Unit]

Collaboration diagram for Inband relay regeneration:

Detailed Description

In this use case, system goes through the following sequence:
  1. receive inband relay digit packets from network.
  2. start regenerating corresponding tone to its TDM side.
  3. call tduControl with control code to turn of MF detector
  4. stop generating tone to its TDM side at end of digit
  5. call tduControl with control code to turn back MF detector ON
    MF detector is turned OFF during digit regeneration to prevent echo of regenerated digit be detected as a spurious digit.

Defines

#define tdu_CTL_MF_STD_OFF 1

Define Documentation

#define tdu_CTL_MF_STD_OFF 1

Turn OFF MF detector

Definition at line 36 of file tdu.h.


TDU: Individual detector contexts

Individual detector contexts

Detailed Description

The structure below gives the definition of detector context.

A constant array tduDetContexts containing pointers of detector contexts must be intialized at compile time by the system.

Each element in the array is a pointer to the detector context for an individual detector. If the array contains pointer for a particular detector, then that detector is linked into the final system application. Thus, system has flexibility at compile time to link in a partial set of tone detectors supported by TDU.

The pointers to individual detectors are defined by TDU: Detector context pointers.

itself is used internally by TDU by various detectors.

Data Structures

struct | tduDetContext_t
This is the definition of detector context structure. Usage information of this structure is at Individual detector contexts. More...

Variables

const tduDetContext_t * | tduDetContexts []

Variable Documentation

const tduDetContext_t* tduDetContexts[]

Constant array of detector contexts to be linked into system


TDU: Internal framework table

Internal framework table

Detailed Description

This is a table of function pointers to be populated by the system at compile time depending on which individual detectors are to be linked into the system application.

If a particular detector is not supported, corresponding function pointer should be initialize dummy functions given below.

Functions to be populated by system are given below. These are TDU internal functions that system should not use. These should just be populated in the internal framework table for only the application linking purpose.

Data Structures

struct | tduTable_t
call table definition for control and process funcitons of individual detectors More...
struct | tduIntFwTable_t
Internal framework call table. More...

Functions

tbool | tduSFDControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Single frequency detector (from TDM, network) internal control function.
void | tduSFDFProcess (void *tduInst, linSample *samples, void *alert)
Single frequency detector (from TDM) internal process function.
void | tduSFDTProcess (void *tduInst, linSample *samples, void *alert)
Single frequency detector (from Network) internal process function.
tbool | tduMFControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
MF detector internal control function.
void | tduMFProcess (void *tduInst, linSample *samples, void *alert)
MF detector internal process function.
tbool | tduV21Control (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
V21 flags detector internal control function.
void | tduV21Process (void *tduInst, linSample *samples, void *alert)
V21 flags detector internal process function.
tbool | tduCPTControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
CPT detector internal control function.
void | tduCPTProcess (void *tduInst, linSample *samples, void *alert)
CPT detector internal process function.
tbool | tduBDTEWControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Baudot early warning detector internal control function.
void | tduBDTEWProcess (void *tduInst, linSample *samples, void *alert)
Baudot early warning detector internal process function.
void | tdu_mf_cidcas_ctl (tduCfgCtl_t *cfg, void *inst)
CID CAS internal control function.
void | tdu_sfd_llmr_ANSam_reset (tint toneType, Fract tone_db_power, void *inst)
ANSAM internal reset function.
void | tdu_sfd_llmr_ANSam (tint toneType, Fract tone_db_power, void *inst)
ANSAM internal function.
tbool | tdu_sfd_llmr_ANSam_test (tint toneType, void *inst)
ANSAM internal test function.
void | tdu_mf_v8bis_fs_ctl (tduCfgCtl_t *cfg, void *inst)
V.8bis (first segment) internal control function.
void | tduBellTid (tint *tid, tint freq)
Bell (2250Hz, 2250Hz) detector internal function.
void | tdu_mf_coin_tones_ctl (tduCfgCtl_t *cfg, void *inst)
Coin tones detector internal control function.
void | tdu_digit_filter (void *tduInst, tbool dtmf_mf, tint *toneId, tint *on_off)
Digit filter internal function.
void | tduVoiceDiscCtl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Voice discrimination internal control function.
void | tduVoiceDiscProcess (void *tduInst)
Voice discrimination internal process function.
tbool | tduDummyControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Dummy control function to be used by system if a detector is not to be linked in.
void | tduDummyProcess (void *tduInst, void *samples)
Dummy process function to be used by system if a detector is not to be linked in.

Variables

const tduIntFwTable_t | tduIntFwTable

Function Documentation

tbool tduSFDControl | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

Single frequency detector (from TDM, network) internal control function.

void tduSFDFProcess | ( | void * | tduInst,
 |  | linSample * | samples,
 |  | void * | alert
 | ) |  |

Single frequency detector (from TDM) internal process function.

void tduSFDTProcess | ( | void * | tduInst,
 |  | linSample * | samples,
 |  | void * | alert
 | ) |  |

Single frequency detector (from Network) internal process function.

tbool tduMFControl | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

MF detector internal control function.

void tduMFProcess | ( | void * | tduInst,
 |  | linSample * | samples,
 |  | void * | alert
 | ) |  |

MF detector internal process function.

tbool tduV21Control | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

V21 flags detector internal control function.

void tduV21Process | ( | void * | tduInst,
 |  | linSample * | samples,
 |  | void * | alert
 | ) |  |

V21 flags detector internal process function.

tbool tduCPTControl | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

CPT detector internal control function.

void tduCPTProcess | ( | void * | tduInst,
 |  | linSample * | samples,
 |  | void * | alert
 | ) |  |

CPT detector internal process function.

tbool tduBDTEWControl | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

Baudot early warning detector internal control function.

void tduBDTEWProcess | ( | void * | tduInst,
 |  | linSample * | samples,
 |  | void * | alert
 | ) |  |

Baudot early warning detector internal process function.

void tdu_mf_cidcas_ctl | ( | tduCfgCtl_t * | cfg,
 |  | void * | inst
 | ) |  |

CID CAS internal control function.

void tdu_sfd_llmr_ANSam_reset | ( | tint | toneType,
 |  | Fract | tone_db_power,
 |  | void * | inst
 | ) |  |

ANSAM internal reset function.

void tdu_sfd_llmr_ANSam | ( | tint | toneType,
 |  | Fract | tone_db_power,
 |  | void * | inst
 | ) |  |

ANSAM internal function.

tbool tdu_sfd_llmr_ANSam_test | ( | tint | toneType,
 |  | void * | inst
 | ) |  |

ANSAM internal test function.

void tdu_mf_v8bis_fs_ctl | ( | tduCfgCtl_t * | cfg,
 |  | void * | inst
 | ) |  |

V.8bis (first segment) internal control function.

void tduBellTid | ( | tint * | tid,
 |  | tint | freq
 | ) |  |

Bell (2250Hz, 2250Hz) detector internal function.

void tdu_mf_coin_tones_ctl | ( | tduCfgCtl_t * | cfg,
 |  | void * | inst
 | ) |  |

Coin tones detector internal control function.

void tdu_digit_filter | ( | void * | tduInst,
 |  | tbool | dtmf_mf,
 |  | tint * | toneId,
 |  | tint * | on_off
 | ) |  |

Digit filter internal function.

void tduVoiceDiscCtl | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

Voice discrimination internal control function.

void tduVoiceDiscProcess ( void * tduInst )

Voice discrimination internal process function.

tbool tduDummyControl | ( | void * | tduInst,
 |  | tint | c_code,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

Dummy control function to be used by system if a detector is not to be linked in.

void tduDummyProcess | ( | void * | tduInst,
 |  | void * | samples
 | ) |  |

Dummy process function to be used by system if a detector is not to be linked in.

Variable Documentation

const tduIntFwTable_t tduIntFwTable

Internal framework call table


TDU: Lite mode

Lite mode
[Tone Detection Unit]

Collaboration diagram for Lite mode:

Detailed Description

TDU has a lite mode using less memory resources than normal (full) mode. System then uses these resources for other functionality.

For example, in modem call use case, after detection of modem tones, TDU may be configured to be in lite mode so that some relinquished memory may be used by VBD PLR modules. At end of modem call, TDU can be configured back in full mode.

Lite Mode

#define tdu_CTL_GET_LITE 127

Define Documentation

#define tdu_CTL_GET_LITE 127

Check if TDU is in lite or full mode. Mode returned in lite field of tduCfgCtl_t structure

Definition at line 668 of file tdu.h.


TDU: MF Tone Detection

MF Tone Detection
[Tone Detection Unit]

Collaboration diagram for MF Tone Detection:

Detailed Description

System should call tduControl with following control codes to turn ON and configure individual MF detectors. Use tdu_CTL_MF_STD_OFF to turn OFF MF tone detection.

Data Structures

struct | tduMfCfgCtl_t
MF detection configuration structure. Use case: MF tone detection. More...

MF Tone Detection

#define | tdu_CTL_MF_MIN 73
#define | tdu_CTL_MF_DTMF 73
#define | tdu_CTL_MF_R1 74
#define | tdu_CTL_MF_R2FW 75
#define | tdu_CTL_MF_R2BW 76
#define | tdu_CTL_MF_MAX 76

Define Documentation

#define tdu_CTL_MF_MIN 73

TDU internal use. First control code for turning ON an MF detector

Definition at line 293 of file tdu.h.

#define tdu_CTL_MF_DTMF 73

Turn on DTMF detector

Definition at line 295 of file tdu.h.

#define tdu_CTL_MF_R1 74

Turn on MF R1 detector

Definition at line 296 of file tdu.h.

#define tdu_CTL_MF_R2FW 75

Turn on MF R2 forward detector

Definition at line 297 of file tdu.h.

#define tdu_CTL_MF_R2BW 76

Turn on MF R2 backward detector

Definition at line 298 of file tdu.h.

#define tdu_CTL_MF_MAX 76

TDU internal use. First control code for turning ON an MF detector

Definition at line 299 of file tdu.h.


TDU: MIPS Savings

MIPS Savings
[Tone Detection Unit]

Collaboration diagram for MIPS Savings:

Detailed Description

In case of system wide out of MIPS condition, system may choose to temporarily suspend TDU operation. Once out of MIPS condition is cleared, system may reenable TDU operation back to where it was before suspension.

MIPS Savings

#define | tdu_CTL_SUSSPEND 112
#define | tdu_CTL_RELEASE 113

Define Documentation

#define tdu_CTL_SUSSPEND 112

Disable all active, but only cold tone detectors

Definition at line 495 of file tdu.h.

#define tdu_CTL_RELEASE 113

Reenable all tone detectors previously disabled through tdu_CTL_SUSSPEND

Definition at line 496 of file tdu.h.


TDU: Modem Relay

Modem Relay
[Tone Detection Unit]

Collaboration diagram for Modem Relay:

Modem Relay

#define | tdu_CTL_LLMR_ON 108
#define | tdu_CTL_LLMR_OFF 109

Define Documentation

#define tdu_CTL_LLMR_ON 108

Configures TDU in Modem Relay mode

Definition at line 384 of file tdu.h.

#define tdu_CTL_LLMR_OFF 109

Switch out of Modem Relay mode

Definition at line 385 of file tdu.h.


TDU: Non-MF tone detection OFF

Non-MF tone detection OFF
[Tone Detection Unit]

Collaboration diagram for Non-MF tone detection OFF:

Detailed Description

System should call tduControl with following control codes to turn OFF individual non-MF detectors.

Non-MF Tone Detection Disable Codes

#define | tdu_CTL_OFF_FIRST 33
#define | tdu_CTL_V21_OFF 33
#define | tdu_CTL_V25_OFF 34
#define | tdu_CTL_RSVD3 35
#define | tdu_CTL_CPT_OFF 36
#define | tdu_CTL_V18A_OFF 37
#define | tdu_CTL_SS7COT_OFF 38
#define | tdu_CTL_SF_OFF 39
#define | tdu_CTL_CNG_OFF 40
#define | tdu_CTL_SS7COR_OFF 41
#define | tdu_CTL_TT1khz_OFF 42
#define | tdu_CTL_UMF_OFF 43
#define | tdu_CTL_SFDT_CIDCAS_OFF 44
#define | tdu_CTL_CIDCAS_ALL_OFF 45
#define | tdu_CTL_RSVD4 46
#define | tdu_CTL_CRE_OFF 47
#define | tdu_CTL_MF_CRE1_OFF 48
#define | tdu_CTL_CRE2_OFF 49
#define | tdu_CTL_BELL_OFF 50
#define | tdu_CTL_V8BIS_TONES_OFF 51
#define | tdu_CTL_V21_TONES_OFF 52
#define | tdu_CTL_V23_TONES_OFF 53
#define | tdu_CTL_V21_CM_FAX_OFF 54
#define | tdu_CTL_V21_V8DATA_OFF 55
#define | tdu_CTL_B202_TONES_OFF 56
#define | tdu_CTL_VOICE_DISC_OFF 59
#define | tdu_CTL_COIN_TONES_OFF 60
#define | tdu_CTL_BDTEW_OFF 61
#define | tdu_CTL_SIA_OFF 62
#define | tdu_CTL_OFF_LAST 62
#define | tdu_CTL_THRE_MAX 63

Define Documentation

#define tdu_CTL_OFF_FIRST 33

TDU internal use. First control code for turning ON a non-MF detector

Definition at line 129 of file tdu.h.

#define tdu_CTL_V21_OFF 33

Switch off V.21 detector

Definition at line 131 of file tdu.h.

#define tdu_CTL_V25_OFF 34

Switch off V.25 detector

Definition at line 132 of file tdu.h.

#define tdu_CTL_RSVD3 35

Reseved. Control codes correspond to TDU report codes

Definition at line 133 of file tdu.h.

#define tdu_CTL_CPT_OFF 36

Switch off Call Progress Tonedetector

Definition at line 135 of file tdu.h.

#define tdu_CTL_V18A_OFF 37

Switch off V.18A detector

Definition at line 136 of file tdu.h.

#define tdu_CTL_SS7COT_OFF 38

Switch off SS7 COT detector

Definition at line 137 of file tdu.h.

#define tdu_CTL_SF_OFF 39

Switch off Single Frequency detector

Definition at line 138 of file tdu.h.

#define tdu_CTL_CNG_OFF 40

Switch off (fax) CNG detector

Definition at line 139 of file tdu.h.

#define tdu_CTL_SS7COR_OFF 41

Switch off SS7 COR detector

Definition at line 140 of file tdu.h.

#define tdu_CTL_TT1khz_OFF 42

Switch off Test tone (1kHz) detector

Definition at line 141 of file tdu.h.

#define tdu_CTL_UMF_OFF 43

Switch off the slot (TX) populated with CID CAS

Definition at line 142 of file tdu.h.

#define tdu_CTL_SFDT_CIDCAS_OFF 44

Switch off the slots (RX) populated with CID CAS

Definition at line 144 of file tdu.h.

#define tdu_CTL_CIDCAS_ALL_OFF 45

Switch off both CID CAS detectors (Tx & RX)

Definition at line 146 of file tdu.h.

#define tdu_CTL_RSVD4 46

Reseved

Definition at line 148 of file tdu.h.

#define tdu_CTL_CRE_OFF 47

Disable both first and second segment CRe detectors

Definition at line 149 of file tdu.h.

#define tdu_CTL_MF_CRE1_OFF 48

Switch off first segment detector (dual-tone)

Definition at line 151 of file tdu.h.

#define tdu_CTL_CRE2_OFF 49

Switch off second segment detector (single-tone)

Definition at line 153 of file tdu.h.

#define tdu_CTL_BELL_OFF 50

Switch off 2225/2250 Hz detector

Definition at line 155 of file tdu.h.

#define tdu_CTL_V8BIS_TONES_OFF 51

Switch off V8BIS detector

Definition at line 156 of file tdu.h.

#define tdu_CTL_V21_TONES_OFF 52

Switch off V21 detector

Definition at line 157 of file tdu.h.

#define tdu_CTL_V23_TONES_OFF 53

Switch off V23 detector

Definition at line 158 of file tdu.h.

#define tdu_CTL_V21_CM_FAX_OFF 54

Switch off V21_CM_FAX detector

Definition at line 159 of file tdu.h.

#define tdu_CTL_V21_V8DATA_OFF 55

Switch off V.21 Ch1 detector for detecting V.8 CI/CM messages

Definition at line 160 of file tdu.h.

#define tdu_CTL_B202_TONES_OFF 56

Switch off B202 detector

Definition at line 162 of file tdu.h.

#define tdu_CTL_VOICE_DISC_OFF 59

Switch off VOICE DISC detector

Definition at line 163 of file tdu.h.

#define tdu_CTL_COIN_TONES_OFF 60

Switch off COIN TONES detector

Definition at line 164 of file tdu.h.

#define tdu_CTL_BDTEW_OFF 61

Switch off BDT EW detector

Definition at line 165 of file tdu.h.

#define tdu_CTL_SIA_OFF 62

Switch off SIA detector

Definition at line 166 of file tdu.h.

#define tdu_CTL_OFF_LAST 62

TDU internal use. First control code for turning ON a non-MF detector

Definition at line 168 of file tdu.h.

#define tdu_CTL_THRE_MAX 63

TDU internal use. Last control code that eventually modifies wb energy threshold

Definition at line 170 of file tdu.h.


TDU: Non-MF tone detection ON

Non-MF tone detection ON
[Tone Detection Unit]

Collaboration diagram for Non-MF tone detection ON:

Detailed Description

System should call tduControl with following control codes to turn ON individual non-MF detectors.

Non-MF Tone Detection Enable Codes

#define | tdu_CTL_ON_FIRST 2
#define | tdu_CTL_V21_ON 2
#define | tdu_CTL_V25_ON 3
#define | tdu_CTL_RSVD1 4
#define | tdu_CTL_CPT_ON 5
#define | tdu_CTL_V18A_ON 6
#define | tdu_CTL_SS7COT_ON 7
#define | tdu_CTL_SF_ON 8
#define | tdu_CTL_CNG_ON 9
#define | tdu_CTL_SS7COR_ON 10
#define | tdu_CTL_TT1khz_ON 11
#define | tdu_CTL_MF_CIDCAS_ON 12
#define | tdu_CTL_SFDT_CIDCAS_ON 13
#define | tdu_CTL_CIDCAS_ALL_ON 14
#define | tdu_CTL_RSVD2 15
#define | tdu_CTL_CRE_ON 16
#define | tdu_CTL_MF_CRE1_ON 17
#define | tdu_CTL_CRE2_ON 18
#define | tdu_CTL_BELL_ON 19
#define | tdu_CTL_V8BIS_TONES_ON 20
#define | tdu_CTL_V21_TONES_ON 21
#define | tdu_CTL_V23_TONES_ON 22
#define | tdu_CTL_V21_CM_FAX_ON 23
#define | tdu_CTL_V21_V8DATA_ON 24
#define | tdu_CTL_B202_TONES_ON 25
#define | tdu_CTL_VOICE_DISC_ON 29
#define | tdu_CTL_MF_COIN_TONES_ON 30
#define | tdu_CTL_BDTEW_ON 31
#define | tdu_CTL_SIA_ON 32
#define | tdu_CTL_ON_LAST 32

Define Documentation

#define tdu_CTL_ON_FIRST 2

TDU internal use. First control code for turning ON a non-MF detector

Definition at line 51 of file tdu.h.

#define tdu_CTL_V21_ON 2

Turn on V.21 detector (upper channel)

Definition at line 53 of file tdu.h.

#define tdu_CTL_V25_ON 3

Turn on V.25 detector

Definition at line 54 of file tdu.h.

#define tdu_CTL_RSVD1 4

Reseved. Control codes correspond to TDU report codes

Definition at line 55 of file tdu.h.

#define tdu_CTL_CPT_ON 5

Turn on Call Progress Tone detector

Definition at line 57 of file tdu.h.

#define tdu_CTL_V18A_ON 6

Turn on V.18A detector

Definition at line 58 of file tdu.h.

#define tdu_CTL_SS7COT_ON 7

Switch on SS7 COT detector

Definition at line 59 of file tdu.h.

#define tdu_CTL_SF_ON 8

Switch on Single Frequency detector

Definition at line 60 of file tdu.h.

#define tdu_CTL_CNG_ON 9

Switch on (fax) CNG detector

Definition at line 61 of file tdu.h.

#define tdu_CTL_SS7COR_ON 10

Switch on SS7 COR detector

Definition at line 62 of file tdu.h.

#define tdu_CTL_TT1khz_ON 11

Switch on Test tone (1kHz) detector

Definition at line 63 of file tdu.h.

#define tdu_CTL_MF_CIDCAS_ON 12

CID CAS dual tone alert: 1 per group

Definition at line 64 of file tdu.h.

#define tdu_CTL_SFDT_CIDCAS_ON 13

CID CAS dual tone detector served by SFDT table

Definition at line 65 of file tdu.h.

#define tdu_CTL_CIDCAS_ALL_ON 14

CID CAS dual tone detectors are turned on in both directions

Definition at line 67 of file tdu.h.

#define tdu_CTL_RSVD2 15

Reseved

Definition at line 69 of file tdu.h.

#define tdu_CTL_CRE_ON 16

Turn on both first and second segment CRe detectors

Definition at line 71 of file tdu.h.

#define tdu_CTL_MF_CRE1_ON 17

Turn on Dual-tone first segment

Definition at line 73 of file tdu.h.

#define tdu_CTL_CRE2_ON 18

Turn on Single-tone second segment

Definition at line 74 of file tdu.h.

#define tdu_CTL_BELL_ON 19

Switch on 2225/2250 Hz detector

Definition at line 75 of file tdu.h.

#define tdu_CTL_V8BIS_TONES_ON 20

Switch on first segment dual-tone detectors

Definition at line 76 of file tdu.h.

#define tdu_CTL_V21_TONES_ON 21

V.21 low channel, 1180/980 Hz(0/1), continuous marks

Definition at line 78 of file tdu.h.

#define tdu_CTL_V23_TONES_ON 22

V.23 forward channel, 2300/1300Hz (0/1), continuous marks

Definition at line 80 of file tdu.h.

#define tdu_CTL_V21_CM_FAX_ON 23

Switch on V.21 detector on lower channel, to detect CM message (V.8)

Definition at line 82 of file tdu.h.

#define tdu_CTL_V21_V8DATA_ON 24

Switch on V.21 Ch1 detector for detecting V.8 CI messages

Definition at line 84 of file tdu.h.

#define tdu_CTL_B202_TONES_ON 25

Bell202 Modem Tone

Definition at line 86 of file tdu.h.

#define tdu_CTL_VOICE_DISC_ON 29

Turn on voice descrimination detector

Definition at line 87 of file tdu.h.

#define tdu_CTL_MF_COIN_TONES_ON 30

Coin machine dual frequency tones

Definition at line 88 of file tdu.h.

#define tdu_CTL_BDTEW_ON 31

BDT Early warning detector

Definition at line 89 of file tdu.h.

#define tdu_CTL_SIA_ON 32

Turn on the SIA Tone detector

Definition at line 90 of file tdu.h.

#define tdu_CTL_ON_LAST 32

TDU internal use. Last control code for turning ON a non-MF detector

Definition at line 91 of file tdu.h.


TDU: Relinquish Memory

Relinquish Memory
[Tone Detection Unit]

Collaboration diagram for Relinquish Memory:

Detailed Description

In systems with tight memory, system could ask TDU to relinquish its delay line memory by stopping TDU operation.

System can do this only at certain points in call flows where TDU support is temporarily not required. For example, in case of TTY/TDD call, TDU operation is not required after TTY onset. At end of TTY/TDD call, TDU operation is restarted.

When restarting TDU operation, there is no need to call tduNew to create TDU again. The control code below may be used directly, and TDU assumes buffers required for its operation are available like before it stopped operation.

However, when restarting, TDU resets its detection state and starts afresh.

Data Structures

struct | tduTxDelayLine_t
Structure used by TDU to return pointer to memory relinquished (TDU's internal delay line buffer) Use case: Relinquish Memory. More...

Free Memory

#define | tdu_CTL_STOP 125
#define | tdu_CTL_RESTART 126

Define Documentation

#define tdu_CTL_STOP 125

Stop TDU operation- configuration parameters are preserved

Definition at line 637 of file tdu.h.

#define tdu_CTL_RESTART 126

Restart TDU operation - use preserved configuration parameters from before stop operation

Definition at line 639 of file tdu.h.


TDU: Signal Interruption

Signal Interruption
[Tone Detection Unit]

Collaboration diagram for Signal Interruption:

Detailed Description

In certain cases of signal interruption like voice decoder switchover or network packet loss, the tone detector looking for phase reversal in signal may falsely report a phase reversal.

When system goes through a signal interruption condition, it should ask TDU to reset its phase reversal detector.

Signal Interruption

#define tdu_CTL_PR_SEARCH_RST 124

Define Documentation

#define tdu_CTL_PR_SEARCH_RST 124

Reset phase reversal detector

Definition at line 613 of file tdu.h.


TDU: TDU Context

TDU Context

Detailed Description

TDU context structure. TODO: Will go away after tduBind() and tduCreate() APIs are implemented.

This structure contains call out function pointers from TDU to system. This should be initialized with system functions.

Data Structures

struct | tduContext_s
struct | tduContext_s

Global TDU Context Structure

typedef tduContext_s | tduContext_t

Typedef Documentation

typedef struct tduContext_s tduContext_t


TDU: TDU Instance Slots

TDU Instance Slots
[Tone Detection Unit]

Collaboration diagram for TDU Instance Slots:

Detailed Description

Position in vector of instance pointers for parallel operation of detectors

TDU Instance Slots

#define | tdu_SLOT_MF_RSVD1 0
#define | tdu_SLOT_MF_USER 1
#define | tdu_SLOT_V21 2
#define | tdu_SLOT_CPT 3
#define | tdu_SLOT_V25TX 4
#define | tdu_SLOT_V18A 5
#define | tdu_SLOT_MF_RSVD2 6
#define | tdu_SLOT_SF 7
#define | tdu_SLOT_CNG 8
#define | tdu_SLOT_TT1khz 9
#define | tdu_SLOT_MF_RSVD3 10
#define | tdu_SLOT_BELLTX1 11
#define | tdu_SLOT_BELLTX2 12
#define | tdu_SLOT_V21LOW_MARKS 13
#define | tdu_SLOT_V21UPPER_MARKS 14
#define | tdu_SLOT_V23FW_MARKS 15
#define | tdu_SLOT_V23BW_MARKS 16
#define | tdu_SLOT_V18A_S 17
#define | tdu_SLOT_B202_M 18
#define | tdu_SLOT_B202_S 19
#define | tdu_SLOT_BDTEW 20
#define | tdu_SLOT_V21LOW_SPACES 21
#define | tdu_SLOT_MF_USER1 22
#define | tdu_SLOT_SIA 23
#define | tdu_SLOT_SIA_S 24
#define | tdu_SLOT_MAX_TX 24
#define | tdu_SLOT_V25RX 0
#define | tdu_SLOT_BELLRX1 1
#define | tdu_SLOT_BELLRX2 2
#define | tdu_SLOT_V23FW_MARKS_RX 3
#define | tdu_SLOT_V18A_RX 4
#define | tdu_SLOT_V18A_S_RX 5
#define | tdu_SLOT_V21LOW_MARKS_RX 6
#define | tdu_SLOT_V21LOW_S_RX 7
#define | tdu_SLOT_CASL_RX 8
#define | tdu_SLOT_CASH_RX 9
#define | tdu_SLOT_SFDT_DUMMY1 10
#define | tdu_SLOT_SFDT_DUMMY2 11
#define | tdu_SLOT_SFDT_DUMMY3 12
#define | tdu_SLOT_SS7COT_RX 13
#define | tdu_SLOT_SIA_RX 14
#define | tdu_SLOT_SIA_S_RX 15
#define | tdu_SLOT_MAX_RX 15
#define | tdu_SLOT_NONE 255
#define | tdu_SLOT_MAX (tdu_SLOT_MAX_TX + tdu_SLOT_MAX_RX + 1)
#define | tdu_MAX_SLOT (tdu_SLOT_MAX + 1)
#define | tdu_MAX_SLOT_TX (tdu_SLOT_MAX_TX + 1)
#define | tdu_MAX_SLOT_RX (tdu_SLOT_MAX_RX + 1)

Define Documentation

#define tdu_SLOT_MF_RSVD1 0

Defined in interface file: tdu.h

Definition at line 226 of file tdu.h.

#define tdu_SLOT_MF_USER 1

For mf user defined detector

Definition at line 227 of file tdu.h.

#define tdu_SLOT_V21 2

For v.21 detector

Definition at line 228 of file tdu.h.

#define tdu_SLOT_CPT 3

For call progress tone detector

Definition at line 229 of file tdu.h.

#define tdu_SLOT_V25TX 4

First slot for V.25 detector, usually Tx

Definition at line 230 of file tdu.h.

#define tdu_SLOT_V18A 5

For v.18a tone detector

Definition at line 231 of file tdu.h.

#define tdu_SLOT_MF_RSVD2 6

Defined in interface file: tdu.h

Definition at line 232 of file tdu.h.

#define tdu_SLOT_SF 7

For single frequency signalling: should be 7

Definition at line 233 of file tdu.h.

#define tdu_SLOT_CNG 8

For cng

Definition at line 234 of file tdu.h.

#define tdu_SLOT_TT1khz 9

For test tones (old 1000 Hz and new 1004 Hz)

Definition at line 235 of file tdu.h.

#define tdu_SLOT_MF_RSVD3 10

Defined in interface file: tdu.h

Definition at line 236 of file tdu.h.

#define tdu_SLOT_BELLTX1 11

Bell 103 and V.22 unscrambled ones

Definition at line 237 of file tdu.h.

#define tdu_SLOT_BELLTX2 12

Bell 103 lower channel, 1270Hz, continuous marks

Definition at line 238 of file tdu.h.

#define tdu_SLOT_V21LOW_MARKS 13

V.21 low channel, 1180/980 Hz (0/1), continuous marks

Definition at line 239 of file tdu.h.

#define tdu_SLOT_V21UPPER_MARKS 14

V.21 upper channel, 1850/1650 Hz (0/1), continuous marks

Definition at line 240 of file tdu.h.

#define tdu_SLOT_V23FW_MARKS 15

V.23 forward channel, 2300/1300 Hz (0/1), continuous marks

Definition at line 241 of file tdu.h.

#define tdu_SLOT_V23BW_MARKS 16

V.23 backward channel, 390/450Hz (0/1), continuous marks

Definition at line 242 of file tdu.h.

#define tdu_SLOT_V18A_S 17

V.18A low channel, 1800 Hz, continuous spaces

Definition at line 243 of file tdu.h.

#define tdu_SLOT_B202_M 18

Bell 202 continuous marks (1200Hz)

Definition at line 244 of file tdu.h.

#define tdu_SLOT_B202_S 19

Bell 202 continuous spaces (2200Hz)

Definition at line 245 of file tdu.h.

#define tdu_SLOT_BDTEW 20

Used for early warning detection

Definition at line 246 of file tdu.h.

#define tdu_SLOT_V21LOW_SPACES 21

V.21 low channel, 1180/980 Hz (0/1)

Definition at line 247 of file tdu.h.

#define tdu_SLOT_MF_USER1 22

Definition at line 248 of file tdu.h.

#define tdu_SLOT_SIA 23

SIA: 1400 Hz detection

Definition at line 249 of file tdu.h.

#define tdu_SLOT_SIA_S 24

SIA: 2300 Hz detection

Definition at line 250 of file tdu.h.

#define tdu_SLOT_MAX_TX 24

Last TX slot used

Definition at line 251 of file tdu.h.

#define tdu_SLOT_V25RX 0

Time domain V.25 detector on Rx path.

Definition at line 253 of file tdu.h.

#define tdu_SLOT_BELLRX1 1

RX path time domain slot: 2225 Hz detection

Definition at line 254 of file tdu.h.

#define tdu_SLOT_BELLRX2 2

RX path time domain slot: 2250 Hz detection

Definition at line 255 of file tdu.h.

#define tdu_SLOT_V23FW_MARKS_RX 3

RX path time domain slot: 1300 Hz detection

Definition at line 256 of file tdu.h.

#define tdu_SLOT_V18A_RX 4

RX path time domain slot: V.18A 1400Hz detector

Definition at line 257 of file tdu.h.

#define tdu_SLOT_V18A_S_RX 5

RX path time domain slot: V.18A 1800Hz detector

Definition at line 258 of file tdu.h.

#define tdu_SLOT_V21LOW_MARKS_RX 6

RX path time domain slot: V.21 low channel, 1180/980 Hz (0/1), continuous marks

Definition at line 259 of file tdu.h.

#define tdu_SLOT_V21LOW_S_RX 7

RX path time domain slot: V.21 low channel, 1180/980 Hz (0/1), continuous spaces

Definition at line 260 of file tdu.h.

#define tdu_SLOT_CASL_RX 8

RX path time domain slot: CAS low tone detector

Definition at line 261 of file tdu.h.

#define tdu_SLOT_CASH_RX 9

RX path time domain slot: CAS high tone detector

Definition at line 262 of file tdu.h.

#define tdu_SLOT_SFDT_DUMMY1 10

Internal slot for mux-ed Rx side detectors

Definition at line 263 of file tdu.h.

#define tdu_SLOT_SFDT_DUMMY2 11

Internal slot for mux-ed Rx side detectors

Definition at line 264 of file tdu.h.

#define tdu_SLOT_SFDT_DUMMY3 12

Internal slot for mux-ed Rx side detectors

Definition at line 265 of file tdu.h.

#define tdu_SLOT_SS7COT_RX 13

SS7COT RX side time domain detector

Definition at line 267 of file tdu.h.

#define tdu_SLOT_SIA_RX 14

Definition at line 268 of file tdu.h.

#define tdu_SLOT_SIA_S_RX 15

Definition at line 269 of file tdu.h.

#define tdu_SLOT_MAX_RX 15

Last RX slot used

Definition at line 271 of file tdu.h.

#define tdu_SLOT_NONE 255

Definition at line 274 of file tdu.h.

#define tdu_SLOT_MAX (tdu_SLOT_MAX_TX + tdu_SLOT_MAX_RX + 1)

Definition at line 275 of file tdu.h.

#define tdu_MAX_SLOT (tdu_SLOT_MAX + 1)

Max detectors operating in parallel

Definition at line 276 of file tdu.h.

#define tdu_MAX_SLOT_TX (tdu_SLOT_MAX_TX + 1)

No of Tx detectors

Definition at line 277 of file tdu.h.

#define tdu_MAX_SLOT_RX (tdu_SLOT_MAX_RX + 1)

No of Rx detectors

Definition at line 278 of file tdu.h.


TDU: TDU Position

TDU Position
[Tone Detection Unit]

Collaboration diagram for TDU Position:

Detailed Description

Following control code is used to set position of TDU in system. Position implies:
  • Before Vs After conferencing: TDU validates its position for each frame of input
  • From TDM Vs From Network: TDU uses this to decide whether to run FULL or LITE processing. TODO: TDU does not need to know its position in system. System needs to keep this information and should expect TDU to just process input.

Data Structures

struct | tduPosition_t
Configuration structure for setting position of TDU in system. Use case: TDU Position. More...

TDU Position

#define | tdu_CTL_POSITION 105

Define Documentation

#define tdu_CTL_POSITION 105

Configure TDU's position

Definition at line 336 of file tdu.h.


TDU: TDU (Tone Detection Unit) Package

TDU (Tone Detection Unit) Package

Release 2.3.1.0

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The Tone Detection Unit (TDU) is able to detect various types of line events encountered in a voice band channel. In the PSTN, tones are generated at different places. Some detectors are needed even before a voice path is established (trunk events), and are actually a prerequisite for voice path establishment (e.g., PTS). Some tone events need to be detected and transported through the packet network with descriptive attributes. These events and attributes are also used for proper tone restoration on the remote side (low bit-rate voice codecs cannot guarantee the reproduction of some tone signals accurately for automatic recognition), or for out-of-band signaling. By defining separate payload formats for tone events, additional bandwidth compression is achieved.

Additional links: Detailed TDU Description

Integration

The TDU component can be integrated into a system and provide reliable tone detection following the link below. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the TDU code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | TDU External API
 | TDU Integration

Default Configuration

The single parameter required to open a TDU instance is the operational frame size (in samples). This value must represent either 5.0 or 5.5 ms. By default all primary and secondary detectors are disabled. All required detectors must be enabled via tduControl() for reporting to occur.

Configurable parameters for each individual (primary and secondary) detector context can be found on their respective pages following the links below.

Additional links: | Primary Detector Details
 | Secondary Detector Details

Performance

Performance improvements have been implemented in the TDU component to support operation in a Voice over Packet (VoP) environment. This includes quick and reliable detection of DTMF events (digit leakage reduction) and improved talk-off performance.

For MIPS and memory information proceed to the links provided below

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

Following is a list of TDU limitations:

  • The call progress tones detector does not verify signal cadence or the list of acceptable frequencies. As such, additional processing by the host is needed. It is up to the host to verify proper cadence and frequencies for the given telephone network and map that to a particular event (E.180 supp. 2).
  • Two tones closer than 50 Hz cannot be discriminated as a double tone event; instead, a wideband, single-tone event is reported.
  • The general tone frequency peak estimation accuracy is ±3 Hz.
  • The TDU component operates on frame sizes limited to 5.0 or 5.5 ms.

Limitations for each individual (primary and secondary) detector can be found on their respective pages following the links below.

Additional links: | Primary Detector Details
 | Secondary Detector Details

Standards Compliance

The TDU complies with many ITU-T and Bellcore\/Telcordia Standards. These include ITU-T G-Series, Q-Series, R-Series, T-Series and V-Series. The complete list is linked below. Standards compliance for each individual (primary and secondary) detector is available as well via their respective pages.

Additional links: | Standard Compliance
 | Primary Detector Details
 | Secondary Detector Details

Dependent Packages

The TDU package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.asm (Assembly macros)
  5. ti.mas.swtools (Build tools)

TDU Required Packages
Package | File Name | Compatibility Key
ti.mas.tdu | ti_mas_tdu_<fmt>_c<rtarg>_2_1_1_5.zip | [3,1,0,1]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.asm (dependent) | ti_mas_asm_<fmt>_c<rtarg>_3_4_0_1.zip | [3,0,1,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


TDU: TDU Integration

TDU (Tone Detection Unit) Package

TDU Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking TDU with System
  • Initialization/Binding Structures
  • Additional Information

XDC Build Process

Required Tools

The following tools are required to build the TDU component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.0.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the TDU package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in TDU Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the TDU using the XDC tools, change to the TDU directory and proceed.

With the environment configured, XDC may be eployed to build the TDU and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the TDU packages. The first two commands provide a means to clean and build the TDU package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the TDU and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., TDU).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated TDU build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the TDU for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the TDU as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated TDU build files as in (1) above
    • Removes all generated build files for all TDU dependent packages

Notes:
  1. The command-line option baudotnet may be added to XDCARGS to compile in network side baudot detection.
  2. The command-line option ansam may be added to XDCARGS to compile in ANSam detection.

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking TDU with System

The TDU and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/asm
               /fract
               /swtools
               /tdu
               /types
               /util

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the TDU API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/tdu/tdu.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., tdu.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\tdu\c<rtarg>\tdu_a.a<rtarg>
  4. ti\mas\tdu\c<rtarg>\tdu_c.a<rtarg>

Initialization/Binding Structures

The system needs to initialize the following structures at compile time so that only those tone detectors from TDU as required by system application will be linked in:

  • TDU context
  • Individual detector contexts
  • Internal framework table

Additional Information

Use cases/Call flows

The following are various call flows/use cases that TDU participates in in a voice call. In these use cases, the system interacts with TDU using tduControl API. tduControl() API takes a control code and a configuration structure as parameters.

Different control codes are applicable in different use cases. Specific substructures of tduCfgCtl_t structure are used along with specific control codes to exchange configuration data between TDU and the system.

  • Inband relay regeneration
  • Non-MF tone detection ON
  • Non-MF tone detection OFF
  • MF tone detection
  • TDU Position
  • Modem Relay
  • Configure Digit Actions
  • Enable Detection Reports
  • MIPS Savings
  • Autocot generation
  • Digit Signalling
  • Signal Interruption
  • Relinquish Memory
  • Lite mode
  • CED early alert control

For a list of all control codes, see Defines at tdu.h .


TDU: Memory Requirements

TDU (Tone Detection Unit) Package

Memory Requirements

Page Contents

  1. Assumptions
  2. C55x Target
    • Data Requirements
    • Program Requirements
  3. C64x Target
    • Data Requirements
    • Program Requirements
  4. C64x+ Target
    • Data Requirements
    • Program Requirements

Assumptions

The data memory numbers provided here were gathered for the TDU configured with the following detectors enabled (via the tduDetContexts table).

      tduIncV23BW_MARKS_F
      tduIncV21LOW_MARKS_F
      tduIncTT1khz_F
      tduIncCNG_F
      tduIncV21LOW_SPACES_F
      tduIncB202_MARKS_F
      tduIncBELLTX2_F
      tduIncV23FW_MARKS_F
      tduIncV18A_F
      tduIncV21UPPER_MARKS_F
      tduIncSS7COR_F
      tduIncV18A_S_F
      tduIncSS7COT_F
      tduIncV25_F
      tduIncB202_SPACES_F
      tduIncBELLTX1_F
      tduIncSIA_F,
      tduIncSIA_S_F,
      tduIncV23FW_MARKS_T
      tduIncSS7COT_T
      tduIncV25_T_RX
      tduIncBELLRX1_T
      tduIncBELLRX2_T
      tduIncSIA_T_RX,
      tduIncSIA_S_T_RX,
      tduIncSFDT_DUMMY1_T
      tduIncSFDT_DUMMY2_T
      tduIncSFDT_DUMMY3_T
      tduIncDTMF
      tduIncR1
      tduIncR2FW
      tduIncR2BW
      tduIncV8BIS_FS_F
      tduIncV21
      tduIncCPT
      tduIncSF_F

Additionally, the Global Memory Pool feature was not used in calculation of the "per-channel" buffer requirements and a 5ms operational frame size assumed.

C55x Target

Data Requirements

Per Instance Data Buffers
Buffer ID | Alignment (bytes) | Size (bytes) |  | Scratch/Dedicated
 |  | Full | Lite
0 | 4 | 100 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 4 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 552
data/bss | 2402
tduContext | 132
tduDetContexts | 128
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 25.0 Kbyte | Internal | Core TDU code
.switch | 0 | Internal | Switch tables
Total | 25.0 Kbyte | N/A | N/A

Notes:
  1. The placement column in the Program Memory Table serves as a suggestion to achieve optimal MIPS/Memory tradeoff.
  2. Kbyte above represents 1024 bytes.

C64x Target

Data Requirements

Per Instance Data Buffers
Buffer ID | Alignment (bytes) | Size (bytes) |  | Scratch/Dedicated
 |  | Full | Lite
0 | 2 | 92 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 2 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 1176
data/bss | 2452
tduContext | 132
tduDetContexts | 128
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 37.4 Kbyte | Internal | Core TDU code
.constrolProg | 6.2 Kbyte | External | TDU Control code
.initProg | 1.4 Kbyte | External | TDU initialzation code
.tdm2pktProg | 4.1 Kbyte | Grouped | TDU execution code TDM-to-PKT
.pkt2tdmProg | 1.6 Kbyte | Grouped | TDU execution code PKT-to-TDM
.tdm2pktpkt2tdmProg | 352 bytes | Grouped | Various routines
.switch | 148 bytes | Internal | Switch tables
Total | 51.1 Kbyte | N/A | N/A

Notes:
  1. The placement column in the Program Memory Table serves as a suggestion to achieve optimal MIPS/Memory tradeoff.
  2. Kbyte above represents 1024 bytes.
  3. The "Grouped" placement indicates code that should ideally be placed together to for optimizal cache operation.

C64x+ Target

Data Requirements

Per Instance Data Buffers
Buffer ID | Alignment (bytes) | Size (bytes) |  | Scratch/Dedicated
 |  | Full | Lite
0 | 2 | 92 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 2 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 1176
data/bss | 2452
tduContext | 132
tduDetContexts | 128
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 31.8 Kbyte | Internal | Core TDU code
.constrolProg | 4.9 Kbyte | External | TDU Control code
.initProg | 1.0 Kbyte | External | TDU initialzation code
.tdm2pktProg | 3.6 Kbyte | Grouped | TDU execution code TDM-to-PKT
.pkt2tdmProg | 1.5 Kbyte | Grouped | TDU execution code PKT-to-TDM
.tdm2pktpkt2tdmProg | 288 bytes | Grouped | Various routines
.switch | 148 bytes | Internal | Switch tables
Total | 43.2 Kbyte | N/A | N/A

Notes:
  1. The placement column in the Program Memory Table serves as a suggestion to achieve optimal MIPS/Memory tradeoff.
  2. Kbyte above represents 1024 bytes.
  3. The "Grouped" placement indicates code that should ideally be placed together to for optimizal cache operation.


TDU: MFR1 and R2 Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

MFR1 and R2 Detection

Description

Signaling Systems R1 and R2 are two of several channel associated signaling schemes, used over trunks for inter-register signaling. There are two types of events: line/supervisory and address signals.

R1 Register Signaling is a 4-wire type of signaling. It is a combination of two tones at frequencies of 700-1700 Hz (in 200 Hz steps), indicating a total of 15 events.

R2 Register Signaling can be used over 2-wire (analog) connections since the forward and backward set of signals use non-overlapping frequency bands. There are 6 frequencies in each set, indicating a total of 15 events (a combination of two different frequencies from the same set):

  • R2 backward signaling: 540, 660, 780, 900, 1020, and 1140 Hz
  • R2 forward signaling: 1380, 1500, 1620, 1740, 1860, and 1980 Hz

    Hard-coded configuration parameters are: frequency detection window, qualification time, and hangover time.

    The detection report includes digit ID, frequency estimation of each tone, combined power, and internal timestamp.

Standards Compliance

  1. ITU-T Recommendation Q.455, 03-1993, The receiving part of the multifrequency equipment
  2. ITU-T Recommendation Q.323, 11-1988, Multifrequency signal receiving equipment

Limitations

No digits shorter than 25 ms. are detected, and no digits longer than 38 ms. are missed. Digits with duration 25-38 ms. may or may not be detected. There is grey area of 3 dBm0 above the minimum tone power threshold where digits may or may not be detected.

A digit alert is used by relay processing to suppress the voice path, and is generated 10-15 ms. after a tone starts. Therefore, the digit leakage, as voice before relay begins, may be up to 15 ms. in duration.

Configuration

Set of power threshold parameters that are run-time configurable:

  1. Minimum tone power threshold (tones below this value are rejected)
  2. Maximum tone power threshold (tones above this value are rejected)
  3. Positive twist (maximum power difference between lower and upper tone)
  4. Negative twist (maximum power difference between upper and lower tone)
  5. Break threshold (tones below this value are declared off, after being initially reported as on)


TDU: MIPS Requirements

TDU (Tone Detection Unit) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target

Assumptions

Profiling is performed for three scenarios:

  1. Speech conversation (60s)
  2. Call setup and CED (28s)
  3. Silence (12s of -68dBm0 noise)

The vectors serve to provide MIPS requirements during different input scenarios and/or call segments.

The MIPS for both primary detection processing and secondary detection processing are gathered. We configure the TDU to process 5ms frames of PCM data, one each for primary (TX) and secondary (RX) processing. The cache is enabled and flushed between each call to tduSendIn() AND tduReceiveIn(). This serves to emulate a system in which the processing for the two paths (TX/RX) are performed separately.

The following detections were all enabled during profiling:

      tdu_CTL_MF_DTMF
      tdu_CTL_V21_ON
      tdu_CTL_V25_ON
      tdu_CTL_CPT_ON
      tdu_CTL_V18A_ON
      tdu_CTL_CNG_ON
      tdu_CTL_TT1khz_ON
      tdu_CTL_BELL_ON
      tdu_CTL_V8BIS_TONES_ON
      tdu_CTL_V21_TONES_ON
      tdu_CTL_V23_TONES_ON
      tdu_CTL_V21_CM_FAX_ON
      tdu_CTL_V21_V8DATA_ON
      tdu_CTL_B202_TONES_ON
      tdu_CTL_SIA_ON

C55x Target

TDU MIPS - Speech Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.29 | 1.07 | 3.47
Secondary Direction | 0.09 | 0.29 | 0.56
Combined | 0.38 | 1.36 | 3.94

TDU MIPS - Tones Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.28 | 1.26 | 3.27
Secondary Direction | 0.09 | 0.31 | 1.42
Combined | 0.38 | 1.56 | 3.70

TDU MIPS - Silence Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.29 | 1.19 | 3.09
Secondary Direction | 0.09 | 0.29 | 0.48
Combined | 0.38 | 1.48 | 3.30

C64x Target

TDU MIPS - Speech Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.25 | 0.91 | 2.88
Secondary Direction | 0.11 | 0.36 | 0.76
Combined | 0.36 | 1.27 | 3.48

TDU MIPS - Tones Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.25 | 1.00 | 2.91
Secondary Direction | 0.11 | 0.39 | 0.80
Combined | 0.36 | 1.39 | 3.40

TDU MIPS - Silence Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.25 | 0.96 | 2.40
Secondary Direction | 0.11 | 0.35 | 0.60
Combined | 0.36 | 1.31 | 2.99

C64x+ Target

TDU MIPS - Speech Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.22 | 0.62 | 1.82
Secondary Direction | 0.12 | 0.27 | 0.48
Combined | 0.35 | 0.89 | 2.23

TDU MIPS - Tones Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.22 | 0.69 | 1.99
Secondary Direction | 0.12 | 0.29 | 0.52
Combined | 0.35 | 0.98 | 2.30

TDU MIPS - Silence Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.22 | 0.65 | 1.56
Secondary Direction | 0.12 | 0.27 | 0.42
Combined | 0.35 | 0.92 | 1.92


TDU: Module Index

TDU Modules

Here is a list of all modules:
  • Tone Detection Unit
    • Inband relay regeneration
    • Non-MF tone detection ON
    • Non-MF tone detection OFF
    • TDU Instance Slots
    • MF Tone Detection
    • TDU Position
    • Modem Relay
    • Configure Digit Actions
    • Enable Detection Reports
    • MIPS Savings
    • Autocot generation
    • Digit Signalling
    • Signal Interruption
    • Relinquish Memory
    • Lite mode
    • CED early alert control
    • ECO API return codes
    • Exception codes
    • Detection report codes
  • Individual detector contexts
  • Detector context pointers
  • Internal framework table
  • TDU Context


TDU: Page Index

TDU Related Pages

Here is a list of all related documentation pages:
  • Disclaimer


TDU: Signaling Frequency 2600 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

Signaling Frequency 2600 Hz SFD

Description

Part of the legacy CCITT.5 signaling (channel associated signaling) is supervisory tone or signaling frequency at 2600 Hz. If trunks are not in use (on-hook) they have 2600 Hz applied to them. If a trunk is in use (off-hook), the 2600 Hz is removed from the side that is off-hook. The 2600 Hz is therefore known as a supervisory signal, because it indicates the status of a trunk: on hook (tone) or off-hook (no tone).

Four tests need to be passed for an event to be qualified:

  1. Peak frequency test (maximum/minimum frequency range)
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds)
  3. Tone-to-the-rest-of-signal ratio
  4. Qualification time

Internally hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, and hangover time (on-to-off transition). The detection report includes: tone ID, edge (on/off), frequency estimate, power estimate, and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommandations Q.310-Q.332, 1988, and Q.313

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms.

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: SIA

TDU (Tone Detection Unit) Package » Detailed TDU Description » SIA

SIA

Description

SIA stands for Security Industry Association (SIA) Digital Communications The protocol starts with a handshake involving one or two of the three frequencies. The TDU detects the handshake and generate a report upon which the application can decide to take appropriate action (switching to VBD etc)

The handshake comes in three variants

  • DC-02: Pulse and DTMF formats,which involve a sequence of 1400hz and 2300hz
  • DC-03: (See Bell 103)
  • DC-05: Involves a combination of 1400hz(100ms), silence(100ms),and 2300hz(100ms)

The detection report includes Tone ID(TID_SIA), the power, and tone type which assumes the following values 1) TYPE 0 - DC02 PULSE Format 2) TYPE 1 - DC02 DTMF Format 3) TYPE 3 - DC05

Standards Compliance

  1. SIA DC-02-1992.02 (R2000.05)
  2. SIA DC-03-1990.01(R2003.10)
  3. SIA DC-05-1999.09

Limitations

None


TDU: SIA

TDU (Tone Detection Unit) Package » Detailed TDU Description

SIA

Description

This is the same as the SIA detector in the Primary Direction (see SIA).


TDU: SS7 COT 2010 Hz or 1780 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

SS7 COT 2010 Hz or 1780 Hz SFD

Description

Since the bearer path is distinct from the signaling path, SS7 requires a specific means to validate the bearer channel before the call is established. This is accomplished through tonal based handshaking involving both ends.

There are two types of COT tests: Loopback and Transponder. In the 4-wire case, the originating side transmits a 2010 Hz tone. The remote end can establish the loopback, or it can detect the 2010 Hz tone and respond with 2010 Hz tone. In the 2-wire case, the originating side transmits a 2010 Hz tone and the remote end responds with a 1780 Hz tone.

Three tests need to be passed for event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation Q.724, 11-1988, Telephone user part signalling procedures
  2. GR-246-CORE Annex B, 12-1994, Telcordia Technologies Specification of Signalling System Number 7, Annex B

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: Standard Compliance

TDU (Tone Detection Unit) Package

Standard Compliance

Standards

G-Series

  • ITU-T Recommendation G.164, 11-1988, Echo suppressors

  • Recommendation G.165, 03-1993, Echo cancellers

  • Recommendation G.168, 06-2002, Digital network echo cancellers

Q-Series

  • ITU-T Recommendation Q.23, 11-1988, Technical features of push-button telephone sets

  • ITU-T Recommendation Q.24, 11-1988, Multifrequency push-button signal reception

  • ITU-T Recommendation Q.35/E.180, 03-1998, Technical characteristics of tones for the telephone service

  • ITU-T Recommendation Q.323, 11-1988, Multifrequency signal receiving equipment

  • ITU-T Recommendation Q.455, 03-1993, The receiving part of the multifrequency equipment

  • ITU-T Recommendation Q.724, 11-1988, Telephone user part signalling procedures

R-Series

  • ITU-T Recommendation R.35, 1988, Standardization of FMVFT systems for a modulation rate of 50 bauds

T-Series

  • ITU-T Recommendation T.30, 07-2003, Procedures for document facsimile transmission in the general switched telephone network

V-Series

  • ITU-T Recommendation V.8, 11-2000, Procedures for starting sessions of data transmission over the public switched telephone network

  • ITU-T Recommendation V.8bis, 11-2000, Procedures for the identification and selection of common modes of operation between data circuit-terminating equipments (DCEs) and between data terminal equipments (DTEs) over the public switched telephone network and on leased point-to-point telephone-type circuits

  • ITU-T Recommendation V.18, 11-2000, Operational and interworking requirements for DCEs operating in the text telephone mode

  • ITU-T Recommendation V.18, V.18 (2000) Amendment 1, 11-2002, Harmonization with ANSI TIA/EIA-825 (2000) text phones

  • ITU-T Recommendation V.21, 11-1988, 300 bits per second duplex modem standardized for use in the general switched telephone network

  • ITU-T Recommendation V.22, 11-1988, 1200 bits per second duplex modem standardized for use in the general switched telephone network and on point-to-point 2-wire leased telephone-type circuits

  • ITU-T Recommendation V.22bis, 1993, 2400 bits per second duplex modem using the frequency division technique standardized for use on the general switched telephone network and on point-to-point 2-wire leased telephone-type circuits

  • ITU-T Recommendation V.23, 11-1988, 600/1200-baud modem standardized for use in the general switched telephone network

  • ITU-T Recommendation V.25, 10-1996, Automatic answering equipment and general procedures for automatic calling equipment on the general switched telephone network including procedures for disabling of echo control devices for both manually and automatically established calls

  • ITU-T Recommendation V.32bis, 1991, A duplex modem operating at data signalling rates of up to 14 400 bit/s for use on the general switched telephone network and on leased point-to-point 2-wire telephone-type circuits

  • ITU-T Recommendation V.150.1, 01-2003, Modem-over-IP networks: Procedures for the end-to-end connection of V-series DCEs

  • ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band-data over IP networks

Bellcore\/Telcordia Standards

  • GR-30-CORE, CLASS Feature: Calling Number Delivery FSD 01-02-1051, Bellcore, December 1994

  • GR-506, 06-1996, LSSGR: Signaling for Analog Interfaces

  • GR-246-CORE Annex B, 12-1994, Telcordia Technologies Specification of Signalling System Number 7, Annex B

  • Bell 103 - Asynchronous data transmission, full-duplex operation over 2-wire dialup or leased lines; 300-bps data rate

  • Bell 212 A - Synchronous/ asynchronous data transmission, full-duplex operation over 2-wire leased or dialup lines; 1200-bps data rate


TDU: tduCallTable_t Struct Reference

  • Data Structures
  • Data Fields

tduCallTable_t Struct Reference

#include <tdu.h>

Detailed Description

Definition at line 1554 of file tdu.h.

Data Fields

void(* | tduClose )(void *tduInst)
void(* | tduControl )(void *tduInst, tint c_code, tduCfgCtl_t *cfg)
void(* | tduDelete )(void **tduInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | tduGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, tduSizeConfig_t *cfg)
tint(* | tduNew )(void **tduInst, tint nbufs, ecomemBuffer_t *bufs, tduNewConfig_t *cfg)
void(* | tduOpen )(void *tduInst, tduConfig_t *cfg)
tbool(* | tduSendIn )(void *tduInst, void *samples, tduTxLocation_t location)
void(* | tduReceiveIn )(void *tduInst, void *samples, tduRxLocation_t location)

Field Documentation

void(* tduCallTable_t::tduClose)(void *tduInst)

void(* tduCallTable_t::tduControl)(void *tduInst, tint c_code, tduCfgCtl_t *cfg)

void(* tduCallTable_t::tduDelete)(void **tduInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* tduCallTable_t::tduGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, tduSizeConfig_t *cfg)

tint(* tduCallTable_t::tduNew)(void **tduInst, tint nbufs, ecomemBuffer_t *bufs, tduNewConfig_t *cfg)

void(* tduCallTable_t::tduOpen)(void *tduInst, tduConfig_t *cfg)

tbool(* tduCallTable_t::tduSendIn)(void *tduInst, void *samples, tduTxLocation_t location)

void(* tduCallTable_t::tduReceiveIn)(void *tduInst, void *samples, tduRxLocation_t location)

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduCfgCtl_t Struct Reference

  • Data Structures
  • Data Fields

tduCfgCtl_t Struct Reference
[Tone Detection Unit]

#include <tdu.h>

Collaboration diagram for tduCfgCtl_t:

[legend]

Detailed Description

Configuration structure passed to TDU through tduControl() API. This contains several unionized substructures. Each substructure is used with a specific control code in a specific use case/call flow.

Definition at line 696 of file tdu.h.

Data Fields

union {
tduMfCfgCtl_t mf
tduCfgCtlStd_t std
tduCptCfgCtl_t cpt
tduSfdPeek_t peek
tduDigitFilterCfgCtl_t dfilt
tduQueryState_t state
tduToneFilterCfgCtl_t tfilt
tduMfState_t * mfstate
tduTxDelayLine_t tx_delay_line
tduPosition_t position
tuint lite
tbool digit_sent
} u

Field Documentation

tduMfCfgCtl_t tduCfgCtl_t::mf

MF detection configuration structure

Definition at line 698 of file tdu.h.

tduCfgCtlStd_t tduCfgCtl_t::std

Single frequency detector configuration structure

Definition at line 700 of file tdu.h.

tduCptCfgCtl_t tduCfgCtl_t::cpt

Call progress tone detector configuration structure

Definition at line 703 of file tdu.h.

tduSfdPeek_t tduCfgCtl_t::peek

Structure for querying TDU's internal configuration for SS7 COT and SS7 COR detectors

Definition at line 706 of file tdu.h.

tduDigitFilterCfgCtl_t tduCfgCtl_t::dfilt

Structure for filtering digit reports upon digit detection

Definition at line 710 of file tdu.h.

tduQueryState_t tduCfgCtl_t::state

Structure used by TDU to report its internal state

Definition at line 713 of file tdu.h.

tduToneFilterCfgCtl_t tduCfgCtl_t::tfilt

Configuration structure to enable/disable tone reports

Definition at line 716 of file tdu.h.

tduMfState_t* tduCfgCtl_t::mfstate

Structure for saving/restoring MF detector configuration parameters

Definition at line 719 of file tdu.h.

tduTxDelayLine_t tduCfgCtl_t::tx_delay_line

Structure used by TDU to return pointer to memory relinquished

Definition at line 722 of file tdu.h.

tduPosition_t tduCfgCtl_t::position

Structure used to used to set position of TDU in system

Definition at line 725 of file tdu.h.

tuint tduCfgCtl_t::lite

field that indicates TDU's mode in response to tdu_CTL_GET_LITE control code
Value 0: Full mode, Value non-zero: Lite mode

Definition at line 728 of file tdu.h.

tbool tduCfgCtl_t::digit_sent

TODO: what is this used for?

Definition at line 731 of file tdu.h.

union { ... } tduCfgCtl_t::u

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduCfgCtlStd_s Struct Reference

  • Data Structures
  • Data Fields

tduCfgCtlStd_s Struct Reference
[Tone Detection Unit]

#include <tdu.h>

Detailed Description

Single frequency detector configuration structure. Use case: Non-MF tone detection ON.

Definition at line 100 of file tdu.h.

Data Fields

Fract | toneOnEnergy
Fract | toneOnSnr
tuint | toneOnConfirmDuration

Field Documentation

Fract tduCfgCtlStd_s::toneOnEnergy

minimum signal power for tone detection (dBm Q0, converted to Q4)

Definition at line 101 of file tdu.h.

Fract tduCfgCtlStd_s::toneOnSnr

minimum signal to noise ratio (dB Q0.15 converted to dB Q4

Definition at line 103 of file tdu.h.

tuint tduCfgCtlStd_s::toneOnConfirmDuration

minimum duration for tone ON confirmation

Definition at line 105 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduConfig_t Struct Reference

  • Data Structures
  • Data Fields

tduConfig_t Struct Reference

#include <tdu.h>

Detailed Description

Configuration structure passed to tduOpen() API.

Definition at line 1351 of file tdu.h.

Data Fields

tint frame_size

Field Documentation

tint tduConfig_t::frame_size

actual frame size for TDU to use at real-time

Definition at line 1352 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduContext_s Struct Reference

  • Data Structures
  • Data Fields

tduContext_s Struct Reference
[TDU Context, TDU Context]

#include <tdu.h>

Detailed Description

Definition at line 1290 of file tdu.h.

Data Fields

void(* | tdu_send_out )(tuint ID, tint repCode, tint on_off, tint time, tint power_dBm0, tduCptSmartRep_t *cpt_report)
Call out function for TDU to report tone detection event.
void(* | baudotReport )(tuint ID, tint repCode, tint delayLineLen, void *delayLine)
Call out function for TDU to report Baudot early warning event.
tint(* | digit_echo )(tuint ID, tint repCode, LFract linPower)
void *(* | gmpCreate )(tuint input_ID, tuint mode)
Creates Dynamic memory handle- if set to NULL static memory will be used.
void(* | gmpDelete )(tuint input_ID, void *gmp_ptr)
Deletes Dynamic memory handle- if set to NULL static memory will be used.
void(* | gmpWrite )(tuint input_ID, void *gmp_ptr, void *src_in, tint records_to_copy)
Writes to Dynamic memory handle - if set to NULL static memory will be used.
tint(* | gmpRead )(tuint input_ID, void *gmp_ptr, void *dst_out, tint records_to_copy)
Reads from Dynamic memory handle - if set to NULL static memory will be used.
void *(* | gmpAllocGmc )(tuint MID)
Request 44 bytes of memory for C55x and 80 Bytes for C64x - !!! Do not set it to NULL.
tbool(* | gmpFreeGmc )(tuint MID, void *ptr)
Frees allocated memory - !!! Do not set it to NULL.
dbgInfo_t | debugInfo
Call out function for debug/exceptions.
tuint | tduRxSaveSize
Internal use. Must be initialized to 0.
tint | detNum
Internal use. Must be initialized to 0.
tint | detNumSFDF
Internal use. Must be initialized to 0.
tint | detNumSFDT
Internal use. Must be initialized to 0.
linSample * | work_buf
Internal use. Must be initialized to NULL.
linSample * | local_buf
Internal use. Must be initialized to NULL.
LFract * | magnitudes
Internal use. Must be initialized to NULL.
tuint | detInstVec [tdu_MAX_SLOT]
Internal use. Must be initialized to 0.

Field Documentation

void(* tduContext_s::tdu_send_out)(tuint ID, tint repCode, tint on_off, tint time, tint power_dBm0, tduCptSmartRep_t *cpt_report)

Call out function for TDU to report tone detection event.

void(* tduContext_s::baudotReport)(tuint ID, tint repCode, tint delayLineLen, void *delayLine)

Call out function for TDU to report Baudot early warning event.

tint(* tduContext_s::digit_echo)(tuint ID, tint repCode, LFract linPower)

void*(* tduContext_s::gmpCreate)(tuint input_ID, tuint mode)

Creates Dynamic memory handle- if set to NULL static memory will be used.

void(* tduContext_s::gmpDelete)(tuint input_ID, void *gmp_ptr)

Deletes Dynamic memory handle- if set to NULL static memory will be used.

void(* tduContext_s::gmpWrite)(tuint input_ID, void *gmp_ptr, void *src_in, tint records_to_copy)

Writes to Dynamic memory handle - if set to NULL static memory will be used.

tint(* tduContext_s::gmpRead)(tuint input_ID, void *gmp_ptr, void *dst_out, tint records_to_copy)

Reads from Dynamic memory handle - if set to NULL static memory will be used.

void*(* tduContext_s::gmpAllocGmc)(tuint MID)

Request 44 bytes of memory for C55x and 80 Bytes for C64x - !!! Do not set it to NULL.

tbool(* tduContext_s::gmpFreeGmc)(tuint MID, void *ptr)

Frees allocated memory - !!! Do not set it to NULL.

dbgInfo_t tduContext_s::debugInfo

Call out function for debug/exceptions.

Definition at line 1315 of file tdu.h.

tuint tduContext_s::tduRxSaveSize

Internal use. Must be initialized to 0.

Definition at line 1318 of file tdu.h.

tint tduContext_s::detNum

Internal use. Must be initialized to 0.

Definition at line 1321 of file tdu.h.

tint tduContext_s::detNumSFDF

Internal use. Must be initialized to 0.

Definition at line 1324 of file tdu.h.

tint tduContext_s::detNumSFDT

Internal use. Must be initialized to 0.

Definition at line 1328 of file tdu.h.

linSample* tduContext_s::work_buf

Internal use. Must be initialized to NULL.

Definition at line 1332 of file tdu.h.

linSample* tduContext_s::local_buf

Internal use. Must be initialized to NULL.

Definition at line 1336 of file tdu.h.

LFract* tduContext_s::magnitudes

Internal use. Must be initialized to NULL.

Definition at line 1339 of file tdu.h.

tuint tduContext_s::detInstVec[tdu_MAX_SLOT]

Internal use. Must be initialized to 0.

Definition at line 1342 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduCptCfgCtl_t Struct Reference

  • Data Structures
  • Data Fields

tduCptCfgCtl_t Struct Reference
[Tone Detection Unit]

#include <tdu.h>

Collaboration diagram for tduCptCfgCtl_t:

[legend]

Detailed Description

Call progress tone detector configuration structure. Use case: Non-MF tone detection ON.

Definition at line 113 of file tdu.h.

Data Fields

tduCfgCtlStd_t std
Fract | startFreq
Fract | endFreq

Field Documentation

tduCfgCtlStd_t tduCptCfgCtl_t::std

Single frequency detector configuration structure"

Definition at line 114 of file tdu.h.

Fract tduCptCfgCtl_t::startFreq

Start frequency of target CPT energy band

Definition at line 116 of file tdu.h.

Fract tduCptCfgCtl_t::endFreq

End frequency of target CPT energy band

Definition at line 117 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduCptSmartRep_t Struct Reference

  • Data Structures
  • Data Fields

tduCptSmartRep_t Struct Reference
[Tone Detection Unit]

#include <tdu.h>

Detailed Description

additional information about TDU detection event. This structure is shared by several detectors inside TDU.

Definition at line 928 of file tdu.h.

Data Fields

tint | freq1
tint | tone1bw
tint | freq2
tint | tone2bw

Field Documentation

tint tduCptSmartRep_t::freq1

For non-CPT reports this value is 0

Definition at line 929 of file tdu.h.

tint tduCptSmartRep_t::tone1bw

If single tone is detected, this parameter is set to 1 * If two (or more) tones are closely spaced around freq1, * it is set to 2

Definition at line 930 of file tdu.h.

tint tduCptSmartRep_t::freq2

In case of single tone event, reserved value is 0

Definition at line 934 of file tdu.h.

tint tduCptSmartRep_t::tone2bw

If single tone is detected, this parameter is set to 1 * If two (or more) tones are closely spaced around freq2, * it is set to 2

Definition at line 936 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduDetContext_t Struct Reference

  • Data Structures
  • Data Fields

tduDetContext_t Struct Reference
[Individual detector contexts]

#include <tdu.h>

Detailed Description

This is the definition of detector context structure. Usage information of this structure is at Individual detector contexts.

Note that since TDU defines detector contexts of individual detectors, system does not need to worry about the structure details. System just needs to populate the constant array tduDetContexts with pointers to individual detector contexts.

Definition at line 972 of file tdu.h.

Data Fields

tint | detId
tint | tableId_dir
tint | detSlot
tuint | slotInstSize
tint | c_code_on
tint | c_code_off
tint * | params

Field Documentation

tint tduDetContext_t::detId

Identification of detector

Definition at line 973 of file tdu.h.

tint tduDetContext_t::tableId_dir

Id of table used to operate this detector bit 3 - bit 0 : tableId; bit 7 - bit 4 : reserved; bit 9 - bit 8 : direction of the detector bit 15 - bit 10: reserved;

Definition at line 974 of file tdu.h.

tint tduDetContext_t::detSlot

Run-time slot for this detector

Definition at line 984 of file tdu.h.

tuint tduDetContext_t::slotInstSize

Size in words, necessary to contain all instance information for this specific detector.

Definition at line 985 of file tdu.h.

tint tduDetContext_t::c_code_on

Control code to switch on the detector

Definition at line 988 of file tdu.h.

tint tduDetContext_t::c_code_off

Control code to switch off the detector

Definition at line 989 of file tdu.h.

tint* tduDetContext_t::params

Pointer to an area of paramaters

Definition at line 990 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduDigitFilterCfgCtl_s Struct Reference

  • Data Structures
  • Data Fields

tduDigitFilterCfgCtl_s Struct Reference
[Configure Digit Actions]

#include <tdu.h>

Detailed Description

Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions.

Definition at line 404 of file tdu.h.

Data Fields

tuint | filter_bfield
tuint | long_digit_bfield
tuint | long_digit_hangover

Field Documentation

tuint tduDigitFilterCfgCtl_s::filter_bfield

Type of digit filtering:

 *-----------------------------------------------------------------------
 * Bit field: filter_bfield (0 - indicates TNI default operation)
 *-----------------------------------------------------------------------
 *
 * Various types/classes are:
 * Number  - N [DTMF digits 0-9, MF all digits]
 * Letter  - L [DTMF digits A-D]
 * Star    - * [DTMF digit *]
 * Hash    - # [DTMF digit #]
 * Long digits - LO [Events of duration longer than defined]
 *
 * filter_bfield;
 *
 *   15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 *  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 *  |TRGR EVENT |     Reserved      |    ON Report  |   OFF Report  |
 *  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 *  |TLO|TOF|TON|                   | # | * | L | N | # | * | L | N |
 *  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 *
 * Report Types:
 *  Trigger Select Bits
 *    TON:  [1: Upon a trigger event, All ON reports enabled]
 *          [0: Trigger disabled]
 *    TOF:  [1: Upon a trigger event, All OFF reports enabled]
 *          [0: Trigger disabled]
 *    TLO:  [1: Upon a trigger event, All LONG reports enabled]
 *          [0: Trigger disabled]
 *
 *  ON Report, OFF Report
 *  If 1 : All event/digit reports suppressed
 *     0 : Event/digit reports enabled and is a trigger event
 *----------------------------------------------------------------------
 *

Definition at line 405 of file tdu.h.

tuint tduDigitFilterCfgCtl_s::long_digit_bfield

Long digit reporting bitmap:

 *-------------------------------------------------------------------------------
 * Bit field: long_digit_bfield (0 - indicates TNI default operation)
 *-------------------------------------------------------------------------------
 * Bit  0 - Tone ID  0, long digit  0 is not reported (0) / reported (1)
 * Bit  1 - Tone ID  1, long digit  1 is not reported (0) / reported (1)
 * Bit  2 - Tone ID  2, long digit  2 is not reported (0) / reported (1)
 * ...      ...
 * Bit 14 - Tone ID 14, long digit 14 is not reported (0) / reported (1)
 * Bit 15 - Tone ID 15, long digit 15 is not reported (0) / reported (1)
 *-------------------------------------------------------------------------------
 *

Definition at line 441 of file tdu.h.

tuint tduDigitFilterCfgCtl_s::long_digit_hangover

Time to elapse (ms) before long digit event is reported

Definition at line 454 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduIntFwTable_t Struct Reference

  • Data Structures
  • Data Fields

tduIntFwTable_t Struct Reference
[Internal framework table]

#include <tdu.h>

Collaboration diagram for tduIntFwTable_t:

[legend]

Detailed Description

Internal framework call table.

Definition at line 1172 of file tdu.h.

Data Fields

tduTable_t sfdf
tduTable_t sfdt
tduTable_t mf
tduTable_t cpt
tduTable_t v21
tduTable_t bdtew
void(* | mf_cidcas_ctl )(tduCfgCtl_t *cfg, void *inst)
void(* | sfd_llmr_ANSam_reset )(tint toneType, Fract tone_db_power, void *inst)
void(* | sfd_llmr_ANSam )(tint toneType, Fract tone_db_power, void *inst)
tbool(* | sfd_llmr_ANSam_test )(tint toneType, void *inst)
void(* | mf_v8bis_fs_ctl )(tduCfgCtl_t *cfg, void *inst)
void(* | digit_filter )(void *tduInst, tbool dtmf_mf, tint *toneId, tint *on_off)
void(* | voice_disc )(void *tduInst)
void(* | voice_disc_ctl )(void *tduInst, tint c_code, tduCfgCtl_t *cfg)
void(* | bellTid )(tint *tid, tint freq)
void(* | mf_coin_tones_ctl )(tduCfgCtl_t *cfg, void *inst)

Field Documentation

tduTable_t tduIntFwTable_t::sfdf

Single frequency detector (from TDM) call table

Definition at line 1173 of file tdu.h.

tduTable_t tduIntFwTable_t::sfdt

Single frequency detector (from Network) call table

Definition at line 1174 of file tdu.h.

tduTable_t tduIntFwTable_t::mf

MF detector call table

Definition at line 1175 of file tdu.h.

tduTable_t tduIntFwTable_t::cpt

CPT detector call table

Definition at line 1176 of file tdu.h.

tduTable_t tduIntFwTable_t::v21

V21 flags detector call table

Definition at line 1177 of file tdu.h.

tduTable_t tduIntFwTable_t::bdtew

Baudot early warning detector call table

Definition at line 1178 of file tdu.h.

void(* tduIntFwTable_t::mf_cidcas_ctl)(tduCfgCtl_t *cfg, void *inst)

CID CAS internal control function

void(* tduIntFwTable_t::sfd_llmr_ANSam_reset)(tint toneType, Fract tone_db_power, void *inst)

ANSAM internal reset function

void(* tduIntFwTable_t::sfd_llmr_ANSam)(tint toneType, Fract tone_db_power, void *inst)

ANSAM internal function

tbool(* tduIntFwTable_t::sfd_llmr_ANSam_test)(tint toneType, void *inst)

ANSAM internal test function

void(* tduIntFwTable_t::mf_v8bis_fs_ctl)(tduCfgCtl_t *cfg, void *inst)

V.8bis (first segment) internal control function

void(* tduIntFwTable_t::digit_filter)(void *tduInst, tbool dtmf_mf, tint *toneId, tint *on_off)

Digit filter internal function

void(* tduIntFwTable_t::voice_disc)(void *tduInst)

Voice discrimination internal process function

void(* tduIntFwTable_t::voice_disc_ctl)(void *tduInst, tint c_code, tduCfgCtl_t *cfg)

Voice discrimination internal control function

void(* tduIntFwTable_t::bellTid)(tint *tid, tint freq)

Bell (2250Hz, 2250Hz) detector internal function

void(* tduIntFwTable_t::mf_coin_tones_ctl)(tduCfgCtl_t *cfg, void *inst)

Coin tones detector internal control function

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduMfCfgCtl_t Struct Reference

  • Data Structures
  • Data Fields

tduMfCfgCtl_t Struct Reference
[MF Tone Detection]

#include <tdu.h>

Detailed Description

MF detection configuration structure. Use case: MF tone detection.

Definition at line 305 of file tdu.h.

Data Fields

Fract | freqPowThreshLow
Fract | freqPowThreshHigh
Fract | twistNegative
Fract | twistPositive
Fract | breakThresh

Field Documentation

Fract tduMfCfgCtl_t::freqPowThreshLow

Minimum power level threshold for each freq (dBm)

Definition at line 306 of file tdu.h.

Fract tduMfCfgCtl_t::freqPowThreshHigh

Maximum power level threshold for each freq (dBm)

Definition at line 308 of file tdu.h.

Fract tduMfCfgCtl_t::twistNegative

Maximum power level difference (dB) between lower and higher group frequencies

Definition at line 310 of file tdu.h.

Fract tduMfCfgCtl_t::twistPositive

Maximum power level difference (dB) between higher and lower group frequencies

Definition at line 313 of file tdu.h.

Fract tduMfCfgCtl_t::breakThresh

Threshold of signal power (dBm) for break detection

Definition at line 316 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduMfState_t Struct Reference

  • Data Structures
  • Data Fields

tduMfState_t Struct Reference
[Digit Signalling]

#include <tdu.h>

Detailed Description

Structure used for saving/restoring MF detector configuration parameters Use case: Digit Signalling.

Definition at line 584 of file tdu.h.

Data Fields

LFract | freq_pow_thresh_low
LFract | freq_pow_thresh_high
void * | params
tuint | bfield1
tint | switched

Field Documentation

LFract tduMfState_t::freq_pow_thresh_low

Internal field. Used in save/restore process by TDU

Definition at line 585 of file tdu.h.

LFract tduMfState_t::freq_pow_thresh_high

Internal field. Used in save/restore process by TDU

Definition at line 587 of file tdu.h.

void* tduMfState_t::params

Internal field. Used in save/restore process by TDU

Definition at line 589 of file tdu.h.

tuint tduMfState_t::bfield1

Internal field. Used in save/restore process by TDU

Definition at line 591 of file tdu.h.

tint tduMfState_t::switched

Internal field. Used in save/restore process by TDU

Definition at line 593 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

tduNewConfig_t Struct Reference

#include <tdu.h>

Collaboration diagram for tduNewConfig_t:

[legend]

Detailed Description

Configuration structure for creation of TDU instance. This structure is passed to tduNew() API. It contains unique ID in the system to be used for this TDU instance.

Definition at line 1372 of file tdu.h.

Data Fields

tuint ID
tduSizeConfig_t sizeCfg

Field Documentation

tuint tduNewConfig_t::ID

Unique ID to be used for TDU instance

Definition at line 1373 of file tdu.h.

tduSizeConfig_t tduNewConfig_t::sizeCfg

See tduSizeConfig_t

Definition at line 1374 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduPosition_t Struct Reference

  • Data Structures
  • Data Fields

tduPosition_t Struct Reference
[TDU Position]

#include <tdu.h>

Detailed Description

Configuration structure for setting position of TDU in system. Use case: TDU Position.

Definition at line 341 of file tdu.h.

Data Fields

tuint | valid_bitfield
tuint | value_bitfield

Field Documentation

tuint tduPosition_t::valid_bitfield

bitfield where bits are set to indicate what position parameter is being changed in this call to tduControl()

Definition at line 351 of file tdu.h.

tuint tduPosition_t::value_bitfield

bitfield where bits are set to indicate new values for position parameters. Look at: valid_bitfield

Definition at line 369 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduQueryState_t Struct Reference

  • Data Structures
  • Data Fields

tduQueryState_t Struct Reference
[Digit Signalling]

#include <tdu.h>

Detailed Description

Structure used by TDU to report its internal state in response to tdu_CTL_QUERY_STATE control code Use case: Digit Signalling.

Definition at line 572 of file tdu.h.

Data Fields

tulong | detState
tulong | hot_detectors
tulong | active_tone_reports

Field Documentation

tulong tduQueryState_t::detState

bitfield indicating which detectors are enabled

Definition at line 573 of file tdu.h.

tulong tduQueryState_t::hot_detectors

bitfield indicating which detectors are in in progress

Definition at line 575 of file tdu.h.

tulong tduQueryState_t::active_tone_reports

bitfield indicating which tone detection reports are enabled

Definition at line 577 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduRepStats_s Struct Reference

  • Data Structures
  • Data Fields

tduRepStats_s Struct Reference

#include <tdu.h>

Detailed Description

TDU reporting statistics structure. This structure is passed to the tduGetStats() API function. It contains false detection statistics.

Definition at line 1402 of file tdu.h.

Data Fields

tuint FalseAlert

Field Documentation

tuint tduRepStats_s::FalseAlert

False alert stats bit fields bit 7 - bit 0 : falseAlertCnt; bit 8 - bit 13 : reserved; bit 14 - bit 15 : last_on_off_flag

Definition at line 1403 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduSfdPeek_t Struct Reference

  • Data Structures
  • Data Fields

tduSfdPeek_t Struct Reference
[Autocot generation]

#include <tdu.h>

Collaboration diagram for tduSfdPeek_t:

[legend]

Detailed Description

Structure for querying and returning TDU's internal configuration for SS7 COT and SS7 COR detectors. Use case: Autocot generation.

Definition at line 521 of file tdu.h.

Data Fields

tint | slot
tuint | operation
tduCfgCtlStd_t std

Field Documentation

tint tduSfdPeek_t::slot

Slot number for which configuration is requested TODO: Do not use slot number. Internal detail

Definition at line 524 of file tdu.h.

tuint tduSfdPeek_t::operation

Bit poistions:

  • tdu_POSITION_TXRX_CHANGED
  • tdu_POSITION_PRI_ACBC_CHANGED
  • tdu_POSITION_SEC_ACBC_CHANGED

Definition at line 526 of file tdu.h.

tduCfgCtlStd_t tduSfdPeek_t::std

Structure for TDU to return configuration data to the system: tduCfgCtlStd_t

Definition at line 535 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduSizeConfig_t Struct Reference

  • Data Structures
  • Data Fields

tduSizeConfig_t Struct Reference

#include <tdu.h>

Detailed Description

Size configuration structure. This structure is passed to tduGetSizes() and tduNew() APIs. It contains the worst case input frame length, and whether TDU is being instantiated in lite mode or full mode.

Definition at line 1361 of file tdu.h.

Data Fields

tint | maxSamplesPerFrame
tuint | lite

Field Documentation

tint tduSizeConfig_t::maxSamplesPerFrame

Input frame length

Definition at line 1362 of file tdu.h.

tuint tduSizeConfig_t::lite

Is TDU lite or full?

Definition at line 1365 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduTable_t Struct Reference

  • Data Structures
  • Data Fields

tduTable_t Struct Reference
[Internal framework table]

#include <tdu.h>

Detailed Description

call table definition for control and process funcitons of individual detectors

Definition at line 1166 of file tdu.h.

Data Fields

tbool(* | Control )(void *tduInst, tint c_code, tduCfgCtl_t *cfg)
void(* | Process )(void *tduInst, linSample *samples, void *alert)

Field Documentation

tbool(* tduTable_t::Control)(void *tduInst, tint c_code, tduCfgCtl_t *cfg)

control function

void(* tduTable_t::Process)(void *tduInst, linSample *samples, void *alert)

process function

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduToneFilterCfgCtl_t Struct Reference

  • Data Structures
  • Data Fields

tduToneFilterCfgCtl_t Struct Reference
[Enable Detection Reports]

#include <tdu.h>

Detailed Description

Configuration structure to enable/disable tone detection reports Use case: Enable Detection Reports.

Definition at line 474 of file tdu.h.

Data Fields

tulong | reports_bfield
tulong | changed_bfield

Field Documentation

tulong tduToneFilterCfgCtl_t::reports_bfield

bitfield where bits are set to indicate which tone reports are enabled. Look at: changed_bfield.

Definition at line 475 of file tdu.h.

tulong tduToneFilterCfgCtl_t::changed_bfield

bitfield where bits are set to indicate which tone reports are being changed in this call to tduControl()

Definition at line 478 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tduTxDelayLine_t Struct Reference

  • Data Structures
  • Data Fields

tduTxDelayLine_t Struct Reference
[Relinquish Memory]

#include <tdu.h>

Detailed Description

Structure used by TDU to return pointer to memory relinquished (TDU's internal delay line buffer) Use case: Relinquish Memory.

Definition at line 647 of file tdu.h.

Data Fields

void * | base
tint | length

Field Documentation

void* tduTxDelayLine_t::base

pointer to the base of TDU delay line buffer

Definition at line 648 of file tdu.h.

tint tduTxDelayLine_t::length

length of TDU delay line in 16-bit words

Definition at line 649 of file tdu.h.

The documentation for this struct was generated from the following file:
  • tdu.h


TDU: tdu.h File Reference

  • File List
  • Globals

tdu.h File Reference

Detailed Description

Contains definitions and external APIs for TDU.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file tdu.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/utl.h>

Include dependency graph for tdu.h:

Go to the source code of this file.

Data Structures

struct | tduCfgCtlStd_s
Single frequency detector configuration structure. Use case: Non-MF tone detection ON. More...
struct | tduCptCfgCtl_t
Call progress tone detector configuration structure. Use case: Non-MF tone detection ON. More...
struct | tduMfCfgCtl_t
MF detection configuration structure. Use case: MF tone detection. More...
struct | tduPosition_t
Configuration structure for setting position of TDU in system. Use case: TDU Position. More...
struct | tduDigitFilterCfgCtl_s
Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions. More...
struct | tduToneFilterCfgCtl_t
Configuration structure to enable/disable tone detection reports Use case: Enable Detection Reports. More...
struct | tduSfdPeek_t
Structure for querying and returning TDU's internal configuration for SS7 COT and SS7 COR detectors. Use case: Autocot generation. More...
struct | tduQueryState_t
Structure used by TDU to report its internal state in response to tdu_CTL_QUERY_STATE control code Use case: Digit Signalling. More...
struct | tduMfState_t
Structure used for saving/restoring MF detector configuration parameters Use case: Digit Signalling. More...
struct | tduTxDelayLine_t
Structure used by TDU to return pointer to memory relinquished (TDU's internal delay line buffer) Use case: Relinquish Memory. More...
struct | tduCfgCtl_t
Configuration structure passed to TDU through tduControl() API. This contains several unionized substructures. Each substructure is used with a specific control code in a specific use case/call flow. More...
struct | tduCptSmartRep_t
additional information about TDU detection event. This structure is shared by several detectors inside TDU. More...
struct | tduDetContext_t
This is the definition of detector context structure. Usage information of this structure is at Individual detector contexts. More...
struct | tduTable_t
call table definition for control and process funcitons of individual detectors More...
struct | tduIntFwTable_t
Internal framework call table. More...
struct | tduContext_s
struct | tduConfig_t
Configuration structure passed to tduOpen() API. More...
struct | tduSizeConfig_t
Size configuration structure. This structure is passed to tduGetSizes() and tduNew() APIs. It contains the worst case input frame length, and whether TDU is being instantiated in lite mode or full mode. More...
struct | tduNewConfig_t
Configuration structure for creation of TDU instance. This structure is passed to tduNew() API. It contains unique ID in the system to be used for this TDU instance. More...
struct | tduRepStats_s
TDU reporting statistics structure. This structure is passed to the tduGetStats() API function. It contains false detection statistics. More...
struct | tduCallTable_t

Digit Actions

#define | tdu_CTL_DIGIT_FILTER 110
typedef tduDigitFilterCfgCtl_s | tduDigitFilterCfgCtl_t
Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions.

Single frequency detectors - from Network

#define | tdu_SFDT_DET_NONE_RX 0
#define | tdu_SFDT_DET_V23FW_MARKS_RX 1
#define | tdu_SFDT_DET_SS7COT_RX 2
#define | tdu_SFDT_DET_V25_RX 3
#define | tdu_SFDT_DET_2225_2250_2300_RX 4
#define | tdu_SFDT_DET_2225_RX 4
#define | tdu_SFDT_DET_2250_RX 5
#define | tdu_SFDT_DET_V18A_RX 6
#define | tdu_SFDT_DET_V18A_S_RX 7
#define | tdu_SFDT_DET_V21LOW_MARKS_RX 8
#define | tdu_SFDT_DET_V21LOW_S_RX 9
#define | tdu_SFDT_DET_CIDCAS_RX 10
#define | tdu_SFDT_DET_CASL_RX 10
#define | tdu_SFDT_DET_CASH_RX 11
#define | tdu_SFDT_DET_SIA_RX 6
#define | tdu_SFDT_DET_SIA_S_RX 7
const tduDetContext_t | tduIncV23FW_MARKS_T
const tduDetContext_t | tduIncSS7COT_T
const tduDetContext_t | tduIncV25_T_RX
const tduDetContext_t | tduIncV25RX_DUMMY_T
const tduDetContext_t | tduIncBELLRX1_T
const tduDetContext_t | tduIncBELLRX2_T
const tduDetContext_t | tduIncV21LOW_MARKS_T
const tduDetContext_t | tduIncSFDT_DUMMY1_T
const tduDetContext_t | tduIncSFDT_DUMMY2_T
const tduDetContext_t | tduIncSFDT_DUMMY3_T

Defines

#define | tdu_TX_DELAY_BUF_NUM 3
#define | tdu_CTL_MF_STD_ON 0
#define | tdu_CTL_MF_STD_OFF 1
#define | tdu_CTL_THRE_MIN 2
#define | tdu_DET_ID_DTMF 0
#define | tdu_DET_ID_R1 1
#define | tdu_DET_ID_R2FW 2
#define | tdu_DET_ID_R2BW 3
#define | tdu_DET_ID_V21 4
#define | tdu_DET_ID_CPT 5
#define | tdu_DET_ID_MODEMDISC 6
#define | tdu_DET_ID_V18A 7
#define | tdu_DET_ID_SS7COT 8
#define | tdu_DET_ID_SF 9
#define | tdu_DET_ID_CNG 10
#define | tdu_DET_ID_TT1khz 11
#define | tdu_DET_ID_SS7COR 12
#define | tdu_DET_ID_CIDCAS 13
#define | tdu_DET_ID_CASL 14
#define | tdu_DET_ID_CASH 15
#define | tdu_DET_ID_V8BIS_FS 16
#define | tdu_DET_ID_CRE2 17
#define | tdu_DET_ID_V25LLMR 18
#define | tdu_DET_ID_COIN_TONES 19
#define | tdu_DET_ID_SIA 20
#define | tdu_DET_ID_NONE 255
#define | tdu_POSITION_TXRX_CHANGED 0x0001
#define | tdu_POSITION_PRI_ACBC_CHANGED 0x0002
#define | tdu_POSITION_SEC_ACBC_CHANGED 0x0004
#define | tdu_POSITION_TYPE 0x0008
#define | tdu_POSITION_MF_TESTS_CHANGED 0x0030
#define | tdu_POSITION_RX 0x0001
#define | tdu_POSITION_PRI_AC 0x0002
#define | tdu_POSITION_SEC_AC 0x0004
#define | tdu_POSITION_MF_TESTS_SHIFT 4
#define | tdu_POSITION_MF_TESTS_STEP_RISE 0x0010
#define | tdu_POSITION_MF_TESTS_PREDIGIT_SNR 0x0020
#define | tdu_SLOT_SS7COT 6
#define | tdu_SLOT_SS7COR 10
#define | tdu_OPERATION_DIR_MASK 0x07
#define | tdu_OPERATION_ENABLED 0x08
#define | tdu_CTL_MF_RELAY_OFF 130
#define | tdu_CTL_NONE 255
#define | tdu_DET_TABLEID_MASK 0x000f
#define | tdu_DET_TXDIR 0x0100
#define | tdu_DET_RXDIR 0x0200
#define | tdu_DET_DIR_MASK 0x0300
#define | tdu_SIZECFG_LITE 1
#define | tdu_SIZECFG_FULL 0
#define | tdu_FALSE_ALERT_CNT_MASK 0x00FF
#define | tdu_SET_FALSE_ALERT_CNT(x, v) (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 0, 8))
#define | tdu_GET_FALSE_ALERT_CNT(x) (utlGetBitfield((x)->tduRepStats.FalseAlert, 0, 8))
#define | tdu_SET_ON_OFF_FLAG(x, v) (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 14, 2))
#define | tdu_GET_ON_OFF_FLAG(x) (utlGetBitfield((x)->tduRepStats.FalseAlert, 14, 2))
Non-MF Tone Detection Enable Codes
#define | tdu_CTL_ON_FIRST 2
#define | tdu_CTL_V21_ON 2
#define | tdu_CTL_V25_ON 3
#define | tdu_CTL_RSVD1 4
#define | tdu_CTL_CPT_ON 5
#define | tdu_CTL_V18A_ON 6
#define | tdu_CTL_SS7COT_ON 7
#define | tdu_CTL_SF_ON 8
#define | tdu_CTL_CNG_ON 9
#define | tdu_CTL_SS7COR_ON 10
#define | tdu_CTL_TT1khz_ON 11
#define | tdu_CTL_MF_CIDCAS_ON 12
#define | tdu_CTL_SFDT_CIDCAS_ON 13
#define | tdu_CTL_CIDCAS_ALL_ON 14
#define | tdu_CTL_RSVD2 15
#define | tdu_CTL_CRE_ON 16
#define | tdu_CTL_MF_CRE1_ON 17
#define | tdu_CTL_CRE2_ON 18
#define | tdu_CTL_BELL_ON 19
#define | tdu_CTL_V8BIS_TONES_ON 20
#define | tdu_CTL_V21_TONES_ON 21
#define | tdu_CTL_V23_TONES_ON 22
#define | tdu_CTL_V21_CM_FAX_ON 23
#define | tdu_CTL_V21_V8DATA_ON 24
#define | tdu_CTL_B202_TONES_ON 25
#define | tdu_CTL_VOICE_DISC_ON 29
#define | tdu_CTL_MF_COIN_TONES_ON 30
#define | tdu_CTL_BDTEW_ON 31
#define | tdu_CTL_SIA_ON 32
#define | tdu_CTL_ON_LAST 32
Non-MF Tone Detection Disable Codes
#define | tdu_CTL_OFF_FIRST 33
#define | tdu_CTL_V21_OFF 33
#define | tdu_CTL_V25_OFF 34
#define | tdu_CTL_RSVD3 35
#define | tdu_CTL_CPT_OFF 36
#define | tdu_CTL_V18A_OFF 37
#define | tdu_CTL_SS7COT_OFF 38
#define | tdu_CTL_SF_OFF 39
#define | tdu_CTL_CNG_OFF 40
#define | tdu_CTL_SS7COR_OFF 41
#define | tdu_CTL_TT1khz_OFF 42
#define | tdu_CTL_UMF_OFF 43
#define | tdu_CTL_SFDT_CIDCAS_OFF 44
#define | tdu_CTL_CIDCAS_ALL_OFF 45
#define | tdu_CTL_RSVD4 46
#define | tdu_CTL_CRE_OFF 47
#define | tdu_CTL_MF_CRE1_OFF 48
#define | tdu_CTL_CRE2_OFF 49
#define | tdu_CTL_BELL_OFF 50
#define | tdu_CTL_V8BIS_TONES_OFF 51
#define | tdu_CTL_V21_TONES_OFF 52
#define | tdu_CTL_V23_TONES_OFF 53
#define | tdu_CTL_V21_CM_FAX_OFF 54
#define | tdu_CTL_V21_V8DATA_OFF 55
#define | tdu_CTL_B202_TONES_OFF 56
#define | tdu_CTL_VOICE_DISC_OFF 59
#define | tdu_CTL_COIN_TONES_OFF 60
#define | tdu_CTL_BDTEW_OFF 61
#define | tdu_CTL_SIA_OFF 62
#define | tdu_CTL_OFF_LAST 62
#define | tdu_CTL_THRE_MAX 63
TDU Instance Slots
#define | tdu_SLOT_MF_RSVD1 0
#define | tdu_SLOT_MF_USER 1
#define | tdu_SLOT_V21 2
#define | tdu_SLOT_CPT 3
#define | tdu_SLOT_V25TX 4
#define | tdu_SLOT_V18A 5
#define | tdu_SLOT_MF_RSVD2 6
#define | tdu_SLOT_SF 7
#define | tdu_SLOT_CNG 8
#define | tdu_SLOT_TT1khz 9
#define | tdu_SLOT_MF_RSVD3 10
#define | tdu_SLOT_BELLTX1 11
#define | tdu_SLOT_BELLTX2 12
#define | tdu_SLOT_V21LOW_MARKS 13
#define | tdu_SLOT_V21UPPER_MARKS 14
#define | tdu_SLOT_V23FW_MARKS 15
#define | tdu_SLOT_V23BW_MARKS 16
#define | tdu_SLOT_V18A_S 17
#define | tdu_SLOT_B202_M 18
#define | tdu_SLOT_B202_S 19
#define | tdu_SLOT_BDTEW 20
#define | tdu_SLOT_V21LOW_SPACES 21
#define | tdu_SLOT_MF_USER1 22
#define | tdu_SLOT_SIA 23
#define | tdu_SLOT_SIA_S 24
#define | tdu_SLOT_MAX_TX 24
#define | tdu_SLOT_V25RX 0
#define | tdu_SLOT_BELLRX1 1
#define | tdu_SLOT_BELLRX2 2
#define | tdu_SLOT_V23FW_MARKS_RX 3
#define | tdu_SLOT_V18A_RX 4
#define | tdu_SLOT_V18A_S_RX 5
#define | tdu_SLOT_V21LOW_MARKS_RX 6
#define | tdu_SLOT_V21LOW_S_RX 7
#define | tdu_SLOT_CASL_RX 8
#define | tdu_SLOT_CASH_RX 9
#define | tdu_SLOT_SFDT_DUMMY1 10
#define | tdu_SLOT_SFDT_DUMMY2 11
#define | tdu_SLOT_SFDT_DUMMY3 12
#define | tdu_SLOT_SS7COT_RX 13
#define | tdu_SLOT_SIA_RX 14
#define | tdu_SLOT_SIA_S_RX 15
#define | tdu_SLOT_MAX_RX 15
#define | tdu_SLOT_NONE 255
#define | tdu_SLOT_MAX (tdu_SLOT_MAX_TX + tdu_SLOT_MAX_RX + 1)
#define | tdu_MAX_SLOT (tdu_SLOT_MAX + 1)
#define | tdu_MAX_SLOT_TX (tdu_SLOT_MAX_TX + 1)
#define | tdu_MAX_SLOT_RX (tdu_SLOT_MAX_RX + 1)
MF Tone Detection
#define | tdu_CTL_MF_MIN 73
#define | tdu_CTL_MF_DTMF 73
#define | tdu_CTL_MF_R1 74
#define | tdu_CTL_MF_R2FW 75
#define | tdu_CTL_MF_R2BW 76
#define | tdu_CTL_MF_MAX 76
TDU Position
#define | tdu_CTL_POSITION 105
Modem Relay
#define | tdu_CTL_LLMR_ON 108
#define | tdu_CTL_LLMR_OFF 109
Digit Actions
#define | tdu_CTL_MULTIPLE_TONES 111
MIPS Savings
#define | tdu_CTL_SUSSPEND 112
#define | tdu_CTL_RELEASE 113
Auto COT
#define | tdu_CTL_PEEK_SFD 120
Digit Signalling
#define | tdu_CTL_QUERY_STATE 121
#define | tdu_CTL_MFSTD_SAVE 122
#define | tdu_CTL_MFSTD_RESTORE 123
#define | tdu_SLOT_MF_STD 0
Signal Interruption
#define | tdu_CTL_PR_SEARCH_RST 124
Free Memory
#define | tdu_CTL_STOP 125
#define | tdu_CTL_RESTART 126
Lite Mode
#define | tdu_CTL_GET_LITE 127
CED Early Alert
#define | tdu_CTL_EARLY_ALERT_SUPPRESS_ON 128
#define | tdu_CTL_EARLY_ALERT_SUPPRESS_OFF 129
TDU Detection Report Codes
#define | tdu_TID_TONE0 0
#define | tdu_TID_TONE1 1
#define | tdu_TID_TONE2 2
#define | tdu_TID_TONE3 3
#define | tdu_TID_TONE4 4
#define | tdu_TID_TONE5 5
#define | tdu_TID_TONE6 6
#define | tdu_TID_TONE7 7
#define | tdu_TID_TONE8 8
#define | tdu_TID_TONE9 9
#define | tdu_TID_TONE10 10
#define | tdu_TID_TONE11 11
#define | tdu_TID_TONE12 12
#define | tdu_TID_TONE13 13
#define | tdu_TID_TONE14 14
#define | tdu_TID_TONE15 15
#define | tdu_TID_TONE16 16
#define | tdu_TID_NULL -1
#define | tdu_TID_FIRST 17
#define | tdu_TID_V21 17
#define | tdu_TID_V25 18
#define | tdu_TID_V25_PR 19
#define | tdu_TID_CPT 20
#define | tdu_TID_V18A 21
#define | tdu_TID_SS7COT 22
#define | tdu_TID_SF 23
#define | tdu_TID_CNG 24
#define | tdu_TID_SS7COR 25
#define | tdu_TID_TT1khz 26
#define | tdu_TID_CIDCAS 27
#define | tdu_TID_CIDCAS_RX 28
#define | tdu_TID_V25_RX 32
#define | tdu_TID_V25_RX_PR 33
#define | tdu_TID_BELL 34
#define | tdu_TID_FIRST_EXT tdu_TID_BELL
#define | tdu_TID_V8BIS_TONES 35
#define | tdu_TID_V21_TONES 36
#define | tdu_TID_V23_TONES 37
#define | tdu_TID_V21_CM_FAX 38
#define | tdu_TID_V21_CI 39
#define | tdu_TID_B202_TONES 40
#define | tdu_TID_VOICE_DISC 44
#define | tdu_TID_LAST_EXT tdu_TID_VOICE_DISC
#define | tdu_TID_COIN_TONES 45
#define | tdu_TID_V21_CM 47
#define | tdu_TID_ANSAM 48
#define | tdu_TID_ANSAM_PR 49
#define | tdu_TID_V21_LOWER 50
#define | tdu_TID_CRE2 51
#define | tdu_TID_ANSAM_RX 62
#define | tdu_TID_ANSAM_PR_RX 63
#define | tdu_TID_V25_EARLY_REPORT_ALERT 64
#define | tdu_TID_V25_EARLY_REPORT_FALSE 65
#define | tdu_TID_SIA 66
#define | tdu_TID_LAST 66
#define | tdu_TID_BDTEW1400 96
#define | tdu_TID_BDTEW1800 97
#define | tdu_TID_MASKED 0x4000
#define | tdu_TID_LONG_DIGIT 0x2000
#define | tdu_TID_TXDIR 0x0100
#define | tdu_TID_RXDIR 0x0200
#define | tdu_TID_MASK_ID 0x00ff
#define | tdu_TID_TYPE00 (0 << 10)
#define | tdu_TID_TYPE01 (1 << 10)
#define | tdu_TID_TYPE02 (2 << 10)
#define | tdu_TID_TYPE03 (3 << 10)
#define | tdu_TID_TYPE_MASK (3 << 10)
#define | tdu_V8_OFFSET 30
#define | tdu_TID_PARALLEL_MASK 0x0080
#define | tdu_TID_CAS_T (tdu_TID_CIDCAS_RX | tdu_TID_PARALLEL_MASK)
MF ON/OFF codes
The following are ON/OFF codes reported upon MF detection event. The on_off parameter for tdu_send_out call out function is assigned one of these values.

#define | tdu_MF_DIGIT_OFF 0
#define | tdu_MF_DIGIT_ON 1
#define | tdu_MF_DIGIT_ALERT_OFF 2
#define | tdu_MF_DIGIT_ALERT_ON 3
#define | MF_CONFIRMED_OR_ALERT_ON (tdu_MF_DIGIT_ON & tdu_MF_DIGIT_ALERT_ON)
#define | MF_ALERT_ONLY (tdu_MF_DIGIT_ALERT_OFF & tdu_MF_DIGIT_ALERT_ON)

Typedefs

typedef tduCfgCtlStd_s | tduCfgCtlStd_t
Single frequency detector configuration structure. Use case: Non-MF tone detection ON.
typedef tduRepStats_s | tduRepStats_t
TDU reporting statistics structure. This structure is passed to the tduGetStats() API function. It contains false detection statistics.
Global TDU Context Structure
typedef tduContext_s | tduContext_t

Enumerations

enum | tduRxLocation_t { tdu_RX_AFTER_CONF, tdu_RX_BEFORE_CONF, tdu_RX_ONLY }
Specifies location of TDU where it is called from in from network direction. TDU internally does an error check based on its position configuration. See TDU position.
TODO: Must go away. System should keep track of TDU's position. More...
enum | tduTxLocation_t { tdu_TX_AFTER_CONF, tdu_TX_BEFORE_CONF, tdu_TX_ONLY }
Specifies location of TDU where it is called from in from TDM direction. TDU internally does an error check based on its position configuration. See TDU position.
TODO: Must go away. System should keep track of TDU's position. More...
TDU Return Codes
enum | { tdu_NOMEMORY = -1, tdu_NOERR = 0, tdu_ERROR = 1 }
TDU Exception Codes
enum {
tdu_EXC_OPEN = 1, tdu_EXC_DELETE = 2, tdu_EXC_FRAMESIZE = 3, tdu_EXC_MEMORY = 4,
tdu_EXC_RECEIVEIN = 5, tdu_EXC_SENDIN = 6, tdu_EXC_MFDET = 7
}

Functions

tbool | tduSFDControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Single frequency detector (from TDM, network) internal control function.
void | tduSFDFProcess (void *tduInst, linSample *samples, void *alert)
Single frequency detector (from TDM) internal process function.
void | tduSFDTProcess (void *tduInst, linSample *samples, void *alert)
Single frequency detector (from Network) internal process function.
tbool | tduMFControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
MF detector internal control function.
void | tduMFProcess (void *tduInst, linSample *samples, void *alert)
MF detector internal process function.
tbool | tduV21Control (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
V21 flags detector internal control function.
void | tduV21Process (void *tduInst, linSample *samples, void *alert)
V21 flags detector internal process function.
tbool | tduCPTControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
CPT detector internal control function.
void | tduCPTProcess (void *tduInst, linSample *samples, void *alert)
CPT detector internal process function.
tbool | tduBDTEWControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Baudot early warning detector internal control function.
void | tduBDTEWProcess (void *tduInst, linSample *samples, void *alert)
Baudot early warning detector internal process function.
void | tdu_mf_cidcas_ctl (tduCfgCtl_t *cfg, void *inst)
CID CAS internal control function.
void | tdu_sfd_llmr_ANSam_reset (tint toneType, Fract tone_db_power, void *inst)
ANSAM internal reset function.
void | tdu_sfd_llmr_ANSam (tint toneType, Fract tone_db_power, void *inst)
ANSAM internal function.
tbool | tdu_sfd_llmr_ANSam_test (tint toneType, void *inst)
ANSAM internal test function.
void | tdu_mf_v8bis_fs_ctl (tduCfgCtl_t *cfg, void *inst)
V.8bis (first segment) internal control function.
void | tduBellTid (tint *tid, tint freq)
Bell (2250Hz, 2250Hz) detector internal function.
void | tdu_mf_coin_tones_ctl (tduCfgCtl_t *cfg, void *inst)
Coin tones detector internal control function.
void | tdu_digit_filter (void *tduInst, tbool dtmf_mf, tint *toneId, tint *on_off)
Digit filter internal function.
void | tduVoiceDiscCtl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Voice discrimination internal control function.
void | tduVoiceDiscProcess (void *tduInst)
Voice discrimination internal process function.
tbool | tduDummyControl (void *tduInst, tint c_code, tduCfgCtl_t *cfg)
Dummy control function to be used by system if a detector is not to be linked in.
void | tduDummyProcess (void *tduInst, void *samples)
Dummy process function to be used by system if a detector is not to be linked in.
TDU (Embedded Communication Object) APIs
tint | tduGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, tduSizeConfig_t *cfg)
Gives the number and descriptors of buffers required by TDU.
tint | tduNew (void **tduInst, tint nbufs, ecomemBuffer_t *bufs, tduNewConfig_t *cfg)
Create an instance of TDU and initialize its memory buffers. tduCreate() must have been previously called to prevent tduGetSizes() from returning an error.
void | tduReceiveIn (void *tduInst, void *samples_in, tduRxLocation_t location)
Function to call TDU in from network direction.
tbool | tduSendIn (void *tduInst, void *samples_in, tduTxLocation_t location)
Function to call TDU in from TDM direction.
void | tduOpen (void *tduInst, tduConfig_t *cfg)
Initialization of TDU instance. TDU instance must be created using tduNew() prior to this call. Any signal processing by the TDU instance happens only after tduOpen().
void | tduControl (void *tduInst, tint ccode, tduCfgCtl_t *cfg)
System uses this API for controlling behaviour of TDU in various Use cases/Call flows.
void | tduClose (void *tduInst)
Makes TDU dormant. No further signal processing happens until after another tduOpen() call.
void | tduDelete (void **tduInst, tint nbufs, ecomemBuffer_t *bufs)
Deletes TDU instance, and sets the supplied tduInst to NULL. The instance pointer no longer exists in the system.
void | tduGetStats (void *tduInst, tbool reset, tduRepStats_t *stats)
Gets TDU reporting statistics.

Variables

const tduDetContext_t * | tduDetContexts []
const tduIntFwTable_t | tduIntFwTable
Single frequency detectors - from TDM
const tduDetContext_t | tduIncV23BW_MARKS_F
const tduDetContext_t | tduIncTT1khz_F
const tduDetContext_t | tduIncCNG_F
const tduDetContext_t | tduIncV21LOW_MARKS_F
const tduDetContext_t | tduIncV21LOW_SPACES_F
const tduDetContext_t | tduIncV21UPPER_MARKS_F
const tduDetContext_t | tduIncV21LOW_MARKS_T_RX
const tduDetContext_t | tduIncV21LOW_SPACES_T_RX
const tduDetContext_t | tduIncB202_MARKS_F
const tduDetContext_t | tduIncBELLTX2_F
const tduDetContext_t | tduIncV23FW_MARKS_F
const tduDetContext_t | tduIncV18A_F
const tduDetContext_t | tduIncSS7COR_F
const tduDetContext_t | tduIncV18A_S_F
const tduDetContext_t | tduIncV18A_T_RX
const tduDetContext_t | tduIncV18A_S_T_RX
const tduDetContext_t | tduIncSS7COT_F
const tduDetContext_t | tduIncV25_F
const tduDetContext_t | tduIncB202_SPACES_F
const tduDetContext_t | tduIncBELLTX1_F
const tduDetContext_t | tduIncSF_F
const tduDetContext_t | tduIncSIA_F
const tduDetContext_t | tduIncSIA_S_F
const tduDetContext_t | tduIncSIA_T_RX
const tduDetContext_t | tduIncSIA_S_T_RX
Multi-tone/miscellaneous detectors
const tduDetContext_t | tduIncDTMF
const tduDetContext_t | tduIncR1
const tduDetContext_t | tduIncR2FW
const tduDetContext_t | tduIncR2BW
const tduDetContext_t | tduIncUMF
const tduDetContext_t | tduIncV8BIS_FS_F
const tduDetContext_t | tduIncV21
const tduDetContext_t | tduIncCPT
const tduDetContext_t | tduIncCOIN_TONES
const tduDetContext_t | tduIncCIDCAS
const tduDetContext_t | tduIncV825_F
const tduDetContext_t | tduIncV21CM
TODO: Are these supported
const tduDetContext_t | tduIncCASL_T_RX
const tduDetContext_t | tduIncCASH_T_RX
const tduDetContext_t | tduIncV25_T_TX
const tduDetContext_t | tduIncCNG_T
const tduDetContext_t | tduIncV21UPPER_MARKS_LITE_T

Define Documentation

#define tdu_TX_DELAY_BUF_NUM 3

Definition at line 18 of file tdu.h.

#define tdu_POSITION_TXRX_CHANGED 0x0001

bitfield to change position related to: From TDM Vs From Network

Definition at line 342 of file tdu.h.

#define tdu_POSITION_PRI_ACBC_CHANGED 0x0002

bitfield to change position related to: Before Vs After conferencing

Definition at line 344 of file tdu.h.

#define tdu_POSITION_SEC_ACBC_CHANGED 0x0004

bitfield to change position related to: Before Vs After conferencing

Definition at line 346 of file tdu.h.

#define tdu_POSITION_TYPE 0x0008

Definition at line 348 of file tdu.h.

#define tdu_POSITION_MF_TESTS_CHANGED 0x0030

MF Tests modified

Definition at line 350 of file tdu.h.

#define tdu_POSITION_RX 0x0001

bitfield to change position related to: From TDM Vs From Network
bit value 0: from TDM, bit value 1: from Network

Definition at line 354 of file tdu.h.

#define tdu_POSITION_PRI_AC 0x0002

bitfield to change position related to: Before Vs After conferencing
bit value 0: Before conferencing, bit value 1: After conferencing

Definition at line 357 of file tdu.h.

#define tdu_POSITION_SEC_AC 0x0004

bitfield to change position related to: Before Vs After conferencing
bit value 0: Before conferencing, bit value 1: After conferencing

Definition at line 361 of file tdu.h.

#define tdu_POSITION_MF_TESTS_SHIFT 4

Definition at line 365 of file tdu.h.

#define tdu_POSITION_MF_TESTS_STEP_RISE 0x0010

Definition at line 367 of file tdu.h.

#define tdu_POSITION_MF_TESTS_PREDIGIT_SNR 0x0020

Definition at line 368 of file tdu.h.

#define tdu_SLOT_SS7COT 6

Slot number of SS7 COT tone detector

Definition at line 522 of file tdu.h.

#define tdu_SLOT_SS7COR 10

Slot number of SS7 COR tone detector

Definition at line 523 of file tdu.h.

#define tdu_OPERATION_DIR_MASK 0x07

Mask for quickly extracting bit values in operation field

Definition at line 531 of file tdu.h.

#define tdu_OPERATION_ENABLED 0x08

Bit position indicating whether tone is enabled/disabled

Definition at line 533 of file tdu.h.

#define tdu_DET_TABLEID_MASK 0x000f

Definition at line 979 of file tdu.h.

#define tdu_DET_TXDIR 0x0100

Definition at line 980 of file tdu.h.

#define tdu_DET_RXDIR 0x0200

Definition at line 981 of file tdu.h.

#define tdu_DET_DIR_MASK 0x0300

Definition at line 982 of file tdu.h.

#define tdu_SIZECFG_LITE 1

TDU in lite mode

Definition at line 1363 of file tdu.h.

#define tdu_SIZECFG_FULL 0

TDU in full mode

Definition at line 1364 of file tdu.h.

#define tdu_FALSE_ALERT_CNT_MASK 0x00FF

Definition at line 1407 of file tdu.h.

#define tdu_SET_FALSE_ALERT_CNT | ( | x,
 |  | v | ) | (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 0, 8))

Definition at line 1408 of file tdu.h.

#define tdu_GET_FALSE_ALERT_CNT ( x ) (utlGetBitfield((x)->tduRepStats.FalseAlert, 0, 8))

Definition at line 1409 of file tdu.h.

#define tdu_SET_ON_OFF_FLAG | ( | x,
 |  | v | ) | (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 14, 2))

Definition at line 1410 of file tdu.h.

#define tdu_GET_ON_OFF_FLAG ( x ) (utlGetBitfield((x)->tduRepStats.FalseAlert, 14, 2))

Definition at line 1411 of file tdu.h.

Typedef Documentation

typedef struct tduRepStats_s tduRepStats_t

TDU reporting statistics structure. This structure is passed to the tduGetStats() API function. It contains false detection statistics.

Enumeration Type Documentation

enum tduRxLocation_t

Specifies location of TDU where it is called from in from network direction. TDU internally does an error check based on its position configuration. See TDU position.
TODO: Must go away. System should keep track of TDU's position.

Enumerator:
tdu_RX_AFTER_CONF | TDU called after conferencing
tdu_RX_BEFORE_CONF | TDU called before conferencing
tdu_RX_ONLY | TDU called before conferencing

Definition at line 1382 of file tdu.h.

enum tduTxLocation_t

Specifies location of TDU where it is called from in from TDM direction. TDU internally does an error check based on its position configuration. See TDU position.
TODO: Must go away. System should keep track of TDU's position.

Enumerator:
tdu_TX_AFTER_CONF | TDU called after conferencing
tdu_TX_BEFORE_CONF | TDU called before conferencing
tdu_TX_ONLY | No error checks to be done by TDU for this code

Definition at line 1393 of file tdu.h.

Function Documentation

tint tduGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | tduSizeConfig_t * | cfg
 | ) |  |

Gives the number and descriptors of buffers required by TDU.

Parameters:
[in,out] | *nbufs | Pointer to number of buffers.
[in,out] | **bufs | Address of pointer to buffer descriptors
[in] | *cfg | Configuration for size of buffer: tduSizeConfig_t
Returns:
tdu_NOERR upon successful execution
tdu_ERROR upon error condition

tint tduNew | ( | void ** | tduInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | tduNewConfig_t * | cfg
 | ) |  |

Create an instance of TDU and initialize its memory buffers. tduCreate() must have been previously called to prevent tduGetSizes() from returning an error.

Parameters:
[in,out] | **tduInst | Address where TDU instance pointer must be returned to
[in,out] | *nbufs | Pointer to number of buffers.
[in,out] | **bufs | Address of pointer to buffer descriptors
[in] | *cfg | Configuration structure: tduNewConfig_t
Returns:
tdu_NOERR upon successful execution
tdu_ERROR upon error condition

void tduReceiveIn | ( | void * | tduInst,
 |  | void * | samples_in,
 |  | tduRxLocation_t | location
 | ) |  |

Function to call TDU in from network direction.

Parameters:
[in] | *tduInst | Address of TDU instance
[in] | *samples_in | Pointer to input samples' buffer
[in] | location | Location of TDU: tduRxLocation_t
Returns:
None

tbool tduSendIn | ( | void * | tduInst,
 |  | void * | samples_in,
 |  | tduTxLocation_t | location
 | ) |  |

Function to call TDU in from TDM direction.

Parameters:
[in] | *tduInst | Address of TDU instance
[in] | *samples_in | Pointer to input samples' buffer
[in] | location | Location of TDU: tduTxLocation_t
Returns:
TRUE if TDU processing attempted after error checks FALSE if one of error checks fail

void tduOpen | ( | void * | tduInst,
 |  | tduConfig_t * | cfg
 | ) |  |

Initialization of TDU instance. TDU instance must be created using tduNew() prior to this call. Any signal processing by the TDU instance happens only after tduOpen().

Parameters:
[in] | *tduInst | Address of TDU instance
[in] | *cfg | Configuration structure: tduConfig_t
Returns:
NONE

void tduControl | ( | void * | tduInst,
 |  | tint | ccode,
 |  | tduCfgCtl_t * | cfg
 | ) |  |

System uses this API for controlling behaviour of TDU in various Use cases/Call flows.

Parameters:
[in] | *tduInst | Address of TDU instance
[in] | *ccode | control code to influence TDU behaviour. Usage of various control codes is described under Use cases/Call flows.
[in,out] | *cfg | Configuration structure: tduCfgCtl_t
Returns:
NONE

void tduClose ( void * tduInst )

Makes TDU dormant. No further signal processing happens until after another tduOpen() call.

Parameters:
[in] *tduInst Address of TDU instance
Returns:
NONE

void tduDelete | ( | void ** | tduInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Deletes TDU instance, and sets the supplied tduInst to NULL. The instance pointer no longer exists in the system.

Parameters:
[in,out] | tduInst | Address of TDU instance pointer. TDU instance pointer is set to NULL.
[in] | nbufs | dummy. TODO: delete
[in] | bufs | dummy. TODO: delete
Returns:
NONE

void tduGetStats | ( | void * | tduInst,
 |  | tbool | reset,
 |  | tduRepStats_t * | stats
 | ) |  |

Gets TDU reporting statistics.

Parameters:
[in] | tduInst | Address of TDU instance
[in] | reset | TRUE: reset the TDU statistics
[in,out] | *stats | Statistics structure: tduRepStats_t
Returns:
NONE


TDU: tdu.h Source File

  • File List
  • Globals

tdu.h

Go to the documentation of this file.
00001 #ifndef _TDU_H
00002 #define _TDU_H
00003
00010 #include <ti/mas/types/types.h>
00011 #include <ti/mas/util/debug.h>
00012 #include <ti/mas/util/ecomem.h>
00013 #include <ti/mas/util/utl.h>
00014
00015 /* CAUTION: don't merge these hard defines from HD because these are
00016    compile time options */
00017 /* TX delay buffer number. */
00018 #define tdu_TX_DELAY_BUF_NUM 3
00019
00021 /* @{ */
00022
00034 /* @{ */
00035 #define  tdu_CTL_MF_STD_ON       0
00036 #define  tdu_CTL_MF_STD_OFF      1
00037 /* @} */
00038
00039 #define  tdu_CTL_THRE_MIN        2
00050 /* @{ */
00051 #define  tdu_CTL_ON_FIRST        2
00053 #define  tdu_CTL_V21_ON          2
00054 #define  tdu_CTL_V25_ON          3
00055 #define  tdu_CTL_RSVD1           4
00057 #define  tdu_CTL_CPT_ON          5
00058 #define  tdu_CTL_V18A_ON         6
00059 #define  tdu_CTL_SS7COT_ON       7
00060 #define  tdu_CTL_SF_ON           8
00061 #define  tdu_CTL_CNG_ON          9
00062 #define  tdu_CTL_SS7COR_ON       10
00063 #define  tdu_CTL_TT1khz_ON       11
00064 #define  tdu_CTL_MF_CIDCAS_ON    12
00065 #define  tdu_CTL_SFDT_CIDCAS_ON  13
00067 #define  tdu_CTL_CIDCAS_ALL_ON   14
00069 #define  tdu_CTL_RSVD2           15
00071 #define  tdu_CTL_CRE_ON          16
00073 #define  tdu_CTL_MF_CRE1_ON      17
00074 #define  tdu_CTL_CRE2_ON         18
00075 #define  tdu_CTL_BELL_ON         19
00076 #define  tdu_CTL_V8BIS_TONES_ON  20
00078 #define  tdu_CTL_V21_TONES_ON    21
00080 #define  tdu_CTL_V23_TONES_ON    22
00082 #define  tdu_CTL_V21_CM_FAX_ON   23
00084 #define  tdu_CTL_V21_V8DATA_ON   24
00086 #define  tdu_CTL_B202_TONES_ON   25
00087 #define  tdu_CTL_VOICE_DISC_ON   29
00088 #define  tdu_CTL_MF_COIN_TONES_ON 30
00089 #define  tdu_CTL_BDTEW_ON        31
00090 #define  tdu_CTL_SIA_ON          32
00091 #define  tdu_CTL_ON_LAST         32
00093 /*  @} */
00094
00100 typedef struct tduCfgCtlStd_s {
00101   Fract           toneOnEnergy;
00103   Fract           toneOnSnr;
00105   tuint           toneOnConfirmDuration;
00107 } tduCfgCtlStd_t;
00108
00109
00113 typedef struct {
00114   tduCfgCtlStd_t  std;
00116   Fract           startFreq;
00117   Fract           endFreq;
00118 } tduCptCfgCtl_t;
00119
00120
00128 /* @{ */
00129 #define  tdu_CTL_OFF_FIRST    33
00131 #define  tdu_CTL_V21_OFF      33
00132 #define  tdu_CTL_V25_OFF      34
00133 #define  tdu_CTL_RSVD3        35
00135 #define  tdu_CTL_CPT_OFF      36
00136 #define  tdu_CTL_V18A_OFF     37
00137 #define  tdu_CTL_SS7COT_OFF   38
00138 #define  tdu_CTL_SF_OFF       39
00139 #define  tdu_CTL_CNG_OFF      40
00140 #define  tdu_CTL_SS7COR_OFF   41
00141 #define  tdu_CTL_TT1khz_OFF   42
00142 #define  tdu_CTL_UMF_OFF      43
00144 #define  tdu_CTL_SFDT_CIDCAS_OFF  44
00146 #define  tdu_CTL_CIDCAS_ALL_OFF   45
00148 #define  tdu_CTL_RSVD4        46
00149 #define  tdu_CTL_CRE_OFF      47
00151 #define  tdu_CTL_MF_CRE1_OFF  48
00153 #define  tdu_CTL_CRE2_OFF     49
00155 #define  tdu_CTL_BELL_OFF     50
00156 #define  tdu_CTL_V8BIS_TONES_OFF  51
00157 #define  tdu_CTL_V21_TONES_OFF    52
00158 #define  tdu_CTL_V23_TONES_OFF    53
00159 #define  tdu_CTL_V21_CM_FAX_OFF   54
00160 #define  tdu_CTL_V21_V8DATA_OFF   55
00162 #define  tdu_CTL_B202_TONES_OFF   56
00163 #define  tdu_CTL_VOICE_DISC_OFF   59
00164 #define  tdu_CTL_COIN_TONES_OFF   60
00165 #define  tdu_CTL_BDTEW_OFF        61
00166 #define  tdu_CTL_SIA_OFF          62
00168 #define  tdu_CTL_OFF_LAST         62
00170 #define  tdu_CTL_THRE_MAX         63
00173 /*  @} */
00174
00177 /******************************************************************************
00178  * DATA DEFINITION: Identification codes for detector context
00179  ******************************************************************************
00180  * DESCRIPTION: These codes are used to identify specific detector, i.e.
00181  *               feature that is supported. Implementation can be different, e.g.
00182  *               for time domain and STFT framework. For instance, there are
00183  *               contexts with same tduContextId_t, like:
00184  *               V.25 implemented in frequency domain and V.25 implemented in
00185  *               time domain, or
00186  *               CNG implemented in frequency domain and CNG implemented in time
00187  *               domain.
00188  *****************************************************************************/
00189 /* Start of tduContextId_t */
00190 #define  tdu_DET_ID_DTMF         0      /* DTMF, served by mfdet */
00191 #define  tdu_DET_ID_R1           1      /* R1, served by mfdet */
00192 #define  tdu_DET_ID_R2FW         2      /* R2FW, served by mfdet */
00193 #define  tdu_DET_ID_R2BW         3      /* R2BW, served by mfdet */
00194 #define  tdu_DET_ID_V21          4      /* V21, served by V21 */
00195 #define  tdu_DET_ID_CPT          5      /* CPT, served by cpt */
00196 #define  tdu_DET_ID_MODEMDISC    6      /* V25, served by sfdf or sfdt */
00197 #define  tdu_DET_ID_V18A         7      /* V18A, served by sfdf */
00198 #define  tdu_DET_ID_SS7COT       8      /* SS7, served by sfdf */
00199 #define  tdu_DET_ID_SF           9      /* SF, served by sfdf */
00200 #define  tdu_DET_ID_CNG          10     /* CNG, served by sfdf or sfdt */
00201 #define  tdu_DET_ID_TT1khz       11     /* TT1khz, served by sfdf */
00202 #define  tdu_DET_ID_SS7COR       12     /* SS7COR, served by sfdf */
00203 #define  tdu_DET_ID_CIDCAS       13     /* CIDCAS, served by mfdet */
00204 #define  tdu_DET_ID_CASL         14     /* CIDCAS low tone, served by sfdt
00205                                          */
00206 #define  tdu_DET_ID_CASH         15     /* CIDCAS high tone, served by
00207                                            sfdt */
00208 #define  tdu_DET_ID_V8BIS_FS     16     /* Dual-tone CRe detector */
00209 #define  tdu_DET_ID_CRE2         17     /* Single-tone CRe detector */
00210 #define  tdu_DET_ID_V25LLMR      18     /* CED operating in LLMR mode */
00211 #define  tdu_DET_ID_COIN_TONES   19     /* Coin machine dual frequency tones */
00212 #define  tdu_DET_ID_SIA          20     /* SIA tones */
00213 #define  tdu_DET_ID_NONE         255
00214 /* End of tduContextId_t */
00215
00216
00225 /* @{ */
00226 #define  tdu_SLOT_MF_RSVD1       0
00227 #define  tdu_SLOT_MF_USER        1
00228 #define  tdu_SLOT_V21            2
00229 #define  tdu_SLOT_CPT            3
00230 #define  tdu_SLOT_V25TX          4
00231 #define  tdu_SLOT_V18A           5
00232 #define  tdu_SLOT_MF_RSVD2       6
00233 #define  tdu_SLOT_SF             7
00234 #define  tdu_SLOT_CNG            8
00235 #define  tdu_SLOT_TT1khz         9
00236 #define  tdu_SLOT_MF_RSVD3       10
00237 #define  tdu_SLOT_BELLTX1        11
00238 #define  tdu_SLOT_BELLTX2        12
00239 #define  tdu_SLOT_V21LOW_MARKS   13
00240 #define  tdu_SLOT_V21UPPER_MARKS 14
00241 #define  tdu_SLOT_V23FW_MARKS    15
00242 #define  tdu_SLOT_V23BW_MARKS    16
00243 #define  tdu_SLOT_V18A_S         17
00244 #define  tdu_SLOT_B202_M         18
00245 #define  tdu_SLOT_B202_S         19
00246 #define  tdu_SLOT_BDTEW          20
00247 #define  tdu_SLOT_V21LOW_SPACES  21
00248 #define  tdu_SLOT_MF_USER1       22
00249 #define  tdu_SLOT_SIA            23
00250 #define  tdu_SLOT_SIA_S          24
00251 #define  tdu_SLOT_MAX_TX         24
00253 #define  tdu_SLOT_V25RX           0
00254 #define  tdu_SLOT_BELLRX1         1
00255 #define  tdu_SLOT_BELLRX2         2
00256 #define  tdu_SLOT_V23FW_MARKS_RX  3
00257 #define  tdu_SLOT_V18A_RX         4
00258 #define  tdu_SLOT_V18A_S_RX       5
00259 #define  tdu_SLOT_V21LOW_MARKS_RX 6
00260 #define  tdu_SLOT_V21LOW_S_RX     7
00261 #define  tdu_SLOT_CASL_RX         8
00262 #define  tdu_SLOT_CASH_RX         9
00263 #define  tdu_SLOT_SFDT_DUMMY1    10
00264 #define  tdu_SLOT_SFDT_DUMMY2    11
00265 #define  tdu_SLOT_SFDT_DUMMY3    12
00267 #define  tdu_SLOT_SS7COT_RX      13
00268 #define  tdu_SLOT_SIA_RX         14
00269 #define  tdu_SLOT_SIA_S_RX       15
00271 #define  tdu_SLOT_MAX_RX         15
00274 #define  tdu_SLOT_NONE          255
00275 #define  tdu_SLOT_MAX    (tdu_SLOT_MAX_TX + tdu_SLOT_MAX_RX + 1)
00276 #define  tdu_MAX_SLOT    (tdu_SLOT_MAX    + 1)
00277 #define  tdu_MAX_SLOT_TX (tdu_SLOT_MAX_TX + 1)
00278 #define  tdu_MAX_SLOT_RX (tdu_SLOT_MAX_RX + 1)
00279 /*  @} */
00280
00292 /* @{ */
00293 #define  tdu_CTL_MF_MIN          73
00295 #define  tdu_CTL_MF_DTMF         73
00296 #define  tdu_CTL_MF_R1           74
00297 #define  tdu_CTL_MF_R2FW         75
00298 #define  tdu_CTL_MF_R2BW         76
00299 #define  tdu_CTL_MF_MAX          76
00305 typedef struct {
00306   Fract           freqPowThreshLow;
00308   Fract           freqPowThreshHigh;
00310   Fract           twistNegative;
00313   Fract           twistPositive;
00316   Fract           breakThresh;
00318 } tduMfCfgCtl_t;
00319 /*  @} */
00335 /* @{ */
00336 #define  tdu_CTL_POSITION        105
00341 typedef struct {
00342 #define tdu_POSITION_TXRX_CHANGED     0x0001
00344 #define tdu_POSITION_PRI_ACBC_CHANGED 0x0002
00346 #define tdu_POSITION_SEC_ACBC_CHANGED 0x0004
00348 #define tdu_POSITION_TYPE             0x0008    /* TDU type, full or lite
00349                                                    is defined by bit 4 */
00350 #define tdu_POSITION_MF_TESTS_CHANGED 0x0030
00351   tuint           valid_bitfield;
00354 #define tdu_POSITION_RX     0x0001
00357 #define tdu_POSITION_PRI_AC 0x0002
00361 #define tdu_POSITION_SEC_AC 0x0004
00365 #define tdu_POSITION_MF_TESTS_SHIFT 4   /* Additional MF tests indicated
00366                                            from bit 4 */
00367 #define tdu_POSITION_MF_TESTS_STEP_RISE    0x0010
00368 #define tdu_POSITION_MF_TESTS_PREDIGIT_SNR 0x0020
00369   tuint           value_bitfield;
00372 } tduPosition_t;
00373 /*  @} */
00383 /* @{ */
00384 #define  tdu_CTL_LLMR_ON         108
00385 #define  tdu_CTL_LLMR_OFF        109
00386 /*  @} */
00387
00398 /* @{ */
00399 #define  tdu_CTL_DIGIT_FILTER    110
00404 typedef struct tduDigitFilterCfgCtl_s {
00405   tuint           filter_bfield;
00441   tuint           long_digit_bfield;
00454   tuint           long_digit_hangover;
00456 } tduDigitFilterCfgCtl_t;
00457 /*  @} */
00468 /* @ {*/
00469 #define  tdu_CTL_MULTIPLE_TONES  111
00474 typedef struct {
00475   tulong          reports_bfield;
00478   tulong          changed_bfield;
00481 } tduToneFilterCfgCtl_t;
00482 /*  @} */
00494 /* @ {*/
00495 #define  tdu_CTL_SUSSPEND        112
00496 #define  tdu_CTL_RELEASE         113
00499 /*  @} */
00500
00513 /* @{ */
00514 #define  tdu_CTL_PEEK_SFD        120
00521 typedef struct {
00522 #define  tdu_SLOT_SS7COT         6
00523 #define  tdu_SLOT_SS7COR         10
00524   tint            slot;
00526   tuint           operation;
00531 #define tdu_OPERATION_DIR_MASK 0x07
00533 #define tdu_OPERATION_ENABLED  0x08
00535   tduCfgCtlStd_t  std;
00537 } tduSfdPeek_t;
00538 /*  @} */
00559 /* @ {*/
00560 #define  tdu_CTL_QUERY_STATE     121
00561 #define  tdu_CTL_MFSTD_SAVE      122
00563 #define  tdu_CTL_MFSTD_RESTORE   123
00566 #define  tdu_SLOT_MF_STD         0
00572 typedef struct {
00573   tulong          detState;
00575   tulong          hot_detectors;
00577   tulong          active_tone_reports;
00579 } tduQueryState_t;
00580
00584 typedef struct {
00585   LFract          freq_pow_thresh_low;
00587   LFract          freq_pow_thresh_high;
00589   void           *params;
00591   tuint           bfield1;
00593   tint            switched;
00595 } tduMfState_t;
00596 /*  @} */
00612 /* @ {*/
00613 #define  tdu_CTL_PR_SEARCH_RST   124
00614 /*  @} */
00615
00636 /* @ {*/
00637 #define  tdu_CTL_STOP            125
00639 #define  tdu_CTL_RESTART         126
00647 typedef struct {
00648   void           *base;
00649   tint            length;
00650 } tduTxDelayLine_t;
00651 /*  @} */
00667 /* @{ */
00668 #define tdu_CTL_GET_LITE        127
00671 /*  @} */
00672
00682 /* @ {*/
00683 #define tdu_CTL_EARLY_ALERT_SUPPRESS_ON  128
00684 #define tdu_CTL_EARLY_ALERT_SUPPRESS_OFF 129
00685 /*  @} */
00686
00688 #define tdu_CTL_MF_RELAY_OFF     130
00690 #define  tdu_CTL_NONE            255
00696 typedef struct {
00697   union {
00698     tduMfCfgCtl_t   mf;
00700     tduCfgCtlStd_t  std;
00703     tduCptCfgCtl_t  cpt;
00706     tduSfdPeek_t    peek;
00710     tduDigitFilterCfgCtl_t dfilt;
00713     tduQueryState_t state;
00716     tduToneFilterCfgCtl_t tfilt;
00719     tduMfState_t   *mfstate;
00722     tduTxDelayLine_t tx_delay_line;
00725     tduPosition_t   position;
00728     tuint           lite;
00731     tbool            digit_sent;
00732   } u;
00733 } tduCfgCtl_t;
00734
00735
00743 /* @{ */
00744 enum {
00745   tdu_NOMEMORY = -1,
00747   tdu_NOERR    =  0,
00749   tdu_ERROR    =  1
00756 };
00757 /*  @} */
00768 /* @{ */
00769 enum {
00770   tdu_EXC_OPEN      = 1,
00772   tdu_EXC_DELETE    = 2,
00774   tdu_EXC_FRAMESIZE = 3,
00776   tdu_EXC_MEMORY    = 4,
00777   tdu_EXC_RECEIVEIN = 5,
00778   tdu_EXC_SENDIN    = 6,
00779   tdu_EXC_MFDET     = 7
00781 };
00782 /*  @} */
00794 /* @{ */
00795 #define  tdu_TID_TONE0           0
00796 #define  tdu_TID_TONE1           1
00797 #define  tdu_TID_TONE2           2
00798 #define  tdu_TID_TONE3           3
00799 #define  tdu_TID_TONE4           4
00800 #define  tdu_TID_TONE5           5
00801 #define  tdu_TID_TONE6           6
00802 #define  tdu_TID_TONE7           7
00803 #define  tdu_TID_TONE8           8
00804 #define  tdu_TID_TONE9           9
00805 #define  tdu_TID_TONE10          10
00806 #define  tdu_TID_TONE11          11
00807 #define  tdu_TID_TONE12          12
00808 #define  tdu_TID_TONE13          13
00809 #define  tdu_TID_TONE14          14
00810 #define  tdu_TID_TONE15          15
00811 #define  tdu_TID_TONE16          16
00812 #define  tdu_TID_NULL            -1     /* No tone detected */
00813
00814 #define  tdu_TID_FIRST           17     /* User for SIU integration
00815                                            translation */
00816
00817 #define  tdu_TID_V21             17     /* Fax V.21 flags */
00818   /* Must be consecutive ! */
00819 #define  tdu_TID_V25             18     /* Single frequency tone 2100 Hz */
00820 #define  tdu_TID_V25_PR          19     /* Single frequency tone 2100 Hz
00821                                            with phase reversal */
00822 #define  tdu_TID_CPT             20     /* Call progress Tone */
00823 #define  tdu_TID_V18A            21     /* LTRS characters of V18A
00824                                            (frequency tone 1400 Hz) */
00825 #define  tdu_TID_SS7COT          22     /* Continuity tone of SS7
00826                                            (frequency tone 2010 Hz) */
00827 #define  tdu_TID_SF              23     /* Single-frequency signalling of
00828                                            SS7 (at 2600 Hz) */
00829
00830
00831
00832 #define  tdu_TID_CNG             24     /* Single-frequency tone at 1100
00833                                            Hz */
00834 #define  tdu_TID_SS7COR          25     /* Continuity tone of SS7
00835                                            (frequency tone 1780 Hz) */
00836 #define  tdu_TID_TT1khz          26     /* Test tone at 1000 or 1004 Hz */
00837 #define  tdu_TID_CIDCAS          27     /* CID CAS - single tone pair
00838                                            event (2130 Hz and 2750 Hz) */
00839 #define  tdu_TID_CIDCAS_RX       28     /* Code 28, indicates CID CAS
00840                                            event on secondary path */
00841   /* Report codes 29-31 are reserved to keep API balanced */
00842
00843   /* V25 from packet side, with and without phase reversals need to be
00844      consecutive */
00845 #define  tdu_TID_V25_RX          32     /* Single frequency tone 2100 Hz,
00846                                            no phase reversals * (network
00847                                            side) */
00848 #define  tdu_TID_V25_RX_PR       33     /* Single frequency tone 2100 Hz,
00849                                            with phase reversals * (network
00850                                            side) */
00851 #define  tdu_TID_BELL            34     /* Single frequency tone detectors
00852                                            at 1270/2225/2250 Hz, TX/RX
00853                                            direction */
00854 #define  tdu_TID_FIRST_EXT       tdu_TID_BELL
00855 #define  tdu_TID_V8BIS_TONES     35     /* First segment dual-tone
00856                                            detectors */
00857 #define  tdu_TID_V21_TONES       36     /* V.21 low/upper channel
00858                                            continuous marks/spaces */
00859 #define  tdu_TID_V23_TONES       37     /* V.23 fw/bw channel continuous
00860                                            marks */
00861
00862 #define  tdu_TID_V21_CM_FAX      38     /* CM Fax sequence detected */
00863 #define  tdu_TID_V21_CI          39     /* V.8 CI sequence detected */
00864 #define  tdu_TID_B202_TONES      40     /* 1200Hz and 2200Hz */
00865 #define  tdu_TID_VOICE_DISC      44
00866 #define tdu_TID_LAST_EXT  tdu_TID_VOICE_DISC
00867
00868 #define  tdu_TID_COIN_TONES      45     /* Coin machine dual frequency tones */
00869
00870 #define  tdu_TID_V21_CM          47     /* Code used internally to report
00871                                            modem relay events */
00872 #define  tdu_TID_ANSAM           48
00873 #define  tdu_TID_ANSAM_PR        49
00874 #define  tdu_TID_V21_LOWER       50
00875 #define  tdu_TID_CRE2            51
00876 #define  tdu_TID_ANSAM_RX        62
00877 #define  tdu_TID_ANSAM_PR_RX     63
00878
00879 #define  tdu_TID_V25_EARLY_REPORT_ALERT  64
00881 #define  tdu_TID_V25_EARLY_REPORT_FALSE  65
00883 #define  tdu_TID_SIA    66
00884 #define  tdu_TID_LAST   66
00886 #define  tdu_TID_BDTEW1400       96
00887 #define  tdu_TID_BDTEW1800       97
00888
00889 #define tdu_TID_MASKED     0x4000
00891 #define tdu_TID_LONG_DIGIT 0x2000
00893 #define tdu_TID_TXDIR      0x0100
00895 #define tdu_TID_RXDIR      0x0200
00897 #define tdu_TID_MASK_ID    0x00ff
00899 #define tdu_TID_TYPE00     (0 << 10)
00900 #define tdu_TID_TYPE01     (1 << 10)
00901 #define tdu_TID_TYPE02     (2 << 10)
00902 #define tdu_TID_TYPE03     (3 << 10)
00903 #define tdu_TID_TYPE_MASK  (3 << 10)
00905 #define tdu_V8_OFFSET   30
00907 #define tdu_TID_PARALLEL_MASK     0x0080
00908 #define tdu_TID_CAS_T       (tdu_TID_CIDCAS_RX | tdu_TID_PARALLEL_MASK)
00914 /* @{ */
00915 #define  tdu_MF_DIGIT_OFF        0
00916 #define  tdu_MF_DIGIT_ON         1
00917 #define  tdu_MF_DIGIT_ALERT_OFF  2
00918 #define  tdu_MF_DIGIT_ALERT_ON   3
00920 #define MF_CONFIRMED_OR_ALERT_ON (tdu_MF_DIGIT_ON & tdu_MF_DIGIT_ALERT_ON)
00921 #define MF_ALERT_ONLY            (tdu_MF_DIGIT_ALERT_OFF & tdu_MF_DIGIT_ALERT_ON)
00922 /*  @} */
00923
00928 typedef struct {
00929   tint            freq1;
00930   tint            tone1bw;
00934   tint            freq2;
00936   tint            tone2bw;
00940 } tduCptSmartRep_t;
00941
00942
00943 /* @} */
00944
00962 /* @{ */
00963
00972 typedef struct {
00973   tint            detId;
00974   tint            tableId_dir;
00979 #define tdu_DET_TABLEID_MASK   0x000f  /* tableID mask */
00980 #define tdu_DET_TXDIR          0x0100  /* Indicate that detector is on Tx side */
00981 #define tdu_DET_RXDIR          0x0200  /* Indicate that detector is on Rx side */
00982 #define tdu_DET_DIR_MASK       0x0300  /* Direction mask */
00983
00984   tint            detSlot;
00985   tuint           slotInstSize;
00988   tint            c_code_on;
00989   tint            c_code_off;
00990   tint           *params;
00991 } tduDetContext_t;
00992
00993 extern const tduDetContext_t *tduDetContexts[];
00996 /* @} */
00997
01019 /* @{ */
01020
01024 /* @{ */
01025 extern const tduDetContext_t tduIncV23BW_MARKS_F;
01026 extern const tduDetContext_t tduIncTT1khz_F;        /* Test tone fquency, 1000 Hz or 1004 Hz */
01027 extern const tduDetContext_t tduIncCNG_F;           /* Fax CNG, 1100 Hz */
01028 extern const tduDetContext_t tduIncV21LOW_MARKS_F;
01029 extern const tduDetContext_t tduIncV21LOW_SPACES_F;
01030 extern const tduDetContext_t tduIncV21UPPER_MARKS_F;
01031 extern const tduDetContext_t tduIncV21LOW_MARKS_T_RX;
01032 extern const tduDetContext_t tduIncV21LOW_SPACES_T_RX;
01033 extern const tduDetContext_t tduIncB202_MARKS_F;
01034 extern const tduDetContext_t tduIncBELLTX2_F;
01035 extern const tduDetContext_t tduIncV23FW_MARKS_F;
01036 extern const tduDetContext_t tduIncV18A_F;          /* V.18A, 1400 Hz */
01037 extern const tduDetContext_t tduIncSS7COR_F;        /* SS7 Continuity on Tone lower channel 1780 Hz */
01038 extern const tduDetContext_t tduIncV18A_S_F;        /* V.18A, 1800 Hz */
01039 extern const tduDetContext_t tduIncV18A_T_RX;       /* V.18A 1400 Hz detection from network */
01040 extern const tduDetContext_t tduIncV18A_S_T_RX;     /* V.18A 1800 Hz detection from network */
01041 extern const tduDetContext_t tduIncSS7COT_F;        /* SS7 Continuity On Tone, 2000 Hz */
01042 extern const tduDetContext_t tduIncV25_F;           /* V.25 CED, 2100 Hz, w/ or w/o pr */
01043 extern const tduDetContext_t tduIncB202_SPACES_F;
01044 extern const tduDetContext_t tduIncBELLTX1_F;
01045 extern const tduDetContext_t tduIncSF_F;            /* Signalling frequency, 2600 Hz */
01046 extern const tduDetContext_t tduIncSIA_F;          /* 1400 Hz */
01047 extern const tduDetContext_t tduIncSIA_S_F;        /* 2300 Hz */
01048
01049 extern const tduDetContext_t tduIncSIA_T_RX;          /* 1400 Hz */
01050 extern const tduDetContext_t tduIncSIA_S_T_RX;        /* 2300 Hz */
01051
01052
01053 /* @} */
01054
01058 /* @{ */
01059
01060 #define tdu_SFDT_DET_NONE_RX          0
01061
01062 #define tdu_SFDT_DET_V23FW_MARKS_RX   1
01064 extern const tduDetContext_t tduIncV23FW_MARKS_T;
01066 #define tdu_SFDT_DET_SS7COT_RX        2
01068 extern const tduDetContext_t tduIncSS7COT_T;
01070 #define tdu_SFDT_DET_V25_RX           3
01072 extern const tduDetContext_t tduIncV25_T_RX;
01073 extern const tduDetContext_t tduIncV25RX_DUMMY_T;
01075 #define tdu_SFDT_DET_2225_2250_2300_RX     4
01076 #define tdu_SFDT_DET_2225_RX          4
01078 extern const tduDetContext_t tduIncBELLRX1_T;
01080 #define tdu_SFDT_DET_2250_RX          5
01082 extern const tduDetContext_t tduIncBELLRX2_T;
01084 #define tdu_SFDT_DET_V18A_RX          6
01085 #define tdu_SFDT_DET_V18A_S_RX        7
01086 #define tdu_SFDT_DET_V21LOW_MARKS_RX  8
01087 #define tdu_SFDT_DET_V21LOW_S_RX      9
01088 #define tdu_SFDT_DET_CIDCAS_RX       10
01089 #define tdu_SFDT_DET_CASL_RX         10
01090 #define tdu_SFDT_DET_CASH_RX         11
01091 #define tdu_SFDT_DET_SIA_RX          6
01092 #define tdu_SFDT_DET_SIA_S_RX        7
01093
01094
01095 extern const tduDetContext_t tduIncV21LOW_MARKS_T;
01096 extern const tduDetContext_t tduIncSFDT_DUMMY1_T;
01097 extern const tduDetContext_t tduIncSFDT_DUMMY2_T;
01098 extern const tduDetContext_t tduIncSFDT_DUMMY3_T;
01099 /* @} */
01100
01101
01105 /* @{ */
01106 extern const tduDetContext_t tduIncDTMF;
01107 extern const tduDetContext_t tduIncR1;
01108 extern const tduDetContext_t tduIncR2FW;
01109 extern const tduDetContext_t tduIncR2BW;
01110 extern const tduDetContext_t tduIncUMF;
01112 extern const tduDetContext_t tduIncV8BIS_FS_F;
01114 extern const tduDetContext_t tduIncV21;
01115 extern const tduDetContext_t tduIncCPT;
01116 extern const tduDetContext_t tduIncCOIN_TONES; /* Coin tones detector context  */
01117 extern const tduDetContext_t tduIncCIDCAS;      /* Dual tone CID CAS
01118                                                    detector (single pair) */
01119 extern const tduDetContext_t tduIncV825_F;      /* V.8/V.25 detection
01120                                                    required by LLMR */
01121 extern const tduDetContext_t tduIncV21CM;       /* V.21CM flags detection */
01122 /* @} */
01123
01124
01128 /* @{ */
01129 extern const tduDetContext_t tduIncCASL_T_RX;   /* CAS low tone detector
01130                                                    on Rx path */
01131 extern const tduDetContext_t tduIncCASH_T_RX;   /* CAS high tone detector
01132                                                    on Rx path */
01133
01134 extern const tduDetContext_t tduIncV25_T_TX;    /* V.25 CED time domain
01135                                                    implementation,
01136                                                    transmit path */
01137 extern const tduDetContext_t tduIncCNG_T;       /* FAX CNG time domain
01138                                                    implementation */
01139 extern const tduDetContext_t tduIncV21UPPER_MARKS_LITE_T; /* V.21 upper channel,
01140                                                              1850/1650 Hz (0/1),
01141                                                              continuous marks */
01142
01143 /* @} */
01144
01145 /* @} */
01146
01160 /* @{ */
01161
01166 typedef struct {
01167   tbool (*Control) (void *tduInst, tint c_code, tduCfgCtl_t * cfg);
01168   void  (*Process) (void *tduInst, linSample * samples, void *alert);
01169 } tduTable_t;
01170
01172 typedef struct {
01173   tduTable_t      sfdf;
01174   tduTable_t      sfdt;
01175   tduTable_t      mf;
01176   tduTable_t      cpt;
01177   tduTable_t      v21;
01178   tduTable_t      bdtew;
01179   void            (*mf_cidcas_ctl) (tduCfgCtl_t * cfg, void *inst);
01180   void            (*sfd_llmr_ANSam_reset) (tint toneType, Fract tone_db_power, void *inst);
01181   void            (*sfd_llmr_ANSam) (tint toneType, Fract tone_db_power, void *inst);
01182                   tbool (*sfd_llmr_ANSam_test) (tint toneType, void *inst);
01183   void            (*mf_v8bis_fs_ctl) (tduCfgCtl_t * cfg, void *inst);
01184   void            (*digit_filter) (void *tduInst, tbool dtmf_mf, tint * toneId, tint * on_off);
01185   void            (*voice_disc) (void *tduInst);
01186   void            (*voice_disc_ctl) (void *tduInst, tint c_code, tduCfgCtl_t * cfg);
01187   void            (*bellTid) (tint * tid, tint freq);
01188   void            (*mf_coin_tones_ctl) (tduCfgCtl_t *cfg, void *inst);
01189 } tduIntFwTable_t;
01190
01191
01193 extern tbool     tduSFDControl (void *tduInst, tint c_code,
01194                                tduCfgCtl_t * cfg);
01195
01197 extern void     tduSFDFProcess (void *tduInst, linSample * samples,
01198                                 void *alert);
01199
01201 extern void     tduSFDTProcess (void *tduInst, linSample * samples,
01202                                 void *alert);
01203
01205 extern tbool     tduMFControl (void *tduInst, tint c_code,
01206                               tduCfgCtl_t * cfg);
01207
01209 extern void     tduMFProcess (void *tduInst, linSample * samples,
01210                               void *alert);
01211
01213 extern tbool     tduV21Control (void *tduInst, tint c_code,
01214                                tduCfgCtl_t * cfg);
01215
01217 extern void     tduV21Process (void *tduInst, linSample * samples,
01218                                void *alert);
01219
01221 extern tbool     tduCPTControl (void *tduInst, tint c_code,
01222                                tduCfgCtl_t * cfg);
01223
01225 extern void     tduCPTProcess (void *tduInst, linSample * samples,
01226                                void *alert);
01227
01229 extern tbool     tduBDTEWControl (void *tduInst, tint c_code,
01230                                  tduCfgCtl_t * cfg);
01231
01233 extern void     tduBDTEWProcess (void *tduInst, linSample * samples,
01234                                  void *alert);
01235
01236
01238 extern void     tdu_mf_cidcas_ctl (tduCfgCtl_t * cfg, void *inst);
01239
01241 extern void     tdu_sfd_llmr_ANSam_reset (tint toneType,
01242                                           Fract tone_db_power, void *inst);
01244 extern void     tdu_sfd_llmr_ANSam (tint toneType, Fract tone_db_power,
01245                                     void *inst);
01247 extern tbool     tdu_sfd_llmr_ANSam_test (tint toneType, void *inst);
01248
01250 extern void     tdu_mf_v8bis_fs_ctl (tduCfgCtl_t * cfg, void *inst);
01251
01253 extern void     tduBellTid (tint * tid, tint freq);
01254
01256 extern void tdu_mf_coin_tones_ctl (tduCfgCtl_t *cfg, void *inst);
01257
01259 extern void     tdu_digit_filter (void *tduInst, tbool dtmf_mf,
01260                                   tint * toneId, tint * on_off);
01261
01263 extern void     tduVoiceDiscCtl (void *tduInst, tint c_code,
01264                                  tduCfgCtl_t * cfg);
01265
01267 extern void     tduVoiceDiscProcess (void *tduInst);
01268
01270 extern tbool     tduDummyControl (void *tduInst, tint c_code,
01271                                  tduCfgCtl_t * cfg);
01273 extern void     tduDummyProcess (void *tduInst, void *samples);
01274
01275 extern const tduIntFwTable_t tduIntFwTable;
01276 /* @} */
01277
01289 /* @{ */
01290 typedef struct tduContext_s {
01291
01293   void            (*tdu_send_out) (tuint ID, tint repCode, tint on_off,
01294                                    tint time, tint power_dBm0,
01295                                    tduCptSmartRep_t * cpt_report);
01296
01298   void            (*baudotReport) (tuint ID, tint repCode,
01299                                    tint delayLineLen, void *delayLine);
01300   tint            (*digit_echo)   (tuint ID, tint repCode, LFract linPower);
01302   void *          (*gmpCreate) (tuint input_ID, tuint mode);
01304   void            (*gmpDelete) (tuint input_ID, void *gmp_ptr);
01306   void            (*gmpWrite)  (tuint input_ID, void *gmp_ptr, void *src_in, tint records_to_copy);
01308   tint            (*gmpRead)   (tuint input_ID, void *gmp_ptr, void *dst_out, tint records_to_copy);
01310   void *          (*gmpAllocGmc) (tuint MID);
01312   tbool           (*gmpFreeGmc) (tuint MID, void *ptr);
01313
01315   dbgInfo_t       debugInfo;
01316
01318   tuint           tduRxSaveSize;        /* Length of buffer in Rx direction */
01319
01321   tint            detNum;       /* Total number of sub-detectors */
01322
01324   tint            detNumSFDF;   /* Number of single frequency detectors -
01325                                    freq domain */
01326
01328   tint            detNumSFDT;   /* Number of single frequency detectors -
01329                                    time domain */
01330
01332   linSample      *work_buf;     /* Common scratch area for all instances -
01333                                    also first scratch buffer */
01334
01336   linSample      *local_buf;    /* Second derived scratch buffer */
01337
01339   LFract         *magnitudes;   /* Third derived scratch buffer */
01340
01342   tuint detInstVec[tdu_MAX_SLOT]; /* Array of indexes for all
01343                                    *  necessary sub-detector instances */
01344 } tduContext_t;
01345 /*  @} */
01351 typedef struct {
01352   tint            frame_size;
01354 } tduConfig_t;
01355
01356
01361 typedef struct {
01362   tint            maxSamplesPerFrame;
01363 #define tdu_SIZECFG_LITE 1
01364 #define tdu_SIZECFG_FULL 0
01365   tuint           lite;
01366 } tduSizeConfig_t;
01367
01372 typedef struct {
01373   tuint           ID;
01374   tduSizeConfig_t sizeCfg;
01375 } tduNewConfig_t;
01376
01382 typedef enum {
01383   tdu_RX_AFTER_CONF,
01384   tdu_RX_BEFORE_CONF,
01385   tdu_RX_ONLY
01386 } tduRxLocation_t;
01387
01393 typedef enum {
01394   tdu_TX_AFTER_CONF,
01395   tdu_TX_BEFORE_CONF,
01396   tdu_TX_ONLY
01397 } tduTxLocation_t;
01398
01402 typedef struct tduRepStats_s {
01403   tuint FalseAlert;
01407 #define tdu_FALSE_ALERT_CNT_MASK      0x00FF
01408 #define tdu_SET_FALSE_ALERT_CNT(x,v) (utlSetBitfield((x)->tduRepStats.FalseAlert, v,  0, 8))
01409 #define tdu_GET_FALSE_ALERT_CNT(x)   (utlGetBitfield((x)->tduRepStats.FalseAlert,     0, 8))
01410 #define tdu_SET_ON_OFF_FLAG(x,v)     (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 14, 2))
01411 #define tdu_GET_ON_OFF_FLAG(x)       (utlGetBitfield((x)->tduRepStats.FalseAlert,    14, 2))
01412 } tduRepStats_t;
01413
01417 /* @{ */
01418
01432 extern tint     tduGetSizes (tint * nbufs, const ecomemBuffer_t ** bufs,
01433                              tduSizeConfig_t * cfg);
01434
01451 extern tint     tduNew (void **tduInst, tint nbufs, ecomemBuffer_t * bufs,
01452                         tduNewConfig_t * cfg);
01453
01466 extern void     tduReceiveIn (void *tduInst, void *samples_in,
01467                               tduRxLocation_t location);
01468
01469
01470
01483 extern tbool     tduSendIn (void *tduInst, void *samples_in,
01484                            tduTxLocation_t location);
01485
01497 extern void     tduOpen (void *tduInst, tduConfig_t * cfg);
01498
01512 extern void     tduControl (void *tduInst, tint ccode, tduCfgCtl_t * cfg);
01513
01522 extern void     tduClose (void *tduInst);
01523
01536 extern void     tduDelete (void **tduInst, tint nbufs, ecomemBuffer_t * bufs);
01537
01549 extern void     tduGetStats (void *tduInst, tbool reset, tduRepStats_t *stats);
01550
01551 /* @brief TDU Call table. It may be used by system to interact with TDU. System
01552  * could populate with above APIs and use. <br>
01553  * TODO: should we take this out of TDU */
01554 typedef struct {
01555   void  (*tduClose)     (void *tduInst);
01556   void  (*tduControl)   (void *tduInst, tint c_code, tduCfgCtl_t * cfg);
01557   void  (*tduDelete)    (void **tduInst, tint nbufs, ecomemBuffer_t * bufs);
01558   tint  (*tduGetSizes)  (tint * nbufs, const ecomemBuffer_t ** bufs, tduSizeConfig_t * cfg);
01559   tint  (*tduNew)       (void **tduInst, tint nbufs, ecomemBuffer_t * bufs, tduNewConfig_t * cfg);
01560   void  (*tduOpen)      (void *tduInst, tduConfig_t * cfg);
01561   tbool (*tduSendIn)    (void *tduInst, void *samples, tduTxLocation_t location);
01562   void  (*tduReceiveIn) (void *tduInst, void *samples, tduRxLocation_t location);
01563 } tduCallTable_t;
01564 /* @} */
01565
01566 /* @} */ /*ingroup TDU */
01567 #endif  /* _TDU_H */
01568
01569 /* nothing past this point */


TDU: Test Tones 1000/1004 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

Test Tones 1000/1004 Hz SFD

Description

The test tone is used for various measurements: channel loss, frequency drift, SNR, switching time, etc. The detector reports the tone power and the estimated frequency, which can be used for the above measurements.

Three tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation E.180, March 1998, Technical Characteristics of Tones for the Telephone Service
  2. ITU-T Recommendation E.180, Supplement 2, January 1994, Various Tones Used in National Networks
  3. ITU-T Recommendation E.182, March 1998, Applications of Tones and Recorded Announcements in Telephone Services

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.8bis Dual Tone (1375 Hz & 2002 Hz) or (1529 Hz, 2225 Hz) Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.8bis Dual Tone (1375 Hz & 2002 Hz) or (1529 Hz, 2225 Hz) Detection

Description

V.8bis can select one of seven possible message types as an initiating signal. The selection depends on which V.8 bis transaction is used. The signals are: Mre, MRd, Cre, CRd, MS, CL, and ESi. Each of these signals consists of two segments. The first segment consists of the simultaneous transmission of a pair of tones for 400 ms (but it can be shorter in certain situations - 285 ms). The second segment consists of a single tone.

Four tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test for each tone
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds) for each tone
  3. Tone-to-the-rest-of-signal ratio
  4. Twist test (power difference between two tones)

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1 or Bell 202 (primary or secondary direction).

The detection report includes: tone ID, on/off type of event, frequency estimate of each tone, power estimate (combined tones), and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.8bis, 11-2000, Procedures for the identification and selection of common modes of operation between data circuit-terminating equipments (DCEs) and between data terminal equipments (DTEs) over the public switched telephone network and on leased point-to-point telephone-type circuits

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.8 Call Menu (CM) & Call Indicator(CI) Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.8 Call Menu (CM) & Call Indicator(CI) Detection

Description

A V.8-capable calling DCE may optionally transmit the V.8 Function Call Indicator (CI) as an alternative to CED and CT. This signal is not tonal but is a coded modulated signal using V.21(L) at 300 bit/s. CI is transmitted with a regular cadence. The On duration is not less than 3 periods of the CI signal, and is not greater than 2 seconds. The Off duration is not less than 0.4 seconds and is not greater than 2 seconds. This signal carries information about the transmission type (Modem, Fax, Text Phone, or H.324).

The V.8 Call Menu (CM) signal is transmitted after ANS is detected from the remote end. ANS initiates modulation-mode selection.

The DSP may choose to suppress the voice path if V.34 fax indication (CM) is detected. This would cause V.34 Fax equipment to train to a lower speed, which can then be supported by T.38 relay.

Standards Compliance

  1. ITU-T Recommendation V.21, 11-1988, 300 bits per second duplex modem standardized for use in the general switched telephone network
  2. ITU-T Recommendation V.8, 11-2000, Procedures for starting sessions of data transmission over the public switched telephone network
  3. ITU-T Recommendation V.152, 2004, Procedures for supporting Voice-Band Data over IP networks

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.18A 1400 Hz or 1800 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » V.18A 1400 Hz or 1800Hz SFD

V.18A 1400 Hz or 1800 Hz SFD

Description

One signal defined by ITU-T Recommendation V.18A is Baudot FSK modem transmission (TDD). This modem signal uses 1400 Hz and 1800 Hz as keying frequencies with a baud rate of 45.45 bit/s or 50bit/s. Some modems follow the recommendation to transmit 150 ms of 1400 Hz tone before the actual data. This detector triggers on the LTRS character, which has more than 120 ms of continuous 1400 Hz tone.

The probability of detecting various Baudot modems is increased by an additional detector at 1800 Hz, which triggers on 5 or more consecutive 0 bits.

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, and hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate, and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.18, 11-2000, Operational and interworking requirements for DCEs operating in the text telephone mode
  2. ITU-T Recommendation V.18, V.18 (2000) Amendment 1, 11-2002, Harmonization with ANSI TIA/EIA-825 (2000) text phones
  3. ITU-T Recommendation V.150.1, 01-2003, Modem-over-IP networks: Procedures for the end-to-end connection of V-series DCEs
  4. ITU-T Recommendation V.152, 2004, Procedures for supporting Voice-Band Data over IP networks

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 10 ms
  • Not all Baudot modems transmit leading a 1400 Hz tone, so these detectors may not indicate the start of all Baudot modems
  • There is a special information signal: 950-1400-1800 Hz (330 ms for each portion), which false triggers the detector
  • There is an optional conversation recording indicator signal: 1400 Hz, which also false triggers the detector
  • False detection may be triggered by some other modems, or by the SS7 continuity tone at 1780 Hz

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.18A 1400 Hz or 1800Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.18A 1400 Hz or 1800Hz SFD

Description

This is the same as the V.18a detector in the Primary Direction (see V.18A 1400 Hz or 1800 Hz SFD).


TDU: V.21(H) HDLC Flags Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.21(H) HDLC Flags Detection

Description

This signal is used as the most reliable indication of FAX signal presence on the line. The receiving FAX equipment responds with a long sequence of HDLC flags (0x7E) transmitted using V.21(H) modulation. The length of the flag sequence, which is standards defined, is 0.85 - 1.15 seconds.

After detection of the Flags, in many cases fax relay switchover (to T.38) is initiated (controlled by the host, not by the DSP).

The event is qualified if 4 consecutive Flags are detected. The event is reported as finished, if no Flags are detected for run-time configurable hangover time.

A detection report includes: tone ID, edge (on/off), power estimate, and timestamp of the internal clock.

Standards Compliance

  1. ITU-T Recommendation V.21, 11-1988, 300 bits per second duplex modem standardized for use in the general switched telephone network
  2. ITU-T Recommendation T.30, 07-2003, Procedures for document facsimile transmission in the general switched telephone network

Limitations

  • Power estimation accuracy is ±1 dBm

Configuration

  • The detector can be turned on or off
  • Hangover time (minimum duration with no Flags detected, used to detect Flags disappeared event)


TDU: V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD

V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD

Description

V.21 is a full-duplex modem protocol using frequency multiplex: V.21(L) 980 Hz - 1180 Hz, and V.21(H) 1650 Hz - 1850 Hz. It is often used by modems in initial handshaking (e.g., exchange of DCE capabilities).

This type of signal is recognized by a preamble consisting of consecutive marks in either channel.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.21, 11-1988, 300 bits per second duplex modem standardized for use in the general switched telephone network
  2. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band data over IP networks

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD

Description

This is the same as the V.21 Marks detector in the Primary Direction (see V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD).


TDU: V.22 Unscrambled Binary Ones (USB1) 2250 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » V.22 Unscrambled Binary Ones (UNS1) (2250 Hz) SFD

V.22 Unscrambled Binary Ones (USB1) 2250 Hz SFD

Description

USB1 is used as an answering signal per ITU-T Recommendations V.22 and V.22 bis. The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.22, 11-1988, 1200 bits per second duplex modem standardized for use in the general switched telephone network and on point-to-point 2-wire leased telephone-type circuits
  2. ITU-T Recommendation V.22bis, 1993, 2400 bits per second duplex modem using the frequency division technique standardized for use on the general switched telephone network and on point-to-point 2-wire leased telephone-type circuits
  3. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-Band data over IP networks

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.22 Unscrambled Binary Ones (UNS1) (2250 Hz) SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.22 Unscrambled Binary Ones (UNS1) (2250 Hz) SFD

Description

This is the same as the UNS1 detector in the Primary Direction (see V.22 Unscrambled Binary Ones (USB1) 2250 Hz SFD).

This detector is configured simultaneously with the UNS1 Primary Direction detector. The same configuration parameters are used.


TDU: V.23 Marks: 1300 Hz (fwd) or 390 Hz (bkwd) SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.23 Marks: 1300 Hz (fwd) or 390 Hz (bkwd) SFD

Description

There are two signals that should be detected to recognize a V.23 modem: a preamble at 1300 Hz indicating a V.23 forward channel and a preamble at 390 Hz indicating a V.23 backward channel.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.23, 11-1988, 600/1200-baud modem standardized for use in the general switched telephone network
  2. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band data over IP networks
  3. ITU-T Recommendation R.35, 1988, Standardization of FMVFT systems for a modulation rate of 50 bauds

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms
  • Backward channel preamble is a tone with the lowest frequency currently detected by the tone detection unit. Since speech signals can have significant components in this band, qualification time below 100 ms may lead to an unacceptable number of false alerts

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
    • Default value is 200 ms
    • Minimum configurable value is 20 ms
    • Maximum configurable value is 2047 ms
  • Minimum power threshold
    • Default value is -46 dBm
    • Minimum configurable value is -48 dBm
    • Maximum configurable value is -15 dBm


TDU: V.32 Ext (2100 Hz followed by 1800 Hz in secondary direction)

TDU (Tone Detection Unit) Package » Detailed TDU Description » V.32 Ext (2100 Hz followed by 1800 Hz in primary direction)

V.32 Ext (2100 Hz followed by 1800 Hz in secondary direction)

Description

This detection is performed along with the V.25 detector. First detect the 2100 Hz on the primary direction, followed by detecting 1800 Hz on the secondary direction. This is used for detecting old implementations of V.32 modems.

Standards Compliance

  1. ITU-T Recommendation V.32bis, 1991, A duplex modem operating at data signalling rates of up to 14 400 bit/s for use on the general switched telephone network and on leased point-to-point 2-wire telephone-type circuits

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.32 Ext (2100 Hz followed by 1800 Hz in primary direction)

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.32 Ext (2100 Hz followed by 1800 Hz in primary direction)

Description

This is the same as the V.32 Ext detector in the Primary Direction with the direction reversed. (see V.32 Ext (2100 Hz followed by 1800 Hz in secondary direction)).


TDU Test: Data Structures

  • Data Structures
  • Data Fields

TDU Test Data Structures

Here are the data structures with brief descriptions:
sigGenPars_t
sysCtDiscrim_t
sysTduResults_t
tduSim_t


TDU Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

All simulation configuration parameters are in the tduSim structure. This structure may be configured before testing, but is not required. It is suggested that this structure be opened in a Watch Window for easy access.

  1. Set a breakpoint the last line of code in tdusim.c (loop;)
  2. Make changes to the simulation parameters (tduSim) as desired.
  3. Run and let the simulation halt at the breakpoint.
  4. When the test concludes a file testrep.txt will have been created in the tdu\test\lnkr\c<targ>\ directory. The file contains a text capture of all progress and events displayed in the CCS output window during simulation.

Refer to TDU Test Reference for specific test details:


TDU Test: RX File Tone Detection

TDU Test Reference

RX File Tone Detection

Test Purpose

Qualify the TDU's ability to identify RX tone events

Test Parameters

The test allows for variation of the following parameters:

  • PCM file to read for input
  • RX path TDU detector to enable

The test uses the following constant parameters:

N/A

Test Procedure

  1. Enables the specified TDU RX path detector.
  2. Reads the specified PCM file amd passes the data, frame-by-frame to the TDU API function tduReceiveIn().
  3. Continues until EOF is reached.

Expected Results

Minimal Output

At the beginning of each test a message is output displaying the PCM file name under test.

Detection Output

Each test PCM file is unique. Accordingly, the expected results are unique and should be checked against the specific PCM file for proper operation.


TDU Test: TX File Tone Detection

TDU Test Reference

TX File Tone Detection

Test Purpose

Qualify the TDU's ability to identify TX tone events

Test Parameters

The test allows for variation of the following parameters:

  • PCM file to read for input
  • TX path TDU detector to enable

The test uses the following constant parameters:

N/A

Test Procedure

  1. Enables the specified TDU TX path detector.
  2. Reads the specified PCM file amd passes the data, frame-by-frame to the TDU API function tduSendIn().
  3. Continues until EOF is reached.

Expected Results

Minimal Output

At the beginning of each test a message is output displaying the PCM file name under test.

Detection Output

Each test PCM file is unique. Accordingly, the expected results are unique and should be checked against the specific PCM file for proper operation.


TDU Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


TDU Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


TDU Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


TDU Test: File Index

  • File List
  • Globals

TDU Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
tdusim.c [code] |
tdusimport.h [code] |
tstgmp.c [code] |
tstgmp.h [code] | Contains definitions and external APIs for GMP test functions


TDU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • d
  • e
  • f
  • h
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • add_tag : tduSim_t

- c -

  • cfgCtl : tduSim_t
  • cpt_report : sysTduResults_t

- d -

  • dc_offset : sigGenPars_t
  • detect_cnt : sysCtDiscrim_t
  • detect_req : sysCtDiscrim_t

- e -

  • enable_sia : tduSim_t

- f -

  • f1 : sigGenPars_t
  • f2 : sigGenPars_t
  • fileCLOSE : sigGenPars_t
  • fileFORMAT : sigGenPars_t
  • fileINPUT : sigGenPars_t
  • fileNAME : sigGenPars_t
  • filePtr : sigGenPars_t
  • frame_size : tduSim_t
  • frm_count : sigGenPars_t
  • fsk_dataptr : sigGenPars_t
  • fsk_duration : sigGenPars_t
  • fsk_numword : sigGenPars_t

- h -

  • hangover_time : sysTduResults_t
  • hoth_wng_seed : sigGenPars_t

- i -

  • inst : sigGenPars_t

- m -

  • max_frame_length : tduSim_t
  • mf_on_off : sysTduResults_t
  • mf_power : sysTduResults_t
  • mf_tid : sysTduResults_t
  • mf_type : tduSim_t

- n -

  • noise_level : sigGenPars_t
  • noise_seed : sigGenPars_t
  • noise_type : sigGenPars_t

- o -

  • options : tduSim_t
  • overwrite_scr : tduSim_t

- p -

  • pattern : tduSim_t
  • power_level : sigGenPars_t
  • pr_enable : sigGenPars_t
  • pr_period : sigGenPars_t
  • profile : tduSim_t

- r -

  • report : tduSim_t
  • rxSGN : tduSim_t

- s -

  • state : sigGenPars_t , sysCtDiscrim_t

- t -

  • t_amp1 : sigGenPars_t
  • t_amp2 : sigGenPars_t
  • tdu_lite : tduSim_t
  • timer_cnt : sysCtDiscrim_t
  • toggle_rx_sgn : tduSim_t
  • toggle_tdu : tduSim_t
  • toggle_tx_sgn : tduSim_t
  • txSGN : tduSim_t

- w -

  • wf_type : sigGenPars_t


TDU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • d
  • e
  • f
  • h
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • w

- a -

  • add_tag : tduSim_t

- c -

  • cfgCtl : tduSim_t
  • cpt_report : sysTduResults_t

- d -

  • dc_offset : sigGenPars_t
  • detect_cnt : sysCtDiscrim_t
  • detect_req : sysCtDiscrim_t

- e -

  • enable_sia : tduSim_t

- f -

  • f1 : sigGenPars_t
  • f2 : sigGenPars_t
  • fileCLOSE : sigGenPars_t
  • fileFORMAT : sigGenPars_t
  • fileINPUT : sigGenPars_t
  • fileNAME : sigGenPars_t
  • filePtr : sigGenPars_t
  • frame_size : tduSim_t
  • frm_count : sigGenPars_t
  • fsk_dataptr : sigGenPars_t
  • fsk_duration : sigGenPars_t
  • fsk_numword : sigGenPars_t

- h -

  • hangover_time : sysTduResults_t
  • hoth_wng_seed : sigGenPars_t

- i -

  • inst : sigGenPars_t

- m -

  • max_frame_length : tduSim_t
  • mf_on_off : sysTduResults_t
  • mf_power : sysTduResults_t
  • mf_tid : sysTduResults_t
  • mf_type : tduSim_t

- n -

  • noise_level : sigGenPars_t
  • noise_seed : sigGenPars_t
  • noise_type : sigGenPars_t

- o -

  • options : tduSim_t
  • overwrite_scr : tduSim_t

- p -

  • pattern : tduSim_t
  • power_level : sigGenPars_t
  • pr_enable : sigGenPars_t
  • pr_period : sigGenPars_t
  • profile : tduSim_t

- r -

  • report : tduSim_t
  • rxSGN : tduSim_t

- s -

  • state : sigGenPars_t , sysCtDiscrim_t

- t -

  • t_amp1 : sigGenPars_t
  • t_amp2 : sigGenPars_t
  • tdu_lite : tduSim_t
  • timer_cnt : sysCtDiscrim_t
  • toggle_rx_sgn : tduSim_t
  • toggle_tdu : tduSim_t
  • toggle_tx_sgn : tduSim_t
  • txSGN : tduSim_t

- w -

  • wf_type : sigGenPars_t


TDU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines
  • _
  • c
  • d
  • e
  • f
  • g
  • l
  • m
  • o
  • p
  • r
  • s
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • _TDUSIMPORT_C55L : tdusimport.h
  • _TDUSIMPORT_C64 : tdusimport.h
  • _TDUSIMPORT_C64_BIG_ENDIAN : tdusimport.h
  • _TDUSIMPORT_C64P : tdusimport.h
  • _TDUSIMPORT_C64P_BIG_ENDIAN : tdusimport.h

- c -

  • CT_DISCRIM_STATE_RESET : tdusim.c
  • CT_DISCRIM_STATE_V23ENA : tdusim.c
  • CT_DISCRIM_STATE_V23RPT : tdusim.c

- d -

  • digit_strings : tdusim.c

- e -

  • event_string : tdusim.c

- f -

  • freport : tdusim.c

- g -

  • generate_tone_frame() : tdusim.c
  • gmp_array : tstgmp.c
  • gmp_position : tstgmp.c
  • gmp_ptr : tstgmp.c
  • gmp_single_cell : tstgmp.c
  • gmp_single_cell_tracking : tstgmp.c
  • gmpAllocGmc() : tstgmp.h , tstgmp.c
  • gmpCreate() : tstgmp.h , tstgmp.c
  • gmpDelete() : tstgmp.c , tstgmp.h
  • gmpFreeGmc() : tstgmp.h , tstgmp.c
  • gmpRead() : tstgmp.h , tstgmp.c
  • gmpWrite() : tstgmp.h , tstgmp.c

- l -

  • loop : tdusim.c

- m -

  • main() : tdusim.c

- o -

  • overwriteScratchBuffers() : tdusim.c

- p -

  • prof_output : tdusim.c
  • profile_fptr : tdusim.c

- r -

  • rx_frame_no : tdusim.c
  • rx_in_frame : tdusim.c
  • rxprof_beg_cnt : tdusim.c
  • rxprof_cnt : tdusim.c
  • rxprof_end_cnt : tdusim.c
  • rxprof_fstr : tdusim.c

- s -

  • sftAllDetectionFILE() : tdusim.c
  • sftBasicDetection() : tdusim.c
  • sftBasicDetectionFILE() : tdusim.c
  • sftBasicDetectionRxFILE() : tdusim.c
  • sftBasicDetectionRxFILE_NW() : tdusim.c
  • sftBasicRxDetection() : tdusim.c
  • sftVerifyRange() : tdusim.c
  • sftVerifyRangeRx() : tdusim.c
  • sys_dbg_array : tdusim.c
  • sys_dbg_id : tdusim.c
  • sys_dbg_message : tdusim.c
  • sys_input_file() : tdusim.c
  • sys_new_sgn() : tdusim.c
  • sys_new_tdu() : tdusim.c
  • sys_open_sgn() : tdusim.c
  • sys_open_tdu() : tdusim.c
  • sys_set_sgn() : tdusim.c
  • sys_tdu_results : tdusim.c
  • sysCtDiscrim : tdusim.c
  • sysDebug() : tdusim.c
  • sysDebugInfo() : tdusim.c
  • sysDebugInternal() : tdusim.c
  • sysException() : tdusim.c , tstgmp.c
  • system_CT_discrim_proc() : tdusim.c
  • system_CT_discrim_rpt() : tdusim.c
  • sysToneDetect() : tdusim.c

- t -

  • takeFileSamples() : tdusim.c
  • tdu_b202_minor : tdusim.c
  • tdu_bell_minor : tdusim.c
  • tdu_ced_minor : tdusim.c
  • tdu_cedpr_minor : tdusim.c
  • tdu_coin_minor : tdusim.c
  • tdu_direction : tdusim.c
  • tdu_event : tdusim.c
  • tdu_null_minor : tdusim.c
  • tdu_prof_nxt_sec : tdusim.c
  • tdu_prof_sample_cnt : tdusim.c
  • tdu_prof_sec_cnt : tdusim.c
  • tdu_sia_minor : tdusim.c
  • tdu_SIM_DBGMSG_SIZE : tdusim.c
  • tdu_SIM_FILEIO_A_PCM : tdusim.c
  • tdu_SIM_FILEIO_LIN : tdusim.c
  • tdu_SIM_FILEIO_LINWAV : tdusim.c
  • tdu_SIM_FILEIO_MU_PCM : tdusim.c
  • tdu_SIM_PROFILE_BASE_DIR : tdusim.c
  • tdu_SIM_RX_FILE_NAME : tdusim.c
  • tdu_SIM_TX_FILE_NAME : tdusim.c
  • TDU_SYS_CT1300_DWINHI_CNT : tdusim.c
  • TDU_SYS_CT1300_DWINLO_CNT : tdusim.c
  • TDU_SYS_CT1300_ENABLE_CNT : tdusim.c
  • TDU_SYS_CT1300_RESET_CNT : tdusim.c
  • tdu_v18_minor : tdusim.c
  • tdu_v21ci_minor : tdusim.c
  • tdu_v21modem_minor : tdusim.c
  • tdu_v23modem_minor : tdusim.c
  • tdu_v8bis_minor : tdusim.c
  • tdu_vdisc_minor : tdusim.c
  • tduBufs : tdusim.c
  • tduContext : tdusim.c
  • tduContext_size : tdusim.c
  • tduDetContexts : tdusim.c
  • tduDetContexts_size : tdusim.c
  • tduInst : tdusim.c
  • tduIntFwTable : tdusim.c
  • tduIntFwTable_size : tdusim.c
  • tduNbufs : tdusim.c
  • tduSim : tdusim.c
  • TDUSIM_NUM_B202_MINOR : tdusim.c
  • TDUSIM_NUM_BELL_MINOR : tdusim.c
  • TDUSIM_NUM_CED_MINOR : tdusim.c
  • TDUSIM_NUM_CEDPR_MINOR : tdusim.c
  • TDUSIM_NUM_COIN_MINOR : tdusim.c
  • TDUSIM_NUM_DIGIT : tdusim.c
  • TDUSIM_NUM_DIRECTION : tdusim.c
  • TDUSIM_NUM_EVENT : tdusim.c
  • TDUSIM_NUM_SIA_MINOR : tdusim.c
  • TDUSIM_NUM_TONE : tdusim.c
  • TDUSIM_NUM_V18_MINOR : tdusim.c
  • TDUSIM_NUM_V21CI_MINOR : tdusim.c
  • TDUSIM_NUM_V21MODEM_MINOR : tdusim.c
  • TDUSIM_NUM_V23MODEM_MINOR : tdusim.c
  • TDUSIM_NUM_V8BIS_MINOR : tdusim.c
  • TDUSIM_NUM_VDISC_MINOR : tdusim.c
  • TDUSIM_REPORT_STRING_LENGTH : tdusim.c
  • TDUSIM_STRING_LENGTH : tdusim.c
  • tduSimProfile() : tdusim.c
  • tduTestCaseTag : tdusim.c
  • tone_strings : tdusim.c
  • TST_MAX_FRAME : tdusim.c
  • TST_SAVE_BUFF : tdusim.c
  • TSTTDU_MAX_GMCS : tstgmp.c
  • TSTTDU_MAX_STORAGE : tstgmp.c
  • tx_frame_no : tdusim.c
  • tx_in_frame : tdusim.c
  • txprof_beg_cnt : tdusim.c
  • txprof_cnt : tdusim.c
  • txprof_end_cnt : tdusim.c
  • txprof_fstr : tdusim.c

- v -

  • v21_flags : tdusim.c


TDU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines
  • _
  • l
  • t

- _ -

  • _TDUSIMPORT_C55L : tdusimport.h
  • _TDUSIMPORT_C64 : tdusimport.h
  • _TDUSIMPORT_C64_BIG_ENDIAN : tdusimport.h
  • _TDUSIMPORT_C64P : tdusimport.h
  • _TDUSIMPORT_C64P_BIG_ENDIAN : tdusimport.h

- l -

  • loop : tdusim.c

- t -

  • tdu_SIM_DBGMSG_SIZE : tdusim.c
  • tdu_SIM_PROFILE_BASE_DIR : tdusim.c
  • tdu_SIM_RX_FILE_NAME : tdusim.c
  • tdu_SIM_TX_FILE_NAME : tdusim.c
  • TDU_SYS_CT1300_DWINHI_CNT : tdusim.c
  • TDU_SYS_CT1300_DWINLO_CNT : tdusim.c
  • TDU_SYS_CT1300_ENABLE_CNT : tdusim.c
  • TDU_SYS_CT1300_RESET_CNT : tdusim.c
  • TDUSIM_NUM_B202_MINOR : tdusim.c
  • TDUSIM_NUM_BELL_MINOR : tdusim.c
  • TDUSIM_NUM_CED_MINOR : tdusim.c
  • TDUSIM_NUM_CEDPR_MINOR : tdusim.c
  • TDUSIM_NUM_COIN_MINOR : tdusim.c
  • TDUSIM_NUM_DIGIT : tdusim.c
  • TDUSIM_NUM_DIRECTION : tdusim.c
  • TDUSIM_NUM_EVENT : tdusim.c
  • TDUSIM_NUM_SIA_MINOR : tdusim.c
  • TDUSIM_NUM_TONE : tdusim.c
  • TDUSIM_NUM_V18_MINOR : tdusim.c
  • TDUSIM_NUM_V21CI_MINOR : tdusim.c
  • TDUSIM_NUM_V21MODEM_MINOR : tdusim.c
  • TDUSIM_NUM_V23MODEM_MINOR : tdusim.c
  • TDUSIM_NUM_V8BIS_MINOR : tdusim.c
  • TDUSIM_NUM_VDISC_MINOR : tdusim.c
  • TDUSIM_REPORT_STRING_LENGTH : tdusim.c
  • TDUSIM_STRING_LENGTH : tdusim.c
  • TST_MAX_FRAME : tdusim.c
  • TST_SAVE_BUFF : tdusim.c
  • TSTTDU_MAX_GMCS : tstgmp.c
  • TSTTDU_MAX_STORAGE : tstgmp.c


TDU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines

  • CT_DISCRIM_STATE_RESET : tdusim.c
  • CT_DISCRIM_STATE_V23ENA : tdusim.c
  • CT_DISCRIM_STATE_V23RPT : tdusim.c
  • tdu_SIM_FILEIO_A_PCM : tdusim.c
  • tdu_SIM_FILEIO_LIN : tdusim.c
  • tdu_SIM_FILEIO_LINWAV : tdusim.c
  • tdu_SIM_FILEIO_MU_PCM : tdusim.c


TDU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines
  • g
  • m
  • o
  • s
  • t

- g -

  • generate_tone_frame() : tdusim.c
  • gmpAllocGmc() : tstgmp.c , tstgmp.h
  • gmpCreate() : tstgmp.c , tstgmp.h
  • gmpDelete() : tstgmp.h , tstgmp.c
  • gmpFreeGmc() : tstgmp.c , tstgmp.h
  • gmpRead() : tstgmp.c , tstgmp.h
  • gmpWrite() : tstgmp.c , tstgmp.h

- m -

  • main() : tdusim.c

- o -

  • overwriteScratchBuffers() : tdusim.c

- s -

  • sftAllDetectionFILE() : tdusim.c
  • sftBasicDetection() : tdusim.c
  • sftBasicDetectionFILE() : tdusim.c
  • sftBasicDetectionRxFILE() : tdusim.c
  • sftBasicDetectionRxFILE_NW() : tdusim.c
  • sftBasicRxDetection() : tdusim.c
  • sftVerifyRange() : tdusim.c
  • sftVerifyRangeRx() : tdusim.c
  • sys_input_file() : tdusim.c
  • sys_new_sgn() : tdusim.c
  • sys_new_tdu() : tdusim.c
  • sys_open_sgn() : tdusim.c
  • sys_open_tdu() : tdusim.c
  • sys_set_sgn() : tdusim.c
  • sysDebug() : tdusim.c
  • sysDebugInfo() : tdusim.c
  • sysDebugInternal() : tdusim.c
  • sysException() : tstgmp.c , tdusim.c
  • system_CT_discrim_proc() : tdusim.c
  • system_CT_discrim_rpt() : tdusim.c
  • sysToneDetect() : tdusim.c

- t -

  • takeFileSamples() : tdusim.c
  • tduSimProfile() : tdusim.c


TDU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerator
  • Defines
  • d
  • e
  • f
  • g
  • p
  • r
  • s
  • t
  • v

- d -

  • digit_strings : tdusim.c

- e -

  • event_string : tdusim.c

- f -

  • freport : tdusim.c

- g -

  • gmp_array : tstgmp.c
  • gmp_position : tstgmp.c
  • gmp_ptr : tstgmp.c
  • gmp_single_cell : tstgmp.c
  • gmp_single_cell_tracking : tstgmp.c

- p -

  • prof_output : tdusim.c
  • profile_fptr : tdusim.c

- r -

  • rx_frame_no : tdusim.c
  • rx_in_frame : tdusim.c
  • rxprof_beg_cnt : tdusim.c
  • rxprof_cnt : tdusim.c
  • rxprof_end_cnt : tdusim.c
  • rxprof_fstr : tdusim.c

- s -

  • sys_dbg_array : tdusim.c
  • sys_dbg_id : tdusim.c
  • sys_dbg_message : tdusim.c
  • sys_tdu_results : tdusim.c
  • sysCtDiscrim : tdusim.c

- t -

  • tdu_b202_minor : tdusim.c
  • tdu_bell_minor : tdusim.c
  • tdu_ced_minor : tdusim.c
  • tdu_cedpr_minor : tdusim.c
  • tdu_coin_minor : tdusim.c
  • tdu_direction : tdusim.c
  • tdu_event : tdusim.c
  • tdu_null_minor : tdusim.c
  • tdu_prof_nxt_sec : tdusim.c
  • tdu_prof_sample_cnt : tdusim.c
  • tdu_prof_sec_cnt : tdusim.c
  • tdu_sia_minor : tdusim.c
  • tdu_v18_minor : tdusim.c
  • tdu_v21ci_minor : tdusim.c
  • tdu_v21modem_minor : tdusim.c
  • tdu_v23modem_minor : tdusim.c
  • tdu_v8bis_minor : tdusim.c
  • tdu_vdisc_minor : tdusim.c
  • tduBufs : tdusim.c
  • tduContext : tdusim.c
  • tduContext_size : tdusim.c
  • tduDetContexts : tdusim.c
  • tduDetContexts_size : tdusim.c
  • tduInst : tdusim.c
  • tduIntFwTable : tdusim.c
  • tduIntFwTable_size : tdusim.c
  • tduNbufs : tdusim.c
  • tduSim : tdusim.c
  • tduTestCaseTag : tdusim.c
  • tone_strings : tdusim.c
  • tx_frame_no : tdusim.c
  • tx_in_frame : tdusim.c
  • txprof_beg_cnt : tdusim.c
  • txprof_cnt : tdusim.c
  • txprof_end_cnt : tdusim.c
  • txprof_fstr : tdusim.c

- v -

  • v21_flags : tdusim.c


TDU Test: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


TDU Test: TDU Unit Test

TDU Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Profiling Procedure
  5. Dependent Packages

Description

This package contains a basic test for the TDU. This is not a regression test, its purpose is to show how the TDU module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Building Unit Test

The TDU Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the TDU Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main TDU documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The TDU Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the TDU Unit Test image for the target of interest
    • Will reside in the tdu\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the TDU project for the target of interest
    • Will be a subdirectory off the tdu\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the tdu\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)


TDU Test: MF Digit Sequence Detection

TDU Test Reference

MF Digit Sequence Detection

Test Purpose

This test qualifies the TDU's ability to identify DTMF digits under various impairments. Each test provides the sequence of DTMF tones from a typical telephonic device row-by-row as identified below:

       +-----+-----+-----+-----+
       |     |     |     |     |
       |  1  |  2  |  3  |  A  |
       |     |     |     |     |
       +-----+-----+-----+-----+
       |     |     |     |     |
       |  4  |  5  |  6  |  B  |
       |     |     |     |     |
       +-----+-----+-----+-----+
       |     |     |     |     |
       |  7  |  8  |  9  |  C  |
       |     |     |     |     |
       +-----+-----+-----+-----+
       |     |     |     |     |
       |  *  |  0  |  #  |  D  |
       |     |     |     |     |
       +-----+-----+-----+-----+

    Sequence:  {"1", "2", "3", "A", "4", "5", "6", "B", "7", "8", "9", "C", ...
                "*", "0", "#", "D"}

Test Parameters

The test allows for variation of the following parameters:

  • PCM file to read for input

The test uses the following constant parameters:

  • TDU V21 detector enabled

Test Procedure

  1. Enables the TDU V.21 TX path detector.
  2. Reads the specified PCM file amd passes the data, frame-by-frame to the TDU API function tduSendIn().
  3. Continues until EOF is reached.

Expected Results

Minimal Output

At the beginning of each test a message is output displaying the PCM file under test.

Detection Output

When a DTMF detection event occurs, information regarding the event is output. For example, digit detection may appear as:

  Digit: "1"     :  Event: ALERT  ON,  Time:   15 ms,  Power: -83 dBm0,  Frame: 1128
  Digit: "1"     :  Event:  ON,  Time:   30 ms,  Power: -11 dBm0,  Frame: 1132
  Digit: "1"     :  Event: OFF,  Time:   20 ms,  Power: -580 dBm0,  Frame: 1141

In the example above, each line represents a digit detection event.

The first line indicates:

  • Event "ALERT ON" occurred. This provides early warning of a potential digit "ON" event.
  • The digit is "1"
  • The lag time for reporting is ~15ms (the potential digit started ~15ms ago.

The second line indicates:

  • Event "ON" occurred. The digit has been detected.
  • The digit is "1"
  • The digit power is ~ -11 dBm0
  • The lag time for reporting is ~30ms (the confirmed digit started ~30ms ago.

The third line indicates:

  • Event "OFF" occurred. The digit has ended.
  • The digit was "1"
  • The lag time for reporting is ~20ms (the digit ended ~20ms ago.

Note:
It is expected that each of the 16 digits are identified as in the example above. Though the lag times may vary, each digit should follow the event progression of "ALERT", "ON" followed by "OFF".


TDU Test: Page Index

TDU Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • TDU Test Reference
  • Profiling Procedure
  • Disclaimer


TDU Test: Profiling Procedure

Profiling Procedure

  1. Set a breakpoint the last line of code in tdusim.c (loop;)
  2. Set tduSim.options.profile to 1
  3. Run and let the simulation halt at the breakpoint.

The profiling procedure measures the TDU cycle requirements for three signal scenarios:

  1. Speech
    • TX file: tx_speech.ula
    • RX file: rx_speech.ula
    • 60 second conversation
    • Periods of speech and silence in each direction
    • Periods of doubletalk
  2. Tones
    • TX file: tx_tone.ula
    • RX file: rx_tone.ula
    • 28 second tone files
    • Emulates call setup scenario
    • DTMF in TX direction
    • Dialtone, ringback and CED with PR in TX direction
  3. Silence
    • TX file: tx_silence.ula
    • RX file: rx_silence.ula
    • 12 second files with -68dBm0 noise floor

Note:
Each of the three scenarios above reads individual TX and RX PCM files and passes them to the appropppriate TDU API function. The TX data is passed to tduSendIn() and the RX data is passed to tduReceiveIn().

Profiling Output

The profiling procedure above generates three text files; one for each of the test scenarios:

  1. Speech: speech_profiling.txt
  2. Tones: tone_profiling.txt
  3. Silence: silence_profiling.txt

Each of the text files has two columns, the first for TX (primary) path cycles and the second for RX (secondary) path cycles. All cycle metrics are with respect to the frame size used in simulation.

These text files can be used to determine peak, minimum and average MIPS requirements for the TDU in any manner required.

Note:
See the MIPS and Memory section in the main TDU documentation for current profiling results.


TDU Test: RX Range Verification (Pre-Conferencing)

TDU Test Reference

RX Range Verification (Pre-Conferencing)

Test Purpose

RX range verification (pre-conferencing) is identical to RX range verification, but with the TDU configured for "pre-conferencing" mode. The test qualifies the TDU's ability to identify RX tone events (both ON and OFF) over a range of both tone powers and tone periods. This test calls the TDU API function tduReceiveIn() for detection.

Test Parameters

The test allows for variation of the following parameters:

  • TDU detector enable code
  • Enable phase reversal detection
  • Preliminary tone OFF period (# frames)
  • Minimum tone ON period (# frames)
  • Maximum tone ON period (# frames)
  • Tone period increment (# frames)
  • Trailing Tone OFF period (# frames)
  • Single tone frequency (Hz)

The test uses the following constant parameters:

  • Maximum tone power (+2 dB)
  • Minimum tone power (-46 dB)
  • Tone power increment (-2 dB)

Test Procedure

As the above indicates, the test has an outer loop and an inner loop. The outer loop is the tone power, and the inner loop is the tone ON time. For each tone power level, the test performs the following:

  1. Enables the specified TDU tone detector (with phase reversal detection if specified).
  2. Generates a preliminary period of silence.
  3. Generates the specified tone using software tone generation (SGN component of the SDK package). This will, under the proper circumstances, generate a TONE ON event once detected.
  4. Continues tone generation and TDU detection for the specified tone ON period.
  5. Discontinues tone generation. This will, under the proper circumstances, generate a TONE OFF event once detected.
  6. Continues TDU detection for the specified OFF period.
  7. Increments the tone ON time by the specified increment and loops to (1).
  8. Continues looping until the maximum tone ON period is met.

Expected Results

Minimal Output

Each inner loop iteration will generate a output text indicating the parameters of the specific test.

Detection Output

When a tone detection event occurs, additional information is output to provide details regarding the detection.

Note:
Note that not all tones powers and ON periods are expected to generate detection. Each specific tone has a range of powers and periods over which detection is expected to occur as well as ranges over which detection is expected to not occur.


TDU Test: RX Range Verification

TDU Test Reference

RX Range Verification

Test Purpose

RX range verification is similar to TX range verification, but adds a few additional parameters. The test qualifies the TDU's ability to identify RX tone events (both ON and OFF) over a range of both tone powers and tone periods. This test calls the TDU API function tduReceiveIn() for detection.

Test Parameters

The test allows for variation of the following parameters:

  • TDU detector enable code
  • Enable phase reversal detection
  • Preliminary tone OFF period (# frames)
  • Minimum tone ON period (# frames)
  • Maximum tone ON period (# frames)
  • Tone period increment (# frames)
  • Trailing Tone OFF period (# frames)
  • Single tone frequency (Hz)

The test uses the following constant parameters:

  • Maximum tone power (+2 dB)
  • Minimum tone power (-46 dB)
  • Tone power increment (-2 dB)

Test Procedure

As the above indicates, the test has an outer loop and an inner loop. The outer loop is the tone power, and the inner loop is the tone ON time. For each tone power level, the test performs the following:

  1. Enables the specified TDU tone detector (with phase reversal detection if specified).
  2. Generates a preliminary period of silence.
  3. Generates the specified tone using software tone generation (SGN component of the SDK package). This will, under the proper circumstances, generate a TONE ON event once detected.
  4. Continues tone generation and TDU detection for the specified tone ON period.
  5. Discontinues tone generation. This will, under the proper circumstances, generate a TONE OFF event once detected.
  6. Continues TDU detection for the specified OFF period.
  7. Increments the tone ON time by the specified increment and loops to (1).
  8. Continues looping until the maximum tone ON period is met.

Expected Results

Minimal Output

Each inner loop iteration will generate a output text indicating the parameters of the specific test.

Detection Output

When a tone detection event occurs, additional information is output to provide details regarding the detection.

Note:
Note that not all tones powers and ON periods are expected to generate detection. Each specific tone has a range of powers and periods over which detection is expected to occur as well as ranges over which detection is expected to not occur.


TDU Test: sigGenPars_t Struct Reference

  • Data Structures
  • Data Fields

sigGenPars_t Struct Reference

Detailed Description

Definition at line 320 of file tdusim.c.

Data Fields

void * | inst
tbool | state
linSample | dc_offset
tint | wf_type
tint | f1
tint | f2
linSample | t_amp1
linSample | t_amp2
tbool | pr_enable
tint | pr_period
tlong | fsk_duration
tint * | fsk_dataptr
tint | fsk_numword
tint | noise_level
tuint | noise_seed
tint | noise_type
tint | power_level
tulong | hoth_wng_seed
tuint | frm_count
tbool | fileINPUT
tint | fileFORMAT
tbool | fileCLOSE
char * | fileNAME
FILE * | filePtr

Field Documentation

void* sigGenPars_t::inst

Definition at line 321 of file tdusim.c.

Referenced by generate_tone_frame(), sys_new_sgn(), sys_open_sgn(), and sys_set_sgn().

tbool sigGenPars_t::state

Definition at line 322 of file tdusim.c.

Referenced by sys_set_sgn().

linSample sigGenPars_t::dc_offset

Definition at line 323 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::wf_type

Definition at line 324 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::f1

Definition at line 325 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::f2

Definition at line 326 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

linSample sigGenPars_t::t_amp1

Definition at line 327 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

linSample sigGenPars_t::t_amp2

Definition at line 328 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tbool sigGenPars_t::pr_enable

Definition at line 329 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::pr_period

Definition at line 330 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tlong sigGenPars_t::fsk_duration

Definition at line 331 of file tdusim.c.

Referenced by sys_set_sgn().

tint* sigGenPars_t::fsk_dataptr

Definition at line 332 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::fsk_numword

Definition at line 333 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::noise_level

Definition at line 334 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tuint sigGenPars_t::noise_seed

Definition at line 335 of file tdusim.c.

Referenced by sys_open_sgn().

tint sigGenPars_t::noise_type

Definition at line 336 of file tdusim.c.

Referenced by sys_open_sgn().

tint sigGenPars_t::power_level

Definition at line 337 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tulong sigGenPars_t::hoth_wng_seed

Definition at line 338 of file tdusim.c.

Referenced by sys_open_sgn().

tuint sigGenPars_t::frm_count

Definition at line 339 of file tdusim.c.

Referenced by generate_tone_frame(), sftAllDetectionFILE(), sysDebugInfo(), and sysToneDetect().

tbool sigGenPars_t::fileINPUT

Definition at line 340 of file tdusim.c.

Referenced by generate_tone_frame(), sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), and tduSimProfile().

tint sigGenPars_t::fileFORMAT

Definition at line 341 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), takeFileSamples(), and tduSimProfile().

tbool sigGenPars_t::fileCLOSE

Definition at line 342 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), takeFileSamples(), and tduSimProfile().

char* sigGenPars_t::fileNAME

Definition at line 343 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), takeFileSamples(), and tduSimProfile().

FILE* sigGenPars_t::filePtr

Definition at line 344 of file tdusim.c.

Referenced by takeFileSamples().

The documentation for this struct was generated from the following file:
  • tdusim.c


TDU Test: sysCtDiscrim_t Struct Reference

  • Data Structures
  • Data Fields

sysCtDiscrim_t Struct Reference

Detailed Description

Definition at line 596 of file tdusim.c.

Data Fields

tuint | timer_cnt
tint | state
tint | detect_cnt
tint | detect_req

Field Documentation

tuint sysCtDiscrim_t::timer_cnt

Definition at line 597 of file tdusim.c.

Referenced by system_CT_discrim_proc(), and system_CT_discrim_rpt().

tint sysCtDiscrim_t::state

Definition at line 598 of file tdusim.c.

Referenced by system_CT_discrim_proc(), and system_CT_discrim_rpt().

tint sysCtDiscrim_t::detect_cnt

Definition at line 599 of file tdusim.c.

Referenced by system_CT_discrim_rpt().

tint sysCtDiscrim_t::detect_req

Definition at line 600 of file tdusim.c.

Referenced by main(), and system_CT_discrim_rpt().

The documentation for this struct was generated from the following file:
  • tdusim.c


TDU Test: sysTduResults_t Struct Reference

  • Data Structures
  • Data Fields

sysTduResults_t Struct Reference

Detailed Description

Definition at line 448 of file tdusim.c.

Data Fields

tint | mf_tid
tint | mf_on_off
tint | hangover_time
tint | mf_power
tduCptSmartRep_t | cpt_report

Field Documentation

tint sysTduResults_t::mf_tid

Definition at line 449 of file tdusim.c.

Referenced by sysToneDetect().

tint sysTduResults_t::mf_on_off

Definition at line 450 of file tdusim.c.

Referenced by sysToneDetect().

tint sysTduResults_t::hangover_time

Definition at line 451 of file tdusim.c.

Referenced by sysToneDetect().

tint sysTduResults_t::mf_power

Definition at line 452 of file tdusim.c.

Referenced by sysToneDetect().

tduCptSmartRep_t sysTduResults_t::cpt_report

Definition at line 453 of file tdusim.c.

Referenced by sysToneDetect().

The documentation for this struct was generated from the following file:
  • tdusim.c


TDU Test: tduSim_t Struct Reference

  • Data Structures
  • Data Fields

tduSim_t Struct Reference

Collaboration diagram for tduSim_t:

[legend]

Detailed Description

Definition at line 348 of file tdusim.c.

Data Fields

tint | max_frame_length
tint | frame_size
tint | mf_type
tword | pattern
struct {
tbool overwrite_scr
tbool tdu_lite
tbool enable_sia
tbool profile
tbool report
tbool add_tag
tbool toggle_tdu
tbool toggle_rx_sgn
tbool toggle_tx_sgn
} options
tduCfgCtl_t | cfgCtl
sigGenPars_t rxSGN
sigGenPars_t txSGN

Field Documentation

tint tduSim_t::max_frame_length

Definition at line 349 of file tdusim.c.

Referenced by main().

tint tduSim_t::frame_size

Definition at line 350 of file tdusim.c.

Referenced by main(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), system_CT_discrim_proc(), and tduSimProfile().

tint tduSim_t::mf_type

Definition at line 351 of file tdusim.c.

Referenced by main().

tword tduSim_t::pattern

Definition at line 352 of file tdusim.c.

Referenced by overwriteScratchBuffers().

tbool tduSim_t::overwrite_scr

Definition at line 354 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), and sftBasicRxDetection().

tbool tduSim_t::tdu_lite

Definition at line 356 of file tdusim.c.

Referenced by main().

tbool tduSim_t::enable_sia

Definition at line 357 of file tdusim.c.

Referenced by sftAllDetectionFILE(), and sftBasicDetectionRxFILE_NW().

tbool tduSim_t::profile

Definition at line 358 of file tdusim.c.

Referenced by main().

tbool tduSim_t::report

Definition at line 359 of file tdusim.c.

Referenced by main(), and sysToneDetect().

tbool tduSim_t::add_tag

Definition at line 360 of file tdusim.c.

Referenced by sysToneDetect().

tbool tduSim_t::toggle_tdu

Definition at line 361 of file tdusim.c.

tbool tduSim_t::toggle_rx_sgn

Definition at line 362 of file tdusim.c.

tbool tduSim_t::toggle_tx_sgn

Definition at line 363 of file tdusim.c.

struct { ... } tduSim_t::options

Referenced by main(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and sysToneDetect().

tduCfgCtl_t tduSim_t::cfgCtl

Definition at line 365 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), sys_open_tdu(), system_CT_discrim_proc(), and tduSimProfile().

sigGenPars_t tduSim_t::rxSGN

Definition at line 366 of file tdusim.c.

Referenced by main(), sftBasicDetection(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

sigGenPars_t tduSim_t::txSGN

Definition at line 367 of file tdusim.c.

Referenced by main(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicRxDetection(), sysDebugInfo(), sysToneDetect(), and tduSimProfile().

The documentation for this struct was generated from the following file:
  • tdusim.c


TDU Test: tdusim.c File Reference

  • File List
  • Globals

tdusim.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ti\mas\types\types.h>
#include <ti\mas\fract\fract.h>
#include <ti\mas\util\debug.h>
#include <ti\mas\util\ecomem.h>
#include <ti\mas\util\mua.h>
#include <ti\mas\sdk\sgn.h>
#include <ti\mas\tdu\tdu.h>
#include <ti\mas\tdu\test\src\tdusimport.h>
#include <ti\mas\tdu\test\src\tstgmp.h>
#include <ti/mas/sdk/memarchcfg.h>
#include <ti/mas/sdk/profile.h>

Include dependency graph for tdusim.c:

Go to the source code of this file.

Data Structures

struct | sigGenPars_t
struct | tduSim_t
struct | sysTduResults_t
struct | sysCtDiscrim_t

Defines

#define | tdu_SIM_PROFILE_BASE_DIR "..\\..\\vectors\\profile\\"
#define | TDUSIM_REPORT_STRING_LENGTH 128
#define | TDUSIM_STRING_LENGTH 32
#define | TDUSIM_NUM_EVENT 4
#define | TDUSIM_NUM_DIGIT 16
#define | TDUSIM_NUM_DIRECTION 3
#define | TDUSIM_NUM_CED_MINOR 2
#define | TDUSIM_NUM_CEDPR_MINOR 2
#define | TDUSIM_NUM_V18_MINOR 2
#define | TDUSIM_NUM_SIA_MINOR 4
#define | TDUSIM_NUM_BELL_MINOR 3
#define | TDUSIM_NUM_V8BIS_MINOR 2
#define | TDUSIM_NUM_V21MODEM_MINOR 3
#define | TDUSIM_NUM_V23MODEM_MINOR 2
#define | TDUSIM_NUM_V21CI_MINOR 3
#define | TDUSIM_NUM_B202_MINOR 2
#define | TDUSIM_NUM_VDISC_MINOR 3
#define | TDUSIM_NUM_COIN_MINOR 2
#define | TDUSIM_NUM_TONE (tdu_TID_LAST - tdu_TID_FIRST + 1)
#define | tdu_SIM_TX_FILE_NAME " "
#define | tdu_SIM_RX_FILE_NAME " "
#define | TST_MAX_FRAME 40
#define | TST_SAVE_BUFF 53
#define | tdu_SIM_DBGMSG_SIZE 256
#define | loop for(;;)
#define | TDU_SYS_CT1300_ENABLE_CNT ( 600 * 8)
#define | TDU_SYS_CT1300_RESET_CNT (4000 * 8)
#define | TDU_SYS_CT1300_DWINLO_CNT ((500 + 1500) * 8)
#define | TDU_SYS_CT1300_DWINHI_CNT ((700 + 2000) * 8)

Enumerations

enum | { tdu_SIM_FILEIO_MU_PCM = 0, tdu_SIM_FILEIO_A_PCM = 1, tdu_SIM_FILEIO_LIN = 2, tdu_SIM_FILEIO_LINWAV = 3 }
enum | { CT_DISCRIM_STATE_RESET, CT_DISCRIM_STATE_V23RPT, CT_DISCRIM_STATE_V23ENA }

Functions

void | sysDebugInfo (void *ID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF, tduCptSmartRep_t *cpt_report)
void | system_CT_discrim_rpt (sysCtDiscrim_t *dsc)
void | system_CT_discrim_proc (sysCtDiscrim_t *dsc)
static void | sysDebugInternal (tuint id, char *str)
void | sysDebug (tuint id, char *s)
void | sysException (tuint id, char *s)
sgnFileIo_t * | sys_input_file (sgnFileIo_t *dsc)
void | takeFileSamples (sigGenPars_t *sgn_gen, int frame_size, linSample *frame)
void | generate_tone_frame (sigGenPars_t *sgn, tint frame_size, linSample *frame)
void | sys_new_sgn (sigGenPars_t *sgn)
void | sys_open_sgn (sigGenPars_t *sgn)
void | sys_set_sgn (sigGenPars_t *sgn)
void | sys_new_tdu (tint chnum, tint max_frame_length, tint lite)
void | sys_open_tdu (int chnum, tint mf_type, int frame_size, tint freq_pow_thresh_low, tint freq_pow_thresh_high, tint twist_negative, tint twist_positive, tint break_thresh)
void | overwriteScratchBuffers (void)
void | sftBasicDetection (void *tduInst, tint control_code, tint numOnFrames, tint numOffFrames, float tonePower, float freq)
void | sftBasicRxDetection (void *tduInst, tint control_code, tint position, tint location, float tonePower, tint prFlag, float FreqRx, tint numRxFramesStart, tint numRxFramesStop, tint numFrames)
void | sftBasicDetectionFILE (void *tduInst, tint control_code, char *filename)
void | sftBasicDetectionRxFILE (void *tduInst, tint control_code, char *filename)
void | sftBasicDetectionRxFILE_NW (void *tduInst, tint control_code, char *filename)
void | tduSimProfile (void *tduInst, char *txfname, char *rxfname, char *outfile)
void | sftVerifyRange (void *tduInst, tint ctl_code, tint min_frames, tint max_frames, tint off_frames, tint step_frames, float freq)
void | sftVerifyRangeRx (void *tduInst, tint ctl_code, tint position, tint location, tint prFlag, float freq, tint lead_frames, tint min_frames, tint max_frames, tint trail_frames, tint step_frames, tint start_pow, tint end_pow, tint step_pow)
void | sftAllDetectionFILE (void *tduInst, char *filename)
void | main (void)

Variables

void * | tduInst
FILE * | freport
char | tduTestCaseTag [160]
tint | v21_flags = 0x7e7e
static ecomemBuffer_t * | tduBufs
static tint | tduNbufs
volatile int | tx_frame_no = 0
volatile int | rx_frame_no = 0
volatile tlong | txprof_beg_cnt
volatile tlong | txprof_end_cnt
volatile tlong | rxprof_beg_cnt
volatile tlong | rxprof_end_cnt
tlong | txprof_cnt
tlong | rxprof_cnt
tlong | tdu_prof_nxt_sec
tlong | tdu_prof_sample_cnt
tuint | tdu_prof_sec_cnt
char | txprof_fstr [256]
char | rxprof_fstr [256]
char | prof_output [256]
FILE * | profile_fptr
char | digit_strings [TDUSIM_NUM_DIGIT][TDUSIM_STRING_LENGTH]
char | tone_strings [TDUSIM_NUM_TONE][TDUSIM_STRING_LENGTH]
char | tdu_event [TDUSIM_NUM_EVENT][TDUSIM_STRING_LENGTH]
char | tdu_direction [TDUSIM_NUM_DIRECTION][TDUSIM_STRING_LENGTH]
char | tdu_ced_minor [TDUSIM_NUM_CED_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_cedpr_minor [TDUSIM_NUM_CEDPR_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_v18_minor [TDUSIM_NUM_V18_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_sia_minor [TDUSIM_NUM_SIA_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_bell_minor [TDUSIM_NUM_BELL_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_v8bis_minor [TDUSIM_NUM_V8BIS_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_v21modem_minor [TDUSIM_NUM_V21MODEM_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_v23modem_minor [TDUSIM_NUM_V23MODEM_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_v21ci_minor [TDUSIM_NUM_V21CI_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_b202_minor [TDUSIM_NUM_B202_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_vdisc_minor [TDUSIM_NUM_VDISC_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_coin_minor [TDUSIM_NUM_COIN_MINOR][TDUSIM_STRING_LENGTH]
char | tdu_null_minor [1][TDUSIM_STRING_LENGTH]
char | event_string [TDUSIM_REPORT_STRING_LENGTH]
linSample | rx_in_frame [TST_MAX_FRAME]
linSample | tx_in_frame [TST_MAX_FRAME]
tuint | sys_dbg_id
tuint | sys_dbg_array [2]
char | sys_dbg_message [tdu_SIM_DBGMSG_SIZE]
tduSim_t tduSim
sysTduResults_t sys_tdu_results
tduContext_t | tduContext
const tduDetContext_t * | tduDetContexts []
const tduIntFwTable_t | tduIntFwTable
sysCtDiscrim_t sysCtDiscrim
tuint | tduIntFwTable_size = sizeof(tduIntFwTable)
tuint | tduContext_size = sizeof(tduContext)
tuint | tduDetContexts_size = sizeof(tduDetContexts)

Define Documentation

#define tdu_SIM_PROFILE_BASE_DIR "..\\..\\vectors\\profile\\"

Definition at line 49 of file tdusim.c.

Referenced by tduSimProfile().

#define TDUSIM_REPORT_STRING_LENGTH 128

Definition at line 86 of file tdusim.c.

#define TDUSIM_STRING_LENGTH 32

Definition at line 87 of file tdusim.c.

#define TDUSIM_NUM_EVENT 4

Definition at line 88 of file tdusim.c.

#define TDUSIM_NUM_DIGIT 16

Definition at line 89 of file tdusim.c.

#define TDUSIM_NUM_DIRECTION 3

Definition at line 90 of file tdusim.c.

#define TDUSIM_NUM_CED_MINOR 2

Definition at line 91 of file tdusim.c.

#define TDUSIM_NUM_CEDPR_MINOR 2

Definition at line 92 of file tdusim.c.

#define TDUSIM_NUM_V18_MINOR 2

Definition at line 93 of file tdusim.c.

#define TDUSIM_NUM_SIA_MINOR 4

Definition at line 94 of file tdusim.c.

#define TDUSIM_NUM_BELL_MINOR 3

Definition at line 95 of file tdusim.c.

#define TDUSIM_NUM_V8BIS_MINOR 2

Definition at line 96 of file tdusim.c.

#define TDUSIM_NUM_V21MODEM_MINOR 3

Definition at line 97 of file tdusim.c.

#define TDUSIM_NUM_V23MODEM_MINOR 2

Definition at line 98 of file tdusim.c.

#define TDUSIM_NUM_V21CI_MINOR 3

Definition at line 99 of file tdusim.c.

#define TDUSIM_NUM_B202_MINOR 2

Definition at line 100 of file tdusim.c.

#define TDUSIM_NUM_VDISC_MINOR 3

Definition at line 101 of file tdusim.c.

#define TDUSIM_NUM_COIN_MINOR 2

Definition at line 102 of file tdusim.c.

#define TDUSIM_NUM_TONE (tdu_TID_LAST - tdu_TID_FIRST + 1)

Definition at line 103 of file tdusim.c.

#define tdu_SIM_TX_FILE_NAME " "

Definition at line 275 of file tdusim.c.

Referenced by takeFileSamples().

#define tdu_SIM_RX_FILE_NAME " "

Definition at line 276 of file tdusim.c.

#define TST_MAX_FRAME 40

Definition at line 278 of file tdusim.c.

Referenced by takeFileSamples().

#define TST_SAVE_BUFF 53

Definition at line 279 of file tdusim.c.

#define tdu_SIM_DBGMSG_SIZE 256

Definition at line 296 of file tdusim.c.

Referenced by sysDebugInternal().

#define loop for(;;)

Definition at line 308 of file tdusim.c.

Referenced by main(), and sysException().

#define TDU_SYS_CT1300_ENABLE_CNT ( 600 * 8)

Definition at line 585 of file tdusim.c.

Referenced by system_CT_discrim_proc().

#define TDU_SYS_CT1300_RESET_CNT (4000 * 8)

Definition at line 586 of file tdusim.c.

Referenced by system_CT_discrim_proc().

#define TDU_SYS_CT1300_DWINLO_CNT ((500 + 1500) * 8)

Definition at line 587 of file tdusim.c.

Referenced by system_CT_discrim_rpt().

#define TDU_SYS_CT1300_DWINHI_CNT ((700 + 2000) * 8)

Definition at line 588 of file tdusim.c.

Referenced by system_CT_discrim_rpt().

Enumeration Type Documentation

anonymous enum

Enumerator:
tdu_SIM_FILEIO_MU_PCM
tdu_SIM_FILEIO_A_PCM
tdu_SIM_FILEIO_LIN
tdu_SIM_FILEIO_LINWAV

Definition at line 287 of file tdusim.c.

anonymous enum

Enumerator:
CT_DISCRIM_STATE_RESET
CT_DISCRIM_STATE_V23RPT
CT_DISCRIM_STATE_V23ENA

Definition at line 590 of file tdusim.c.

Function Documentation

void sysDebugInfo | ( | void * | ID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 814 of file tdusim.c.

References freport, sigGenPars_t::frm_count, sys_dbg_array, tduSim, and tduSim_t::txSGN.

void sysToneDetect | ( | tuint | ID,
 |  | tint | tid,
 |  | tint | on,
 |  | tint | time,
 |  | tint | power_MF,
 |  | tduCptSmartRep_t * | cpt_report
 | ) |  |

Definition at line 708 of file tdusim.c.

References tduSim_t::add_tag, sysTduResults_t::cpt_report, digit_strings, event_string, freport, sigGenPars_t::frm_count, sysTduResults_t::hangover_time, sysTduResults_t::mf_on_off, sysTduResults_t::mf_power, sysTduResults_t::mf_tid, tduSim_t::options, tduSim_t::report, sys_tdu_results, sysCtDiscrim, system_CT_discrim_rpt(), tdu_b202_minor, tdu_bell_minor, tdu_ced_minor, tdu_cedpr_minor, tdu_coin_minor, tdu_direction, tdu_event, tdu_null_minor, tdu_sia_minor, tdu_v18_minor, tdu_v21ci_minor, tdu_v21modem_minor, tdu_v23modem_minor, tdu_v8bis_minor, tdu_vdisc_minor, tduSim, tduTestCaseTag, tone_strings, and tduSim_t::txSGN.

Here is the call graph for this function:

void system_CT_discrim_rpt ( sysCtDiscrim_t * dsc )

Definition at line 613 of file tdusim.c.

References CT_DISCRIM_STATE_RESET, CT_DISCRIM_STATE_V23RPT, sysCtDiscrim_t::detect_cnt, sysCtDiscrim_t::detect_req, sysCtDiscrim_t::state, TDU_SYS_CT1300_DWINHI_CNT, TDU_SYS_CT1300_DWINLO_CNT, and sysCtDiscrim_t::timer_cnt.

Referenced by sysToneDetect().

void system_CT_discrim_proc ( sysCtDiscrim_t * dsc )

Definition at line 665 of file tdusim.c.

References tduSim_t::cfgCtl, CT_DISCRIM_STATE_RESET, CT_DISCRIM_STATE_V23RPT, tduSim_t::frame_size, sysCtDiscrim_t::state, TDU_SYS_CT1300_ENABLE_CNT, TDU_SYS_CT1300_RESET_CNT, tduInst, tduSim, and sysCtDiscrim_t::timer_cnt.

Referenced by sftBasicDetectionFILE().

static void sysDebugInternal | ( | tuint | id,
 |  | char * | str |
 | ) |  |  | [inline, static]

Definition at line 839 of file tdusim.c.

References sys_dbg_id, sys_dbg_message, and tdu_SIM_DBGMSG_SIZE.

Referenced by sysDebug(), and sysException().

void sysDebug | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 854 of file tdusim.c.

References sysDebugInternal().

Referenced by sys_open_sgn().

Here is the call graph for this function:

void sysException | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 859 of file tdusim.c.

References loop, and sysDebugInternal().

Referenced by gmpAllocGmc(), gmpFreeGmc(), gmpRead(), gmpWrite(), sys_new_tdu(), and sys_open_sgn().

Here is the call graph for this function:

sgnFileIo_t* sys_input_file ( sgnFileIo_t * dsc )

Definition at line 867 of file tdusim.c.

Referenced by sys_open_sgn().

void takeFileSamples | ( | sigGenPars_t * | sgn_gen,
 |  | int | frame_size,
 |  | linSample * | frame
 | ) |  |

Definition at line 881 of file tdusim.c.

References sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileNAME, sigGenPars_t::filePtr, tdu_SIM_FILEIO_A_PCM, tdu_SIM_FILEIO_LIN, tdu_SIM_FILEIO_LINWAV, tdu_SIM_FILEIO_MU_PCM, tdu_SIM_TX_FILE_NAME, and TST_MAX_FRAME.

Referenced by generate_tone_frame().

void generate_tone_frame | ( | sigGenPars_t * | sgn,
 |  | tint | frame_size,
 |  | linSample * | frame
 | ) |  |

Definition at line 947 of file tdusim.c.

References sigGenPars_t::fileINPUT, sigGenPars_t::frm_count, sigGenPars_t::inst, and takeFileSamples().

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

Here is the call graph for this function:

void sys_new_sgn ( sigGenPars_t * sgn )

Definition at line 961 of file tdusim.c.

References sigGenPars_t::inst.

Referenced by main().

void sys_open_sgn ( sigGenPars_t * sgn )

Definition at line 972 of file tdusim.c.

References sigGenPars_t::dc_offset, sigGenPars_t::f1, sigGenPars_t::f2, sigGenPars_t::fsk_dataptr, sigGenPars_t::fsk_numword, sigGenPars_t::hoth_wng_seed, sigGenPars_t::inst, sigGenPars_t::noise_level, sigGenPars_t::noise_seed, sigGenPars_t::noise_type, sigGenPars_t::power_level, sigGenPars_t::pr_enable, sigGenPars_t::pr_period, sys_input_file(), sysDebug(), sysException(), sigGenPars_t::t_amp1, sigGenPars_t::t_amp2, and sigGenPars_t::wf_type.

Referenced by main(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

Here is the call graph for this function:

void sys_set_sgn ( sigGenPars_t * sgn )

Definition at line 1003 of file tdusim.c.

References sigGenPars_t::dc_offset, sigGenPars_t::f1, sigGenPars_t::f2, sigGenPars_t::fsk_dataptr, sigGenPars_t::fsk_duration, sigGenPars_t::fsk_numword, sigGenPars_t::inst, sigGenPars_t::noise_level, sigGenPars_t::power_level, sigGenPars_t::pr_enable, sigGenPars_t::pr_period, sigGenPars_t::state, sigGenPars_t::t_amp1, sigGenPars_t::t_amp2, and sigGenPars_t::wf_type.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

void sys_new_tdu | ( | tint | chnum,
 |  | tint | max_frame_length,
 |  | tint | lite
 | ) |  |

Definition at line 1060 of file tdusim.c.

References sysException(), tduBufs, tduInst, and tduNbufs.

Referenced by main().

Here is the call graph for this function:

void sys_open_tdu | ( | int | chnum,
 |  | tint | mf_type,
 |  | int | frame_size,
 |  | tint | freq_pow_thresh_low,
 |  | tint | freq_pow_thresh_high,
 |  | tint | twist_negative,
 |  | tint | twist_positive,
 |  | tint | break_thresh
 | ) |  |

Definition at line 1138 of file tdusim.c.

References tduSim_t::cfgCtl, tduInst, and tduSim.

Referenced by main().

void overwriteScratchBuffers ( void )

Definition at line 1172 of file tdusim.c.

References tduSim_t::pattern, tduBufs, tduNbufs, and tduSim.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), and sftBasicRxDetection().

void sftBasicDetection | ( | void * | tduInst,
 |  | tint | control_code,
 |  | tint | numOnFrames,
 |  | tint | numOffFrames,
 |  | float | tonePower,
 |  | float | freq
 | ) |  |

Definition at line 1192 of file tdusim.c.

References tduSim_t::cfgCtl, sigGenPars_t::f1, sigGenPars_t::f2, tduSim_t::frame_size, freport, generate_tone_frame(), tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), sigGenPars_t::pr_enable, sigGenPars_t::pr_period, tduSim_t::rxSGN, sys_open_sgn(), sys_set_sgn(), sigGenPars_t::t_amp1, sigGenPars_t::t_amp2, tduSim, tduTestCaseTag, tx_in_frame, tduSim_t::txSGN, and sigGenPars_t::wf_type.

Referenced by sftVerifyRange().

Here is the call graph for this function:

void sftBasicRxDetection | ( | void * | tduInst,
 |  | tint | control_code,
 |  | tint | position,
 |  | tint | location,
 |  | float | tonePower,
 |  | tint | prFlag,
 |  | float | FreqRx,
 |  | tint | numRxFramesStart,
 |  | tint | numRxFramesStop,
 |  | tint | numFrames
 | ) |  |

Definition at line 1255 of file tdusim.c.

References tduSim_t::cfgCtl, sigGenPars_t::f1, sigGenPars_t::f2, tduSim_t::frame_size, freport, generate_tone_frame(), tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), sigGenPars_t::pr_enable, sigGenPars_t::pr_period, rx_in_frame, tduSim_t::rxSGN, sys_open_sgn(), sys_set_sgn(), sigGenPars_t::t_amp1, sigGenPars_t::t_amp2, tduSim, tduSim_t::txSGN, and sigGenPars_t::wf_type.

Referenced by sftVerifyRangeRx().

Here is the call graph for this function:

void sftBasicDetectionFILE | ( | void * | tduInst,
 |  | tint | control_code,
 |  | char * | filename
 | ) |  |

Definition at line 1325 of file tdusim.c.

References tduSim_t::cfgCtl, sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileINPUT, sigGenPars_t::fileNAME, tduSim_t::frame_size, freport, generate_tone_frame(), tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), sys_open_sgn(), sys_set_sgn(), sysCtDiscrim, system_CT_discrim_proc(), tdu_SIM_FILEIO_MU_PCM, tduSim, tx_frame_no, tx_in_frame, and tduSim_t::txSGN.

Referenced by main().

Here is the call graph for this function:

void sftBasicDetectionRxFILE | ( | void * | tduInst,
 |  | tint | control_code,
 |  | char * | filename
 | ) |  |

Definition at line 1372 of file tdusim.c.

References tduSim_t::cfgCtl, sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileINPUT, sigGenPars_t::fileNAME, tduSim_t::frame_size, freport, generate_tone_frame(), tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), rx_frame_no, rx_in_frame, tduSim_t::rxSGN, sys_open_sgn(), sys_set_sgn(), tdu_SIM_FILEIO_MU_PCM, and tduSim.

Referenced by main().

Here is the call graph for this function:

void sftBasicDetectionRxFILE_NW | ( | void * | tduInst,
 |  | tint | control_code,
 |  | char * | filename
 | ) |  |

Definition at line 1421 of file tdusim.c.

References tduSim_t::cfgCtl, tduSim_t::enable_sia, sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileINPUT, sigGenPars_t::fileNAME, tduSim_t::frame_size, freport, generate_tone_frame(), tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), rx_frame_no, rx_in_frame, tduSim_t::rxSGN, sys_open_sgn(), sys_set_sgn(), tdu_SIM_FILEIO_MU_PCM, and tduSim.

Referenced by main().

Here is the call graph for this function:

void tduSimProfile | ( | void * | tduInst,
 |  | char * | txfname,
 |  | char * | rxfname,
 |  | char * | outfile
 | ) |  |

Definition at line 1493 of file tdusim.c.

References tduSim_t::cfgCtl, sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileINPUT, sigGenPars_t::fileNAME, tduSim_t::frame_size, generate_tone_frame(), prof_output, profile_fptr, rx_in_frame, rxprof_beg_cnt, rxprof_cnt, rxprof_end_cnt, rxprof_fstr, tduSim_t::rxSGN, sys_open_sgn(), sys_set_sgn(), tdu_prof_nxt_sec, tdu_prof_sample_cnt, tdu_prof_sec_cnt, tdu_SIM_FILEIO_MU_PCM, tdu_SIM_PROFILE_BASE_DIR, tduSim, tx_in_frame, txprof_beg_cnt, txprof_cnt, txprof_end_cnt, txprof_fstr, and tduSim_t::txSGN.

Referenced by main().

Here is the call graph for this function:

void sftVerifyRange | ( | void * | tduInst,
 |  | tint | ctl_code,
 |  | tint | min_frames,
 |  | tint | max_frames,
 |  | tint | off_frames,
 |  | tint | step_frames,
 |  | float | freq
 | ) |  |

Definition at line 1621 of file tdusim.c.

References sftBasicDetection().

Referenced by main().

Here is the call graph for this function:

void sftVerifyRangeRx | ( | void * | tduInst,
 |  | tint | ctl_code,
 |  | tint | position,
 |  | tint | location,
 |  | tint | prFlag,
 |  | float | freq,
 |  | tint | lead_frames,
 |  | tint | min_frames,
 |  | tint | max_frames,
 |  | tint | trail_frames,
 |  | tint | step_frames,
 |  | tint | start_pow,
 |  | tint | end_pow,
 |  | tint | step_pow
 | ) |  |

Definition at line 1635 of file tdusim.c.

References sftBasicRxDetection().

Referenced by main().

Here is the call graph for this function:

void sftAllDetectionFILE | ( | void * | tduInst,
 |  | char * | filename
 | ) |  |

Definition at line 1658 of file tdusim.c.

References tduSim_t::cfgCtl, tduSim_t::enable_sia, sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileINPUT, sigGenPars_t::fileNAME, tduSim_t::frame_size, freport, sigGenPars_t::frm_count, generate_tone_frame(), tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), sys_open_sgn(), sys_set_sgn(), tdu_SIM_FILEIO_MU_PCM, tduSim, tx_in_frame, and tduSim_t::txSGN.

Referenced by main().

Here is the call graph for this function:

void main ( void )

Definition at line 1724 of file tdusim.c.

References sysCtDiscrim_t::detect_req, tduSim_t::frame_size, freport, loop, tduSim_t::max_frame_length, tduSim_t::mf_type, tduSim_t::options, tduSim_t::profile, tduSim_t::report, tduSim_t::rxSGN, sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftVerifyRange(), sftVerifyRangeRx(), sys_new_sgn(), sys_new_tdu(), sys_open_sgn(), sys_open_tdu(), sys_tdu_results, sysCtDiscrim, tduSim_t::tdu_lite, tduInst, tduSim, tduSimProfile(), and tduSim_t::txSGN.

Here is the call graph for this function:

Variable Documentation

void* tduInst

Definition at line 36 of file tdusim.c.

Referenced by main(), sys_new_tdu(), sys_open_tdu(), and system_CT_discrim_proc().

FILE* freport

Definition at line 37 of file tdusim.c.

Referenced by main(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), sysDebugInfo(), and sysToneDetect().

char tduTestCaseTag[160]

Definition at line 38 of file tdusim.c.

Referenced by sftBasicDetection(), and sysToneDetect().

tint v21_flags = 0x7e7e

Definition at line 39 of file tdusim.c.

ecomemBuffer_t* tduBufs [static]

Definition at line 54 of file tdusim.c.

Referenced by overwriteScratchBuffers(), and sys_new_tdu().

tint tduNbufs [static]

Definition at line 55 of file tdusim.c.

Referenced by overwriteScratchBuffers(), and sys_new_tdu().

volatile int tx_frame_no = 0

Definition at line 60 of file tdusim.c.

Referenced by sftBasicDetectionFILE().

volatile int rx_frame_no = 0

Definition at line 61 of file tdusim.c.

Referenced by sftBasicDetectionRxFILE(), and sftBasicDetectionRxFILE_NW().

volatile tlong txprof_beg_cnt

Definition at line 66 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong txprof_end_cnt

Definition at line 67 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong rxprof_beg_cnt

Definition at line 68 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong rxprof_end_cnt

Definition at line 69 of file tdusim.c.

Referenced by tduSimProfile().

tlong txprof_cnt

Definition at line 70 of file tdusim.c.

Referenced by tduSimProfile().

tlong rxprof_cnt

Definition at line 71 of file tdusim.c.

Referenced by tduSimProfile().

tlong tdu_prof_nxt_sec

Definition at line 72 of file tdusim.c.

Referenced by tduSimProfile().

tlong tdu_prof_sample_cnt

Definition at line 73 of file tdusim.c.

Referenced by tduSimProfile().

tuint tdu_prof_sec_cnt

Definition at line 74 of file tdusim.c.

Referenced by tduSimProfile().

char txprof_fstr[256]

Definition at line 75 of file tdusim.c.

Referenced by tduSimProfile().

char rxprof_fstr[256]

Definition at line 76 of file tdusim.c.

Referenced by tduSimProfile().

char prof_output[256]

Definition at line 77 of file tdusim.c.

Referenced by tduSimProfile().

FILE* profile_fptr

Definition at line 78 of file tdusim.c.

Referenced by tduSimProfile().

char digit_strings[TDUSIM_NUM_DIGIT][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  Digit: \"0\"\0",
  "  Digit: \"1\"\0",
  "  Digit: \"2\"\0",
  "  Digit: \"3\"\0",
  "  Digit: \"4\"\0",
  "  Digit: \"5\"\0",
  "  Digit: \"6\"\0",
  "  Digit: \"7\"\0",
  "  Digit: \"8\"\0",
  "  Digit: \"9\"\0",
  "  Digit: \"A\"\0",
  "  Digit: \"B\"\0",
  "  Digit: \"C\"\0",
  "  Digit: \"D\"\0",
  "  Digit: \"*\"\0",
  "  Digit: \"#\"\0",
}

Definition at line 111 of file tdusim.c.

Referenced by sysToneDetect().

char tone_strings[TDUSIM_NUM_TONE][TDUSIM_STRING_LENGTH]

Definition at line 130 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_event[TDUSIM_NUM_EVENT][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "Event: OFF\0",
  "Event:  ON\0",
  "Event: ALERT OFF\0",
  "Event: ALERT  ON\0"
}

Definition at line 183 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_direction[TDUSIM_NUM_DIRECTION][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "     \0",
  " (TX)\0",
  " (RX)\0",
}

Definition at line 190 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_ced_minor[TDUSIM_NUM_CED_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "    (Confirmed)\0",
  " (Early Report)\0",
}

Definition at line 196 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_cedpr_minor[TDUSIM_NUM_CEDPR_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  " (Confirmed)\0",
  "  (V.32 Ext)\0",
}

Definition at line 201 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_v18_minor[TDUSIM_NUM_V18_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  (Continuous Marks)\0",
  " (Continuous Spaces)\0",
}

Definition at line 206 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_sia_minor[TDUSIM_NUM_SIA_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  DC02 PULSE \0",
  "  DC02 DTMF \0",
  "  DC03 \0",
  "  DC05 \0",
}

Definition at line 211 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_bell_minor[TDUSIM_NUM_BELL_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  (Bell 103 Ans Marks)\0",
  "    (V.22 Unscr Marks)\0",
  " (Bell 103 Orig Marks)\0",
}

Definition at line 219 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_v8bis_minor[TDUSIM_NUM_V8BIS_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  " (Init)\0",
  " (Resp)\0",
}

Definition at line 225 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_v21modem_minor[TDUSIM_NUM_V21MODEM_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  (Low Marks)\0",
  "   (Hi Marks)\0",
  " (Low Spaces)\0",
}

Definition at line 230 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_v23modem_minor[TDUSIM_NUM_V23MODEM_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  (Forward Marks)\0",
  " (Backward Marks)\0",
}

Definition at line 236 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_v21ci_minor[TDUSIM_NUM_V21CI_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  " (Text)\0",
  "  (Fax)\0",
  " (Data)\0",
}

Definition at line 241 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_b202_minor[TDUSIM_NUM_B202_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  (Continuous Marks)\0",
  " (Continuous Spaces)\0",
}

Definition at line 247 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_vdisc_minor[TDUSIM_NUM_VDISC_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "  (Silence)\0",
  "    (Modem)\0",
  "    (Voice)\0",
}

Definition at line 252 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_coin_minor[TDUSIM_NUM_COIN_MINOR][TDUSIM_STRING_LENGTH]

Initial value:

 {
  " (1537 & 2200 Hz)\0",
  " (1700 & 2200 Hz\0",
}

Definition at line 258 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_null_minor[1][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "\0",
}

Definition at line 263 of file tdusim.c.

Referenced by sysToneDetect().

char event_string[TDUSIM_REPORT_STRING_LENGTH]

Definition at line 267 of file tdusim.c.

Referenced by sysToneDetect().

linSample rx_in_frame[TST_MAX_FRAME]

Definition at line 281 of file tdusim.c.

Referenced by sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

linSample tx_in_frame[TST_MAX_FRAME]

Definition at line 282 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), and tduSimProfile().

tuint sys_dbg_id

Definition at line 297 of file tdusim.c.

Referenced by sysDebugInternal().

tuint sys_dbg_array[2]

Definition at line 298 of file tdusim.c.

Referenced by sysDebugInfo().

char sys_dbg_message[tdu_SIM_DBGMSG_SIZE]

Definition at line 299 of file tdusim.c.

Referenced by sysDebugInternal().

tduSim_t tduSim

Definition at line 371 of file tdusim.c.

Referenced by main(), overwriteScratchBuffers(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), sys_open_tdu(), sysDebugInfo(), system_CT_discrim_proc(), sysToneDetect(), and tduSimProfile().

sysTduResults_t sys_tdu_results

Definition at line 455 of file tdusim.c.

Referenced by main(), and sysToneDetect().

tduContext_t tduContext

Initial value:

 {
  sysToneDetect,

  NULL,

  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  sysDebugInfo,

  0, 0, 0, 0,
  NULL,
  NULL,
  NULL,
  0, 0, 0, 0,
  0, 0, 0, 0,
  0, 0, 0, 0,
  0, 0, 0, 0
}

Definition at line 463 of file tdusim.c.

const tduDetContext_t* tduDetContexts[]

Definition at line 490 of file tdusim.c.

const tduIntFwTable_t tduIntFwTable

Definition at line 542 of file tdusim.c.

sysCtDiscrim_t sysCtDiscrim

Initial value:

 {
  0,
  CT_DISCRIM_STATE_RESET,
  0,
  0
}

Definition at line 603 of file tdusim.c.

Referenced by main(), sftBasicDetectionFILE(), and sysToneDetect().

tuint tduIntFwTable_size = sizeof(tduIntFwTable)

Definition at line 1653 of file tdusim.c.

tuint tduContext_size = sizeof(tduContext)

Definition at line 1654 of file tdusim.c.

tuint tduDetContexts_size = sizeof(tduDetContexts)

Definition at line 1655 of file tdusim.c.


TDU Test: tdusim.c Source File

  • File List
  • Globals

tdusim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Test TDU.
00003  ******************************************************************************
00004  * FILE NAME:   tsttdu.c
00005  *
00006  * DESCRIPTION: Test TDU module.
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: tsttdu.c 1.36 1999/11/24 17:25:55 bogdank Exp $
00011  *
00012  * REVISION HISTORY:
00013  * (C) Copyright 1997, TELOGY Networks, Inc.
00014  *****************************************************************************/
00015
00016 #include <stdio.h>
00017 #include <stdlib.h>
00018 #include <math.h>
00019 #include <string.h>
00020
00021 #include <ti\mas\types\types.h>
00022 #include <ti\mas\fract\fract.h>
00023 #include <ti\mas\util\debug.h>
00024 #include <ti\mas\util\ecomem.h>
00025 #include <ti\mas\util\mua.h>
00026 #include <ti\mas\sdk\sgn.h>
00027 #include <ti\mas\tdu\tdu.h>
00028 #include <ti\mas\tdu\test\src\tdusimport.h>
00029 #include <ti\mas\tdu\test\src\tstgmp.h>
00030
00031 /* For profiling */
00032 #include <ti/mas/sdk/memarchcfg.h>
00033 #include <ti/mas/sdk/profile.h>
00034
00035
00036 void  *tduInst;
00037 FILE  *freport;
00038 char   tduTestCaseTag[160];
00039 tint   v21_flags = 0x7e7e;
00040
00041 /***************************************************************************/
00042 /* Option definitions                                                      */
00043 /***************************************************************************/
00044 #undef tdu_SIM_USE_CIDCAS
00045
00046 /***************************************************************************/
00047 /* Profiling definitions                                                   */
00048 /***************************************************************************/
00049 #define tdu_SIM_PROFILE_BASE_DIR    "..\\..\\vectors\\profile\\"
00050
00051 /***************************************************************************/
00052 /* Global variables for volatile buffer overwrite                          */
00053 /***************************************************************************/
00054 static ecomemBuffer_t *tduBufs;
00055 static tint tduNbufs;
00056
00057 /***************************************************************************/
00058 /* Global frame counts                                                     */
00059 /***************************************************************************/
00060 volatile int tx_frame_no = 0;
00061 volatile int rx_frame_no = 0;
00062
00063 /***************************************************************************/
00064 /* Profiling variables (START)                                             */
00065 /***************************************************************************/
00066 volatile tlong txprof_beg_cnt;
00067 volatile tlong txprof_end_cnt;
00068 volatile tlong rxprof_beg_cnt;
00069 volatile tlong rxprof_end_cnt;
00070 tlong txprof_cnt;
00071 tlong rxprof_cnt;
00072 tlong tdu_prof_nxt_sec;
00073 tlong tdu_prof_sample_cnt;
00074 tuint tdu_prof_sec_cnt;
00075 char  txprof_fstr[256];
00076 char  rxprof_fstr[256];
00077 char  prof_output[256];
00078 FILE  *profile_fptr;
00079 /***************************************************************************/
00080 /* Profiling variables (END)                                               */
00081 /***************************************************************************/
00082
00083 /***************************************************************************/
00084 /* Result reporting definitions (START)                                    */
00085 /***************************************************************************/
00086 #define TDUSIM_REPORT_STRING_LENGTH 128
00087 #define TDUSIM_STRING_LENGTH         32
00088 #define TDUSIM_NUM_EVENT              4
00089 #define TDUSIM_NUM_DIGIT             16
00090 #define TDUSIM_NUM_DIRECTION          3
00091 #define TDUSIM_NUM_CED_MINOR          2
00092 #define TDUSIM_NUM_CEDPR_MINOR        2
00093 #define TDUSIM_NUM_V18_MINOR          2
00094 #define TDUSIM_NUM_SIA_MINOR          4
00095 #define TDUSIM_NUM_BELL_MINOR         3
00096 #define TDUSIM_NUM_V8BIS_MINOR        2
00097 #define TDUSIM_NUM_V21MODEM_MINOR     3
00098 #define TDUSIM_NUM_V23MODEM_MINOR     2
00099 #define TDUSIM_NUM_V21CI_MINOR        3
00100 #define TDUSIM_NUM_B202_MINOR         2
00101 #define TDUSIM_NUM_VDISC_MINOR        3
00102 #define TDUSIM_NUM_COIN_MINOR         2
00103 #define TDUSIM_NUM_TONE             (tdu_TID_LAST - tdu_TID_FIRST + 1)
00104 /***************************************************************************/
00105 /* Result reporting definitions (END)                                      */
00106 /***************************************************************************/
00107
00108 /***************************************************************************/
00109 /* Result reporting strings (START)                                        */
00110 /***************************************************************************/
00111 char digit_strings[TDUSIM_NUM_DIGIT][TDUSIM_STRING_LENGTH] = {
00112   "  Digit: \"0\"\0",
00113   "  Digit: \"1\"\0",
00114   "  Digit: \"2\"\0",
00115   "  Digit: \"3\"\0",
00116   "  Digit: \"4\"\0",
00117   "  Digit: \"5\"\0",
00118   "  Digit: \"6\"\0",
00119   "  Digit: \"7\"\0",
00120   "  Digit: \"8\"\0",
00121   "  Digit: \"9\"\0",
00122   "  Digit: \"A\"\0",
00123   "  Digit: \"B\"\0",
00124   "  Digit: \"C\"\0",
00125   "  Digit: \"D\"\0",
00126   "  Digit: \"*\"\0",
00127   "  Digit: \"#\"\0",
00128 };
00129
00130 char tone_strings[TDUSIM_NUM_TONE][TDUSIM_STRING_LENGTH] = {
00131   "  Tone: V21 FLAGS\0",
00132   "  Tone: V25 (TX)\0",
00133   "  Tone: V25 PR (TX)\0",
00134   "  Tone: CPT\0",
00135   "  Tone: V18A\0",
00136   "  Tone: SS7 COT\0",
00137   "  Tone: SF\0",
00138   "  Tone: CNG\0",
00139   "  Tone: SS7 COR\0",
00140   "  Tone: TT 1KHz\0",
00141   "  Tone: CID CAS (TX)\0",
00142   "  Tone: CID CAS (RX)\0",
00143   "  Tone: INVALID\0",
00144   "  Tone: INVALID\0",
00145   "  Tone: INVALID\0",
00146   "  Tone: V25 (RX)\0",
00147   "  Tone: V25 PR (RX)\0",
00148   "  Tone: BELL\0",
00149   "  Tone: V8BIS\0",
00150   "  Tone: V21\0",
00151   "  Tone: V23\0",
00152   "  Tone: V21 CM FAX\0",
00153   "  Tone: V21 CI\0",
00154   "  Tone: BELL 202\0",
00155   "  Tone: INVALID\0",
00156   "  Tone: INVALID\0",
00157   "  Tone: INVALID\0",
00158   "  Tone: VOICE DISC\0",
00159   "  Tone: COIN\0",
00160   "  Tone: INVALID\0",
00161   "  Tone: V21 CM\0",
00162   "  Tone: ANSAM (TX)\0",
00163   "  Tone: ANSAM PR (TX)\0",
00164   "  Tone: V21 LOWER\0",
00165   "  Tone: CRE2\0",
00166   "  Tone: INVALID\0",
00167   "  Tone: INVALID\0",
00168   "  Tone: INVALID\0",
00169   "  Tone: INVALID\0",
00170   "  Tone: INVALID\0",
00171   "  Tone: INVALID\0",
00172   "  Tone: INVALID\0",
00173   "  Tone: INVALID\0",
00174   "  Tone: INVALID\0",
00175   "  Tone: INVALID\0",
00176   "  Tone: ANSAM (RX)\0",
00177   "  Tone: ANSAM PR (RX)\0",
00178   "  Tone: V25 EARLY ALERT\0",
00179   "  Tone: V25 EARLY FALSE\0",
00180   "  Tone: SIA\0"
00181 };
00182
00183 char tdu_event[TDUSIM_NUM_EVENT][TDUSIM_STRING_LENGTH] = {
00184   "Event: OFF\0",
00185   "Event:  ON\0",
00186   "Event: ALERT OFF\0",
00187   "Event: ALERT  ON\0"
00188 };
00189
00190 char tdu_direction[TDUSIM_NUM_DIRECTION][TDUSIM_STRING_LENGTH] = {
00191   "     \0",
00192   " (TX)\0",
00193   " (RX)\0",
00194 };
00195
00196 char tdu_ced_minor[TDUSIM_NUM_CED_MINOR][TDUSIM_STRING_LENGTH] = {
00197   "    (Confirmed)\0",
00198   " (Early Report)\0",
00199 };
00200
00201 char tdu_cedpr_minor[TDUSIM_NUM_CEDPR_MINOR][TDUSIM_STRING_LENGTH] = {
00202   " (Confirmed)\0",
00203   "  (V.32 Ext)\0",
00204 };
00205
00206 char tdu_v18_minor[TDUSIM_NUM_V18_MINOR][TDUSIM_STRING_LENGTH] = {
00207   "  (Continuous Marks)\0",
00208   " (Continuous Spaces)\0",
00209 };
00210
00211 char tdu_sia_minor[TDUSIM_NUM_SIA_MINOR][TDUSIM_STRING_LENGTH] = {
00212   "  DC02 PULSE \0",
00213   "  DC02 DTMF \0",
00214   "  DC03 \0",
00215   "  DC05 \0",
00216 };
00217
00218
00219 char tdu_bell_minor[TDUSIM_NUM_BELL_MINOR][TDUSIM_STRING_LENGTH] = {
00220   "  (Bell 103 Ans Marks)\0",
00221   "    (V.22 Unscr Marks)\0",
00222   " (Bell 103 Orig Marks)\0",
00223 };
00224
00225 char tdu_v8bis_minor[TDUSIM_NUM_V8BIS_MINOR][TDUSIM_STRING_LENGTH] = {
00226   " (Init)\0",
00227   " (Resp)\0",
00228 };
00229
00230 char tdu_v21modem_minor[TDUSIM_NUM_V21MODEM_MINOR][TDUSIM_STRING_LENGTH] = {
00231   "  (Low Marks)\0",
00232   "   (Hi Marks)\0",
00233   " (Low Spaces)\0",
00234 };
00235
00236 char tdu_v23modem_minor[TDUSIM_NUM_V23MODEM_MINOR][TDUSIM_STRING_LENGTH] = {
00237   "  (Forward Marks)\0",
00238   " (Backward Marks)\0",
00239 };
00240
00241 char tdu_v21ci_minor[TDUSIM_NUM_V21CI_MINOR][TDUSIM_STRING_LENGTH] = {
00242   " (Text)\0",
00243   "  (Fax)\0",
00244   " (Data)\0",
00245 };
00246
00247 char tdu_b202_minor[TDUSIM_NUM_B202_MINOR][TDUSIM_STRING_LENGTH] = {
00248   "  (Continuous Marks)\0",
00249   " (Continuous Spaces)\0",
00250 };
00251
00252 char tdu_vdisc_minor[TDUSIM_NUM_VDISC_MINOR][TDUSIM_STRING_LENGTH] = {
00253   "  (Silence)\0",
00254   "    (Modem)\0",
00255   "    (Voice)\0",
00256 };
00257
00258 char tdu_coin_minor[TDUSIM_NUM_COIN_MINOR][TDUSIM_STRING_LENGTH] = {
00259   " (1537 & 2200 Hz)\0",
00260   " (1700 & 2200 Hz\0",
00261 };
00262
00263 char tdu_null_minor[1][TDUSIM_STRING_LENGTH] = {
00264   "\0",
00265 };
00266
00267 char event_string[TDUSIM_REPORT_STRING_LENGTH];
00268 /***************************************************************************/
00269 /* Result reporting strings (END)                                          */
00270 /***************************************************************************/
00271
00272 /****************************************************************
00273  * Frame counters in Tx and Rx direction, for interactive tests.
00274  ****************************************************************/
00275 #define tdu_SIM_TX_FILE_NAME  " "
00276 #define tdu_SIM_RX_FILE_NAME  " "
00277
00278 #define TST_MAX_FRAME     40    /* max frame size is 5 ms */
00279 #define TST_SAVE_BUFF     53    /* equal to extra */
00280
00281 linSample rx_in_frame[TST_MAX_FRAME];
00282 linSample tx_in_frame[TST_MAX_FRAME];
00283
00284 /*********************************/
00285 /* Input File formats definition */
00286 /*********************************/
00287 enum {
00288   tdu_SIM_FILEIO_MU_PCM = 0,     /* 8 bit Mu-law samples */
00289   tdu_SIM_FILEIO_A_PCM  = 1,     /* 8 bit A-law samples */
00290   tdu_SIM_FILEIO_LIN    = 2,     /* 16 bit linear samples */
00291   tdu_SIM_FILEIO_LINWAV = 3      /* 16 bit linear samples from Microsoft
00292                                    .wav files, with 44 byte header */
00293 };
00294
00295 /* System debug messaging */
00296 #define tdu_SIM_DBGMSG_SIZE   256
00297 tuint sys_dbg_id;     /* debug ID used in debug and exception functions */
00298 tuint sys_dbg_array[2];
00299 char  sys_dbg_message[tdu_SIM_DBGMSG_SIZE];
00300
00301 /* Forward function prototypes */
00302 void            sysDebugInfo (void* ID, tuint msgType, tuint msgCode,
00303                               tuint msgLength, tuint * supportingData);
00304 void            sysToneDetect (tuint ID, tint tid, tint on, tint time,
00305                                tint power_MF, tduCptSmartRep_t * cpt_report);
00306
00307 /* Nice way for doing endless loop */
00308 #define loop for(;;)
00309
00310
00311 /******************************************************************************
00312  * DATA DEFINITION: Control information.
00313  ******************************************************************************
00314  * DESCRIPTION: Control information that may be set-up from the simulator
00315  *              to change operating parameters.
00316  *
00317  *****************************************************************************/
00318
00319 /* Signal Generator Parameters */
00320 typedef struct {
00321   void            *inst;          /* Signal generator instance pointer */
00322   tbool           state;          /* TRUE: generator is on. */
00323   linSample       dc_offset;      /* DC offset (Q0) */
00324   tint            wf_type;        /* Waveform type (SGN_WFT_XXX) */
00325   tint            f1;             /* Frequency #1 (Hz) */
00326   tint            f2;             /* Frequency #2 (Hz) */
00327   linSample       t_amp1;         /* Amplitude of freq #1 (Q0) */
00328   linSample       t_amp2;         /* Amplitude of freq #2 (Q0) */
00329   tbool           pr_enable;      /* TRUE: phase reversal enabled */
00330   tint            pr_period;      /* Samples between phase reversals */
00331   tlong           fsk_duration;   /* FSK duration in number of bits */
00332   tint           *fsk_dataptr;    /* FSK data pointer */
00333   tint            fsk_numword;    /* Number of FSK bytes */
00334   tint            noise_level;    /* idle noise level in dBm0 */
00335   tuint           noise_seed;     /* idle noise seed */
00336   tint            noise_type;     /* noise type SGN_NT_xxx */
00337   tint            power_level;    /* Hoth or CSS power level in dBm0 */
00338   tulong          hoth_wng_seed;  /* Hoth noise seed */
00339   tuint           frm_count;      /* Count of frames generated */
00340   tbool           fileINPUT;      /* TRUE, data taken from file */
00341   tint            fileFORMAT;     /* Uses tdu_SIM_FILEIO_XXX enum above */
00342   tbool           fileCLOSE;      /* File closed indicator */
00343   char           *fileNAME;       /* File name string */
00344   FILE           *filePtr;        /* Pointer to file object */
00345 } sigGenPars_t;
00346
00347
00348 typedef struct {
00349   tint         max_frame_length;  /* max # samples in frame */
00350   tint         frame_size;        /* # samples in frame */
00351   tint         mf_type;           /* type of mf used for testing */
00352   tword        pattern;           /* Scratch buffer overwrite pattern */
00353   struct {
00354     tbool      overwrite_scr;     /* TRUE: Overwrite scratch buffers
00355                                             between calls */
00356     tbool      tdu_lite;          /* TRUE: Create TDU Lite */
00357     tbool      enable_sia;        /* TRUE: Enable SIA detection */
00358     tbool      profile;           /* TRUE: profile TDU */
00359     tbool      report;            /* TRUE: Report digits */
00360     tbool      add_tag;           /* TRUE: Add test case tag to report */
00361     tbool      toggle_tdu;        /* TRUE: Configure TDU when possible */
00362     tbool      toggle_rx_sgn;     /* TRUE: Configure TX SGN when possible */
00363     tbool      toggle_tx_sgn;     /* TRUE: Configure RX SGN when possible */
00364   } options;
00365   tduCfgCtl_t  cfgCtl;            /* Initialized in sys_open_tdu() */
00366   sigGenPars_t rxSGN;             /* Rx Signal Generator Parameters */
00367   sigGenPars_t txSGN;             /* Tx Signal Generator Parameters */
00368 } tduSim_t;
00369
00370
00371 tduSim_t tduSim =
00372 { /* Simulation defaults */
00373   TST_MAX_FRAME,            /* max # samples per frame */
00374   40,                       /* 40 samples default frame duration */
00375   tdu_DET_ID_R1,            /* use DTMF as the default test */
00376   0x55,                     /* Scratch buffer overwrite pattern */
00377   { /* Boolean options */
00378     FALSE,                  /* Do not overwrite scratch by default */
00379     FALSE,                  /* Create full TDU by default */
00380     TRUE,                   /* Enable SIA detection by default */
00381     FALSE,                  /* Do not profile by default */
00382     TRUE,                   /* Report digit events by default */
00383     FALSE,                  /* Don't add test case tag to report */
00384     TRUE,                   /* Toggle TDU configuration */
00385     TRUE,                   /* Toggle RX SGN configuration */
00386     TRUE                    /* Toggle TX SGN configuration */
00387   },
00388   { /* TDU  config structure */
00389     0,
00390   },
00391   {  /* RX SGN parameters */
00392     (void *) NULL,          /* Instance pointer */
00393     TRUE,                   /* default state is on */
00394     0,                      /* default dc-offset */
00395     sgn_WFT_COSINE,         /* default waveform */
00396     2100,                   /* default RX SGN freq #1 in Hz (Q0) */
00397     0,                      /* default RX SGN freq #2 in Hz (Q0) */
00398     3000,                   /* default amplitudes of freq #1 */
00399     0,                      /* default amplitudes of freq #2 */
00400     TRUE,                   /* phase reversal enabled */
00401     3600,                   /* PR interval (in samples) */
00402     3L * 300,               /* FSK duration (3s on 300bps rate) */
00403     &v21_flags,             /* V.21 flags */
00404     1,                      /* 1 word for V21 flags */
00405     -80,                    /* default noise generator level in dBm0 */
00406     0,                      /* initial noise generator seed */
00407     sgn_NT_GAUSS,           /* Gaussian white noise */
00408     -70,                    /* default HOTH/CSS power level in dBm0 */
00409     84771,                  /* initial HOTH generator seed */
00410     0,                      /* RX SGN frame count */
00411     FALSE,                  /* File input NOT active */
00412     tdu_SIM_FILEIO_MU_PCM,  /* Mu-law PCM format file input */
00413     TRUE,                   /* File is unavailable (closed) */
00414     NULL,                   /* No name specified */
00415     NULL                    /* No file object */
00416   },
00417   { /* TX SGN parameters */
00418     (void *) NULL,          /* Instance pointer */
00419     TRUE,                   /* default state is on */
00420     0,                      /* default dc-offset */
00421     sgn_WFT_COSINE,         /* default waveform */
00422     500,                    /* default RX SGN freq #1 (Hz, Q0) */
00423     0,                      /* default RX SGN freq #2 (Hz, Q0) */
00424     3000,                   /* default amplitudes of freq #1 */
00425     0,                      /* default amplitudes of freq #2 */
00426     FALSE,                  /* phase reversal enabled */
00427     0,                      /* PR interval (samples) */
00428     3L * 300,               /* FSK duration (3s on 300bps rate) */
00429     &v21_flags,             /* V.21 flags */
00430     1,                      /* 1 word for V21 flags */
00431     -80,                    /* default noise generator level in dBm0 */
00432     0,                      /* initial noise generator seed */
00433     sgn_NT_GAUSS,           /* Gaussian white noise */
00434     -70,                    /* default HOTH/CSS power level in dBm0 */
00435     84771,                  /* initial HOTH generator seed */
00436     0,                      /* TX SGN frame count */
00437     FALSE,                  /* File input not active */
00438     tdu_SIM_FILEIO_MU_PCM,  /* Mu-law PCM format file input */
00439     TRUE,                   /* File is unavailable (closed) */
00440     NULL,                   /* No name specified */
00441     NULL                    /* No file object */
00442   },
00443 };
00444
00445 /*********************************************************
00446  * Results reported to system by TDU.
00447  *********************************************************/
00448 typedef struct {
00449   tint mf_tid;
00450   tint mf_on_off;
00451   tint hangover_time;
00452   tint mf_power;
00453   tduCptSmartRep_t cpt_report;
00454 } sysTduResults_t;
00455 sysTduResults_t sys_tdu_results;
00456
00457
00458 /*********************************************************************
00459  * Initialization requirements
00460  *********************************************************************/
00461
00462 /* Context structure contains data common to all TDU instances */
00463 tduContext_t tduContext = {
00464   sysToneDetect,
00465 #ifdef GG_INCLUDE_BDTEW
00466   sysBdtEwDetect,
00467 #else
00468   NULL,
00469 #endif
00470   NULL,
00471   NULL,
00472   NULL,
00473   NULL,
00474   NULL,
00475   NULL,
00476   NULL,
00477   sysDebugInfo,
00478   /* Following data are initialized in tduNew() */
00479   0, 0, 0, 0,
00480   NULL,
00481   NULL,
00482   NULL,
00483   0, 0, 0, 0,
00484   0, 0, 0, 0,
00485   0, 0, 0, 0,
00486   0, 0, 0, 0
00487 }; /* tduContext */
00488
00489 /* TDU Internal Contexts */
00490 const tduDetContext_t *tduDetContexts[] = {
00491 /*** Put all th SFDF detectors together, one after another ***/
00492   &tduIncV23BW_MARKS_F,
00493   &tduIncV21LOW_MARKS_F,
00494   &tduIncTT1khz_F,
00495   &tduIncCNG_F,
00496   &tduIncV21LOW_SPACES_F,
00497   &tduIncB202_MARKS_F,
00498   &tduIncBELLTX2_F,
00499   &tduIncV23FW_MARKS_F,
00500   &tduIncV18A_F,
00501   &tduIncV21UPPER_MARKS_F,
00502   &tduIncSS7COR_F,
00503   &tduIncV18A_S_F,
00504   &tduIncSS7COT_F,
00505   &tduIncV25_F,
00506   &tduIncB202_SPACES_F,
00507   &tduIncBELLTX1_F,
00508   &tduIncSF_F,
00509   &tduIncSIA_F,
00510   &tduIncSIA_S_F,
00511 /*** Put all the SFDT detectors together, one after another ***/
00512   &tduIncV23FW_MARKS_T,
00513   &tduIncSS7COT_T,
00514   &tduIncV25_T_RX,
00515   &tduIncBELLRX1_T,
00516   &tduIncBELLRX2_T,
00517 //  NULL,/* tdu_SFDT_DET_V18A_RX */
00518 //  NULL,/* tdu_SFDT_DET_V18A_S_RX */
00519 //  NULL,/* tdu_SFDT_DET_V21LOW_MARKS_RX */
00520 //  NULL,/* tdu_SFDT_DET_V21LOW_S_RX */
00521 //  NULL,/* tdu_SFDT_DET_CIDCAS_RX,tdu_SFDT_DET_CASH_RX  */
00522 //  NULL, /* tdu_SFDT_DET_CASH_RX */
00523   &tduIncSIA_T_RX,
00524   &tduIncSIA_S_T_RX,
00525   &tduIncSFDT_DUMMY1_T,
00526   &tduIncSFDT_DUMMY2_T,
00527   &tduIncSFDT_DUMMY3_T,
00528 /*** Put all th MF detectors together, one after another ***/
00529   &tduIncDTMF,
00530   &tduIncR1,
00531   &tduIncR2FW,
00532   &tduIncR2BW,
00533   &tduIncV8BIS_FS_F,
00534   &tduIncCOIN_TONES,
00535 /*** ... the rest ***/
00536   &tduIncV21,
00537   &tduIncCPT,
00538   NULL
00539 };
00540
00541 /* Definition of internal TDU framework and hooks */
00542 const tduIntFwTable_t tduIntFwTable = {
00543   { tduSFDControl,
00544     tduSFDFProcess   },
00545   { tduSFDControl,
00546     tduSFDTProcess,  },
00547   { tduMFControl,
00548     tduMFProcess,    },
00549   { tduCPTControl,
00550     tduCPTProcess,   },
00551   { tduV21Control,
00552     tduV21Process,   },
00553   { tduBDTEWControl,
00554     tduBDTEWProcess, },
00555
00556   /* Functions required by CID CAS */
00557 #if (defined (tdu_SIM_USE_CIDCAS))
00558   tdu_mf_cidcas_ctl,
00559 #else
00560   NULL,
00561 #endif
00562
00563   /* Functions required by Modem Relay */
00564 #if (defined (TDU_SIM_USE_LLMR_VOICE))
00565   tdu_sfd_llmr_ANSam_reset,
00566   tdu_sfd_llmr_ANSam,
00567   tdu_sfd_llmr_ANSam_test,
00568 #else
00569   NULL,
00570   NULL,
00571   NULL,
00572 #endif
00573
00574   /* Functions required by CRe - V.8bis */
00575   tdu_mf_v8bis_fs_ctl,
00576   tdu_digit_filter,
00577   tduVoiceDiscProcess,
00578   tduVoiceDiscCtl,
00579   tduBellTid,
00580   tdu_mf_coin_tones_ctl,
00581 };
00582
00583
00584 /* All defines below based on 8K sampling */
00585 #define TDU_SYS_CT1300_ENABLE_CNT     ( 600 * 8)          // V.23 detector re-enable sample count
00586 #define TDU_SYS_CT1300_RESET_CNT      (4000 * 8)          // No CT confirmation - reset
00587 #define TDU_SYS_CT1300_DWINLO_CNT     ((500 + 1500) * 8)  // CT re-detect window - low
00588 #define TDU_SYS_CT1300_DWINHI_CNT     ((700 + 2000) * 8)  // CT re-detect window - high
00589
00590 enum {
00591   CT_DISCRIM_STATE_RESET,       /* Reset - waiting for first V.23 detection */
00592   CT_DISCRIM_STATE_V23RPT,      /* V.23 reported, waiting to re-enable detector */
00593   CT_DISCRIM_STATE_V23ENA       /* V.23 re-enabled, waiting for next detection */
00594 };
00595
00596 typedef struct {
00597   tuint timer_cnt;    /* Timer in milliseconds */
00598   tint  state;        /* Discrimination state */
00599   tint  detect_cnt;   /* Count of V.23 detections */
00600   tint  detect_req;   /* V.23 re-detections required to declare CT */
00601 } sysCtDiscrim_t;
00602
00603 sysCtDiscrim_t sysCtDiscrim = {
00604   0,
00605   CT_DISCRIM_STATE_RESET,
00606   0,
00607   0     // Set in main
00608 };
00609
00610 /******************************************************************************
00611  * FUNCTION PURPOSE: V.23 report action for discrimination
00612  ******************************************************************************/
00613 void system_CT_discrim_rpt (sysCtDiscrim_t *dsc)
00614 {
00615   /* Determine actions based solely on state */
00616   switch (dsc->state) {
00617
00618   /* Pre-detection */
00619   case CT_DISCRIM_STATE_RESET:
00620     dsc->detect_cnt = 0;
00621     dsc->timer_cnt  = 0;
00622     dsc->state      = CT_DISCRIM_STATE_V23RPT;
00623     break;
00624
00625   /* V.23 detected - waiting to re-enable (should never enter here) */
00626   case CT_DISCRIM_STATE_V23RPT:
00627     fprintf (stdout, "Error in 1300Hz CT discrimination: Bad State\n");
00628     dsc->state = CT_DISCRIM_STATE_RESET;
00629     break;
00630
00631   /* V.23 re-enabled - waiting for another detection */
00632   case CT_DISCRIM_STATE_V23ENA:
00633     /* Check if detection is within valid window */
00634     if (dsc->timer_cnt < TDU_SYS_CT1300_DWINLO_CNT) {
00635       fprintf (stdout,"\n    V.23 Period:  %dms - BAD (low)",dsc->timer_cnt>>3);
00636     }
00637     else if (dsc->timer_cnt > TDU_SYS_CT1300_DWINHI_CNT) {
00638       fprintf (stdout,"\n    V.23 Period:  %dms - BAD (high)",dsc->timer_cnt>>3);
00639     }
00640     else {
00641       fprintf (stdout,"\n    V.23 Period:  %dms - GOOD",dsc->timer_cnt>>3);
00642       dsc->detect_cnt++;
00643     }
00644     fflush (stdout);
00645
00646     /* Check if required detection count if met */
00647     if (dsc->detect_cnt >= dsc->detect_req) {
00648       /* Yes - report discrimination (and return to reset state) */
00649       fprintf (stdout,"\n    1300Hz CT Discriminated\n");
00650       fflush (stdout);
00651       dsc->state = CT_DISCRIM_STATE_RESET;
00652     }
00653     else {
00654       /* No - reset timer return to V.23 reported state */
00655       dsc->timer_cnt = 0;
00656       dsc->state     = CT_DISCRIM_STATE_V23RPT;
00657     }
00658     break;
00659   }
00660 }
00661
00662 /******************************************************************************
00663  * FUNCTION PURPOSE: Discriminate process (V.23 versus CT)
00664  ******************************************************************************/
00665 void system_CT_discrim_proc (sysCtDiscrim_t *dsc)
00666 {
00667   /* Actions based on state and timer value */
00668   switch (dsc->state) {
00669
00670   /* No V.23 detection yet */
00671   case CT_DISCRIM_STATE_RESET:
00672     return;
00673
00674   /* Single V.23 detection */
00675   case CT_DISCRIM_STATE_V23RPT:
00676     /* Update "timer" */
00677     dsc->timer_cnt += tduSim.frame_size;
00678
00679     /* Check for V.23 re-enable */
00680     if (dsc->timer_cnt >= TDU_SYS_CT1300_ENABLE_CNT) {
00681       /* Re-enable V.23 detection */
00682       memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
00683       tduControl (tduInst, tdu_CTL_V23_TONES_ON, &tduSim.cfgCtl);
00684       /* Change state */
00685       dsc->state = CT_DISCRIM_STATE_V23ENA;
00686     }
00687     break;
00688
00689   case CT_DISCRIM_STATE_V23ENA:
00690     /* Update "timer" */
00691     dsc->timer_cnt += tduSim.frame_size;
00692
00693     if (dsc->timer_cnt >= TDU_SYS_CT1300_RESET_CNT) {
00694       /* Discriminator timeout - reset state machine */
00695       dsc->state = CT_DISCRIM_STATE_RESET;
00696     }
00697     break;
00698   }
00699 }
00700
00701
00702 /******************************************************************************
00703  * FUNCTION PURPOSE: Receive TDU detected events
00704  ******************************************************************************
00705  * DESCRIPTION: Transfers data to global variables and maintains some basic
00706  *              statistics.
00707  ******************************************************************************/
00708 void sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF,
00709                     tduCptSmartRep_t *cpt_report)
00710 {
00711   tint  tone_id   =   tid & tdu_TID_MASK_ID;
00712   tint  tone_type = ((tid & tdu_TID_TYPE_MASK) >> 10);
00713   tint  tone_dir  = ((tid & 0x0300) >> 8);
00714   tbool v23_found = FALSE;
00715   char  *tdu_minor;
00716
00717   sys_tdu_results.mf_tid = tid;
00718   sys_tdu_results.mf_on_off = on;
00719   sys_tdu_results.hangover_time = time;
00720   sys_tdu_results.mf_power = power_MF;
00721
00722   if (tduSim.options.report) {
00723     /* Get minor string pointer (if any) */
00724     switch (tone_id) {
00725       case tdu_TID_V25:
00726       case tdu_TID_V25_RX:
00727         tdu_minor = tdu_ced_minor[tone_type];
00728         break;
00729       case tdu_TID_V25_PR:
00730       case tdu_TID_V25_RX_PR:
00731         tdu_minor = tdu_cedpr_minor[tone_type];
00732         break;
00733       case tdu_TID_V18A:
00734         tdu_minor = tdu_v18_minor[tone_type];
00735         break;
00736       case tdu_TID_BELL:
00737         tdu_minor = tdu_bell_minor[tone_type];
00738         break;
00739       case tdu_TID_V8BIS_TONES:
00740         tdu_minor = tdu_v8bis_minor[tone_type];
00741         break;
00742       case tdu_TID_V21_TONES:
00743         tdu_minor = tdu_v21modem_minor[tone_type];
00744         break;
00745       case tdu_TID_V23_TONES:
00746         tdu_minor = tdu_v23modem_minor[tone_type];
00747         v23_found = TRUE;
00748         break;
00749       case tdu_TID_V21_CI:
00750         tdu_minor = tdu_v21ci_minor[tone_type];
00751         break;
00752       case tdu_TID_B202_TONES:
00753         tdu_minor = tdu_b202_minor[tone_type];
00754         break;
00755       case tdu_TID_VOICE_DISC:
00756         tdu_minor = tdu_vdisc_minor[tone_type];
00757         break;
00758       case tdu_TID_COIN_TONES:
00759         tdu_minor = tdu_coin_minor[tone_type];
00760         break;
00761       case tdu_TID_SIA:
00762         tdu_minor = tdu_sia_minor[tone_type];
00763         break;
00764       default:
00765         tdu_minor = tdu_null_minor[tone_type];
00766         break;
00767     }
00768
00769     /* Create tone event string */
00770     if (tone_id < tdu_TID_FIRST) {
00771       strcpy (event_string, digit_strings[tone_id]);
00772     }
00773     else {
00774       strcpy (event_string, tone_strings[tone_id-tdu_TID_FIRST]);
00775     }
00776     strcat(event_string, tdu_direction[tone_dir]);
00777     strcat(event_string, tdu_minor);
00778
00779     /* Print results to STDOUT and report file */
00780     if (tduSim.options.add_tag) {
00781       fprintf (stdout,  "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d,  %s",
00782                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count,
00783                tduTestCaseTag);
00784       fprintf (freport, "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d,  %s",
00785                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count,
00786                tduTestCaseTag);
00787     }
00788     else {
00789       fprintf (stdout,  "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d",
00790                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count);
00791       fprintf (freport, "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d",
00792                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count);
00793     }
00794     fflush (stdout);
00795   }
00796
00797   /* 1300Hz CT discrimination */
00798   if (v23_found) {
00799     system_CT_discrim_rpt (&sysCtDiscrim);
00800   }
00801   /* Additional reporting for CPT */
00802   if (cpt_report != NULL) {
00803     sys_tdu_results.cpt_report = *cpt_report;
00804   }
00805 }
00806
00807 /******************************************************************************
00808  * FUNCTION PURPOSE: Debug & exception functions.
00809  ******************************************************************************
00810  * DESCRIPTION: Debug & exception functions.
00811  *
00812  *****************************************************************************/
00813
00814 void sysDebugInfo (void *ID, tuint msgType, tuint msgCode, tuint msgLength,
00815                    tuint * supportingData)
00816 {
00817   volatile tint exit_flag = 1;
00818
00819   switch (msgType) {
00820     /* Convert message code to a string -- call system exception handler */
00821     case dbg_EXCEPTION_FATAL:
00822       sys_dbg_array[0] = *((tuint *) ID);
00823       sys_dbg_array[1] = msgCode;
00824       while (exit_flag);
00825       break;
00826     /* Post debug trace to debug task */
00827     case dbg_TRACE_INFO:
00828       fprintf (freport, "\nFrames:%4d ID:%04x msgCode:%d [%04x][%04x]",
00829                tduSim.txSGN.frm_count, ID, msgCode, supportingData[0],
00830                supportingData[1]);
00831       break;
00832     /* Ignore invalid message types */
00833     default:
00834       break;
00835   }
00836 }
00837
00838 /******************************************************************************/
00839 static inline void sysDebugInternal (tuint id, char *str)
00840 {
00841   tint  i;
00842   char *src;
00843   char *dst;
00844
00845   /* Copy id and message in a safe place */
00846   sys_dbg_id = id;
00847   src = str;
00848   dst = (char *) &sys_dbg_message[0];
00849   for (i=0; i<tdu_SIM_DBGMSG_SIZE; i++) {
00850     *dst++ = *src++;
00851   }
00852 }
00853
00854 void sysDebug (tuint id, char *s)
00855 {
00856   sysDebugInternal (id, s);
00857 }
00858
00859 void sysException (tuint id, char *s)
00860 {
00861   sysDebugInternal (id, s);
00862   /* loop forever */
00863   loop;
00864 }
00865
00866 /******************************************************************************/
00867 sgnFileIo_t *sys_input_file (sgnFileIo_t *dsc)
00868 {
00869 #ifndef _HWDSKT
00870   asm (" nop");
00871   asm (" nop");
00872   asm (" nop");
00873   asm (" nop");
00874   asm (" nop");
00875   asm (" nop");
00876 #endif
00877   return (dsc);
00878 }
00879
00880 /******************************************************************************/
00881 void takeFileSamples (sigGenPars_t *sgn_gen, int frame_size, linSample *frame)
00882 {
00883   unsigned char frame_pcm[TST_MAX_FRAME];
00884   tint i, j;
00885
00886   switch (sgn_gen->fileFORMAT) {
00887     case tdu_SIM_FILEIO_MU_PCM:
00888     case tdu_SIM_FILEIO_A_PCM:
00889       if (sgn_gen->fileCLOSE) {
00890         sgn_gen->fileCLOSE = FALSE;
00891         if ((sgn_gen->filePtr = fopen (sgn_gen->fileNAME, "rb")) == NULL)
00892           exit (0);
00893       }
00894       /* Read 8-bit PCM samples */
00895       if (fread (frame_pcm, 1, frame_size, sgn_gen->filePtr) != frame_size) {
00896         fclose (sgn_gen->filePtr);
00897         sgn_gen->fileCLOSE = TRUE;
00898       }
00899       /* Expand samples */
00900       if (sgn_gen->fileFORMAT == tdu_SIM_FILEIO_MU_PCM) {
00901         for (i=0; i<frame_size; i++) {
00902           frame[i] = muaTblUlaw[frame_pcm[i]];
00903         }
00904       }
00905       /* A law samples */
00906       else {
00907         for (i=0; i<frame_size; i++) {
00908           frame[i] = muaTblAlaw[frame_pcm[i]];
00909         }
00910       }
00911       break;
00912     case tdu_SIM_FILEIO_LIN:
00913     case tdu_SIM_FILEIO_LINWAV:
00914       if (sgn_gen->fileCLOSE) {
00915         sgn_gen->fileCLOSE = FALSE;
00916         if ((sgn_gen->filePtr = fopen (tdu_SIM_TX_FILE_NAME, "rb")) == NULL) {
00917           exit (0);
00918         }
00919         if (sgn_gen->fileFORMAT == tdu_SIM_FILEIO_LINWAV) {
00920           /* skip over .wav header */
00921           fseek (sgn_gen->filePtr, 44, SEEK_SET);
00922         }
00923       }
00924       /* Read first half of linear samples */
00925       if (fread (frame_pcm, sizeof (unsigned char), frame_size, sgn_gen->filePtr) != frame_size) {
00926         fclose (sgn_gen->filePtr);
00927         sgn_gen->fileCLOSE = TRUE;
00928         break;
00929       }
00930       for (i=0,j=0; i<frame_size; j++,i+=2) {
00931         *frame++ = (linSample) (((tuint) frame_pcm[i + 1] << 8) | (tuint) frame_pcm[i]);
00932       }
00933
00934       /* Read second half of linear samples */
00935       if (fread (frame_pcm, sizeof (unsigned char), frame_size, sgn_gen->filePtr) != frame_size) {
00936         fclose (sgn_gen->filePtr);
00937         sgn_gen->fileCLOSE = TRUE;
00938         break;
00939       }
00940       for (i=0,j=0; i<frame_size; j++, i+=2) {
00941         *frame++ = (linSample) (((tuint) frame_pcm[i + 1] << 8) | (tuint) frame_pcm[i]);
00942       }
00943   }
00944 }
00945
00946 /******************************************************************************/
00947 void generate_tone_frame (sigGenPars_t *sgn, tint frame_size, linSample *frame)
00948 {
00949   sgn->frm_count++;
00950
00951   if (sgn->fileINPUT) {
00952     takeFileSamples (sgn, frame_size, frame);
00953   }
00954   else {
00955     /* Generate one frame of samples */
00956     sgnGenerateFrame (sgn->inst, frame_size, frame);
00957   }
00958 }
00959
00960 /******************************************************************************/
00961 void sys_new_sgn (sigGenPars_t *sgn)
00962 {
00963   tint ret_code;
00964   tint inst_sz;
00965
00966   /* Get instance size and allocate memory */
00967   ret_code  = sgnGetSizes (&inst_sz);
00968   sgn->inst = (ret_code == sgn_NOERR) ? malloc (inst_sz) : NULL;
00969 }
00970
00971 /******************************************************************************/
00972 void sys_open_sgn (sigGenPars_t *sgn)
00973 {
00974   sgnConfig_t cfg;
00975
00976   cfg.dc_offset     = sgn->dc_offset;
00977   cfg.wf_type       = sgn->wf_type;
00978   cfg.f1            = sgn->f1;
00979   cfg.f2            = sgn->f2;
00980   cfg.t_amp1        = sgn->t_amp1;
00981   cfg.t_amp2        = sgn->t_amp2;
00982   cfg.pr_period     = sgn->pr_period;
00983   cfg.pr_enable     = sgn->pr_enable;
00984   cfg.fsk_dataptr   = sgn->fsk_dataptr;
00985   cfg.fsk_numword   = sgn->fsk_numword;
00986   cfg.noise_level   = sgn->noise_level;
00987   cfg.noise_seed    = sgn->noise_seed;
00988   cfg.noise_type    = sgn->noise_type;
00989   cfg.power_level   = sgn->power_level;
00990   cfg.hoth_wng_seed = sgn->hoth_wng_seed;
00991   cfg.file_io_fcn   = sys_input_file;
00992   cfg.Fs            = 8000;
00993   cfg.fsk_duration  = 90;
00994   cfg.exception     = sysException;
00995   cfg.debug         = sysDebug;
00996   cfg.delay         = 0;
00997
00998   /* Initialize Signal generator instance */
00999   sgnInit (sgn->inst, &cfg);
01000 }
01001
01002 /******************************************************************************/
01003 void sys_set_sgn (sigGenPars_t *sgn)
01004 {
01005   sgnControl_t ctl;
01006
01007   /* Set DC offset */
01008   ctl.code        = sgn_CTL_DCOFFSET;
01009   ctl.u.dc_offset = sgn->dc_offset;
01010   sgnControl (sgn->inst, &ctl);
01011
01012   if (sgn->wf_type == sgn_WFT_CSS || sgn->wf_type == sgn_WFT_CSS_DTK) {
01013     ctl.code = sgn_CTL_CSS_POW;
01014     ctl.u.power_level = (sgn->state) ? sgn->power_level : -80;
01015   }
01016   else if (sgn->wf_type == sgn_WFT_HOTH) {
01017     ctl.code = sgn_CTL_HOTH_POW;
01018     ctl.u.power_level = (sgn->state) ? sgn->power_level : -80;
01019   }
01020   else {
01021     ctl.code = sgn_CTL_TONE;
01022     ctl.u.t.f1 = sgn->f1;
01023     ctl.u.t.f2 = sgn->f2;
01024   ctl.Fs = 8000;
01025     ctl.u.t.amp1 = (sgn->state) ? sgn->t_amp1 : 0;
01026     ctl.u.t.amp2 = (sgn->state) ? sgn->t_amp2 : 0;
01027   }
01028   sgnControl (sgn->inst, &ctl);
01029
01030   ctl.code = sgn_CTL_FSK_300;
01031   ctl.u.fsk.duration = sgn->fsk_duration;
01032   ctl.u.fsk.dataptr  = sgn->fsk_dataptr;
01033   ctl.u.fsk.numword  = sgn->fsk_numword;
01034   sgnControl (sgn->inst, &ctl);
01035
01036   ctl.code = (sgn->pr_enable ? sgn_CTL_PRON : sgn_CTL_PROFF);
01037   ctl.u.pr_period = sgn->pr_period;
01038   sgnControl (sgn->inst, &ctl);
01039
01040   ctl.code = sgn_CTL_NOISE;
01041   ctl.u.noise_level = (sgn->state) ? sgn->noise_level : -80;
01042   sgnControl (sgn->inst, &ctl);
01043 }
01044
01045 /******************************************************************************
01046  * FUNCTION PURPOSE: Create TDU module.
01047  ******************************************************************************
01048  * DESCRIPTION: Obtains info on TDU buffers, and creates one instance of TDU.
01049  *
01050  *              NOTE: Should save number of buffers and buffer descriptors
01051  *                    in order to make delete possible.
01052  *
01053  *  void sys_new_tdu (
01054  *    tint chnum,                               - channel number (1 to SYS_MAX_CHANNELS)
01055  *
01056  *    tint max_frame_length,  - maximum # samples in the frame (must be
01057  *                              greater than or equal to maximum sub-segment
01058  *                              size)
01059  *****************************************************************************/
01060 void sys_new_tdu (tint chnum, tint max_frame_length, tint lite)
01061 {
01062   ecomemBuffer_t  *bufs;
01063   tduSizeConfig_t sizeCfg;
01064   tduNewConfig_t  tduCfgNew;
01065   tint            i, result;
01066   tuint           mId;
01067
01068   /* TDU get sizes */
01069   sizeCfg.maxSamplesPerFrame = max_frame_length;
01070   sizeCfg.lite = lite;          /* FULL or LITE TDU */
01071
01072   /* TDU get sizes */
01073   result = tduGetSizes (&tduNbufs, (const ecomemBuffer_t **) &bufs, &sizeCfg);
01074   if (!(result == tdu_NOERR)) {
01075     sysException (0xbaba, "invalid sizes");
01076   }
01077
01078   /* Allocate Buffers */
01079   tduBufs = (ecomemBuffer_t *) malloc (tduNbufs * sizeof (ecomemBuffer_t));
01080   if (tduBufs == NULL) {
01081     sysException (0xbaba, "no memory");
01082   }
01083
01084   /* */
01085   for (i=0; i<tduNbufs; i++) {
01086     tduBufs[i]           = bufs[i];
01087     tduBufs[i].mclass    = ecomem_CLASS_EXTERNAL;
01088     tduBufs[i].log2align = bufs[i].log2align;
01089     tduBufs[i].volat     = bufs[i].volat;
01090 #if (defined(ti_targets_C64) || defined(ti_targets_C64_big_endian) ||  defined(ti_targets_C64P) || defined(ti_targets_C64P_big_endian) )
01091     tduBufs[i].base      = (bufs[i].size) ? memalign((1 << bufs[i].log2align),bufs[i].size) : NULL;
01092 #else
01093     {
01094       tuint linAlign;
01095       linAlign = (tuint) 1 << bufs[i].log2align;
01096       tduBufs[i].base = (bufs[i].size) ? malloc(bufs[i].size + linAlign -1) : NULL;
01097       tduBufs[i].base = (void *)((((tulong)tduBufs[i].base)+(linAlign)-1)&(0xFFFFFFFFUL-(linAlign)+1));
01098    }
01099 #endif
01100   }
01101
01102   /* tduNew */
01103   mId = lite ? 0x11 : 0x22;
01104   tduCfgNew.ID = (mId << 8) | chnum;
01105   tduCfgNew.sizeCfg = sizeCfg;
01106   if (tduNew (&tduInst, tduNbufs, tduBufs, &tduCfgNew) != tdu_NOERR) {
01107     sysException (0xbaba, "tduNew");
01108   }
01109 }
01110
01111 /******************************************************************************
01112  * FUNCTION PURPOSE: Open TDU module.
01113  ******************************************************************************
01114  * DESCRIPTION: Opens one instance of TDU module.
01115  *
01116  *  void sys_open_tdu (
01117  *    int chnum,            - channel number (1 to SYS_MAX_CHANNELS)
01118  *    int tdu_mf_type,      - tdu_DTMF        (DTMF tones),
01119  *                            tdu_R2_FORWARD  (R2 forward signalling)
01120  *                            tdu_R2_BACKWARD (R2 backward signalling)
01121  *                            tdu_NO5         (No.5 signalling)
01122  *    int frame_size            - # samples in the frame (must be
01123  *                                greater than or equal to sub-segment size)
01124  *    tint freq_pow_thresh_low  - low power level threshold for each frequency
01125  *                                in dBm as integer
01126  *    tint freq_pow_thresh_high - high power level threshold for each frequency
01127  *                                in dBm as integer
01128  *    tint twist_negative       - tolerable difference in dB  of the
01129  *                                difference between the lower and the higher
01130  *                                group of frequencies
01131  *    tint twist_positive;      - tolerable difference in dB  of the
01132  *                                difference between the higher and the lower
01133  *                                group of frequencies
01134  *    tint break_thresh         - threshold for break detection in dBm. When signal
01135  *                                power falls below this threshold, break is detected
01136  *
01137  *****************************************************************************/
01138 void sys_open_tdu (int chnum, tint mf_type, int frame_size, tint freq_pow_thresh_low,
01139                    tint freq_pow_thresh_high, tint twist_negative, tint twist_positive,
01140                    tint break_thresh)
01141 {
01142   tduConfig_t tduCfg;
01143   tint        tduMode;
01144
01145   /* Prepare common configuration options */
01146   tduSim.cfgCtl.u.mf.freqPowThreshLow  = freq_pow_thresh_low;
01147   tduSim.cfgCtl.u.mf.freqPowThreshHigh = freq_pow_thresh_high;
01148   tduSim.cfgCtl.u.mf.twistPositive     = twist_positive;
01149   tduSim.cfgCtl.u.mf.twistNegative     = twist_negative;
01150   tduSim.cfgCtl.u.mf.breakThresh       = break_thresh;
01151
01152   tduCfg.frame_size = frame_size;
01153   tduMode = mf_type;
01154
01155   /* Open TDU instance */
01156   tduOpen (tduInst, &tduCfg);
01157
01158   /* start DTMF detector */
01159   tduControl (tduInst, tduMode, &tduSim.cfgCtl);
01160
01161   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01162                                             tdu_POSITION_SEC_ACBC_CHANGED |
01163                                             tdu_POSITION_TXRX_CHANGED;
01164   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
01165                                             tdu_POSITION_SEC_AC;
01166   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01167 }
01168
01169 /******************************************************************************
01170  * FUNCTION PURPOSE: Overwrite scratch buffers.
01171  ******************************************************************************/
01172 void overwriteScratchBuffers (void)
01173 {
01174   tint i;
01175
01176   for (i=0; i<tduNbufs; i++) {
01177     if (tduBufs[i].volat) {
01178       memset (tduBufs[i].base, tduSim.pattern, tduBufs[i].size);
01179     }
01180   }
01181 }
01182
01183 /*---------------------------------------------------------------------------**
01184 **                                                                           **
01185 **      API's for the Basic Detection Test                                   **
01186 **                                                                           **
01187 **---------------------------------------------------------------------------*/
01188
01189 /******************************************************************************
01190  * FUNCTION PURPOSE: Iterates tdu over numFrames frames - single tone detector
01191  *****************************************************************************/
01192 void sftBasicDetection (void *tduInst, tint control_code, tint numOnFrames,
01193                         tint numOffFrames, float tonePower, float freq)
01194 {
01195   tint            i;
01196
01197   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01198   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01199                                             tdu_POSITION_SEC_ACBC_CHANGED |
01200                                             tdu_POSITION_TXRX_CHANGED;
01201   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
01202                                             tdu_POSITION_SEC_AC;
01203   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01204
01205   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01206   tduControl (tduInst, control_code, &tduSim.cfgCtl);
01207
01208   fprintf (stdout, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms ON, %d ms OFF",
01209            freq, tonePower, (numOnFrames*tduSim.frame_size)/8,
01210            (numOffFrames*tduSim.frame_size)/8);
01211
01212   fprintf (freport, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms ON, %d ms OFF",
01213            freq, tonePower, (numOnFrames*tduSim.frame_size)/8,
01214            (numOffFrames*tduSim.frame_size)/8);
01215
01216   sprintf (tduTestCaseTag, "\nTONE %d pow=(%f) freq=(%f) frames=(%d %d)",
01217            control_code, tonePower, freq, numOnFrames, numOffFrames);
01218
01219   tduSim.txSGN.f1        = freq;
01220   tduSim.txSGN.f2        = 0;
01221   tduSim.txSGN.t_amp1    = (linSample) pow (10, (tonePower + 87.29869874256) / 20.0);
01222   tduSim.txSGN.t_amp2    = 0;
01223   tduSim.txSGN.pr_enable = 0;
01224   tduSim.txSGN.pr_period = 0;
01225   tduSim.txSGN.wf_type   = 1;
01226   tduSim.rxSGN.f1        = 0;
01227   tduSim.rxSGN.f2        = 0;
01228   tduSim.rxSGN.t_amp1    = 0;
01229   tduSim.rxSGN.t_amp2    = 0;
01230   tduSim.rxSGN.pr_enable = 0;
01231
01232   /* Initialize signal generator */
01233   sys_open_sgn (&tduSim.rxSGN);
01234   sys_open_sgn (&tduSim.txSGN);
01235
01236   for (i=0; i<(numOnFrames + numOffFrames); i++) {
01237     if (i == numOnFrames) {
01238       tduSim.txSGN.t_amp1 = 0;
01239       sys_set_sgn (&tduSim.txSGN);
01240     }
01241     /* Generate input frames */
01242     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01243
01244     /* Check for scratch buffer overwrite */
01245     if (tduSim.options.overwrite_scr) {
01246       overwriteScratchBuffers ();
01247     }
01248
01249     /* Call TDU - Tx path */
01250     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01251   }
01252 }
01253
01254 /*****************************************************************************/
01255 void sftBasicRxDetection (void *tduInst, tint control_code, tint position,
01256                           tint location, float tonePower, tint prFlag,
01257                           float FreqRx, tint numRxFramesStart, tint numRxFramesStop,
01258                           tint numFrames)
01259 {
01260   tint            i;
01261
01262   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01263   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01264                                             tdu_POSITION_SEC_ACBC_CHANGED |
01265                                             tdu_POSITION_TXRX_CHANGED;
01266   tduSim.cfgCtl.u.position.value_bitfield = position;
01267   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01268
01269   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01270   tduControl (tduInst, control_code, &tduSim.cfgCtl);
01271
01272   fprintf (stdout, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms OFF, %d ms ON, %d ms OFF",
01273            FreqRx, tonePower, ((numRxFramesStart)*tduSim.frame_size)/8,
01274            ((numRxFramesStop-numRxFramesStart)*tduSim.frame_size)/8,
01275            ((numFrames-numRxFramesStop)*tduSim.frame_size)/8);
01276
01277   fprintf (freport, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms OFF, %d ms ON, %d ms OFF",
01278            FreqRx, tonePower, ((numRxFramesStart)*tduSim.frame_size)/8,
01279            ((numRxFramesStop-numRxFramesStart)*tduSim.frame_size)/8,
01280            ((numFrames-numRxFramesStop)*tduSim.frame_size)/8);
01281
01282   tduSim.txSGN.f1        = 0;
01283   tduSim.txSGN.f2        = 0;
01284   tduSim.txSGN.t_amp1    = 0;
01285   tduSim.txSGN.t_amp2    = 0;
01286   tduSim.txSGN.pr_enable = 0;
01287   tduSim.txSGN.pr_period = 0;
01288   tduSim.txSGN.wf_type   = 1;
01289   tduSim.rxSGN.f1        = FreqRx;
01290   tduSim.rxSGN.f2        = 0;
01291   tduSim.rxSGN.t_amp1    = 0;
01292   tduSim.rxSGN.t_amp2    = 0;
01293   tduSim.rxSGN.pr_enable = prFlag;
01294   tduSim.rxSGN.pr_period = 2000;
01295
01296   /* Initialize signal generator */
01297   sys_open_sgn (&tduSim.rxSGN);
01298   sys_open_sgn (&tduSim.txSGN);
01299   sys_set_sgn  (&tduSim.rxSGN);
01300   sys_set_sgn  (&tduSim.txSGN);
01301
01302   for (i=0; i<numFrames; i++) {
01303     if (i == numRxFramesStart) {
01304       tduSim.rxSGN.t_amp1 = (linSample) pow (10, (tonePower + 87.29869874256) / 20.0);
01305       sys_set_sgn (&tduSim.rxSGN);
01306     }
01307     if (i == numRxFramesStop) {
01308       tduSim.rxSGN.t_amp1 = 0;
01309       sys_set_sgn (&tduSim.rxSGN);
01310     }
01311
01312     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01313
01314     /* Check for scratch buffer overwrite */
01315     if (tduSim.options.overwrite_scr) {
01316       overwriteScratchBuffers ();
01317     }
01318
01319     /* Call TDU - Rx path */
01320     tduReceiveIn (tduInst, rx_in_frame, (tduRxLocation_t) location);
01321   }
01322 }
01323
01324 /*****************************************************************************/
01325 void sftBasicDetectionFILE (void *tduInst, tint control_code, char *filename)
01326 {
01327   tint            i;
01328
01329   memset (tx_in_frame, 0, sizeof (tx_in_frame));
01330   for (i=0; i<10; i++) {
01331     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01332   }
01333   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01334                                             tdu_POSITION_SEC_ACBC_CHANGED |
01335                                             tdu_POSITION_TXRX_CHANGED;
01336   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
01337                                             tdu_POSITION_SEC_AC;
01338   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01339
01340   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01341   tduControl (tduInst, control_code,   &tduSim.cfgCtl);
01342
01343   fprintf (freport, "\n\nFile: %s", filename);
01344   fflush (stdout);
01345
01346   tduSim.txSGN.fileINPUT  = TRUE;
01347   tduSim.txSGN.fileNAME   = filename;
01348   tduSim.txSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01349
01350   /* Initialize signal generator */
01351   sys_open_sgn (&tduSim.txSGN);
01352   sys_set_sgn  (&tduSim.txSGN);
01353   tx_frame_no = 0;
01354   do {
01355     /* Generate input frames */
01356     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01357
01358     /* Check for scratch buffer overwrite */
01359     if (tduSim.options.overwrite_scr) {
01360       overwriteScratchBuffers ();
01361     }
01362
01363     /* Call TDU - Tx path */
01364     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01365     system_CT_discrim_proc (&sysCtDiscrim);
01366     tx_frame_no++;
01367   } while (!tduSim.txSGN.fileCLOSE);
01368   tduSim.txSGN.fileINPUT = FALSE;
01369 }
01370
01371 /*****************************************************************************/
01372 void sftBasicDetectionRxFILE (void *tduInst, tint control_code, char *filename)
01373 {
01374   tint   i;
01375
01376   memset (rx_in_frame, 0, sizeof (rx_in_frame));
01377   for (i=0; i<10; i++) {
01378     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01379   }
01380
01381   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01382   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01383                                             tdu_POSITION_SEC_ACBC_CHANGED |
01384                                             tdu_POSITION_TXRX_CHANGED;
01385   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_RX;
01386
01387
01388   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01389
01390   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01391   tduControl (tduInst, control_code, &tduSim.cfgCtl);
01392
01393   fprintf (freport, "\nFile: %s", filename);
01394   fflush (stdout);
01395
01396   tduSim.rxSGN.fileINPUT = TRUE;
01397   tduSim.rxSGN.fileNAME = filename;
01398   tduSim.rxSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01399
01400   /* Initialize signal generator */
01401   sys_open_sgn (&tduSim.rxSGN);
01402   sys_set_sgn  (&tduSim.rxSGN);
01403   rx_frame_no=0;
01404   do {
01405     /* Generate input frames */
01406     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01407
01408     /* Check for scratch buffer overwrite */
01409     if (tduSim.options.overwrite_scr) {
01410       overwriteScratchBuffers ();
01411     }
01412
01413     /* Call TDU - Rx path */
01414     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01415     rx_frame_no++;
01416   } while (!tduSim.rxSGN.fileCLOSE);
01417   tduSim.rxSGN.fileINPUT = FALSE;
01418 }
01419
01420 /************************** Invoking the TDU With Network detector ***************/
01421 void sftBasicDetectionRxFILE_NW (void *tduInst, tint control_code, char *filename)
01422 {
01423   tint   i;
01424
01425   memset (rx_in_frame, 0, sizeof (rx_in_frame));
01426   for (i=0; i<40; i++) {
01427     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01428   }
01429
01430   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01431
01432   /* To ensure the network detector */
01433   tduSim.cfgCtl.u.position.value_bitfield = 0;
01434
01435   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01436
01437   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01438
01439   tduControl (tduInst, tdu_CTL_V21_ON, &tduSim.cfgCtl);
01440   tduControl (tduInst, tdu_CTL_V25_ON, &tduSim.cfgCtl);
01441   tduControl (tduInst, tdu_CTL_CPT_ON, &tduSim.cfgCtl);
01442   tduControl (tduInst, tdu_CTL_V18A_ON, &tduSim.cfgCtl);
01443   tduControl (tduInst, tdu_CTL_SF_ON, &tduSim.cfgCtl);
01444   tduControl (tduInst, tdu_CTL_CNG_ON, &tduSim.cfgCtl);
01445   tduControl (tduInst, tdu_CTL_TT1khz_ON, &tduSim.cfgCtl);
01446   tduControl (tduInst, tdu_CTL_SFDT_CIDCAS_ON, &tduSim.cfgCtl);
01447   tduControl (tduInst, tdu_CTL_CIDCAS_ALL_ON, &tduSim.cfgCtl);
01448   tduControl (tduInst, tdu_CTL_CRE_ON, &tduSim.cfgCtl);
01449   tduControl (tduInst, tdu_CTL_CRE2_ON, &tduSim.cfgCtl);
01450   tduControl (tduInst, tdu_CTL_BELL_ON, &tduSim.cfgCtl);
01451   tduControl (tduInst, tdu_CTL_V8BIS_TONES_ON, &tduSim.cfgCtl);
01452   tduControl (tduInst, tdu_CTL_V21_TONES_ON, &tduSim.cfgCtl);
01453   tduControl (tduInst, tdu_CTL_V23_TONES_ON, &tduSim.cfgCtl);
01454   tduControl (tduInst, tdu_CTL_V21_CM_FAX_ON, &tduSim.cfgCtl);
01455   tduControl (tduInst, tdu_CTL_V21_V8DATA_ON, &tduSim.cfgCtl);
01456   tduControl (tduInst, tdu_CTL_B202_TONES_ON, &tduSim.cfgCtl);
01457   tduControl (tduInst, tdu_CTL_BDTEW_ON, &tduSim.cfgCtl);
01458
01459   if ((control_code == tdu_CTL_SIA_ON && tduSim.options.enable_sia) ||
01460        control_code != tdu_CTL_SIA_ON) {
01461     tduControl (tduInst, control_code, &tduSim.cfgCtl);
01462   }
01463
01464   fprintf (freport, "\nFile: %s", filename);
01465   fflush (stdout);
01466
01467   tduSim.rxSGN.fileINPUT = TRUE;
01468   tduSim.rxSGN.fileNAME = filename;
01469   tduSim.rxSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01470
01471   /* Initialize signal generator */
01472   sys_open_sgn (&tduSim.rxSGN);
01473   sys_set_sgn  (&tduSim.rxSGN);
01474   rx_frame_no=0;
01475   do {
01476     /* Generate input frames */
01477     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01478
01479     /* Check for scratch buffer overwrite */
01480     if (tduSim.options.overwrite_scr) {
01481       overwriteScratchBuffers ();
01482     }
01483
01484     /* Call TDU - Rx path */
01485     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01486     rx_frame_no++;
01487   } while (!tduSim.rxSGN.fileCLOSE);
01488   tduSim.rxSGN.fileINPUT = FALSE;
01489 }
01490
01491
01492 /*****************************************************************************/
01493 void tduSimProfile (void *tduInst, char *txfname, char *rxfname, char *outfile)
01494 {
01495   tint i;
01496
01497   /* Initialization */
01498   memset (tx_in_frame, 0, sizeof (tx_in_frame));
01499   memset (rx_in_frame, 0, sizeof (rx_in_frame));
01500   for (i=0; i<10; i++) {
01501     tduSendIn    (tduInst, tx_in_frame, tdu_TX_ONLY);
01502     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01503   }
01504   strcpy (txprof_fstr, tdu_SIM_PROFILE_BASE_DIR);
01505   strcpy (rxprof_fstr, tdu_SIM_PROFILE_BASE_DIR);
01506   strcpy (prof_output, tdu_SIM_PROFILE_BASE_DIR);
01507
01508   /* Prepare for TX file input */
01509   strcat (txprof_fstr, txfname);
01510   tduSim.txSGN.fileINPUT  = TRUE;
01511   tduSim.txSGN.fileNAME   = txprof_fstr;
01512   tduSim.txSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01513   sys_open_sgn (&tduSim.txSGN);
01514   sys_set_sgn  (&tduSim.txSGN);
01515
01516   /* Prepare for RX file input */
01517   strcat (rxprof_fstr, rxfname);
01518   tduSim.rxSGN.fileINPUT  = TRUE;
01519   tduSim.rxSGN.fileNAME   = rxprof_fstr;
01520   tduSim.rxSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01521   sys_open_sgn (&tduSim.rxSGN);
01522   sys_set_sgn  (&tduSim.rxSGN);
01523
01524   /* Enable DTMF detection */
01525   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01526   tduSim.cfgCtl.u.mf.freqPowThreshLow  = -30;
01527   tduSim.cfgCtl.u.mf.freqPowThreshHigh = 1;
01528   tduSim.cfgCtl.u.mf.twistPositive     = 5;
01529   tduSim.cfgCtl.u.mf.twistNegative     = 9;
01530   tduSim.cfgCtl.u.mf.breakThresh       = -32;
01531   tduControl (tduInst, tdu_CTL_MF_DTMF, &tduSim.cfgCtl);
01532
01533   /* Enable detectors for profiling */
01534   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01535   tduControl (tduInst, tdu_CTL_V21_ON,         &tduSim.cfgCtl);
01536   tduControl (tduInst, tdu_CTL_V25_ON,         &tduSim.cfgCtl);
01537   tduControl (tduInst, tdu_CTL_CPT_ON,         &tduSim.cfgCtl);
01538   tduControl (tduInst, tdu_CTL_V18A_ON,        &tduSim.cfgCtl);
01539   tduControl (tduInst, tdu_CTL_CNG_ON,         &tduSim.cfgCtl);
01540   tduControl (tduInst, tdu_CTL_TT1khz_ON,      &tduSim.cfgCtl);
01541   tduControl (tduInst, tdu_CTL_BELL_ON,        &tduSim.cfgCtl);
01542   tduControl (tduInst, tdu_CTL_V8BIS_TONES_ON, &tduSim.cfgCtl);
01543   tduControl (tduInst, tdu_CTL_V21_TONES_ON,   &tduSim.cfgCtl);
01544   tduControl (tduInst, tdu_CTL_V23_TONES_ON,   &tduSim.cfgCtl);
01545   tduControl (tduInst, tdu_CTL_V21_CM_FAX_ON,  &tduSim.cfgCtl);
01546   tduControl (tduInst, tdu_CTL_V21_V8DATA_ON,  &tduSim.cfgCtl);
01547   tduControl (tduInst, tdu_CTL_B202_TONES_ON,  &tduSim.cfgCtl);
01548
01549   /* Prepare cache and profiling */
01550   memarchcfg_cacheEnable ();
01551   profile_initCycleProfiling ();
01552
01553   /* Prepare profiling output file */
01554   strcat (prof_output, outfile);
01555   profile_fptr = fopen (prof_output, "w");
01556   if (profile_fptr == NULL) {
01557     fprintf (stdout, "Unable to open %s\n", prof_output);
01558     return;
01559   }
01560   else {
01561     fprintf (stdout, "\n\nProfiling TX: %s\n",txprof_fstr);
01562     fprintf (stdout, "          RX: %s\n",rxprof_fstr);
01563   }
01564   tdu_prof_sample_cnt = 0L;
01565   tdu_prof_nxt_sec    = 8000L;
01566   tdu_prof_sec_cnt    = 0;
01567
01568   /* Loop through file */
01569   do {
01570     /* Generate input frames */
01571     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01572     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01573
01574     /* Flush cache */
01575     memarchcfg_cacheFlush ();
01576
01577     /* Set position for TX processing */
01578     tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01579                                               tdu_POSITION_SEC_ACBC_CHANGED |
01580                                               tdu_POSITION_TXRX_CHANGED;
01581     tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC;
01582     tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01583
01584     /* Perform TDU TX processing */
01585     txprof_beg_cnt = profile_getCPUcycleCount ();
01586     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01587     txprof_end_cnt = profile_getCPUcycleCount ();
01588
01589     /* Flush cache */
01590     memarchcfg_cacheFlush ();
01591
01592     /* Perform TDU TX processing */
01593     rxprof_beg_cnt = profile_getCPUcycleCount ();
01594     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01595     rxprof_end_cnt = profile_getCPUcycleCount ();
01596
01597     /* Perform TDU TX processing */
01598     txprof_cnt = txprof_end_cnt - txprof_beg_cnt;
01599     rxprof_cnt = rxprof_end_cnt - rxprof_beg_cnt;
01600
01601     /* Output cycle data */
01602     fprintf (profile_fptr, TDU_SIM_PROFILE_FMT, txprof_cnt, rxprof_cnt);
01603
01604     /* Monitor progress */
01605     tdu_prof_sample_cnt += tduSim.frame_size;
01606     if (tdu_prof_sample_cnt >= tdu_prof_nxt_sec) {
01607       tdu_prof_nxt_sec += 8000;
01608       tdu_prof_sec_cnt++;
01609       fprintf (stdout, "Progress:  %d Seconds\n", tdu_prof_sec_cnt);
01610     }
01611   } while (!tduSim.txSGN.fileCLOSE | !tduSim.rxSGN.fileCLOSE);
01612
01613   /* Clean up */
01614   fclose (profile_fptr);
01615   profile_closeCycleProfiling ();
01616   tduSim.txSGN.fileINPUT = FALSE;
01617   tduSim.rxSGN.fileINPUT = FALSE;
01618 }
01619
01620 /*****************************************************************************/
01621 void sftVerifyRange (void *tduInst, tint ctl_code, tint min_frames, tint max_frames,
01622                      tint off_frames, tint step_frames, float freq)
01623 {
01624   float pow;
01625   tint  i;
01626
01627   for (pow=2.0; pow>=-46.0; pow-=2.0) {
01628     for (i=min_frames; i<max_frames; i+=step_frames) {
01629       sftBasicDetection (tduInst, ctl_code, i, off_frames, pow, freq);
01630     }
01631   }
01632 }
01633
01634 /*****************************************************************************/
01635 void sftVerifyRangeRx (void *tduInst, tint ctl_code, tint position, tint location,
01636                        tint prFlag, float freq, tint lead_frames, tint min_frames,
01637                        tint max_frames, tint trail_frames, tint step_frames,
01638                        tint start_pow, tint end_pow, tint step_pow)
01639 {
01640   float pow;
01641   int i;
01642
01643   for (pow=(float)start_pow; pow>=(float)end_pow; pow-=(float)step_pow) {
01644     for (i=min_frames; i<max_frames; i+=step_frames) {
01645        sftBasicRxDetection (tduInst, ctl_code, position, location, pow, prFlag, freq,
01646                             lead_frames, lead_frames+i, lead_frames+trail_frames+i);
01647     }
01648   }
01649 }
01650
01651
01652 /* Compile-time size determination */
01653 tuint tduIntFwTable_size  = sizeof(tduIntFwTable);
01654 tuint tduContext_size     = sizeof(tduContext);
01655 tuint tduDetContexts_size = sizeof(tduDetContexts);
01656
01657
01658 void sftAllDetectionFILE (void *tduInst, char *filename)
01659 {
01660   tint i;
01661
01662   tduSim.txSGN.frm_count = 0;
01663
01664   memset (tx_in_frame, 0, sizeof (tx_in_frame));
01665   for (i=0; i<10; i++) {
01666     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01667   }
01668
01669   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01670                                             tdu_POSITION_SEC_ACBC_CHANGED |
01671                                             tdu_POSITION_TXRX_CHANGED;
01672   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC |
01673                                             tdu_POSITION_SEC_AC;
01674   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01675   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01676
01677   tduControl (tduInst, tdu_CTL_V21_ON, &tduSim.cfgCtl);
01678   tduControl (tduInst, tdu_CTL_V25_ON, &tduSim.cfgCtl);
01679   tduControl (tduInst, tdu_CTL_CPT_ON, &tduSim.cfgCtl);
01680   tduControl (tduInst, tdu_CTL_V18A_ON, &tduSim.cfgCtl);
01681   tduControl (tduInst, tdu_CTL_SF_ON, &tduSim.cfgCtl);
01682   tduControl (tduInst, tdu_CTL_CNG_ON, &tduSim.cfgCtl);
01683   tduControl (tduInst, tdu_CTL_TT1khz_ON, &tduSim.cfgCtl);
01684   tduControl (tduInst, tdu_CTL_SFDT_CIDCAS_ON, &tduSim.cfgCtl);
01685   tduControl (tduInst, tdu_CTL_CIDCAS_ALL_ON, &tduSim.cfgCtl);
01686   tduControl (tduInst, tdu_CTL_CRE_ON, &tduSim.cfgCtl);
01687   tduControl (tduInst, tdu_CTL_CRE2_ON, &tduSim.cfgCtl);
01688   tduControl (tduInst, tdu_CTL_BELL_ON, &tduSim.cfgCtl);
01689   tduControl (tduInst, tdu_CTL_V8BIS_TONES_ON, &tduSim.cfgCtl);
01690   tduControl (tduInst, tdu_CTL_V21_TONES_ON, &tduSim.cfgCtl);
01691   tduControl (tduInst, tdu_CTL_V23_TONES_ON, &tduSim.cfgCtl);
01692   tduControl (tduInst, tdu_CTL_V21_CM_FAX_ON, &tduSim.cfgCtl);
01693   tduControl (tduInst, tdu_CTL_V21_V8DATA_ON, &tduSim.cfgCtl);
01694   tduControl (tduInst, tdu_CTL_B202_TONES_ON, &tduSim.cfgCtl);
01695   tduControl (tduInst, tdu_CTL_BDTEW_ON, &tduSim.cfgCtl);
01696
01697   if (tduSim.options.enable_sia) {
01698     tduControl (tduInst, tdu_CTL_SIA_ON, &tduSim.cfgCtl);
01699   }
01700
01701   fprintf (freport, "\n\n===>Running file: %s", filename);
01702   fflush (stdout);
01703
01704   tduSim.txSGN.fileINPUT  = TRUE;
01705   tduSim.txSGN.fileNAME   = filename;
01706   tduSim.txSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01707
01708   /* Initialize signal generator */
01709   sys_open_sgn (&tduSim.txSGN);
01710   sys_set_sgn  (&tduSim.txSGN);
01711
01712   do {
01713     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01714     if (tduSim.options.overwrite_scr) {
01715       overwriteScratchBuffers ();
01716     }
01717     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01718   } while (!tduSim.txSGN.fileCLOSE);
01719
01720   tduSim.txSGN.fileINPUT = FALSE;
01721 }
01722
01723 /*****************************************************************************/
01724 void main (void)
01725 {
01726   freport = fopen ("testrep.txt", "wt");
01727   /* Initialize TDU module */
01728   tduInst = NULL;
01729   sys_new_tdu (1, tduSim.max_frame_length, tduSim.options.tdu_lite);
01730   memset (&sys_tdu_results, 0, sizeof (sys_tdu_results));
01731
01732   /* TEST */
01733   tduSim.mf_type = tdu_DET_ID_DTMF;
01734   sys_open_tdu (1, tdu_CTL_MF_DTMF, tduSim.frame_size, -30, 1, 9, 5, -32);
01735
01736   /* Create SGN Instances */
01737   sys_new_sgn (&tduSim.txSGN);
01738   sys_new_sgn (&tduSim.rxSGN);
01739
01740
01741   /* Perform TX Profiling */
01742   if (tduSim.options.profile) {
01743     tduSim.options.report = FALSE;
01744     tduSimProfile (tduInst, "tx_speech.ula",  "rx_speech.ula",  "speech_profiling.txt");
01745     tduSimProfile (tduInst, "tx_silence.ula", "rx_silence.ula", "silence_profiling.txt");
01746     tduSimProfile (tduInst, "tx_tone.ula",    "rx_tone.ula",    "tone_profiling.txt");
01747   }
01748
01749   /* Normal TDU testing */
01750   else {
01751
01752     /* Initialize signal generator */
01753     sys_open_sgn (&tduSim.rxSGN);
01754     sys_open_sgn (&tduSim.txSGN);
01755
01756
01757     /******************************/
01758     /* SIA-TX Verification      */
01759     /******************************/
01760     fprintf (stdout, "\n\n ************************* SIA TX Direction ******************************");
01761     fprintf (stdout, "\n Test for SIA DC02 PULSE:  1400Hz  530ms");
01762     sftAllDetectionFILE (tduInst, "..\\..\\vectors\\inp\\sia_dc02_1400_530ms.pcm");
01763     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  200ms");
01764     sftAllDetectionFILE (tduInst,  "..\\..\\vectors\\inp\\sia_dc02_2300_200ms.pcm");
01765     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  530ms");
01766     sftAllDetectionFILE (tduInst, "..\\..\\vectors\\inp\\sia_dc02_2300_530ms.pcm");
01767     fprintf (stdout, "\n Test for SIA DC02 DTMF:   1400Hz / 2300Hz  100ms");
01768     sftAllDetectionFILE (tduInst, "..\\..\\vectors\\inp\\sia_dc02_dtmf.pcm");
01769     fprintf (stdout, "\n Test for SIA DC05:        1400Hz / SIL / 2300Hz  100ms");
01770     sftAllDetectionFILE (tduInst,"..\\..\\vectors\\inp\\sia_dc05.pcm");
01771
01772     /******************************/
01773     /* SIA-RX Verification        */
01774     /******************************/
01775     fprintf (stdout, "\n\n ************************* SIA RX Direction ******************************");
01776     fprintf (stdout, "\n Test for SIA DC02 PULSE:  1400Hz  200ms");
01777     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "..\\..\\vectors\\inp\\sia_dc02_1400_200ms.pcm");
01778     fprintf (stdout, "\n Test for SIA DC02 PULSE:  1400Hz  530ms");
01779     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "..\\..\\vectors\\inp\\sia_dc02_1400_530ms.pcm");
01780     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  200ms");
01781     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "..\\..\\vectors\\inp\\sia_dc02_2300_200ms.pcm");
01782     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  530ms");
01783     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "..\\..\\vectors\\inp\\sia_dc02_2300_530ms.pcm");
01784     fprintf (stdout, "\n Test for SIA DC02 DTMF:   1400Hz / 2300Hz  100ms");
01785     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "..\\..\\vectors\\inp\\sia_dc02_dtmf.pcm");
01786     fprintf (stdout, "\n Test for SIA DC05:        1400Hz / SIL / 2300Hz  100ms");
01787     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "..\\..\\vectors\\inp\\sia_dc05.pcm");
01788
01789     /******************************/
01790     /* V.18a TTY Verification     */
01791     /******************************/
01792     fprintf (stdout, "\n\n Test for V.18a (TTY)");
01793     sftAllDetectionFILE (tduInst,"..\\..\\vectors\\inp\\tone_event_tty.pcm");
01794
01795     /******************************/
01796     /* Coin Tones Verification    */
01797     /******************************/
01798     fprintf (stdout, "\n\n Test for Coin Tones:  1537Hz & 2200Hz");
01799     sftBasicDetectionFILE (tduInst, tdu_CTL_MF_COIN_TONES_ON, "..\\..\\vectors\\inp\\cointones_1537_2200.pcm");
01800     fprintf (stdout, "\n Test for Coin Tones:  1700Hz & 2200Hz");
01801     sftBasicDetectionFILE (tduInst, tdu_CTL_MF_COIN_TONES_ON, "..\\..\\vectors\\inp\\cointones_1700_2200.pcm");
01802
01803     /******************************/
01804     /* TX Range Verification      */
01805     /******************************/
01806     sftVerifyRange (tduInst,  tdu_CTL_SF_ON, 20, 150, 50, 2, 2600);
01807     sftVerifyRange (tduInst, tdu_CTL_V25_ON, 20, 150, 50, 2, 2100);
01808
01809     /***************************************/
01810     /* RX Range Verification (default)     */
01811     /***************************************/
01812     fprintf (stdout, "\n\nRX Range Verification: tdu_RX_ONLY\n");
01813     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 0, 2225, 20, 25, 200, 20, 25, 2, -40, 2);
01814     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 0, 2250, 20, 25, 200, 20, 25, 2, -40, 2);
01815     sftVerifyRangeRx (tduInst,    tdu_CTL_V25_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 1, 2100, 20, 25, 200, 20, 25, 2, -40, 2);
01816     sftVerifyRangeRx (tduInst, tdu_CTL_SS7COT_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 0, 2000, 20,  5,  50, 20, 5,  2, -40, 2);
01817
01818     /***************************************/
01819     /* RX Range Verification (pre-conf)    */
01820     /***************************************/
01821     fprintf (stdout, "\n\nRX Range Verification: tdu_RX_BEFORE_CONF\n");
01822     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, 0, (tint) tdu_RX_BEFORE_CONF, 0, 2225, 20, 25, 200, 20, 25, 2, -40, 2);
01823     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, 0, (tint) tdu_RX_BEFORE_CONF, 0, 2250, 20, 25, 200, 20, 25, 2, -40, 2);
01824     sftVerifyRangeRx (tduInst,    tdu_CTL_V25_ON, 0, (tint) tdu_RX_BEFORE_CONF, 1, 2100, 20, 25, 200, 20, 25, 2, -40, 2);
01825     sftVerifyRangeRx (tduInst, tdu_CTL_SS7COT_ON, 0, (tint) tdu_RX_BEFORE_CONF, 0, 2000, 20,  5,  50, 20, 5,  2, -40, 2);
01826
01827     /******************************/
01828     /* TX Path PCM Examples       */
01829     /******************************/
01830     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\v21hdlc.pcm");
01831     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\bro_to_lex_c2.pcm");
01832     sftBasicDetectionFILE (tduInst, tdu_CTL_V25_ON, "..\\..\\vectors\\inp\\modem.pcm");
01833     sftBasicDetectionFILE (tduInst, tdu_CTL_V25_ON, "..\\..\\vectors\\inp\\modem_ansam.pcm");
01834
01835     /******************************/
01836     /* 1300Hz CT discrimination   */
01837     /******************************/
01838     sysCtDiscrim.detect_req = 1;
01839     sftBasicDetectionFILE (tduInst, tdu_CTL_V23_TONES_ON, "..\\..\\vectors\\inp\\tone_event_ct_lin.pcm");
01840     sysCtDiscrim.detect_req = 2;
01841     sftBasicDetectionFILE (tduInst, tdu_CTL_V23_TONES_ON, "..\\..\\vectors\\inp\\tone_event_ct_lin.pcm");
01842
01843     /******************************/
01844     /* RX Path PCM Examples       */
01845     /******************************/
01846     sftBasicDetectionRxFILE (tduInst, tdu_CTL_V21_CM_FAX_ON, "..\\..\\vectors\\inp\\bro_to_lex_c2.pcm");
01847     sftBasicDetectionRxFILE (tduInst,        tdu_CTL_V25_ON, "..\\..\\vectors\\inp\\modem.pcm");
01848     sftBasicDetectionRxFILE (tduInst,        tdu_CTL_V25_ON, "..\\..\\vectors\\inp\\modem_ansam.pcm");
01849
01850     /******************************/
01851     /* Digit Detection            */
01852     /* Expected: 123a456b789c*0#d */
01853     /******************************/
01854     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\digits_plus_dailtone.pcm");
01855     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_echo_10dbERL_20msDelay.pcm");
01856     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_hits_59.5_on_50_off.pcm");
01857     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_hit_after10ms.pcm");
01858     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_hit_after20ms.pcm");
01859     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_hit_after30ms.pcm");
01860     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_hit_after40ms.pcm");
01861     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_sn17db.pcm");
01862     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_sn20db.pcm");
01863     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_sn23db.pcm");
01864     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "..\\..\\vectors\\inp\\dtmf_sn26db.pcm");
01865   }
01866
01867   /* Close report file */
01868   fclose (freport);
01869
01870   printf ("\nTesting DONE\n");
01871   loop;
01872 }                               /* main (tst TDU) */
01873
01874 /* nothing past this point */


TDU Test: tdusimport.h File Reference

  • File List
  • Globals

tdusimport.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | _TDUSIMPORT_C55L 0
#define | _TDUSIMPORT_C64 0
#define | _TDUSIMPORT_C64_BIG_ENDIAN 0
#define | _TDUSIMPORT_C64P 0
#define | _TDUSIMPORT_C64P_BIG_ENDIAN 0

Define Documentation

#define _TDUSIMPORT_C55L 0

Definition at line 16 of file tdusimport.h.

#define _TDUSIMPORT_C64 0

Definition at line 22 of file tdusimport.h.

#define _TDUSIMPORT_C64_BIG_ENDIAN 0

Definition at line 28 of file tdusimport.h.

#define _TDUSIMPORT_C64P 0

Definition at line 34 of file tdusimport.h.

#define _TDUSIMPORT_C64P_BIG_ENDIAN 0

Definition at line 40 of file tdusimport.h.


TDU Test: tdusimport.h Source File

  • File List
  • Globals

tdusimport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Include platform specific header file for TDU simulation.
00003  ******************************************************************************
00004  * FILE NAME:   tdusimport.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  * (C) Copyright 2010, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #ifndef _TDUSIMPORT_H
00011 #define _TDUSIMPORT_H
00012
00013 #ifdef ti_targets_C55_large
00014 #define _TDUSIMPORT_C55L 1
00015 #else
00016 #define _TDUSIMPORT_C55L 0
00017 #endif
00018
00019 #ifdef ti_targets_C64
00020 #define _TDUSIMPORT_C64 1
00021 #else
00022 #define _TDUSIMPORT_C64 0
00023 #endif
00024
00025 #ifdef ti_targets_C64_big_endian
00026 #define _TDUSIMPORT_C64_BIG_ENDIAN 1
00027 #else
00028 #define _TDUSIMPORT_C64_BIG_ENDIAN 0
00029 #endif
00030
00031 #ifdef ti_targets_C64P
00032 #define _TDUSIMPORT_C64P 1
00033 #else
00034 #define _TDUSIMPORT_C64P 0
00035 #endif
00036
00037 #ifdef ti_targets_C64P_big_endian
00038 #define _TDUSIMPORT_C64P_BIG_ENDIAN 1
00039 #else
00040 #define _TDUSIMPORT_C64P_BIG_ENDIAN 0
00041 #endif
00042
00043 #if _TDUSIMPORT_C55L
00044 #include <ti/mas/tdu/test/src/c55/tdusimport.h>
00045 #elif _TDUSIMPORT_C64
00046 #include <ti/mas/tdu/test/src/c64/tdusimport.h>
00047 #elif _TDUSIMPORT_C64_BIG_ENDIAN
00048 #include <ti/mas/tdu/test/src/c64/tdusimport.h>
00049 #elif _TDUSIMPORT_C64P
00050 #include <ti/mas/tdu/test/src/c64/tdusimport.h>
00051 #elif _TDUSIMPORT_C64P_BIG_ENDIAN
00052 #include <ti/mas/tdu/test/src/c64/tdusimport.h>
00053 #else
00054 #error invalid target
00055 #endif
00056
00057
00058 #endif /* _TDUSIMPORT_H */
00059 /* nothing past this point */


TDU Test: TDU Test Reference

TDU Test Reference

  1. SIA TX Detection
    1. SIA DC02 Pulse (1400 Hz)
      • Filename: sia_dc02_1400_530ms.pcm
      • 530ms tone period
      • -4dBm0 tone power

    2. SIA DC02 Pulse (2300 Hz)
      • Filename: sia_dc02_2300_200ms.pcm
      • 200ms tone period
      • -5dBm0 tone power

    3. SIA DC02 Pulse (2300 Hz)
      • Filename: sia_dc02_2300_530ms.pcm
      • 530ms tone period
      • -5dBm0 tone power

    4. SIA DC02 DTMF (1400Hz/2300Hz)
      • Filename: sia_dc02_dtmf.pcm
      • 100ms tone period
      • -5dBm0 tone power

    5. SIA DC05 (1400Hz/SIL/2300Hz)
      • Filename: sia_dc05.pcm
      • 100ms 1400Hz tone, 100ms silence, 100ms 2300Hz tone
      • -4dBm0 tone power (each)

  2. SIA RX Detection
    1. SIA DC02 Pulse (1400 Hz)
      • Filename: sia_dc02_1400_200ms.pcm
      • 200ms tone period
      • -5dBm0 tone power

    2. SIA DC02 Pulse (1400 Hz)
      • Filename: sia_dc02_2300_530ms.pcm
      • 530ms tone period
      • -4dBm0 tone power

    3. SIA DC02 Pulse (2300 Hz)
      • Filename: sia_dc02_2300_200ms.pcm
      • 200ms tone period
      • -5dBm0 tone power

    4. SIA DC02 Pulse (2300 Hz)
      • Filename: sia_dc02_2300_530ms.pcm
      • 530ms tone period
      • -5dBm0 tone power

    5. SIA DC02 DTMF (1400Hz/2300Hz)
      • Filename: sia_dc02_dtmf.pcm
      • 100ms tone period
      • -5dBm0 tone power

    6. SIA DC05 (1400Hz/SIL/2300Hz)
      • Filename: sia_dc05.pcm
      • 100ms 1400Hz tone, 100ms silence, 100ms 2300Hz tone
      • -4dBm0 tone power (each)

  3. V.18A TTY Detection
    1. V.18a TTY
      • Filename: tone_event_tty.pcm
      • 32 154ms V.18 periods
      • -10dBm0 tone power

  4. Cone Tone Detection
    1. Coin Tones (1537Hz/2200Hz)
      • Filename: cointones_1537_2200.pcm
      • 40ms tone periods
      • -8dBm0 tone power

    2. Coin Tones (1700Hz/2200Hz)
      • Filename: cointones_1700_2200.pcm
      • 40ms tone periods
      • -8dBm0 tone power

  5. TX Range Verification
    1. SS7 Signalling Tones (2600 Hz).
      • Minimum tone ON period: 100ms
      • Tone period increment: 10ms
      • Maximum tone ON period: 750ms
      • Tone OFF period: 250ms

    2. V.25 CED Tone (2100 Hz).
      • Minimum tone ON period: 100ms
      • Tone period increment: 10ms
      • Maximum tone ON period: 750ms
      • Tone OFF period: 250ms

  6. RX Range Verification
    1. BELL Tone (2225 Hz)
      • Phase reversal detection disabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 125ms
      • Tone period increment: 125ms
      • Final tone ON period: 1000ms
      • Trailing tone OFF period: 100ms

    2. BELL Tone (2250 Hz)
      • Phase reversal detection disabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 125ms
      • Tone period increment: 125ms
      • Final tone ON period: 1000ms
      • Trailing tone OFF period: 100ms

    3. V.25 CED Tone with PR (2100 Hz).
      • Phase reversal detection enabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 125ms
      • Tone period increment: 125ms
      • Final tone ON period: 1000ms
      • Trailing tone OFF period: 100ms

    4. SS7 COT (2000 Hz)
      • Phase reversal detection disabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 25ms
      • Tone period increment: 25ms
      • Final tone ON period: 250ms
      • Trailing tone OFF period: 100ms

  7. RX Range Verification (Pre-Conferencing)
    1. BELL Tone (2225 Hz)
      • Phase reversal detection disabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 125ms
      • Tone period increment: 125ms
      • Final tone ON period: 1000ms
      • Trailing tone OFF period: 100ms

    2. BELL Tone (2250 Hz)
      • Phase reversal detection disabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 125ms
      • Tone period increment: 125ms
      • Final tone ON period: 1000ms
      • Trailing tone OFF period: 100ms

    3. V.25 CED Tone with PR (2100 Hz).
      • Phase reversal detection enabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 125ms
      • Tone period increment: 125ms
      • Final tone ON period: 1000ms
      • Trailing tone OFF period: 100ms

    4. SS7 COT (2000 Hz)
      • Phase reversal detection disabled
      • Preliminary tone OFF period: 100ms
      • Minimum tone ON period: 25ms
      • Tone period increment: 25ms
      • Final tone ON period: 250ms
      • Trailing tone OFF period: 100ms

  8. TX File Tone Detection
    1. V.21(H) HDLC Flags
      • Filename: v21hdlc.pcm
      • V.21 HDLC Flags (0x7E)
      • -18dBm0 tone power

    2. Full FAX Negotiation
      • Filename: bro_to_lex_c2.pcm
      • Capture of FAX negatiation
      • Full negotiation, with fallbacks
      • Includes echo of negotiation

    3. V.25 CED Tone (2100 Hz)
      • Filename: modem.pcm
      • 4000 ms tone duration
      • No phase reversals
      • ~ -6 dBm0 tone power

    4. V.25 CED Tone with PR (2100 Hz) followed by USB1
      • Filename: modem_ansam.pcm
      • 5000 ms CED tone duration at -11dBm0
      • 100ms silence gap
      • 3000 ms USB1 duration at -11dBm0
      • long silence gap
      • 1000 ms TT (1004 Hz) duration at +3dBm0
      Note:
      Only V.25 detection is enabled for this test

  9. CT (1300Hz) Discrimination
    1. Discrimination 1 Period
      • Filename: tone_event_ct_lin.pcm
      • Single V.23 detection required for CT declaration

    2. Discrimination 2 Periods
      • Filename: tone_event_ct_lin.pcm
      • Two V.23 detections required for CT declaration

  10. RX File Tone Detection
    1. Full FAX Negotiation
      • Filename: bro_to_lex_c2.pcm
      • Capture of FAX negatiation
      • Full negotiation, with fallbacks
      • Includes echo of negotiation

    2. V.25 CED Tone (2100 Hz)
      • Filename: modem.pcm
      • 4000 ms tone duration
      • No phase reversals
      • ~ -6 dBm0 tone power

    3. V.25 CED Tone with PR (2100 Hz) followed by USB1
      • Filename: modem_ansam.pcm
      • 5000 ms CED tone duration at -11dBm0
      • 100ms silence gap
      • 3000 ms USB1 duration at -11dBm0
      • long silence gap
      • 1000 ms TT (1004 Hz) duration at +3dBm0
      Note:
      Only V.25 detection is enabled for this test

  11. MF Digit Sequence Detection
    1. Digits Embedded in Dialtone
      • Filename: digits_plus_dailtone.pcm
      • 50ms digit ON duration
      • 50ms digit OFF duration
      • -6 dBm0 digit power
      • -12 dBm0 dialtone power

    2. Digit Echo Scenario
      • Filename: dtmf_echo_10dbERL_20msDelay.pcm
      • 50ms digit ON duration
      • 50ms digit OFF duration
      • -6 dBm0 digit power
      • Digits contain echo of exact sequence
      • Echo path has 20ms delay and 10dB ERL

    3. Digit Dropout 10ms (1)
      • Filename: dtmf_hits_59.5_on_50_off.pcm
      • 59.5ms digit ON duration
      • 50ms digit OFF duration
      • -6 dBm0 digit power
      • 9.5ms digit dropout after first 10ms

    4. Digit Dropout 10ms (2)
      • Filename: dtmf_hit_after10ms.pcm
      • 60ms digit ON duration
      • 50ms digit OFF duration
      • -12 dBm0 digit power
      • 10ms digit dropout after first 10ms

    5. Digit Dropout 20ms
      • Filename: dtmf_hit_after20ms.pcm
      • 70ms digit ON duration
      • 50ms digit OFF duration
      • -12 dBm0 digit power
      • 10ms digit dropout after first 20ms

    6. Digit Dropout 30ms
      • Filename: dtmf_hit_after30ms.pcm
      • 80ms digit ON duration
      • 50ms digit OFF duration
      • -12 dBm0 digit power
      • 10ms digit dropout after first 30ms

    7. Digit Dropout 40ms
      • Filename: dtmf_hit_after40ms.pcm
      • 90ms digit ON duration
      • 50ms digit OFF duration
      • -12 dBm0 digit power
      • 10ms digit dropout after first 40ms

    8. 17dB SNR Test
      • Filename: dtmf_sn17db.pcm
      • 50ms digit ON duration
      • 55ms digit OFF duration
      • -7 dBm0 digit power
      • -24 dBm0 noise floor (white)

    9. 20dB SNR Test
      • Filename: dtmf_sn20db.pcm
      • 50ms digit ON duration
      • 55ms digit OFF duration
      • -7 dBm0 digit power
      • -27 dBm0 noise floor (white)

    10. 23dB SNR Test
      • Filename: dtmf_sn23db.pcm
      • 50ms digit ON duration
      • 55ms digit OFF duration
      • -7 dBm0 digit power
      • -30 dBm0 noise floor (white)

    11. 26dB SNR Test
      • Filename: dtmf_sn26db.pcm
      • 50ms digit ON duration
      • 55ms digit OFF duration
      • -7 dBm0 digit power
      • -33 dBm0 noise floor (white)


TDU Test: tstgmp.c File Reference

  • File List
  • Globals

tstgmp.c File Reference

#include <stdlib.h>
#include <string.h>
#include <ti\mas\types\types.h>

Include dependency graph for tstgmp.c:

Go to the source code of this file.

Defines

#define | TSTTDU_MAX_STORAGE (5 * 80)
#define | TSTTDU_MAX_GMCS 2

Functions

void | sysException (tuint id, char *s)
void * | gmpCreate (tuint input_MID, tuint mode, tuint recordSize)
void | gmpDelete (tuint input_MID, void *headIn)
void | gmpWrite (tuint input_MID, void *head, void *srcIn, tint records_to_copy)
tint | gmpRead (tuint input_MID, void *head, void *dstOut, tint records_to_copy)
void * | gmpAllocGmc (tuint MID)
tbool | gmpFreeGmc (tuint MID, void *ptr)

Variables

tuint | gmp_array [TSTTDU_MAX_STORAGE]
tuint | gmp_single_cell [TSTTDU_MAX_GMCS][80]
tint | gmp_single_cell_tracking = 0
tuint * | gmp_ptr = (tuint *) NULL
tuint | gmp_position = 0

Define Documentation

#define TSTTDU_MAX_STORAGE (5 * 80)

Definition at line 7 of file tstgmp.c.

Referenced by gmpWrite().

#define TSTTDU_MAX_GMCS 2

Definition at line 8 of file tstgmp.c.

Referenced by gmpAllocGmc(), and gmpFreeGmc().

Function Documentation

void sysException | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 859 of file tdusim.c.

References loop, and sysDebugInternal().

Referenced by gmpAllocGmc(), gmpFreeGmc(), gmpRead(), gmpWrite(), sys_new_tdu(), and sys_open_sgn().

Here is the call graph for this function:

void* gmpCreate | ( | tuint | input_MID,
 |  | tuint | mode,
 |  | tuint | recordSize
 | ) |  |

Definition at line 20 of file tstgmp.c.

References gmp_array, gmp_position, and gmp_ptr.

void gmpDelete | ( | tuint | input_MID,
 |  | void * | headIn
 | ) |  |

Definition at line 28 of file tstgmp.c.

References gmp_position, and gmp_ptr.

void gmpWrite | ( | tuint | input_MID,
 |  | void * | head,
 |  | void * | srcIn,
 |  | tint | records_to_copy
 | ) |  |

Definition at line 36 of file tstgmp.c.

References gmp_position, gmp_ptr, sysException(), and TSTTDU_MAX_STORAGE.

Here is the call graph for this function:

tint gmpRead | ( | tuint | input_MID,
 |  | void * | head,
 |  | void * | dstOut,
 |  | tint | records_to_copy
 | ) |  |

Definition at line 50 of file tstgmp.c.

References gmp_ptr, and sysException().

Here is the call graph for this function:

void* gmpAllocGmc ( tuint MID )

Definition at line 64 of file tstgmp.c.

References gmp_single_cell, gmp_single_cell_tracking, sysException(), and TSTTDU_MAX_GMCS.

Here is the call graph for this function:

tbool gmpFreeGmc | ( | tuint | MID,
 |  | void * | ptr
 | ) |  |

Definition at line 78 of file tstgmp.c.

References gmp_single_cell, gmp_single_cell_tracking, sysException(), and TSTTDU_MAX_GMCS.

Here is the call graph for this function:

Variable Documentation

tuint gmp_array[TSTTDU_MAX_STORAGE]

Definition at line 12 of file tstgmp.c.

Referenced by gmpCreate().

tuint gmp_single_cell[TSTTDU_MAX_GMCS][80]

Definition at line 13 of file tstgmp.c.

Referenced by gmpAllocGmc(), and gmpFreeGmc().

tint gmp_single_cell_tracking = 0

Definition at line 14 of file tstgmp.c.

Referenced by gmpAllocGmc(), and gmpFreeGmc().

tuint* gmp_ptr = (tuint *) NULL

Definition at line 16 of file tstgmp.c.

Referenced by gmpCreate(), gmpDelete(), gmpRead(), and gmpWrite().

tuint gmp_position = 0

Definition at line 17 of file tstgmp.c.

Referenced by gmpCreate(), gmpDelete(), and gmpWrite().


TDU Test: tstgmp.c Source File

  • File List
  • Globals

tstgmp.c

Go to the documentation of this file.
00001 #include <stdlib.h>
00002 #include <string.h>
00003
00004 #include <ti\mas\types\types.h>
00005
00006
00007 #define TSTTDU_MAX_STORAGE  (5 * 80)
00008 #define TSTTDU_MAX_GMCS 2
00009
00010 extern void     sysException (tuint id, char *s);
00011
00012 tuint           gmp_array[TSTTDU_MAX_STORAGE];  /* room for 5 GMCs */
00013 tuint           gmp_single_cell[TSTTDU_MAX_GMCS][80];
00014 tint            gmp_single_cell_tracking = 0;
00015
00016 tuint          *gmp_ptr = (tuint *) NULL;
00017 tuint           gmp_position = 0;
00018
00019 /* Creation of FILE-like structure, mode is ignored at the moment */
00020 void           *gmpCreate (tuint input_MID, tuint mode, tuint recordSize)
00021 {
00022   gmp_position = 0;
00023   gmp_ptr = gmp_array;
00024   return (gmp_ptr);
00025 }
00026
00027 /* FILE-like structure is deleted */
00028 void gmpDelete (tuint input_MID, void *headIn)
00029 {
00030   gmp_ptr = (void *) NULL;
00031   gmp_position = 0;
00032 }
00033
00034 /* Write data into GMP based FILE-like structure. Append mode is assumed.
00035    No limitation on amount of data to be written */
00036 void gmpWrite (tuint input_MID, void *head, void *srcIn,
00037                tint records_to_copy)
00038 {
00039   if (head == NULL)
00040     sysException (input_MID, "Null pointer for write");
00041
00042   memcpy (&gmp_ptr[gmp_position], srcIn, records_to_copy);
00043   gmp_position += records_to_copy;
00044   if (gmp_position >= TSTTDU_MAX_STORAGE)
00045     sysException (input_MID, "Max storage exceeded");
00046 }
00047
00048 /* Copy data from GMP into linear buffer. Internal read position marker is
00049    updated */
00050 tint gmpRead (tuint input_MID, void *head, void *dstOut,
00051               tint records_to_copy)
00052 {
00053   if (head == NULL)
00054   {
00055     sysException (input_MID, "Null pointer for read");
00056     return 1;
00057   }
00058   memcpy (dstOut, gmp_ptr, records_to_copy);
00059
00060   return 0;
00061 }
00062
00063 /* Allocate single GMC */
00064 void           *gmpAllocGmc (tuint MID)
00065 {
00066   tint            i;
00067
00068   for (i = 0; i < TSTTDU_MAX_GMCS; i++) {
00069     if (gmp_single_cell_tracking & (0x001 << i) == 0) {
00070       return (void *) &gmp_single_cell[i][0];
00071     }
00072   }
00073   sysException (MID, "No room for cell");
00074   return NULL;
00075 }
00076
00077 /* Single GMC is de-allocated */
00078 tbool gmpFreeGmc (tuint MID, void *ptr)
00079 {
00080   tint            i;
00081
00082   for (i = 0; i < TSTTDU_MAX_GMCS; i++) {
00083     if ((void *) &gmp_single_cell[i][0] == ptr) {
00084       gmp_single_cell_tracking &= ~(0x001 << i);
00085       return TRUE;
00086     }
00087   }
00088   sysException (MID, "Invalid free ptr");
00089   return FALSE;
00090 }
00091
00092 /* nothing past this point */


TDU Test: tstgmp.h File Reference

  • File List
  • Globals

tstgmp.h File Reference

Detailed Description

Contains definitions and external APIs for GMP test functions.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file tstgmp.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * | gmpCreate (tuint input_ID, tuint mode)
void | gmpDelete (tuint input_ID, void *gmp_ptr)
void | gmpWrite (tuint input_ID, void *gmp_ptr, void *src_in, tint records_to_copy)
tint | gmpRead (tuint input_ID, void *gmp_ptr, void *dst_out, tint records_to_copy)
void * | gmpAllocGmc (tuint MID)
tbool | gmpFreeGmc (tuint MID, void *ptr)

Function Documentation

void* gmpCreate | ( | tuint | input_ID,
 |  | tuint | mode
 | ) |  |

void gmpDelete | ( | tuint | input_ID,
 |  | void * | gmp_ptr
 | ) |  |

Definition at line 28 of file tstgmp.c.

References gmp_position, and gmp_ptr.

void gmpWrite | ( | tuint | input_ID,
 |  | void * | gmp_ptr,
 |  | void * | src_in,
 |  | tint | records_to_copy
 | ) |  |

Definition at line 36 of file tstgmp.c.

References gmp_position, gmp_ptr, sysException(), and TSTTDU_MAX_STORAGE.

Here is the call graph for this function:

tint gmpRead | ( | tuint | input_ID,
 |  | void * | gmp_ptr,
 |  | void * | dst_out,
 |  | tint | records_to_copy
 | ) |  |

Definition at line 50 of file tstgmp.c.

References gmp_ptr, and sysException().

Here is the call graph for this function:

void* gmpAllocGmc ( tuint MID )

Definition at line 64 of file tstgmp.c.

References gmp_single_cell, gmp_single_cell_tracking, sysException(), and TSTTDU_MAX_GMCS.

Here is the call graph for this function:

tbool gmpFreeGmc | ( | tuint | MID,
 |  | void * | ptr
 | ) |  |

Definition at line 78 of file tstgmp.c.

References gmp_single_cell, gmp_single_cell_tracking, sysException(), and TSTTDU_MAX_GMCS.

Here is the call graph for this function:


TDU Test: tstgmp.h Source File

  • File List
  • Globals

tstgmp.h

Go to the documentation of this file.
00001 #ifndef _TSTGMP_H
00002 #define _TSTGMP_H
00003
00011   void  *gmpCreate   (tuint input_ID, tuint mode);
00012   void   gmpDelete   (tuint input_ID, void *gmp_ptr);
00013   void   gmpWrite    (tuint input_ID, void *gmp_ptr, void *src_in,  tint records_to_copy);
00014   tint   gmpRead     (tuint input_ID, void *gmp_ptr, void *dst_out, tint records_to_copy);
00015   void  *gmpAllocGmc (tuint MID);
00016   tbool  gmpFreeGmc  (tuint MID, void *ptr);
00017
00018 #endif /* _TSTGMP_H */
00019
00020   /* nothing past this point */


TDU Test: TX Range Verification

TDU Test Reference

TX Range Verification

Test Purpose

TX range verification testing qualifies the TDU's ability to identify TX tone events (both ON and OFF) over a range of both tone powers and tone periods. This test calls the TDU API function tduSendIn() for detection.

Test Parameters

The test allows for variation of the following parameters:

  • TDU detector enable code
  • Minimum tone ON period (# frames)
  • Maximum tone ON period (# frames)
  • Tone period increment (# frames)
  • Tone OFF period (# frames)
  • Single tone frequency (Hz)

The test uses the following constant parameters:

  • Maximum tone power (+2 dB)
  • Minimum tone power (-46 dB)
  • Tone power increment (-2 dB)

Test Procedure

As the above indicates, the test has an outer loop and an inner loop. The outer loop is the tone power, and the inner loop is the tone ON time. For each tone power level, the test performs the following:

  1. Enables the specified TDU tone detector.
  2. Generates the specified tone using software tone generation (SGN component of the SDK package). This will, under the proper circumstances, generate a TONE ON event once detected.
  3. Continues tone generation and TDU detection for the specified tone ON period.
  4. Discontinues tone generation. This will, under the proper circumstances, generate a TONE OFF event once detected.
  5. Continues TDU detection for the specified OFF period.
  6. Increments the tone ON time by the specified increment and loops to (1).
  7. Continues looping until the maximum tone ON period is met.

Expected Results

Minimal Output

Each inner loop iteration will generate a output text indicating the parameters of the specific test.

Detection Output

When a tone detection event occurs, additional information is output to provide details regarding the detection.

Note:
Note that not all tones powers and ON periods are expected to generate detection. Each specific tone has a range of powers and periods over which detection is expected to occur as well as ranges over which detection is expected to not occur.


VAU: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_vau_Version__top__
#define | __extern extern
#define | ti_mas_vau_Version___VERS 150
#define | ti_mas_vau_Version_MAJOR (1)
#define | ti_mas_vau_Version_MINOR (2)
#define | ti_mas_vau_Version_XVERTICAL (0)
#define | ti_mas_vau_Version_PATCH (2)
#define | ti_mas_vau_Version_BUILD (0)
#define | ti_mas_vau_Version_QUALITY (3)
#define | ti_mas_vau_Version_BTYPE (0)
#define | ti_mas_vau_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_vau_Version_MAJOR
#define | Version_MINOR ti_mas_vau_Version_MINOR
#define | Version_XVERTICAL ti_mas_vau_Version_XVERTICAL
#define | Version_PATCH ti_mas_vau_Version_PATCH
#define | Version_BUILD ti_mas_vau_Version_BUILD
#define | Version_QUALITY ti_mas_vau_Version_QUALITY
#define | Version_BTYPE ti_mas_vau_Version_BTYPE
#define | Version_WIDTH ti_mas_vau_Version_WIDTH

Define Documentation

#define ti_mas_vau_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_vau_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_vau_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_vau_Version_MINOR (2)

Definition at line 53 of file Version.h.

#define ti_mas_vau_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_vau_Version_PATCH (2)

Definition at line 59 of file Version.h.

#define ti_mas_vau_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_vau_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_vau_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_vau_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_vau_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_vau_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_vau_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_vau_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_vau_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_vau_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_vau_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_vau_Version_WIDTH

Definition at line 97 of file Version.h.


VAU: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_vau_Version__include
00023 #define ti_mas_vau_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_vau_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_vau_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_vau_Version_MAJOR (1)
00051
00052 /* MINOR */
00053 #define ti_mas_vau_Version_MINOR (2)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_vau_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_vau_Version_PATCH (2)
00060
00061 /* BUILD */
00062 #define ti_mas_vau_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_vau_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_vau_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_vau_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_vau_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_vau_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_vau_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_vau_Version_MAJOR
00091 #define Version_MINOR      ti_mas_vau_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_vau_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_vau_Version_PATCH
00094 #define Version_BUILD      ti_mas_vau_Version_BUILD
00095 #define Version_QUALITY    ti_mas_vau_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_vau_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_vau_Version_WIDTH
00098 #endif


VAU: Data Structures

  • Data Structures
  • Data Fields

VAU Data Structures

Here are the data structures with brief descriptions:
vauOpenConfig_t | Open time configuration parameters
vauSizeConfig_t | Size query time configuration parameters
vauStats_s | Statistics reported by VAU
vauXdaisFxns_t | VAU's XDAIS call table definition
vauXdaisInitParams_t | Configuration parameters overloading for algInit API


VAU: Detailed VAU Description

VAU (Voice Activity Detection Unit) Package

Detailed VAU Description

Description

The Voice Activity Detection Unit (VAU) functions to determine the presence of speech in a voice channel. Voice Activity Detection (VAD) exploits silence or non-speech portions of a conversation to reduce the channel bandwidth requirements. The VAD algorithm outputs a binary decision, i.e., speech presence or absence. For the purpose of discontinuous transmission, background noise characteristics are estimated when the speech is not present (see NMU Package). To prevent speech clipping, the VAU inserts a 5 ms algorithmic delay and a hangover period.

There are two VAD algorithms:

  1. Fixed VAD algorithm: This algorithm determines speech presence based on a preconfigured fixed-energy threshold.
  2. Adaptive VAD algorithm: This algorithm automatically adapts the detection threshold based on the signal properties. The configurable adaptive aggressiveness may be used to realize a trade off between bandwidth savings and speech quality.

Fixed VAU

The fixed VAU compares the short-term energy of the input signal with a fixed threshold. If the short-term energy is above the threshold, the VAU declares speech presence; otherwise, it declares speech absence. The default fixed VAU threshold level is -40 dBm0. To avoid speech clipping, there is a 5 msec. algorithm delay and hangover period. The default hangover period is 180 msec.

Adaptive VAU

The purpose of the adaptive VAU algorithm is to adapt its threshold to noise level automatically. Its threshold values are based on the noise level, speech level, signal-to-noise ratio, and the statistics of their variations in the history. To avoid speech clipping, there is a 5 ms algorithm delay and hangover period. The default hangover period is 180 msec


VAU:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VAU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VAU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


VAU: VAU External API

VAU (Voice Activity Detection Unit) Package

VAU External API

Page Contents

  1. VAU ECO API
  2. VAU ECO Creation Functions
  3. VAU ECO Configuration Functions
  4. VAU ECO Execution Functions
  5. VAU ECO Destruction Functions
  6. VAU ECO Return Codes
  7. VAU XDais API

VAU ECO API

The VAU Embedded Communication Object (ECO) API consists of the following nine routines for VAU instance creation, configuration, destruction and execution.

  1. vauGetSizes()
  2. vauNew()
  3. vauOpen()
  4. vauControl()
  5. vauGetStats()
  6. vauGetConfig()
  7. vauProcess()
  8. vauClose()
  9. vauDelete()

VAU ECO Creation Functions

VAU instance creation is a four step process. First, determine the VAU memory requirements via vauGetSizes below. Second, allocate the VAU memory buffers using any system-prescribed method. Create the VAU instance by passing the allocated buffer information to vauNew. Finally, open the VAU instance for use via the vauOpen API function. This process must be followed in the order given for proper operation. Once an VAU instance is opened, it may be used for voice activity detection.

  1. vauGetSizes()
  2. vauNew()
  3. vauOpen()

VAU ECO Configuration Functions

The VAU component has three external API configuration routines; one to configure the instance - vauControl(), one to to gather operational statistics - vauGetStats and one to query the current active configuration - vauGetConfig. These external API functions require an active VAU instance that has been opened according to the procedure in VAU ECO Creation Functions above.

  1. vauControl()
  2. vauGetStats()
  3. vauGetConfig()

VAU ECO Execution Functions

The VAU execution API consists of a single routine, vauProcess. This API function operates on linear samples in the from-TDM-to-Network direction to make voice activity decisions. This routine must execute for every frame in this direction.

The execution API functions require an active VAU instance that has been opened according to the procedure in VAU ECO Creation Functions above.

  1. vauProcess()

VAU ECO Destruction Functions

VAU instance desctruction is a two step process. First, the VAU must be closed using the vauClose API function. Once the VAU is closed it may be removed via the vauDelete function.

  1. vauClose()
  2. vauDelete()

Note:
  1. Once an instance has been closed, it may be re-opened via the vauOpen() routine. The instance memory should not be reallocated until the instance is deleted.

VAU ECO Return Codes

The VAU module provides various kinds of output to indicate errors in configuration and/or execution.

  • VAU Error codes

VAU XDais API

The VAU eXpressDsp Algorithm Interoperability Standard (XDAIS) API is available via vauXdaisCallTable. This call table provides the control and process API functions.


VAU: File Index

  • File List
  • Globals

VAU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
vau.h [code] Contains definitions and external APIs for the Voice Activity Detection Unit


VAU: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • cfgOpen : vauXdaisInitParams_t
  • config : vauOpenConfig_t
  • control : vauXdaisFxns_t
  • curr_state : vauStats_s
  • curr_threshold : vauStats_s
  • frame_size : vauOpenConfig_t
  • ialg : vauXdaisFxns_t
  • max_frame_size : vauSizeConfig_t
  • max_sampling_rate_8k_multiple : vauSizeConfig_t
  • param : vauXdaisInitParams_t
  • process : vauXdaisFxns_t
  • sampling_rate_8k_multiple : vauOpenConfig_t


VAU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • cfgOpen : vauXdaisInitParams_t
  • config : vauOpenConfig_t
  • control : vauXdaisFxns_t
  • curr_state : vauStats_s
  • curr_threshold : vauStats_s
  • frame_size : vauOpenConfig_t
  • ialg : vauXdaisFxns_t
  • max_frame_size : vauSizeConfig_t
  • max_sampling_rate_8k_multiple : vauSizeConfig_t
  • param : vauXdaisInitParams_t
  • process : vauXdaisFxns_t
  • sampling_rate_8k_multiple : vauOpenConfig_t


VAU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines
  • _
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h

- t -

  • ti_mas_vau_Version___VERS : Version.h
  • ti_mas_vau_Version__top__ : Version.h
  • ti_mas_vau_Version_BTYPE : Version.h
  • ti_mas_vau_Version_BUILD : Version.h
  • ti_mas_vau_Version_MAJOR : Version.h
  • ti_mas_vau_Version_MINOR : Version.h
  • ti_mas_vau_Version_PATCH : Version.h
  • ti_mas_vau_Version_QUALITY : Version.h
  • ti_mas_vau_Version_WIDTH : Version.h
  • ti_mas_vau_Version_XVERTICAL : Version.h

- v -

  • vau_ERROR : vau.h
  • vau_MAX_SAMP_RATE : vau.h
  • vau_NOERR : vau.h
  • vau_NOMEMORY : vau.h
  • vau_SAMP_RATE_16KHZ : vau.h
  • vau_SAMP_RATE_8KHZ : vau.h
  • vau_STAT_STATE_NOISE : vau.h
  • vau_STAT_STATE_NONE : vau.h
  • vau_STAT_STATE_VOICE : vau.h
  • vauClose() : vau.h
  • vauControl() : vau.h
  • vauDelete() : vau.h
  • vauGetConfig() : vau.h
  • vauGetSizes() : vau.h
  • vauGetStats() : vau.h
  • vauNew() : vau.h
  • vauOpen() : vau.h
  • vauProcess() : vau.h
  • vauStats_t : vau.h
  • vauXdaisCallTable : vau.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


VAU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • __extern : Version.h
  • ti_mas_vau_Version___VERS : Version.h
  • ti_mas_vau_Version__top__ : Version.h
  • ti_mas_vau_Version_BTYPE : Version.h
  • ti_mas_vau_Version_BUILD : Version.h
  • ti_mas_vau_Version_MAJOR : Version.h
  • ti_mas_vau_Version_MINOR : Version.h
  • ti_mas_vau_Version_PATCH : Version.h
  • ti_mas_vau_Version_QUALITY : Version.h
  • ti_mas_vau_Version_WIDTH : Version.h
  • ti_mas_vau_Version_XVERTICAL : Version.h
  • vau_ERROR : vau.h
  • vau_MAX_SAMP_RATE : vau.h
  • vau_NOERR : vau.h
  • vau_NOMEMORY : vau.h
  • vau_SAMP_RATE_16KHZ : vau.h
  • vau_SAMP_RATE_8KHZ : vau.h
  • vau_STAT_STATE_NOISE : vau.h
  • vau_STAT_STATE_NONE : vau.h
  • vau_STAT_STATE_VOICE : vau.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


VAU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • vauClose() : vau.h
  • vauControl() : vau.h
  • vauDelete() : vau.h
  • vauGetConfig() : vau.h
  • vauGetSizes() : vau.h
  • vauGetStats() : vau.h
  • vauNew() : vau.h
  • vauOpen() : vau.h
  • vauProcess() : vau.h


VAU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • vauStats_t : vau.h


VAU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • vauXdaisCallTable : vau.h


VAU: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


VAU: Return Error Codes

Return Error Codes
[VAU]

Collaboration diagram for Return Error Codes:

Defines

#define | vau_ERROR 1
#define | vau_NOERR 0
#define | vau_NOMEMORY (-1)

Define Documentation

#define vau_ERROR 1

VAU return code -- Invalid configuration

Definition at line 34 of file vau.h.

#define vau_NOERR 0

VAU return code -- Initiaization of VAU was successful

Definition at line 39 of file vau.h.

#define vau_NOMEMORY (-1)

VAU return code -- Insufficient memory allocated

Definition at line 44 of file vau.h.


VAU: Sampling Rate selection defines

Sampling Rate selection defines
[VAU]

Collaboration diagram for Sampling Rate selection defines:

Detailed Description

Sampling rate selection defines applicable to max_sampling_rate_8k_multiple field in vauSizeConfig_t and sampling_rate_8k_multiple field in vauOpenConfig_t.

Defines

#define | vau_SAMP_RATE_8KHZ 1
#define | vau_SAMP_RATE_16KHZ 2
#define | vau_MAX_SAMP_RATE 2

Define Documentation

#define vau_SAMP_RATE_8KHZ 1

VAU Sampling Rate selection -- 8 KHz sampling rate

Definition at line 58 of file vau.h.

#define vau_SAMP_RATE_16KHZ 2

VAU Sampling Rate selection -- 16 KHz sampling rate

Definition at line 60 of file vau.h.

#define vau_MAX_SAMP_RATE 2

VAU Sampling Rate selection -- set to max sampling rate supported

Definition at line 62 of file vau.h.


VAU: VAU

VAU

Collaboration diagram for VAU:

Detailed Description

Modules

Return Error Codes
Sampling Rate selection defines
Sampling rate selection defines applicable to max_sampling_rate_8k_multiple field in vauSizeConfig_t and sampling_rate_8k_multiple field in vauOpenConfig_t.

Data Structures

struct | vauSizeConfig_t
Size query time configuration parameters. More...
struct | vauStats_s
Statistics reported by VAU. More...
struct | vauOpenConfig_t
Open time configuration parameters. More...
struct | vauXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | vauXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | vauXdaisFxns_t
VAU's XDAIS call table definition. More...

XDAIS APIs

vauXdaisFxns_t vauXdaisCallTable
reference of VAU XDAIS call table

ECO (Telogy Embedded Communication Object) APIs

Remarks:
new, delete, getSizes, Open and Close are standard ECO APIs so are not described here in detail. Return codes may be one of vau_ERROR, vau_NOERR or vau_NOMEMORY

tint | vauGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, vauSizeConfig_t *cfg)
tint | vauNew (void **vauInst, tint nbufs, ecomemBuffer_t *bufs)
tint | vauOpen (void *vauInst, vauOpenConfig_t *cfg)
void | vauClose (void *vauInst)
void | vauDelete (void **vauInst)
tint | vauControl (void *vauInst, ifvauConfig_t *cfg, ifvauControl_t *ctrl)
Control API.
tbool | vauProcess (void *vauInst, linSample *inSamples, linSample **outSamples, ISPHENC1_FrameType *vauFrameType)
VAU Processing API, takes samples and generates voice/no-voice(noise) decision.
tuint | vauGetConfig (void *vauInst)
Get Configuration API.
void | vauGetStats (void *vauInst, tbool reset, vauStats_t *stats)
Get Statistics API.

Typedefs

typedef vauStats_s | vauStats_t
Statistics reported by VAU.

Typedef Documentation

typedef struct vauStats_s vauStats_t

Statistics reported by VAU.

Remarks:
vauGetStats API is presently available for ECO API only, not for XDAIS

Function Documentation

tint vauGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | vauSizeConfig_t * | cfg
 | ) |  |

tint vauNew | ( | void ** | vauInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

tint vauOpen | ( | void * | vauInst,
 |  | vauOpenConfig_t * | cfg
 | ) |  |

void vauClose ( void * vauInst )

void vauDelete ( void ** vauInst )

tint vauControl | ( | void * | vauInst,
 |  | ifvauConfig_t * | cfg,
 |  | ifvauControl_t * | ctrl
 | ) |  |

Control API.

Parameters:
[in] | vauInst | Algorithm instance handle.
[in] | cfg | Pointer to vau configuration structure defined in ifvau external interface.
[in] | ctrl | Pointer to vau control structure defined in ifvau external interface.
Return values:
ret One of vau_ERROR or vau_NOERR codes.
Remarks:
vauControl() Allows run-time configuration of parameters specified in the ifvau external interface.

tbool vauProcess | ( | void * | vauInst,
 |  | linSample * | inSamples,
 |  | linSample ** | outSamples,
 |  | ISPHENC1_FrameType * | vauFrameType
 | ) |  |

VAU Processing API, takes samples and generates voice/no-voice(noise) decision.

Parameters:
[in] | vauInst | Handle to an algorithm instance.
[in] | inSamples | Pointer to input linear 16-bit samples buffer, amount of samples read is equal to the configured frame size of VAU at Open/Init time.
[in,out] | outSamples | Address of pointer to output buffer, caller cannot set this to the address of an un-allocated pointer, appropriate size of buffer needs to be allocated to the configured frame size at Open/Init time. The reason for passing a pointer to the buffer pointer is to allow VAU to change this pointer to some buffer it has been allocated to help prevent inefficient copying. Since VAU delays the signal, it can choose to change the pointer to the one of the buffers allocated to it, for example, when enabled. This buffer can be scratch memory so caller is supposed to create a copy if downstream any modules that are passed the VAU output directly or indirectly and if those modules use scratch that is shared with VAU's allocated scratch.
[in,out] | vauFrameType | Frame type defined in XDM 1.0 (see <ti/xdais/dm/isphenc1.h>). Input frame type is always expected to be (but not checked) ISPHENC1_FTYPE_SPEECH. Output is either ISPHENC1_FTYPE_SPEECH or ISPHENC1_FTYPE_NODATA (indicating no-voice or noise)
Return values:
Returns TRUE to provide early warning to start noise estimation downstream of VAU This helps to resync at the time of voice to noise transition with background noise that may change during long periods of voice activity. Returns FALSE otherwise, when it is recommended that downstream noise estimation be reset.

tuint vauGetConfig ( void * vauInst )

Get Configuration API.

Parameters:
[in] vauInst Handle to an algorithm instance.
Return values:
Returns the stored "control" field of external interface ifvau's ifvauControl_t structure, which is basically one of the 3 possible values - ifvau_DISABLE, ifvau_ENABLE and ifvau_PASS. This can be useful to caller if caller does not want to store configuration, because it is naturally stored by the VAU for run-time behavior as per configuration.

void vauGetStats | ( | void * | vauInst,
 |  | tbool | reset,
 |  | vauStats_t * | stats
 | ) |  |

Get Statistics API.

Parameters:
[in] | vauInst | Handle to an algorithm instance.
[in] | reset | If 1, reset the statistics
[in] | *stats | Pointer to VAU statistics that are reported, if reset parameter is set, statistics will reset after the statistics are returned here.

Variable Documentation

vauXdaisFxns_t vauXdaisCallTable

reference of VAU XDAIS call table


VAU: VAU (Voice Activity Detection Unit) Package

VAU (Voice Activity Detection Unit) Package

Release 1.2.2.0

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The Voice Activity Detection Unit (VAU) functions to determine the presence of speech in a voice channel. Voice Activity Detection (VAD) exploits silence or non-speech portions of a conversation to reduce the channel bandwidth requirements.

Additional links: Detailed VAU Description

Integration

The VAU component can be integrated into a system to perform voice activity detection as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the VAU code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | VAU External API
 | VAU Integration

Default Configuration

The following VAU parameters are configurable at instance creation (vauOpen):

  • Frame size (required)
  • Sampling rate (required)
  • Mode (default - ifvau_TYPE_ADAPTIVE)
  • Threshold offset (default - 0 dB)
  • Voice hangover (default - 180ms)

The following VAU parameters are run-time configurable:

  • Mode (adaptive/fixed/last)
  • Threshold offset
  • Voice hangover
  • Reset to voice state
  • Enable\/disable\/pass-through

See vauControl() for more information.

Performance

Performance measures for the VAU component are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

N/A.

Standards Compliance

N/A

Dependent Packages

The VAU package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

VAU Required Packages
Package | File Name | Compatibility Key
ti.mas.vau | ti_mas_vau_<fmt>_c<rtarg>_1_2_1_0.zip | [4,4,0,0]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]
ti.mas.iface.ifvau | ti_mas_iface_ifvau_<fmt>_c<rtarg>_1_1_0_0.zip | [4,4,0,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


VAU: VAU Integration

VAU (Voice Activity Detection Unit) Package

VAU Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking VAU with System
  • Initialization Structures

XDC Build Process

Required Tools

The following tools are required to build the VAU component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.00.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the VAU package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in VAU Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the VAU using the XDC tools, change to the VAU directory and proceed.

With the environment configured, XDC may be eployed to build the VAU and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the VAU packages. The first two commands provide a means to clean and build the VAU package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the VAU and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., VAU).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated VAU build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the VAU for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the VAU as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated VAU build files as in (1) above
    • Removes all generated build files for all VAU dependent packages

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking VAU with System

The VAU and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /vau
               /types
               /util
               /iface/ifvau

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the VAU API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/vau/vau.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., vau.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\vau\c<rtarg>\vau_c.a<rtarg>

Initialization Structures

N/A.


VAU: Memory Requirements

VAU (Voice Activity Detection Unit) Package

Memory Requirements

Page Contents

  1. Assumptions
  2. C55x Target
    • C55x VAU Data Memory Requirements
    • C55x VAU Program Memory Requirements
  3. C64x/C64x+ Target
    • C64x/C64x+ VAU Data Memory Requirements
    • C64x VAU Program Memory Requirements
    • C64x+ VAU Program Memory Requirements

Assumptions

The data memory numbers provided here were gathered for the VAU configured with the default unit test configuration. To view the defaults, load the desired image and observe the "config" structure.

C55x Target

C55x VAU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  | Scratch/Dedicated
 |  | XDAIS | ECO
0 | 4 | 184 | 140 | Dedicated
1 | 2 | 320 | 160 | Scratch
2 | 2 | 160 | 80 | Dedicated

Notes:
  1. There is no size configuration for XDAIS, so data above is for worst case (16 KHz)
  2. Size configuration for ECO is for default of 8 KHz

Additional Data Memory
Category/Structure | Requirement (Bytes)
 | XDAIS | ECO
Tables | 12 | 0
data/bss | 60 | 36

C55x VAU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 3.94 | 3.63 | Core VAU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x/C64x+ Target

C64x/C64x+ VAU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  | Scratch/Dedicated
 |  | XDAIS | ECO
0 | 8 | 184 | 140 | Dedicated
1 | 2 | 320 | 160 | Scratch
2 | 2 | 160 | 80 | Dedicated

Notes:
  1. There is no size configuration for XDAIS, so data above is for worst case (16 KHz)
  2. Size configuration for ECO is for default of 8 KHz

Additional Data Memory
Category/Structure | Requirement (Bytes)
 | XDAIS | ECO
Tables | 12 | 0
data/bss | 64 | 36

C64x VAU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 7.13 | 6.53 | Core VAU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x+ VAU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 6.22 | 5.81 | Core VAU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.


VAU: MIPS Requirements

VAU (Voice Activity Detection Unit) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x/C64x+ Targets

Assumptions

The MIPS numbers are per execution of the unit test images using the memory mapping indicated in each respective .map files. The following assumptions also apply:

  1. All tests are performed with 5ms frames.
  2. XDAIS interface used (ECO numbers expected to be slightly lower)
  3. Speech input from in.raw file

Notes:
  1. In the MIPS tables we use the terminology Mega-Cycles Per Second (MCPS) since several instructions can occur in parallel per cycle.

C55x Target

Profiling was performed using a 5510 EVM with volatile buffers (scratch) in DARAM block, tables/bss in SARAM block, and channelized buffers in separate SARAM block. Program is in external memory with I-cache flushed every processing frame. See .map file for more details. Cycles information for every frame can be found in file test\logs\cycles.txt generated by running the image.

Further details regarding the external SDRAM :

  1. 32-bits wide
  2. Clocked at 1/2 speed (100 MHz) of CPU (200 MHz)

VAU MIPS - C55x
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_C5510 | 0.48 | 0.28

C64x/C64x+ Targets

Profiling was performed on cycle accurate simulators of DM6446 (64x+) and C6455 (64x+) as well as C6416 EVM. For placement, refer to individual .map files. Cycles information for every frame can be found in file test\logs\cycles.txt generated by running each image.

VAU MIPS - C64x/C64x+
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_DM6446 | 0.98 | 0.71
test_rel_C6455 | 0.31 | 0.25
test_rel_C6416le | 0.34 | 0.28


VAU: Module Index

VAU Modules

Here is a list of all modules:
  • VAU
    • Return Error Codes
    • Sampling Rate selection defines


VAU: Page Index

VAU Related Pages

Here is a list of all related documentation pages:
  • Standard Compliance
  • Disclaimer


VAU: Standard Compliance

Standard Compliance

N/A


VAU: vauOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

vauOpenConfig_t Struct Reference
[VAU]

#include <vau.h>

Detailed Description

Open time configuration parameters.

Remarks:
Used for eco API vauOpen and included as structure of for XDAIS API algInit alg specific parameters

Definition at line 112 of file vau.h.

Data Fields

tint | frame_size
tint | sampling_rate_8k_multiple
ifvauConfig_t | config

Field Documentation

tint vauOpenConfig_t::frame_size

Voice frame size in samples

Definition at line 113 of file vau.h.

tint vauOpenConfig_t::sampling_rate_8k_multiple

Sampling rate in multiples of 8 KHz, currently only supporting 1 (= 8 KHz) and 2 (= 16 KHz)

Definition at line 114 of file vau.h.

ifvauConfig_t vauOpenConfig_t::config

Configuration as per ifvau external interface

Definition at line 118 of file vau.h.

The documentation for this struct was generated from the following file:
  • vau.h


VAU: vauSizeConfig_t Struct Reference

  • Data Structures
  • Data Fields

vauSizeConfig_t Struct Reference
[VAU]

#include <vau.h>

Detailed Description

Size query time configuration parameters.

Remarks:
For eco, this is used by the vauGetSizes API and for XDAIS, it is not used, XDAIS implementation does not support this configuration.

Definition at line 71 of file vau.h.

Data Fields

tint | max_frame_size
tint | max_sampling_rate_8k_multiple

Field Documentation

tint vauSizeConfig_t::max_frame_size

Maximum number of samples per frame e.g for 10 ms frame at 16 KHz sampling rate, it is 160 and for 8 KHz, it is 80. Run-time sampling rate selected during open/init may be less than this.

Definition at line 72 of file vau.h.

tint vauSizeConfig_t::max_sampling_rate_8k_multiple

Max sampling rate in multiples of 8 KHz, currently only supporting 1 (= 8 KHz) and 2 (= 16 KHz). Actual sampling rate selected during open/init time may be less than this.

Definition at line 79 of file vau.h.

The documentation for this struct was generated from the following file:
  • vau.h


VAU: vauStats_s Struct Reference

  • Data Structures
  • Data Fields

vauStats_s Struct Reference
[VAU]

#include <vau.h>

Detailed Description

Statistics reported by VAU.

Remarks:
vauGetStats API is presently available for ECO API only, not for XDAIS

Definition at line 91 of file vau.h.

Data Fields

tuint | curr_state
tint | curr_threshold

Field Documentation

tuint vauStats_s::curr_state

Current vau state

Definition at line 102 of file vau.h.

tint vauStats_s::curr_threshold

Current vau threshold in dBm0

Definition at line 103 of file vau.h.

The documentation for this struct was generated from the following file:
  • vau.h


VAU: vauXdaisFxns_t Struct Reference

  • Data Structures
  • Data Fields

vauXdaisFxns_t Struct Reference
[VAU]

#include <vau.h>

Detailed Description

VAU's XDAIS call table definition.

Definition at line 252 of file vau.h.

Data Fields

IALG_Fxns | ialg
tint(* | process )(IALG_Handle handle, linSample *sample, linSample **outSamples, ISPHENC1_FrameType *vauFrameType)
processing API
tint(* | control )(IALG_Handle handle, ifvauConfig_t *cfg, ifvauControl_t *ctrl)
control API

Field Documentation

IALG_Fxns vauXdaisFxns_t::ialg

IALG standard algorithm interface.

Definition at line 253 of file vau.h.

tint(* vauXdaisFxns_t::process)(IALG_Handle handle, linSample *sample, linSample **outSamples, ISPHENC1_FrameType *vauFrameType)

processing API

Remarks:
Algorithm specific processing API, same definition as ECO API vauProcess

tint(* vauXdaisFxns_t::control)(IALG_Handle handle, ifvauConfig_t *cfg, ifvauControl_t *ctrl)

control API

Remarks:
Algorithm specific control API, same definition as ECO API vauControl

The documentation for this struct was generated from the following file:
  • vau.h


VAU: vauXdaisInitParams_t Struct Reference

  • Data Structures
  • Data Fields

vauXdaisInitParams_t Struct Reference
[VAU, VAU]

#include <vau.h>

Collaboration diagram for vauXdaisInitParams_t:

[legend]

Detailed Description

configuration parameters overloading for algInit API

Remarks:
Defaults are as below..
 *
 *  {
 *  sizeof(vauXdaisInitParams_t)}, // IALG_Params from ialg.h (size field)
 *
 *    // vauOpenConfig_t {
 *      80,   // frame size (= 10 ms at 8 KHz)
 *      1,    // sampling rate in 8 KHz multiples (1 = 8 KHz)
 *      // ifvauConfig_t
 *      {
 *        ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
 *        ifvau_TYPE_ADAPTIVE,  // VAU type
 *        0,                    // VAU threshold adjustment
 *        180,                  // hold over in ms
 *        0                     // reset hang over
 *      },
 *  }
 *

Definition at line 244 of file vau.h.

Data Fields

IALG_Params param
vauOpenConfig_t cfgOpen

Field Documentation

IALG_Params vauXdaisInitParams_t::param

Base type as per IALG requirement

Definition at line 245 of file vau.h.

vauOpenConfig_t vauXdaisInitParams_t::cfgOpen

refer to vauOpenConfig_t definition

Definition at line 246 of file vau.h.

The documentation for this struct was generated from the following file:
  • vau.h


VAU: vau.h File Reference

  • File List
  • Globals

vau.h File Reference

Detailed Description

Contains definitions and external APIs for the Voice Activity Detection Unit.

(C) Copyright 2007, Texas Instruments, Inc.

Definition in file vau.h.

#include <ti/mas/types/types.h>
#include <ti/mas/iface/ifvau/ifvau.h>
#include <ti/xdais/dm/isphenc1.h>
#include <ti/xdais/xdas.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for vau.h:

Go to the source code of this file.

Data Structures

struct | vauSizeConfig_t
Size query time configuration parameters. More...
struct | vauStats_s
Statistics reported by VAU. More...
struct | vauOpenConfig_t
Open time configuration parameters. More...
struct | vauXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | vauXdaisFxns_t
VAU's XDAIS call table definition. More...

Defines

#define | vau_ERROR 1
#define | vau_NOERR 0
#define | vau_NOMEMORY (-1)
#define | vau_SAMP_RATE_8KHZ 1
#define | vau_SAMP_RATE_16KHZ 2
#define | vau_MAX_SAMP_RATE 2
#define | vau_STAT_STATE_NONE 0x00
#define | vau_STAT_STATE_VOICE 0x01
#define | vau_STAT_STATE_NOISE 0x02

Typedefs

typedef vauStats_s | vauStats_t
Statistics reported by VAU.

Functions

ECO (Telogy Embedded Communication Object) APIs
Remarks:
new, delete, getSizes, Open and Close are standard ECO APIs so are not described here in detail. Return codes may be one of vau_ERROR, vau_NOERR or vau_NOMEMORY

tint | vauGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, vauSizeConfig_t *cfg)
tint | vauNew (void **vauInst, tint nbufs, ecomemBuffer_t *bufs)
tint | vauOpen (void *vauInst, vauOpenConfig_t *cfg)
void | vauClose (void *vauInst)
void | vauDelete (void **vauInst)
tint | vauControl (void *vauInst, ifvauConfig_t *cfg, ifvauControl_t *ctrl)
Control API.
tbool | vauProcess (void *vauInst, linSample *inSamples, linSample **outSamples, ISPHENC1_FrameType *vauFrameType)
VAU Processing API, takes samples and generates voice/no-voice(noise) decision.
tuint | vauGetConfig (void *vauInst)
Get Configuration API.
void | vauGetStats (void *vauInst, tbool reset, vauStats_t *stats)
Get Statistics API.

Variables

XDAIS APIs

vauXdaisFxns_t vauXdaisCallTable
reference of VAU XDAIS call table

Define Documentation

#define vau_STAT_STATE_NONE 0x00

curr_state: There is no proprietary vau present, so no other parameters are meaningful

Definition at line 92 of file vau.h.

#define vau_STAT_STATE_VOICE 0x01

curr_state: The current signal is voice, so curr_threshold is meaningful

Definition at line 96 of file vau.h.

#define vau_STAT_STATE_NOISE 0x02

curr_state: The current signal is silence, so curr_threshold are meaningful

Definition at line 99 of file vau.h.


VAU: vau.h Source File

  • File List
  • Globals

vau.h

Go to the documentation of this file.
00001 #ifndef _VAU_H
00002 #define _VAU_H
00003
00015 /* @{ */
00016
00017 #include <ti/mas/types/types.h>
00018 #include <ti/mas/iface/ifvau/ifvau.h>
00019 #include <ti/xdais/dm/isphenc1.h>
00020 #include <ti/xdais/xdas.h>
00021 #include <ti/xdais/ialg.h>
00022 #include <ti/mas/util/debug.h>
00023 #include <ti/mas/util/ecomem.h>
00024
00029 /* @{ */
00034 #define vau_ERROR       1
00035
00039 #define vau_NOERR       0
00040
00044 #define vau_NOMEMORY  (-1)
00045 /* @} */ /* ingroup */
00046
00055 /* @{ */
00056
00058 #define vau_SAMP_RATE_8KHZ   1
00059
00060 #define vau_SAMP_RATE_16KHZ  2
00061
00062 #define vau_MAX_SAMP_RATE    2
00063 /* @} */ /* ingroup */
00064
00071 typedef struct {
00072   tint max_frame_size;
00079   tint max_sampling_rate_8k_multiple;
00085 } vauSizeConfig_t;
00086
00091 typedef struct vauStats_s {
00092 #define vau_STAT_STATE_NONE   0x00
00096 #define vau_STAT_STATE_VOICE  0x01
00099 #define vau_STAT_STATE_NOISE  0x02
00102   tuint     curr_state;
00103   tint      curr_threshold;
00104 } vauStats_t;
00105
00112 typedef struct {
00113   tint      frame_size;
00114   tint      sampling_rate_8k_multiple;
00118   ifvauConfig_t config;
00119 } vauOpenConfig_t;
00120
00127 tint vauGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, vauSizeConfig_t *cfg);
00128 tint vauNew      (void **vauInst, tint nbufs, ecomemBuffer_t *bufs);
00129 tint vauOpen     (void  *vauInst, vauOpenConfig_t *cfg);
00130 void vauClose    (void  *vauInst);
00131 void vauDelete   (void **vauInst);
00132
00146 tint vauControl (void *vauInst, ifvauConfig_t *cfg, ifvauControl_t *ctrl);
00147
00187 tbool vauProcess (void *vauInst, linSample *inSamples, linSample **outSamples,
00188                   ISPHENC1_FrameType *vauFrameType);
00189
00203 tuint vauGetConfig (void *vauInst);
00204
00215 void vauGetStats (void *vauInst, tbool reset, vauStats_t *stats);
00216
00221
00244 typedef struct {
00245   IALG_Params param;
00246   vauOpenConfig_t cfgOpen;
00247 } vauXdaisInitParams_t;
00248
00252 typedef struct {
00253   IALG_Fxns ialg;
00260   tint (*process) (IALG_Handle handle, linSample *sample, linSample **outSamples,
00261                    ISPHENC1_FrameType *vauFrameType);
00267   tint (*control) (IALG_Handle handle, ifvauConfig_t *cfg, ifvauControl_t *ctrl);
00268
00269 } vauXdaisFxns_t;
00270
00274 extern vauXdaisFxns_t vauXdaisCallTable;  /* pointer to VAU v-table */
00275 /* @} */ /* @name XDAIS APIs */
00276 /* @} */ /* ingroup */
00277
00278 #endif /* _VAU_H */
00279
00280 /* nothing past this point */


VAU Test: Data Structures

  • Data Structures
  • Data Fields

VAU Test Data Structures

Here are the data structures with brief descriptions:
config_s | Global test configuration structure definition
cycles_s | For accumulation of cycle statistics
siuInst_s | System Integration Unit (siu) structure for book-keeping of modules
siuMemHeap_t |


VAU Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

  1. Run the simulation to completion.
  2. The simulation will produce the file out.raw in directory vau\test\vectors\out\
  3. Open Matlab and change the Matlab directory to vau\test\vectors\ and run the Matlab script process.m (provided).
  4. The Matlab script will process in\inp.raw and out\out.raw to check if out.raw is an exact replica of inp.raw delayed by the expected VAU delay. It will also see if out\outVauDecisions.txt matches the reference file in the refOut\ directory. A graph of the output will be displayed with the following legend:
    1. Big black box: Voice with alert off
    2. Big blue box: Voice with alert on
    3. Small(er) Red box: Noise Execution cycles are displayed in red, though cycles are profiled per frame and cycle information is repeated for all samples within a frame. The script also allows one to hear the input and output with vau declared noise suppressed to silence.
  5. By default all testing is performed at an 8 KHz sampling rate. For simulation at 16 KHz, perform the following:
    1. Rename the file \inp\in16k.raw to \inp\in.raw
    2. Set config.frameSize to 160
    3. Set config.samp_rate_8k_multiple to 2
    4. Edit the process.m file to set sampling rate to 16000 instead of 8000
    5. Copy vauOutDecisions16k.txt in the refOut\ directory to \refOut\vauOutDecisions.txt before running the Matlab script.


VAU Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VAU Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VAU Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


VAU Test: File Index

  • File List
  • Globals

VAU Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
mem.c [code] |
mem.h [code] |
test.c [code] | VAU test


VAU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • avg : cycles_s
  • cyclesOverhead : siuInst_s
  • cyclesVau : siuInst_s
  • frameCount : siuInst_s
  • frameSize : config_s
  • heapBase : siuMemHeap_t
  • indx : siuMemHeap_t
  • inFrameFilePtr : siuInst_s
  • max : cycles_s
  • outFrameFilePtr : siuInst_s
  • outVauDecisionFilePtr : siuInst_s
  • samp_rate_8k_multiple : config_s
  • size : siuMemHeap_t
  • vauAlertFlagPrev : siuInst_s
  • vauConfig : config_s
  • vauControl : config_s
  • vauFrameTypePrev : siuInst_s
  • vauInst : siuInst_s
  • vauXdaisInst : siuInst_s
  • xdaisBufsMallocFreeCounter : siuInst_s
  • xdaisDefaultCfgFlag : config_s
  • xdaisFlag : config_s


VAU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • avg : cycles_s
  • cyclesOverhead : siuInst_s
  • cyclesVau : siuInst_s
  • frameCount : siuInst_s
  • frameSize : config_s
  • heapBase : siuMemHeap_t
  • indx : siuMemHeap_t
  • inFrameFilePtr : siuInst_s
  • max : cycles_s
  • outFrameFilePtr : siuInst_s
  • outVauDecisionFilePtr : siuInst_s
  • samp_rate_8k_multiple : config_s
  • size : siuMemHeap_t
  • vauAlertFlagPrev : siuInst_s
  • vauConfig : config_s
  • vauControl : config_s
  • vauFrameTypePrev : siuInst_s
  • vauInst : siuInst_s
  • vauXdaisInst : siuInst_s
  • xdaisBufsMallocFreeCounter : siuInst_s
  • xdaisDefaultCfgFlag : config_s
  • xdaisFlag : config_s


VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines
  • a
  • c
  • h
  • i
  • m
  • o
  • p
  • s

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • align : mem.c

- c -

  • config : test.c
  • config_t : test.c
  • cycles_t : test.c

- h -

  • hw_init() : test.c

- i -

  • inFrame : test.c

- m -

  • main() : test.c
  • MAX_FRAME_SIZE : test.c

- o -

  • outFrame : test.c

- p -

  • print_buffer() : mem.c
  • print_footer() : mem.c
  • print_header() : mem.c

- s -

  • siu_alloc_eco_mem() : mem.c , mem.h
  • siu_alloc_xdais_mem() : mem.h , mem.c
  • siu_close() : test.c
  • siu_dealloc_vau_xdais_mem() : test.c
  • siu_dealloc_xdais_mem() : mem.c , mem.h
  • siu_init_heaps() : mem.h , mem.c
  • siu_malloc() : mem.c
  • SIU_MAX_MODULE_NBUFS : test.c
  • siu_mem_heap_alloc() : mem.c
  • siu_mem_heap_init() : mem.c
  • SIU_MEM_NONVOLATILE_HEAP_SIZE : mem.c
  • SIU_MEM_VOLATILE_HEAP_SIZE : mem.c
  • siu_new_open_config_modules() : test.c
  • siu_open() : test.c
  • siu_process() : test.c
  • siu_read_inFrame() : test.c
  • siu_write_outFrame() : test.c
  • siuInst : test.c
  • siuInst_t : test.c
  • siuMemHeapNonVolatile : mem.c
  • siuMemHeapVolatile : mem.c
  • siuNonVolatileMemBufs : mem.c
  • siuVolatileMemBufs : mem.c


VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • align : mem.c
  • MAX_FRAME_SIZE : test.c
  • SIU_MAX_MODULE_NBUFS : test.c
  • SIU_MEM_NONVOLATILE_HEAP_SIZE : mem.c
  • SIU_MEM_VOLATILE_HEAP_SIZE : mem.c


VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • hw_init() : test.c
  • main() : test.c
  • print_buffer() : mem.c
  • print_footer() : mem.c
  • print_header() : mem.c
  • siu_alloc_eco_mem() : mem.c , mem.h
  • siu_alloc_xdais_mem() : mem.h , mem.c
  • siu_close() : test.c
  • siu_dealloc_vau_xdais_mem() : test.c
  • siu_dealloc_xdais_mem() : mem.h , mem.c
  • siu_init_heaps() : mem.c , mem.h
  • siu_malloc() : mem.c
  • siu_mem_heap_alloc() : mem.c
  • siu_mem_heap_init() : mem.c
  • siu_new_open_config_modules() : test.c
  • siu_open() : test.c
  • siu_process() : test.c
  • siu_read_inFrame() : test.c
  • siu_write_outFrame() : test.c


VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • config_t : test.c
  • cycles_t : test.c
  • siuInst_t : test.c


VAU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • config : test.c
  • inFrame : test.c
  • outFrame : test.c
  • siuInst : test.c
  • siuMemHeapNonVolatile : mem.c
  • siuMemHeapVolatile : mem.c
  • siuNonVolatileMemBufs : mem.c
  • siuVolatileMemBufs : mem.c


VAU Test: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


VAU Test: VAUTEST

VAUTEST

Detailed Description

Data Structures

struct | config_s
global test configuration structure definition More...
struct | cycles_s
for accumulation of cycle statistics More...
struct | siuInst_s
System Integration Unit (siu) structure for book-keeping of modules. More...

Defines

#define | SIU_MAX_MODULE_NBUFS 100
#define | MAX_FRAME_SIZE 80

Typedefs

typedef config_s | config_t
global test configuration structure definition
typedef cycles_s | cycles_t
for accumulation of cycle statistics
typedef siuInst_s | siuInst_t
System Integration Unit (siu) structure for book-keeping of modules.

Functions

void | siu_open (void)
void | siu_dealloc_vau_xdais_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
void | siu_close (void)
void | siu_new_open_config_modules (config_t *config)
void | siu_process (linSample *framePtr, linSample **outFramePtr)
tint | siu_read_inFrame (linSample *inFramePtr, tint numSamples)
tint | siu_write_outFrame (linSample *outFramePtr, tint numSamples)
void | hw_init (void)
void | main (void)

Variables

config_t config
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.
siuInst_t siuInst
linSample | inFrame [MAX_FRAME_SIZE]
linSample | outFrame [MAX_FRAME_SIZE]

Define Documentation

#define SIU_MAX_MODULE_NBUFS 100

required for ECO API memory descriptors, not for XDAIS APIs

Definition at line 45 of file test.c.

Referenced by siu_new_open_config_modules().

#define MAX_FRAME_SIZE 80

10 ms frame

Definition at line 46 of file test.c.

Typedef Documentation

typedef struct config_s config_t

global test configuration structure definition

typedef struct cycles_s cycles_t

for accumulation of cycle statistics

typedef struct siuInst_s siuInst_t

System Integration Unit (siu) structure for book-keeping of modules.

Function Documentation

void siu_open ( void )

Definition at line 130 of file test.c.

References siuInst_s::cyclesOverhead, siuInst_s::inFrameFilePtr, siuInst_s::outFrameFilePtr, siuInst_s::outVauDecisionFilePtr, siu_init_heaps(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_dealloc_vau_xdais_mem | ( | IALG_Fxns * | ialgFxnsPtr,
 |  | IALG_Handle | xdaisInstPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 201 of file test.c.

References siu_dealloc_xdais_mem().

Referenced by siu_close().

Here is the call graph for this function:

void siu_close ( void )

Definition at line 217 of file test.c.

References config, siuInst_s::inFrameFilePtr, siuInst_s::outFrameFilePtr, siuInst_s::outVauDecisionFilePtr, siu_dealloc_vau_xdais_mem(), siuInst, siuInst_s::vauXdaisInst, siuInst_s::xdaisBufsMallocFreeCounter, and config_s::xdaisFlag.

Referenced by main().

Here is the call graph for this function:

void siu_new_open_config_modules ( config_t * config )

Definition at line 245 of file test.c.

References config, config_s::frameSize, config_s::samp_rate_8k_multiple, siu_alloc_eco_mem(), siu_alloc_xdais_mem(), SIU_MAX_MODULE_NBUFS, siuInst, config_s::vauConfig, config_s::vauControl, siuInst_s::vauInst, siuInst_s::vauXdaisInst, siuInst_s::xdaisBufsMallocFreeCounter, config_s::xdaisDefaultCfgFlag, and config_s::xdaisFlag.

Referenced by main().

Here is the call graph for this function:

void siu_process | ( | linSample * | framePtr,
 |  | linSample ** | outFramePtr
 | ) |  |

Definition at line 357 of file test.c.

References config, siuInst_s::cyclesVau, siuInst_s::frameCount, siuInst_s::outVauDecisionFilePtr, siuInst, siuInst_s::vauAlertFlagPrev, siuInst_s::vauFrameTypePrev, siuInst_s::vauInst, siuInst_s::vauXdaisInst, and config_s::xdaisFlag.

Referenced by main().

tint siu_read_inFrame | ( | linSample * | inFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 434 of file test.c.

References siuInst_s::inFrameFilePtr, and siuInst.

Referenced by main().

tint siu_write_outFrame | ( | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 456 of file test.c.

References siuInst_s::outFrameFilePtr, and siuInst.

Referenced by main().

void hw_init ( void )

Definition at line 473 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 491 of file test.c.

References config, siuInst_s::frameCount, config_s::frameSize, hw_init(), siu_close(), siu_new_open_config_modules(), siu_open(), siu_process(), siu_read_inFrame(), siu_write_outFrame(), siuInst, and config_s::xdaisFlag.

Here is the call graph for this function:

Variable Documentation

config_t config

Initial value:

 {
  1,
  0,
  80,
  1,

  {
   ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
   ifvau_TYPE_ADAPTIVE,
   0,
   180},

  {
   ifvau_VALID_CONTROL,
   ifvau_ENABLE
  }

}
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.

Definition at line 72 of file test.c.

Referenced by hw_init(), main(), siu_close(), siu_new_open_config_modules(), and siu_process().

siuInst_t siuInst

Definition at line 128 of file test.c.

Referenced by main(), siu_close(), siu_new_open_config_modules(), siu_open(), siu_process(), siu_read_inFrame(), and siu_write_outFrame().

linSample inFrame[MAX_FRAME_SIZE]

Definition at line 489 of file test.c.

linSample outFrame[MAX_FRAME_SIZE]

Definition at line 489 of file test.c.


VAU Test: VAU Unit Test

VAU Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the VAU. This is not a regression test, its purpose is to show how the VAU module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Test code details: VAUTEST

Building Unit Test

The VAU Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the VAU Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main VAU documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The VAU Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the VAU Unit Test image for the target of interest
    • Will reside in the vau\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the VAU project for the target of interest
    • Will be a subdirectory off the vau\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the vau\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)
  • ti.mas.xdais (for XDAIS/IALG defines and XDM 1.0 isphenc1.h and isphdec1.h)
  • ti.mas.ifvau (External interface for voice activity detector)


VAU Test: mem.c File Reference

  • File List
  • Globals

mem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xdc/std.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/vau/test/src/mem.h>

Include dependency graph for mem.c:

Go to the source code of this file.

Data Structures

struct | siuMemHeap_t

Defines

#define | align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
#define | SIU_MEM_VOLATILE_HEAP_SIZE 5000
#define | SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Functions

void | siu_mem_heap_init (siuMemHeap_t *ptr, tword *heapBase, tulong size)
tword * | siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
void | siu_init_heaps (void)
tword * | siu_malloc (tint size, tbool volat)
static void | print_header (void)
static void | print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
static void | print_footer (void)
void | siu_alloc_eco_mem (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr)
void | siu_alloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
void | siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)

Variables

tword | siuVolatileMemBufs [SIU_MEM_VOLATILE_HEAP_SIZE]
tword | siuNonVolatileMemBufs [SIU_MEM_NONVOLATILE_HEAP_SIZE]
siuMemHeap_t siuMemHeapVolatile
siuMemHeap_t siuMemHeapNonVolatile

Define Documentation

#define align | ( | Addr,
 |  | Algnmt | ) | (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))

Definition at line 11 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

#define SIU_MEM_VOLATILE_HEAP_SIZE 5000

Definition at line 40 of file mem.c.

Referenced by siu_init_heaps().

#define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Definition at line 41 of file mem.c.

Referenced by siu_init_heaps().

Function Documentation

void siu_mem_heap_init | ( | siuMemHeap_t * | ptr,
 |  | tword * | heapBase,
 |  | tulong | size
 | ) |  |

Definition at line 19 of file mem.c.

References siuMemHeap_t::heapBase, siuMemHeap_t::indx, and siuMemHeap_t::size.

Referenced by siu_init_heaps().

tword* siu_mem_heap_alloc | ( | siuMemHeap_t * | ptr,
 |  | tint | size
 | ) |  |

Definition at line 29 of file mem.c.

References siuMemHeap_t::heapBase, siuMemHeap_t::indx, and siuMemHeap_t::size.

Referenced by siu_malloc().

void siu_init_heaps ( void )

Definition at line 52 of file mem.c.

References siu_mem_heap_init(), SIU_MEM_NONVOLATILE_HEAP_SIZE, SIU_MEM_VOLATILE_HEAP_SIZE, siuMemHeapNonVolatile, siuMemHeapVolatile, siuNonVolatileMemBufs, and siuVolatileMemBufs.

Referenced by siu_open().

Here is the call graph for this function:

tword* siu_malloc | ( | tint | size,
 |  | tbool | volat
 | ) |  |

Definition at line 58 of file mem.c.

References siu_mem_heap_alloc(), siuMemHeapNonVolatile, and siuMemHeapVolatile.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

Here is the call graph for this function:

static void print_header ( void ) [inline, static]

Definition at line 68 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

static void print_buffer | ( | tint | ID,
 |  | tint | linAlign,
 |  | tint | sizeMAUs,
 |  | tbool | isVolat |
 | ) |  |  | [inline, static]

Definition at line 77 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

static void print_footer ( void ) [inline, static]

Definition at line 83 of file mem.c.

Referenced by siu_alloc_eco_mem(), and siu_alloc_xdais_mem().

void siu_alloc_eco_mem | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr
 | ) |  |

Definition at line 88 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_alloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 123 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 158 of file mem.c.

Referenced by siu_dealloc_vau_xdais_mem().

Variable Documentation

tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE]

Definition at line 44 of file mem.c.

Referenced by siu_init_heaps().

tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE]

Definition at line 47 of file mem.c.

Referenced by siu_init_heaps().

siuMemHeap_t siuMemHeapVolatile

Definition at line 49 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().

siuMemHeap_t siuMemHeapNonVolatile

Definition at line 50 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().


VAU Test: mem.c Source File

  • File List
  • Globals

mem.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include <xdc/std.h>
00005
00006 #include <ti/mas/types/types.h>
00007 #include <ti/mas/util/ecomem.h>
00008 #include <ti/xdais/ialg.h>
00009 #include <ti/mas/vau/test/src/mem.h>
00010
00011 #define align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
00012
00013 typedef struct {
00014   tword *heapBase;
00015   tulong indx;
00016   tulong size;
00017 } siuMemHeap_t;
00018
00019 void siu_mem_heap_init(siuMemHeap_t *ptr, tword *heapBase, tulong size)
00020 {
00021   ptr->heapBase = heapBase;
00022   ptr->size = size;
00023   ptr->indx = 0;
00024
00025   /* Note : memory is not initialized deliberately to expose
00026             uninitialized memory read problems */
00027 }
00028
00029 tword *siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
00030 {
00031   tword *alloc = NULL;
00032
00033   if ((ptr->indx + size) <= ptr->size) {
00034     alloc = &ptr->heapBase[ptr->indx];
00035     ptr->indx += size;
00036   }
00037   return(alloc);
00038 }
00039
00040 #define SIU_MEM_VOLATILE_HEAP_SIZE 5000
00041 #define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000
00042
00043 #pragma DATA_SECTION (siuVolatileMemBufs, ".volatileMemBufs");
00044 tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE];
00045
00046 #pragma DATA_SECTION (siuNonVolatileMemBufs, ".nonVolatileMemBufs");
00047 tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE];
00048
00049 siuMemHeap_t siuMemHeapVolatile;
00050 siuMemHeap_t siuMemHeapNonVolatile;
00051
00052 void siu_init_heaps(void)
00053 {
00054   siu_mem_heap_init ( &siuMemHeapVolatile, siuVolatileMemBufs, SIU_MEM_VOLATILE_HEAP_SIZE);
00055   siu_mem_heap_init ( &siuMemHeapNonVolatile, siuNonVolatileMemBufs, SIU_MEM_NONVOLATILE_HEAP_SIZE);
00056 }
00057
00058 tword *siu_malloc (tint size, tbool volat)
00059 {
00060   if (volat == TRUE) /* Scratchpad type */ {
00061     return ( siu_mem_heap_alloc (&siuMemHeapVolatile, size) );
00062   }
00063   else {
00064     return ( siu_mem_heap_alloc (&siuMemHeapNonVolatile, size) );
00065   }
00066 }
00067
00068 static inline void print_header (void)
00069 {
00070   printf("+-----------+-----------+-----------+-------------+\n");
00071   printf("| Buffer ID | Alignment |   Size    | Volatility  |\n");
00072   printf("|           |  (Bytes)  | (Bytes)   |             |\n");
00073   printf("+-----------+-----------+-----------+-------------+\n");
00074 /*printf("| %9d | %9d | %9d | %11s |\n");*/
00075 }
00076
00077 static inline void print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
00078 {
00079   printf("| %9d | %9d | %9d | %11s |\n", ID, linAlign * (TYP_TWORD_SIZE/8),
00080         sizeMAUs * (TYP_TWORD_SIZE/8), (isVolat == TRUE)? "scratch" : "non-scratch" );
00081 }
00082
00083 static inline void print_footer (void)
00084 {
00085   printf("+-----------+-----------+-----------+-------------+\n");
00086 }
00087
00088 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00089                    ecomemBuffer_t * ecoBufsPtr)
00090 {
00091   tint      i;
00092   void     *allocPtr;
00093   tuint     linAlign, log2align;
00094   tbool     isVolat;
00095
00096   print_header();
00097
00098   for (i = 0; i < nbufs; i++) {
00099     ecoBufsPtr[i] = sizeBufsPtr[i];
00100
00101     isVolat = ecoBufsPtr[i].volat;
00102
00103     log2align = sizeBufsPtr[i].log2align;
00104     linAlign = (tuint) 1 << log2align;
00105
00106     print_buffer (i, linAlign, sizeBufsPtr[i].size, isVolat);
00107
00108     if (sizeBufsPtr[i].size == 0) {
00109       ecoBufsPtr[i].base = NULL;
00110       continue;
00111     }
00112
00113     if ((allocPtr = (void *) siu_malloc((sizeBufsPtr[i].size + linAlign - 1), isVolat)) == NULL) {
00114       printf("Not enough heap, exiting\n");
00115       exit(0);
00116     }
00117     ecoBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00118   }
00119
00120   print_footer();
00121 }
00122
00123 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00124 {
00125   tint      i;
00126   void     *allocPtr;
00127   tint     linAlign;
00128   tint      alignmentAdjustedSize;
00129   tbool    isVolat;
00130
00131   print_header();
00132
00133   for (i = 0; i < nbufs; i++) {
00134
00135     isVolat = (xdaisBufsPtr[i].attrs == IALG_SCRATCH) ? TRUE : FALSE;
00136     linAlign = (tint) xdaisBufsPtr[i].alignment;
00137
00138     print_buffer (i, linAlign, xdaisBufsPtr[i].size, isVolat);
00139
00140     if (xdaisBufsPtr[i].size == 0) {
00141       xdaisBufsPtr[i].base = NULL;
00142       continue;
00143     }
00144
00145     alignmentAdjustedSize = xdaisBufsPtr[i].size + linAlign - 1;
00146     if ((allocPtr = (void *) siu_malloc(alignmentAdjustedSize, isVolat)
00147         ) == NULL) {
00148       printf("Not enough heap, exiting\n");
00149       exit(0);
00150     }
00151     *mallocedSizeCounter += alignmentAdjustedSize;
00152     xdaisBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00153   }
00154
00155   print_footer();
00156 }
00157
00158 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00159 {
00160   tint i;
00161
00162   for(i = 0; i < nbufs; i++) {
00163     *mallocedSizeCounter -= (xdaisBufsPtr[i].size + xdaisBufsPtr[i].alignment - 1);
00164     if (xdaisBufsPtr[i].base) {
00165
00166     /* Note the free below may not have the right pointers as were in malloc because
00167        the module was fed aligned pointers, it is not possible to reverse and derive
00168        original unaligned pointer, so don't do free */
00169       //free(xdaisBufsPtr[i].base);
00170     }
00171   }
00172 }
00173
00174 /* Nothing past this point */


VAU Test: mem.h File Reference

  • File List
  • Globals

mem.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/xdais/ialg.h>

Include dependency graph for mem.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | siu_init_heaps (void)
void | siu_alloc_eco_mem (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr)
void | siu_alloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
void | siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)

Function Documentation

void siu_init_heaps ( void )

Definition at line 52 of file mem.c.

References siu_mem_heap_init(), SIU_MEM_NONVOLATILE_HEAP_SIZE, SIU_MEM_VOLATILE_HEAP_SIZE, siuMemHeapNonVolatile, siuMemHeapVolatile, siuNonVolatileMemBufs, and siuVolatileMemBufs.

Referenced by siu_open().

Here is the call graph for this function:

void siu_alloc_eco_mem | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr
 | ) |  |

Definition at line 88 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_alloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 123 of file mem.c.

References align, print_buffer(), print_footer(), print_header(), and siu_malloc().

Referenced by siu_new_open_config_modules().

Here is the call graph for this function:

void siu_dealloc_xdais_mem | ( | tint | nbufs,
 |  | IALG_MemRec * | xdaisBufsPtr,
 |  | tulong * | mallocedSizeCounter
 | ) |  |

Definition at line 158 of file mem.c.

Referenced by siu_dealloc_vau_xdais_mem().


VAU Test: mem.h Source File

  • File List
  • Globals

mem.h

Go to the documentation of this file.
00001 #include <ti/mas/types/types.h>
00002 #include <ti/mas/util/ecomem.h>
00003 #include <ti/xdais/ialg.h>
00004
00005 void siu_init_heaps(void);
00006 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00007                    ecomemBuffer_t * ecoBufsPtr);
00008
00009 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00010 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00011
00012 /* Nothing past this point */


VAU Test: Module Index

VAU Test Modules

Here is a list of all modules:
  • VAUTEST


VAU Test: Page Index

VAU Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


VAU Test: config_s Struct Reference

  • Data Structures
  • Data Fields

config_s Struct Reference
[VAUTEST]

Detailed Description

global test configuration structure definition

Definition at line 50 of file test.c.

Data Fields

tbool | xdaisFlag
tbool | xdaisDefaultCfgFlag
tint | frameSize
tint | samp_rate_8k_multiple
ifvauConfig_t | vauConfig
ifvauControl_t | vauControl

Field Documentation

tbool config_s::xdaisFlag

1 if desired to exercise xdais else ECO interface for components

Definition at line 51 of file test.c.

Referenced by main(), siu_close(), siu_new_open_config_modules(), and siu_process().

tbool config_s::xdaisDefaultCfgFlag

1 if desired to use default configuration for XDAIS case,

applicable only when flag xdaisFlag is 1

Definition at line 53 of file test.c.

Referenced by siu_new_open_config_modules().

tint config_s::frameSize

in 8 KHz samples, only 5 ms (=40) or 10 ms (=80) allowed

Definition at line 57 of file test.c.

Referenced by main(), and siu_new_open_config_modules().

tint config_s::samp_rate_8k_multiple

sampling rate, as multiples of 8 KHz, e.g for 16 KHz, set to 2

Definition at line 59 of file test.c.

Referenced by siu_new_open_config_modules().

ifvauConfig_t config_s::vauConfig

VAU (setup time) configuration, see ifvau external interface

Definition at line 61 of file test.c.

Referenced by siu_new_open_config_modules().

ifvauControl_t config_s::vauControl

VAU control, see ifvau external interface

Definition at line 62 of file test.c.

Referenced by siu_new_open_config_modules().

The documentation for this struct was generated from the following file:
  • test.c


VAU Test: cycles_s Struct Reference

  • Data Structures
  • Data Fields

cycles_s Struct Reference
[VAUTEST]

Detailed Description

for accumulation of cycle statistics

Definition at line 97 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

running maximum of cycles

Definition at line 98 of file test.c.

tlong cycles_s::avg

running average of cycles (using exponential averaging)

Definition at line 99 of file test.c.

The documentation for this struct was generated from the following file:
  • test.c


VAU Test: siuInst_s Struct Reference

  • Data Structures
  • Data Fields

siuInst_s Struct Reference
[VAUTEST]

Collaboration diagram for siuInst_s:

[legend]

Detailed Description

System Integration Unit (siu) structure for book-keeping of modules.

Definition at line 104 of file test.c.

Data Fields

void * | vauInst
IALG_Handle | vauXdaisInst
tlong | frameCount
ISPHENC1_FrameType | vauFrameTypePrev
tbool | vauAlertFlagPrev
FILE * | inFrameFilePtr
FILE * | outFrameFilePtr
FILE * | outVauDecisionFilePtr
tlong | cyclesOverhead
cycles_t cyclesVau
tulong | xdaisBufsMallocFreeCounter

Field Documentation

void* siuInst_s::vauInst

vau's ECO instance

Definition at line 105 of file test.c.

Referenced by siu_new_open_config_modules(), and siu_process().

IALG_Handle siuInst_s::vauXdaisInst

vau's XDAIS instance

Definition at line 106 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process().

tlong siuInst_s::frameCount

Definition at line 107 of file test.c.

Referenced by main(), and siu_process().

ISPHENC1_FrameType siuInst_s::vauFrameTypePrev

Definition at line 108 of file test.c.

Referenced by siu_process().

tbool siuInst_s::vauAlertFlagPrev

Definition at line 109 of file test.c.

Referenced by siu_process().

FILE* siuInst_s::inFrameFilePtr

Definition at line 110 of file test.c.

Referenced by siu_close(), siu_open(), and siu_read_inFrame().

FILE* siuInst_s::outFrameFilePtr

Definition at line 111 of file test.c.

Referenced by siu_close(), siu_open(), and siu_write_outFrame().

FILE* siuInst_s::outVauDecisionFilePtr

Definition at line 112 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process().

tlong siuInst_s::cyclesOverhead

to measure fixed overhead in cycle measurement

Definition at line 121 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesVau

Vau's cycle statistics

Definition at line 122 of file test.c.

Referenced by siu_process().

tulong siuInst_s::xdaisBufsMallocFreeCounter

to see if malloc and free for module memory allocation in XDAIS are same i.e this should be zero at the end of the test

Definition at line 123 of file test.c.

Referenced by siu_close(), and siu_new_open_config_modules().

The documentation for this struct was generated from the following file:
  • test.c


VAU Test: siuMemHeap_t Struct Reference

  • Data Structures
  • Data Fields

siuMemHeap_t Struct Reference

Detailed Description

Definition at line 13 of file mem.c.

Data Fields

tword * | heapBase
tulong | indx
tulong | size

Field Documentation

tword* siuMemHeap_t::heapBase

Definition at line 14 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::indx

Definition at line 15 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::size

Definition at line 16 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

The documentation for this struct was generated from the following file:
  • mem.c


VAU Test: test.c File Reference

  • File List
  • Globals

test.c File Reference

Detailed Description

VAU test.

Remarks:
This test feeds an input speech file to vau and creates one output file of vau decision and another output speech samples going through the vau.
(C) Copyright 2007, Texas Instruments, Inc.

Definition in file test.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xdc/std.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/iface/ifvau/ifvau.h>
#include <ti/mas/vau/vau.h>
#include <ti/mas/vau/Version.h>
#include <ti/xdais/dm/isphenc1.h>
#include <ti/xdais/ialg.h>
#include <ti/mas/vau/test/src/mem.h>

Include dependency graph for test.c:

Go to the source code of this file.

Data Structures

struct | config_s
global test configuration structure definition More...
struct | cycles_s
for accumulation of cycle statistics More...
struct | siuInst_s
System Integration Unit (siu) structure for book-keeping of modules. More...

Defines

#define | SIU_MAX_MODULE_NBUFS 100
#define | MAX_FRAME_SIZE 80

Typedefs

typedef config_s | config_t
global test configuration structure definition
typedef cycles_s | cycles_t
for accumulation of cycle statistics
typedef siuInst_s | siuInst_t
System Integration Unit (siu) structure for book-keeping of modules.

Functions

void | siu_open (void)
void | siu_dealloc_vau_xdais_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
void | siu_close (void)
void | siu_new_open_config_modules (config_t *config)
void | siu_process (linSample *framePtr, linSample **outFramePtr)
tint | siu_read_inFrame (linSample *inFramePtr, tint numSamples)
tint | siu_write_outFrame (linSample *outFramePtr, tint numSamples)
void | hw_init (void)
void | main (void)

Variables

config_t config
Configuration structure containing all configuration of the test. This can be set manually after going to "main" and before letting run to completion.
siuInst_t siuInst
linSample | inFrame [MAX_FRAME_SIZE]
linSample | outFrame [MAX_FRAME_SIZE]


VAU Test: test.c Source File

  • File List
  • Globals

test.c

Go to the documentation of this file.
00001
00013 /* @{ */
00014
00015 #include <stdio.h>
00016 #include <stdlib.h>
00017 #include <string.h>
00018 #include <xdc/std.h>
00019
00020 #include <ti/mas/types/types.h>
00021 #include <ti/mas/util/utl.h>
00022 #include <ti/mas/util/debug.h>
00023 #include <ti/mas/iface/ifvau/ifvau.h>
00024 #include <ti/mas/vau/vau.h>
00025 #include <ti/mas/vau/Version.h>
00026 #include <ti/xdais/dm/isphenc1.h>
00027 #include <ti/xdais/ialg.h>
00028 #include <ti/mas/vau/test/src/mem.h>
00029
00030 //#define DBG
00031
00032 #ifdef DBG
00033 extern tlong gVauEnergy;
00034 extern tlong gVauThreshold;
00035 #endif
00036
00037 #ifdef USE_CACHE
00038 #include <ti/mas/sdk/memArchCfg.h>
00039 #endif
00040
00041 #ifdef PROFILE_CYCLES
00042 #include <ti/mas/sdk/profile.h>
00043 #endif
00044
00045 #define SIU_MAX_MODULE_NBUFS 100
00046 #define MAX_FRAME_SIZE 80
00050 typedef struct config_s {
00051   tbool     xdaisFlag;
00053   tbool     xdaisDefaultCfgFlag;
00057   tint      frameSize;
00059   tint      samp_rate_8k_multiple;
00061   ifvauConfig_t vauConfig;
00062   ifvauControl_t vauControl;
00063 #ifdef USE_CACHE
00064   tint  doCacheFlush;
00065   tint  doCacheEnable;
00066 #endif
00067 } config_t;
00068
00072 config_t  config = {
00073   1,  /* xdaisFlag */
00074   0,  /* don't use default configuration for xdais */
00075   80, /* 10 ms default frame size at 8 KHz */
00076   1,  /* 8 KHz */
00077
00078   /* vauConfig */
00079   {
00080    ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
00081    ifvau_TYPE_ADAPTIVE,
00082    0,
00083    180},
00084
00085   /* vauControl */
00086   {
00087    ifvau_VALID_CONTROL,
00088    ifvau_ENABLE
00089   }
00090 #ifdef USE_CACHE
00091  ,1, /* doCacheFlush */
00092   1  /* doCacheEnable */
00093 #endif
00094 };
00095
00097 typedef struct cycles_s {
00098   tlong     max;
00099   tlong     avg;
00100 } cycles_t;
00101
00104 typedef struct siuInst_s {
00105   void     *vauInst;
00106   IALG_Handle vauXdaisInst;
00107   tlong     frameCount;
00108   ISPHENC1_FrameType vauFrameTypePrev;
00109   tbool    vauAlertFlagPrev;
00110   FILE     *inFrameFilePtr;
00111   FILE     *outFrameFilePtr;
00112   FILE     *outVauDecisionFilePtr;
00113
00114 #ifdef PROFILE_CYCLES
00115   FILE   *outCyclesFilePtr;
00116 #endif
00117
00118 #ifdef DBG
00119   FILE     *vauDbgLogFilePtr;
00120 #endif
00121   tlong     cyclesOverhead;
00122   cycles_t  cyclesVau;
00123   tulong   xdaisBufsMallocFreeCounter;
00126 } siuInst_t;
00127
00128 siuInst_t siuInst;
00129
00130 void siu_open(void)
00131 {
00132 #ifdef PROFILE_CYCLES
00133   volatile tlong cycles;
00134 #endif
00135
00136   memset(&siuInst, 0, sizeof(siuInst_t));
00137
00138   siu_init_heaps();
00139
00140   if ((siuInst.inFrameFilePtr = fopen("..\\..\\vectors\\inp\\in.raw", "rb")) == NULL) {
00141     printf(" Error opening in.raw\n");
00142     exit(0);
00143   }
00144
00145   if ((siuInst.outFrameFilePtr =
00146     fopen("..\\..\\vectors\\out\\out.raw", "wb")) == NULL) {
00147     printf(" Error opening out.raw\n");
00148     exit(0);
00149   }
00150
00151   if ((siuInst.outVauDecisionFilePtr =
00152     fopen("..\\..\\vectors\\out\\outVauDecisions.txt", "wt")) == NULL) {
00153     printf(" Error opening out.raw\n");
00154     exit(0);
00155   }
00156
00157 #ifdef PROFILE_CYCLES
00158   if ((siuInst.outCyclesFilePtr =
00159     fopen("..\\..\\logs\\cycles.txt", "wt")) == NULL) {
00160     printf(" Error opening cycles.txt\n");
00161     exit(0);
00162   }
00163 #endif
00164
00165 #ifdef DBG
00166   if ((siuInst.vauDbgLogFilePtr =
00167     fopen("..\\..\\logs\\log.txt", "wt")) == NULL) {
00168     printf(" Error opening log.txt\n");
00169     exit(0);
00170   }
00171 #endif
00172
00173   /* measure measurement overhead of cycles */
00174
00175 #ifdef PROFILE_CYCLES
00176   cycles = profile_getCPUcycleCount();
00177 #endif
00178
00179 #ifdef PROFILE_CYCLES
00180   cycles = (profile_getCPUcycleCount() - cycles);
00181   siuInst.cyclesOverhead = cycles;
00182 #endif
00183
00184 }
00185
00186 #ifdef PROFILE_CYCLES
00187 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00188                                          tlong overhead)
00189 {
00190   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00191          (long) cyclesPtr->max - (long) overhead,
00192          (long) cyclesPtr->avg - (long) overhead);
00193 }
00194
00195 void siu_print_cycles(void)
00196 {
00197   siu_print_cycles_util(&siuInst.cyclesVau, "Vau", siuInst.cyclesOverhead);
00198 }
00199 #endif
00200
00201 void siu_dealloc_vau_xdais_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr,
00202                                 tulong *mallocedSizeCounter)
00203 {
00204   Int nbufs;
00205   IALG_MemRec *xdaisBufsPtr;
00206
00207   nbufs = ialgFxnsPtr->algNumAlloc();
00208   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00209
00210   nbufs = ialgFxnsPtr->algFree(xdaisInstPtr, xdaisBufsPtr);
00211
00212   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00213
00214   free(xdaisBufsPtr);
00215 }
00216
00217 void siu_close(void)
00218 {
00219   fclose(siuInst.inFrameFilePtr);
00220   fclose(siuInst.outFrameFilePtr);
00221   fclose(siuInst.outVauDecisionFilePtr);
00222
00223
00224 #ifdef DBG
00225   fclose(siuInst.vauDbgLogFilePtr);
00226 #endif
00227
00228 #ifdef PROFILE_CYCLES
00229   fclose(siuInst.outCyclesFilePtr);
00230   siu_print_cycles();
00231   profile_closeCycleProfiling();
00232 #endif
00233
00234   if (config.xdaisFlag) {
00235     siu_dealloc_vau_xdais_mem (&vauXdaisCallTable.ialg, siuInst.vauXdaisInst,
00236                            &siuInst.xdaisBufsMallocFreeCounter);
00237     if (siuInst.xdaisBufsMallocFreeCounter) {
00238       printf(" Error: mismatched malloc-free\n");
00239     }
00240   }
00241
00242   memset(&siuInst, 0, sizeof(siuInst_t));
00243 }
00244
00245 void siu_new_open_config_modules(config_t * config)
00246 {
00247   tint      nbufs, ret;
00248   const ecomemBuffer_t *sizeBufs;
00249   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00250   const IALG_Params *paramsPtr;
00251   IALG_MemRec *xdaisBufsPtr;
00252
00253   vauSizeConfig_t vauSizeCfg;
00254   vauOpenConfig_t vauOpenCfg;
00255
00256   vauXdaisInitParams_t vauXdaisInitParams;
00257
00258   vauXdaisInitParams.param.size = (Int) sizeof(vauXdaisInitParams_t);
00259
00260   printf("Querying VAU Memory Requirements\n");
00261
00262   vauSizeCfg.max_frame_size = config->frameSize;
00263   vauSizeCfg.max_sampling_rate_8k_multiple = config->samp_rate_8k_multiple;
00264
00265   if (config->xdaisFlag) {
00266     nbufs = (tint) vauXdaisCallTable.ialg.algNumAlloc();
00267     if (nbufs == 0) {
00268       printf(" algNumAlloc error, exiting\n");
00269       exit(0);
00270     }
00271
00272     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00273     if (xdaisBufsPtr == NULL) {
00274       printf("Not enough heap for VAU memory records, exiting\n");
00275       exit(0);
00276     }
00277     if (config->xdaisDefaultCfgFlag) {
00278       paramsPtr = NULL;
00279     }
00280     else {
00281       /* currently no config supported in vau for alloc, but if introduce in
00282          future, refer to that configuration */
00283       paramsPtr = NULL;
00284     }
00285     vauXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00286   }
00287   else {
00288     if (vauGetSizes(&nbufs, &sizeBufs, &vauSizeCfg) != vau_NOERR) {
00289       printf(" Vau get sizes error, exiting \n");
00290       exit(0);
00291     }
00292   }
00293
00294   printf("Allocating VAU memory..\n");
00295
00296   if (config->xdaisFlag) {
00297     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00298     siuInst.vauXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00299   }
00300   else {
00301     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00302   }
00303
00304   vauOpenCfg.frame_size = config->frameSize;
00305   vauOpenCfg.sampling_rate_8k_multiple = config->samp_rate_8k_multiple;
00306   vauOpenCfg.config = config->vauConfig;
00307
00308   if (config->xdaisFlag) {
00309     if (config->xdaisDefaultCfgFlag) {
00310       paramsPtr = NULL;
00311     }
00312     else {
00313       vauXdaisInitParams.cfgOpen = vauOpenCfg;
00314       paramsPtr = (IALG_Params *) &vauXdaisInitParams;
00315     }
00316     ret = vauXdaisCallTable.ialg.algInit(siuInst.vauXdaisInst,
00317                                    xdaisBufsPtr, NULL, paramsPtr);
00318
00319     free(xdaisBufsPtr);
00320
00321     if (ret == IALG_EFAIL) {
00322       printf("algInit() failure, exiting\n");
00323       exit(0);
00324     }
00325   }
00326   else {
00327     if (vauNew(&(siuInst.vauInst), nbufs, ecoBufs) != vau_NOERR) {
00328       printf(" Vau New error, exiting \n");
00329       exit(0);
00330     }
00331     vauOpen(siuInst.vauInst, &vauOpenCfg);
00332   }
00333
00334   if (config->xdaisFlag) {
00335     vauXdaisCallTable.control (siuInst.vauXdaisInst, &(config->vauConfig), &(config->vauControl));
00336   }
00337   else {
00338     vauControl(siuInst.vauInst, &(config->vauConfig), &(config->vauControl));
00339   }
00340 }
00341
00342 #ifdef PROFILE_CYCLES
00343 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00344 {
00345   if (cycles > cyclesPtr->max) {
00346     cyclesPtr->max = cycles;
00347   }
00348
00349   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00350 }
00351 #endif
00352
00353 #ifdef AZ_INFO_AVAILABLE
00354 extern tint glob_Az[];
00355 #endif
00356
00357 void siu_process(linSample * framePtr, linSample ** outFramePtr)
00358 {
00359   linSample *vauOutSamplesPtr = *outFramePtr;
00360   ISPHENC1_FrameType vauFrameType;
00361   tbool     vauAlertFlag = FALSE;
00362
00363 #ifdef PROFILE_CYCLES
00364   volatile tlong cycles;
00365 #endif
00366
00367 #ifdef USE_CACHE
00368   if (config.doCacheFlush) {
00369     memarchcfg_cacheFlush();
00370   }
00371 #endif
00372
00373 #ifdef PROFILE_CYCLES
00374     cycles = profile_getCPUcycleCount();
00375 #endif
00376
00377   if (config.xdaisFlag) {
00378     vauAlertFlag =
00379     vauXdaisCallTable.process(siuInst.vauXdaisInst, framePtr, &vauOutSamplesPtr,
00380                 &vauFrameType);
00381   }
00382   else {
00383     vauAlertFlag =
00384     vauProcess(siuInst.vauInst, framePtr, &vauOutSamplesPtr,
00385               &vauFrameType);
00386   }
00387
00388 #ifdef PROFILE_CYCLES
00389     cycles = (profile_getCPUcycleCount() - cycles);
00390     siu_process_cycles(cycles, &siuInst.cyclesVau);
00391     fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00392 #endif
00393
00394   /* output when something changes and on first occurrence */
00395   if ( (siuInst.frameCount == 1) || (vauFrameType != siuInst.vauFrameTypePrev) ||
00396        (vauAlertFlag != siuInst.vauAlertFlagPrev)) {
00397
00398     fprintf(siuInst.outVauDecisionFilePtr, "%ld, %d, %d\n", (long) siuInst.frameCount,
00399             vauFrameType, vauAlertFlag);
00400
00401     switch (vauFrameType) {
00402       case ISPHENC1_FTYPE_SPEECH:
00403         printf(" At frame %ld, %s, %s\n", (long) siuInst.frameCount, "SPEECH",
00404                              (vauAlertFlag == TRUE)? "ALERT ON": "ALERT OFF");
00405       break;
00406
00407       case ISPHENC1_FTYPE_NODATA:
00408         if ((siuInst.frameCount > 1) && (siuInst.vauAlertFlagPrev == FALSE)) {
00409           printf(" Noise frame arrived without a previous alert flag on SPEECH, exiting");
00410           exit(0);
00411         }
00412         else {
00413           printf(" At frame %ld, %s\n", (long) siuInst.frameCount, "NOISE");
00414         }
00415       break;
00416
00417       default:
00418         printf(" Invalid Frame Type %d\n detected, exiting", vauFrameType);
00419         exit(0);
00420       break;
00421     }
00422
00423     siuInst.vauFrameTypePrev = vauFrameType;
00424     siuInst.vauAlertFlagPrev = vauAlertFlag;
00425   }
00426
00427 #ifdef DBG
00428   fprintf(siuInst.vauDbgLogFilePtr, "%ld %ld\n", (long) gVauEnergy, (long) gVauThreshold);
00429 #endif
00430
00431   *outFramePtr = vauOutSamplesPtr;
00432 }
00433
00434 tint siu_read_inFrame(linSample * inFramePtr, tint numSamples)
00435 {
00436   int       i;
00437
00438   for (i = 0; i < numSamples; i++) {
00439     int       lsb, msb;
00440
00441     lsb = fgetc(siuInst.inFrameFilePtr);
00442     msb = fgetc(siuInst.inFrameFilePtr);
00443     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00444   }
00445
00446   if (feof(siuInst.inFrameFilePtr)) {
00447     /* silence the last frame as it could have garbage */
00448     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00449     return (0);
00450   }
00451   else {
00452     return (1);
00453   }
00454 }
00455
00456 tint siu_write_outFrame(linSample * outFramePtr, tint numSamples)
00457 {
00458   int       i;
00459
00460   for (i = 0; i < numSamples; i++) {
00461     fputc(outFramePtr[i] & 0xFF, siuInst.outFrameFilePtr);
00462     fputc(((outFramePtr[i] >> 8) & 0xFF), siuInst.outFrameFilePtr);
00463   }
00464
00465   if (feof(siuInst.outFrameFilePtr)) {
00466     return (1);
00467   }
00468   else {
00469     return (0);
00470   }
00471 }
00472
00473 void hw_init(void)
00474 {
00475 #ifdef PROFILE_CYCLES
00476   if (!profile_initCycleProfiling()) {
00477     printf("Could not acquire profiling resources..Exiting\n");
00478     exit(0);
00479   }
00480 #endif
00481
00482 #ifdef USE_CACHE
00483   if (config.doCacheEnable) {
00484     memarchcfg_cacheEnable();
00485   }
00486 #endif
00487 }
00488
00489 linSample inFrame[MAX_FRAME_SIZE], outFrame[MAX_FRAME_SIZE];
00490
00491 void main(void)
00492 {
00493   linSample *outFramePtr = outFrame;
00494
00495   printf("Version Information of modules tested:\n");
00496   printf("VAU %d.%d.%d.%d\n",
00497           ti_mas_vau_Version_MAJOR, ti_mas_vau_Version_MINOR,
00498           ti_mas_vau_Version_XVERTICAL, ti_mas_vau_Version_PATCH);
00499
00500   if (config.xdaisFlag) {
00501     printf("Using XDAIS APIs\n");
00502   }
00503   else {
00504     printf("Using ECO APIs\n");
00505   }
00506
00507   hw_init();
00508
00509   siu_open();
00510
00511   siu_new_open_config_modules(&config);
00512
00513   printf("Processing Frames..\n");
00514
00515   while (siu_read_inFrame(inFrame, config.frameSize)) {
00516     siuInst.frameCount++;
00517     siu_process(inFrame, &outFramePtr);
00518     if (siu_write_outFrame(outFramePtr, config.frameSize)) {
00519       printf(" Error writing output frame, exiting \n");
00520       exit(0);
00521     }
00522   }
00523
00524   siu_close();
00525 }
00526 /* @} */ /* ingroup */
00527
00528 /* Nothing past this point */


VEU: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_veu_Version__top__
#define | __extern extern
#define | ti_mas_veu_Version___VERS 150
#define | ti_mas_veu_Version_MAJOR (4)
#define | ti_mas_veu_Version_MINOR (3)
#define | ti_mas_veu_Version_XVERTICAL (0)
#define | ti_mas_veu_Version_PATCH (3)
#define | ti_mas_veu_Version_BUILD (1)
#define | ti_mas_veu_Version_QUALITY (3)
#define | ti_mas_veu_Version_BTYPE (0)
#define | ti_mas_veu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_veu_Version_MAJOR
#define | Version_MINOR ti_mas_veu_Version_MINOR
#define | Version_XVERTICAL ti_mas_veu_Version_XVERTICAL
#define | Version_PATCH ti_mas_veu_Version_PATCH
#define | Version_BUILD ti_mas_veu_Version_BUILD
#define | Version_QUALITY ti_mas_veu_Version_QUALITY
#define | Version_BTYPE ti_mas_veu_Version_BTYPE
#define | Version_WIDTH ti_mas_veu_Version_WIDTH

Define Documentation

#define ti_mas_veu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_veu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_veu_Version_MAJOR (4)

Definition at line 50 of file Version.h.

#define ti_mas_veu_Version_MINOR (3)

Definition at line 53 of file Version.h.

#define ti_mas_veu_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_veu_Version_PATCH (3)

Definition at line 59 of file Version.h.

#define ti_mas_veu_Version_BUILD (1)

Definition at line 62 of file Version.h.

#define ti_mas_veu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_veu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_veu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_veu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_veu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_veu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_veu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_veu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_veu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_veu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_veu_Version_WIDTH

Definition at line 97 of file Version.h.


VEU: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_veu_Version__include
00023 #define ti_mas_veu_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_veu_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_veu_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_veu_Version_MAJOR (4)
00051
00052 /* MINOR */
00053 #define ti_mas_veu_Version_MINOR (3)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_veu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_veu_Version_PATCH (3)
00060
00061 /* BUILD */
00062 #define ti_mas_veu_Version_BUILD (1)
00063
00064 /* QUALITY */
00065 #define ti_mas_veu_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_veu_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_veu_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_veu_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_veu_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_veu_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_veu_Version_MAJOR
00091 #define Version_MINOR      ti_mas_veu_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_veu_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_veu_Version_PATCH
00094 #define Version_BUILD      ti_mas_veu_Version_BUILD
00095 #define Version_QUALITY    ti_mas_veu_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_veu_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_veu_Version_WIDTH
00098 #endif


VEU: Data Structures

  • Data Structures
  • Data Fields

VEU Data Structures

Here are the data structures with brief descriptions:
veuConfig_s | Specification of VEU configuration structure Object
veuContext_s | Specification of VEU context Structure Object This structure contained information shared amongst VEU instances
veuControl_s | Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl()
veuModeControl_s | Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE
veuNewConfig_s | Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance
veuSizeConfig_s | Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context
veuStats_s | Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain


VEU: Detailed VEU Description

VEU (Voice Enhancement Unit) Package

Detailed VEU Description

Description

The Voice Enhancement Unit (VEU) is a software module that adjusts a target level to match changing background noise levels and acoustic echo, allowing the subscriber to experience a comfortable listening experience under various conditions.

The VEU component performs the following functions:

  • Adaptive Noise Reduction (ANR)
    ANR reduces the noise level and thereby improves the subjective speech quality. At the same time it doesn't corrupt the voice-band and facsimile signals. ANR can be enabled to process either or both RECVIN and SENDIN signals. ANR can be programmed to reduce the background noise level by 6dB, 12dB, 18dB or 24dB.

  • Acoustic Echo Control (AEC)
    AEC reduces the acoustic coupling of speaker to the microphone. This proves to be particularly helpful for mobile telephony.

  • Automatic Level Control (ALC)
    ALC controls the gain to drive the call towards a desired level. A weak call will be boosted to a normal range, likewise a strong call will be appropriately attenuated. ALC can be enabled to process either or both RECEIVEIN and SENDIN signals. The target level to which the call has to be driven is programmable from -24 to -9 dBm0 in steps of 3 dBm0. ALC operates on signal levels of -30 dBm0 and above.

  • Adaptive Listener Enhancement (ALE)
    A wireless phone user may find it extremely difficult to distinguish far end speech under high background noise conditions. Controlling the speaker volume doesn't prove to be of much help for the user when the background noise level is time varying . In such circumstances Adaptive Listener Enhancement (ALE) improves the voice quality.

The human ear is extremely sensitive to low-level signals, or small variations in pitch and tone. If the low-level signal is actually a delayed version of the original speech, then the effect becomes extremely noticeable and intrusive. The main factors affecting the voice quality in a wireless communication are background noise and acoustic echo.

A typical mobile call encounters varied background noise like busy street, shopping mall, quiet office, car noise etc unlike a fixed line call. Furthermore, within a given call the background noise can greatly change as the wireless phone user moves from one noise environment to another. This puts a greater challenge to provide a good voice quality wireless call under all circumstances.

Wireless standards require manufacturers to minimize the amount of coupling from the earpiece to the microphone in a mobile telephone. Many wireless phones do not meet standards, so acoustic echo contributes to speech quality problems. Acoustic echoes are not stable, however, as sound bounces off from multiple nearby surfaces, and the movement of people or objects during a phone conversation creates different, rapidly changing, acoustic echo effects. Using of hands-free kit only worsens the problem.

The Voice Enhancement Unit dynamically adjust the target level to match the changing background noise level and acoustic echo, allowing the subscriber to experience a comfortable listening under all conditions.

Typical Wireless Call


VEU:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VEU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VEU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


VEU: VEU External API

VEU (Voice Enhancement Unit) Package

VEU External API

Page Contents

  1. Complete VEU API
  2. VEU Creation Functions
  3. VEU Configuration Functions
  4. VEU Execution Functions
  5. VEU Destruction Functions
  6. VEU Return Codes

Complete VEU API

  1. veuGetSizes()
  2. veuNew()
  3. veuOpen()
  4. veuRelocate()
  5. veuControl()
  6. veuGetStats()
  7. veuSendIn()
  8. veuReceiveIn()
  9. veuClose()
  10. veuDelete()

VEU Creation Functions

VEU instance creation is a four step process. First, determine the VEU memory requirements via veuGetSize() below. Second, allocate the VEU memory buffers using any system-prescribed method. Create the VEU instance by passing the allocated buffer information to veuNew(). Finally, open the VEU instance for use via the veuOpen() API function. This process must be followed in the order given for proper operation. Once an VEU instance is opened, it may be used for voice quality enhancement.

  1. veuGetSizes()
  2. veuNew()
  3. veuOpen()

VEU Configuration Functions

The VEU component has two external API configuration routines; one to configure the instance -- veuControl(), and one to gather operational statistics -- veuGetStats(). These external API functions require an active VEU instance that has been opened according to the procedure in VEU Creation Functions above.

  1. veuControl()
  2. veuGetStats()

VEU Execution Functions

The VEU execution API consists of two routines, one per direction. The veuSendIn() API function operates on linear samples in the from-TDM-to-Network direction and the veuReceiveIn() API function operates on linear samples in the from-Network-to-TDM direction. The vueRelocate() API routine offers handling for VEU instance relocation. This routine updates all instance buffer pointers to point to the new locations, but depends on the system for actual buffer/instance movement.

The execution API functions require an active VEU instance that has been opened according to the procedure in VEU Creation Functions above.

  1. veuSendIn()
  2. veuReceiveIn()
  3. veuRelocate()

VEU Destruction Functions

VEU instance desctruction is a two step process. First, the VEU must be closed using the veuClose() API function. Once the VEU is closed it may be removed via the veuDelete() function.

Note:
  1. Once an instance has been closed, it may be re-opened via the veuOpen() routine. The instance memory should not be reallocated until the instance is deleted.

  1. veuClose()
  2. veuDelete()

VEU Return Codes

The VEU module provides various kinds of output to indicate errors in configuration and/or execution.

  • VEU Error codes


VEU: File Index

  • File List
  • Globals

VEU File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
Version.h [code] |
veu.h [code] | Voice Quality Enhancer Unit API and Data Definitions


VEU: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • alc_level : veuControl_s
  • alc_recv_level : veuConfig_s
  • alc_send_level : veuConfig_s
  • anr_level : veuConfig_s , veuControl_s
  • bit_masks : veuModeControl_s
  • bit_values : veuModeControl_s
  • bulk_delay : veuControl_s , veuConfig_s
  • config_bitfield : veuConfig_s
  • ctl_code : veuControl_s
  • exception : veuContext_s
  • fgc_gain : veuControl_s
  • fgc_recv_gain : veuConfig_s
  • fgc_send_gain : veuConfig_s
  • frame_size : veuConfig_s
  • handle : veuNewConfig_s
  • max_frame_size : veuSizeConfig_s , veuContext_s
  • mode_ctl : veuControl_s
  • recv_avg_enr : veuStats_s
  • recv_gain : veuStats_s
  • recv_noise_enr : veuStats_s
  • send_avg_enr : veuStats_s
  • send_gain : veuStats_s
  • send_noise_enr : veuStats_s
  • u : veuControl_s
  • waepl : veuControl_s , veuConfig_s


VEU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • alc_level : veuControl_s
  • alc_recv_level : veuConfig_s
  • alc_send_level : veuConfig_s
  • anr_level : veuConfig_s , veuControl_s
  • bit_masks : veuModeControl_s
  • bit_values : veuModeControl_s
  • bulk_delay : veuControl_s , veuConfig_s
  • config_bitfield : veuConfig_s
  • ctl_code : veuControl_s
  • exception : veuContext_s
  • fgc_gain : veuControl_s
  • fgc_recv_gain : veuConfig_s
  • fgc_send_gain : veuConfig_s
  • frame_size : veuConfig_s
  • handle : veuNewConfig_s
  • max_frame_size : veuSizeConfig_s , veuContext_s
  • mode_ctl : veuControl_s
  • recv_avg_enr : veuStats_s
  • recv_gain : veuStats_s
  • recv_noise_enr : veuStats_s
  • send_avg_enr : veuStats_s
  • send_gain : veuStats_s
  • send_noise_enr : veuStats_s
  • u : veuControl_s
  • waepl : veuControl_s , veuConfig_s


VEU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines
  • _
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h
  • _VEU_H : veu.h

- t -

  • ti_mas_veu_Version___VERS : Version.h
  • ti_mas_veu_Version__top__ : Version.h
  • ti_mas_veu_Version_BTYPE : Version.h
  • ti_mas_veu_Version_BUILD : Version.h
  • ti_mas_veu_Version_MAJOR : Version.h
  • ti_mas_veu_Version_MINOR : Version.h
  • ti_mas_veu_Version_PATCH : Version.h
  • ti_mas_veu_Version_QUALITY : Version.h
  • ti_mas_veu_Version_WIDTH : Version.h
  • ti_mas_veu_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h
  • veu_CTL_ALC_RECV_LEVEL : veu.h
  • veu_CTL_ALC_SEND_LEVEL : veu.h
  • veu_CTL_ANR_LEVEL : veu.h
  • veu_CTL_BULK_DELAY : veu.h
  • veu_CTL_FGC_RECV_GAIN : veu.h
  • veu_CTL_FGC_SEND_GAIN : veu.h
  • veu_CTL_MODE : veu.h
  • veu_CTL_WAEPL : veu.h
  • veu_CTLM_AEC : veu.h
  • veu_CTLM_ALC_AGGRESS : veu.h
  • veu_CTLM_ALC_FGC_RECV : veu.h
  • veu_CTLM_ALC_FGC_SEND : veu.h
  • veu_CTLM_ALC_HLC_RECV : veu.h
  • veu_CTLM_ALC_HLC_SEND : veu.h
  • veu_CTLM_ALC_RECV : veu.h
  • veu_CTLM_ALC_SEND : veu.h
  • veu_CTLM_ALE : veu.h
  • veu_CTLM_ANR_RECV : veu.h
  • veu_CTLM_ANR_SEND : veu.h
  • veu_CTLM_TONE : veu.h
  • veu_CTLM_VEU : veu.h
  • veu_CTLM_WB_RECV : veu.h
  • veu_CTLM_WB_SEND : veu.h
  • veu_ERR_BAD_BUILD : veu.h
  • veu_ERR_BAD_INST : veu.h
  • veu_ERR_BAD_PARAM : veu.h
  • veu_INFRAME_LENGTHINC : veu.h
  • veu_INFRAME_LENGTHINC_5P5 : veu.h
  • veu_INFRAME_MAXLENGTH : veu.h
  • veu_INFRAME_MAXLENGTH_5P5 : veu.h
  • veu_INFRAME_MINLENGTH : veu.h
  • veu_INFRAME_MINLENGTH_5P5 : veu.h
  • veu_NOERR : veu.h
  • veu_NOMEMORY : veu.h
  • veuClose() : veu.h
  • veuConfig_t : veu.h
  • veuContext : veu.h
  • veuContext_t : veu.h
  • veuControl() : veu.h
  • veuControl_t : veu.h
  • veuDelete() : veu.h
  • veuGetSizes() : veu.h
  • veuGetStats() : veu.h
  • veuModeControl_t : veu.h
  • veuNew() : veu.h
  • veuNewConfig_t : veu.h
  • veuOpen() : veu.h
  • veuReceiveIn() : veu.h
  • veuRelocate() : veu.h
  • veuSendIn() : veu.h
  • veuSizeConfig_t : veu.h
  • veuStats_t : veu.h


VEU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines
  • _
  • t
  • v

- _ -

  • __extern : Version.h
  • _VEU_H : veu.h

- t -

  • ti_mas_veu_Version___VERS : Version.h
  • ti_mas_veu_Version__top__ : Version.h
  • ti_mas_veu_Version_BTYPE : Version.h
  • ti_mas_veu_Version_BUILD : Version.h
  • ti_mas_veu_Version_MAJOR : Version.h
  • ti_mas_veu_Version_MINOR : Version.h
  • ti_mas_veu_Version_PATCH : Version.h
  • ti_mas_veu_Version_QUALITY : Version.h
  • ti_mas_veu_Version_WIDTH : Version.h
  • ti_mas_veu_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h
  • veu_CTL_ALC_RECV_LEVEL : veu.h
  • veu_CTL_ALC_SEND_LEVEL : veu.h
  • veu_CTL_ANR_LEVEL : veu.h
  • veu_CTL_BULK_DELAY : veu.h
  • veu_CTL_FGC_RECV_GAIN : veu.h
  • veu_CTL_FGC_SEND_GAIN : veu.h
  • veu_CTL_MODE : veu.h
  • veu_CTL_WAEPL : veu.h
  • veu_CTLM_AEC : veu.h
  • veu_CTLM_ALC_AGGRESS : veu.h
  • veu_CTLM_ALC_FGC_RECV : veu.h
  • veu_CTLM_ALC_FGC_SEND : veu.h
  • veu_CTLM_ALC_HLC_RECV : veu.h
  • veu_CTLM_ALC_HLC_SEND : veu.h
  • veu_CTLM_ALC_RECV : veu.h
  • veu_CTLM_ALC_SEND : veu.h
  • veu_CTLM_ALE : veu.h
  • veu_CTLM_ANR_RECV : veu.h
  • veu_CTLM_ANR_SEND : veu.h
  • veu_CTLM_TONE : veu.h
  • veu_CTLM_VEU : veu.h
  • veu_CTLM_WB_RECV : veu.h
  • veu_CTLM_WB_SEND : veu.h
  • veu_ERR_BAD_BUILD : veu.h
  • veu_ERR_BAD_INST : veu.h
  • veu_ERR_BAD_PARAM : veu.h
  • veu_INFRAME_LENGTHINC : veu.h
  • veu_INFRAME_LENGTHINC_5P5 : veu.h
  • veu_INFRAME_MAXLENGTH : veu.h
  • veu_INFRAME_MAXLENGTH_5P5 : veu.h
  • veu_INFRAME_MINLENGTH : veu.h
  • veu_INFRAME_MINLENGTH_5P5 : veu.h
  • veu_NOERR : veu.h
  • veu_NOMEMORY : veu.h


VEU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • veuClose() : veu.h
  • veuControl() : veu.h
  • veuDelete() : veu.h
  • veuGetSizes() : veu.h
  • veuGetStats() : veu.h
  • veuNew() : veu.h
  • veuOpen() : veu.h
  • veuReceiveIn() : veu.h
  • veuRelocate() : veu.h
  • veuSendIn() : veu.h


VEU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • veuConfig_t : veu.h
  • veuContext_t : veu.h
  • veuControl_t : veu.h
  • veuModeControl_t : veu.h
  • veuNewConfig_t : veu.h
  • veuSizeConfig_t : veu.h
  • veuStats_t : veu.h


VEU: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Defines

  • veuContext : veu.h


VEU: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


VEU: Voice Enhancement Unit

Voice Enhancement Unit

Collaboration diagram for Voice Enhancement Unit:

Detailed Description

The following figure shows the flow of the signals in and out of VEU.

Modules

Return Error Codes
VEU Control Codes
VEU Mode Control Bit Masks
Bit masks that can be used to enable/disable VEU operational modes, e.g. ALC, ANR, FGC, through veuControl() at run time or through veuOpen() at configuration time.
VEU Valid Frame Sizes
Valid frame sizes supported by VEU in units of 125-usec periods. VEU supports both 5/10 msec and 5.5/11 msec operations. Currently, VEU only supports up to 10msec/11msec frames.

Data Structures

struct | veuModeControl_s
Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE. More...
struct | veuControl_s
Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl(). More...
struct | veuSizeConfig_s
Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context. More...
struct | veuNewConfig_s
Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance. More...
struct | veuConfig_s
Specification of VEU configuration structure Object. More...
struct | veuStats_s
Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain. More...
struct | veuContext_s
Specification of VEU context Structure Object This structure contained information shared amongst VEU instances. More...

VEU (Embedded Communication Object) APIs

tint | veuGetSizes (tint *nbufs, ecomemBuffer_t **bufs, veuSizeConfig_t *cfg)
This function obtains memory requirements for an instance of VEU.
tint | veuNew (void **veuInst, tint nbufs, ecomemBuffer_t *bufs, veuNewConfig_t *cfg)
This function creates an instance of VEU and initializes the memory buffer pointers in the instance.
Remarks:
Function veuNew() must be called before veuOpen()is called.

tint | veuOpen (void *veuInst, veuConfig_t *cfg)
This function initializes and configures an VEU instance.
tint | veuControl (void *veuInst, veuControl_t *ctl)
This function controls the operations of an instance of VEU.
tint | veuGetStats (void *veuInst, veuStats_t *stats, tbool reset)
Routine which obtains VEU statistics.
tint | veuRelocate (void **veuInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
Relocates an instantiated VEU instance to another area of memory.
tint | veuSendIn (void *veuInst, void *vsend_in, void *vrecv_in, void *vsend_out, const tint *comp_table_ptr)
This function processes downlink packets from the network. This is the Voice Quality Enhancer routine responsible for Noise Reduction, Level control Listener and Enhancement in the SENDOUT direction. This routine also does signal power tracking functionality. The function operates on RECVIN and SENDIN signal frames. The processed sendout samples pointed by the send_out pointer is passed as the output of the routine. If the VEU is externally disabled via veuControl() this routine does not do any processing.
tint | veuReceiveIn (void *veuInst, void *speech_samples)
This function processes uplink packets received from the network This is the Voice Quality Enhancer routine responsible for Noise Reduction, Level control and Acoustic Echo Control in the RECVOUT direction. Function veuSendIn() does all the processing related to calculation of the recv gain, veuReceiveIn() just applies the gain to the recvout samples. The processed speech_sample samples pointed by the speech_sample pointer is passed as the output of the routine. If the VEU is externally disabled via veucontrol() this routine does not do any processing.
tint | veuClose (void *veuInst)
This function closes the VEU instance identified by veuInst. It sets the state of VEU to CLOSED.
tint | veuDelete (void **veuInst, tint nbufs, ecomemBuffer_t *bufs)
This function deletes the VEU instance identified by veuInst.
Remarks:
VEU must be closed prior to being deleted.

Typedefs

typedef veuModeControl_s | veuModeControl_t
Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE.
typedef veuControl_s | veuControl_t
Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl().
typedef veuSizeConfig_s | veuSizeConfig_t
Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context.
typedef veuNewConfig_s | veuNewConfig_t
Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance.
typedef veuConfig_s | veuConfig_t
Specification of VEU configuration structure Object.
typedef veuStats_s | veuStats_t
Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain.
typedef veuContext_s | veuContext_t
Specification of VEU context Structure Object This structure contained information shared amongst VEU instances.

Variables

veuContext_t veuContext

Typedef Documentation

typedef struct veuModeControl_s veuModeControl_t

Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE.

typedef struct veuControl_s veuControl_t

Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl().

typedef struct veuSizeConfig_s veuSizeConfig_t

Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context.

typedef struct veuNewConfig_s veuNewConfig_t

Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance.

typedef struct veuConfig_s veuConfig_t

Specification of VEU configuration structure Object.

This structure contained parameters needed to open an instance of VEU.

typedef struct veuStats_s veuStats_t

Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain.

typedef struct veuContext_s veuContext_t

Specification of VEU context Structure Object This structure contained information shared amongst VEU instances.

Function Documentation

tint veuGetSizes | ( | tint * | nbufs,
 |  | ecomemBuffer_t ** | bufs,
 |  | veuSizeConfig_t * | cfg
 | ) |  |

This function obtains memory requirements for an instance of VEU.

Parameters:
[in] | cfg | Pointer to a size configuration structure.
[out] | nbufs | Number of memory buffers stored in this address.
[out] | bufs | Address of buffer descriptors stored in this address.
Return values:
Veu Error Codes
  • veu_NOERR: successful

tint veuNew | ( | void ** | veuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | veuNewConfig_t * | cfg
 | ) |  |

This function creates an instance of VEU and initializes the memory buffer pointers in the instance.

Remarks:
Function veuNew() must be called before veuOpen()is called.

Parameters:
[in] | nbufs | Number of memory buffers
[in] | bufs | Pointer to memory buffer descriptors
[in] | cfg | Pointer to new instance configuration structure
[in,out] | veuInst | Pointer to VEU instance
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: veuInst is not NULL or nbufs is different from what is returned by veuGetSizes.
  • veu_NOMEMORY: memory buffer sizes are less than required by veuGetSizes.
Precondition:
Pointer veuInst must be set to NULL before this function is called.
Postcondition:
Pointer veuInst will be set to point to the instance buffer described by bufs.

tint veuOpen | ( | void * | veuInst,
 |  | veuConfig_t * | cfg
 | ) |  |

This function initializes and configures an VEU instance.

Parameters:
[in] | cfg | Pointer to VEU Open Configuration Structure.
[in,out] | veuInst | Pointer to VEU instance.
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: VEU is not in CLOSED state or frame_size in veuConfig_t is invalid.
  • veu_ERR_BAD_BUILD: config_bitfield in veuConfig_t enables wideband operation, but the build is narrow band.
  • veu_ERR_BAD_PARAM: parameters in veuConfig_t are invalid, but will be set to default.
Postcondition:
The instance's state will be set to OPEN.

tint veuControl | ( | void * | veuInst,
 |  | veuControl_t * | ctl
 | ) |  |

This function controls the operations of an instance of VEU.

Remarks:
This function should be called after VEU instance has been intialized with veuOpen().
Parameters:
[in] | ctl | Pointer to VEU control config structure.
[in,out] | veuInst | Pointer to VEU instance.
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: VEU is not opened yet.
  • veu_ERR_BAD_BUILD: mode_ctl in veuControl_t enables wideband operation, but the build is narrow band.
  • veu_ERR_BAD_PARAM: parameters in veuConfig_t are invalid, but will be set to default.

tint veuGetStats | ( | void * | veuInst,
 |  | veuStats_t * | stats,
 |  | tbool | reset
 | ) |  |

Routine which obtains VEU statistics.

Parameters:
[in,out] | veuInst | Pointer to VEU instance
[in] | reset | Flag indicating whether to reset statistics
[in] | stats | pointer to statistics report structure
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: VEU is not opened yet.

tint veuRelocate | ( | void ** | veuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | tuint * | relocBufBitMaskPtr
 | ) |  |

Relocates an instantiated VEU instance to another area of memory.

Parameters:
[in,out] | veuInst | Address of a pointer to VEU instance, *veuInst should be the actual instance if instance (buffer 0) is not to be relocated, otherwise, relocated value is returned.
[in] | nbufs | Max number of memory bufs
[in] | bufs | Vector of buffer descriptors
[in] | relocBufBitMaskPtr | 16-bit array of bit mask for buffers to relocate LSB is earlier buffer than MSB up to a max of nbufs bits.
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: parameter nbufs is different from what is returned by veuGetSizes.

tint veuSendIn | ( | void * | veuInst,
 |  | void * | vsend_in,
 |  | void * | vrecv_in,
 |  | void * | vsend_out,
 |  | const tint * | comp_table_ptr
 | ) |  |

This function processes downlink packets from the network. This is the Voice Quality Enhancer routine responsible for Noise Reduction, Level control Listener and Enhancement in the SENDOUT direction. This routine also does signal power tracking functionality. The function operates on RECVIN and SENDIN signal frames. The processed sendout samples pointed by the send_out pointer is passed as the output of the routine. If the VEU is externally disabled via veuControl() this routine does not do any processing.

Parameters:
[in] | vsend_in | a pointer to downlink input packet.
[in] | vrecv_in | a pointer to uplink input packet.
[in] | vsend_out | a pointer to downlink output packet.
[in] | comp_table_ptr | a pointer to a gain computation table.
[in,out] | veuInst | a pointer to VEU instance.
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: VEU is not opened yet.
Remarks:
veuReceiveIn()should be called before veuSendIn().

tint veuReceiveIn | ( | void * | veuInst,
 |  | void * | speech_samples
 | ) |  |

This function processes uplink packets received from the network This is the Voice Quality Enhancer routine responsible for Noise Reduction, Level control and Acoustic Echo Control in the RECVOUT direction. Function veuSendIn() does all the processing related to calculation of the recv gain, veuReceiveIn() just applies the gain to the recvout samples. The processed speech_sample samples pointed by the speech_sample pointer is passed as the output of the routine. If the VEU is externally disabled via veucontrol() this routine does not do any processing.

Parameters:
[in,out] | speech_samples | a pointer to the received speech samples.
[in,out] | veuInst | a pointer to VEU instance.
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: VEU is not opened yet.
Remarks:
veuReceiveIn()should be called before veuSendIn().

tint veuClose ( void * veuInst )

This function closes the VEU instance identified by veuInst. It sets the state of VEU to CLOSED.

Parameters:
[in,out] veuInst
Return values:
Veu Error Codes
  • veu_NOERR: successful

tint veuDelete | ( | void ** | veuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

This function deletes the VEU instance identified by veuInst.

Remarks:
VEU must be closed prior to being deleted.

Parameters:
[in,out] | veuInst | Pointer to VEU instance.
[in] | nbufs | number of memory buffers.
[in] | bufs | pointer to buffer descriptors
Return values:
Veu Error Codes
  • veu_NOERR: successful
  • veu_ERR_BAD_INST: VEU is not closed yet.
Postcondition:
Pointer veuInst will be set to NULL after this function is called.

Variable Documentation

veuContext_t veuContext


VEU: VEU Control Codes

VEU Control Codes
[Voice Enhancement Unit]

Collaboration diagram for VEU Control Codes:

Detailed Description

The valid control codes to do run-time control via veuControl(). They can be assigned to veuControl_s.ctl_code.

Defines

#define | veu_CTL_MODE 0
#define | veu_CTL_ANR_LEVEL 1
#define | veu_CTL_ALC_SEND_LEVEL 2
#define | veu_CTL_ALC_RECV_LEVEL 3
#define | veu_CTL_WAEPL 4
#define | veu_CTL_BULK_DELAY 5
#define | veu_CTL_FGC_SEND_GAIN 6
#define | veu_CTL_FGC_RECV_GAIN 7

Define Documentation

#define veu_CTL_MODE 0

VEU control code 0 -- to enable/disable VEU operational modes. Corresponding control parameter: veuControl_s.mode_ctl.

Definition at line 92 of file veu.h.

#define veu_CTL_ANR_LEVEL 1

VEU control code 1 -- to channge ANR level. Corresponding control parameter: veuControl_s.anr_level.

Definition at line 98 of file veu.h.

#define veu_CTL_ALC_SEND_LEVEL 2

VEU control code 2 -- to change ALC send path target level. Corresponding control parameter: veuControl_s.alc_level.

Definition at line 104 of file veu.h.

#define veu_CTL_ALC_RECV_LEVEL 3

VEU control code 3 -- to change ALC receive path target level. Corresponding control parameter: veuControl_s.alc_level.

Definition at line 110 of file veu.h.

#define veu_CTL_WAEPL 4

VEU control code 4 -- to change WAEPL. Corresponding control parameter: veuControl_s.waepl.

Definition at line 116 of file veu.h.

#define veu_CTL_BULK_DELAY 5

VEU control code 5 -- to change bulk delay. Corresponding control parameter: veuControl_s.bulk_delay.

Definition at line 122 of file veu.h.

#define veu_CTL_FGC_SEND_GAIN 6

VEU control code 6 -- to change FGC send path gain. Corresponding control parameter: veuControl_s.fgc_gain.

Definition at line 128 of file veu.h.

#define veu_CTL_FGC_RECV_GAIN 7

VEU control code 7 -- to change FGC receive path gain. Corresponding control parameter: veuControl_s.fgc_gain.

Definition at line 134 of file veu.h.


VEU: Return Error Codes

Return Error Codes
[Voice Enhancement Unit]

Collaboration diagram for Return Error Codes:

Defines

#define | veu_NOMEMORY -1
#define | veu_NOERR 0
#define | veu_ERR_BAD_INST 1
#define | veu_ERR_BAD_PARAM 2
#define | veu_ERR_BAD_BUILD 3

Define Documentation

#define veu_NOMEMORY -1

VEU return code -- Memory is not properly allocated for VEU.

Definition at line 49 of file veu.h.

#define veu_NOERR 0

VEU return code -- VEU operation/configuration is successful.

Definition at line 55 of file veu.h.

#define veu_ERR_BAD_INST 1

VEU return code -- Instantiation/de-instantiation of VEU is not accomplished.

Definition at line 62 of file veu.h.

#define veu_ERR_BAD_PARAM 2

VEU return code -- Configuration parameters for VEU are invalid.

Definition at line 68 of file veu.h.

#define veu_ERR_BAD_BUILD 3

VEU return code -- Wideband operation is requested in a narrowband build.

Definition at line 74 of file veu.h.


VEU: VEU Mode Control Bit Masks

VEU Mode Control Bit Masks
[Voice Enhancement Unit]

Collaboration diagram for VEU Mode Control Bit Masks:

Detailed Description

Bit masks that can be used to enable/disable VEU operational modes, e.g. ALC, ANR, FGC, through veuControl() at run time or through veuOpen() at configuration time.

  • For run-time control, these bit masks can be used to construct veuModeControl_s.mask and veuModeControl_s.value to enable/disable certain mode. For example, set mask to veu_CTLM_VEU | veu_CTLM_ALC_SEND to enable/ disable VEU and send path ALC without affecting any other mode. Then set value to veu_CTLM_VEU | 0 to enable VEU and disable send path ALC.

  • For configuration time initialization, these bit masks can be used to construct veuConfigParam_s.config_bitfield to indicate which modes are to be enabled and which to be disabled. For example, set config_bitfield to veu_CTLM_VEU | veu_CTLM_ALC_SEND to enable VEU and send path ALC, but disabling all other modes.

Defines

#define | veu_CTLM_VEU 0x0001
#define | veu_CTLM_ANR_SEND 0x0002
#define | veu_CTLM_ANR_RECV 0x0004
#define | veu_CTLM_ALC_HLC_SEND 0x0008
#define | veu_CTLM_ALC_FGC_SEND 0x0010
#define | veu_CTLM_ALC_SEND 0x0020
#define | veu_CTLM_ALC_HLC_RECV 0x0040
#define | veu_CTLM_ALC_FGC_RECV 0x0080
#define | veu_CTLM_ALC_RECV 0x0100
#define | veu_CTLM_AEC 0x0200
#define | veu_CTLM_ALE 0x0400
#define | veu_CTLM_ALC_AGGRESS 0x0800
#define | veu_CTLM_TONE 0x1000
#define | veu_CTLM_WB_SEND 0x2000
#define | veu_CTLM_WB_RECV 0x4000

Define Documentation

#define veu_CTLM_VEU 0x0001

Enable/disables VEU: bit value is 1: VEU is enabled; bit value is 0: VEU is disabled. Note: this bit does not enable or disable any individual operation mode, which has to be enabled or disabled by the corresponding bit.

Definition at line 160 of file veu.h.

#define veu_CTLM_ANR_SEND 0x0002

Enables/disables Noise Reduction (NR) in the SEND direction. bit value is 1: NR is enabled; bit value is 0: NR is disabled.

Definition at line 167 of file veu.h.

#define veu_CTLM_ANR_RECV 0x0004

Enables/disables Noise Reduction (NR) in the RECEIVE direction. bit value is 1: NR is enabled. bit value is 0: NR is disabled.

Definition at line 171 of file veu.h.

#define veu_CTLM_ALC_HLC_SEND 0x0008

Enables/disables High Level Control (HLC) in the SEND direction. bit value is 1: HLC is enabled. bit value is 0: HLC is disabled.

Definition at line 175 of file veu.h.

#define veu_CTLM_ALC_FGC_SEND 0x0010

Enables/disables Fix Gain Control (FGC) in the SEND direction. bit value is 1: FGC is enabled; bit value is 0: FGC is disabled.

Definition at line 179 of file veu.h.

#define veu_CTLM_ALC_SEND 0x0020

Enables/disables Automatic Level Control (ALC) in the SEND direction. bit value is 1: ALC is enabled; bit value is 0: ALC is disabled.

Definition at line 183 of file veu.h.

#define veu_CTLM_ALC_HLC_RECV 0x0040

Enables/disables High Level Control (HLC) in the RECEIVE direction. bit value is 1: HLC is enabled; bit value is 0: HLC is disabled.

Definition at line 187 of file veu.h.

#define veu_CTLM_ALC_FGC_RECV 0x0080

Enables/disables Fix Gain Control (FGC) in the RECEIVE direction. bit value is 1: FGC is enabled; bit value is 0: FGC is disabled.

Definition at line 191 of file veu.h.

#define veu_CTLM_ALC_RECV 0x0100

Enables/disables Automatic Level Control (ALC) in RECEIVE direction. bit value is 1: ALC is enabled; bit value is 0: ALC is disabled.

Definition at line 195 of file veu.h.

#define veu_CTLM_AEC 0x0200

Enables/disables Acoustic Echo Control bit value is 1: AEC is enabled; bit value is 0: AEC is disabled.

Definition at line 199 of file veu.h.

#define veu_CTLM_ALE 0x0400

Enables/disables Level Enhancement. It is available only in RECEIVE direction. For ALE to be enabled, ALC in the RECEIVE direction has to be enabled. bit value is 1: ALE is enabled; bit value is 0: ALE is disabled.

Definition at line 202 of file veu.h.

#define veu_CTLM_ALC_AGGRESS 0x0800

Specifies whether ALC is Aggressive or not. , bit value is 1: aggressive; bit value is 0: not aggressive.

Definition at line 209 of file veu.h.

#define veu_CTLM_TONE 0x1000

Specifies if tone is present. bit value is 1: tone present; bit value is 0: tone not present.

Definition at line 213 of file veu.h.

#define veu_CTLM_WB_SEND 0x2000

Specifies wide band option in SEND path. bit value is 1: wide band; bit value is 0: narrow band.

Definition at line 216 of file veu.h.

#define veu_CTLM_WB_RECV 0x4000

Specifies wide band option in RECEIVE path. bit value is 1: wide band; bit value is 0: narrow band.

Definition at line 220 of file veu.h.


VEU: VEU Valid Frame Sizes

VEU Valid Frame Sizes
[Voice Enhancement Unit]

Collaboration diagram for VEU Valid Frame Sizes:

Detailed Description

Valid frame sizes supported by VEU in units of 125-usec periods. VEU supports both 5/10 msec and 5.5/11 msec operations. Currently, VEU only supports up to 10msec/11msec frames.

Defines

#define | veu_INFRAME_MINLENGTH 40
#define | veu_INFRAME_MAXLENGTH 80
#define | veu_INFRAME_LENGTHINC 40
#define | veu_INFRAME_MINLENGTH_5P5 44
#define | veu_INFRAME_MAXLENGTH_5P5 88
#define | veu_INFRAME_LENGTHINC_5P5 44

Define Documentation

#define veu_INFRAME_MINLENGTH 40

Minimum for 5/10msec frames: 5 ms

Definition at line 234 of file veu.h.

#define veu_INFRAME_MAXLENGTH 80

Maximum for 5/10msec frames: 10 ms

Definition at line 235 of file veu.h.

#define veu_INFRAME_LENGTHINC 40

Increment for 5/10msec frames: 5ms

Definition at line 236 of file veu.h.

#define veu_INFRAME_MINLENGTH_5P5 44

Minimum for 5.5/11msec frames: 5.5 ms

Definition at line 237 of file veu.h.

#define veu_INFRAME_MAXLENGTH_5P5 88

Maximum for 5.5/11msec frames: 11 ms

Definition at line 238 of file veu.h.

#define veu_INFRAME_LENGTHINC_5P5 44

Increment for 5.5/11msec frames: 5.5ms

Definition at line 239 of file veu.h.


VEU: VEU (Voice Enhancement Unit) Package

VEU (Voice Enhancement Unit) Package

Release 4.3.3.1

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The Voice Enhancement Unit (VEU)

The Voice Enhancement Unit (VEU) is a software module that adjusts a target level to match changing background noise levels and acoustic echo, allowing the subscriber to experience a comfortable listening experience under various conditions.

Additional links: Detailed VEU Description

Integration

The VEU component can be integrated into a system to enhance the voice quality as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the VEU code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | VEU External API
 | VEU Integration

Default Configuration

The veuConfig_t structure defines the required parameters to open the VEU instance. All configuration parameters must be specified in this structure prior to opening the VEU for operation.

Performance

Performance measures for the VEU component are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

Following are limitations of the VEU component, listed by algorithm.

Automatic Noise Reduction (ANR):

  • 24dB maximum reduction
  • 6dB step size

Automatic Level Control (ALC):

  • -24 dBm0 to -9 dBm0 target range
  • 3dBm0 step size

Standards Compliance

N/A

Dependent Packages

The VEU package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

VEU Required Packages
Package | File Name | Compatibility Key
ti.mas.veu | ti_mas_veu_<fmt>_c<rtarg>_4_3_2_0.zip | [4,4,0,0]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


VEU: VEU Integration

VEU (Voice Enhancement Unit) Package

VEU Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking VEU with System
  • Initialization Structures

XDC Build Process

Required Tools

The following tools are required to build the VEU component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.00.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the VEU package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in VEU Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the VEU using the XDC tools, change to the VEU directory and proceed.

With the environment configured, XDC may be eployed to build the VEU and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the VEU packages. The first two commands provide a means to clean and build the VEU package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the VEU and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., VEU).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated VEU build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the VEU for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the VEU as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated VEU build files as in (1) above
    • Removes all generated build files for all VEU dependent packages

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking VEU with System

The VEU and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /veu
               /types
               /util

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header files must be included in any source file that references the VEU API:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/veu/veu.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., veu.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\veu\c<rtarg>\veu_c.a<rtarg>

Initialization Structures

The VEU component employs a "context" structure to define global settings for all VEU instances. This structure must be initialized at boot or anytime prior to calling any of the VEU API functions.

For more information refer to the veuContext_s documentation.


VEU: Memory Requirements

VEU (Voice Enhancement Unit) Package

Memory Requirements

Page Contents

  1. Assumptions
  2. C55x Target
    • C55x VEU Data Memory Requirements
    • C55x VEU Program Memory Requirements
  3. C64x/C64x+ Target
    • C64x/C64x+ VEU Data Memory Requirements
    • C64x VEU Program Memory Requirements
    • C64x+ VEU Program Memory Requirements

Assumptions

The data memory numbers provided here were gathered for the VEU configured with the following configuration:

  1. Maximum frame size of 10ms (80/160 samples)

C55x Target

C55x VEU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) | Scratch/Dedicated
0 | 8 | TBD | Dedicated
1 | 1 | TBD | Dedicated

Additional Data Memory
Category/Structure | Requirement (Bytes)
Tables | TBD
data/bss | TBD
veuContext | TBD

C55x VEU Program Memory Requirements

C55x VEU Program Memory Requirements
Section | Size | Placement | Description
.text | TBD Kbyte | Internal | Core VEU code
.switch | TBD Byte | Internal | Switch tables
Total | TBD Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x/C64x+ Target

C64x/C64x+ VEU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) | Scratch/Dedicated
0 | 8 | 184 | Dedicated
1 | 1 | 320 | Dedicated

Additional Data Memory
Category/Structure | Requirement (Bytes)
Tables | 182
data/bss | 32
veuContext | 8

C64x VEU Program Memory Requirements

C64x VEU Program Memory Requirements
Section | Size | Placement | Description
.text | 12.8 Kbyte | Internal | Core VEU code
.switch | 196 Byte | Internal | Switch tables
Total | 13.0 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C64x+ VEU Program Memory Requirements

C64x VEU Program Memory Requirements
Section | Size | Placement | Description
.text | 10.9 Kbyte | Internal | Core VEU code
.switch | 196 Byte | Internal | Switch tables
Total | 11.1 Kbyte | N/A | N/A

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.


VEU: MIPS Requirements

VEU (Voice Enhancement Unit) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target

Assumptions

We profiled the MIPS for both send and receive direction processing ender the conditions outlined below:

  1. All tests are performed with 5ms frames.
  2. Program memory, stack and I/O buffers all in internal memory.
  3. L1 and L2 cache invalidated after every 5ms frame.

C55x Target

VEU MIPS - C55x
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | TBD | TBD
veuReceiveIn() | TBD | TBD

C64x Target

VEU MIPS - C64x
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | TBD | TBD
veuReceiveIn() | TBD | TBD

C64x+ Target

VEU MIPS - C64x+
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | 0.10 | 0.15
veuReceiveIn() | 0.58 | 0.80


VEU: Module Index

VEU Modules

Here is a list of all modules:
  • Voice Enhancement Unit
    • Return Error Codes
    • VEU Control Codes
    • VEU Mode Control Bit Masks
    • VEU Valid Frame Sizes


VEU: Page Index

VEU Related Pages

Here is a list of all related documentation pages:
  • Disclaimer


VEU: veuConfig_s Struct Reference

  • Data Structures
  • Data Fields

veuConfig_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Detailed Description

Specification of VEU configuration structure Object.

This structure contained parameters needed to open an instance of VEU.

Definition at line 332 of file veu.h.

Data Fields

tint | config_bitfield
tint | frame_size
tint | anr_level
tint | alc_send_level
tint | alc_recv_level
tint | bulk_delay
Fract | waepl
Fract | fgc_send_gain
Fract | fgc_recv_gain

Field Documentation

tint veuConfig_s::config_bitfield

Configuration bitfield that enables/disables VEU operation modes. Meaning of each bit is the same as that explained in VEU Mode Control Bit Masks.

Definition at line 333 of file veu.h.

tint veuConfig_s::frame_size

Frame size in 125-usec periods. Valid frame sizes are specified by VEU Valid Frame Sizes.

Definition at line 336 of file veu.h.

tint veuConfig_s::anr_level

refer to veuControl_s.anr_level

Definition at line 338 of file veu.h.

tint veuConfig_s::alc_send_level

refer to veuControl_s.alc_level

Definition at line 339 of file veu.h.

tint veuConfig_s::alc_recv_level

refer to veuControl_s.alc_level

Definition at line 340 of file veu.h.

tint veuConfig_s::bulk_delay

refer to veuControl_s.bulk_delay

Definition at line 341 of file veu.h.

Fract veuConfig_s::waepl

refer to veuControl_s.waepl

Definition at line 342 of file veu.h.

Fract veuConfig_s::fgc_send_gain

refer to veuControl_s.fgc_gain

Definition at line 343 of file veu.h.

Fract veuConfig_s::fgc_recv_gain

refer to veuControl_s.fgc_gain

Definition at line 344 of file veu.h.

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veuContext_s Struct Reference

  • Data Structures
  • Data Fields

veuContext_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Detailed Description

Specification of VEU context Structure Object This structure contained information shared amongst VEU instances.

Definition at line 372 of file veu.h.

Data Fields

dbgInfo_t | exception
For exception handling.
tint | max_frame_size
Maximum frame size in units of 125-usec periods. Valid frame sizes are specified by VEU Valid Frame Sizes.

Field Documentation

dbgInfo_t veuContext_s::exception

For exception handling.

Function pointer used for exception handling. Type dbgInfo_t is defined in debug.h of util package: typedef void (*dbgInfo_t)(void *, tuint, tuint, tuint, tuint*). When VEU calls this function, it passes the following information through function arguments (from left to right):

  • void * handle: VEU instance handle provided in veuNewConfig_s;
  • tuint dbgMsg : debugging message, either dbg_WARNING or dbg_TRACE_INFO, defined in util\debug.h.
  • tuint dbgCode: debugging code.
    • warning code when dbgMsg is dbg_WARNING. See VEU documentation for warning codes.
    • data tracing code when dbgMsg is dbg_TRACE_INFO. Currently, VEU doesn't have data tracing.
  • tuint dbgSize: size of VEU tracing data per call.
  • tuint *dbgData: location where VEU tracing data is stored.

Definition at line 374 of file veu.h.

tint veuContext_s::max_frame_size

Maximum frame size in units of 125-usec periods. Valid frame sizes are specified by VEU Valid Frame Sizes.

Definition at line 392 of file veu.h.

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veuControl_s Struct Reference

  • Data Structures
  • Data Fields

veuControl_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Collaboration diagram for veuControl_s:

[legend]

Detailed Description

Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl().

Definition at line 260 of file veu.h.

Data Fields

tint ctl_code
Control code specifying the veu configuration to be controlled. Refer VEU Control Codes for valid control codes.
union {
veuModeControl_t mode_ctl
VEU mode control, which applies when ctl_code is veu_CTL_MODE. The modes to be enabled/disabled by this control code are defined by VeuModeControlMask.
tint anr_level
Adaptive noise reduction level, which applies when ctl_code is veu_CTL_ANR_LEVEL. This parameter takes only 4 possible values: 6, 12, 18, 24. If it is given any other value, it will be set to default 12. The unit of this parameter is dB.
tint alc_level
Automatic level control target level, which applies when ctl_code is veu_CTL_ALC_SEND_LEVEL or veu_CTL_ALC_RECV_LEVEL. This parameter takes only 6 possible values: -9, -12, -15, -18, -21, -24. If given any other value, it will be set to -15. The unit of this parameter is dBm0.
tint bulk_delay
Bulk delay, which applies when ctl_code is veu_CTL_BULK_DELAY. This parameter takes value from 0 to 270, in steps of 18. If it is given a value above 270, it will be set to 270. If the value is not a multiple of 18, it will be rounded to next multiple of 18. The recommended value is 160msec. The unit is msec.
tint waepl
Worst Acoustic Echo Path Loss, which applies when ctl_code is veu_CTL_WAEPL. This parameter takes value from 24 to 45, in steps of 3. If the given value is smaller than 24, it will be set to 24. If the given value is larger than 45, it will be set to 45. If the value is not a multiple of 3, it will be rounded to next multiple of 3. The unit is dB. Recommended is 36dB.
tint fgc_gain
Fixed gain control, applies when ctl_code is veu_CTL_FGC_SEND_GAIN or veu_CTL_FGC_RECV_GAIN. This parameter takes only 9 possible values, from -12 to 12 in steps of 3. If it is given any other value, it will be set to default 0. The unit is dB.
} u

Field Documentation

tint veuControl_s::ctl_code

Control code specifying the veu configuration to be controlled. Refer VEU Control Codes for valid control codes.

Definition at line 263 of file veu.h.

veuModeControl_t veuControl_s::mode_ctl

VEU mode control, which applies when ctl_code is veu_CTL_MODE. The modes to be enabled/disabled by this control code are defined by VeuModeControlMask.

Definition at line 268 of file veu.h.

tint veuControl_s::anr_level

Adaptive noise reduction level, which applies when ctl_code is veu_CTL_ANR_LEVEL. This parameter takes only 4 possible values: 6, 12, 18, 24. If it is given any other value, it will be set to default 12. The unit of this parameter is dB.

Definition at line 274 of file veu.h.

tint veuControl_s::alc_level

Automatic level control target level, which applies when ctl_code is veu_CTL_ALC_SEND_LEVEL or veu_CTL_ALC_RECV_LEVEL. This parameter takes only 6 possible values: -9, -12, -15, -18, -21, -24. If given any other value, it will be set to -15. The unit of this parameter is dBm0.

Definition at line 281 of file veu.h.

tint veuControl_s::bulk_delay

Bulk delay, which applies when ctl_code is veu_CTL_BULK_DELAY. This parameter takes value from 0 to 270, in steps of 18. If it is given a value above 270, it will be set to 270. If the value is not a multiple of 18, it will be rounded to next multiple of 18. The recommended value is 160msec. The unit is msec.

Definition at line 289 of file veu.h.

tint veuControl_s::waepl

Worst Acoustic Echo Path Loss, which applies when ctl_code is veu_CTL_WAEPL. This parameter takes value from 24 to 45, in steps of 3. If the given value is smaller than 24, it will be set to 24. If the given value is larger than 45, it will be set to 45. If the value is not a multiple of 3, it will be rounded to next multiple of 3. The unit is dB. Recommended is 36dB.

Definition at line 297 of file veu.h.

tint veuControl_s::fgc_gain

Fixed gain control, applies when ctl_code is veu_CTL_FGC_SEND_GAIN or veu_CTL_FGC_RECV_GAIN. This parameter takes only 9 possible values, from -12 to 12 in steps of 3. If it is given any other value, it will be set to default 0. The unit is dB.

Definition at line 303 of file veu.h.

union { ... } veuControl_s::u

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veuModeControl_s Struct Reference

  • Data Structures
  • Data Fields

veuModeControl_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Detailed Description

Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE.

Definition at line 249 of file veu.h.

Data Fields

tuint | bit_masks
tuint | bit_values

Field Documentation

tuint veuModeControl_s::bit_masks

specifies which modes are to be enabled/disabled, constructed by VeuModeControlMask.

Definition at line 250 of file veu.h.

tuint veuModeControl_s::bit_values

specifies the new value of each bit indicated by the bit masks of veuModeControl_s:mask.

Definition at line 252 of file veu.h.

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veuNewConfig_s Struct Reference

  • Data Structures
  • Data Fields

veuNewConfig_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Detailed Description

Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance.

Definition at line 320 of file veu.h.

Data Fields

void * handle

Field Documentation

void* veuNewConfig_s::handle

system handle used by veuContext_s:exception

Definition at line 321 of file veu.h.

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veuSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

veuSizeConfig_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Detailed Description

Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context.

Definition at line 312 of file veu.h.

Data Fields

tint max_frame_size

Field Documentation

tint veuSizeConfig_s::max_frame_size

max Frame size

Definition at line 313 of file veu.h.

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veuStats_s Struct Reference

  • Data Structures
  • Data Fields

veuStats_s Struct Reference
[Voice Enhancement Unit]

#include <veu.h>

Detailed Description

Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain.

Definition at line 352 of file veu.h.

Data Fields

Fract | send_gain
Gain that is being applied by the VEU to Send signal.
Fract | send_noise_enr
Noise Energy in the SEND Direction.
Fract | send_avg_enr
Average Energy in the SEND Direction.
Fract | recv_gain
Gain that is being applied by the VEU to Send signal.
Fract | recv_noise_enr
Noise Energy in the RECV Direction.
Fract | recv_avg_enr
Average Energy in the RECV Direction.

Field Documentation

Fract veuStats_s::send_gain

Gain that is being applied by the VEU to Send signal.

Definition at line 354 of file veu.h.

Fract veuStats_s::send_noise_enr

Noise Energy in the SEND Direction.

Definition at line 356 of file veu.h.

Fract veuStats_s::send_avg_enr

Average Energy in the SEND Direction.

Definition at line 358 of file veu.h.

Fract veuStats_s::recv_gain

Gain that is being applied by the VEU to Send signal.

Definition at line 360 of file veu.h.

Fract veuStats_s::recv_noise_enr

Noise Energy in the RECV Direction.

Definition at line 362 of file veu.h.

Fract veuStats_s::recv_avg_enr

Average Energy in the RECV Direction.

Definition at line 364 of file veu.h.

The documentation for this struct was generated from the following file:
  • veu.h


VEU: veu.h File Reference

  • File List
  • Globals

veu.h File Reference

Detailed Description

Voice Quality Enhancer Unit API and Data Definitions.

path /dsps_gtmas/ti/mas/veu/veu.h

============================================================================ Copyright (c) Texas Instruments Incorporated 1999-2009

Use of this software is controlled by the terms and conditions found in the license agreement under which this software has been supplied or provided. ============================================================================

Definition in file veu.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/debug.h>

Include dependency graph for veu.h:

Go to the source code of this file.

Data Structures

struct | veuModeControl_s
Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE. More...
struct | veuControl_s
Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl(). More...
struct | veuSizeConfig_s
Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context. More...
struct | veuNewConfig_s
Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance. More...
struct | veuConfig_s
Specification of VEU configuration structure Object. More...
struct | veuStats_s
Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain. More...
struct | veuContext_s
Specification of VEU context Structure Object This structure contained information shared amongst VEU instances. More...

Defines

#define | _VEU_H
#define | veu_NOMEMORY -1
#define | veu_NOERR 0
#define | veu_ERR_BAD_INST 1
#define | veu_ERR_BAD_PARAM 2
#define | veu_ERR_BAD_BUILD 3
#define | veu_CTL_MODE 0
#define | veu_CTL_ANR_LEVEL 1
#define | veu_CTL_ALC_SEND_LEVEL 2
#define | veu_CTL_ALC_RECV_LEVEL 3
#define | veu_CTL_WAEPL 4
#define | veu_CTL_BULK_DELAY 5
#define | veu_CTL_FGC_SEND_GAIN 6
#define | veu_CTL_FGC_RECV_GAIN 7
#define | veu_CTLM_VEU 0x0001
#define | veu_CTLM_ANR_SEND 0x0002
#define | veu_CTLM_ANR_RECV 0x0004
#define | veu_CTLM_ALC_HLC_SEND 0x0008
#define | veu_CTLM_ALC_FGC_SEND 0x0010
#define | veu_CTLM_ALC_SEND 0x0020
#define | veu_CTLM_ALC_HLC_RECV 0x0040
#define | veu_CTLM_ALC_FGC_RECV 0x0080
#define | veu_CTLM_ALC_RECV 0x0100
#define | veu_CTLM_AEC 0x0200
#define | veu_CTLM_ALE 0x0400
#define | veu_CTLM_ALC_AGGRESS 0x0800
#define | veu_CTLM_TONE 0x1000
#define | veu_CTLM_WB_SEND 0x2000
#define | veu_CTLM_WB_RECV 0x4000
#define | veu_INFRAME_MINLENGTH 40
#define | veu_INFRAME_MAXLENGTH 80
#define | veu_INFRAME_LENGTHINC 40
#define | veu_INFRAME_MINLENGTH_5P5 44
#define | veu_INFRAME_MAXLENGTH_5P5 88
#define | veu_INFRAME_LENGTHINC_5P5 44

Typedefs

typedef veuModeControl_s | veuModeControl_t
Specification of VEU Mode Control structure. This structure is used to enable/disable various VEU operational modes through veuControl() according to control code veu_CTL_MODE.
typedef veuControl_s | veuControl_t
Specification of VEU Control structure Object. This structure contains parameters required for calls to veuControl().
typedef veuSizeConfig_s | veuSizeConfig_t
Specification of Size configuration structure Object. This structure defined as void. All prior variables are in context.
typedef veuNewConfig_s | veuNewConfig_t
Specification of Creation configuration structure Object. This structure contains parameters needed at the creation of an VEU instance.
typedef veuConfig_s | veuConfig_t
Specification of VEU configuration structure Object.
typedef veuStats_s | veuStats_t
Specification of VEU statistics Object This structure contained parameters that indicate VEU performance. send/recv avg signal energy, send/recv noise energy and send/recv path gain.
typedef veuContext_s | veuContext_t
Specification of VEU context Structure Object This structure contained information shared amongst VEU instances.

Functions

VEU (Embedded Communication Object) APIs
tint | veuGetSizes (tint *nbufs, ecomemBuffer_t **bufs, veuSizeConfig_t *cfg)
This function obtains memory requirements for an instance of VEU.
tint | veuNew (void **veuInst, tint nbufs, ecomemBuffer_t *bufs, veuNewConfig_t *cfg)
This function creates an instance of VEU and initializes the memory buffer pointers in the instance.
Remarks:
Function veuNew() must be called before veuOpen()is called.

tint | veuOpen (void *veuInst, veuConfig_t *cfg)
This function initializes and configures an VEU instance.
tint | veuControl (void *veuInst, veuControl_t *ctl)
This function controls the operations of an instance of VEU.
tint | veuGetStats (void *veuInst, veuStats_t *stats, tbool reset)
Routine which obtains VEU statistics.
tint | veuRelocate (void **veuInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
Relocates an instantiated VEU instance to another area of memory.
tint | veuSendIn (void *veuInst, void *vsend_in, void *vrecv_in, void *vsend_out, const tint *comp_table_ptr)
This function processes downlink packets from the network. This is the Voice Quality Enhancer routine responsible for Noise Reduction, Level control Listener and Enhancement in the SENDOUT direction. This routine also does signal power tracking functionality. The function operates on RECVIN and SENDIN signal frames. The processed sendout samples pointed by the send_out pointer is passed as the output of the routine. If the VEU is externally disabled via veuControl() this routine does not do any processing.
tint | veuReceiveIn (void *veuInst, void *speech_samples)
This function processes uplink packets received from the network This is the Voice Quality Enhancer routine responsible for Noise Reduction, Level control and Acoustic Echo Control in the RECVOUT direction. Function veuSendIn() does all the processing related to calculation of the recv gain, veuReceiveIn() just applies the gain to the recvout samples. The processed speech_sample samples pointed by the speech_sample pointer is passed as the output of the routine. If the VEU is externally disabled via veucontrol() this routine does not do any processing.
tint | veuClose (void *veuInst)
This function closes the VEU instance identified by veuInst. It sets the state of VEU to CLOSED.
tint | veuDelete (void **veuInst, tint nbufs, ecomemBuffer_t *bufs)
This function deletes the VEU instance identified by veuInst.
Remarks:
VEU must be closed prior to being deleted.

Variables

veuContext_t veuContext

Define Documentation

#define _VEU_H

Definition at line 2 of file veu.h.


VEU: veu.h Source File

  • File List
  • Globals

veu.h

Go to the documentation of this file.
00001 #ifndef _VEU_H   /*_VEU_H */
00002 #define _VEU_H   /*_VEU_H     */
00003
00004 /* ========================================================================== */
00020 /* System level header files */
00021 #include <ti/mas/types/types.h>
00022
00023 /* Memory management definitions */
00024 #include <ti/mas/util/ecomem.h>
00025
00026 /* debug */
00027 #include <ti/mas/util/debug.h>
00028
00037 /* @{ */
00038
00043 /* @{ */
00044
00049 #define veu_NOMEMORY  -1
00050
00055 #define veu_NOERR     0
00056
00062 #define veu_ERR_BAD_INST     1
00063
00068 #define veu_ERR_BAD_PARAM     2
00069
00074 #define veu_ERR_BAD_BUILD     3
00075
00076 /* @} */ /* ingroup VeuErrorCodes */
00077
00078
00085 /* @{ */
00086
00092 #define  veu_CTL_MODE            0
00093
00098 #define  veu_CTL_ANR_LEVEL       1
00099
00104 #define  veu_CTL_ALC_SEND_LEVEL  2
00105
00110 #define  veu_CTL_ALC_RECV_LEVEL  3
00111
00116 #define  veu_CTL_WAEPL          4
00117
00122 #define  veu_CTL_BULK_DELAY     5
00123
00128 #define  veu_CTL_FGC_SEND_GAIN  6
00129
00134 #define  veu_CTL_FGC_RECV_GAIN  7
00135
00136 /* @} */ /* ingroup */
00137
00138
00159 /* @{ */
00160 #define veu_CTLM_VEU          0x0001
00167 #define veu_CTLM_ANR_SEND     0x0002
00171 #define veu_CTLM_ANR_RECV     0x0004
00175 #define veu_CTLM_ALC_HLC_SEND 0x0008
00179 #define veu_CTLM_ALC_FGC_SEND 0x0010
00183 #define veu_CTLM_ALC_SEND     0x0020
00187 #define veu_CTLM_ALC_HLC_RECV 0x0040
00191 #define veu_CTLM_ALC_FGC_RECV 0x0080
00195 #define veu_CTLM_ALC_RECV     0x0100
00199 #define veu_CTLM_AEC          0x0200
00202 #define veu_CTLM_ALE          0x0400
00209 #define veu_CTLM_ALC_AGGRESS  0x0800
00213 #define veu_CTLM_TONE         0x1000
00216 #define veu_CTLM_WB_SEND      0x2000
00220 #define veu_CTLM_WB_RECV      0x4000
00224 /* @} */ /* ingroup */
00225
00233 /* @{ */
00234 #define veu_INFRAME_MINLENGTH      40
00235 #define veu_INFRAME_MAXLENGTH      80
00236 #define veu_INFRAME_LENGTHINC      40
00237 #define veu_INFRAME_MINLENGTH_5P5  44
00238 #define veu_INFRAME_MAXLENGTH_5P5  88
00239 #define veu_INFRAME_LENGTHINC_5P5  44
00240 /* @} */ /* ingroup */
00241
00249 typedef struct veuModeControl_s{
00250   tuint bit_masks;
00252   tuint bit_values;
00254 } veuModeControl_t;
00255
00260 typedef struct veuControl_s{
00263   tint  ctl_code;
00264   union {
00268     veuModeControl_t  mode_ctl;
00269
00274     tint  anr_level;
00275
00281     tint  alc_level;
00282
00289     tint  bulk_delay;
00290
00297     tint  waepl;
00298
00303     tint  fgc_gain;
00304
00305   } u;
00306 } veuControl_t;
00307
00312 typedef struct veuSizeConfig_s{
00313   tint  max_frame_size;
00314 } veuSizeConfig_t;
00315
00320 typedef struct veuNewConfig_s{
00321   void *handle;
00322 } veuNewConfig_t;
00323
00332 typedef struct veuConfig_s{
00333   tint  config_bitfield;
00336   tint  frame_size;
00338   tint  anr_level;
00339   tint  alc_send_level;
00340   tint  alc_recv_level;
00341   tint  bulk_delay;
00342   Fract waepl;
00343   Fract fgc_send_gain;
00344   Fract fgc_recv_gain;
00345 } veuConfig_t;
00346
00352 typedef struct veuStats_s{
00354   Fract  send_gain;
00356   Fract  send_noise_enr;
00358   Fract  send_avg_enr;
00360   Fract  recv_gain;
00362   Fract  recv_noise_enr;
00364   Fract  recv_avg_enr;
00365 } veuStats_t;
00366
00367
00372 typedef struct veuContext_s{
00374   dbgInfo_t exception;
00392   tint max_frame_size;
00393 } veuContext_t;
00394
00395 /* VEU context */
00396 extern veuContext_t veuContext;
00397
00402
00412 tint  veuGetSizes (tint *nbufs, ecomemBuffer_t **bufs, veuSizeConfig_t *cfg);
00413
00433 tint  veuNew (void **veuInst, tint nbufs, ecomemBuffer_t *bufs,
00434               veuNewConfig_t *cfg);
00435
00454 tint  veuOpen (void *veuInst, veuConfig_t *cfg);
00455
00473 tint  veuControl        (void *veuInst, veuControl_t *ctl);
00474
00485 tint  veuGetStats  (void *veuInst, veuStats_t *stats, tbool reset);
00486
00504 tint  veuRelocate (void **veuInst, tint nbufs, ecomemBuffer_t *bufs,
00505                    tuint *relocBufBitMaskPtr);
00506
00529 tint  veuSendIn     (void *veuInst, void *vsend_in, void *vrecv_in,
00530                      void *vsend_out, const tint *comp_table_ptr);
00531
00550 tint  veuReceiveIn (void *veuInst, void *speech_samples);
00551
00560 tint  veuClose (void *veuInst);
00561
00575 tint  veuDelete (void **veuInst, tint nbufs, ecomemBuffer_t *bufs);
00576  /* @name ECO APIs */
00578
00579 /* @} */ /* @ingroup VEU */
00580
00581 #endif /* _VEU_H */
00582 /* nothing past this point */


VEU Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

  1. Set a breakpoint the last line of code in veusim.c (loop;)
  2. Run and let the simulation halt at the breakpoint.
  3. Simulation will produce output vector files in the veu\test\vectors\out\ directory.
  4. Compare veu\test\vectors\out\ with veu\test\vectors\refout\ for bit-exactness.

Notes:
  1. The narrowband (8 KHz) image name will start with test_rel
  2. The wideband (16 KHz) image name will start with test_rel16


VEU Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VEU Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VEU Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


VEU Test: File Index

  • File List
  • Globals

VEU Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
veusim.c [code] Main program and supporting routines for the simulation of VEU


VEU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines
  • f
  • h
  • i
  • l
  • m
  • n
  • o
  • s
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- f -

  • FRAME_SIZE : veusim.c

- h -

  • heapBuf : veusim.c
  • hw_init() : veusim.c

- i -

  • INPUT_TX_LIST_FILE : veusim.c
  • inputFile : veusim.c
  • inputFile_Rx : veusim.c
  • inputFileName_Rx : veusim.c
  • inputFileName_Tx : veusim.c
  • inputRxlistFile : veusim.c
  • inputTxlistFile : veusim.c
  • inputVEUFile : veusim.c
  • inputVEUlistFile : veusim.c
  • inputVEUsetting : veusim.c

- l -

  • loop : veusim.c

- m -

  • main() : veusim.c
  • MAX_NUM_SAMPLES_PER_FRAME : veusim.c

- n -

  • NUMBER_OF_FRAMES : veusim.h

- o -

  • outputFile : veusim.c
  • outputFile_Rx : veusim.c
  • outputFileName_Rx : veusim.c
  • outputFileName_Tx : veusim.c
  • outputRxlistFile : veusim.c
  • outputTxlistFile : veusim.c

- s -

  • sample_cnt : veusim.c
  • second_cnt : veusim.c

- v -

  • veu_sim_progress() : veusim.c
  • VEU_SIM_SAMPLES_PER_SECOND : veusim.c
  • veuContext : veusim.c
  • veuCtrl : veusim.c
  • veuInst : veusim.c
  • veusim_control_veu() : veusim.h , veusim.c
  • veusim_get_file() : veusim.c
  • veusim_get_frame_size() : veusim.c
  • VEUSIM_HEAP_SIZE : veusim.h
  • veusim_init_testvector() : veusim.c , veusim.h
  • veusim_new_veu() : veusim.h , veusim.c
  • veusim_open_filelist() : veusim.c
  • veusim_open_veu() : veusim.h , veusim.c
  • veusim_param_veu() : veusim.h
  • veusim_read_frame() : veusim.c , veusim.h
  • veusim_release_testvector() : veusim.c , veusim.h
  • veusim_write_frame() : veusim.c


VEU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines

  • FRAME_SIZE : veusim.c
  • INPUT_TX_LIST_FILE : veusim.c
  • loop : veusim.c
  • MAX_NUM_SAMPLES_PER_FRAME : veusim.c
  • NUMBER_OF_FRAMES : veusim.h
  • VEU_SIM_SAMPLES_PER_SECOND : veusim.c
  • VEUSIM_HEAP_SIZE : veusim.h


VEU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines

  • hw_init() : veusim.c
  • main() : veusim.c
  • veu_sim_progress() : veusim.c
  • veusim_control_veu() : veusim.c , veusim.h
  • veusim_get_file() : veusim.c
  • veusim_get_frame_size() : veusim.c
  • veusim_init_testvector() : veusim.h , veusim.c
  • veusim_new_veu() : veusim.c , veusim.h
  • veusim_open_filelist() : veusim.c
  • veusim_open_veu() : veusim.h , veusim.c
  • veusim_param_veu() : veusim.h
  • veusim_read_frame() : veusim.c , veusim.h
  • veusim_release_testvector() : veusim.c , veusim.h
  • veusim_write_frame() : veusim.c


VEU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Defines

  • heapBuf : veusim.c
  • inputFile : veusim.c
  • inputFile_Rx : veusim.c
  • inputFileName_Rx : veusim.c
  • inputFileName_Tx : veusim.c
  • inputRxlistFile : veusim.c
  • inputTxlistFile : veusim.c
  • inputVEUFile : veusim.c
  • inputVEUlistFile : veusim.c
  • inputVEUsetting : veusim.c
  • outputFile : veusim.c
  • outputFile_Rx : veusim.c
  • outputFileName_Rx : veusim.c
  • outputFileName_Tx : veusim.c
  • outputRxlistFile : veusim.c
  • outputTxlistFile : veusim.c
  • sample_cnt : veusim.c
  • second_cnt : veusim.c
  • veuContext : veusim.c
  • veuCtrl : veusim.c
  • veuInst : veusim.c


VEU Test: VEUTEST

VEUTEST

Detailed Description

Defines

#define | loop for(;;)
#define | FRAME_SIZE 80
#define | MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)
#define | INPUT_TX_LIST_FILE "..//..//inp_list_file_8k.txt"
#define | VEU_SIM_SAMPLES_PER_SECOND 8000

Functions

void | veusim_open_filelist ()
: Open the file which contains list of files to be processed
void | veusim_get_file ()
: Get a set of file-names to be processed
void | veusim_init_testvector ()
: Initialize test vectors Open input files to be read, create output files to be write, and open the corresponding VQE configuration file. % All input files and output files need to be in little-endian binary format
void | veusim_release_testvector ()
: release test vectors / close file handles
tint | veusim_read_frame (linSample *inBuf, FILE *inFile, tint frmSize)
: Read a frame of signal from the input file
tint | veusim_write_frame (tint *outBuf, FILE *outFile, tint frmSize)
: Write a frame of signal to the output file
void | veusim_get_frame_size (tint *frmSize)
: Read frame size setting (in sample unit for 8KHz sampling rate) % from the VQE configuration file
void | veusim_new_veu ()
: create a veu instance in unit test wrapper
void | veusim_open_veu (tint frame_size)
: open a veu instance in unit test wrapper
void | veusim_control_veu (void *veuInst, veuControl_t *ctl, tint *frmSize_send, tint *frmSize_recv)
: Configure a veu instance in unit test wrapper
void | hw_init (void)
void | veu_sim_progress (tint frame_size)
void | main (void)
: Main program in unit test wrapper

Variables

tword | heapBuf [VEUSIM_HEAP_SIZE]
FILE * | inputFile
FILE * | inputFile_Rx
FILE * | outputFile
FILE * | outputFile_Rx
FILE * | inputVEUFile
FILE * | inputTxlistFile
FILE * | inputRxlistFile
FILE * | outputTxlistFile
FILE * | outputRxlistFile
FILE * | inputVEUlistFile
char | inputFileName_Tx [100]
char | inputFileName_Rx [100]
char | outputFileName_Tx [100]
char | outputFileName_Rx [100]
char | inputVEUsetting [100]
tlong | sample_cnt
tuint | second_cnt
void * | veuInst
veuControl_t | veuCtrl
veuContext_t | veuContext

Define Documentation

#define loop for(;;)

Definition at line 34 of file veusim.c.

Referenced by main().

#define FRAME_SIZE 80

Definition at line 60 of file veusim.c.

Referenced by main().

#define MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)

Definition at line 63 of file veusim.c.

Referenced by main(), veusim_new_veu(), and veusim_write_frame().

#define INPUT_TX_LIST_FILE "..//..//inp_list_file_8k.txt"

Definition at line 69 of file veusim.c.

Referenced by veusim_open_filelist().

#define VEU_SIM_SAMPLES_PER_SECOND 8000

Definition at line 86 of file veusim.c.

Referenced by veu_sim_progress().

Function Documentation

void veusim_open_filelist ( )

: Open the file which contains list of files to be processed

Definition at line 100 of file veusim.c.

References INPUT_TX_LIST_FILE, and inputTxlistFile.

Referenced by main().

void veusim_get_file ( )

: Get a set of file-names to be processed

Definition at line 109 of file veusim.c.

References inputFileName_Rx, inputFileName_Tx, inputTxlistFile, inputVEUsetting, outputFileName_Rx, and outputFileName_Tx.

Referenced by main().

void veusim_init_testvector ( )

: Initialize test vectors Open input files to be read, create output files to be write, and open the corresponding VQE configuration file. % All input files and output files need to be in little-endian binary format

Definition at line 125 of file veusim.c.

References inputFile, inputFile_Rx, inputFileName_Rx, inputFileName_Tx, inputVEUFile, inputVEUsetting, outputFile, outputFile_Rx, outputFileName_Rx, and outputFileName_Tx.

Referenced by main().

void veusim_release_testvector ( )

: release test vectors / close file handles

Definition at line 184 of file veusim.c.

References inputFile, inputFile_Rx, inputVEUFile, outputFile, and outputFile_Rx.

Referenced by main().

tint veusim_read_frame | ( | linSample * | inBuf,
 |  | FILE * | inFile,
 |  | tint | frmSize
 | ) |  |

: Read a frame of signal from the input file

CALLING FORMAT: tint veusim_read_frame (tint *inBuf, FILE *inFile, tint frmSize)

RETURN VALUE: flag: 0 - end of file (error) 1 - read successfully

Definition at line 204 of file veusim.c.

Referenced by main().

tint veusim_write_frame | ( | tint * | outBuf,
 |  | FILE * | outFile,
 |  | tint | frmSize
 | ) |  |

: Write a frame of signal to the output file

CALLING FORMAT: tint veusim_write_frame (tint *inBuf, FILE *inFile, tint frmSize)

RETURN VALUE: flag: 0 - end of file (error) 1 - read successfully

Definition at line 232 of file veusim.c.

References MAX_NUM_SAMPLES_PER_FRAME.

Referenced by main().

void veusim_get_frame_size ( tint * frmSize )

: Read frame size setting (in sample unit for 8KHz sampling rate) % from the VQE configuration file

Definition at line 255 of file veusim.c.

References inputVEUFile.

Referenced by main().

void veusim_new_veu ( )

: create a veu instance in unit test wrapper

Description: Allocate memory for a veu instance and set it to close initially

Definition at line 284 of file veusim.c.

References MAX_NUM_SAMPLES_PER_FRAME, and veuInst.

Referenced by main().

void veusim_open_veu ( tint frame_size )

: open a veu instance in unit test wrapper

Description: Set a veu instance to open and apply initial configuration

Definition at line 345 of file veusim.c.

References veuInst.

Referenced by main().

void veusim_control_veu | ( | void * | veuInst,
 |  | veuControl_t * | ctl,
 |  | tint * | frmSize_send,
 |  | tint * | frmSize_recv
 | ) |  |

: Configure a veu instance in unit test wrapper

Description: Read veu configuration from the file and control the instance

Definition at line 379 of file veusim.c.

References inputVEUFile, and inputVEUsetting.

Referenced by main().

void hw_init ( void )

Definition at line 481 of file veusim.c.

Referenced by main().

void veu_sim_progress ( tint frame_size )

Definition at line 533 of file veusim.c.

References sample_cnt, second_cnt, and VEU_SIM_SAMPLES_PER_SECOND.

Referenced by main().

void main ( void )

: Main program in unit test wrapper

Definition at line 548 of file veusim.c.

References FRAME_SIZE, hw_init(), inputFile, inputFile_Rx, inputTxlistFile, loop, MAX_NUM_SAMPLES_PER_FRAME, outputFile, outputFile_Rx, sample_cnt, second_cnt, veu_sim_progress(), veuCtrl, veuInst, veusim_control_veu(), veusim_get_file(), veusim_get_frame_size(), veusim_init_testvector(), veusim_new_veu(), veusim_open_filelist(), veusim_open_veu(), veusim_read_frame(), veusim_release_testvector(), and veusim_write_frame().

Here is the call graph for this function:

Variable Documentation

tword heapBuf[VEUSIM_HEAP_SIZE]

Definition at line 72 of file veusim.c.

FILE* inputFile

Definition at line 75 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputFile_Rx

Definition at line 76 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* outputFile

Definition at line 77 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* outputFile_Rx

Definition at line 78 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputVEUFile

Definition at line 79 of file veusim.c.

Referenced by veusim_control_veu(), veusim_get_frame_size(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputTxlistFile

Definition at line 80 of file veusim.c.

Referenced by main(), veusim_get_file(), and veusim_open_filelist().

FILE * inputRxlistFile

Definition at line 80 of file veusim.c.

FILE * outputTxlistFile

Definition at line 80 of file veusim.c.

FILE* outputRxlistFile

Definition at line 81 of file veusim.c.

FILE * inputVEUlistFile

Definition at line 81 of file veusim.c.

char inputFileName_Tx[100]

Definition at line 82 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char inputFileName_Rx[100]

Definition at line 82 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char outputFileName_Tx[100]

Definition at line 82 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char outputFileName_Rx[100]

Definition at line 83 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char inputVEUsetting[100]

Definition at line 83 of file veusim.c.

Referenced by veusim_control_veu(), veusim_get_file(), and veusim_init_testvector().

tlong sample_cnt

Definition at line 87 of file veusim.c.

Referenced by main(), and veu_sim_progress().

tuint second_cnt

Definition at line 88 of file veusim.c.

Referenced by main(), and veu_sim_progress().

void* veuInst

Definition at line 91 of file veusim.c.

Referenced by main(), veusim_new_veu(), and veusim_open_veu().

veuControl_t veuCtrl

Definition at line 93 of file veusim.c.

Referenced by main().

veuContext_t veuContext

Definition at line 525 of file veusim.c.


VEU Test: VEU Unit Test

VEU Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the VEU. This is not a regression test, its purpose is to show how the VEU module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Test code details: VEUTEST

Building Unit Test

The VEU Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the VEU Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main VEU documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The VEU Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the VEU Unit Test image for the target of interest
    • Will reside in the veu\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the VEU project for the target of interest
    • Will be a subdirectory off the veu\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the veu\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)


VEU Test: Module Index

VEU Test Modules

Here is a list of all modules:
  • VEUTEST


VEU Test: Page Index

VEU Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


VEU Test: veusim.c File Reference

  • File List
  • Globals

veusim.c File Reference

Detailed Description

Main program and supporting routines for the simulation of VEU.

(C) Copyright 2009, Texas Instruments, Inc.

Definition in file veusim.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/const.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/veu/veu.h>
#include <ti/mas/veu/test/src/veusim.h>
#include <ti/mas/veu/Version.h>

Include dependency graph for veusim.c:

Go to the source code of this file.

Defines

#define | loop for(;;)
#define | FRAME_SIZE 80
#define | MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)
#define | INPUT_TX_LIST_FILE "..//..//inp_list_file_8k.txt"
#define | VEU_SIM_SAMPLES_PER_SECOND 8000

Functions

void | veusim_open_filelist ()
: Open the file which contains list of files to be processed
void | veusim_get_file ()
: Get a set of file-names to be processed
void | veusim_init_testvector ()
: Initialize test vectors Open input files to be read, create output files to be write, and open the corresponding VQE configuration file. % All input files and output files need to be in little-endian binary format
void | veusim_release_testvector ()
: release test vectors / close file handles
tint | veusim_read_frame (linSample *inBuf, FILE *inFile, tint frmSize)
: Read a frame of signal from the input file
tint | veusim_write_frame (tint *outBuf, FILE *outFile, tint frmSize)
: Write a frame of signal to the output file
void | veusim_get_frame_size (tint *frmSize)
: Read frame size setting (in sample unit for 8KHz sampling rate) % from the VQE configuration file
void | veusim_new_veu ()
: create a veu instance in unit test wrapper
void | veusim_open_veu (tint frame_size)
: open a veu instance in unit test wrapper
void | veusim_control_veu (void *veuInst, veuControl_t *ctl, tint *frmSize_send, tint *frmSize_recv)
: Configure a veu instance in unit test wrapper
void | hw_init (void)
void | veu_sim_progress (tint frame_size)
void | main (void)
: Main program in unit test wrapper

Variables

tword | heapBuf [VEUSIM_HEAP_SIZE]
FILE * | inputFile
FILE * | inputFile_Rx
FILE * | outputFile
FILE * | outputFile_Rx
FILE * | inputVEUFile
FILE * | inputTxlistFile
FILE * | inputRxlistFile
FILE * | outputTxlistFile
FILE * | outputRxlistFile
FILE * | inputVEUlistFile
char | inputFileName_Tx [100]
char | inputFileName_Rx [100]
char | outputFileName_Tx [100]
char | outputFileName_Rx [100]
char | inputVEUsetting [100]
tlong | sample_cnt
tuint | second_cnt
void * | veuInst
veuControl_t | veuCtrl
veuContext_t | veuContext


VEU Test: veusim.c Source File

  • File List
  • Globals

veusim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main program and supporting routines for the simulation of VQE
00003  ******************************************************************************
00004  *
00005  * (C) Copyright 2009, Texas Instruments, Inc.
00006  *****************************************************************************/
00017 /* @{ */
00018
00019 #include <stdio.h>
00020 #include <stdlib.h>
00021 #include <string.h>
00022
00023 #include <ti/mas/types/const.h>
00024 #include <ti/mas/types/types.h>
00025 #include <ti/mas/util/ecomem.h>
00026 #include <ti/mas/fract/fract.h>
00027 #include <ti/mas/util/utl.h>
00028
00029 #include <ti/mas/veu/veu.h>
00030 #include <ti/mas/veu/test/src/veusim.h>
00031
00032 #include <ti/mas/veu/Version.h>
00033
00034 #define loop for(;;)
00035
00036 #ifdef USE_CACHE
00037 #include <ti/mas/sdk/memArchCfg.h>
00038 #endif
00039
00040 #ifdef PROFILE_CYCLES
00041 #include <ti/mas/sdk/profile.h>
00042 tlong     cyclesOverhead;
00044 typedef struct cycles_s {
00045   tlong     max;
00046   tlong     avg;
00047 } cycles_t;
00048
00049 cycles_t  cyclesVeuSendIn;
00050 cycles_t  cyclesVeuReceiveIn;
00051 #endif
00052
00053
00054
00055 /* the FRAME_SIZE is always set for the frame size used for narrowband(Fs=8KHz)
00056     signals. For example, the bit_values 80 means 10ms for narrowband input. Once
00057     wideband operation is specified, it will be automatically adjusted to
00058     160-sample (same 10ms in wideband) by either veuOpen() or veuControl();
00059     Please see function veusim_open_veu() in this wrapper as an example.*/
00060 #define FRAME_SIZE              80
00061
00062 /* allocate enough memory for wideband operation */
00063 #define MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)
00064
00065 /* Define name of the file which contains list of files to be processed */
00066 #ifdef veu_WB_COMPILER
00067 #define INPUT_TX_LIST_FILE "..//..//inp_list_file_16k.txt"
00068 #else
00069 #define INPUT_TX_LIST_FILE "..//..//inp_list_file_8k.txt"
00070 #endif
00071
00072 tword heapBuf[VEUSIM_HEAP_SIZE];
00073
00074 /* Input & output files */
00075 FILE *inputFile;
00076 FILE *inputFile_Rx;
00077 FILE *outputFile;
00078 FILE *outputFile_Rx;
00079 FILE *inputVEUFile;
00080 FILE *inputTxlistFile, *inputRxlistFile, *outputTxlistFile;
00081 FILE *outputRxlistFile, *inputVEUlistFile;
00082 char inputFileName_Tx[100], inputFileName_Rx[100], outputFileName_Tx[100];
00083 char outputFileName_Rx[100], inputVEUsetting[100];
00084
00085 /* Progress reporting */
00086 #define VEU_SIM_SAMPLES_PER_SECOND  8000
00087 tlong sample_cnt;
00088 tuint second_cnt;
00089
00090 /* veu related parameters */
00091 void *veuInst;
00092
00093 veuControl_t veuCtrl;
00094
00095 /* File reading parameters */
00100 void veusim_open_filelist ()
00101 {
00102   inputTxlistFile = fopen (INPUT_TX_LIST_FILE, "r");
00103 }
00104
00109 void veusim_get_file ()
00110 {
00111   fscanf (inputTxlistFile, "%s", inputFileName_Tx);
00112   fscanf (inputTxlistFile, "%s", inputFileName_Rx);
00113   fscanf (inputTxlistFile, "%s", outputFileName_Tx);
00114   fscanf (inputTxlistFile, "%s", outputFileName_Rx);
00115   fscanf (inputTxlistFile, "%s", inputVEUsetting);
00116 }
00117
00125 void veusim_init_testvector ()
00126 {
00127   /* open Tx(Sin) input files */
00128   inputFile = fopen (inputFileName_Tx,  "rb");
00129   if (inputFile != NULL) {
00130     printf ("input file %s is opened!\n", inputFileName_Tx);
00131   }
00132   else {
00133     printf ("File Open Error %s\n",inputFileName_Tx);
00134     exit (1);
00135   }
00136
00137   /* open Rx(Rin) input files */
00138   inputFile_Rx = fopen (inputFileName_Rx,  "rb");
00139
00140   if (inputFile_Rx != NULL) {
00141     printf ("input file %s is opened!\n", inputFileName_Rx);
00142   }
00143   else {
00144     printf ("File Open Error %s\n",inputFileName_Rx);
00145     exit (1);
00146   }
00147
00148   /* open Tx(Sout) output files */
00149   outputFile = fopen (outputFileName_Tx,  "wb");
00150   if (outputFile!= NULL) {
00151     printf ("output file %s is opened!\n", outputFileName_Tx);
00152   }
00153   else {
00154     printf ("File Open Error %s\n",outputFileName_Tx);
00155     exit (1);
00156   }
00157
00158   /* open Rx(Rout) output files */
00159   outputFile_Rx = fopen(outputFileName_Rx,  "wb");
00160   if (outputFile_Rx!= NULL) {
00161     printf ("output file %s is opened!\n", outputFileName_Rx);
00162   }
00163   else {
00164     printf ("File Open Error %s\n",outputFileName_Rx);
00165     exit (1);
00166   }
00167
00168   /* open veu setting file */
00169   inputVEUFile = fopen(inputVEUsetting,  "rb");
00170   if (inputVEUFile!= NULL) {
00171     printf ("veu setting file %s is opened!\n", inputVEUsetting);
00172   }
00173   else {
00174     printf ("File Open Error %s\n",inputVEUsetting);
00175     exit (1);
00176   }
00177 } /* veusim_init_testvector */
00178
00179
00184 void veusim_release_testvector ()
00185 {
00186   fclose (inputFile);
00187   fclose (inputFile_Rx);
00188   fclose (outputFile);
00189   fclose (outputFile_Rx);
00190   fclose (inputVEUFile);
00191 } /* veusim_release_testvector */
00192
00193
00204 tint veusim_read_frame (linSample *inBuf, FILE *inFile, tint frmSize)
00205 {
00206   int i;
00207
00208   if (inFile) {
00209     for (i = 0; i < frmSize; i++) {
00210       int lsb, msb;
00211       lsb = fgetc(inFile);
00212       msb = fgetc(inFile);
00213       inBuf[i] = (linSample)((msb << 8) | lsb);
00214     }
00215
00216     if (feof(inFile)) return (0);
00217   }
00218   return (1);
00219 }
00220
00221
00232 tint veusim_write_frame (tint *outBuf, FILE *outFile, tint frmSize)
00233 {
00234   int k;
00235   tword buf[2*MAX_NUM_SAMPLES_PER_FRAME];
00236
00237   if (outFile) {
00238     for (k = 0; k < frmSize; k++) {
00239       buf[2*k+0] = (outBuf[k] >> 0) & 0xff;
00240       buf[2*k+1] = (outBuf[k] >> 8) & 0xff;
00241     }
00242
00243     fwrite (buf, sizeof(tword), 2*frmSize, outFile);
00244   }
00245
00246   return (1);
00247 }
00248
00249
00255 void veusim_get_frame_size(tint *frmSize)
00256 {
00257   tlong read_value;
00258   /* for frame size setting at sample unit (sampled at 8KHz) */
00259   fscanf (inputVEUFile, "%d\n", &read_value);
00260   *frmSize = (tint) read_value;
00261   if ((*frmSize<veu_INFRAME_MINLENGTH) || (*frmSize>veu_INFRAME_MAXLENGTH)) {
00262     printf ("Frame Size Error: frame size should be between 5 to 30ms");
00263     exit (1);
00264   }
00265
00266   /* for frame size setting at ms unit */
00267   /*
00268   fscanf(inputVEUFile, "%d", frmSize);
00269   if ((*frmSize<5) || (*frmSize>30)) {
00270     printf ("Frame Size Error: frame size should be between 5 to 30ms");
00271     exit (1);
00272   }
00273
00274   *frmSize *= 8; // default sample rate is 8KHz
00275   */
00276 }
00277
00284 void veusim_new_veu ()
00285 {
00286   int i;
00287   tint stat, veuNbufs;
00288
00289   ecomemBuffer_t *bufs;
00290   ecomemBuffer_t *veuBufs;
00291   veuSizeConfig_t veuCfgSize;
00292   veuNewConfig_t  veuCfgNew;
00293
00294   /* VEU get sizes */
00295   veuCfgSize.max_frame_size = MAX_NUM_SAMPLES_PER_FRAME;
00296   stat = veuGetSizes (&veuNbufs, &bufs, &veuCfgSize);
00297   if (stat != veu_NOERR) {
00298     printf ("Error in veuGetSizes !");
00299     exit (1);
00300   }
00301
00302   /* Allocate veu memory buffer descriptors & increment auxiliary heap size */
00303   veuBufs = (ecomemBuffer_t*) malloc (veuNbufs * sizeof(ecomemBuffer_t));
00304
00305   /* Allocate veu memory buffers & increment veu heap size. Data from the (global)
00306      variable veuBufs is copied into the (local) variable veuLocalBufs in order to
00307      correctly set veuLocalBufs' size parameter */
00308
00309   /* assume all buffers are in external memory, no alignment requests */
00310   /* NOTE: This is not true for target platform!!! */
00311   printf ("VEU memory buffers:\n");
00312   printf ("    Buffer    Size(twords)    Alignment    Volatile\n");
00313   for (i = 0; i < veuNbufs; i++) {
00314     veuBufs[i]             = bufs[i];
00315     veuBufs[i].mclass      = ecomem_CLASS_EXTERNAL;
00316     veuBufs[i].log2align   = 0;
00317     veuBufs[i].volat       = FALSE;
00318     veuBufs[i].base        = (bufs[i].size)? malloc(bufs[i].size): NULL ;
00319
00320     printf ("     %3d       %7d         %4d       ",
00321                  i, (int)bufs[i].size, (int)bufs[i].log2align);
00322     if(bufs[i].volat)
00323       printf ("    yes\n");
00324     else
00325       printf ("    no\n");
00326   }
00327
00328   veuCfgNew.handle = NULL;
00329   veuInst = NULL;
00330   stat = veuNew ((void **)&veuInst, veuNbufs, veuBufs, &veuCfgNew);
00331   if (stat != veu_NOERR) {
00332     printf ("Error in veuNew %d !", stat);
00333     exit (1);
00334   }
00335
00336   printf ("veu instance is created successfully\n");
00337 } /* veusim_new_veu */
00338
00345 void veusim_open_veu (tint frame_size)
00346 {
00347   veuConfig_t veuConfig;
00348   tint veu_ret; /* for veu return value */
00349
00350   /* Initialize config params */
00351
00352   veuConfig.frame_size      = frame_size;
00353   veuConfig.config_bitfield = veu_CTLM_VEU;
00354   veuConfig.anr_level       = 12;   /* set ANR max attenuation to 12dB */
00355   veuConfig.alc_send_level  = -15;  /* set ALC target level to -15dBm0 in Send path*/
00356   veuConfig.alc_recv_level  = -15;  /* set ALC target level to -15dBm0 in Recv path*/
00357   veuConfig.bulk_delay      = 162;  /* set bulk delay to 162ms */
00358   veuConfig.waepl           = 36;   /* set WAEPL to 36dB */
00359   veuConfig.fgc_send_gain   = 0;    /* set FGC gain to 0dB in Send path */
00360   veuConfig.fgc_recv_gain   = 0;    /* set FGC gain to 0dB in Recv path */
00361
00362   /* Open VEU Instance */
00363   veu_ret = veuOpen(veuInst, &veuConfig);
00364
00365   /* In veu simulation, */
00366   if (veu_ret == veu_ERR_BAD_INST) {
00367     printf ("Error in open a VEU instance !\n");
00368     exit (1);
00369   }
00370 } /* veusim_open_veu */
00371
00372
00379 void veusim_control_veu (void *veuInst, veuControl_t *ctl, tint *frmSize_send,
00380                          tint *frmSize_recv)
00381 {
00382   tlong read_value;
00383   tint ctrl_code, u_value, mode_mask, mode_value, num_read;
00384   tint veu_ret; /* for veu return value */
00385
00386   while (!feof(inputVEUFile)) {
00387     num_read  = fscanf (inputVEUFile, "%d\n", &read_value);
00388     ctrl_code = (tint) read_value;
00389     if (num_read > 0) {
00390       ctl->ctl_code = ctrl_code;
00391       if (ctrl_code == veu_CTL_MODE) {
00392         num_read   = fscanf (inputVEUFile, "%x\n", &read_value);
00393         mode_mask  = (tint) read_value;
00394         num_read  += fscanf (inputVEUFile, "%x\n", &read_value);
00395         mode_value = (tint) read_value;
00396         if (num_read > 0) {
00397           ctl->u.mode_ctl.bit_masks = mode_mask;
00398           ctl->u.mode_ctl.bit_values = mode_value;
00399           veu_ret = veuControl(veuInst, ctl);
00400           if (veu_ret == veu_ERR_BAD_INST) {
00401             printf ("Error: The VEU instance is not open!\n");
00402             exit (1);
00403           }
00404           else if (veu_ret == veu_ERR_BAD_PARAM) {
00405             printf ("Warning: Invalid VEU configuration parameters!\n");
00406           }
00407           else if (veu_ret == veu_ERR_BAD_BUILD) {
00408             printf ("Error: Incompatible build! ");
00409             printf ("Can't run wideband operation in narrowband build.\n");
00410             exit (1);
00411           }
00412           /* adjust frame_size in Send and Recv Path, the code is for
00413               simulation only. The codes need to modify is this
00414               function is called during a test-vector is running */
00415           if ((mode_mask&veu_CTLM_WB_SEND) && (mode_value&veu_CTLM_WB_SEND)) {
00416             (*frmSize_send) <<= 1;
00417           }
00418           if ((mode_mask&veu_CTLM_WB_RECV) && (mode_value&veu_CTLM_WB_RECV)) {
00419             (*frmSize_recv) <<= 1;
00420           }
00421         }
00422         else {
00423           printf ("Error in veu setting file: %s", inputVEUsetting);
00424           exit (1);
00425         }
00426       }
00427       else {
00428         num_read = fscanf (inputVEUFile, "%d\n", &read_value);
00429         u_value  = (tint) read_value;
00430         if (num_read > 0) {
00431           switch (ctrl_code) {
00432             case veu_CTL_ANR_LEVEL:
00433                 ctl->u.anr_level = u_value;
00434                 break;
00435             case veu_CTL_ALC_SEND_LEVEL:
00436                 ctl->u.alc_level = u_value;
00437                 break;
00438             case veu_CTL_ALC_RECV_LEVEL:
00439                 ctl->u.alc_level = u_value;
00440                 break;
00441             case veu_CTL_WAEPL:
00442                 ctl->u.waepl = u_value;
00443                 break;
00444             case veu_CTL_BULK_DELAY:
00445                 ctl->u.bulk_delay = u_value;
00446                 break;
00447             case veu_CTL_FGC_SEND_GAIN:
00448                 ctl->u.fgc_gain = u_value;
00449                 break;
00450             case veu_CTL_FGC_RECV_GAIN:
00451                 ctl->u.fgc_gain = u_value;
00452                 break;
00453             default:
00454                 printf ("Error in veu setting file: %s", inputVEUsetting);
00455                 exit (1);
00456                 break;
00457           }
00458           veu_ret = veuControl(veuInst, ctl);
00459           if (veu_ret == veu_ERR_BAD_INST) {
00460             printf ("Error: The VEU instance is not open!\n");
00461             exit (1);
00462           }
00463           else if (veu_ret == veu_ERR_BAD_PARAM) {
00464             printf ("Warning: Invalid VEU configuration parameters!\n");
00465           }
00466         }
00467         else {
00468           printf ("Error in veu setting file: %s", inputVEUsetting);
00469           exit (1);
00470         }
00471       }
00472     }
00473     else {
00474       printf ("Error in veu setting file: %s", inputVEUsetting);
00475       exit (1);
00476     }
00477   }
00478 } /* veusim_control_veu */
00479
00480
00481 void hw_init(void)
00482 {
00483  #ifdef PROFILE_CYCLES
00484   if (!profile_initCycleProfiling()) {
00485     printf ("Could not acquire profiling resources..Exiting\n");
00486     exit (0);
00487   }
00488   /* Initialize the Stats */
00489   cyclesVeuSendIn.avg    = 0;
00490   cyclesVeuSendIn.max    = 0;
00491   cyclesVeuReceiveIn.avg = 0;
00492   cyclesVeuReceiveIn.max = 0;
00493  #endif
00494
00495  #ifdef USE_CACHE
00496    memarchcfg_cacheEnable ();
00497  #endif
00498 }
00499
00500 #ifdef PROFILE_CYCLES
00501 static inline void siu_print_cycles_util (cycles_t * cyclesPtr, char *name,
00502                                          tlong overhead)
00503 {
00504   printf ("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00505          (long) cyclesPtr->max - (long) overhead,
00506          (long) cyclesPtr->avg - (long) overhead);
00507 }
00508
00509 void siu_print_cycles (void)
00510 {
00511   siu_print_cycles_util (&cyclesVeuSendIn, "VEU Send IN", cyclesOverhead);
00512   siu_print_cycles_util (&cyclesVeuReceiveIn, "VEU Receive In", cyclesOverhead);
00513 }
00514
00515 static inline void siu_process_cycles (tlong cycles, cycles_t * cyclesPtr)
00516 {
00517   if (cycles > cyclesPtr->max) {
00518     cyclesPtr->max = cycles;
00519   }
00520
00521   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00522 }
00523 #endif
00524
00525 veuContext_t veuContext;
00526
00527
00528 /*-----------------------------------------------------------------
00529  * Function:  veu_sim_progress
00530  *
00531  * Description: Update sample counters
00532  *-----------------------------------------------------------------*/
00533 void veu_sim_progress (tint frame_size)
00534 {
00535   /* Update sample counter */
00536   sample_cnt += frame_size;
00537   if (sample_cnt >= (second_cnt + 1) * VEU_SIM_SAMPLES_PER_SECOND) {
00538     second_cnt++;
00539     fprintf (stdout, " - Progress: %d seconds\n", second_cnt);
00540   }
00541 }
00542
00543
00548 void main (void)
00549 {
00550   tint read_flag_Tx, read_flag_Rx;
00551   tint inBufRx[MAX_NUM_SAMPLES_PER_FRAME];
00552   tint inBufTx[MAX_NUM_SAMPLES_PER_FRAME];
00553   tint outBufTx[MAX_NUM_SAMPLES_PER_FRAME];
00554   tint frmSize = FRAME_SIZE;
00555   tint frmSize_send, frmSize_recv;
00556   tint frame_counter = 0;
00557   #ifdef PROFILE_CYCLES
00558   volatile tlong cycles;
00559   #endif
00560   veuInst = NULL;
00561
00562   printf ("Version Information of modules tested:\n");
00563   printf ("VEU %d.%d.%d.%d\n",
00564         ti_mas_veu_Version_MAJOR, ti_mas_veu_Version_MINOR,
00565         ti_mas_veu_Version_PATCH, ti_mas_veu_Version_BUILD);
00566
00567   hw_init ();
00568
00569   #ifdef PROFILE_CYCLES
00570   cycles = profile_getCPUcycleCount ();
00571
00572   cycles = (profile_getCPUcycleCount () - cycles);
00573   cyclesOverhead = cycles;
00574   #endif
00575
00576   /* create a new veu instance */
00577   veusim_new_veu ();
00578
00579   veuContext.max_frame_size = 160;
00580
00581   veusim_open_filelist ();
00582
00583   while (!feof(inputTxlistFile)) {
00584     /* get input file list */
00585     veusim_get_file ();
00586
00587     /* open test-vectors and veu setting file */
00588     veusim_init_testvector ();
00589
00590     /* read frame size */
00591     veusim_get_frame_size (&frmSize);
00592
00593     /* set veu instance to be ready */
00594     veusim_open_veu (frmSize);
00595
00596     /* setup parameters for veu instance */
00597     frmSize_send = frmSize;
00598     frmSize_recv = frmSize;
00599     veusim_control_veu (veuInst, &veuCtrl, &frmSize_send, &frmSize_recv);
00600
00601     /* Reset progress reporting */
00602     sample_cnt = 0L;
00603     second_cnt = 0;
00604
00605     /* process the test-vectors */
00606     while (!feof(inputFile)) {
00607       /* write singals from files */
00608       read_flag_Tx = veusim_read_frame (inBufTx, inputFile,    frmSize_send);
00609       read_flag_Rx = veusim_read_frame (inBufRx, inputFile_Rx, frmSize_recv);
00610
00611       if (read_flag_Tx && read_flag_Rx) {
00612         frame_counter++;
00613         #ifdef USE_CACHE
00614         memarchcfg_cacheFlush ();
00615         #endif
00616         #ifdef PROFILE_CYCLES
00617         cycles = profile_getCPUcycleCount ();
00618         #endif
00619         #ifdef USE_CACHE
00620         memarchcfg_cacheFlush ();
00621         #endif
00622         #ifdef PROFILE_CYCLES
00623         cycles = profile_getCPUcycleCount ();
00624         #endif
00625
00626         #ifdef PROFILE_CYCLES
00627         cycles = (profile_getCPUcycleCount () - cycles);
00628         siu_process_cycles (cycles, &cyclesVeuSendIn);
00629         #endif
00630
00631         #ifdef USE_CACHE
00632         memarchcfg_cacheFlush ();
00633         #endif
00634
00635         #ifdef PROFILE_CYCLES
00636         cycles = profile_getCPUcycleCount ();
00637         #endif
00638
00639         /* process sin signals */
00640         veuSendIn (veuInst, inBufTx, inBufRx, outBufTx, NULL);
00641
00642         /* process rin signals */
00643         veuReceiveIn (veuInst, inBufRx);
00644
00645         #ifdef PROFILE_CYCLES
00646         cycles = (profile_getCPUcycleCount () - cycles);
00647         siu_process_cycles (cycles, &cyclesVeuReceiveIn);
00648         #endif
00649
00650         /* write outputs to files */
00651         veusim_write_frame (outBufTx, outputFile, frmSize_send);
00652         veusim_write_frame (inBufRx, outputFile_Rx, frmSize_recv);
00653
00654         /* Sample count and Breakpoint check */
00655         veu_sim_progress (frmSize);
00656       } /* if */
00657     } /* while */
00658
00659     /* close veu instance */
00660     veuClose (veuInst);
00661
00662     /* close test-vectors */
00663     veusim_release_testvector ();
00664     #ifdef PROFILE_CYCLES
00665     siu_print_cycles ();
00666     profile_closeCycleProfiling ();
00667     #endif
00668
00669     #ifdef PROFILE_CYCLES
00670     siu_print_cycles ();
00671     profile_closeCycleProfiling ();
00672     #endif
00673   }
00674
00675   /* Loop */
00676   printf ("\n\nSimulation Complete\n\n");
00677   loop;
00678
00679 } /* main */
00680 /* @} */ /* ingroup */
00681 /* nothing past this point */


VEU Test: veusim.h File Reference

  • File List
  • Globals

veusim.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | NUMBER_OF_FRAMES 1
#define | VEUSIM_HEAP_SIZE 2048

Functions

void | veusim_init_testvector ()
: Initialize test vectors Open input files to be read, create output files to be write, and open the corresponding VQE configuration file. % All input files and output files need to be in little-endian binary format
void | veusim_release_testvector ()
: release test vectors / close file handles
tint | veusim_read_frame (tint *inBuf, FILE *inFile, tint frmSize)
void | veusim_new_veu ()
: create a veu instance in unit test wrapper
void | veusim_open_veu (tint frame_size)
: open a veu instance in unit test wrapper
void | veusim_control_veu ()
void | veusim_param_veu ()

Define Documentation

#define NUMBER_OF_FRAMES 1

Definition at line 14 of file veusim.h.

#define VEUSIM_HEAP_SIZE 2048

Definition at line 15 of file veusim.h.

Function Documentation

tint veusim_read_frame | ( | tint * | inBuf,
 |  | FILE * | inFile,
 |  | tint | frmSize
 | ) |  |

void veusim_control_veu ( )

void veusim_param_veu ( )


VEU Test: veusim.h Source File

  • File List
  • Globals

veusim.h

Go to the documentation of this file.
00001 #ifndef _VEUSIM_H
00002 #define _VEUSIM_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Header file VEU unit-test.
00005  ******************************************************************************
00006  * FILE NAME: veusim.h
00007  *
00008  * DESCRIPTION: Header file for VEU unit-test.
00009  *
00010  * (C) Copyright 2009 Texas Instruments, Inc.
00011  *****************************************************************************/
00012
00013
00014 #define NUMBER_OF_FRAMES       1       /* # of frames to save */
00015 #define VEUSIM_HEAP_SIZE    2048
00016
00017 /******************************************************************************
00018  * FUNCTION PURPOSE: Initialize test vectors settings
00019  ******************************************************************************
00020  * DESCRIPTION:
00021  *
00022  * CALLING FORMAT:
00023  *   veusim_init_testvector (tint file_id)
00024  *
00025  * RETURN VALUE:
00026  *   None
00027  *
00028  *****************************************************************************/
00029 void veusim_init_testvector ();
00030
00031 /******************************************************************************
00032  * FUNCTION PURPOSE: release test vectors / close file handles
00033  ******************************************************************************
00034  * DESCRIPTION:
00035  *
00036  * CALLING FORMAT:
00037  *   veusim_release_testvector()
00038  *
00039  * RETURN VALUE:
00040  *   None
00041  *
00042  *****************************************************************************/
00043 void veusim_release_testvector ();
00044
00045 /******************************************************************************
00046  * FUNCTION PURPOSE: Read a Tx frame
00047  ******************************************************************************
00048  * DESCRIPTION:
00049  *
00050  * CALLING FORMAT:
00051  *   tint veusim_read_frame (tint *inBuf, FILE *inFile, tint frmSize)
00052  *
00053  * RETURN VALUE:
00054  *   flag:   0 - end of file (error)
00055  *           1 - read successfully
00056  *
00057  *****************************************************************************/
00058 tint veusim_read_frame (tint *inBuf, FILE *inFile, tint frmSize);
00059
00060 /******************************************************************************
00061  * FUNCTION PURPOSE: create a veu instance
00062  ******************************************************************************
00063  * DESCRIPTION:
00064  *
00065  * CALLING FORMAT:
00066  *   void veusim_new_veu ()
00067  *
00068  * RETURN VALUE:
00069  *   None
00070  *
00071  *****************************************************************************/
00072 void veusim_new_veu ();
00073
00074
00075 /******************************************************************************
00076  * FUNCTION PURPOSE: create a veu instance
00077  ******************************************************************************
00078  * DESCRIPTION:
00079  *
00080  * CALLING FORMAT:
00081  *   void veusim_open_veu ()
00082  *
00083  * RETURN VALUE:
00084  *   None
00085  *
00086  *****************************************************************************/
00087 void veusim_open_veu (tint frame_size);
00088
00089 /******************************************************************************
00090  * FUNCTION PURPOSE: create a veu instance
00091  ******************************************************************************
00092  * DESCRIPTION:
00093  *
00094  * CALLING FORMAT:
00095  *   void veusim_open_veu ()
00096  *
00097  * RETURN VALUE:
00098  *   None
00099  *
00100  *****************************************************************************/
00101 void veusim_control_veu ();
00102
00103 /******************************************************************************
00104  * FUNCTION PURPOSE: setup the parameters of the veu instance for different tests
00105  ******************************************************************************
00106  * DESCRIPTION:
00107  *
00108  * CALLING FORMAT:
00109  *   void veusim_setup_veu ()
00110  *
00111  * RETURN VALUE:
00112  *   None
00113  *
00114  *****************************************************************************/
00115 void veusim_param_veu ();
00116
00117
00118
00119
00120
00121 #endif /* _VEUSIM_H */
00122 /* nothing after this point */


VPE: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_vpe_Version__top__
#define | __extern extern
#define | ti_mas_vpe_Version___VERS 150
#define | ti_mas_vpe_Version_MAJOR (3)
#define | ti_mas_vpe_Version_MINOR (4)
#define | ti_mas_vpe_Version_XVERTICAL (0)
#define | ti_mas_vpe_Version_PATCH (2)
#define | ti_mas_vpe_Version_BUILD (0)
#define | ti_mas_vpe_Version_QUALITY (3)
#define | ti_mas_vpe_Version_BTYPE (0)
#define | ti_mas_vpe_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_vpe_Version_MAJOR
#define | Version_MINOR ti_mas_vpe_Version_MINOR
#define | Version_XVERTICAL ti_mas_vpe_Version_XVERTICAL
#define | Version_PATCH ti_mas_vpe_Version_PATCH
#define | Version_BUILD ti_mas_vpe_Version_BUILD
#define | Version_QUALITY ti_mas_vpe_Version_QUALITY
#define | Version_BTYPE ti_mas_vpe_Version_BTYPE
#define | Version_WIDTH ti_mas_vpe_Version_WIDTH

Define Documentation

#define ti_mas_vpe_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_vpe_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_vpe_Version_MAJOR (3)

Definition at line 50 of file Version.h.

#define ti_mas_vpe_Version_MINOR (4)

Definition at line 53 of file Version.h.

#define ti_mas_vpe_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_vpe_Version_PATCH (2)

Definition at line 59 of file Version.h.

#define ti_mas_vpe_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_vpe_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_vpe_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_vpe_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_vpe_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_vpe_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_vpe_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_vpe_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_vpe_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_vpe_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_vpe_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_vpe_Version_WIDTH

Definition at line 97 of file Version.h.


VPE: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_vpe_Version__include
00023 #define ti_mas_vpe_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_vpe_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_vpe_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_vpe_Version_MAJOR (3)
00051
00052 /* MINOR */
00053 #define ti_mas_vpe_Version_MINOR (4)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_vpe_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_vpe_Version_PATCH (2)
00060
00061 /* BUILD */
00062 #define ti_mas_vpe_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_vpe_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_vpe_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_vpe_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_vpe_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_vpe_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_vpe_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_vpe_Version_MAJOR
00091 #define Version_MINOR      ti_mas_vpe_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_vpe_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_vpe_Version_PATCH
00094 #define Version_BUILD      ti_mas_vpe_Version_BUILD
00095 #define Version_QUALITY    ti_mas_vpe_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_vpe_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_vpe_Version_WIDTH
00098 #endif


VPE: Data Structures

  • Data Structures
  • Data Fields

VPE Data Structures

Here are the data structures with brief descriptions:
hlcConfig_t | HLC configure Structure
hlcControl_t | HLC Control Structure. Contains control commands to change HLC parameters without resetting other parameters
slmConfig_t | SLM configure Structure


VPE: Detailed VPE Description

VPE (Voice Processing Elements) Package

Detailed VPE Description

VPE Description

The VPE component provides a collection of modules that may function either independently as a group to either enhance voice signals with respect to some metric or provide information about the signals such as signal level, noise level, etc.

VPE supports the following features:

  1. High Level Compensation (HLC): Attenuate the incoming signal to avoid future saturation.
  2. Signal Limiter (SLM): A soft limiter that attenuates the signal without any delay to prevent signal saturation.
  3. Signal Noise Level estimator (SNL): Estimate the voice and noise levels within the signal path.
  4. Simple Voice Activity Detection (SVD): Simple voice activity detection (VAD) based almost exclusively on the SNL module.

Module Descriptions

High Level Compensation (HLC)

HLC attenuates the signal in the receive direction (toward the TDM circuit) if the signal level is too high. The reason to attenuate high signals is to prevent potential non-linear effects in the return echo signal due to clipping in down line equipment. The performance of an echo canceller generally depends on the linearity of the echo signal and degraded performance may be observed when non-linear components are present.

The HLC feature will attenuate the signal in the receive direction by 6 dB when a high signal condition is declared. The attenuation is only inserted when a high signal condition is declared. Otherwise no attenuation is performed.

A high signal condition is declared when the signal level remains above -2 dBm0 for a period of at least one second or above -8 dBm0 for a period of 2.5 seconds.

A continuous signal below -18 dBm0, yet above -30dBm0 for a one second interval will induce an HLC signal condition reset.

The attenuation (or removal of attenuation) will only take effect when a short (2.25 msec) duration of silence (<-30 dBm0) is detected. Hence the attenuation is only changed between words so as to remain unnoticeable.

Signal Limiter (SLM)

When a signal level transmitted toward the telephony interface is "too hot" there is a risk that the reflected echo signal may saturate, and thus contain non-linear components that can lead to degraded echo canceller performance. The signal limiter provides the ability to automatically limit the signal transmitted in the telephony direction to avoid such a scenario. The signal limiter does not simply saturate and cut the signal amplitude at a user defined maximum level. Rather, the signal limiter implements a "soft" limit on the transmitted signal in an attempt to smooth out the effects of the limiting. The signal limiter consists of ten distinct sample thresholds, as illustrated below.

Signal Limiter Thresholds

The signal limiter has five operational modes. Each mode corresponds to a pre-defined set of thresholds. When the amplitude of a voice sample exceeds the first SLM threshold of the configured mode, SLM processing begins. The changes incurred by the signal limiter will produce a certain degree of signal distortion. This distortion will depend on both the mode selected and the signal level. The signal limiter has five operational modes as illustrated below.

Signal Limiter Modes

SLM Thresholds (in dBm0-p)
Threshold | Mode 1 | Mode 2 | Mode 3 | Mode 4 | Mode 5
1st | -15.3 | -13.3 | -12.1 | -11.0 | -9.1
2nd | -13.9 | -11.7 | -10.7 | -9.7 | -7.7
3rd | -13.0 | -11.0 | -9.4 | -8.2 | -6.8
4th | -12.1 | -10.1 | -8.7 | -7.7 | -6.0
5th | -11.4 | -9.4 | -7.7 | -6.8 | -5.3
6th | -10.7 | -8.7 | -6.8 | -6.0 | -4.6
7th | -10.0 | -8.2 | -6.4 | -5.2 | -3.9
8th | -9.4 | -7.2 | -6.0 | -5.0 | -3.3
9th | -8.7 | -6.8 | -5.6 | -4.5 | -2.6
10th | -8.2 | -6.4 | -5.3 | -4.2 | -2.1

The Signal Limiter begins signal "attenuation" at sample levels below the operational saturation point and ramps down the attenuation over a period of ten samples until (if) the configured threshold is exceeded. This approach prevents any sharp discontinuity in the slope when the input signal reaches the signal limiter output threshold. This level dependent attenuation will induce signal distortion when it's active.

A general description of the signal limiter operation follows:

  1. The limiter starts from the 1st threshold.
  2. If a voice sample exceeds the 1st threshold, the signal limiter saturates the sample at this threshold and sets the limit to the 2nd threshold.
  3. If the next sample exceeds the 2nd threshold, the sample is limited to the 2nd threshold and the limit is set to the 3rd threshold.
  4. If the next sample exceeds the 3rd threshold, the sample is limited to the 3rd threshold and the limit is set to the 4th threshold, and so on.
  5. If the limit is equal to the 10th threshold and the sample exceeds this limit, the sample is limited to the 10th threshold and the limit remains unchanged. Therefore, the maximum sample value at the output of the signal limiter is the 10th threshold value. It takes at least 10 samples (1.25 ms) to reach this maximum value at the rising edge of a signal.
  6. When the sample value falls below the 1st threshold the limit is reset to the 1st threshold.
  7. If the sample changes sign, the limit is reset to the 1st threshold. If the absolute value of the sample is greater than the 1st threshold, it is limited to the 1st threshold.

Speech & Noise Level estimator (SNL)

The Speech and Noise Level module measures the speech and noise levels. It can serve as a VAD or a simple call back function to monitor speech and noise levels.

SNL estimates the signal level and background noise level of the incoming voice signal. SNL operates at a sampling rate of 666.67Hz and is frame-based. For each frame, logic is used to decide whether the current segment of signal is more like voice or noise. This decision is subsequently used to adjust internal parameters of the SNL to update the noise or speech level estimators.

Simple Voice Activity Detector (SVD)

The Simple Voice activity Detector module examines the signal and noise levels measured by the SNL module and makes a decision whether voice is active or not. It provides the voice activity decision as well as signal and noise power levels.


VPE:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VPE: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VPE: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a template header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


VPE: VPE External API

VPE (Voice Processing Elements) Package

VPE External API

Page Contents

  1. HLC Module API
  2. SLM Module API
  3. SNL Module API
  4. SVD Module API

HLC Module API

The HLC module follows the relatively simple Embedded Communication Object (ECO) - Lite API model. The complete API for this module is provided below.

  1. hlcGetSizes()
  2. hlcInit()
  3. hlcControl()
  4. hlcProcess()

The API functions hlcGetSizes and hlcInit combine to create and open an HLC instance. The hlcControl routine offers run-time configuration control and the hlcProcess routine performs the HLC functionality for one direction in a voice channel.

See HLC API return codes for HLC return codes.

SLM Module API

The SLM module follows the relatively simple Embedded Communication Object (ECO) - Lite API model. The complete API for this module is provided below.

  1. slmGetSizes()
  2. slmInit()
  3. slmControl()
  4. slmProcess()

The API functions slmGetSizes and slmInit combine to create and open an SLM instance. The slmControl routine offers run-time configuration control and the slmProcess routine performs the SLM functionality for one direction in a voice channel.

See SLM API return codes for SLM return codes.

SNL Module API

The SNL module follows the relatively simple Embedded Communication Object (ECO) - Lite API model. The complete API for this module is provided below.

  1. snlGetSizes()
  2. snlInit()
  3. snlGetLevels()
  4. snlProcess()

The API functions snlGetSizes and snlInit combine to create and open an SNL instance. The snlProcess routine performs the signal level estimation and must execute on every frame of samples. The snlGetLevels routine may be called whenever the current speech and noise estimates are required.

See SNL API return codes for SNL return codes.

SVD Module API

The SVD module follows the relatively simple Embedded Communication Object (ECO) - Lite API model. The complete API for this module is provided below.

  1. svdGetSizes()
  2. svdInit()
  3. svdGetLevels()
  4. svdGetDecision()
  5. svdProcess()

The API functions svdGetSizes and svdInit combine to create and open an SVD instance. The svdProcess routine performs the voice decision and must execute on every frame of samples. The svdGetLevels routine may be called if the speech or noise estimates are required. The svdGetDecision routine can be called whenever a voice decision is required.

See SVD API return codes for SVD return codes.


VPE: File Index

  • File List
  • Globals

VPE File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
hlc.h [code] | Contains external APIs for the HLC module
slm.h [code] | Contains external APIs for the slm module
snl.h [code] | Contains external APIs for the SNL module
svd.h [code] | Contains external APIs for the SVD module


VPE: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • ctl_code : hlcControl_t
  • frm_len : hlcConfig_t
  • power_tc : hlcConfig_t
  • ramp_out_period : hlcConfig_t
  • srate_factor : hlcConfig_t , slmConfig_t
  • thresh : hlcConfig_t , hlcControl_t
  • u : hlcControl_t
  • valid_bf : hlcConfig_t , slmConfig_t


VPE: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • ctl_code : hlcControl_t
  • frm_len : hlcConfig_t
  • power_tc : hlcConfig_t
  • ramp_out_period : hlcConfig_t
  • srate_factor : hlcConfig_t , slmConfig_t
  • thresh : hlcConfig_t , hlcControl_t
  • u : hlcControl_t
  • valid_bf : hlcConfig_t , slmConfig_t


VPE: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines
  • _
  • h
  • s
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h

- h -

  • hlc_BADPARAM : hlc.h
  • hlc_CFG_BIT_FRM_LEN : hlc.h
  • hlc_CFG_BIT_POWER_TC : hlc.h
  • hlc_CFG_BIT_RAMP_OUT : hlc.h
  • hlc_CFG_BIT_SRATE_FACT : hlc.h
  • hlc_CFG_BIT_THRESH : hlc.h
  • hlc_CTL_DIS : hlc.h
  • hlc_CTL_ENA : hlc.h
  • hlc_CTL_THR : hlc.h
  • hlc_DISABLED : hlc.h
  • hlc_ENABLED : hlc.h
  • hlc_ERROR : hlc.h
  • hlc_NOERR : hlc.h
  • hlc_SRATE_FACTOR_16K : hlc.h
  • hlc_SRATE_FACTOR_8K : hlc.h
  • hlc_TC_PWR_16_MS : hlc.h
  • hlc_TC_PWR_4_MS : hlc.h
  • hlc_TC_PWR_8_MS : hlc.h
  • hlcControl() : hlc.h
  • hlcGetSizes() : hlc.h
  • hlcInit() : hlc.h
  • hlcProcess() : hlc.h

- s -

  • slm_BADPARAM : slm.h
  • slm_CFG_BIT_SRATE : slm.h
  • slm_DISABLE : slm.h
  • slm_ERROR : slm.h
  • slm_MODE1 : slm.h
  • slm_MODE2 : slm.h
  • slm_MODE3 : slm.h
  • slm_MODE4 : slm.h
  • slm_MODE5 : slm.h
  • slm_NOERR : slm.h
  • slm_NUMOF_MODE : slm.h
  • slm_SRATE_FACTOR_16K : slm.h
  • slm_SRATE_FACTOR_8K : slm.h
  • slmControl() : slm.h
  • slmGetSizes() : slm.h
  • slmInit() : slm.h
  • slmProcess() : slm.h
  • snl_BADPARAM : snl.h
  • snl_ENV_Q : snl.h
  • snl_ERR : snl.h
  • snl_INVALID_POW_DB : snl.h
  • snl_NOERR : snl.h
  • snl_SRATE_FACTOR_16K : snl.h
  • snl_SRATE_FACTOR_8K : snl.h
  • snlGetLevels() : snl.h
  • snlGetSizes() : snl.h
  • snlInit() : snl.h
  • snlProcess() : snl.h
  • svd_BADPARAM : svd.h
  • svd_ENV_Q : svd.h
  • svd_ERR : svd.h
  • svd_INVALID_POW_DB : svd.h
  • svd_NOERR : svd.h
  • svd_PWR_Q : svd.h
  • svd_SRATE_16K : svd.h
  • svd_SRATE_8K : svd.h
  • svd_VOICE_ACTIVE : svd.h
  • svd_VOICE_INACTIVE : svd.h
  • svd_VOICE_UNDEFINED : svd.h
  • svdGetDecision() : svd.h
  • svdGetLevels() : svd.h
  • svdGetSizes() : svd.h
  • svdInit() : svd.h
  • svdProcess() : svd.h

- t -

  • ti_mas_vpe_Version___VERS : Version.h
  • ti_mas_vpe_Version__top__ : Version.h
  • ti_mas_vpe_Version_BTYPE : Version.h
  • ti_mas_vpe_Version_BUILD : Version.h
  • ti_mas_vpe_Version_MAJOR : Version.h
  • ti_mas_vpe_Version_MINOR : Version.h
  • ti_mas_vpe_Version_PATCH : Version.h
  • ti_mas_vpe_Version_QUALITY : Version.h
  • ti_mas_vpe_Version_WIDTH : Version.h
  • ti_mas_vpe_Version_XVERTICAL : Version.h

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


VPE: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines

  • __extern : Version.h
  • snl_ENV_Q : snl.h
  • snl_INVALID_POW_DB : snl.h
  • svd_ENV_Q : svd.h
  • svd_INVALID_POW_DB : svd.h
  • svd_PWR_Q : svd.h
  • ti_mas_vpe_Version___VERS : Version.h
  • ti_mas_vpe_Version__top__ : Version.h
  • ti_mas_vpe_Version_BTYPE : Version.h
  • ti_mas_vpe_Version_BUILD : Version.h
  • ti_mas_vpe_Version_MAJOR : Version.h
  • ti_mas_vpe_Version_MINOR : Version.h
  • ti_mas_vpe_Version_PATCH : Version.h
  • ti_mas_vpe_Version_QUALITY : Version.h
  • ti_mas_vpe_Version_WIDTH : Version.h
  • ti_mas_vpe_Version_XVERTICAL : Version.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


VPE: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines
  • h
  • s

- h -

  • hlc_BADPARAM : hlc.h
  • hlc_CFG_BIT_FRM_LEN : hlc.h
  • hlc_CFG_BIT_POWER_TC : hlc.h
  • hlc_CFG_BIT_RAMP_OUT : hlc.h
  • hlc_CFG_BIT_SRATE_FACT : hlc.h
  • hlc_CFG_BIT_THRESH : hlc.h
  • hlc_CTL_DIS : hlc.h
  • hlc_CTL_ENA : hlc.h
  • hlc_CTL_THR : hlc.h
  • hlc_DISABLED : hlc.h
  • hlc_ENABLED : hlc.h
  • hlc_ERROR : hlc.h
  • hlc_NOERR : hlc.h
  • hlc_SRATE_FACTOR_16K : hlc.h
  • hlc_SRATE_FACTOR_8K : hlc.h
  • hlc_TC_PWR_16_MS : hlc.h
  • hlc_TC_PWR_4_MS : hlc.h
  • hlc_TC_PWR_8_MS : hlc.h

- s -

  • slm_BADPARAM : slm.h
  • slm_CFG_BIT_SRATE : slm.h
  • slm_DISABLE : slm.h
  • slm_ERROR : slm.h
  • slm_MODE1 : slm.h
  • slm_MODE2 : slm.h
  • slm_MODE3 : slm.h
  • slm_MODE4 : slm.h
  • slm_MODE5 : slm.h
  • slm_NOERR : slm.h
  • slm_NUMOF_MODE : slm.h
  • slm_SRATE_FACTOR_16K : slm.h
  • slm_SRATE_FACTOR_8K : slm.h
  • snl_BADPARAM : snl.h
  • snl_ERR : snl.h
  • snl_NOERR : snl.h
  • snl_SRATE_FACTOR_16K : snl.h
  • snl_SRATE_FACTOR_8K : snl.h
  • svd_BADPARAM : svd.h
  • svd_ERR : svd.h
  • svd_NOERR : svd.h
  • svd_SRATE_16K : svd.h
  • svd_SRATE_8K : svd.h
  • svd_VOICE_ACTIVE : svd.h
  • svd_VOICE_INACTIVE : svd.h
  • svd_VOICE_UNDEFINED : svd.h


VPE: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • Defines

  • hlcControl() : hlc.h
  • hlcGetSizes() : hlc.h
  • hlcInit() : hlc.h
  • hlcProcess() : hlc.h
  • slmControl() : slm.h
  • slmGetSizes() : slm.h
  • slmInit() : slm.h
  • slmProcess() : slm.h
  • snlGetLevels() : snl.h
  • snlGetSizes() : snl.h
  • snlInit() : snl.h
  • snlProcess() : snl.h
  • svdGetDecision() : svd.h
  • svdGetLevels() : svd.h
  • svdGetSizes() : svd.h
  • svdInit() : svd.h
  • svdProcess() : svd.h


VPE: High Level Compensation (HLC)

High Level Compensation (HLC)

Collaboration diagram for High Level Compensation (HLC):

Detailed Description

HLC is designed to attenuate the incoming signal when the signal level exceeds certain pre-configured threshold to avoid possible distortion due to future flat-top saturation. HLC is a frame-based operation and there's a requirement of minimum 5ms frame size, after HLC parameters are properly configured the signal level will be measured and compared with the threshold, then an attenuation will be calculated and applied to the signal.

Application of attenuation to the signal should not be instantaneous. Rather HLC should gradually ramp in and eventually apply the complete attenuation. The ramping in time constant is relatively low to ensure fast action so that the signal level can be reduced before saturation actually occurs. It is fixed to 10ms/dB for now. Ramping in should be triggered only when the power exceeds thresh. During this period, attenuation could increase or stay constant, based on the changes in signal power.

In the case the signal level goes below thresh, HLC attenuation should disengage, although slowly, so as not to cause sudden changes in the signal level heard by the listener, especially during short pauses in speech. The ramping out time constant is configurable between 10ms to 1000ms per dB reduction in attenuation, specified in 10ms steps. Ramping out should be triggered only for powers below thresh. During this period, attenuation should gradually reduce based on the setting of the ramp-out time period.

Modules

HLC API return codes

Data Structures

struct | hlcConfig_t
HLC configure Structure. More...
struct | hlcControl_t
HLC Control Structure. Contains control commands to change HLC parameters without resetting other parameters. More...

HLC sampling rate factor

Remarks:
These numbers are used as multipliers, so can't be changed to other values.

enum | { hlc_SRATE_FACTOR_8K = 1, hlc_SRATE_FACTOR_16K = 2 }

HLC configure bit fields

enum {
hlc_CFG_BIT_THRESH = 0, hlc_CFG_BIT_RAMP_OUT = 1, hlc_CFG_BIT_POWER_TC = 2, hlc_CFG_BIT_FRM_LEN = 3,
hlc_CFG_BIT_SRATE_FACT = 4
}

HLC state

enum | { hlc_DISABLED = 0, hlc_ENABLED = 1 }

HLC power calculation constant

enum | { hlc_TC_PWR_4_MS = 1, hlc_TC_PWR_8_MS = 2, hlc_TC_PWR_16_MS = 3 }

HLC control code

enum | { hlc_CTL_DIS = 0, hlc_CTL_ENA = 1, hlc_CTL_THR = 2 }

External APIs for HLC

tint | hlcGetSizes (tint *instsize)
To get the size of a HLC instance structure.
tint | hlcInit (void *inst, hlcConfig_t *hlcCfg_info)
Init HLC according to the user configurations.
tint | hlcControl (void *hlcInst, hlcControl_t *hlc_ctrl)
Change parameters on the fly without re-initialzing all HLC parameters.
tint | hlcProcess (void *hlcInst, void *samples)
Calculate and apply attenuation when HLC is enabled.

Enumeration Type Documentation

anonymous enum

Enumerator:
hlc_SRATE_FACTOR_8K | sampling rate is 8kHz
hlc_SRATE_FACTOR_16K | sampling rate is 16kHz

Definition at line 78 of file hlc.h.

anonymous enum

Enumerator:
hlc_CFG_BIT_THRESH | Bit 0 for threshold
hlc_CFG_BIT_RAMP_OUT | Bit 1 for ramp out period
hlc_CFG_BIT_POWER_TC | Bit 2 for power calculation constant
hlc_CFG_BIT_FRM_LEN | Bit 3 for frame length
hlc_CFG_BIT_SRATE_FACT | Bit 4 for sampling rate factor

Definition at line 88 of file hlc.h.

anonymous enum

Enumerator:
hlc_DISABLED | HLC is disabled
hlc_ENABLED | HLC is enabled

Definition at line 100 of file hlc.h.

anonymous enum

Enumerator:
hlc_TC_PWR_4_MS | 4 msec time constant
hlc_TC_PWR_8_MS | 8 msec time constant
hlc_TC_PWR_16_MS | 16 msec time constant

Definition at line 109 of file hlc.h.

anonymous enum

Enumerator:
hlc_CTL_DIS | Disable HLC
hlc_CTL_ENA | Enable HLC
hlc_CTL_THR | Set thresh in hlcConfig_t

Definition at line 147 of file hlc.h.

Function Documentation

tint hlcGetSizes ( tint * instsize )

To get the size of a HLC instance structure.

Remarks:
Function hlcGetSizes() is the first function to be called.
Parameters:
[in,out] instsize Pointer to the size of a HLC instance.
Returns:
hlc_NOERR,
hlc_ERROR,
hlc_BADPARAM

tint hlcInit | ( | void * | inst,
 |  | hlcConfig_t * | hlcCfg_info
 | ) |  |

Init HLC according to the user configurations.

Remarks:
Function hlcInit() needs be called after hlcGetSizes(). After this function call, HLC is disabled.
Parameters:
[in,out] | inst | Pointer to a HLC instance structure.
[in] | hlcCfg_info | Pointer to a configuration structure hlcConfig_t.
Returns:
hlc_NOERR,
hlc_ERROR,
hlc_BADPARAM

tint hlcControl | ( | void * | hlcInst,
 |  | hlcControl_t * | hlc_ctrl
 | ) |  |

Change parameters on the fly without re-initialzing all HLC parameters.

Remarks:
Function hlcControl() must be called after hlcInit() to enable HLC. Also it can be called anytime to reconfigure thresh in the HLC instance.
Parameters:
[in,out] | hlcInst | Pointer to a HLC instance.
[in] | hlc_ctrl | Pointer to a control structure hlcControl_t.
Returns:
hlc_NOERR,
hlc_ERROR

tint hlcProcess | ( | void * | hlcInst,
 |  | void * | samples
 | ) |  |

Calculate and apply attenuation when HLC is enabled.

Remarks:
This function is the function that processes the voice samples and needs to be called every frame.
Parameters:
[in] | hlcInst | Pointer to a HLC instance.
[in,out] | samples | Pointer to the input/output signal buffer
Returns:


VPE: Signal Limiter(SLM)

Signal Limiter(SLM)

Collaboration diagram for Signal Limiter(SLM):

Detailed Description

When a voice signal is saturated, the resulting signal is generally nonlinear in nature due to the (non-linear) saturation process. The Signal Limiter reduces the voice signal to prevent the undesirable effects of hard limiting.

Modules

SLM API return codes

Data Structures

struct | slmConfig_t
SLM configure Structure. More...
struct | slmConfig_t
SLM configure Structure. More...

SLM Mode Definitions

enum {
slm_DISABLE = 0, slm_MODE1 = 1, slm_MODE2 = 2, slm_MODE3 = 3,
slm_MODE4 = 4, slm_MODE5 = 5, slm_NUMOF_MODE = slm_MODE5
}

SLM sampling rate factor

Remarks:
These numbers are used as table indeces, so can't be changed.

enum | { slm_SRATE_FACTOR_16K = 1, slm_SRATE_FACTOR_8K = 2 }

SLM Configuration Structure Valid Bit-field

enum | { slm_CFG_BIT_SRATE = 0 }

External APIs for SLM

tint | slmGetSizes (tint *instsize)
Function slmGetSizes() get the size of a SLM instance.
tint | slmInit (void *inst, slmConfig_t *cfg)
Function slmInit() initializes SLM.
tint | slmControl (void *inst, tint mode)
Function slmControl() configure SLM with different types of limiter.
tint | slmProcess (void *inst, void *speechSamples, tint frame_length)
This is the function that performs the signal attenuation.

Enumeration Type Documentation

anonymous enum

Enumerator:
slm_DISABLE | Disable signal limiter
slm_MODE1 | Signal limiter mode 1: Max -10.38 dBm0, Min -17.25 dBm0
slm_MODE2 | Signal limiter mode 2: Max -8.25 dBm0, Min -15.34 dBm0
slm_MODE3 | Signal limiter mode 3: Max -6.44 dBm0, Min -13.43 dBm0
slm_MODE4 | Signal limiter mode 4: Max -4.28 dBm0, Min -11.41 dBm0
slm_MODE5 | Signal limiter mode 5: Max -2.17 dBm0, Min -9.18 dBm0
slm_NUMOF_MODE | Number of different SLM

Definition at line 37 of file slm.h.

anonymous enum

Enumerator:
slm_SRATE_FACTOR_16K | sampling rate is 16kHz
slm_SRATE_FACTOR_8K | sampling rate is 8kHz

Definition at line 67 of file slm.h.

anonymous enum

Enumerator:
slm_CFG_BIT_SRATE Bit 0: sampling rate factor

Definition at line 76 of file slm.h.

Function Documentation

tint slmGetSizes ( tint * instsize )

Function slmGetSizes() get the size of a SLM instance.

Remarks:
Function slmGetSizes() is the first function to be called.
Parameters:
[in,out] instsize Pointer to the size of a SLM instance .
Returns:
slm_NOERR,
slm_ERROR

tint slmInit | ( | void * | inst,
 |  | slmConfig_t * | cfg
 | ) |  |

Function slmInit() initializes SLM.

Remarks:
Function slmInit() must be called after slmGetSizes(). After the function call, SLM is disabled.
Parameters:
[in,out] | inst | Pointer to a SLM instance structure
[in] | cfg | Pointer to a configuration structure slmConfig_t
Returns:
slm_NOERR,
slm_ERROR,
slm_BADPARAM

tint slmControl | ( | void * | inst,
 |  | tint | mode
 | ) |  |

Function slmControl() configure SLM with different types of limiter.

Remarks:
Function slmControl() must be called after slmInit() to enable SLM by setting the mode to one of the operational modes. All internal parameters will be reset whenever there's a mode change
Parameters:
[in,out] | inst | Pointer to a SLM instance structure.
[in] | mode | one of slm modes .
Returns:
slm_NOERR,
slm_ERROR,
slm_BADPARAM

tint slmProcess | ( | void * | inst,
 |  | void * | speechSamples,
 |  | tint | frame_length
 | ) |  |

This is the function that performs the signal attenuation.

Remarks:
This function can only be called after slmInit() and slmControl() to make SLM take effect and it needs to be called every frame.
Parameters:
[in] | inst | Pointer to a SLM instance structure.
[in,out] | speechSamples | Pointer to the voice buffer
[in] | frame_length | Number of samples processed
Returns:
slm_NOERR


VPE: Siganl and Noise Level estimator (SNL)

Siganl and Noise Level estimator (SNL)

Collaboration diagram for Siganl and Noise Level estimator (SNL):

Detailed Description

SNL estimates the speech and background noise level of the incoming voice signal.

Modules

SNL API return codes

SNL sampling rate factor

Remarks:
These numbers are used as multipliers, so can't be changed to other values.

enum | { snl_SRATE_FACTOR_8K = 1, snl_SRATE_FACTOR_16K = 2 }
#define | snl_ENV_Q 3
#define | snl_INVALID_POW_DB 0x7F

External APIs for SNL

tint | snlGetSizes (tint *instsize)
Obtain from SNL the memory requirements of an instance.
Remarks:
This must be the first function to be called before calling any other SNL APIs.

tint | snlInit (void *inst, tint samp_rate)
Initialize signal level estimator
Remarks:
This is the function to call after calling snlGetSizes(), only samp_rate is user configurable. After this function call, both signal and noise level are initialized to snl_INVALID_POW_DB, which is not considered a valid result from SNL.

tint | snlProcess (void *inst, linSample *samples, tuint nSamps)
Signal and noise level estimator
Remarks:
This is the function that processes the signal and calculates various parameters needed for level estimation. This function needs to be called every frame. There is a limitation of 1.5ms for the frame size, which will equivalent to 12 for the nSamps parameter for 8kHz sampling rate and 24 for the nSamps parameter for 16kHz sampling rate.

tint | snlGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh)
Get speech and noise levels
Remarks:
This is the function to be called whenever the levels are needed. It can be called every frame or when requested.

Define Documentation

#define snl_ENV_Q 3

The Fract Q format for the adaptive envelope threshold returned by snlGetLevels().

Definition at line 69 of file snl.h.

#define snl_INVALID_POW_DB 0x7F

The initialization value for the signal and noise dB value. It's not a valid result for either signal or noise level estimation.

See also:

Definition at line 77 of file snl.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
snl_SRATE_FACTOR_8K | sampling rate is 8kHz
snl_SRATE_FACTOR_16K | sampling rate is 16kHz

Definition at line 59 of file snl.h.

Function Documentation

tint snlGetSizes ( tint * instsize )

Obtain from SNL the memory requirements of an instance.

Remarks:
This must be the first function to be called before calling any other SNL APIs.

Parameters:
[out] instsize The size of the instance
Returns:
snl_NOERR,
snl_ERR : if instsize==NULL

tint snlInit | ( | void * | inst,
 |  | tint | samp_rate
 | ) |  |

Initialize signal level estimator

Remarks:
This is the function to call after calling snlGetSizes(), only samp_rate is user configurable. After this function call, both signal and noise level are initialized to snl_INVALID_POW_DB, which is not considered a valid result from SNL.

Parameters:
[out] *inst Pointer to the SNL instance
[in] samp_rate snl_SRATE_FACTOR_8K
snl_SRATE_FACTOR_16K
Returns:
snl_NOERR,
snl_ERR, :if inst==NULL
snl_BADPARAM :if samp_rate is not one of snl_SRATE_FACTOR_8K and snl_SRATE_FACTOR_16K

tint snlProcess | ( | void * | inst,
 |  | linSample * | samples,
 |  | tuint | nSamps
 | ) |  |

Signal and noise level estimator

Remarks:
This is the function that processes the signal and calculates various parameters needed for level estimation. This function needs to be called every frame. There is a limitation of 1.5ms for the frame size, which will equivalent to 12 for the nSamps parameter for 8kHz sampling rate and 24 for the nSamps parameter for 16kHz sampling rate.

Parameters:
[in,out] | *inst | Pointer to the instance
[in] | *samples | Pointer to samples
[in] | nSamps | Number of samples
Returns:
snl_NOERR

tint snlGetLevels | ( | void * | inst,
 |  | Fract * | spchdB,
 |  | Fract * | noisedB,
 |  | UFract * | thresh
 | ) |  |

Get speech and noise levels

Remarks:
This is the function to be called whenever the levels are needed. It can be called every frame or when requested.

Parameters:
[in] | *inst | Pointer to the instance
[out] | *spchdB | pointer to returned speech power level in Q0 dB
[out] | *noisedB | pointer to returned noise power level in Q0 dB
[out] | *thresh | pointer to returned adaptive threshold for envelope in Qsnl_ENV_Q linear amplitude.
Returns:
snl_NOERR


VPE: Simple Voice activity Detector (SVD)

Simple Voice activity Detector (SVD)

Collaboration diagram for Simple Voice activity Detector (SVD):

Detailed Description

The SVD module examines the signal and noise levels measured by SNL and makes a decision whether voice is active or not.

Modules

SVD API return codes

SVD decision codes

enum | { svd_VOICE_UNDEFINED = -1, svd_VOICE_INACTIVE = 0, svd_VOICE_ACTIVE = 1 }

SVD sampling rate factor

Remarks:
These numbers are used as multipliers, so can't be changed to other values.

enum | { svd_SRATE_8K = 1, svd_SRATE_16K = 2 }
#define | svd_ENV_Q 3
#define | svd_PWR_Q 0
#define | svd_INVALID_POW_DB 0x7F

External APIs for SVD

tint | svdGetSizes (tint *instsize)
Obtain from SVD the instance memory requirements.
Remarks:
This must be the first function to be called before calling any other SVD APIs.

tint | svdInit (void *inst, tint samp_rate)
Initialize simple voice activity detector
Remarks:
This function is called after svdGetSizes(), and initializes the instance.

tint | svdProcess (void *inst, linSample *samples, tuint nSamps)
Simple VAD detection process
Remarks:
This is the function that processes the signal and makes the Voice/Noise decision. The function should be called every frame. The frame size must be at least 1.5ms (12 for 8kHz, 24 for 16kHz).

tint | svdGetDecision (void *inst, LFract *sig_pow)
Get Voice decision
Remarks:
This is the function to call when a Voice/Noise decision is needed. It can be called as needed.

tint | svdGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh)
Get speech and noise levels
Remarks:
This is the function to be called whenever the levels are needed. It can be called every frame or when requested.

Define Documentation

#define svd_ENV_Q 3

The Fract Q format for the adaptive envelope threshold returned by svdGetLevels().

Definition at line 78 of file svd.h.

#define svd_PWR_Q 0

The Fract Q format for the speech and noise power level returned by svdGetLevels().

Definition at line 85 of file svd.h.

#define svd_INVALID_POW_DB 0x7F

The initialization value for the signal and noise dB value. It's not a valid result for either signal or noise level estimation.

See also:

Definition at line 93 of file svd.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
svd_VOICE_UNDEFINED | VAD decision undefined
svd_VOICE_INACTIVE | VAD decision NO VOICE
svd_VOICE_ACTIVE | VAD decision VOICE

Definition at line 57 of file svd.h.

anonymous enum

Enumerator:
svd_SRATE_8K | sampling rate is 8kHz
svd_SRATE_16K | sampling rate is 16kHz

Definition at line 68 of file svd.h.

Function Documentation

tint svdGetSizes ( tint * instsize )

Obtain from SVD the instance memory requirements.

Remarks:
This must be the first function to be called before calling any other SVD APIs.

Parameters:
[out] instsize The size of the instance
Returns:
svd_NOERR,
svd_ERR : if instsize==NULL

tint svdInit | ( | void * | inst,
 |  | tint | samp_rate
 | ) |  |

Initialize simple voice activity detector

Remarks:
This function is called after svdGetSizes(), and initializes the instance.

Parameters:
[in] | *inst | Pointer to the SVD instance memory, must NOT be NULL.
[in] samp_rate svd_SRATE_8K
svd_SRATE_16K
[out] | *inst | Initialized SVD instance memory.
Returns:
svd_NOERR,
svd_ERR, :if inst==NULL
svd_BADPARAM :if samp_rate is not one of svd_SRATE_8K or svd_SRATE_16K

tint svdProcess | ( | void * | inst,
 |  | linSample * | samples,
 |  | tuint | nSamps
 | ) |  |

Simple VAD detection process

Remarks:
This is the function that processes the signal and makes the Voice/Noise decision. The function should be called every frame. The frame size must be at least 1.5ms (12 for 8kHz, 24 for 16kHz).

Parameters:
[in,out] | *inst | Pointer to the instance
[in] | *samples | Pointer to samples
[in] | nSamps | Number of samples, or frame size
Returns:
svd_NOERR,
svd_ERR,

tint svdGetDecision | ( | void * | inst,
 |  | LFract * | sig_pow
 | ) |  |

Get Voice decision

Remarks:
This is the function to call when a Voice/Noise decision is needed. It can be called as needed.

Parameters:
[in] | *inst | Pointer to the instance
[out] | sig_pow | Exponentially averaged signal power
Returns:
svd_VOICE_UNDEFINED
svd_VOICE_INACTIVE
svd_VOICE_ACTIVE

tint svdGetLevels | ( | void * | inst,
 |  | Fract * | spchdB,
 |  | Fract * | noisedB,
 |  | UFract * | thresh
 | ) |  |

Get speech and noise levels

Remarks:
This is the function to be called whenever the levels are needed. It can be called every frame or when requested.

Parameters:
[in] | *inst | Pointer to the instance
[out] | *spchdB | pointer to returned speech power level in Q0 dB
[out] | *noisedB | pointer to returned noise power level in Q0 dB
[out] | *thresh | pointer to returned adaptive threshold for envelope in Qsvd_ENV_Q linear amplitude.
Returns:
svd_NOERR


VPE: HLC API return codes

HLC API return codes
[High Level Compensation (HLC)]

Collaboration diagram for HLC API return codes:

Detailed Description

These are the return codes for the HLC module API functions.

HLC Function Return Value Definitions

enum { hlc_NOERR = 0, hlc_ERROR = 1, hlc_BADPARAM = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
hlc_NOERR | Returned from function without error
hlc_ERROR | Returned from function with error
hlc_BADPARAM | Returned from function with wrong parameters

Definition at line 65 of file hlc.h.


VPE: SLM API return codes

SLM API return codes
[Signal Limiter(SLM)]

Collaboration diagram for SLM API return codes:

Detailed Description

These are the return codes for the SLM module API functions.

SLM Function Return Value Definitions

enum { slm_NOERR = 0, slm_ERROR = 1, slm_BADPARAM = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
slm_NOERR | Functions returned without error
slm_ERROR | Functions returned with error, such as NULL point
slm_BADPARAM | Functions returned with bad parameters

Definition at line 55 of file slm.h.


VPE: SNL API return codes

SNL API return codes
[Siganl and Noise Level estimator (SNL)]

Collaboration diagram for SNL API return codes:

Detailed Description

These are the return codes for the SNL module API functions.

SNL Function Return Value Definitions

enum { snl_NOERR = 0, snl_ERR = 1, snl_BADPARAM = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
snl_NOERR | success, no error
snl_ERR | failed
snl_BADPARAM | Returned from function with wrong parameters

Definition at line 46 of file snl.h.


VPE: SVD API return codes

SVD API return codes
[Simple Voice activity Detector (SVD)]

Collaboration diagram for SVD API return codes:

Detailed Description

These are the return codes for the SVD module API functions.

SVD Function Return Value Definitions

enum { svd_NOERR = 0, svd_ERR = 1, svd_BADPARAM = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
svd_NOERR | success, no error
svd_ERR | failed
svd_BADPARAM | Returned from function with wrong parameters

Definition at line 45 of file svd.h.


VPE: hlc.h File Reference

  • File List
  • Globals

hlc.h File Reference

Detailed Description

Contains external APIs for the HLC module.

(C) Copyright 2008, Texas Instruments, Inc.

Definition in file hlc.h.

#include <ti/mas/types/types.h>

Include dependency graph for hlc.h:

Go to the source code of this file.

Data Structures

struct | hlcConfig_t
HLC configure Structure. More...
struct | hlcControl_t
HLC Control Structure. Contains control commands to change HLC parameters without resetting other parameters. More...

Enumerations

HLC Function Return Value Definitions
enum | { hlc_NOERR = 0, hlc_ERROR = 1, hlc_BADPARAM = 2 }
HLC sampling rate factor
Remarks:
These numbers are used as multipliers, so can't be changed to other values.

enum | { hlc_SRATE_FACTOR_8K = 1, hlc_SRATE_FACTOR_16K = 2 }
HLC configure bit fields
enum {
hlc_CFG_BIT_THRESH = 0, hlc_CFG_BIT_RAMP_OUT = 1, hlc_CFG_BIT_POWER_TC = 2, hlc_CFG_BIT_FRM_LEN = 3,
hlc_CFG_BIT_SRATE_FACT = 4
}
HLC state
enum | { hlc_DISABLED = 0, hlc_ENABLED = 1 }
HLC power calculation constant
enum | { hlc_TC_PWR_4_MS = 1, hlc_TC_PWR_8_MS = 2, hlc_TC_PWR_16_MS = 3 }
HLC control code
enum | { hlc_CTL_DIS = 0, hlc_CTL_ENA = 1, hlc_CTL_THR = 2 }

Functions

External APIs for HLC
tint | hlcGetSizes (tint *instsize)
To get the size of a HLC instance structure.
tint | hlcInit (void *inst, hlcConfig_t *hlcCfg_info)
Init HLC according to the user configurations.
tint | hlcControl (void *hlcInst, hlcControl_t *hlc_ctrl)
Change parameters on the fly without re-initialzing all HLC parameters.
tint | hlcProcess (void *hlcInst, void *samples)
Calculate and apply attenuation when HLC is enabled.


VPE: hlc.h Source File

  • File List
  • Globals

hlc.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:header file of HLC (high-level compensation)
00003  ******************************************************************************
00004  * FILE NAME:   hlc.h
00005  *
00006  * DESCRIPTION: Contains external definitions&functions prototypes for HLC
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #ifndef _HLC_H
00011 #define _HLC_H
00012
00020 /* System level header files */
00021 #include <ti/mas/types/types.h>            /* DSP types */
00022
00055 /* @{ */
00056
00064 /* @{ */
00065 enum {
00066  hlc_NOERR    = 0,
00067  hlc_ERROR    = 1,
00068  hlc_BADPARAM = 2
00069 };
00070 /*  @} */
00078 enum {
00079   hlc_SRATE_FACTOR_8K  = 1,
00080   hlc_SRATE_FACTOR_16K = 2
00081 };
00082
00083
00088 enum {
00089   hlc_CFG_BIT_THRESH      = 0,
00090   hlc_CFG_BIT_RAMP_OUT    = 1,
00091   hlc_CFG_BIT_POWER_TC    = 2,
00092   hlc_CFG_BIT_FRM_LEN     = 3,
00093   hlc_CFG_BIT_SRATE_FACT  = 4
00094 };
00095
00100 enum {
00101   hlc_DISABLED = 0,
00102   hlc_ENABLED  = 1
00103 };
00104
00109 enum {
00110   hlc_TC_PWR_4_MS  = 1,
00111   hlc_TC_PWR_8_MS  = 2,
00112   hlc_TC_PWR_16_MS = 3
00113 };
00114
00122 typedef struct{
00123   tuint      valid_bf;
00125   Fract      thresh;
00128   tint       ramp_out_period;
00130   tint       power_tc;
00136   tint       srate_factor;
00140   tint       frm_len;
00141 } hlcConfig_t;
00142
00147 enum {
00148   hlc_CTL_DIS = 0,
00149   hlc_CTL_ENA = 1,
00150   hlc_CTL_THR = 2
00151 };
00152
00153
00160 typedef struct{
00161   tint    ctl_code;
00163   union {
00164     Fract   thresh;
00166   } u;
00167 } hlcControl_t;
00168
00173 /* @{ */
00186 tint hlcGetSizes (tint *instsize);
00187
00203 tint hlcInit(void *inst, hlcConfig_t *hlcCfg_info);
00204
00220 tint hlcControl(void *hlcInst, hlcControl_t *hlc_ctrl);
00221
00234 tint hlcProcess (void *hlcInst, void *samples);
00235
00236 /* @} */
00237 /* @} */ /* ingroup HLC */
00238 #endif
00239
00240 /* end of hlc.h */
00241


VPE: HLC Configuration

VPE (Voice Processing Elements) Package

HLC Configuration

HLC Initialization

The following HLC parameters are configurable on instance initialization:

  • Threshold (default - 0 dBm0)
  • Ramp out time constant (default - 700ms/dB)
  • Power measurement time constant (default - 4ms)
  • Sampling rate (default - 8 KHz)
  • Frame size (default - 5ms)

HLC Configuration

The following HLC parameters are run-time configurable:

  • Threshold


VPE: VPE (Voice Processing Elements) Package

VPE (Voice Processing Elements) Package

Release 3.4.2.0

Page Contents

  1. Description
  2. Integration
  3. Default Configuration
  4. Performance
  5. Limitations
  6. Standards Compliance
  7. Dependent Packages

Description

The VPE component provides a collection of modules that may function either independently as a group to either enhance voice signals with respect to some metric or provide information about the signals such as signal level, noise level, etc.

VPE supports the following features:

  1. High Level Compensation (HLC): Attenuate the incoming signal to avoid future saturation.
  2. Signal Limiter (SLM): A soft limiter that attenuates the signal without any delay to prevent signal saturation.
  3. Signal Noise Level estimator (SNL): Estimate the voice and noise levels within the signal path.
  4. Simple Voice Activity Detection (SVD): Simple voice activity detection (VAD) based almost exclusively on the SNL module.

Additional links: Detailed VPE Description

Integration

The VPE component can be integrated into a system to provide the voice processing modules as described at the below link. There, we descibe the build process, integration/link process and global structure initialization requirements.

Object deliveries come with the libraries built and ready for integration. Accordingly, the build process only applies to Source deliveries in which the VPE code may be customized and the libraries built.

Note:
  1. Source deliveries come with libraries pre-built. The build process is only required if changes to the source code are made.

Additional links: | VPE External API
 | VPE Integration

Default Configuration

Since the VPE modules follow the ECO-lite specification, the majority of the configuration for each module is performed during module initialization (e.g., hlcInit). We provide the details for each module via the links below.

Additional links: | HLC Configuration
 | SLM Configuration
 | SNL Configuration
 | SVD Configuration

Performance

HLC and SLM Combination

Though VPE modules HLC and SLM may be used independently, improved performance can be achieved by using the two in conjunction. This is because HLC can help minimize SLM distortion. At the same time, SLM will benefit HLC via quick reaction to signal level changes. By using them together, we benefit by both limiting the signal quickly while minimizing the incurred distortion.

The preferred manner to employ HLC and SLM together is to pass the data through the HLC first, followed by the SLM. When using the two modules together, the following configuration(s) are recommended:

HLC with SLM Recommended Configuration
Config ID | HLC Threshold | SLM Mode
1 | -10 dBm0 | 5
2 | -12 dBm0 | 4
3 | -14 dBm0 | 3
4 | -16 dBm0 | 2
5 | -18 dBm0 | 1

Using the above optimal configurations as a starting point, the following modifications may be employed if/when necessary:

  1. Use a lower HLC threshold (-12dBm is lower than -10dBm) for a given SLM mode.
  2. Use a higher SLM mode (mode 5 is higher than mode 4) for a given HLC threshold the same.

The initial signal overshoot will be larger when departing from the optimal configurations. Violating any of the above conditions may result in SLM dominating the signal conditioning eventually resulting in reduced voice quality due to nonlinear distortion.

SLM Efficiency

The SLM is a frame-based operation. Though there's no limitation on the frame size, larger frame sizes will reduce overhead, thus resulting in better MIPS efficiency.

SLM Effects

The signal limiter function does change the waveform and could distort tone signals when they are passed in-band. Furthermore, the waveform changes do result in lower objective voice quality scores. These are all expected by design.

Module Measures

Performance measures for all VPE modules are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

High Level Compensation (HLC)

  1. The frame size must be a multiple of 5ms.

Signal Limiter (SLM)

  1. N/A

Speech & Noise Level estimator (SNL)

  1. The frame size must be at least 1.5ms

Simple Voice Activity Detector (SVD)

  1. N/A

Standards Compliance

N/A

Dependent Packages

The VPE package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the table below.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)

VPE Required Packages
Package | File Name | Compatibility Key
ti.mas.vpe | ti_mas_vpe_<fmt>_c<rtarg>_3_3_0_0.zip | [3,0,1,0]
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<rtarg>_5_5_0_1.zip | [5,0,5,0]
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<rtarg>_2_4_1_0.zip | [2,0,5,0]
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<rtarg>_4_7_0_1.zip | [4,0,6,0]
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<rtarg>_4_6_0_2.zip | [2,0,3,0]

Target Naming Conventions
Target | RTSC Naming (<rtarg>) | XDC Naming (<xtarg>)
C55x Large Memory Model | 55l | C55_large
C64x Little Endian | 64le | C64
C64x Big Endian | 64be | C64_big_endian
C64x+ Little Endian | 64Ple | C64P
C64x+ Big Endian | 64Pbe | C64P_big_endian

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <rtarg> represents the target platform using the RTSC naming convention (see table below).
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the name. This will depend on the delivery. A package name ending with the version number only implies a final release delivery


VPE: VPE Integration

VPE (Voice Processing Elements) Package

VPE Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking VPE with System

XDC Build Process

Required Tools

The following tools are required to build the VPE component (links provided). Download and install all tools to a single local (C:) directory, for example c:\tools.

  1. Code Generation (download)
    • C55xx: CG Tools version 4.1.0
    • C64xx: CG Tools version 6.0.15
  2. XDC (download)
    • XDC Tools version 3.20.0.41
  3. xDAIS (download)
    • xDAIS Developer's Kit version 5.21

Note:
  1. A "My.TI" account is required for download and can be registered at http://my.ti.com.

Windows Configuration

Once all tools are properly installed, the environment will need to be configured to recognize the tool paths. A Windows batch file should be created to provide a consistent manner to achieve this. The example below can used (cut & paste) to create a setenv.bat batch file in the ...\ti\mas\swtools directory.

Assumptions:
  1. The XDC tools were installed in c:\tools
  2. The C55 code generation tools were installed in c:\tools\cgen_4_0_1
  3. The C64 code generation tools were installed in c:\tools\cgen_6_0_15
  4. The xDAIS developr's kit was installed in c:\tools\xdais_5_21

    @echo off
    rem # *************************************************************************
    rem # *** Version information (ONLY EDIT THIS SECTION)
    rem # *************************************************************************
    set LOCAL_TOOLSDIR=tools
    set XDCBASE=xdctools_3_20_00_41
    set C55CODEGENBASE=cgen_4_0_1
    set C64CODEGENBASE=cgen_6_0_15
    set XDAISBASE=xdais_5_21

    rem # *************************************************************************
    rem # *** Set up tools directory
    rem # *************************************************************************
    set LOCAL_TOOLSDIR_DOS=c:\%LOCAL_TOOLSDIR%

    rem # *************************************************************************
    rem # ** Set code generation tools path
    rem # *************************************************************************
    set C55CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C55CODEGENBASE%
    set C64CODEGENTOOL=%LOCAL_TOOLSDIR_DOS%\%C64CODEGENBASE%

    rem # *************************************************************************
    rem # ** Set the PATH
    rem # *************************************************************************
    set PATH=%SystemRoot%;%SystemRoot%\system32
    set PATH=%PATH%;%LOCAL_TOOLSDIR_DOS%\%XDCBASE%

    rem # *************************************************************************
    rem # ** Create environment variables for XDC
    rem # *************************************************************************
    set XDCCGROOT=%LOCAL_TOOLSDIR_DOS%
    set xdc=\%LOCAL_TOOLSDIR%\%XDCBASE%\xdc.exe $*

    rem # *************************************************************************
    rem # ** Set the XDC PATH
    rem # *************************************************************************
    set XDCPATH=%LOCAL_TOOLSDIR_DOS%\%XDCBASE%\packages
    set XDCPATH=%XDCPATH%;%LOCAL_TOOLSDIR_DOS%\%XDAISBASE%\packages

    rem # *************************************************************************
    rem # ** Identify the config.bld file
    rem # *************************************************************************
    xs -f setconfig.js
    call tempcfg
    del tempcfg.bat

    rem # End of file

Linux Configuration

TBD

Compilation

To build the VPE package, ensure (again) that all packages provided with the build have been extracted to a common working directory (as described in VPE Integration). Change to the swtools directory and configure the build environment by executing the setenv.bat batch file. To build the VPE using the XDC tools, change to the VPE directory and proceed.

With the environment configured, XDC may be eployed to build the VPE and its dependent packages. The four XDC commands below are all that is needed to clean and build any of the VPE packages. The first two commands provide a means to clean and build the VPE package (alone). Nothing further is needed unless the source for a dependent packages has changed.

If the source for any of the dependent packages has changed, commands (3) and (4) below provide a mechanism to clean and build both the VPE and all dependent packages.

Note:
  1. In the above, the <WORK>/ti/mas/ path is assumed and just the sub-directories are specified (e.g., VPE).

The XDC environment provides several build options.

  1. xdc clean
    • Removes all generated VPE build files
    • Analagous to "make clean"

  2. xdc XDCARGS="c<rtarg> obj"
    • Builds the VPE for the target specified by <rtarg> (see Dependent Packages)

  3. xdc XDCARGS="c<rtarg> obj" -PD .
    • Builds the VPE as in (2) above
    • The "-PD ." option ensures that all dependent packages are built as well (if needed).

  4. xdc clean -PD .
    • Removes all generated VPE build files as in (1) above
    • Removes all generated build files for all VPE dependent packages

Make Build Process

Each MAS component that generates a library or an executable artifact creates, as part of the build process, a GNU "makefile" in its root folder. This makefile provides the list of all tools and common build utilities required for generating the respective artifacts.

For each artifact generated by the package there is an additonal target makefile kept at the destination directory of the artifact. The top-level "makefile" recursively invokes each artifact makefile as required by the component build.

Procedure

The build procedure using make rather than the XDC tools follows:

Required Tools:

  1. Cygwin tools (Windows only) (Verified with Cygwin version 1.18)
  2. Texas Instruments Codegen Tools for the target processor

Procedure:

  1. Add "cygwin/bin" to the environment PATH (Windows only)
  2. Correct the XXX_GEN_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XXX_GEN_INSTALL_DIR in the environment with the correct tools PATH.
  3. Correct the MAS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the MAS_INSTALL_DIR in the environment to match the installation PATH.
  4. Correct the XDAIS_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDAIS_INSTALL_DIR in the environment with the correct tools PATH.
  5. Correct the XDC_INSTALL_DIR path in the "makefile" by:
    1. Directly modifying the makefile.
    2. Setting the XDC_INSTALL_DIR in the environment with the correct tools PATH.
  6. The make targets supported are:
    1. "all": Build all library and executable artifacts. For executable it recursively builds all the dependent components as well.
    2. "clean": Clean all generated object files and artifacts
    3. "cleanall": Cleans all generated artifacts of the components as well its dependent component.

Notes:
  1. If you are building C55x library (for example), correct the C55x tools path only. You can ignore other codegen tool paths.
  2. Ignore steps 4 - 5 if not using XDAIS

Linking VPE with System

The VPE and each of its dependent packages (see Dependent Packages) should be expanded (unzipped) to a common working directory (<WORK>). This will create the following directory structure under the common directory.

  <WORK>/ti/mas/fract
               /swtools
               /vpe
               /types
               /util

Note:
  1. This directory structure and its content should be maintained to allow subsequent compilation.

Include Requirements

The following header file must always be included in any source file that references the VPE API:

  1. #include <ti/mas/types/types.h>

The following header files must be included in any source file that references the respective VPE module API:

  1. #include <ti/mas/vpe/hlc.h>
  2. #include <ti/mas/vpe/slm.h>
  3. #include <ti/mas/vpe/snl.h>
  4. #include <ti/mas/vpe/svd.h>

The compile-time option below is required such that <WORK> resides in the compiler's include path.

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

When compiling source files that include RTSC package header files (e.g., hlc.h) the following compiler option must be specified:

  1. -Dti_targets_<xtarg>

Note:
  1. <xtarg> represents the target platform using the XDC naming convention (see Dependent Packages).

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. ti\mas\vpe\c<rtarg>\vpe_c.a<rtarg>
  4. ti\mas\vpe\c<rtarg>\vpe_a.a<rtarg>


VPE: Memory Requirements

VPE (Voice Processing Elements) Package

Memory Requirements

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target

Assumptions

Data memory numbers are for the default configuration within the unit test. The tables below were completed by observing the test image for each corresponding target.

Note:
  1. SVD program memory doesn't include SNL (required by SVD)

C55x Target

VPE C55x Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 940 (bytes) | 12 (words) | 16 (words)
SLM | 344 (bytes) | 95 (words) | 1 (words)
SNL | 1007 (bytes) | 0 (words) | 10 (words)
SVD | 269 (bytes) | 0 (words) | 14 (words)

C64x Target

VPE C64x Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 2688 (bytes) | 24 (bytes) | 32 (bytes)
SLM | 896 (bytes) | 190 (bytes) | 2 (bytes)
SNL | 1504 (bytes) | 0 (bytes) | 20 (bytes)
SVD | 544 (bytes) | 0 (bytes) | 28 (bytes)

C64x+ Target

VPE C64x+ Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 2016 (bytes) | 24 (bytes) | 32 (bytes)
SLM | 704 (bytes) | 190 (bytes) | 2 (bytes)
SNL | 1408 (bytes) | 0 (bytes) | 20 (bytes)
SVD | 416 (bytes) | 0 (bytes) | 28 (bytes)


VPE: MIPS Requirements

VPE (Voice Processing Elements) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target

Assumptions

MIPS numbers are measured using the profiler of the simulator. All estimations are based on a 5ms frame size. Code and data are placed in the internal memory.

C55x Target

Profiling specifics:

  • C55xx Rev3.0 CPU Cycle Accurate Simulator used
  • All code and data placed in RAM

VPE C55x MIPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.20 | 0.38 | 0.19 | 0.32
SLM | 0.14 | 0.27 | 0.14 | 0.27
SNL | 0.15 | 0.15 | 0.08 | 0.08
SVD | 0.17 | 0.20 | 0.13 | 0.16

C64x Target

Profiling specifics:

  • C6416 Device Cycle Accurate Simulator used
  • L1 cache enabled
  • L1 cache flushed every frame
  • L2 used as SRAM
  • L2 cache not enabled

VPE C64x MIPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.17 | 0.25 | 0.13 | 0.17
SLM | 0.10 | 0.18 | 0.10 | 0.17
SNL | 0.10 | 0.10 | 0.09 | 0.09
SVD | 0.15 | 0.19 | 0.12 | 0.18

C64x+ Target

Profiling specifics:

  • C6455 Simulator(with VCP and TCP) used
  • L1 cache enabled
  • L2 configured for 32kbyte cache, the rest SRAM
  • Cache flushed every frame

VPE C64x+ MIPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.15 | 0.23 | 0.11 | 0.15
SLM | 0.10 | 0.17 | 0.10 | 0.17
SNL | 0.06 | 0.06 | 0.06 | 0.06
SVD | 0.13 | 0.17 | 0.07 | 0.15


VPE: Module Index

VPE Modules

Here is a list of all modules:
  • High Level Compensation (HLC)
    • HLC API return codes
  • Signal Limiter(SLM)
    • SLM API return codes
  • Siganl and Noise Level estimator (SNL)
    • SNL API return codes
  • Simple Voice activity Detector (SVD)
    • SVD API return codes


VPE: Page Index

VPE Related Pages

Here is a list of all related documentation pages:
  • Standard Compliance
  • Disclaimer


VPE: slm.h File Reference

  • File List
  • Globals

slm.h File Reference

Detailed Description

Contains external APIs for the slm module.

(C) Copyright 2008, Texas Instruments, Inc.

Definition in file slm.h.

#include <ti/mas/types/types.h>

Include dependency graph for slm.h:

Go to the source code of this file.

Data Structures

struct | slmConfig_t
SLM configure Structure. More...

Enumerations

SLM Mode Definitions
enum {
slm_DISABLE = 0, slm_MODE1 = 1, slm_MODE2 = 2, slm_MODE3 = 3,
slm_MODE4 = 4, slm_MODE5 = 5, slm_NUMOF_MODE = slm_MODE5
}
SLM Function Return Value Definitions
enum | { slm_NOERR = 0, slm_ERROR = 1, slm_BADPARAM = 2 }
SLM sampling rate factor
Remarks:
These numbers are used as table indeces, so can't be changed.

enum | { slm_SRATE_FACTOR_16K = 1, slm_SRATE_FACTOR_8K = 2 }
SLM Configuration Structure Valid Bit-field
enum | { slm_CFG_BIT_SRATE = 0 }

Functions

External APIs for SLM
tint | slmGetSizes (tint *instsize)
Function slmGetSizes() get the size of a SLM instance.
tint | slmInit (void *inst, slmConfig_t *cfg)
Function slmInit() initializes SLM.
tint | slmControl (void *inst, tint mode)
Function slmControl() configure SLM with different types of limiter.
tint | slmProcess (void *inst, void *speechSamples, tint frame_length)
This is the function that performs the signal attenuation.


VPE: slm.h Source File

  • File List
  • Globals

slm.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:header file of SLM (signal limiter)
00003  ******************************************************************************
00004  * FILE NAME:   slm.h
00005  *
00006  * DESCRIPTION: Contains external definitions&functions prototypes for SLIM
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #ifndef _SLM_H
00011 #define _SLM_H
00012
00020 /* System level header files */
00021 #include <ti/mas/types/types.h>            /* DSP types */
00022
00031 /* @{ */
00032
00037 enum {
00038   slm_DISABLE    =    0,
00039   slm_MODE1      =    1,
00040   slm_MODE2      =    2,
00041   slm_MODE3      =    3,
00042   slm_MODE4      =    4,
00043   slm_MODE5      =    5,
00044   slm_NUMOF_MODE = slm_MODE5
00045 };
00046
00054 /* @{ */
00055 enum {
00056   slm_NOERR    = 0,
00057   slm_ERROR    = 1,
00058   slm_BADPARAM = 2
00059 };
00060 /*  @} */
00067 enum {
00068   slm_SRATE_FACTOR_16K = 1,
00069   slm_SRATE_FACTOR_8K  = 2
00070 };
00071
00076 enum {
00077   slm_CFG_BIT_SRATE      = 0
00078 };
00079
00086 /* @{ */
00087 typedef struct{
00088   tuint      valid_bf;
00090   tint       srate_factor;
00093 } slmConfig_t;
00094 /* @} */
00095
00100 /* @{ */
00111 tint slmGetSizes (tint *instsize);
00112
00128 tint slmInit (void *inst, slmConfig_t *cfg);
00129
00145 tint slmControl (void *inst, tint mode);
00146
00161 tint slmProcess (void *inst, void *speechSamples, tint frame_length);
00162
00163 /* @} */
00164 /* @} */ /* ingroup SLM */
00165 #endif
00166
00167 /* end of slm.h */
00168


VPE: SLM Configuration

VPE (Voice Processing Elements) Package

SLM Configuration

SLM Initialization

When the signal limiter is initialized, the mode is set to zero (disabled). The following SLM parameters are configurable on instance initialization:

  • Sampling rate (default - 8 KHz)

SLM Configuration

The following SLM parameters are run-time configurable:

  • Operational mode (0-5)


VPE: snl.h File Reference

  • File List
  • Globals

snl.h File Reference

Detailed Description

Contains external APIs for the SNL module.

(C) Copyright 2008, Texas Instruments, Inc.

Definition in file snl.h.

#include <ti/mas/types/types.h>

Include dependency graph for snl.h:

Go to the source code of this file.

SNL sampling rate factor

Remarks:
These numbers are used as multipliers, so can't be changed to other values.

#define | snl_ENV_Q 3
#define | snl_INVALID_POW_DB 0x7F
enum | { snl_SRATE_FACTOR_8K = 1, snl_SRATE_FACTOR_16K = 2 }

Enumerations

SNL Function Return Value Definitions
enum | { snl_NOERR = 0, snl_ERR = 1, snl_BADPARAM = 2 }

Functions

External APIs for SNL
tint | snlGetSizes (tint *instsize)
Obtain from SNL the memory requirements of an instance.
Remarks:
This must be the first function to be called before calling any other SNL APIs.

tint | snlInit (void *inst, tint samp_rate)
Initialize signal level estimator
Remarks:
This is the function to call after calling snlGetSizes(), only samp_rate is user configurable. After this function call, both signal and noise level are initialized to snl_INVALID_POW_DB, which is not considered a valid result from SNL.

tint | snlProcess (void *inst, linSample *samples, tuint nSamps)
Signal and noise level estimator
Remarks:
This is the function that processes the signal and calculates various parameters needed for level estimation. This function needs to be called every frame. There is a limitation of 1.5ms for the frame size, which will equivalent to 12 for the nSamps parameter for 8kHz sampling rate and 24 for the nSamps parameter for 16kHz sampling rate.

tint | snlGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh)
Get speech and noise levels
Remarks:
This is the function to be called whenever the levels are needed. It can be called every frame or when requested.


VPE: snl.h Source File

  • File List
  • Globals

snl.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Speech and Noise level estimation
00003  *
00004  ******************************************************************************
00005  * FILE NAME: snl.h
00006  *
00007  * DESCRIPTION: Implements active speech and noise level estimation for the purposes
00008  *              of voice doctor
00009  *
00010  * TABS: NONE
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * (C) Copyright 2008, Texas Instruments, Inc.
00015  *****************************************************************************/
00016 #ifndef _SNL_H
00017 #define _SNL_H
00018
00019 #include <ti/mas/types/types.h>              /* DSP types */
00020
00036 /* @{ */
00037
00045 /* @{ */
00046 enum {
00047   snl_NOERR    = 0,
00048   snl_ERR      = 1,
00049   snl_BADPARAM = 2
00050 };
00051 /*  @} */
00059 enum {
00060   snl_SRATE_FACTOR_8K  = 1,
00061   snl_SRATE_FACTOR_16K = 2
00062 };
00063
00069 #define snl_ENV_Q               3
00070
00077 #define snl_INVALID_POW_DB      0x7F
00078
00083 /* @{ */
00094 tint snlGetSizes (tint *instsize);
00095
00113 tint snlInit      (void *inst, tint samp_rate);
00114
00128 tint snlProcess   (void *inst, linSample *samples, tuint nSamps);
00129
00143 tint snlGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh);
00144
00145 /* @} */
00146 /* @} */ /* ingroup SNL */
00147 #endif
00148
00149 /* Nothing past this point */


VPE: SNL Configuration

VPE (Voice Processing Elements) Package

SNL Configuration

SNL Initialization

The following SNL parameters are configurable on instance initialization:

  • Sampling rate (required)

The SNL has no run-time configurable parameters.


VPE: Standard Compliance

Standard Compliance

The VPE modules are not required to comply with any published standards.


VPE: hlcConfig_t Struct Reference

  • Data Structures
  • Data Fields

hlcConfig_t Struct Reference
[High Level Compensation (HLC)]

#include <hlc.h>

Detailed Description

HLC configure Structure.

Contains parameters that can be chosen to be configured by user or using the default when initializing HLC

Definition at line 122 of file hlc.h.

Data Fields

tuint | valid_bf
Fract | thresh
tint | ramp_out_period
tint | power_tc
tint | srate_factor
tint | frm_len

Field Documentation

tuint hlcConfig_t::valid_bf

Bit-fields indicating which parameters to configure
bitfield definitions

Definition at line 123 of file hlc.h.

Fract hlcConfig_t::thresh

Threshold (0.5 dBm0 units) in S14.1 format
valid range: -96 ~ +6 corresponding to -48~+3 dBm0
default: 0 dBm0

Definition at line 125 of file hlc.h.

tint hlcConfig_t::ramp_out_period

Ramping out period in ms/dB
valid range: 10~1000ms/dB, default 700ms/dB

Definition at line 128 of file hlc.h.

tint hlcConfig_t::power_tc

Power measurement time constant valid numbers:
hlc_TC_PWR_4_MS
hlc_TC_PWR_8_MS
hlc_TC_PWR_16_MS

Definition at line 130 of file hlc.h.

tint hlcConfig_t::srate_factor

Sampling rate factor:
hlc_SRATE_FACTOR_8K
hlc_SRATE_FACTOR_16K

Definition at line 136 of file hlc.h.

tint hlcConfig_t::frm_len

Input signal frame length in samples, must be multiple of 5ms

Definition at line 140 of file hlc.h.

The documentation for this struct was generated from the following file:
  • hlc.h


VPE: hlcControl_t Struct Reference

  • Data Structures
  • Data Fields

hlcControl_t Struct Reference
[High Level Compensation (HLC)]

#include <hlc.h>

Detailed Description

HLC Control Structure. Contains control commands to change HLC parameters without resetting other parameters.

Definition at line 160 of file hlc.h.

Data Fields

tint ctl_code
union {
Fract thresh
} u

Field Documentation

tint hlcControl_t::ctl_code

Set to one of hlc_CTL_XXX control codes,
Control Code

Definition at line 161 of file hlc.h.

Fract hlcControl_t::thresh

If ctl_code is hlc_CTL_THR , set the thresh in the HLC instance

Definition at line 164 of file hlc.h.

union { ... } hlcControl_t::u

The documentation for this struct was generated from the following file:
  • hlc.h


VPE: slmConfig_t Struct Reference

  • Data Structures
  • Data Fields

slmConfig_t Struct Reference
[Signal Limiter(SLM), Signal Limiter(SLM)]

#include <slm.h>

Detailed Description

SLM configure Structure.

Contains parameters that can be chosen to be configured by user when initializing SLM

Definition at line 87 of file slm.h.

Data Fields

tuint | valid_bf
tint | srate_factor

Field Documentation

tuint slmConfig_t::valid_bf

Bit-fields indicating which parameters to configure
bitfield definition

Definition at line 88 of file slm.h.

tint slmConfig_t::srate_factor

Sampling rate factor:
slm_SRATE_FACTOR_8K
slm_SRATE_FACTOR_16K

Definition at line 90 of file slm.h.

The documentation for this struct was generated from the following file:
  • slm.h


VPE: svd.h File Reference

  • File List
  • Globals

svd.h File Reference

Detailed Description

Contains external APIs for the SVD module.

(C) Copyright 2009, Texas Instruments, Inc.

Definition in file svd.h.

#include <ti/mas/types/types.h>

Include dependency graph for svd.h:

Go to the source code of this file.

SVD sampling rate factor

Remarks:
These numbers are used as multipliers, so can't be changed to other values.

#define | svd_ENV_Q 3
#define | svd_PWR_Q 0
#define | svd_INVALID_POW_DB 0x7F
enum | { svd_SRATE_8K = 1, svd_SRATE_16K = 2 }

Enumerations

SVD Function Return Value Definitions
enum | { svd_NOERR = 0, svd_ERR = 1, svd_BADPARAM = 2 }
SVD decision codes
enum | { svd_VOICE_UNDEFINED = -1, svd_VOICE_INACTIVE = 0, svd_VOICE_ACTIVE = 1 }

Functions

External APIs for SVD
tint | svdGetSizes (tint *instsize)
Obtain from SVD the instance memory requirements.
Remarks:
This must be the first function to be called before calling any other SVD APIs.

tint | svdInit (void *inst, tint samp_rate)
Initialize simple voice activity detector
Remarks:
This function is called after svdGetSizes(), and initializes the instance.

tint | svdProcess (void *inst, linSample *samples, tuint nSamps)
Simple VAD detection process
Remarks:
This is the function that processes the signal and makes the Voice/Noise decision. The function should be called every frame. The frame size must be at least 1.5ms (12 for 8kHz, 24 for 16kHz).

tint | svdGetDecision (void *inst, LFract *sig_pow)
Get Voice decision
Remarks:
This is the function to call when a Voice/Noise decision is needed. It can be called as needed.

tint | svdGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh)
Get speech and noise levels
Remarks:
This is the function to be called whenever the levels are needed. It can be called every frame or when requested.


VPE: svd.h Source File

  • File List
  • Globals

svd.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Simple Voice Activity Detection (VAD) module
00003  *
00004  ******************************************************************************
00005  * FILE NAME: svd.h
00006  *
00007  * DESCRIPTION: Implements a (very) simple Voice Activity Detector (VAD) based
00008  *              almost solely on the SNL module.
00009  *
00010  * TABS: NONE
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * (C) Copyright 2009, Texas Instruments, Inc.
00015  *****************************************************************************/
00016 #ifndef _SVD_H
00017 #define _SVD_H
00018
00033 /* @{ */
00034
00035 #include <ti/mas/types/types.h>              /* DSP types            */
00036
00044 /* @{ */
00045 enum{
00046   svd_NOERR    = 0,
00047   svd_ERR      = 1,
00048   svd_BADPARAM = 2
00049 };
00050 /*  @} */
00057 enum{
00058   svd_VOICE_UNDEFINED = -1,
00059   svd_VOICE_INACTIVE  = 0,
00060   svd_VOICE_ACTIVE    = 1
00061 };
00062
00068 enum{
00069   svd_SRATE_8K  = 1,
00070   svd_SRATE_16K = 2
00071 };
00072
00078 #define svd_ENV_Q               3
00079
00085 #define svd_PWR_Q               0
00086
00093 #define svd_INVALID_POW_DB      0x7F
00094
00099 /* @{ */
00109 tint svdGetSizes (tint *instsize);
00110
00127 tint svdInit (void *inst, tint samp_rate);
00128
00142 tint svdProcess (void *inst, linSample *samples, tuint nSamps);
00143
00156 tint svdGetDecision (void *inst, LFract *sig_pow);
00157
00171 tint svdGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh);
00172
00173 /* @} */
00174 /* @} */ /* ingroup SVD */
00175 #endif
00176
00177 /* Nothing past this point */


VPE: SVD Configuration

VPE (Voice Processing Elements) Package

SVD Configuration

SVD Initialization

The following SVD parameters are configurable on instance initialization:

  • Sampling rate (required)

The SVD has no run-time configurable parameters.


VPE Test: Data Structures

  • Data Structures
  • Data Fields

VPE Test Data Structures

Here are the data structures with brief descriptions:
vpeSGNPars_t
vpeSimConfig_t
vpeSimFileIo_t


VPE Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

All simulation configuration parameters are in the vpeSim structure. This structure needs to be configured before running any test. It is suggested that this structure be opened in a Watch Window for easy access.

By default, the unit test is configured for an 8 kHz sampling rate. To test the (wideband) 16 kHz sampling rate, vpeSim->Fs will need to be changed from 8000 to 16000 and the frame length must reflect a minimum of 80 samples.

Procedure

  1. Set a breakpoint at vpe_halt()
  2. Run and let the simulation halt at the breakpoint
  3. Set vpeSim->exec to 1
  4. Choose the input signal source. By default vpeSim->sgn is set to 1 implying that the internal signal generator is used. The signal generator can be configured by setting vpeSim->cfg_sgn to 1 and setting the fields in vpeSim->sgnParam to generate the required output signal. By setting vpeSim->sgn to 0, data will be read from the input file vpe\testvec\sigIn.pcm. Currently, only linear 16-bit PCM format (little Endian) is supported.
  5. Follow the procedure below for the specific module being tested
    • HLC Module
    • SLM Module
    • SNL Module
    • SVD Module

HLC Module

  1. Set vpeSim->hlc_on to 1
  2. The default threshold for the HLC is 0dBm. In order for it to function for normal signal levels, a meaningful threshold should be set. This is accomplished by setting the following:
    • vpeSim->cfg_hlc to 1
    • vpeSim->hlc_ctrl.ctl_code to 2
    • vpeSim->hlc_ctrl.u.thresh to -20 (for example)
  3. Run the simulation.
  4. The HLC threshold may be re-configured during simulation. This is accomplished by setting the following:
    • vpeSim->cfg_hlc to 1
    • vpeSim->hlc_ctrl.ctl_code to 2
    • vpeSim->hlc_ctrl.u.thresh to -10 (again, for example)

SLM Module

Follow the steps to set up the simulation

  1. Set vpeSim->slm_on to 1
  2. Choose the SLM mode by setting vpeSim->slm_mod to a value between 1 and 5.
  3. Run the simulation.
  4. The SLM mode may be re-configured during simulation. This is accomplished by setting the following:
    • vpeSim->cfg_slm to 1
    • vpeSim->slm_mod to a different value between 1 and 5.

SNL Module

Follow the steps to set up the simulation

  1. Set vpeSim->snl_on to 1
  2. Run the simulation.
  3. The results are stored in the 16-bit binary file snlLevOut.pcm with signal level, noise level and adaptive envelope threshold interleaved. Note that signal level and noise level are in Q0 format (dBm) and the threshold is in Q3 format (linear).

SVD Module

Follow the steps to set up the simulation

  1. Set vpeSim->svd_on to 1
  2. Run the simulation.
  3. The results are stored in the 16-bit binary file svdOut.pcm with voice activity decision, signal level, noise level and adaptive envelope threshold interleaved. Note that signal level and noise level are in Q0 format (dBm) and the threshold is in Q3 format (linear).


VPE Test:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2006 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


VPE Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VPE Test: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


VPE Test: File Index

  • File List
  • Globals

VPE Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
vpesim.c [code]
vpesim.h [code]


VPE Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • h
  • n
  • p
  • s
  • w

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • amp1 : vpeSGNPars_t
  • amp2 : vpeSGNPars_t

- b -

  • baseDir : vpeSimConfig_t

- c -

  • cfg_hlc : vpeSimConfig_t
  • cfg_sgn : vpeSimConfig_t
  • cfg_slm : vpeSimConfig_t

- d -

  • data : vpeSimConfig_t
  • dcoffset : vpeSGNPars_t

- e -

  • eof : vpeSimFileIo_t
  • error_id : vpeSimConfig_t
  • exec : vpeSimConfig_t

- f -

  • f1 : vpeSGNPars_t
  • f2 : vpeSGNPars_t
  • fio : vpeSimFileIo_t
  • fname : vpeSimFileIo_t
  • fptr : vpeSimFileIo_t
  • frame_size : vpeSimConfig_t
  • Fs : vpeSimConfig_t

- h -

  • hlc_ctrl : vpeSimConfig_t
  • hlc_on : vpeSimConfig_t
  • hoth_seed : vpeSGNPars_t

- n -

  • nlevel : vpeSGNPars_t
  • nseed : vpeSGNPars_t
  • ntype : vpeSGNPars_t

- p -

  • pcmin_format : vpeSimConfig_t
  • pcmout_format : vpeSimConfig_t
  • pow_level : vpeSGNPars_t

- s -

  • sample_bp : vpeSimConfig_t
  • sample_cnt : vpeSimConfig_t
  • sgn : vpeSimConfig_t
  • sgnParam : vpeSimConfig_t
  • sigIn : vpeSimConfig_t
  • sigOut : vpeSimConfig_t
  • slm_mod : vpeSimConfig_t
  • slm_on : vpeSimConfig_t
  • snl_on : vpeSimConfig_t
  • state : vpeSGNPars_t
  • svd_on : vpeSimConfig_t

- w -

  • wftype : vpeSGNPars_t


VPE Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • h
  • n
  • p
  • s
  • w

- a -

  • amp1 : vpeSGNPars_t
  • amp2 : vpeSGNPars_t

- b -

  • baseDir : vpeSimConfig_t

- c -

  • cfg_hlc : vpeSimConfig_t
  • cfg_sgn : vpeSimConfig_t
  • cfg_slm : vpeSimConfig_t

- d -

  • data : vpeSimConfig_t
  • dcoffset : vpeSGNPars_t

- e -

  • eof : vpeSimFileIo_t
  • error_id : vpeSimConfig_t
  • exec : vpeSimConfig_t

- f -

  • f1 : vpeSGNPars_t
  • f2 : vpeSGNPars_t
  • fio : vpeSimFileIo_t
  • fname : vpeSimFileIo_t
  • fptr : vpeSimFileIo_t
  • frame_size : vpeSimConfig_t
  • Fs : vpeSimConfig_t

- h -

  • hlc_ctrl : vpeSimConfig_t
  • hlc_on : vpeSimConfig_t
  • hoth_seed : vpeSGNPars_t

- n -

  • nlevel : vpeSGNPars_t
  • nseed : vpeSGNPars_t
  • ntype : vpeSGNPars_t

- p -

  • pcmin_format : vpeSimConfig_t
  • pcmout_format : vpeSimConfig_t
  • pow_level : vpeSGNPars_t

- s -

  • sample_bp : vpeSimConfig_t
  • sample_cnt : vpeSimConfig_t
  • sgn : vpeSimConfig_t
  • sgnParam : vpeSimConfig_t
  • sigIn : vpeSimConfig_t
  • sigOut : vpeSimConfig_t
  • slm_mod : vpeSimConfig_t
  • slm_on : vpeSimConfig_t
  • snl_on : vpeSimConfig_t
  • state : vpeSGNPars_t
  • svd_on : vpeSimConfig_t

- w -

  • wftype : vpeSGNPars_t


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • h
  • i
  • m
  • n
  • o
  • s
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • _VPESIM_C54 : vpesim.h
  • _VPESIM_C55 : vpesim.h
  • _VPESIM_C55L : vpesim.h
  • _VPESIM_C64 : vpesim.h
  • _VPESIM_C64_BIG_ENDIAN : vpesim.h
  • _VPESIM_C64P : vpesim.h
  • _VPESIM_C64P_BIG_ENDIAN : vpesim.h

- h -

  • hctrlInst : vpesim.c
  • hctrlInst_ptr : vpesim.c
  • hlcInst_ptr : vpesim.c

- i -

  • inCnt : vpesim.c
  • inFrame : vpesim.c

- m -

  • main() : vpesim.c

- n -

  • noiseLevdB : vpesim.c
  • Nthresh : vpesim.c

- o -

  • outCnt : vpesim.c
  • outFrame : vpesim.c

- s -

  • sgnInst_ptr : vpesim.c
  • sigInBuffer : vpesim.c
  • sigOutBuffer : vpesim.c
  • slmInst_ptr : vpesim.c
  • snlInst_ptr : vpesim.c
  • snlLevOut : vpesim.c
  • spchLevdB : vpesim.c
  • svdInst_ptr : vpesim.c
  • svdOut : vpesim.c

- v -

  • vpe_banner_print() : vpesim.c
  • vpe_halt() : vpesim.c
  • vpe_init() : vpesim.c
  • vpe_iprint() : vpesim.c
  • vpe_print() : vpesim.c
  • vpe_SGN_DEF_DC_OFFSET : vpesim.c
  • vpe_SGN_DEF_F1 : vpesim.c
  • vpe_SGN_DEF_F2 : vpesim.c
  • vpe_SGN_DEF_FSK_DATA_LEN : vpesim.c
  • vpe_SGN_DEF_FSK_DURATION : vpesim.c
  • vpe_SGN_DEF_HOTH_WNG_SEED : vpesim.c
  • vpe_SGN_DEF_NOISE_LEVEL : vpesim.c
  • vpe_SGN_DEF_NOISE_SEED : vpesim.c
  • vpe_SGN_DEF_NOISE_TYPE : vpesim.c
  • vpe_SGN_DEF_POWER_LEVEL : vpesim.c
  • vpe_SGN_DEF_PR_ENABLE : vpesim.c
  • vpe_SGN_DEF_PR_PERIOD : vpesim.c
  • vpe_SGN_DEF_T_AMP1 : vpesim.c
  • vpe_SGN_DEF_T_AMP2 : vpesim.c
  • vpe_SGN_DEF_WF_TYPE : vpesim.c
  • vpe_SIM_DEF_BASE_DIR : vpesim.c
  • vpe_SIM_DEF_FRAME_SZ : vpesim.c
  • vpe_SIM_DEF_PCM_FORMAT : vpesim.c
  • vpe_SIM_DEF_SIGIN_FNAME : vpesim.c
  • vpe_SIM_DEF_SIGOUT_FNAME : vpesim.c
  • vpe_SIM_ERR_1 : vpesim.c
  • vpe_SIM_ERR_10 : vpesim.c
  • vpe_SIM_ERR_11 : vpesim.c
  • vpe_SIM_ERR_12 : vpesim.c
  • vpe_SIM_ERR_13 : vpesim.c
  • vpe_SIM_ERR_14 : vpesim.c
  • vpe_SIM_ERR_15 : vpesim.c
  • vpe_SIM_ERR_16 : vpesim.c
  • vpe_SIM_ERR_17 : vpesim.c
  • vpe_SIM_ERR_18 : vpesim.c
  • vpe_SIM_ERR_2 : vpesim.c
  • vpe_SIM_ERR_3 : vpesim.c
  • vpe_SIM_ERR_4 : vpesim.c
  • vpe_SIM_ERR_5 : vpesim.c
  • vpe_SIM_ERR_6 : vpesim.c
  • vpe_SIM_ERR_7 : vpesim.c
  • vpe_SIM_ERR_8 : vpesim.c
  • vpe_SIM_ERR_9 : vpesim.c
  • vpe_sim_fileio_end() : vpesim.c
  • vpe_sim_fileio_init() : vpesim.c
  • vpe_SIM_FILEIO_READ : vpesim.c
  • vpe_SIM_FILEIO_WRITE : vpesim.c
  • vpe_sim_fread() : vpesim.c
  • vpe_sim_fsk_data : vpesim.c
  • vpe_sim_fwrite() : vpesim.c
  • vpe_sim_gen_frame() : vpesim.c
  • vpe_sim_global_str : vpesim.c
  • vpe_sim_in_file() : vpesim.c
  • vpe_sim_init() : vpesim.c
  • vpe_sim_input_mux() : vpesim.c
  • vpe_SIM_MAX_ECOBUFS : vpesim.c
  • vpe_SIM_MAX_SAMPLES : vpesim.c
  • vpe_SIM_MAX_STRING : vpesim.c
  • vpe_sim_open_sgn() : vpesim.c
  • vpe_sim_out_file() : vpesim.c
  • vpe_sim_output_mux() : vpesim.c
  • vpe_SIM_PCM_ALAW : vpesim.c
  • vpe_SIM_PCM_LIN : vpesim.c
  • vpe_SIM_PCM_ULAW : vpesim.c
  • vpe_sim_print_str : vpesim.c
  • vpe_SIM_SAMPLE_FREQ_16000 : vpesim.c
  • vpe_SIM_SAMPLE_FREQ_8000 : vpesim.c
  • vpe_SIM_SAMPLES_PER_SECOND : vpesim.c
  • vpe_sim_set_sgn() : vpesim.c
  • vpe_sprint() : vpesim.c
  • vpe_temp_io_buf : vpesim.c
  • vpeIOBufs : vpesim.c
  • vpeSim : vpesim.c
  • VPESIM_NUM_BYTES_LINSAMP : vpesim.c
  • vpeSimC : vpesim.c
  • vpeSimPcm_e : vpesim.c


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • v

- _ -

  • _VPESIM_C54 : vpesim.h
  • _VPESIM_C55 : vpesim.h
  • _VPESIM_C55L : vpesim.h
  • _VPESIM_C64 : vpesim.h
  • _VPESIM_C64_BIG_ENDIAN : vpesim.h
  • _VPESIM_C64P : vpesim.h
  • _VPESIM_C64P_BIG_ENDIAN : vpesim.h

- v -

  • vpe_SGN_DEF_DC_OFFSET : vpesim.c
  • vpe_SGN_DEF_F1 : vpesim.c
  • vpe_SGN_DEF_F2 : vpesim.c
  • vpe_SGN_DEF_FSK_DATA_LEN : vpesim.c
  • vpe_SGN_DEF_FSK_DURATION : vpesim.c
  • vpe_SGN_DEF_HOTH_WNG_SEED : vpesim.c
  • vpe_SGN_DEF_NOISE_LEVEL : vpesim.c
  • vpe_SGN_DEF_NOISE_SEED : vpesim.c
  • vpe_SGN_DEF_NOISE_TYPE : vpesim.c
  • vpe_SGN_DEF_POWER_LEVEL : vpesim.c
  • vpe_SGN_DEF_PR_ENABLE : vpesim.c
  • vpe_SGN_DEF_PR_PERIOD : vpesim.c
  • vpe_SGN_DEF_T_AMP1 : vpesim.c
  • vpe_SGN_DEF_T_AMP2 : vpesim.c
  • vpe_SGN_DEF_WF_TYPE : vpesim.c
  • vpe_SIM_DEF_BASE_DIR : vpesim.c
  • vpe_SIM_DEF_FRAME_SZ : vpesim.c
  • vpe_SIM_DEF_PCM_FORMAT : vpesim.c
  • vpe_SIM_DEF_SIGIN_FNAME : vpesim.c
  • vpe_SIM_DEF_SIGOUT_FNAME : vpesim.c
  • vpe_SIM_ERR_1 : vpesim.c
  • vpe_SIM_ERR_10 : vpesim.c
  • vpe_SIM_ERR_11 : vpesim.c
  • vpe_SIM_ERR_12 : vpesim.c
  • vpe_SIM_ERR_13 : vpesim.c
  • vpe_SIM_ERR_14 : vpesim.c
  • vpe_SIM_ERR_15 : vpesim.c
  • vpe_SIM_ERR_16 : vpesim.c
  • vpe_SIM_ERR_17 : vpesim.c
  • vpe_SIM_ERR_18 : vpesim.c
  • vpe_SIM_ERR_2 : vpesim.c
  • vpe_SIM_ERR_3 : vpesim.c
  • vpe_SIM_ERR_4 : vpesim.c
  • vpe_SIM_ERR_5 : vpesim.c
  • vpe_SIM_ERR_6 : vpesim.c
  • vpe_SIM_ERR_7 : vpesim.c
  • vpe_SIM_ERR_8 : vpesim.c
  • vpe_SIM_ERR_9 : vpesim.c
  • vpe_SIM_FILEIO_READ : vpesim.c
  • vpe_SIM_FILEIO_WRITE : vpesim.c
  • vpe_SIM_MAX_ECOBUFS : vpesim.c
  • vpe_SIM_MAX_SAMPLES : vpesim.c
  • vpe_SIM_MAX_STRING : vpesim.c
  • vpe_SIM_SAMPLE_FREQ_16000 : vpesim.c
  • vpe_SIM_SAMPLE_FREQ_8000 : vpesim.c
  • vpe_SIM_SAMPLES_PER_SECOND : vpesim.c
  • VPESIM_NUM_BYTES_LINSAMP : vpesim.c


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • vpeSimPcm_e : vpesim.c


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • vpe_SIM_PCM_ALAW : vpesim.c
  • vpe_SIM_PCM_LIN : vpesim.c
  • vpe_SIM_PCM_ULAW : vpesim.c


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • main() : vpesim.c
  • vpe_banner_print() : vpesim.c
  • vpe_halt() : vpesim.c
  • vpe_init() : vpesim.c
  • vpe_iprint() : vpesim.c
  • vpe_print() : vpesim.c
  • vpe_sim_fileio_end() : vpesim.c
  • vpe_sim_fileio_init() : vpesim.c
  • vpe_sim_fread() : vpesim.c
  • vpe_sim_fwrite() : vpesim.c
  • vpe_sim_gen_frame() : vpesim.c
  • vpe_sim_in_file() : vpesim.c
  • vpe_sim_init() : vpesim.c
  • vpe_sim_input_mux() : vpesim.c
  • vpe_sim_open_sgn() : vpesim.c
  • vpe_sim_out_file() : vpesim.c
  • vpe_sim_output_mux() : vpesim.c
  • vpe_sim_set_sgn() : vpesim.c
  • vpe_sprint() : vpesim.c


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • hctrlInst : vpesim.c
  • hctrlInst_ptr : vpesim.c
  • hlcInst_ptr : vpesim.c
  • inCnt : vpesim.c
  • inFrame : vpesim.c
  • noiseLevdB : vpesim.c
  • Nthresh : vpesim.c
  • outCnt : vpesim.c
  • outFrame : vpesim.c
  • sgnInst_ptr : vpesim.c
  • sigInBuffer : vpesim.c
  • sigOutBuffer : vpesim.c
  • slmInst_ptr : vpesim.c
  • snlInst_ptr : vpesim.c
  • snlLevOut : vpesim.c
  • spchLevdB : vpesim.c
  • svdInst_ptr : vpesim.c
  • svdOut : vpesim.c
  • vpe_sim_fsk_data : vpesim.c
  • vpe_sim_global_str : vpesim.c
  • vpe_sim_print_str : vpesim.c
  • vpe_temp_io_buf : vpesim.c
  • vpeIOBufs : vpesim.c
  • vpeSim : vpesim.c
  • vpeSimC : vpesim.c


VPE Test: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


VPE Test: VPE Unit Test

VPE Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. Dependent Packages

Description

This package contains a basic test for the VPE. This is not a regression test, its purpose is to show how the VPE module can be integrated into a system and to become familiar with the external API. The package also provides a means to experiment with changes to the configuration and observe the operational effect(s).

Building Unit Test

The VPE Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the VPE Unit Test project and build using CCS.

Notes:
  1. The GNU Makefile build procedure is described in detail in the main VPE documentation.
  2. The project(s) provided with the release are compatible with CCS Version 4.

Unit Test Procedures

The VPE Unit Test package comes complete with a compiled CCS Project as well as a directly loadable test image. If the unit test code has been altered or enhanced, the Building Unit Test procedure above should be completed before moving forward.

Unit Test Image

The procedure to test using the unit test image is described below. Note that this procedure does not require CCS version 4 and may be used for those who haven't yet upgraded to CCS v4 (Eclipse).

  1. Open CCS
  2. Load the VPE Unit Test image for the target of interest
    • Will reside in the vpe\test\lnkr\<targ> directory
    • Will have the extension *.x<target>
  3. Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Unit Test Project

The procedure to test using the CCS project is described below. Note that this procedure requires CCS version 4 (Eclipse).

  1. Open CCS version 4
  2. Load the VPE project for the target of interest
    • Will be a subdirectory off the vpe\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the vpe\test\ directory.
    • (Optional) Rebuild the project
  3. Open the proper Debug Target Configuration and load the build
    • Can be identified using the CCS menu options "Target"-->"Load Program" and selecting the "Browse Projects" button
    • (Optional) Run to the main() symbol
  4. Follow the Unit Test Configuration and Execution procedure

Dependent Packages

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fract (Common fractional arithmetic macros)
  • ti.mas.sdk (Test infrastructure software)


VPE Test: Page Index

VPE Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • Disclaimer


VPE Test: vpeSGNPars_t Struct Reference

  • Data Structures
  • Data Fields

vpeSGNPars_t Struct Reference

Detailed Description

Definition at line 112 of file vpesim.c.

Data Fields

tbool | state
linSample | dcoffset
tint | wftype
tint | f1
tint | f2
linSample | amp1
linSample | amp2
tint | nlevel
tulong | nseed
tint | ntype
tint | pow_level
tulong | hoth_seed

Field Documentation

tbool vpeSGNPars_t::state

Definition at line 113 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::dcoffset

Definition at line 114 of file vpesim.c.

Referenced by vpe_init().

tint vpeSGNPars_t::wftype

Definition at line 115 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::f1

Definition at line 116 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::f2

Definition at line 117 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::amp1

Definition at line 118 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::amp2

Definition at line 119 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::nlevel

Definition at line 120 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tulong vpeSGNPars_t::nseed

Definition at line 121 of file vpesim.c.

Referenced by vpe_init().

tint vpeSGNPars_t::ntype

Definition at line 122 of file vpesim.c.

Referenced by vpe_init().

tint vpeSGNPars_t::pow_level

Definition at line 123 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tulong vpeSGNPars_t::hoth_seed

Definition at line 124 of file vpesim.c.

Referenced by vpe_init().

The documentation for this struct was generated from the following file:
  • vpesim.c


VPE Test: vpeSimConfig_t Struct Reference

  • Data Structures
  • Data Fields

vpeSimConfig_t Struct Reference

Collaboration diagram for vpeSimConfig_t:

[legend]

Detailed Description

Definition at line 129 of file vpesim.c.

Data Fields

tbool | exec
tbool | hlc_on
tbool | slm_on
tbool | snl_on
tbool | svd_on
tlong | sample_cnt
tulong | sample_bp
tbool | sgn
tbool | cfg_sgn
tbool | cfg_hlc
tbool | cfg_slm
tint | slm_mod
tint | Fs
hlcControl_t | hlc_ctrl
vpeSGNPars_t sgnParam
vpeSimFileIo_t sigIn
vpeSimFileIo_t sigOut
vpeSimPcm_e pcmin_format
vpeSimPcm_e pcmout_format
tbool | data
tuint | error_id
tuint | frame_size
char | baseDir [vpe_SIM_MAX_STRING]

Field Documentation

tbool vpeSimConfig_t::exec

Definition at line 130 of file vpesim.c.

Referenced by main(), vpe_init(), vpe_print(), and vpe_sim_init().

tbool vpeSimConfig_t::hlc_on

Definition at line 131 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::slm_on

Definition at line 132 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::snl_on

Definition at line 133 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::svd_on

Definition at line 134 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tlong vpeSimConfig_t::sample_cnt

Definition at line 135 of file vpesim.c.

Referenced by vpe_sim_init().

tulong vpeSimConfig_t::sample_bp

Definition at line 136 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::sgn

Definition at line 137 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_sgn

Definition at line 138 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_hlc

Definition at line 139 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_slm

Definition at line 140 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tint vpeSimConfig_t::slm_mod

Definition at line 141 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tint vpeSimConfig_t::Fs

Definition at line 142 of file vpesim.c.

Referenced by main(), vpe_init(), vpe_sim_init(), and vpe_sim_open_sgn().

hlcControl_t vpeSimConfig_t::hlc_ctrl

Definition at line 143 of file vpesim.c.

Referenced by main().

vpeSGNPars_t vpeSimConfig_t::sgnParam

Definition at line 144 of file vpesim.c.

Referenced by main(), and vpe_init().

vpeSimFileIo_t vpeSimConfig_t::sigIn

Definition at line 145 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

vpeSimFileIo_t vpeSimConfig_t::sigOut

Definition at line 146 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

vpeSimPcm_e vpeSimConfig_t::pcmin_format

Definition at line 147 of file vpesim.c.

Referenced by vpe_sim_init().

vpeSimPcm_e vpeSimConfig_t::pcmout_format

Definition at line 148 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::data

Definition at line 149 of file vpesim.c.

Referenced by main().

tuint vpeSimConfig_t::error_id

Definition at line 150 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tuint vpeSimConfig_t::frame_size

Definition at line 151 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

char vpeSimConfig_t::baseDir[vpe_SIM_MAX_STRING]

Definition at line 152 of file vpesim.c.

Referenced by vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_init().

The documentation for this struct was generated from the following file:
  • vpesim.c


VPE Test: vpeSimFileIo_t Struct Reference

  • Data Structures
  • Data Fields

vpeSimFileIo_t Struct Reference

Detailed Description

Definition at line 104 of file vpesim.c.

Data Fields

tbool | fio
tbool | eof
FILE * | fptr
char | fname [vpe_SIM_MAX_STRING]

Field Documentation

tbool vpeSimFileIo_t::fio

Definition at line 105 of file vpesim.c.

Referenced by vpe_init(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_init().

tbool vpeSimFileIo_t::eof

Definition at line 106 of file vpesim.c.

Referenced by vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_fread().

FILE* vpeSimFileIo_t::fptr

Definition at line 107 of file vpesim.c.

Referenced by vpe_init(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), vpe_sim_fread(), vpe_sim_fwrite(), and vpe_sim_init().

char vpeSimFileIo_t::fname[vpe_SIM_MAX_STRING]

Definition at line 108 of file vpesim.c.

Referenced by vpe_init(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_init().

The documentation for this struct was generated from the following file:
  • vpesim.c


VPE Test: vpesim.c File Reference

  • File List
  • Globals

vpesim.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/types/const.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/sdk/sgn.h>
#include <ti/mas/sdk/memArchCfg.h>
#include <ti/mas/vpe/hlc.h>
#include <ti/mas/vpe/slm.h>
#include <ti/mas/vpe/snl.h>
#include <ti/mas/vpe/svd.h>
#include <ti/mas/vpe/test/src/vpesim.h>

Include dependency graph for vpesim.c:

Go to the source code of this file.

Data Structures

struct | vpeSimFileIo_t
struct | vpeSGNPars_t
struct | vpeSimConfig_t

Defines

#define | vpe_SIM_ERR_1 ( 1)
#define | vpe_SIM_ERR_2 ( 2)
#define | vpe_SIM_ERR_3 ( 4)
#define | vpe_SIM_ERR_4 ( 5)
#define | vpe_SIM_ERR_5 ( 6)
#define | vpe_SIM_ERR_6 ( 7)
#define | vpe_SIM_ERR_7 ( 8)
#define | vpe_SIM_ERR_8 ( 9)
#define | vpe_SIM_ERR_9 (10)
#define | vpe_SIM_ERR_10 (11)
#define | vpe_SIM_ERR_11 (12)
#define | vpe_SIM_ERR_12 (13)
#define | vpe_SIM_ERR_13 (14)
#define | vpe_SIM_ERR_14 (15)
#define | vpe_SIM_ERR_15 (16)
#define | vpe_SIM_ERR_16 (17)
#define | vpe_SIM_ERR_17 (18)
#define | vpe_SIM_ERR_18 (19)
#define | vpe_SIM_MAX_SAMPLES 320
#define | vpe_SIM_MAX_ECOBUFS 12
#define | vpe_SIM_MAX_STRING 256
#define | vpe_SIM_FILEIO_READ ( 0)
#define | vpe_SIM_FILEIO_WRITE ( 1)
#define | vpe_SIM_SAMPLE_FREQ_16000 16000
#define | vpe_SIM_SAMPLE_FREQ_8000 8000
#define | vpe_SIM_SAMPLES_PER_SECOND vpe_SIM_SAMPLE_FREQ_16000
#define | vpe_SIM_DEF_FRAME_SZ (vpe_SIM_SAMPLES_PER_SECOND/200)
#define | vpe_SIM_DEF_PCM_FORMAT (const_COMP_MULAW_8)
#define | vpe_SIM_DEF_BASE_DIR "..\\..\\vectors\\"
#define | vpe_SIM_DEF_SIGIN_FNAME "sigIn.pcm"
#define | vpe_SIM_DEF_SIGOUT_FNAME "sigOut.pcm"
#define | vpe_SGN_DEF_DC_OFFSET 0
#define | vpe_SGN_DEF_WF_TYPE 1
#define | vpe_SGN_DEF_F1 1000
#define | vpe_SGN_DEF_F2 400
#define | vpe_SGN_DEF_T_AMP1 0x1400
#define | vpe_SGN_DEF_T_AMP2 0x3700
#define | vpe_SGN_DEF_PR_PERIOD 1000
#define | vpe_SGN_DEF_PR_ENABLE FALSE
#define | vpe_SGN_DEF_NOISE_LEVEL (-100)
#define | vpe_SGN_DEF_NOISE_SEED 40
#define | vpe_SGN_DEF_NOISE_TYPE sgn_NT_GAUSS
#define | vpe_SGN_DEF_FSK_DURATION 90
#define | vpe_SGN_DEF_FSK_DATA_LEN 1
#define | vpe_SGN_DEF_POWER_LEVEL (-10)
#define | vpe_SGN_DEF_HOTH_WNG_SEED 20
#define | VPESIM_NUM_BYTES_LINSAMP 2

Enumerations

enum | vpeSimPcm_e { vpe_SIM_PCM_ALAW = const_COMP_ALAW_8, vpe_SIM_PCM_ULAW = const_COMP_MULAW_8, vpe_SIM_PCM_LIN = const_COMP_LINEAR }

Functions

void | vpe_sim_fileio_init (vpeSimFileIo_t *fioptr, tuint code)
void | vpe_sim_fileio_end (vpeSimFileIo_t *fioptr)
void | vpe_sim_init (void)
void | vpe_init (void)
tbool | vpe_sim_fread (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
void | vpe_sim_fwrite (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
void | vpe_sim_input_mux (void)
void | vpe_sim_output_mux (void)
void | vpe_print (char *str)
void | vpe_iprint (char *str, tlong ivar)
void | vpe_sprint (char *str, char *svar)
void | vpe_sim_open_sgn (void *inst)
void | vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs)
void | vpe_sim_gen_frame (void *inst, tint frame_size, linSample *frame)
sgnFileIo_t * | vpe_sim_in_file (sgnFileIo_t *dsc)
static void | vpe_banner_print (char *str)
void | vpe_halt (tbool *exec)
void | main (void)
sgnFileIo_t * | vpe_sim_out_file (sgnFileIo_t *dsc)

Variables

linSample | vpeIOBufs [vpe_SIM_MAX_SAMPLES]
vpeSimConfig_t vpeSimC
vpeSimConfig_t * vpeSim = &vpeSimC
char | vpe_sim_global_str [vpe_SIM_MAX_STRING]
char | vpe_sim_print_str [vpe_SIM_MAX_STRING]
linSample | sigInBuffer [2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]
linSample | sigOutBuffer [2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]
tint | vpe_sim_fsk_data [vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e}
void * | slmInst_ptr = NULL
void * | hlcInst_ptr = NULL
hlcControl_t | hctrlInst
hlcControl_t * | hctrlInst_ptr = &hctrlInst
void * | snlInst_ptr = NULL
Fract | spchLevdB = frct_MAX
Fract | noiseLevdB = frct_MAX
UFract | Nthresh = frct_MAX
vpeSimFileIo_t snlLevOut
void * | svdInst_ptr = NULL
vpeSimFileIo_t svdOut
void * | sgnInst_ptr = NULL
tword | vpe_temp_io_buf [vpe_SIM_MAX_SAMPLES *VPESIM_NUM_BYTES_LINSAMP]
linSample * | inFrame
linSample * | outFrame
tint | inCnt
tint | outCnt

Define Documentation

#define vpe_SIM_ERR_1 ( 1)

Definition at line 37 of file vpesim.c.

Referenced by main().

#define vpe_SIM_ERR_2 ( 2)

Definition at line 38 of file vpesim.c.

Referenced by main().

#define vpe_SIM_ERR_3 ( 4)

Definition at line 39 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_4 ( 5)

Definition at line 40 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_5 ( 6)

Definition at line 41 of file vpesim.c.

Referenced by main().

#define vpe_SIM_ERR_6 ( 7)

Definition at line 42 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_7 ( 8)

Definition at line 43 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_8 ( 9)

Definition at line 44 of file vpesim.c.

Referenced by main().

#define vpe_SIM_ERR_9 (10)

Definition at line 45 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_10 (11)

Definition at line 46 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_11 (12)

Definition at line 47 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_12 (13)

Definition at line 48 of file vpesim.c.

#define vpe_SIM_ERR_13 (14)

Definition at line 49 of file vpesim.c.

#define vpe_SIM_ERR_14 (15)

Definition at line 50 of file vpesim.c.

#define vpe_SIM_ERR_15 (16)

Definition at line 51 of file vpesim.c.

#define vpe_SIM_ERR_16 (17)

Definition at line 52 of file vpesim.c.

#define vpe_SIM_ERR_17 (18)

Definition at line 53 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_18 (19)

Definition at line 54 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_MAX_SAMPLES 320

Definition at line 57 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_MAX_ECOBUFS 12

Definition at line 58 of file vpesim.c.

#define vpe_SIM_MAX_STRING 256

Definition at line 59 of file vpesim.c.

#define vpe_SIM_FILEIO_READ ( 0)

Definition at line 62 of file vpesim.c.

Referenced by main(), and vpe_sim_fileio_init().

#define vpe_SIM_FILEIO_WRITE ( 1)

Definition at line 63 of file vpesim.c.

Referenced by main(), and vpe_sim_fileio_init().

#define vpe_SIM_SAMPLE_FREQ_16000 16000

Definition at line 66 of file vpesim.c.

#define vpe_SIM_SAMPLE_FREQ_8000 8000

Definition at line 67 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_SAMPLES_PER_SECOND vpe_SIM_SAMPLE_FREQ_16000

Definition at line 70 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_FRAME_SZ (vpe_SIM_SAMPLES_PER_SECOND/200)

Definition at line 71 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_PCM_FORMAT (const_COMP_MULAW_8)

Definition at line 74 of file vpesim.c.

#define vpe_SIM_DEF_BASE_DIR "..\\..\\vectors\\"

Definition at line 75 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_SIGIN_FNAME "sigIn.pcm"

Definition at line 76 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_SIGOUT_FNAME "sigOut.pcm"

Definition at line 77 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SGN_DEF_DC_OFFSET 0

Definition at line 81 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_WF_TYPE 1

Definition at line 82 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_F1 1000

Definition at line 83 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_F2 400

Definition at line 84 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_T_AMP1 0x1400

Definition at line 85 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_T_AMP2 0x3700

Definition at line 86 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_PR_PERIOD 1000

Definition at line 87 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_PR_ENABLE FALSE

Definition at line 88 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_LEVEL (-100)

Definition at line 89 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_SEED 40

Definition at line 90 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_TYPE sgn_NT_GAUSS

Definition at line 91 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_FSK_DURATION 90

Definition at line 92 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_FSK_DATA_LEN 1

Definition at line 93 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_POWER_LEVEL (-10)

Definition at line 94 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_HOTH_WNG_SEED 20

Definition at line 95 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define VPESIM_NUM_BYTES_LINSAMP 2

Definition at line 559 of file vpesim.c.

Referenced by vpe_sim_fread(), and vpe_sim_fwrite().

Enumeration Type Documentation

enum vpeSimPcm_e

Enumerator:
vpe_SIM_PCM_ALAW
vpe_SIM_PCM_ULAW
vpe_SIM_PCM_LIN

Definition at line 98 of file vpesim.c.

Function Documentation

void vpe_sim_fileio_init | ( | vpeSimFileIo_t * | fioptr,
 |  | tuint | code
 | ) |  |

Definition at line 489 of file vpesim.c.

References vpeSimConfig_t::baseDir, vpeSimFileIo_t::eof, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpe_iprint(), vpe_SIM_FILEIO_READ, vpe_SIM_FILEIO_WRITE, vpe_sim_global_str, vpe_sprint(), and vpeSim.

Referenced by main().

Here is the call graph for this function:

void vpe_sim_fileio_end ( vpeSimFileIo_t * fioptr )

Definition at line 532 of file vpesim.c.

References vpeSimConfig_t::baseDir, vpeSimFileIo_t::eof, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpe_print(), vpe_sim_global_str, vpe_sprint(), and vpeSim.

Here is the call graph for this function:

void vpe_sim_init ( void )

Definition at line 617 of file vpesim.c.

References vpeSimConfig_t::baseDir, vpeSimConfig_t::cfg_hlc, vpeSimConfig_t::cfg_sgn, vpeSimConfig_t::cfg_slm, vpeSimConfig_t::error_id, vpeSimConfig_t::exec, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpeSimConfig_t::frame_size, vpeSimConfig_t::Fs, vpeSimConfig_t::hlc_on, vpeSimConfig_t::pcmin_format, vpeSimConfig_t::pcmout_format, vpeSimConfig_t::sample_bp, vpeSimConfig_t::sample_cnt, vpeSimConfig_t::sgn, vpeSimConfig_t::sigIn, vpeSimConfig_t::sigOut, vpeSimConfig_t::slm_mod, vpeSimConfig_t::slm_on, vpeSimConfig_t::snl_on, vpeSimConfig_t::svd_on, vpe_SIM_DEF_BASE_DIR, vpe_SIM_DEF_FRAME_SZ, vpe_SIM_DEF_SIGIN_FNAME, vpe_SIM_DEF_SIGOUT_FNAME, vpe_SIM_PCM_LIN, vpe_SIM_SAMPLES_PER_SECOND, and vpeSim.

Referenced by main().

void vpe_init ( void )

Definition at line 647 of file vpesim.c.

References vpeSGNPars_t::amp1, vpeSGNPars_t::amp2, vpeSGNPars_t::dcoffset, vpeSimConfig_t::error_id, vpeSimConfig_t::exec, vpeSGNPars_t::f1, vpeSGNPars_t::f2, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpeSimConfig_t::frame_size, vpeSimConfig_t::Fs, hctrlInst_ptr, vpeSimConfig_t::hlc_on, hlcInst_ptr, vpeSGNPars_t::hoth_seed, vpeSGNPars_t::nlevel, vpeSGNPars_t::nseed, vpeSGNPars_t::ntype, vpeSGNPars_t::pow_level, sgnInst_ptr, vpeSimConfig_t::sgnParam, vpeSimConfig_t::slm_on, slmInst_ptr, vpeSimConfig_t::snl_on, snlInst_ptr, snlLevOut, vpeSGNPars_t::state, vpeSimConfig_t::svd_on, svdInst_ptr, svdOut, vpe_halt(), vpe_SGN_DEF_DC_OFFSET, vpe_SGN_DEF_F1, vpe_SGN_DEF_F2, vpe_SGN_DEF_HOTH_WNG_SEED, vpe_SGN_DEF_NOISE_LEVEL, vpe_SGN_DEF_NOISE_SEED, vpe_SGN_DEF_NOISE_TYPE, vpe_SGN_DEF_POWER_LEVEL, vpe_SGN_DEF_T_AMP1, vpe_SGN_DEF_T_AMP2, vpe_SGN_DEF_WF_TYPE, vpe_SIM_ERR_10, vpe_SIM_ERR_11, vpe_SIM_ERR_17, vpe_SIM_ERR_18, vpe_SIM_ERR_3, vpe_SIM_ERR_4, vpe_SIM_ERR_6, vpe_SIM_ERR_7, vpe_SIM_ERR_9, vpe_SIM_MAX_SAMPLES, vpe_sim_open_sgn(), vpe_SIM_SAMPLE_FREQ_8000, vpeSim, and vpeSGNPars_t::wftype.

Referenced by main().

Here is the call graph for this function:

tbool vpe_sim_fread | ( | linSample * | buf,
 |  | tint | buf_size,
 |  | vpeSimFileIo_t * | fioptr
 | ) |  |

Definition at line 562 of file vpesim.c.

References vpeSimFileIo_t::eof, vpeSimFileIo_t::fptr, and VPESIM_NUM_BYTES_LINSAMP.

Referenced by main().

void vpe_sim_fwrite | ( | linSample * | buf,
 |  | tint | buf_size,
 |  | vpeSimFileIo_t * | fioptr
 | ) |  |

Definition at line 594 of file vpesim.c.

References vpeSimFileIo_t::fptr, and VPESIM_NUM_BYTES_LINSAMP.

Referenced by main().

void vpe_sim_input_mux ( void )

void vpe_sim_output_mux ( void )

void vpe_print ( char * str )

Definition at line 453 of file vpesim.c.

References vpeSimConfig_t::exec, and vpeSim.

Referenced by vpe_banner_print(), vpe_iprint(), vpe_sim_fileio_end(), and vpe_sprint().

void vpe_iprint | ( | char * | str,
 |  | tlong | ivar
 | ) |  |

Definition at line 466 of file vpesim.c.

References vpe_print(), and vpe_sim_print_str.

Referenced by vpe_sim_fileio_init().

Here is the call graph for this function:

void vpe_sprint | ( | char * | str,
 |  | char * | svar
 | ) |  |

Definition at line 478 of file vpesim.c.

References vpe_print(), and vpe_sim_print_str.

Referenced by vpe_sim_fileio_end(), and vpe_sim_fileio_init().

Here is the call graph for this function:

void vpe_sim_open_sgn ( void * inst )

Definition at line 845 of file vpesim.c.

References vpeSimConfig_t::Fs, vpe_SGN_DEF_DC_OFFSET, vpe_SGN_DEF_F1, vpe_SGN_DEF_F2, vpe_SGN_DEF_FSK_DATA_LEN, vpe_SGN_DEF_FSK_DURATION, vpe_SGN_DEF_HOTH_WNG_SEED, vpe_SGN_DEF_NOISE_LEVEL, vpe_SGN_DEF_NOISE_SEED, vpe_SGN_DEF_NOISE_TYPE, vpe_SGN_DEF_POWER_LEVEL, vpe_SGN_DEF_PR_ENABLE, vpe_SGN_DEF_PR_PERIOD, vpe_SGN_DEF_T_AMP1, vpe_SGN_DEF_T_AMP2, vpe_SGN_DEF_WF_TYPE, vpe_sim_fsk_data, vpe_sim_in_file(), and vpeSim.

Referenced by vpe_init().

Here is the call graph for this function:

void vpe_sim_set_sgn | ( | void * | inst,
 |  | vpeSGNPars_t * | sgn,
 |  | tint | Fs
 | ) |  |

Definition at line 877 of file vpesim.c.

References vpeSGNPars_t::amp1, vpeSGNPars_t::amp2, vpeSGNPars_t::f1, vpeSGNPars_t::f2, vpeSGNPars_t::nlevel, vpeSGNPars_t::pow_level, vpeSGNPars_t::state, and vpeSGNPars_t::wftype.

Referenced by main().

void vpe_sim_gen_frame | ( | void * | inst,
 |  | tint | frame_size,
 |  | linSample * | frame
 | ) |  |

Definition at line 934 of file vpesim.c.

Referenced by main().

sgnFileIo_t * vpe_sim_in_file ( sgnFileIo_t * dsc )

Definition at line 945 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

static void vpe_banner_print ( char * str ) [inline, static]

Definition at line 199 of file vpesim.c.

References vpe_print().

Referenced by main().

Here is the call graph for this function:

void vpe_halt ( tbool * exec )

Definition at line 213 of file vpesim.c.

Referenced by main(), and vpe_init().

void main ( void )

Definition at line 252 of file vpesim.c.

References vpeSimConfig_t::cfg_hlc, vpeSimConfig_t::cfg_sgn, vpeSimConfig_t::cfg_slm, vpeSimConfig_t::data, vpeSimConfig_t::error_id, vpeSimConfig_t::exec, vpeSimConfig_t::frame_size, vpeSimConfig_t::Fs, vpeSimConfig_t::hlc_ctrl, vpeSimConfig_t::hlc_on, hlcInst_ptr, noiseLevdB, Nthresh, vpeSimConfig_t::sgn, sgnInst_ptr, vpeSimConfig_t::sgnParam, vpeSimConfig_t::sigIn, sigInBuffer, vpeSimConfig_t::sigOut, sigOutBuffer, vpeSimConfig_t::slm_mod, vpeSimConfig_t::slm_on, slmInst_ptr, vpeSimConfig_t::snl_on, snlInst_ptr, snlLevOut, spchLevdB, vpeSimConfig_t::svd_on, svdInst_ptr, svdOut, vpe_banner_print(), vpe_halt(), vpe_init(), vpe_SIM_ERR_1, vpe_SIM_ERR_2, vpe_SIM_ERR_5, vpe_SIM_ERR_8, vpe_sim_fileio_init(), vpe_SIM_FILEIO_READ, vpe_SIM_FILEIO_WRITE, vpe_sim_fread(), vpe_sim_fwrite(), vpe_sim_gen_frame(), vpe_sim_init(), vpe_sim_set_sgn(), vpeIOBufs, and vpeSim.

Here is the call graph for this function:

sgnFileIo_t* vpe_sim_out_file ( sgnFileIo_t * dsc )

Definition at line 955 of file vpesim.c.

Variable Documentation

linSample vpeIOBufs[vpe_SIM_MAX_SAMPLES]

Definition at line 156 of file vpesim.c.

Referenced by main().

vpeSimConfig_t vpeSimC

Definition at line 157 of file vpesim.c.

vpeSimConfig_t* vpeSim = &vpeSimC

Definition at line 158 of file vpesim.c.

Referenced by main(), vpe_init(), vpe_print(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), vpe_sim_init(), and vpe_sim_open_sgn().

char vpe_sim_global_str[vpe_SIM_MAX_STRING]

Definition at line 159 of file vpesim.c.

Referenced by vpe_sim_fileio_end(), and vpe_sim_fileio_init().

char vpe_sim_print_str[vpe_SIM_MAX_STRING]

Definition at line 160 of file vpesim.c.

Referenced by vpe_iprint(), and vpe_sprint().

linSample sigInBuffer[2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]

Definition at line 163 of file vpesim.c.

Referenced by main().

linSample sigOutBuffer[2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]

Definition at line 164 of file vpesim.c.

Referenced by main().

tint vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e}

Definition at line 192 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

void* slmInst_ptr = NULL

Definition at line 225 of file vpesim.c.

Referenced by main(), and vpe_init().

void* hlcInst_ptr = NULL

Definition at line 228 of file vpesim.c.

Referenced by main(), and vpe_init().

hlcControl_t hctrlInst

Definition at line 229 of file vpesim.c.

hlcControl_t * hctrlInst_ptr = &hctrlInst

Definition at line 229 of file vpesim.c.

Referenced by vpe_init().

void* snlInst_ptr = NULL

Definition at line 232 of file vpesim.c.

Referenced by main(), and vpe_init().

Fract spchLevdB = frct_MAX

Definition at line 234 of file vpesim.c.

Referenced by main().

Fract noiseLevdB = frct_MAX

Definition at line 234 of file vpesim.c.

Referenced by main().

UFract Nthresh = frct_MAX

Definition at line 235 of file vpesim.c.

Referenced by main().

vpeSimFileIo_t snlLevOut

Definition at line 237 of file vpesim.c.

Referenced by main(), and vpe_init().

void* svdInst_ptr = NULL

Definition at line 240 of file vpesim.c.

Referenced by main(), and vpe_init().

vpeSimFileIo_t svdOut

Definition at line 242 of file vpesim.c.

Referenced by main(), and vpe_init().

void* sgnInst_ptr = NULL

Definition at line 245 of file vpesim.c.

Referenced by main(), and vpe_init().

tword vpe_temp_io_buf[vpe_SIM_MAX_SAMPLES *VPESIM_NUM_BYTES_LINSAMP]

Definition at line 560 of file vpesim.c.

linSample* inFrame

Definition at line 942 of file vpesim.c.

linSample * outFrame

Definition at line 942 of file vpesim.c.

tint inCnt

Definition at line 943 of file vpesim.c.

tint outCnt

Definition at line 943 of file vpesim.c.


VPE Test: vpesim.c Source File

  • File List
  • Globals

vpesim.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------
00002  * Filename:  vpesim.c
00003  *
00004  * Description: Test the vpe API functions.
00005  *
00006  * (C) Copyright 2008, Texas Instruments, Inc.
00007  *-----------------------------------------------------------------*/
00008
00009 /* ANSI C headers */
00010 #include <stdlib.h>
00011 #include <stdio.h>
00012 #include <string.h>
00013
00014 /* RTSC headers */
00015 #include <ti/mas/types/types.h>
00016 #include <ti/mas/fract/fract.h>
00017 #include <ti/mas/types/const.h>
00018 #include <ti/mas/util/ecomem.h>
00019 #include <ti/mas/util/mua.h>
00020
00021 /* for signal generator */
00022 #include <ti/mas/sdk/sgn.h>
00023
00024 /* for cache managements, valid only for C64x and C64x+ */
00025 #include <ti/mas/sdk/memArchCfg.h>
00026
00027 /* VPE component and simulation headers */
00028 #include <ti/mas/vpe/hlc.h>
00029 #include <ti/mas/vpe/slm.h>
00030 #include <ti/mas/vpe/snl.h>
00031 #include <ti/mas/vpe/svd.h>
00032
00033 /* unit test includes */
00034 #include <ti/mas/vpe/test/src/vpesim.h>
00035
00036 /* Simulation error identifiers */
00037 #define vpe_SIM_ERR_1       ( 1)    //
00038 #define vpe_SIM_ERR_2       ( 2)    //
00039 #define vpe_SIM_ERR_3       ( 4)    //
00040 #define vpe_SIM_ERR_4       ( 5)    //
00041 #define vpe_SIM_ERR_5       ( 6)    //
00042 #define vpe_SIM_ERR_6       ( 7)    //
00043 #define vpe_SIM_ERR_7       ( 8)    //
00044 #define vpe_SIM_ERR_8       ( 9)    //
00045 #define vpe_SIM_ERR_9       (10)    //
00046 #define vpe_SIM_ERR_10      (11)    //
00047 #define vpe_SIM_ERR_11      (12)    //
00048 #define vpe_SIM_ERR_12      (13)    //
00049 #define vpe_SIM_ERR_13      (14)    //
00050 #define vpe_SIM_ERR_14      (15)    //
00051 #define vpe_SIM_ERR_15      (16)    //
00052 #define vpe_SIM_ERR_16      (17)    //
00053 #define vpe_SIM_ERR_17      (18)    //
00054 #define vpe_SIM_ERR_18      (19)    //
00055
00056 /* Simulation constraints */
00057 #define vpe_SIM_MAX_SAMPLES          320    // Maximum frame_size
00058 #define vpe_SIM_MAX_ECOBUFS          12     // Maximum module buffers
00059 #define vpe_SIM_MAX_STRING          256     // Maximum string size
00060
00061 /* Simulation file open actions */
00062 #define vpe_SIM_FILEIO_READ         ( 0)    // Open file for read (binary)
00063 #define vpe_SIM_FILEIO_WRITE        ( 1)    // Open file for write (binary)
00064
00065
00066 #define vpe_SIM_SAMPLE_FREQ_16000 16000    // Sampling frequency
00067 #define vpe_SIM_SAMPLE_FREQ_8000  8000    // Sampling frequency
00068
00069 /* Simulation defaults */
00070 #define vpe_SIM_SAMPLES_PER_SECOND  vpe_SIM_SAMPLE_FREQ_16000    // Sampling frequency
00071 #define vpe_SIM_DEF_FRAME_SZ (vpe_SIM_SAMPLES_PER_SECOND/200) // Default frame
00072                                                               // size: 5 msec
00073
00074 #define vpe_SIM_DEF_PCM_FORMAT          (const_COMP_MULAW_8)
00075 #define vpe_SIM_DEF_BASE_DIR            "..\\..\\vectors\\"
00076 #define vpe_SIM_DEF_SIGIN_FNAME         "sigIn.pcm"
00077 #define vpe_SIM_DEF_SIGOUT_FNAME        "sigOut.pcm"
00078
00079 /* sgn defaults */
00080
00081 #define  vpe_SGN_DEF_DC_OFFSET        0
00082 #define  vpe_SGN_DEF_WF_TYPE          1
00083 #define  vpe_SGN_DEF_F1               1000
00084 #define  vpe_SGN_DEF_F2               400
00085 #define  vpe_SGN_DEF_T_AMP1           0x1400
00086 #define  vpe_SGN_DEF_T_AMP2           0x3700
00087 #define  vpe_SGN_DEF_PR_PERIOD        1000
00088 #define  vpe_SGN_DEF_PR_ENABLE        FALSE
00089 #define  vpe_SGN_DEF_NOISE_LEVEL      (-100)
00090 #define  vpe_SGN_DEF_NOISE_SEED       40
00091 #define  vpe_SGN_DEF_NOISE_TYPE       sgn_NT_GAUSS
00092 #define  vpe_SGN_DEF_FSK_DURATION     90
00093 #define  vpe_SGN_DEF_FSK_DATA_LEN     1
00094 #define  vpe_SGN_DEF_POWER_LEVEL      (-10)
00095 #define  vpe_SGN_DEF_HOTH_WNG_SEED    20
00096
00097 /* Simulation PCM format enumeration */
00098 typedef enum {
00099   vpe_SIM_PCM_ALAW = const_COMP_ALAW_8,  // 8-bit ulaw PCM
00100   vpe_SIM_PCM_ULAW = const_COMP_MULAW_8, // 8-bit alaw PCM
00101   vpe_SIM_PCM_LIN  = const_COMP_LINEAR   // Linear PCM
00102 } vpeSimPcm_e;
00103
00104 typedef struct {
00105   tbool fio;                            // TRUE: Get/put samples from/to file
00106   tbool eof;                            // TRUE: End of file reached
00107   FILE  *fptr;                          // File pointer for read/write
00108   char  fname[vpe_SIM_MAX_STRING];      // File name to open/close
00109 } vpeSimFileIo_t;
00110
00111 /* Signal Generator Parameters */
00112 typedef struct {
00113   tbool     state;                  /* TRUE: generator is on.                 */
00114   linSample dcoffset;               /* dc offset (Q0 format)                  */
00115   tint      wftype;                 /* one of sgn_WFT_'s                      */
00116   tint      f1;                     /* the first frequency in Hz              */
00117   tint      f2;                     /* the second frequency in Hz             */
00118   linSample amp1;                   /* amplitude of the first component (Q0)  */
00119   linSample amp2;                   /* amplitude of the second component (Q0) */
00120   tint      nlevel;                 /* idle noise level in dBm0               */
00121   tulong    nseed;                  /* idle noise seed                        */
00122   tint      ntype;                  /* noise type SGN_NT_xxx                  */
00123   tint      pow_level;              /* Hoth or CSS power level in dBm0        */
00124   tulong    hoth_seed;              /* Hoth noise seed                        */
00125
00126 } vpeSGNPars_t;
00127
00128 /* Simulation configuration structure */
00129 typedef struct {
00130   tbool  exec;                        /* TRUE: Provide verbose progress info        */
00131   tbool  hlc_on;                      /* Hlc enable bit                             */
00132   tbool  slm_on;                      /* Slim enable bit                            */
00133   tbool  snl_on;                      /* SNL enable bit                             */
00134   tbool  svd_on;                      /* SVD enable bit                             */
00135   tlong  sample_cnt;                  /* Sample count                               */
00136   tulong sample_bp;                   /* Break (halt) after this sample is reached  */
00137   tbool  sgn;                         /* whether to use sgn, TRUE: use sgn          */
00138   tbool  cfg_sgn;                     /* TRUE: configure SGN                        */
00139   tbool  cfg_hlc;                     /* TRUE: configure HLC                        */
00140   tbool  cfg_slm;                     /* TRUE: configure SLM                        */
00141   tint   slm_mod;                     /* SLM mode, 0: disable, 1~5: enable          */
00142   tint   Fs;                          /* Sampling rate in Hz                        */
00143   hlcControl_t   hlc_ctrl;            /* HLC control structure                      */
00144   vpeSGNPars_t   sgnParam;            /* Parameters used to configure sgn           */
00145   vpeSimFileIo_t sigIn;               /* Signal in file I/O structure               */
00146   vpeSimFileIo_t sigOut;              /* Signal out file I/O structure              */
00147   vpeSimPcm_e    pcmin_format;        /* Input PCM format                           */
00148   vpeSimPcm_e    pcmout_format;       /* Output PCM format                          */
00149   tbool  data;                        /* Flag indicating more samples for simulation*/
00150   tuint  error_id;                    /* Error identifier                           */
00151   tuint  frame_size;                  /* Simulation frame size                      */
00152   char   baseDir[vpe_SIM_MAX_STRING]; /* Base directory for file I/O                */
00153 } vpeSimConfig_t;
00154
00155 /* Global simulation data */
00156 linSample vpeIOBufs[vpe_SIM_MAX_SAMPLES];
00157 vpeSimConfig_t  vpeSimC;
00158 vpeSimConfig_t *vpeSim = &vpeSimC;
00159 char vpe_sim_global_str[vpe_SIM_MAX_STRING];
00160 char vpe_sim_print_str[vpe_SIM_MAX_STRING];
00161
00162 /* Global PCM data buffers */
00163 linSample sigInBuffer [2*vpe_SIM_MAX_SAMPLES * sizeof(linSample)/sizeof(tword)];
00164 linSample sigOutBuffer[2*vpe_SIM_MAX_SAMPLES * sizeof(linSample)/sizeof(tword)];
00165
00166 /* debug buffer placed in external memory */
00167 #if _VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00168 #pragma DATA_SECTION (vpeDebugBuf, "VPEExtDbg");
00169 #define VPEDBG_BUF_LENGTH    520000
00170 tlong vpeDebugBuf[VPEDBG_BUF_LENGTH];
00171 tlong dbgCnt = 0;
00172 #endif
00173
00174 /* Local Function Prototypes */
00175 void  vpe_sim_fileio_init   (vpeSimFileIo_t *fioptr, tuint code);
00176 void  vpe_sim_fileio_end    (vpeSimFileIo_t *fioptr);
00177 void  vpe_sim_init          (void);
00178 void  vpe_init              (void);
00179 tbool vpe_sim_fread         (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr);
00180 void  vpe_sim_fwrite        (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr);
00181 void  vpe_sim_input_mux     (void);
00182 void  vpe_sim_output_mux    (void);
00183 void  vpe_print             (char *str);
00184 void  vpe_iprint            (char *str, tlong ivar);
00185 void  vpe_sprint            (char *str, char *svar);
00186 void  vpe_sim_open_sgn      (void *inst);
00187 void vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs);
00188 void  vpe_sim_gen_frame     (void *inst, tint frame_size, linSample *frame);
00189 sgnFileIo_t *vpe_sim_in_file(sgnFileIo_t *dsc);
00190 sgnFileIo_t *vpe_sim_in_file(sgnFileIo_t *dsc);
00191
00192 tint vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e};
00193
00194 /*-----------------------------------------------------------------
00195  * Function:  vpe_banner_print
00196  *
00197  * Description: Utility to provide major progress information.
00198  *-----------------------------------------------------------------*/
00199 static inline void vpe_banner_print (char *str)
00200 {
00201   vpe_print ("\n");
00202   vpe_print ("------------------------------\n");
00203   vpe_print (str);
00204   vpe_print ("------------------------------\n");
00205   vpe_print ("\n");
00206 }
00207
00208 /*-----------------------------------------------------------------
00209  * Function:  vpe_halt
00210  *
00211  * Description: Utility to provide simulation breakpoint.
00212  *-----------------------------------------------------------------*/
00213 void vpe_halt (tbool *exec)
00214 {
00215   /* Wait for further actions - exit when user sets "halt" to FALSE */
00216   while (!(*exec)) {
00217     asm ("  NOP");
00218     asm ("Set_BP_Here:  ");
00219     asm ("  NOP");
00220     asm ("  NOP");
00221   }
00222 }
00223
00224 /* slm instance */
00225 void *slmInst_ptr = NULL;
00226
00227 /* hlc instance */
00228 void *hlcInst_ptr = NULL;
00229 hlcControl_t hctrlInst, *hctrlInst_ptr = &hctrlInst;
00230
00231 /* snl instance */
00232 void *snlInst_ptr = NULL;
00233 /* snl results */
00234 Fract spchLevdB = frct_MAX, noiseLevdB = frct_MAX;
00235 UFract Nthresh = frct_MAX;
00236 /* snl result out file I/O structure */
00237 vpeSimFileIo_t snlLevOut;
00238
00239 /* svd instance */
00240 void *svdInst_ptr = NULL;
00241 /* svd result out file I/O structure */
00242 vpeSimFileIo_t svdOut;
00243
00244 /* sgn instance */
00245 void *sgnInst_ptr = NULL;
00246
00247 /*-----------------------------------------------------------------
00248  * Filename:  main
00249  *
00250  * Description: Test the vpe API functions.
00251  *-----------------------------------------------------------------*/
00252 void main (void)
00253 {
00254   linSample *buf_Inptr = (linSample *)sigInBuffer;
00255   linSample *buf_Outptr = (linSample *)sigOutBuffer;
00256   LFract svd_sig_pow;
00257
00258   tulong sample_total;
00259   tbool sigIn_data;
00260   tuint second_count;
00261   tuint sample_count;
00262   tint  i, retVal, vad_flag;
00263
00264   /* Initialize for simulation */
00265   vpe_sim_init ();
00266
00267   /* Opportunity to uniquely configure simulation */
00268   vpe_halt (&vpeSim->exec);
00269
00270   /* Progress (verbose only) */
00271   vpe_banner_print ("Simulation:  BEGIN\n");
00272
00273   vpe_init();
00274
00275   /* Main (file) simulation loop */
00276   while (vpeSim->exec) {
00277     /* Simulation pass initialization */
00278     vpeSim->data = TRUE;
00279     if (!vpeSim->sgn){
00280       /* Load I/O files */
00281       vpe_sim_fileio_init (&vpeSim->sigIn,  vpe_SIM_FILEIO_READ);
00282       vpe_sim_fileio_init (&vpeSim->sigOut, vpe_SIM_FILEIO_WRITE);
00283     }
00284   if(vpeSim->snl_on){
00285       /* Load I/O files */
00286       vpe_sim_fileio_init (&snlLevOut, vpe_SIM_FILEIO_WRITE);
00287   }
00288     if(vpeSim->svd_on){
00289       /* Load I/O files */
00290       vpe_sim_fileio_init (&svdOut, vpe_SIM_FILEIO_WRITE);
00291     }
00292
00293     /* Single test/example simulation loop */
00294     second_count = 0;
00295     sample_count = 0;
00296     while (vpeSim->data) {
00297     /* flush cache */
00298 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00299   memarchcfg_cacheFlush();
00300 #endif
00301       /* if use sgn */
00302       if (vpeSim->sgn){
00303         /* configure sgn */
00304         if (vpeSim->cfg_sgn) {
00305           vpeSim->cfg_sgn = FALSE;
00306           vpe_sim_set_sgn (sgnInst_ptr, &vpeSim->sgnParam, vpeSim->Fs);
00307         }
00308         vpe_sim_gen_frame (sgnInst_ptr, vpeSim->frame_size, buf_Inptr);
00309       }
00310       else{
00311         /* Read input data from file */
00312         sigIn_data = vpe_sim_fread (buf_Inptr, vpeSim->frame_size, &vpeSim->sigIn);
00313         vpeSim->data = sigIn_data;
00314       }
00315       /* copy to intermediate storage buffer */
00316       for (i=0;i<vpeSim->frame_size;i++){
00317         vpeIOBufs[i] = buf_Inptr[i];
00318       }
00319
00320       /* Run snl if enabled */
00321       if (vpeSim->snl_on ){
00322         /* calculate snl */
00323         retVal = snlProcess (snlInst_ptr, buf_Inptr, vpeSim->frame_size);
00324         retVal = snlGetLevels (snlInst_ptr, &spchLevdB, &noiseLevdB, &Nthresh);
00325
00326     /* write SNL results to a file */
00327         vpe_sim_fwrite (&spchLevdB, 1, &snlLevOut);
00328         vpe_sim_fwrite (&noiseLevdB, 1, &snlLevOut);
00329         vpe_sim_fwrite ((Fract *)&Nthresh, 1, &snlLevOut);
00330       }
00331
00332       /* Run svd if enabled */
00333       if (vpeSim->svd_on ){
00334         /* run svd and get decisions */
00335         retVal = svdProcess (svdInst_ptr, buf_Inptr, vpeSim->frame_size);
00336         vad_flag = svdGetDecision (svdInst_ptr, &svd_sig_pow);
00337         retVal = svdGetLevels (svdInst_ptr, &spchLevdB, &noiseLevdB, &Nthresh);
00338
00339         /* write SVD results to a file */
00340         vpe_sim_fwrite (&vad_flag, 1, &svdOut);
00341         vpe_sim_fwrite (&spchLevdB, 1, &svdOut);
00342         vpe_sim_fwrite (&noiseLevdB, 1, &svdOut);
00343         vpe_sim_fwrite ((linSample *)&Nthresh, 1, &svdOut);
00344         vpe_sim_fwrite ((linSample *)&svd_sig_pow, 2, &svdOut);
00345       }
00346
00347       /* Run hlc if enabled */
00348       if (vpeSim->hlc_on){
00349         if (vpeSim->cfg_hlc) {
00350           vpeSim->cfg_hlc = FALSE;
00351           retVal = hlcControl(hlcInst_ptr, &vpeSim->hlc_ctrl);
00352           if (retVal != hlc_NOERR){
00353             vpeSim->error_id = vpe_SIM_ERR_5;
00354             vpeSim->exec = FALSE;
00355             vpe_halt (&vpeSim->exec);
00356           }
00357         }
00358         retVal = hlcProcess(hlcInst_ptr, vpeIOBufs);
00359         if (retVal != hlc_NOERR){
00360           vpeSim->error_id = vpe_SIM_ERR_1;
00361           vpeSim->exec = FALSE;
00362           vpe_halt (&vpeSim->exec);
00363         }
00364       }
00365
00366       /* copy to output buffer */
00367       for (i=0;i<vpeSim->frame_size;i++){
00368         buf_Outptr[i] = vpeIOBufs[i];
00369       }
00370       /* Run slm if enabled */
00371       if(vpeSim->slm_on){
00372         if(vpeSim->cfg_slm){
00373           vpeSim->cfg_slm = FALSE;
00374           retVal = slmControl(slmInst_ptr, vpeSim->slm_mod);
00375           if (retVal != slm_NOERR){
00376             vpeSim->error_id = vpe_SIM_ERR_8;
00377             vpeSim->exec = FALSE;
00378             vpe_halt (&vpeSim->exec);
00379           }
00380         }
00381         retVal = slmProcess (slmInst_ptr, buf_Outptr, vpeSim->frame_size);
00382         if (retVal != slm_NOERR){
00383           vpeSim->error_id = vpe_SIM_ERR_2;
00384           vpeSim->exec = FALSE;
00385           vpe_halt (&vpeSim->exec);
00386         }
00387       }
00388       /* copy to storage buffer if not using sgn */
00389       if (!vpeSim->sgn){
00390         /* copy to a output buffer */
00391         for (i=0;i<vpeSim->frame_size;i++){
00392           vpeIOBufs[i] = buf_Outptr[i];
00393         }
00394         /* write to a file */
00395         vpe_sim_fwrite (sigOutBuffer, vpeSim->frame_size, &vpeSim->sigOut);
00396       }// end of if (vpeSim->sgn)
00397
00398       /* Update sample count and notify time progress */
00399       sample_count += vpeSim->frame_size;
00400       if (sample_count >= vpe_SIM_SAMPLES_PER_SECOND) {
00401         sample_count -= vpe_SIM_SAMPLES_PER_SECOND;
00402         second_count++;
00403         printf (" - Progress: %d seconds\n", second_count);
00404       }
00405
00406       /* Check for simulation halt */
00407       sample_total = (tulong) second_count * vpe_SIM_SAMPLES_PER_SECOND + sample_count;
00408       if ((vpeSim->sample_bp != 0)            &&
00409           (sample_total >= vpeSim->sample_bp) &&
00410           (sample_total  - vpeSim->sample_bp) < vpeSim->frame_size) {
00411         vpe_iprint (" - Halting after %d samples\n", sample_total);
00412         vpeSim->exec = FALSE;
00413         vpe_halt (&vpeSim->exec);
00414       }
00415       vpeSim->sample_cnt = sample_total;
00416     } /* vpeSim->data */
00417
00418     vpeSim->exec = FALSE;
00419     if (!vpeSim->sgn){
00420       /* Close input files if using file I/O */
00421       vpe_sim_fileio_end (&vpeSim->sigIn);
00422       /* Check for output file close */
00423       vpe_sim_fileio_end (&vpeSim->sigOut);
00424     }
00425     if(vpeSim->snl_on) {
00426       /* Check for output file close */
00427       vpe_sim_fileio_end (&snlLevOut);
00428     }
00429
00430     if(vpeSim->svd_on) {
00431       /* Check for output file close */
00432       vpe_sim_fileio_end (&svdOut);
00433     }
00434
00435     /* Progress (verbose only) */
00436     vpe_banner_print ("Simulation:  END\n");
00437     /* End of current simulation test/example */
00438 //    vpe_halt (&vpeSim->exec);
00439   } /* vpeSim->exec */
00440
00441   /* End of simulation */
00442   printf("Simulation done.\n");
00443 }
00444
00445
00446
00447
00448 /*-----------------------------------------------------------------
00449  * Function:  vpe_print
00450  *
00451  * Description: Utility to provide static progress information.
00452  *-----------------------------------------------------------------*/
00453 void vpe_print (char *str)
00454 {
00455   if (vpeSim->exec) {
00456     printf (str);
00457   }
00458 }
00459
00460
00461 /*-----------------------------------------------------------------
00462  * Function:  vpe_iprint
00463  *
00464  * Description: Utility to provide integer progress information.
00465  *-----------------------------------------------------------------*/
00466 void vpe_iprint (char *str, tlong ivar)
00467 {
00468   sprintf   (vpe_sim_print_str, str, ivar);
00469   vpe_print (vpe_sim_print_str);
00470 }
00471
00472
00473 /*-----------------------------------------------------------------
00474  * Function:  vpe_sprint
00475  *
00476  * Description: Utility to provide string progress information.
00477  *-----------------------------------------------------------------*/
00478 void vpe_sprint (char *str, char *svar)
00479 {
00480   sprintf   (vpe_sim_print_str, str, svar);
00481   vpe_print (vpe_sim_print_str);
00482 }
00483
00484 /*-----------------------------------------------------------------
00485  * Function:  vpe_sim_fileio_init
00486  *
00487  * Description: Initialize simulation for file I/O
00488  *-----------------------------------------------------------------*/
00489 void vpe_sim_fileio_init (vpeSimFileIo_t *fioptr, tuint code)
00490 {
00491   if (fioptr->fio) {
00492     /* Create file path string */
00493     strcpy (vpe_sim_global_str, vpeSim->baseDir);
00494     strcat (vpe_sim_global_str, fioptr->fname);
00495
00496     /* Ensure that file pointer is NULL (closed) */
00497     if (fioptr->fptr != NULL) {
00498       vpe_sprint (" - File already open: %s\n", vpe_sim_global_str);
00499       return;
00500     }
00501
00502     /* Open file (read/write binary) and assign file pointer */
00503     if (code == vpe_SIM_FILEIO_READ) {
00504       fioptr->fptr = fopen (vpe_sim_global_str, "rb");
00505     }
00506     else if (code == vpe_SIM_FILEIO_WRITE) {
00507       fioptr->fptr = fopen (vpe_sim_global_str, "wb");
00508     }
00509     else {
00510       vpe_iprint ("Error: unrecognized file action %d \n", code);
00511       return;
00512     }
00513
00514     /* Ensure open success */
00515     if (fioptr->fptr == NULL) {
00516       vpe_sprint ("Unable to open file: %s\n", vpe_sim_global_str);
00517       fioptr->fio = FALSE;
00518     }
00519     else {
00520       vpe_sprint (" - Opened file: %s\n", vpe_sim_global_str);
00521       fioptr->eof = FALSE;
00522     }
00523   }
00524 }
00525
00526
00527 /*-----------------------------------------------------------------
00528  * Function:  vpe_sim_fileio_end
00529  *
00530  * Description: Clear simulation after file I/O
00531  *-----------------------------------------------------------------*/
00532 void vpe_sim_fileio_end (vpeSimFileIo_t *fioptr)
00533 {
00534   if (fioptr->fio) {
00535     /* Close file pointer */
00536     if (fioptr->fptr == NULL) {
00537       vpe_print ("Warning: premature file close\n");
00538     }
00539     else {
00540       if (fioptr->eof) {
00541         fclose (fioptr->fptr);
00542         fioptr->fptr = (FILE *) NULL;
00543         /* Print progress */
00544         strcpy (vpe_sim_global_str, vpeSim->baseDir);
00545         strcat (vpe_sim_global_str, fioptr->fname);
00546         vpe_sprint (" - Closed file: %s\n", vpe_sim_global_str);
00547       }
00548     }
00549   }
00550 }
00551
00552
00553
00554 /*-----------------------------------------------------------------
00555  * Function:  vpe_sim_fread
00556  *
00557  * Description: Perform file input
00558  *-----------------------------------------------------------------*/
00559 #define VPESIM_NUM_BYTES_LINSAMP 2
00560 tword vpe_temp_io_buf[vpe_SIM_MAX_SAMPLES*VPESIM_NUM_BYTES_LINSAMP];
00561
00562 tbool vpe_sim_fread (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
00563 {
00564   tuint num_read;
00565   tint  i, j;
00566
00567   if(fioptr->fptr == NULL){
00568     return FALSE;
00569   }
00570
00571   /* read the file*/
00572   num_read = fread(vpe_temp_io_buf, VPESIM_NUM_BYTES_LINSAMP, buf_size, fioptr->fptr);
00573
00574   /* check for endo of file */
00575   if (num_read != (buf_size)) {
00576       fioptr->eof = TRUE;
00577       return FALSE;
00578   }
00579
00580   /* pack bytes into words */
00581   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00582   {
00583     buf[i]  = vpe_temp_io_buf[j] | (vpe_temp_io_buf[j+1] << 8);
00584   }
00585
00586   return TRUE;
00587 }
00588
00589 /*-----------------------------------------------------------------
00590  * Function:  vpe_sim_fwrite
00591  *
00592  * Description: Perform file output
00593  *-----------------------------------------------------------------*/
00594 void vpe_sim_fwrite (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
00595 {
00596   tuint i, j;
00597
00598   if(fioptr->fptr == NULL){
00599     return;
00600   }
00601
00602   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00603   {
00604     vpe_temp_io_buf[j]   = (buf[i]     ) & 0x00ff;
00605     vpe_temp_io_buf[j+1] = (buf[i] >> 8) & 0x00ff;
00606   }
00607
00608   fwrite(vpe_temp_io_buf, VPESIM_NUM_BYTES_LINSAMP, buf_size, fioptr->fptr);
00609
00610 }
00611
00612 /*-----------------------------------------------------------------
00613  * Function:  vpe_sim_init
00614  *
00615  * Description: vpe simulation initialization.
00616  *-----------------------------------------------------------------*/
00617 void vpe_sim_init (void)
00618 {
00619   /* Simulation structure initialization */
00620   vpeSim->exec          = FALSE;
00621   vpeSim->hlc_on        = FALSE;
00622   vpeSim->slm_on        = FALSE;
00623   vpeSim->snl_on        = TRUE;
00624   vpeSim->svd_on        = FALSE;
00625   vpeSim->sample_cnt    = 0;
00626   vpeSim->error_id      = 0;
00627   vpeSim->sample_bp     = 0L;
00628   vpeSim->pcmin_format  = vpe_SIM_PCM_LIN;
00629   vpeSim->pcmout_format = vpe_SIM_PCM_LIN;
00630   vpeSim->frame_size    = vpe_SIM_DEF_FRAME_SZ;
00631   vpeSim->sgn           = FALSE;
00632   vpeSim->cfg_sgn       = FALSE;
00633   vpeSim->cfg_hlc       = FALSE;
00634   vpeSim->cfg_slm       = TRUE;
00635   vpeSim->slm_mod       = slm_MODE5;
00636   vpeSim->Fs            = vpe_SIM_SAMPLES_PER_SECOND;
00637
00638   /* Simulation file I/O initialization */
00639   vpeSim->sigIn.fio   = TRUE;
00640   vpeSim->sigOut.fio  = TRUE;
00641   vpeSim->sigIn.fptr  = (FILE *) NULL;
00642   vpeSim->sigOut.fptr  = (FILE *) NULL;
00643   strcpy (vpeSim->baseDir   , vpe_SIM_DEF_BASE_DIR);
00644   strcpy (vpeSim->sigIn.fname , vpe_SIM_DEF_SIGIN_FNAME);
00645   strcpy (vpeSim->sigOut.fname , vpe_SIM_DEF_SIGOUT_FNAME);
00646 }
00647 void vpe_init (void)
00648 {
00649   hlcConfig_t hlc_cfg_info;
00650   slmConfig_t slm_cfg_info;
00651   tint hlcSize, slmSize, snlSize, svdSize, sgnSize;
00652   tint srate_factor;
00653
00654   tint retVal;
00655
00656   if (vpeSim->hlc_on){
00657     /* allocate memory for HLC */
00658     retVal = hlcGetSizes(&hlcSize);
00659     if (retVal != hlc_NOERR){
00660       vpeSim->error_id = vpe_SIM_ERR_3;
00661       vpeSim->exec = FALSE;
00662       vpe_halt (&vpeSim->exec);
00663     }
00664
00665     hlcInst_ptr = malloc (hlcSize);
00666     /* init hlc */
00667     hlc_cfg_info.valid_bf = 0x00;
00668
00669     /* configure sampling rate */
00670     hlc_cfg_info.valid_bf |= 0x10;
00671
00672     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00673       hlc_cfg_info.srate_factor = hlc_SRATE_FACTOR_8K;  /* 8kHz sampling rate */
00674     }
00675     else {
00676       hlc_cfg_info.srate_factor = hlc_SRATE_FACTOR_16K; /* 16kHz sampling rate */
00677     }
00678
00679     /* configure frm_len */
00680     if (vpeSim->frame_size <= vpe_SIM_MAX_SAMPLES){
00681       hlc_cfg_info.valid_bf |= 0x08; /* configure frame length */
00682       hlc_cfg_info.frm_len = vpeSim->frame_size;
00683     }
00684     else{
00685       vpeSim->error_id = vpe_SIM_ERR_4;
00686       vpeSim->exec = FALSE;
00687       vpe_halt (&vpeSim->exec);
00688     }
00689 #if 0
00690    /*------------------------------------------
00691      the following is for testing purpose only
00692     -------------------------------------------*/
00693     /* configure TC */
00694     hlc_cfg_info.valid_bf |= 0x04;
00695     hlc_cfg_info.power_tc = 2;
00696
00697     /* configure ramp_out */
00698     hlc_cfg_info.valid_bf |= 0x02;
00699     hlc_cfg_info.ramp_out_period = 400;
00700
00701     /* configure thresh */
00702     hlc_cfg_info.valid_bf |= 0x01;
00703     hlc_cfg_info.thresh = -20;
00704
00705     /*------ end of testing hlc cfg ---------- */
00706 #endif
00707
00708     retVal = hlcInit(hlcInst_ptr, &hlc_cfg_info);
00709     if (retVal != hlc_NOERR){
00710       vpeSim->error_id = vpe_SIM_ERR_4;
00711       vpeSim->exec = FALSE;
00712       vpe_halt (&vpeSim->exec);
00713     }
00714     /* Enable HLC */
00715     hctrlInst_ptr->ctl_code = hlc_CTL_ENA;
00716     retVal = hlcControl(hlcInst_ptr, hctrlInst_ptr);
00717     if (retVal != hlc_NOERR){
00718       vpeSim->error_id = vpe_SIM_ERR_6;
00719       vpeSim->exec = FALSE;
00720       vpe_halt (&vpeSim->exec);
00721     }
00722   } /* if testing HLC */
00723
00724   /* testing SLM */
00725   if (vpeSim->slm_on){
00726     /* allocate memory for SLM */
00727     retVal = slmGetSizes(&slmSize);
00728     if (retVal != slm_NOERR){
00729       vpeSim->error_id = vpe_SIM_ERR_9;
00730       vpeSim->exec = FALSE;
00731       vpe_halt (&vpeSim->exec);
00732     }
00733     slmInst_ptr = malloc (slmSize);
00734
00735     /* init SLM, SLM is disabled */
00736     slm_cfg_info.valid_bf  = 0x00;
00737     /* configure sampling rate */
00738     slm_cfg_info.valid_bf |= 0x01;
00739     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00740       slm_cfg_info.srate_factor = slm_SRATE_FACTOR_8K;
00741     }
00742     else {
00743       slm_cfg_info.srate_factor = slm_SRATE_FACTOR_16K;
00744     }
00745
00746     retVal = slmInit (slmInst_ptr, &slm_cfg_info);
00747     if (retVal != slm_NOERR){
00748       vpeSim->error_id = vpe_SIM_ERR_7;
00749       vpeSim->exec = FALSE;
00750       vpe_halt (&vpeSim->exec);
00751     }
00752   } /* if testing SLM */
00753
00754   /* testing SNL*/
00755   if (vpeSim->snl_on){
00756     retVal = snlGetSizes(&snlSize);
00757     if (retVal != snl_NOERR){
00758       vpeSim->error_id = vpe_SIM_ERR_10;
00759       vpeSim->exec = FALSE;
00760       vpe_halt (&vpeSim->exec);
00761     }
00762     snlInst_ptr = malloc (snlSize);
00763     /* initialize SNL */
00764     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00765       srate_factor = snl_SRATE_FACTOR_8K;
00766     }
00767     else {
00768       srate_factor = snl_SRATE_FACTOR_16K;
00769     }
00770
00771     retVal = snlInit (snlInst_ptr, srate_factor);
00772     if (retVal != snl_NOERR){
00773       vpeSim->error_id = vpe_SIM_ERR_11;
00774       vpeSim->exec = FALSE;
00775       vpe_halt (&vpeSim->exec);
00776     }
00777   strcpy (snlLevOut.fname, "snlLevOut.pcm");
00778   snlLevOut.fio   = TRUE;
00779     snlLevOut.fptr  = (FILE *) NULL;
00780   } /* end of testing SNL */
00781
00782   /* testing SVD*/
00783   if (vpeSim->svd_on){
00784     retVal = svdGetSizes(&svdSize);
00785     if (retVal != svd_NOERR){
00786       vpeSim->error_id = vpe_SIM_ERR_17;
00787       vpeSim->exec = FALSE;
00788       vpe_halt (&vpeSim->exec);
00789     }
00790     svdInst_ptr = malloc (svdSize);
00791     /* initialize SVD */
00792     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00793       srate_factor = svd_SRATE_8K;
00794     }
00795     else {
00796       srate_factor = svd_SRATE_16K;
00797     }
00798
00799     retVal = svdInit (svdInst_ptr, srate_factor);
00800     if (retVal != svd_NOERR){
00801       vpeSim->error_id = vpe_SIM_ERR_18;
00802       vpeSim->exec = FALSE;
00803       vpe_halt (&vpeSim->exec);
00804     }
00805
00806   strcpy (svdOut.fname, "svdOut.pcm");
00807   svdOut.fio   = TRUE;
00808     svdOut.fptr  = (FILE *) NULL;
00809   } /* end of testing SVD */
00810
00811   /* init sgn */
00812   vpeSim->sgnParam.state     = 1;
00813   vpeSim->sgnParam.dcoffset  = vpe_SGN_DEF_DC_OFFSET;
00814   vpeSim->sgnParam.wftype    = vpe_SGN_DEF_WF_TYPE;
00815   vpeSim->sgnParam.f1        = vpe_SGN_DEF_F1;
00816   vpeSim->sgnParam.f2        = vpe_SGN_DEF_F2;
00817   vpeSim->sgnParam.amp1      = vpe_SGN_DEF_T_AMP1;
00818   vpeSim->sgnParam.amp2      = vpe_SGN_DEF_T_AMP2;
00819   vpeSim->sgnParam.nlevel    = vpe_SGN_DEF_NOISE_LEVEL;
00820   vpeSim->sgnParam.nseed     = vpe_SGN_DEF_NOISE_SEED;
00821   vpeSim->sgnParam.ntype     = vpe_SGN_DEF_NOISE_TYPE;
00822   vpeSim->sgnParam.pow_level = vpe_SGN_DEF_POWER_LEVEL;
00823   vpeSim->sgnParam.hoth_seed = vpe_SGN_DEF_HOTH_WNG_SEED;
00824
00825   retVal = sgnGetSizes (&sgnSize);
00826   sgnInst_ptr = malloc (sgnSize);
00827   vpe_sim_open_sgn (sgnInst_ptr);
00828
00829   /* Init cache, L1D, L1P as cache, L2 32kB cache */
00830
00831 #if _VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00832   cacheConfig.L2sizeCfg = L2_SIZE_32KB;
00833 #endif
00834 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00835   memarchcfg_cacheEnable();
00836 #endif
00837 }
00838 #if 1
00839 /*-----------------------------------------------------------------
00840  * Function:  vpe_sim_open_sgn
00841  *
00842  * Description: vpe simulation open signal generator
00843  *-----------------------------------------------------------------*/
00844
00845 void vpe_sim_open_sgn (void *inst)
00846 {
00847   sgnConfig_t cfg;
00848
00849   cfg.dc_offset     = vpe_SGN_DEF_DC_OFFSET;
00850   cfg.wf_type       = vpe_SGN_DEF_WF_TYPE;
00851   cfg.f1            = vpe_SGN_DEF_F1;
00852   cfg.f2            = vpe_SGN_DEF_F2;
00853   cfg.Fs            = vpeSim->Fs;
00854   cfg.t_amp1        = vpe_SGN_DEF_T_AMP1;
00855   cfg.t_amp2        = vpe_SGN_DEF_T_AMP2;
00856   cfg.pr_period     = vpe_SGN_DEF_PR_PERIOD;     /* # of samples between phase reversals */
00857   cfg.pr_enable     = vpe_SGN_DEF_PR_ENABLE;     /* disable phase reversal */
00858   cfg.noise_level   = vpe_SGN_DEF_NOISE_LEVEL;
00859   cfg.noise_seed    = vpe_SGN_DEF_NOISE_SEED;
00860   cfg.noise_type    = vpe_SGN_DEF_NOISE_TYPE;
00861   cfg.fsk_duration  = vpe_SGN_DEF_FSK_DURATION;  /* 90/300 = 300ms */
00862   cfg.fsk_dataptr   = &vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN];
00863   cfg.fsk_numword   = vpe_SGN_DEF_FSK_DATA_LEN;
00864   cfg.power_level   = vpe_SGN_DEF_POWER_LEVEL;
00865   cfg.hoth_wng_seed = vpe_SGN_DEF_HOTH_WNG_SEED;
00866   cfg.file_io_fcn   = vpe_sim_in_file;
00867
00868   sgnInit (inst, &cfg);
00869 } /* vpe_sim_open_sgn */
00870
00871 /*-----------------------------------------------------------------
00872  * Function:  vpe_sim_open_sgn
00873  *
00874  * Description: vpe simulation open signal generator
00875  *-----------------------------------------------------------------*/
00876
00877 void vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs)
00878 {
00879   sgnControl_t  ctl;
00880
00881   if (sgn->state) {
00882     ctl.Fs        = Fs;
00883     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00884       ctl.code          = sgn_CTL_CSS_POW;
00885       ctl.u.power_level = sgn->pow_level;
00886     }
00887     else if (sgn->wftype == sgn_WFT_HOTH) {
00888       ctl.code          = sgn_CTL_HOTH_POW;
00889       ctl.u.power_level = sgn->pow_level;
00890     }
00891     else {
00892       ctl.code      = sgn_CTL_TONE;
00893       ctl.u.t.f1    = sgn->f1;
00894       ctl.u.t.f2    = sgn->f2;
00895       ctl.u.t.amp1  = sgn->amp1;
00896       ctl.u.t.amp2  = sgn->amp2;
00897     }
00898     sgnControl (inst, &ctl);
00899
00900     ctl.code           = sgn_CTL_NOISE;
00901     ctl.u.noise_level  = sgn->nlevel;
00902   }
00903   else {
00904     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00905       ctl.code          = sgn_CTL_CSS_POW;
00906       ctl.u.power_level = -80;
00907     }
00908     else if (sgn->wftype == sgn_WFT_HOTH) {
00909       ctl.code          = sgn_CTL_HOTH_POW;
00910       ctl.u.power_level = -80;
00911     }
00912     else {
00913       ctl.code     = sgn_CTL_TONE;
00914       ctl.u.t.f1   = sgn->f1;
00915       ctl.u.t.f2   = sgn->f2;
00916       ctl.u.t.amp1 = 0;
00917       ctl.u.t.amp2 = 0;
00918     }
00919     sgnControl (inst, &ctl);
00920
00921     ctl.code           = sgn_CTL_NOISE;
00922     ctl.u.noise_level  = -80;
00923   }
00924   sgnControl (inst, &ctl);
00925 } /* set_sgn */
00926
00927
00928 /******************************************************************************
00929  * FUNCTION PURPOSE: Generate a signal frame
00930  ******************************************************************************
00931  * DESCRIPTION: Generate a frame
00932  *
00933  *****************************************************************************/
00934 void vpe_sim_gen_frame (void *inst, tint frame_size, linSample *frame)
00935 {
00936   /* Generate one frame of samples */
00937   sgnGenerateFrame (inst, frame_size, frame);
00938
00939 } /* vpe_sim_gen_frame */
00940
00941 /* used to set probe point for the Tx/Rx input signal(s) */
00942 linSample *inFrame, *outFrame;
00943 tint      inCnt, outCnt;
00944
00945 sgnFileIo_t *vpe_sim_in_file (sgnFileIo_t *dsc)
00946 {
00947   inFrame = dsc->frame;
00948   inCnt   = dsc->cnt;
00949   asm (" nop");
00950   asm (" nop");
00951   asm (" nop");
00952   return (dsc);
00953 } /* vpe_sim_in_file */
00954
00955 sgnFileIo_t *vpe_sim_out_file (sgnFileIo_t *dsc)
00956 {
00957   outFrame = dsc->frame;
00958   outCnt   = dsc->cnt;
00959   asm (" nop");
00960   asm (" nop");
00961   asm (" nop");
00962   return (dsc);
00963 } /* vpe_sim_out_file */
00964
00965 #endif
00966
00967 /* Nothing past this point */


VPE Test: vpesim.h File Reference

  • File List
  • Globals

vpesim.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | _VPESIM_C54 0
#define | _VPESIM_C55 0
#define | _VPESIM_C55L 0
#define | _VPESIM_C64 0
#define | _VPESIM_C64_BIG_ENDIAN 0
#define | _VPESIM_C64P 0
#define | _VPESIM_C64P_BIG_ENDIAN 0

Define Documentation

#define _VPESIM_C54 0

Definition at line 18 of file vpesim.h.

#define _VPESIM_C55 0

Definition at line 24 of file vpesim.h.

#define _VPESIM_C55L 0

Definition at line 30 of file vpesim.h.

#define _VPESIM_C64 0

Definition at line 36 of file vpesim.h.

#define _VPESIM_C64_BIG_ENDIAN 0

Definition at line 42 of file vpesim.h.

#define _VPESIM_C64P 0

Definition at line 48 of file vpesim.h.

#define _VPESIM_C64P_BIG_ENDIAN 0

Definition at line 54 of file vpesim.h.


VPE Test: vpesim.h Source File

  • File List
  • Globals

vpesim.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  *
00004  ******************************************************************************
00005  * FILE NAME:   vpesim.h
00006  *
00007  * DESCRIPTION: Based on compiler switch, include platform specific profile file
00008  *
00009  * (C) Copyright 2008, Texas Instruments, Inc.
00010  *****************************************************************************/
00011
00012 #ifndef _VPESIM_H
00013 #define _VPESIM_H
00014
00015 #ifdef ti_targets_C54
00016 #define _VPESIM_C54 1
00017 #else
00018 #define _VPESIM_C54 0
00019 #endif
00020
00021 #ifdef ti_targets_C55
00022 #define _VPESIM_C55 1
00023 #else
00024 #define _VPESIM_C55 0
00025 #endif
00026
00027 #ifdef ti_targets_C55_large
00028 #define _VPESIM_C55L 1
00029 #else
00030 #define _VPESIM_C55L 0
00031 #endif
00032
00033 #ifdef ti_targets_C64
00034 #define _VPESIM_C64 1
00035 #else
00036 #define _VPESIM_C64 0
00037 #endif
00038
00039 #ifdef ti_targets_C64_big_endian
00040 #define _VPESIM_C64_BIG_ENDIAN 1
00041 #else
00042 #define _VPESIM_C64_BIG_ENDIAN 0
00043 #endif
00044
00045 #ifdef ti_targets_C64P
00046 #define _VPESIM_C64P 1
00047 #else
00048 #define _VPESIM_C64P 0
00049 #endif
00050
00051 #ifdef ti_targets_C64P_big_endian
00052 #define _VPESIM_C64P_BIG_ENDIAN 1
00053 #else
00054 #define _VPESIM_C64P_BIG_ENDIAN 0
00055 #endif
00056
00057 #endif /* _VPESIM_H */
00058
00059 /* Nothing past this point */