VOLIB: VOLIB User's Manual (c66x)

  • Main Page
  • Files
  • Related Pages

VOLIB User's Manual (c66x)

Release 2.0.0.3

Getting Started

Introduction | VOLIB features and advantages
Package Contents | What the installation provides and where
Integration | How to integrate VOLIB into your code
Examples | Example projects provided with VOLIB
Component Reference | Detailed documentation for all VOLIB components

Additional Documents

Release Notes | New features, device support, known issues, etc.
Software Manifest | Link to manifests for all packages in delivery

Helpful Links

Code Gen Tools | Download site for TI DSP code generation tools
Code Composer Studio | Download site for Code Composer Studio IDE
BIOS E2E Forum | Forum for VOLIB questions or remarks
TI Telecom Libraries | Home for latest VOLIB and FAXLIB releases

Copyright 2012, Texas Instruments Incorporated


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:
  • Introduction
  • Package Contents
  • Examples
  • Integration
  • Individual Component Documentation
  • CCS Project Conversion


VOLIB: Introduction

Introduction

Back

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.

Features and Benefits

The TI c66x VOLIB includes the components listed below 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 1 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 1. Typical Voice Application Block Diagram

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, clarification should be provided regarding what comprises a component and which components comprise VOLIB.

Listed below are the components in the VOLIB delivery for c66x.

  • Caller Identification Package (CID)
  • Echo Canceller Unit (ECU)
  • Noise Matching Unit (NMU)
  • Packet Loss Concealment Package (PLC)
  • Tone Detection Unit (TDU)
  • Tone Generation Engine (TGE)
  • Voice Activity Detection Unit (VAU)
  • Voice Processing Elements Package (VPE)
  • Voice Enhancement Unit (VEU)

Each component is delivered as a compressed package in the packages directory. The packages follow a common naming convention based on the package 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
  • <VER> represents the component version

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

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

Where:

  • <COMP> represents the component name
  • <WORK> represents the working directory in which the package was extracted.

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

  1. A docs sub\-directory for all documentation
  2. A c<TARG> sub-directory for the component library(s)
  3. Release notes in HTML format
  4. A makefile for building the code using GNU make (requires source delivery)
  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 each perform a specific voice processing task.

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, since the TDU component consists of of a single module, the API for the TDU is defined by the single header file:

          /ti/mas/tdu/tdu.h

On the other hand, some components consist of multiple modules. The VPE component, for instance, contains the six modules: SFC, PCM, HLC, SNL, SVD and SLM. As such, the API for these modules are defined by six individual header files:

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


VOLIB: Package Contents

Package Contents

Back

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, C64P or C66 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 2, though the release notes will be named to match the version and DSP core (target) of the particular installation.

Figure 2. c66x VOLIB Directory Structure

The files that comprise the VOLIB installation can be categorized into the following seven categories.

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

Installation places all VOLIB documentation in a docs directory in the VOLIB root. The following documentation comes with the delivery:

  • VOLIB_Users_Manual.chm (this document, CHM format)
  • VOLIB_Users_Manual.html (this document, HTML format)
  • Release Notes
  • Software Manifest
  • Package License

Component Repository

The installation creates a components directory in the VOLIB root folder. This directory serves as a repository for all 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 that contains all component and dependent packages. This directory is generated during installation by expanding all compressed packages in the components directory. The individual component packages expand to the packages\ti\mas directory (relative to VOLIB root). The contents of each component directory are described in Individual Component Documentation below.

Eclipse Support

The eclipse directory contains all files required for VOLIB to be recognized by Eclipse versions of Code Composer Studio (CCS) as a plug-in.

Packaging

The VOLIB installation creates a package directory. This directory contains meta information required by the TI packaging tools.


VOLIB: Examples

Examples

Back

Examples

The examples folder holds CCS example projects that illustrate how the components in VOLIB can be used to provide a various voice solutions. This directory is currently empty.

Unit Test Examples

Each component is delivered with a test code project to facilitate test 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. Vary input and observe changes in execution

Each component provides specific instructions to get its associated test code example up and running in CCS. The links below are provided for quick access to this documentation for each of the components that comprise VOLIB.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building any of the Unit Test Projects, please reference the CCS Project Conversion

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


VOLIB: Integration

Integration

Back

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

Compile Components

On installation, the VOLIB libraries are built and ready to link. As such, this step is only required when the original source code for any component has been refined or contributions have been added. Since no components are currently offered as source code, this step is currently obsolete.

Add API CAlls

The external API and call setup flow are provided as part of each component packages internal documentation. See Individual Component Documentation to reference documentation for each VOLIB component.

Add API CAlls

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 via the -I compiler directive
  3. Reference all header files using their full path (i.e., #include <ti/mas/tdu/tdu.h>)

Link Component Libraries

The link process requires that the libraries of the respective components be identifiable by 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 linker directive.


VOLIB: Individual Component Documentation

Individual Component Documentation

Back

Caller Identification (CID)
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 (ECU)
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 (NMU)
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 (PLC)
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 (TDU)
Documentation: | TDU Component Users Manual TDU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Tone Generation Engine (TGE)
Documentation: | TGE Component Users Manual TGE Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Voice Activity Detection Unit (VAU)
Documentation: | VAU Component Users Manual VAU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Voice Processing Elements (VPE)
Documentation: | VEU Component Users Manual VEU Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements

Voice Enhancement Unit (VEU)
Documentation: | VPE Component Users Manual VPE Simulation Users Manual
Quick Links: | Functional Description External API Integration Standards Compliance MIPS Requirements Memory Requirements


VOLIB: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert CCS projects between the two currently supported CCS versions; CCS V5.X and CCS V4.2. The procedures described here will convert the unit test CCS projects for all VOLIB components. Each component unit test CCS project may be converted individually by following the procedures provided in the component's Simulation User's Manual (see Individual Component Documentation).

The two procedures are described in detail below.

  • Convert All VOLIB CCS V4.2 Projects to CCS V5.X
  • Convert All VOLIB CCS V5.X Projects to CCS V4.2

Convert All VOLIB CCS V4.2 Projects to CCS V5.X

The procedure described here serves as a guide for anyone who has received VOLIB containing CCS Projects created for version 4.2, yet requires CCS version 5.X projects.

  1. Open CCS version 5.X.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the volib_C66_2_0_0_3\ccsProjects\ directory.
  4. Load the conversion project into CCS. The conversion project will be named VOLIB_C66_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all VOLIB component Unit Test CCS projects in the volib_C66_2_0_0_3\packages\ti\mas\ directory such that they will load and build with CCS version 5.x

Convert All VOLIB CCS V5.X Projects to CCS V4.2

The procedure described here serves as a guide for anyone who has received VOLIB containing CCS Projects created for version 5.X, yet requires CCS version 4.2 projects.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the volib_C66_2_0_0_3\ccsProjects\ directory.
  4. Load the conversion project into CCS. The conversion project will be named VOLIB_C66_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all VOLIB component Unit Test CCS projects in the volib_C66_2_0_0_3\packages\ti\mas\ directory such that they will load and build with CCS version 4.2


CID 2.2.0.2 Release Notes

February 16, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The Caller ID Module (CID) supports the Caller ID feature, compliant with Bellcore, NTT and ETSI standards.

back to top

Documentation

The following documentation is available:

  • CID API Reference's Guide
  • CID Source Reference's Guide (Source Release Only)
  • CID Component Software Manifest
  • CID User's Manual

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C64x+ ELF targets
  • Added profiling capability
  • Updated for SWTOOLS version 5.0.1
  • Added missing linker command file for c66be

back to top

Upgrade and Compatibility Information

This ti.mas.cid version is compatible with the last released ti.mas.cid version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Versions 4.2.4, 5.1.0

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


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


ECU 10.92.0.4 Release Notes

February 23, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The ECU is a component used to cancel TDM-side echo in a voice over packet application. back to top

Documentation

The following documentation is available:

  • ECU API Reference's Guide
  • EDU Source Reference's Guide (Source Release Only)
  • ECU Component Software Manifest
  • ECU User's Manual

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C64x+ ELF targets
  • Added profiling to unit test
  • Added buffer placement strategy to documentation (IR #82614, VoLIB 2.0.0)
  • Updated for SWTOOLS 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)
  • Fixed C55x ECU automation build issue (IR #89550, VoLIB 2.0.0)
  • Resolved ECU unit test missing directories issue (IR #89739, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.ecu version is compatible with the last released ti.mas.ecu version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.3.0 (Common data type definitions)
  • ti.mas.swtools 5.0.0.0 (Internally used s/w tools)
  • ti.mas.util 4.7.5.0 (Common utilities)
  • ti.mas.fract 2.4.4.0 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.6.0 (Signal Generators)
  • CCS Versions 4.2.4, 5.1.0

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version cgen410
  • C6xx Code Generation Tools version 7.2.02

back to top

Known Issues

  • G.168 Test 10, Part A (NLP off) fails at end of CED tone

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


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.


NMU 1.5.0.2 Release Notes

February 16, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The Noise Matching Unit (NMU) component is for the purpose of background noise matching in speech systems.

back to top

Documentation

The following documentation is available:

  • NMU API Reference's Guide
  • NMU Source Reference's Guide (Source Release Only)
  • NMU Component Software Manifest

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C64x+ ELF targets
  • Changes for SWTOOLS version 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.nmu version is compatible with the last released ti.mas.nmu version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP
  • Linux

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66
  • ARM

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)
  • ti.mas.iface.ifnmu 3.0.2.1 (NMU Interface definitions)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Versions 4.2.X, 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6
  • ARM Montavista Pro version 5.0

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


PLC 1.3.0.2 Release Notes

February 15, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

Packet Loss Concealment (PLC) is a mechanism to synthesize the missing signal during the period of packet loss.

back to top

Documentation

The following documentation is available:

  • PLC API Reference's Guide
  • PLC Source Reference's Guide (Source Release Only)
  • PLC Component Software Manifest

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C64x+ ELF targets
  • Changes for SWTOOLS version 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.plc version is compatible with the last released ti.mas.plc version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP
  • Linux

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66
  • ARM

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)
  • ti.mas.iface.ifplc 1.1.2.1 (PLC Interface definitions)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Versions 4.2.X, 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6
  • ARM Montavista Pro version 5.0

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


VEU Package

Manifest for VEU Package Version 4.4.0.3

The Voice Enhancement Unit (VEU) provides software modules to enhance the listening experience under various conditions

Table of Contents

  1. Manifest Legend
  2. Disclaimers
  3. Export Information
  4. Manifest
  5. Credits and Attributions
  6. License Text

Legend (explanation of the fields in the Manifest Table below)

Software Name | The name of the application or file
Version | Version of the application or file
License Type | Type of license(s) under which TI will be providing software to the licensee (e.g. BSD, GPLv2, TI TSPA License, TI Proprietary License). See Open Source Reference License Disclaimer in the Disclaimers Section.
Location | The directory name and path on the media (or in an archive) where the Software is located.
Delivered As | This field will either be "Source", "Binary" or "Source and Binary" and is the form the content of the Software is delivered in. If the Software is delivered in an archive format, this field applies to the contents of the archive. If the word Limited is used with Source, as in "Limited Source" or "Limited Source and Binary" then only portions of the Source for the application are provided.
Modified by TI | This field will either be "Yes" or "No". A "Yes" means TI has made changes to the Software. A "No" means TI has not made any changes. Note: This field is not applicable for Software "Obtained from" TI.
Obtained from | This field specifies from where or from whom TI obtained the Software. It may be a URL to an Open Source site, a 3rd party licensor, or TI (if TI developed the software). If this field contains a link to Open Source software, the date TI downloaded the Software is also recorded. See Links Disclaimer in the Disclaimers Section.

Disclaimers

Export Control Classification Number (ECCN)

Any use of ECCNs listed in the Manifest is at the user's risk and without recourse to TI. Your company, as the exporter of record, is responsible for determining the correct classification of any item at the time of export. Any export classification by TI of Software is for TI's internal use only and shall not be construed as a representation or warranty regarding the proper export classification for such Software or whether an export license or other documentation is required for exporting such Software.

Links in the Manifest

Any links appearing on this Manifest (for example in the "Obtained from" field) were verified at the time the Manifest was created. TI makes no guarantee that any listed links will remain active in the future.

Open Source License References

Your company is responsible for confirming the applicable license terms for any open source Software listed in this Manifest that was not "Obtained from" TI. Any open source license specified in this Manifest for Software that was not "Obtained from" TI is for TI's internal use only and shall not be construed as a representation or warranty regarding the proper open source license terms for such Software.

Export Information

ECCN for Software included in this release: Publicly Available

ECCN for Technology (e.g., user documentation, specifications) included in this release: Publicly Available

Manifest

See Legend above for a description of the columns and possible values.

Software Name | Version | License Type | Delivered As | Modified by TI |
Voice Enhancement Unit | 4.4.0.3 | TI TSPA | Object | N/A | Location | ~/ti/mas/veu
 |  |  |  |  | Obtained from | TI

Credits

Licenses

Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ Texas Instruments Incorporated

Technology and Software Publicly Available

Software License Agreement

IMPORTANT -- PLEASE READ THE FOLLOWING LICENSE AGREEMENT CAREFULLY. THIS IS A LEGALLY BINDING AGREEMENT. DO NOT DOWNLOAD THE LICENSED MATERIALS UNLESS: (1) YOU ARE AUTHORIZED TO ACCEPT AND AGREE TO THE TERMS OF THIS LICENSE AGREEMENT AND (2) YOU INTEND TO ENTER INTO AND TO BE BOUND BY THE TERMS OF THIS AGREEMENT.

This Software License Agreement ("Agreement") is a legal agreement between you (either an individual or entity) and Texas Instruments Incorporated ("TI"), 12500 TI Boulevard, Dallas, Texas 75243. The "Licensed Materials" subject to this Agreement include, in whole or in part, the software programs that accompany this Agreement and any "on-line" or electronic documentation associated with these programs. By installing, copying or otherwise using the Licensed Materials you agree to abide by the terms of this Agreement. If you choose not to accept or agree with these terms, do not download or install the Licensed Materials.

NOTE: The Licensed Materials may be bundled with open source software. By accepting this Agreement, you may gain access to software identified as being licensed under open source licenses, which software and corresponding open source licenses will be listed in the applicable software manifest (in whole or in part, the "Open Source Materials"). Your use of the Open Source Materials is subject to the separate licensing terms applicable to such Open Source Materials as specified in the applicable software manifest. For clarification, this Agreement does not limit your rights under, or grant you rights that supersede, the license terms of any applicable Open Source Materials license agreement. If any of the Open Source Materials have been provided to you in object code, the source code versions of such Open Source Materials may be provided to you by notifying TI at Texas Instruments Incorporated, 12500 TI Boulevard, Mail Station 8638, Dallas, Texas 75243, Attention: Contracts Manager. You may terminate this Agreement in the event you choose not to accept or agree with the terms in any applicable Open Source Materials license agreement, provided that such termination occurs within five (5) days of acceptance of this Agreement and you abide by all applicable license terms in this Agreement until such termination.

1. License.

a. Source Code License. For the Licensed Materials provided in source code format, TI hereby grants to you a limited, non-exclusive license to reproduce, use, and create modified or derivative works of the Licensed Materials provided to you in source code format and to distribute an unlimited number of copies of such source code Licensed Materials, or any derivatives thereof, in any format.

b. Object Code License. For the Licensed Materials provided in object code format, TI hereby grants to you a limited, non-exclusive license to reproduce and use the Licensed Materials provided to you in object code format and to distribute an unlimited number of object or executable copies of such object code Licensed Materials.

2. Termination. This license is effective until terminated. Without prejudice to any other rights, TI may terminate your right to use the Licensed Materials under this Agreement if you fail to comply with the terms of this Agreement. In such event, you shall destroy all copies of the Licensed Materials, including all portions and derivatives thereof.

3. Intellectual Property Rights.

a. The Licensed Materials being provided to you hereunder are being made publicly available by TI, even though they contain copyrighted material of TI and its licensors, if applicable. In no event may you alter, remove or destroy any copyright notice included in the Licensed Materials. To the extent that any of the Licensed Materials are provided in binary or object code only, you may not unlock, decompile, reverse engineer, disassemble or otherwise translate such binary or object code to human-perceivable form. The source code of such reverse engineered code may contain TI trade secret and other proprietary information. TI reserves all rights not specifically granted under this Agreement.

b. Certain Licensed Materials may (i) require patent licenses from third parties claiming patent rights covering implementation of the Licensed Materials or (ii) be based on industry recognized standards or software programs published by industry recognized standards bodies and certain third parties may claim to own patents or copyrights that cover implementation of those standards. You acknowledge and agree that this Agreement does not convey a license to any such third party patents and copyrights.

c. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR INCORPORATE THE LICENSED MATERIALS.

d. You acknowledge and agree that you are responsible for any fees or royalties that may be payable to any third party based on such third party's interests in the Licensed Materials described in Section 3(b) above (the "Third Party Payment Obligations"). You agree to indemnify TI against any Third Party Payment Obligations and will defend any claim, suit or proceeding brought against TI insofar as such claim, suit or proceeding is based on your failure to pay any Third Party Payment Obligations.

4. Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED "AS IS". TI AND ITS LICENSORS MAKE NO WARRANTY OR REPRESENTATION, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET POSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE LICENSED MATERIALS OR USE OF THOSE MATERIALS.

YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS MAY NOT BE INTENDED FOR PRODUCTION APPLICATIONS AND MAY CONTAIN IRREGULARITIES AND DEFECTS NOT FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR FAILURES.

IN NO EVENT SHALL TI OR ITS LICENSORS BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED ON ANY THEORY OF LIABILITY, ARISING IN ANY WAY OUT OF THIS AGREEMENT, OR YOUR USE OF THE LICENSED MATERIALS, WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OR CORRUPTION OF DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR INTERRUPTION OF BUSINESS OR ANY OTHER ECONOMIC LOSS. IN NO EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS (US$500).

Because some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages or limitation on how long an implied warranty lasts, the above limitations or exclusions may not apply to you.

5. Export Control. The software programs and any "on-line" documentation as well as any updates or upgrades to such software programs or documentation may be subject to the export or import regulations of certain countries. You agree to comply with all such regulations and acknowledge that you have the responsibility to obtain any licenses or other authorizations that may be required to export, re-export or import the Licensed Materials.

6. Governing Law, Jurisdiction and Severability. This Agreement will be governed by and interpreted in accordance with the laws of the State of Texas, without reference to that state's conflict of laws principles. This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods, nor shall it be governed by the Uniform Computer Information Transactions Act (UCITA). Any dispute arising out of or related to this Agreement will be brought in, and each party consents to the exclusive jurisdiction and venue in the state and federal courts sitting in Dallas Country, Texas. Each party waives all defenses of lack of personal jurisdiction and forum non-conveniens and agrees that process may be served on either party in a manner authorized by applicable law or court rule. If for any reason a court of competent jurisdiction finds any provision of the Agreement to be unenforceable, that provision will be enforced to the maximum extent possible to effectuate the intent of the parties and the remainder of the Agreement shall continue in full force and effect.

7. PRC Provisions. If you are located in the People's Republic of China ("PRC") or if the Licensed Materials will be sent to the PRC, the following provisions shall apply and shall supersede any other provisions in this Agreement concerning the same subject matter as the following provisions:

a. Registration Requirements. You shall be solely responsible for performing all acts and obtaining all approvals that may be required in connection with this Agreement by the government of the PRC, including but not limited to registering pursuant to, and otherwise complying with, the PRC Measures on the Administration of Software Products, Management Regulations on Technology Import-Export, and Technology Import and Export Contract Registration Management Rules. Upon receipt of such approvals from the government authorities, you shall forward evidence of all such approvals to TI for its records. In the event that you fail to obtain any such approval or registration, you shall be solely responsible for any and all losses, damages or costs resulting therefrom, and shall indemnify TI for all such losses, damages or costs.

b. Governing Language. This Agreement is written and executed in the English language. If a translation of this Agreement is required for any purpose, including but not limited to registration of the Agreement pursuant to any governmental laws, regulations or rules, you shall be solely responsible for creating such translation. Any translation of this Agreement into a language other than English is intended solely in order to comply with such laws or for reference purposes, and the English language version shall be authoritative and controlling.

8. Entire Agreement. This is the entire Agreement between you and TI and supersedes any prior agreement between the parties related to the subject matter of this Agreement. No amendment or modification of this Agreement will be effective unless in writing and signed by a duly authorized representative of TI. You hereby warrant and represent that you have obtained all authorizations and other applicable consents required empowering you to enter into this Agreement.

www.ti.com


TDU 2.4.0.4 Release Notes

February 18, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The TDU component serves to detect tones for numerous use cases and call flows in a voice channel.

back to top

Documentation

The following documentation is available:

  • TDU Software Manifest
  • TDU API Reference's Guide
  • TDU Source Reference's Guide (Source Release Only)

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C64x+ ELF targets
  • Added matlab routine to simplify profiling calculations
  • Fixed Voice Discrimination crash (IR #82563 - VoLIB 2.0.0)
  • Changes for SWTOOLS version 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)
  • Fixed unit test hang issue (IR #89563, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.tdu version is compatible with the last released ti.mas.tdu version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64+
  • C66

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Versions 4.2.X, 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6

back to top

Known Issues

  • TDU lacks V.25 call tone (CT) detection feature.

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


TGE 1.0.0.3 Release Notes

February 23, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The Tone Genmeration Engine Module (TGE) supports tone generation of up to four simultaneous frequencies, sinusoidal amplitude modulation and single frequency phase reversal.

back to top

Documentation

The following documentation is available:

  • TGE API Reference's Guide
  • TGE Source Reference's Guide (Source Release Only)
  • TGE Component Software Manifest

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Initial release
  • Changes for SWTOOLS version 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)
  • Resolved missing package files (IR #89730, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.tge version is compatible with the last released ti.mas.tge version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.tdu 2.4.0.2 (Tone Detection)
  • ti.mas.vpe 3.5.0.1 (PCM Companding)
  • CCS Versions 4.2.X, 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


VAU 1.3.0.3 Release Notes

February 23, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The Voice Activity Detector (VAU) determines the presence of speech for the purposes of bandwidth savings.

back to top

Documentation

The following documentation is available:

  • VAU API Reference's Guide
  • VAU Source Reference's Guide (Source Release Only)
  • VAU Component Software Manifest

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C64x+ ELF targets
  • Updated for SWTOOLS 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)
  • Fixed missing C64x+ BE/ELF CCS project (IR #89745, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.vau version is compatible with the last released ti.mas.vau version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66
  • ARM

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.4.1 (Common Fractional utilities)
  • ti.mas.iface.ifvau 1.1.2.1 (VAU Interface definitions)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Versions 4.2.X, 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6
  • ARM Montavista Pro version 5.0

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


VEU 4.4.0.3 Release Notes

February 23, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The Voice Enhancement Unit (VEU) provides software modules to enhance the listening experience under various conditions.

back to top

Documentation

The following documentation is available:

  • VEU API Reference's Guide
  • VEU Source Reference's Guide (Source Release Only)
  • VEU Component Software Manifest

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added C66x (ELF/COFF) targets
  • Added C55x targets
  • Changes for SWTOOLS version 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)
  • Fixed CCS unit test frame size error (IR #89743, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.veu version is compatible with the last released ti.mas.veu version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C674
  • C66

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Versions 4.2.X, 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.0
  • C6xx Code Generation Tools version 7.2.6
  • XDAIS version 5.21
  • ARM Montavista Pro version 5.0

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


VOLIB_C66 2.0.0.3 Release Notes

February 24, 2012

VoLIB Bundle Release Notes

Contents

  1. Introduction
  2. Getting Started
  3. Documentation
  4. What's New
  5. Upgrade and Compatibility Information
  6. Device Support
  7. Validation Information
  8. Known Issues
  9. Technical Support
  10. Component Release Notes

Introduction

The VoLIB bundle is a collection of voice processing components that adhere to a common API format. The components that comprise VoLIB are independent and may be integrated individually or as a group to quickly produce a quality voice solution.

Getting Started

The VoLIB User's Manual provides the documentation and links necessary to commence with VoLIB development and integration.

Documentation

The following documentation is available:

User's Manual [HTML]
[CHM]
Software Manifest [HTML]
Release Notes Archive [LINK]

What's New

The following new features were added:

  1. IR #80325: Added CCS V4/V5 projects to unit test for each component
  2. IR #86827: Added sample frequency conversion (SFC) module to VPE
  3. IR #86823: Added PCM encode/decode (PCM) module to VPE
  4. IR #86822: Added tone generation engine (TGE) component
  5. IR #76951: Added C66x target support (ELF/COFF)

The following bugs have been resolved:

  1. IR #82563: (TDU) Voice discrimination crashes
  2. IR #82614: (ECU) Integration documentation
  3. IR #89477: (ALL) CCS Project file I/O path issue
  4. IR #89516: (CID) Unit test missing ce66be linker command file
  5. IR #89550: (ECU) ECU automation build error
  6. IR #89563: (TDU) TDU unit test hangs in malloc()

Upgrade and Compatibility Information

This version of ti.mas.volib is compatible with the last released version:

YES | X
NO |

Note:
  1. Package compatibility keys are independent of component release versions. For more information visit: Package Versioning and Compatibility

Device Support

This release supports the following device families:

  • C66x DSP (COFF, Little-Endian Format)
  • C66x DSP (COFF, Big-Endian Format)
  • C66x DSP (ELF, Little-Endian Format)
  • C66x DSP (ELF, Big-Endian Format)

Validation Information

This release was built and validated using the following tools:

  • C66x Code Generation Tools version: 7.2.6
  • Code Composer Studio version: V5
  • GNU make version: 3.81
  • RTSC Packaging Standard version: 2.0
  • XDC Tools version: 3.20.05.76

Known Issues

  • None

See individual component release notes for more information (links below).

Technical Support

Questions regarding this library, or any of the components comtained within, should be directed to the Texas Instruments BIOS Forum. Please include the text "VOLIB" in the title of the post.

Component Release Notes

  1. CID Release Notes
  2. ECU Release Notes
  3. NMU Release Notes
  4. PLC Release Notes
  5. TDU Release Notes
  6. TGE Release Notes
  7. VAU Release Notes
  8. VPE Release Notes
  9. VEU Release Notes

Package Versioning and Compatibility

Compatibility Keys

Compatibility keys serve two primary purposes:

  1. Enable tooling to identify incompatibilities between components
  2. Convey a level of compatibility between different releases to set end user expectations.

Each compatibility key is composed of 4 comma-delimited numbers - represented here by the letters M, S, R and P [M,S,R,P]. The table below provides a descriptive reference for compatibility key intention.

Compatibility Key Reference
Key | Meaning | Description
1 (M=Major) | Break in compatibility | The package consumer is required to re-write the calling source code to use the package
2 (S=Source) | Source compatibility | The package consumer’s source code doesn't require change, but does require a recompile
3 (R=Radix) | Introduction of new features | Compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source
4 (P=Patch) | Bug fixes only | If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

Versioning

Each package version is composed of 4 period-delimited numbers - represented here by the letters M, m, p and b [M.m.p.b]. The table below provides a descriptive reference regarding package version numbering.

Package Version Reference
Digit | Meaning | Description
1 (M=Major) | 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.
2 (m=minor) | 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.
3 (p=patch) | Patch number | Incremented for all other source code changes. This include any packaging support code.
4 (b=build) | Build number | Incremented for each release delivery to CM. Reset for any change to M, m or p


VPE 3.5.0.2 Release Notes

February 15, 2012

Introduction
Documentation
What's New
Upgrade and Compatibility Information
Host Support
Device Support
Validation Information
Known Issues
Version Information
Technical Support

Introduction

The Voice Processing Elements (VPE) component is a collection of voice processing modules that each perform specific functionality for a voice channel.

back to top

Documentation

The following documentation is available:

  • VPE API Reference's Guide
  • VPE Source Reference's Guide (Source Release Only)
  • VPE Component Software Manifest

Release notes from previous releases are also available in the Release Notes Archive directory.

back to top

What's New

The following new features were added:

  • Added c66x support
  • Added Sample Frequency Conversion module (SFC)
  • Added PCM encode/decode module (PCM)
  • Changes for SWTOOLS version 5.0.1
  • Fixed CCS project file I/O path issue (IR #89477, VoLIB 2.0.0)

back to top

Upgrade and Compatibility Information

This ti.mas.vpe version is compatible with the last released ti.mas.vpe version.

Please note that the package compatibility keys are independent of XDC product release numbers.

Package compatibility keys are intended to:

  1. Enable tooling to identify incompatibilities between components, and
  2. Convey a level of compatibility between different releases to set end user expectations.

Package compatibility keys are composed of 4 comma-delimited numbers - M, S, R, P - where:

  • M = Major - A difference in M indicates a break in compatibility. The package consumer is required to re-write its source code in order to use the package.
  • S = Source - A difference in S indicates source compatibility. The package consumer’s source code doesn't require change, but does require a recompile.
  • R = Radix - A difference in R indicates an introduction of new features, but compatibility with previous interfaces is not broken. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.
  • P = Patch - A difference in P indicates that only bugs have been fixed in the latest package and no new features have been introduced. If libraries are provided by the package, an application must re-link with the new libraries, but is not required to recompile its source.

back to top

Host Support

The current XDC toolset can be used to build components on the following hosts:

  • Windows XP

back to top

Device Support

This release supports the following device families:

  • C55
  • C64
  • C64P
  • C66
  • C674

back to top

Validation Information

This release was built and validated using the following components and tools:

Component Dependencies

  • ti.mas.types 5.5.4.1 (Common data type definitions)
  • ti.mas.swtools 5.0.1.2 (Internally used s/w tools)
  • ti.mas.util 4.7.5.1 (Common utilities)
  • ti.mas.fract 2.4.5.1 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.7.0 (Signal Generators)
  • CCS Version 4.2.0 & 5.X

Tool Dependencies for Source Release

  • XDC Tools version 3.20.05.76
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.0
  • C6x Code Generation Tools version 7.2.6

back to top

Known Issues

  • None

back to top

Versioning

This product's version follows a version format, M.m.p.b, where:

  • M is a single digit Major number
  • m is a single digit minor number
  • p is a single digit patch number
  • b is an unrestricted set of digits used as an incrementing build counter.

Please note that version numbers and compatibility keys are NOT the same. For an explanation of compatibility keys, please refer to the 'Upgrade and Compatibility Information' section.

back to top

Technical Support

Contact local TI Field Application Engineer for technical support.

back to top


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 (2)
#define | ti_mas_cid_Version_XVERTICAL (0)
#define | ti_mas_cid_Version_PATCH (0)
#define | ti_mas_cid_Version_BUILD (2)
#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 (2)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_cid_Version_BUILD (2)

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 (2)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_cid_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_cid_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_cid_Version_BUILD (2)
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 © 2011 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.2.0.2

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.

CID 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.

CID Detection

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.

  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
ti.mas.cid | ti_mas_cid_<fmt>_c<starg>_<ver>.zip
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<starg>_<ver>.zip
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<starg>_<ver>.zip
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<starg>_<ver>.zip
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<starg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


CID: CID Integration

CID (Caller ID) Package

CID Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the CID root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the CID makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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.

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

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

Structures Requiring Initialization

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
    • C66x 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

C66x Program Memory

C66x CID Program Memory Requirements
Section | Size | Placement | Description
.text | 12.0 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
  • C66x Target

Assumptions

The MIPS numbers are per execution of the unit test images using the memory mapping indicated in each respective .map file. The following assumptions also apply:

  1. All tests are performed with 5ms frames.
  2. MCPS calculated across all six standard CID types
  3. MCPS calculated only during generation and/or detection

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 an SD 5510 EVM. The I-cache is flushed twice every processing frame; once before CID generation and once before CID detection. See the .map file for details on code and data placement. MIPS information per frame can be found in the file profile.txt (in the target specific directory) and is generated each time the image executes.

C55x CID MCPS
Processing | Average | Peak
Send Path (Detection) | 1.23 | 1.36
Receive Path (Generation) | 1.12 | 1.24

C64x Target

Profiling was performed using an SD 6416 EVM. The I-cache is flushed twice every processing frame; once before CID generation and once before CID detection. See the .map file for details on code and data placement. MIPS information per frame can be found in the file profile.txt (in the target specific directory) and is generated each time the image executes.

C64x CID MCPS
Processing | Average | Peak
Send Path (Detection) | 0.89 | 1.02
Receive Path (Generation) | 1.31 | 1.43

C64x+ Target

Profiling was performed using a TI 6472 EVM. The I-cache is flushed twice every processing frame; once before CID generation and once before CID detection. See the .map file for details on code and data placement. MIPS information per frame can be found in the file profile.txt (in the target specific directory) and is generated each time the image executes.

C64x+ CID MCPS
Processing | Average | Peak
Send Path (Detection) | 0.88 | 1.01
Receive Path (Generation) | 1.29 | 1.39

C66x Target

Profiling was performed using a TI 6678 EVM. The I-cache is flushed twice every processing frame; once before CID generation and once before CID detection. See the .map file for details on code and data placement. MIPS information per frame can be found in the file profile.txt (in the target specific directory) and is generated each time the image executes.

C66x CID MCPS
Processing | Average | Peak
Send Path (Detection) | 0.85 | 0.96
Receive Path (Generation) | 1.26 | 1.34


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:
cidProfile_t |
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 <ti/mas/sdk/profile.h>
#include <ti/mas/sdk/memArchCfg.h>

Include dependency graph for cidsim.c:

Go to the source code of this file.

Data Structures

struct | siuInst_t
struct | cidProfile_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 | cidsim_PROFILE_FNAME "profile.txt"
#define | cidsim_PROFILE_SND_IDX 0
#define | cidsim_PROFILE_RCV_IDX 1
#define | loop for(;;)
#define | NTT_MSG_LENGTH 90
#define | BELLCORE_MSG_LENGTH 26

Functions

void | tstgmpInit ()
static void | cidsim_profile_enable (void)
static void | cidsim_profile_disable (void)
static void | cidsim_profile_start (tint code)
static void | cidsim_profile_stop (tint code)
static void | cidsim_ignore_start (void)
static void | cidsim_ignore_stop (void)
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 | cidsim_profile_init (void)
void | cidsim_profile_close (void)
void | cidsim_profile_print (char *msg)
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
cidProfile_t cidProfile
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 194 of file cidsim.c.

tuint rng_state

Definition at line 195 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 #include <ti/mas/sdk/profile.h>
00028 #include <ti/mas/sdk/memArchCfg.h>
00029
00030 /* Current frame length */
00031 #define SIU_FRAME_LENGTH 40
00032
00033 #define SIU_NUMBER_OF_CHANNELS 2
00034
00035 #define SIU_MAX_FRAME_LENGTH 44 /* 5.5 ms */
00036 /* Bellcore - 39, ETSI - 106, NTT - 39. Bounds imposed by SIU message buffer
00037  * limitation. */
00038 #define SIU_MAX_BYTES       39
00039
00040 #define NUMBER_OF_FRAMES    1   /* # of frames to save */
00041 #define MAX_STREAM_SIZE    (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
00042 #define MSG_BUF_LEN         50  /* message buffer length */
00043
00044 /* PCM streams */
00045 linSample siuRxInStream[MAX_STREAM_SIZE];
00046 linSample siuPcmOutStream[MAX_STREAM_SIZE];
00047 linSample siuPcmInStream[MAX_STREAM_SIZE];
00049 /* For SGN FSK */
00050 tint v21_flags = 0x7e7e;
00051
00052 extern void tstgmpInit();
00053
00054 extern const tint tblUlaw[];
00055 extern const tint tblAlaw[];
00056
00057 /* Global SIU instance structure */
00058 typedef struct {
00059   ecomemBuffer_t *cidBufs;  /* Pointer to base of CID buffer space */
00060
00061   /* CID elements */
00062   tuint ID;                 /* ID of current SIU instance */
00063   void  *cidInst;           /* CID instance pointer */
00064   tint  cidNbufs;           /* Number of allocated CID buffers */
00065   tint  cid_heap_size;      /* Heap allocation for CID */
00066
00067   /* Other elements */
00068   tint aux_heap_size;       /* Auxiliary heap allocation */
00069 } siuInst_t;
00070
00071
00072 /* Global variables */
00073 siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS];
00074 linSample *frame_in;
00075
00076
00077 #define SIU_DBGMSG_SIZE 256
00078 char siu_dbg_message [SIU_DBGMSG_SIZE];
00079 tuint siu_dbg_id;
00080 tint rptBuff;
00081 tuint multi_msg_idx = 0;
00082 tuint multi_msg_len = 0;
00083 tint *multi_msg;
00084
00085 /* Signal Generator Instances */
00086 void *sgnRxInst = (void *) NULL;
00087 tint flog = 0;
00088
00089 /***********************************************************************
00090  * Profiling defines and structures
00091  ***********************************************************************/
00092 #define cidsim_PROFILE_FNAME    "profile.txt"
00093 #define cidsim_PROFILE_SND_IDX  0
00094 #define cidsim_PROFILE_RCV_IDX  1
00095
00096 typedef struct {
00097   FILE  *fptr;
00098   tbool use_cache;
00099   tbool enabled;
00100   tlong profile_ovrhd;
00101   tlong profile_start;
00102   tlong profile_cycles[2];
00103   tlong ignore_ovrhd;
00104   tlong ignore_start;
00105   tlong ignore_cycles;
00106 } cidProfile_t;
00107
00108 cidProfile_t cidProfile = {
00109   (FILE *) NULL,
00110   TRUE,
00111   FALSE,
00112   0L,
00113   0L,
00114   {0L,0L},
00115   0L,
00116   0L,
00117   0L,
00118 };
00119
00120
00121 /* ============ cidsim_profile_enable () ========== */
00122 static inline void cidsim_profile_enable (void)
00123 {
00124   cidProfile.enabled = TRUE;
00125 }
00126
00127 /* ============ cidsim_profile_disable () ========== */
00128 static inline void cidsim_profile_disable (void)
00129 {
00130   cidProfile.enabled = FALSE;
00131 }
00132
00133 /* ============ cidsim_profile_start () ========== */
00134 static inline void cidsim_profile_start (tint code)
00135 {
00136   /* Flush the cache */
00137   if (cidProfile.use_cache) {
00138     memarchcfg_cacheFlush ();
00139   }
00140
00141   /* Clear the selected and ignored cycle counts */
00142   cidProfile.profile_cycles[code] = 0L;
00143   cidProfile.ignore_cycles        = 0L;
00144
00145   /* Get cycle count*/
00146   cidProfile.profile_start = profile_getCPUcycleCount ();
00147 }
00148
00149 /* ============ cidsim_profile_stop() ========== */
00150 static inline void cidsim_profile_stop (tint code)
00151 {
00152   /* Get end cycles */
00153   tlong count = profile_getCPUcycleCount();
00154
00155   /* Calculate total cycles (correct for timer wrap) */
00156   count -= cidProfile.profile_start;
00157   if (count < 0) {
00158     count += sdk_PROFILE_MAXCNT;
00159   }
00160
00161   /* Store adjusted total cycles */
00162   cidProfile.profile_cycles[code] = (count - cidProfile.profile_ovrhd - cidProfile.ignore_cycles);
00163 }
00164
00165 /* ============ cidsim_ignore_start () ========== */
00166 static inline void cidsim_ignore_start (void)
00167 {
00168   /* Set ignored cycle start */
00169   cidProfile.ignore_start = profile_getCPUcycleCount ();
00170 }
00171
00172 /* ============ cidsim_ignore_stop () ========== */
00173 static inline void cidsim_ignore_stop (void)
00174 {
00175   /* Get end cycles */
00176   tlong count = profile_getCPUcycleCount();
00177
00178   /* Calculate total cycles (correct for timer wrap) */
00179   count -= cidProfile.ignore_start;
00180   if (count < 0) {
00181     count += sdk_PROFILE_MAXCNT;
00182   }
00183
00184   /* Accumulate ignored cycles */
00185   cidProfile.ignore_cycles += (count - cidProfile.ignore_ovrhd);
00186 }
00187
00188 /***********************************************************************/
00189 /***********************************************************************/
00190
00191
00192 /* Channel Simulator Instance */
00193 struct {
00194   tint    nscale;
00195   tuint   rng_state;
00196 } csmInst;
00197
00198 /* Useful macros */
00199 #define loop    for(;;)     /* endless loop */
00200
00201 cidBindConfig_t cidBindConfig = {
00202   cidModulator,
00203   cidModCtrl,
00204   cidDetect,
00205   cidDemodCtrl,
00206   {
00207
00208     {
00209       cid_STD_US,
00210       cidGnrtFsmUsEtsi,
00211       cidDtctFsmUsEtsi,
00212     },
00213     {
00214       cid_STD_AUS,
00215       cidGnrtFsmUsEtsi,
00216       cidDtctFsmUsEtsi,
00217     },
00218     {
00219       cid_STD_BT,
00220       cidGnrtFsmUsEtsi,
00221       cidDtctFsmUsEtsi,
00222     },
00223     {
00224       cid_STD_NTT,
00225       cidGnrtFsmNtt,
00226       cidDtctFsmNtt,
00227     },
00228     {
00229       cid_STD_ETSI,
00230       cidGnrtFsmUsEtsi,
00231       cidDtctFsmUsEtsi,
00232     },
00233     {
00234       cid_STD_YDN,
00235       cidGnrtFsmUsEtsi,
00236       cidDtctFsmUsEtsi,
00237     },
00238
00239   }
00240 };
00241
00242 #define NTT_MSG_LENGTH 90
00243 tint ntt_message[] =
00244 {
00245   0x020a, 0x1011, 0x1213, 0x1415, 0x1617, 0x1819, 0x2021, 0x2223, 0x2425,
00246   0x2627, 0x2829, 0x3031, 0x3233, 0x3435, 0x3637, 0x3839, 0x4041, 0x4243,
00247   0x4445, 0x4647, 0x4849, 0x5051, 0x5253, 0x5455, 0x5657, 0x5859, 0x6061,
00248   0x6263, 0x6465, 0x6667, 0x6869, 0x7071, 0x7273, 0x7475, 0x7677, 0x7879,
00249   0x1a1b, 0x1c1d, 0x1e1f, 0x2a2b, 0x2c2d, 0x2e2f, 0x3a3b, 0x3c3d, 0x3e3f
00250 };
00251
00252 #define BELLCORE_MSG_LENGTH 26
00253 tint bellcore_message[] =
00254 {
00255   0x0216, 0x3033, 0x3531, 0x2d33, 0x3231, 0x3030, 0x3334,
00256           0x3536, 0x3738, 0x3930, 0x3132, 0x3334, 0x3938
00257 };
00258
00262 typedef struct {
00263   tbool      state;
00264   linSample dcoffset;
00265   tint      wftype;
00266   tint      f1;
00267   tint      f2;
00268   linSample amp1;
00269   linSample amp2;
00270   tint      nlevel;
00271   tuint     nseed;
00272   tint      ntype;
00273   tint      pow_level;
00274   tuint     hoth_seed;
00275 } siuSGNPars_t;
00276
00277 /* Channel Simulator Parameters */
00278 typedef struct {
00279   tbool     chnl_sim_on;
00280   tint      nlevel;
00281   tuint     nseed;
00282 } siuCHSMPars_t;
00283
00284 typedef struct {
00285   tint          pcm_bits;
00286   tint          frame_size;
00287   tint          tog_cid1;
00288   cidCtlMsg_t   cid_ctlMsg1;
00289   tint          tog_cid2;
00290   cidCtlMsg_t   cid_ctlMsg2;
00291   tbool          tog_chnl_sim;
00292   siuCHSMPars_t chSim;
00293   tbool          tog_rx_SGN;
00294   siuSGNPars_t  rxSGN;
00295 } siuSetup_t;
00296
00297 siuSetup_t siuSetup = {
00298   8,
00299   40,
00300   FALSE,
00302   /* cidCtlMsg_t cid_ctlMsg1 for channel 1 */
00303   {
00304     -1,
00305     FALSE,
00307     /* union for gnrt structure */
00308     {
00309       0x0000,
00310       0x080,
00311       BELLCORE_MSG_LENGTH,
00312       (tuint *)bellcore_message
00313     },
00314
00315   },
00316
00317   FALSE,
00319   /* cidCtlMsg_t cid_ctlMsg2 for channel 2 */
00320   {
00321     -1,
00322     FALSE,
00324     /* union for dtct structure */
00325     {
00326       9999,
00327       0
00328     },
00329
00330   },
00331
00332
00333   FALSE,
00335   /* siuCHSMPars_t chSim: Channel Simulator Parameters */
00336   {
00337     FALSE,
00338     -40,
00339     1531
00340   },
00341
00342
00343   FALSE,
00345   /* siuSGNPars_t rxSGN: Rx Signal Generator Parameters */
00346   {
00347     TRUE,
00348     0,
00349     sgn_WFT_SAWTOOTH,
00350     1000, 0,
00351     0, 0,
00352     0,
00353     1531,
00354     sgn_NT_GAUSS,
00355     -70,
00356     18401
00357   },
00358 };
00359
00362 static inline void siuDebugInternal (tuint id, char *str)
00363 {
00364   tint i;
00365   char *src;
00366   char *dst;
00367
00368   printf("ID=%d %s\n", id, str);
00369
00370   /* Copy id and message in a safe place */
00371   siu_dbg_id = id;
00372   src = str;
00373   dst = (char*) &siu_dbg_message[0];
00374   for (i=0; i<SIU_DBGMSG_SIZE; i++) {
00375     *dst++ = *src++;
00376   }
00377 } /* siuDebugInternal */
00378
00379 void siuException (tuint id, char *s)
00380 {
00381   volatile tint exit_code = 0;
00382   siuDebugInternal (id, s);
00383
00384   loop {
00385     if(exit_code)
00386       break;
00387   };     /* loop forever */
00388 } /* siuException */
00389
00390 volatile tbool glob_flg;
00391 tuint glob_msgLength;
00392 tuint glob_moduleID, glob_msgType, glob_messageCode;
00393 tuint glob_msgData[4];
00394
00395 void siuDebugInfo (void * moduleID, tuint msgType, tuint messageCode,
00396                    tuint msgLength, tuint *messageData) {
00397   tint i;
00398
00399   /* Begin cycles to be ignored for profiling purposes */
00400   cidsim_ignore_start();
00401
00402   glob_flg         = TRUE;
00403   glob_moduleID    = *((tuint *) moduleID);
00404   glob_msgType     = msgType;
00405   glob_messageCode = messageCode;
00406   glob_msgLength   = msgLength;
00407   for (i = 0; i < msgLength; i ++)
00408     glob_msgData[i++] = messageData[i];
00409
00410   /* get stuck here, as long as glob_flg is TRUE */
00411   while(glob_msgLength);
00412
00413   /* End cycles to be ignored for profiling purposes */
00414   cidsim_ignore_stop();
00415 } /* debug info */
00416
00417 /* Rx file inputs */
00418 sgnFileIo_t *siu_rx_file (sgnFileIo_t *dsc)
00419 {
00420 #ifndef _HWDKST
00421   asm (" nop");
00422   asm (" nop");
00423   asm (" nop");
00424   asm (" nop");
00425   asm (" nop");
00426   asm (" nop");
00427 #endif
00428   return (dsc);
00429 } /* siu_rx_file */
00430
00431 /* ============ generate_rx_frame () ========== */
00440 void generate_rx_frame (tint frame_size, linSample *frame)
00441 {
00442   int k;
00443
00444   if (siuSetup.rxSGN.state) {                         /* rx SGN is on */
00445     sgnGenerateFrame (sgnRxInst, frame_size, frame);  /* Generate a frame */
00446   }
00447   else {                                              /* SGN is off */
00448     for (k = 0; k < frame_size; k++)                  /* send a 0 frame */
00449       frame[k] = 0;
00450   }
00451 } /* generate_rx_frame */
00452
00453
00454 /* ============ cidsim_profile_init () ========== */
00455 void cidsim_profile_init (void)
00456 {
00457   /* Always open in the "disabled mode" */
00458   cidsim_profile_disable ();
00459
00460   /* Initialize SDK profiling and cache */
00461   profile_initCycleProfiling ();
00462   if (cidProfile.use_cache) {
00463     memarchcfg_cacheEnable ();
00464   }
00465
00466   /* Get estimate of profile cycle call overhead */
00467   cidProfile.profile_ovrhd = 0L;
00468   cidsim_profile_start (0);
00469   cidsim_profile_stop (0);
00470   cidProfile.profile_ovrhd = cidProfile.profile_cycles[0];
00471
00472   /* Get estimate of ignored cycle call overhead */
00473   cidProfile.ignore_ovrhd = 0L;
00474   cidsim_ignore_start ();
00475   cidsim_ignore_stop ();
00476   cidProfile.ignore_ovrhd = cidProfile.ignore_cycles;
00477
00478   /* Open profiling data file */
00479   cidProfile.fptr = fopen (cidsim_PROFILE_FNAME,"w");
00480   if (cidProfile.fptr == (FILE *) NULL) {
00481     fprintf (stderr, "Unable to open profiling file");
00482     exit (-1);
00483   }
00484 } /* cidsim_profile_init */
00485
00486 /* ============ cidsim_profile_close () ========== */
00487 void cidsim_profile_close (void)
00488 {
00489   /* Ensure porilfing is disabled */
00490   cidsim_profile_disable ();
00491
00492   /* Close SDK profiler */
00493   profile_closeCycleProfiling ();
00494
00495   /* Close profiling data file */
00496   fclose (cidProfile.fptr);
00497 } /* cidsim_profile_close */
00498
00499 /* ============ cidsim_profile_print () ========== */
00500 void cidsim_profile_print (char *msg)
00501 {
00502   /* Only report if profiling is enabled */
00503   if (cidProfile.enabled) {
00504     /* Write message if non-NULL */
00505     if (msg) {
00506       fprintf (cidProfile.fptr, msg);
00507     }
00508     else {
00509       float mips;
00510       /* Dump rx MIPS to the file */
00511       mips = (float) cidProfile.profile_cycles[cidsim_PROFILE_RCV_IDX] * 8000 /
00512                      siuSetup.frame_size / 1e6;
00513       fprintf (cidProfile.fptr, "  %6.2f", mips);
00514       /* Dump tx MIPS to the file */
00515       mips = (float) cidProfile.profile_cycles[cidsim_PROFILE_SND_IDX] * 8000 /
00516                      siuSetup.frame_size / 1e6;
00517       fprintf (cidProfile.fptr, "  %6.2f\n", mips);
00518     }
00519     /* Flush the output */
00520     fflush (cidProfile.fptr);
00521   }
00522 } /* cidsim_profile_print */
00523
00524
00525 /* ============ siuChSim () ========== */
00532 void siuChSim (void *sample_in)
00533 {
00534   int i;
00535   linSample *sample = (linSample *) sample_in;
00536
00537   /* Save output from CID generator into buffer */
00538   for (i = 0; i < siuSetup.frame_size; i++) {
00539     siuPcmOutStream[i] = sample[i];
00540   }
00541
00542   /* Channel Simulator */
00543   if (siuSetup.chSim.chnl_sim_on) {
00544     /* add noise */
00545     for (i=0; i<siuSetup.frame_size; i++) {
00546       sample[i] += wngGenNoiseSample (csmInst.nscale, &csmInst.rng_state);
00547     }
00548   }
00549 } /* siuChSim */
00550
00551
00552 /* ============ siuCidRptIn () ========== */
00575 void siuCidRptIn (tuint ID, tint rcode, tint final_state,
00576                   tint dropout_ct, tint bad_mtype_ct, tint type, tint len,
00577                   tuint *msg, tint len_in_word)
00578 {
00579   tint  i;
00580
00581   /* Begin cycles to be ignored for profiling purposes */
00582   cidsim_ignore_start ();
00583
00584   printf ("siuCidRptIn(): ID=%d rcode=%d length=%d word length=%d\n", ID, rcode,
00585           len, len_in_word);
00586
00587   if (rcode == cid_RPT_MULTI_RQST) {
00588     multi_msg_idx = len;
00589     multi_msg_len = len_in_word;
00590     siuSetup.tog_cid1 = 9; /* This will initiate a cid_CTL_MULTI_RQST message */
00591   }
00592   else if (rcode == cid_RPT_GNRT_DEACT) {
00593     if (ID == 1) {
00594       siuSetup.tog_cid1 = 10;
00595     }
00596     else {
00597       siuSetup.tog_cid2 = 10;
00598     }
00599   }
00600   else {
00601     for (i=0; i<len_in_word; i++) {
00602       printf("msg[%d]=0x%x\n", i, msg[i]);
00603     }
00604   }
00605
00606   /* If this is end of CID generation, disable profiling */
00607   if (rcode == cid_RPT_END_GNRT) {
00608     cidsim_profile_disable ();
00609   }
00610
00611   /* End cycles to be ignored for profiling purposes */
00612   cidsim_ignore_stop ();
00613 } /* siuCidRptIn */
00614
00615
00616 /* ============ siu_new_cid () ========== */
00623 void siu_new_cid (tint chnum)
00624 {
00625   int i;
00626   tint stat, cidNbufs;
00627   siuInst_t            *inst = &siuInst[chnum - 1];
00628   const ecomemBuffer_t *bufs;
00629   ecomemBuffer_t       *cidBufs;
00630   cidNewConfig_t        cidCfgNew;
00631
00632   /* CID get sizes */
00633   stat = cidGetSizes (&cidNbufs, &bufs);
00634
00635   if (stat != cid_NOERR) {
00636     siuException (chnum, "Error in GetSizes");
00637   }
00638
00639   cidBufs = (ecomemBuffer_t*)malloc (cidNbufs*sizeof(ecomemBuffer_t));
00640   inst->aux_heap_size += cidNbufs * sizeof(ecomemBuffer_t);
00641
00642   if (cidBufs == NULL) {
00643     siuException (chnum, "No memory");
00644   }
00645
00646   /* assume all buffers are in external memory, no alignment requests */
00647   for (i = 0; i < cidNbufs; i++) {
00648     cidBufs[i] = bufs[i];
00649     cidBufs[i].volat  = FALSE;
00650     if(bufs[i].size) {
00651       cidBufs[i].base   = malloc (bufs[i].size);
00652       if (cidBufs[i].base == NULL) {
00653         siuException (chnum, "No memory");
00654       }
00655     }
00656     else {
00657       cidBufs[i].base   = NULL;
00658     }
00659   }
00660
00661   /* cidNew */
00662   cidCfgNew.ID        = chnum;
00663
00664   /* Need these as a handle to delete this channel's CID someday */
00665   inst->cidInst = NULL;
00666   inst->cidNbufs = cidNbufs;
00667   inst->cidBufs  = &cidBufs[0];
00668
00669   stat = cidNew (&inst->cidInst, cidNbufs, cidBufs, &cidCfgNew);
00670   if (stat != cid_NOERR) {
00671     siuException (chnum, "Errors in cidNew");
00672   }
00673 } /* siu_new_cid */
00674
00675
00676 /* ============ siu_open_cid () ========== */
00683 void siu_open_cid (tint chnum)
00684 {
00685   cidOpenConfig_t cidCfg;
00686   tint stat;
00687   siuInst_t      *inst = &siuInst[chnum - 1];
00688
00689   cidCfg.samples_per_frame = SIU_FRAME_LENGTH;
00690
00691   stat = cidOpen (inst->cidInst, &cidCfg);
00692
00693   if (stat != cid_NOERR) {
00694     siuException (chnum, "Error in cidOpen");
00695   }
00696 } /* siu_open_cid */
00697
00698 /******************************************************************************
00699  * FUNCTION PURPOSE: Close CID module
00700  ******************************************************************************
00701  * DESCRIPTION: Closes one instance of a CID module
00702  *
00703  * CALLING FORMAT:
00704  *   siu_close_cid   (tint chnum)      - channel number
00705  *
00706  * RETURN VALUES:
00707  *   None
00708  *
00709  *****************************************************************************/
00710
00711 void siu_close_cid (tint chnum)
00712 {
00713   siuInst_t *inst = &siuInst[chnum - 1];
00714   cidClose (inst->cidInst);
00715 } /* siu_close_cid */
00716
00717
00718 /******************************************************************************
00719  * FUNCTION PURPOSE: Delete CID module
00720  ******************************************************************************
00721  * DESCRIPTION: Deletes one instance of a CID module
00722  *
00723  * CALLING FORMAT:
00724  *   siu_delete_cid  (tint chnum)      - channel number
00725  *
00726  * RETURN VALUES:
00727  *   None
00728  *
00729  *****************************************************************************/
00730 void siu_delete_cid (tint chnum)
00731 {
00732   tint i;
00733   siuInst_t *inst = &siuInst[chnum - 1];
00734   cidDelete (&(inst->cidInst),inst->cidNbufs,inst->cidBufs);
00735
00736   /* Free memory allocated for CID buffers & adjust cid_heap_size */
00737   for (i = 0; i < inst->cidNbufs; i++) {
00738     free (inst->cidBufs[i].base);
00739     inst->cid_heap_size -= inst->cidBufs[i].size;
00740   }
00741
00742   /* Free memory for CID buffer descriptors & adjust aux_heap_size */
00743   free (inst->cidBufs);
00744   inst->cidBufs = NULL;
00745   inst->aux_heap_size -= inst->cidNbufs * sizeof(ecomemBuffer_t);
00746   inst->cidNbufs = 0;
00747
00748   /* Check for profiling disable */
00749 } /* siu_delete_cid */
00750
00751 /* ============ siu_open_csm () ========== */
00756 void siu_open_csm ()
00757 {
00758   /* initialize white noise generator */
00759   wngInit (siuSetup.chSim.nlevel, siuSetup.chSim.nseed, &csmInst.nscale,
00760            &csmInst.rng_state);
00761 } /* siu_open_csm */
00762
00763 /* ============ siu_open_csm () ========== */
00768 void siu_open_rxsgn (tint chnum)
00769 {
00770   sgnConfig_t cfg;
00771   tint sgnSize;
00772   tint retVal;
00773
00774   /* Init SGN */
00775   retVal = sgnGetSizes(&sgnSize);
00776   if (retVal != sgn_NOERR){
00777     siuException (chnum, "Error in sgnCreate");
00778   }
00779   sgnRxInst = malloc (sgnSize);
00780
00781   /* Configure SGN */
00782   cfg.dc_offset     = siuSetup.rxSGN.dcoffset;
00783   cfg.wf_type       = siuSetup.rxSGN.wftype;
00784   cfg.f1            = siuSetup.rxSGN.f1;
00785   cfg.f2            = siuSetup.rxSGN.f2;
00786   cfg.t_amp1        = siuSetup.rxSGN.amp1;
00787   cfg.t_amp2        = siuSetup.rxSGN.amp2;
00788   cfg.pr_period     = 1000;       /* # of samples between phase reversals */
00789   cfg.pr_enable     = FALSE;      /* disable phase reversal */
00790   cfg.noise_level   = siuSetup.rxSGN.nlevel;
00791   cfg.noise_seed    = siuSetup.rxSGN.nseed;
00792   cfg.noise_type    = siuSetup.rxSGN.ntype;
00793   cfg.fsk_duration  = 90;         /* 90/300 = 300ms */
00794   cfg.fsk_dataptr   = &v21_flags;
00795   cfg.fsk_numword   = 1;          /* 1 word for V21 flags */
00796   cfg.power_level   = siuSetup.rxSGN.pow_level;
00797   cfg.hoth_wng_seed = siuSetup.rxSGN.hoth_seed;
00798   cfg.file_io_fcn   = siu_rx_file;
00799   cfg.exception     = siuException;
00800   cfg.debug         = siuDebugInternal;
00801
00802   sgnInit (sgnRxInst, &cfg);
00803 } /* siu_open_rxsgn */
00804
00805 /* ============ siu_set_sgn () ========== */
00814 void siu_set_sgn (void *inst, siuSGNPars_t *sgn)
00815 {
00816   sgnControl_t  ctl;
00817
00818   if (sgn->state) {
00819     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00820       ctl.code          = sgn_CTL_CSS_POW;
00821       ctl.u.power_level = sgn->pow_level;
00822     }
00823     else if (sgn->wftype == sgn_WFT_HOTH) {
00824       ctl.code          = sgn_CTL_HOTH_POW;
00825       ctl.u.power_level = sgn->pow_level;
00826     }
00827     else {
00828       ctl.code      = sgn_CTL_TONE;
00829       ctl.u.t.f1    = sgn->f1;
00830       ctl.u.t.f2    = sgn->f2;
00831       ctl.u.t.amp1  = sgn->amp1;
00832       ctl.u.t.amp2  = sgn->amp2;
00833     }
00834     sgnControl (inst, &ctl);
00835
00836     ctl.code           = sgn_CTL_NOISE;
00837     ctl.u.noise_level  = sgn->nlevel;
00838   }
00839   else {
00840     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00841       ctl.code          = sgn_CTL_CSS_POW;
00842       ctl.u.power_level = -80;
00843     }
00844     else if (sgn->wftype == sgn_WFT_HOTH) {
00845       ctl.code          = sgn_CTL_HOTH_POW;
00846       ctl.u.power_level = -80;
00847     }
00848     else {
00849       ctl.code     = sgn_CTL_TONE;
00850       ctl.u.t.f1   = sgn->f1;
00851       ctl.u.t.f2   = sgn->f2;
00852       ctl.u.t.amp1 = 0;
00853       ctl.u.t.amp2 = 0;
00854     }
00855     sgnControl (inst, &ctl);
00856
00857     ctl.code           = sgn_CTL_NOISE;
00858     ctl.u.noise_level  = -80;
00859   }
00860   sgnControl (inst, &ctl);
00861 } /* siu_set_sgn */
00862
00863
00864 /******************************************************************************
00865  * FUNCTION PURPOSE: Main program.
00866  ******************************************************************************
00867  * DESCRIPTION: Main program. Starts the system.
00868  *
00869  *****************************************************************************/
00870 int main (int argc, char *argv[])
00871 {
00872   int i;
00873   tbool rxReplace, genWork;
00874   tint chnum, frame_size, error;
00875   cidCreateConfig_t create_cfg;
00876
00877   printf("START TEST\n");
00878
00879   /*-----------------------------*/
00880   /* Initialize DSP Architecture */
00881   /*-----------------------------*/
00882
00883   frame_size = siuSetup.frame_size;
00884   /* Allocate linear PCM sample buffer */
00885   frame_in = (linSample*) malloc (frame_size*sizeof(linSample));
00886   if (frame_in == NULL) {
00887    siuException (3, "Can not allocate memory for frame");
00888   }
00889
00890   /* Open Rx Signal Generator */
00891   chnum = 1;
00892   siu_open_rxsgn (chnum);
00893
00894   /* Enable profiling */
00895   cidsim_profile_init ();
00896
00897   /* Open channel simulator */
00898   siu_open_csm ();
00899
00900 #if cid_USE_GMP
00901   tstgmpInit (); /* GMP simulation initialization */
00902 #endif
00903
00904   /* Create channel independent context */
00905   create_cfg.debugInfo          = siuDebugInfo;
00906   create_cfg.reportOutFcn       = siuCidRptIn;
00907   create_cfg.maxSamplesPerFrame = SIU_MAX_FRAME_LENGTH;
00908   create_cfg.maxFragmentSize    = 20;
00909
00910   error = cidCreate (&create_cfg);
00911   if (error != cid_NOERR) {
00912     siuException (chnum, "Error in cidCreate");
00913   }
00914
00915   error = cidBind (NULL, &cidBindConfig);
00916   if (error != cid_NOERR) {
00917     siuException (chnum, "Error in cidBind");
00918   }
00919
00920   /* Configure, initialize and open all CID instances */
00921    for (chnum=1; chnum<=SIU_NUMBER_OF_CHANNELS; chnum ++) {
00922      siu_new_cid  (chnum);           /* Create CID module*/
00923      siu_open_cid (chnum);           /* Open   CID module*/
00924    }
00925
00926   /* Enter main loop */
00927   loop {
00928     if (siuSetup.tog_cid1 == -1) {
00929       cidsim_profile_close ();
00930       siuSetup.tog_cid1 = 0;
00931       siu_close_cid (1);
00932       siu_delete_cid (1);
00933       printf("Channel 1 closed and deleted\n");
00934     }
00935
00936     /* Toggle the CID for ch1 (generator) */
00937     if (siuSetup.tog_cid1 != 0) {
00938       cidsim_profile_enable ();
00939
00940       /* 1 - US, 2- NTT, 3 - ETSI, 4 - YDN, 5 - BT 6 - AUS*/
00941       siuSetup.cid_ctlMsg1.ctlCode = ((siuSetup.tog_cid1 - 1) << 1) + 1;
00942       if (siuSetup.tog_cid1 == 1) {
00943         cidsim_profile_print ("CID Standard: US\n");
00944         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_SDMF_MSGTYPE; /* SDMF, US */
00945         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00946         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*) bellcore_message;
00947         multi_msg = bellcore_message;
00948       }
00949       else if (siuSetup.tog_cid1 == 2) {
00950         cidsim_profile_print ("CID Standard: Japan\n");
00951         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_NTT_BYTE_SERVICE; /* NTT */
00952         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = NTT_MSG_LENGTH;
00953         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)ntt_message;
00954         multi_msg = ntt_message;
00955       }
00956       else if (siuSetup.tog_cid1 == 3) {
00957         cidsim_profile_print ("CID Standard: Europe\n");
00958         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_ETSI_SMS_MSGTYPE; /* SMS, ETSI only */
00959         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00960         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00961         multi_msg = bellcore_message;
00962       }
00963       else if (siuSetup.tog_cid1 == 4) {
00964         cidsim_profile_print ("CID Standard: China\n");
00965         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_MDMF_MSGTYPE; /* MDMF, YDN */
00966         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00967         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00968         multi_msg = bellcore_message;
00969       }
00970       else if (siuSetup.tog_cid1 == 5) {
00971         cidsim_profile_print ("CID Standard: UK\n");
00972         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_SDMF_MSGTYPE; /* SDMF, BT */
00973         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00974         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00975         multi_msg = bellcore_message;
00976       }
00977       else if (siuSetup.tog_cid1 == 6) {
00978         cidsim_profile_print ("CID Standard: Australia\n");
00979         siuSetup.cid_ctlMsg1.u.gnrt.msg_type = cid_US_MDMF_MSGTYPE; /* MDMF, AUS */
00980         siuSetup.cid_ctlMsg1.u.gnrt.msg_length = BELLCORE_MSG_LENGTH;
00981         siuSetup.cid_ctlMsg1.u.gnrt.msg = (tuint*)bellcore_message;
00982         multi_msg = bellcore_message;
00983       }
00984       else if (siuSetup.tog_cid1 == 9) {
00985         siuSetup.cid_ctlMsg1.ctlCode = cid_CTL_MULTI_RQST; /* Multi-part message */
00986         siuSetup.cid_ctlMsg1.u.mgnrt.fragment_offset = multi_msg_idx;
00987         siuSetup.cid_ctlMsg1.u.mgnrt.fragment_size   = multi_msg_len;
00988         siuSetup.cid_ctlMsg1.u.mgnrt.msg             = (tuint*)(&multi_msg[(multi_msg_idx >> 1)]);
00989       }
00990       else if (siuSetup.tog_cid1 == 10) {
00991         siuSetup.cid_ctlMsg1.ctlCode = cid_CTL_DEACTIVATE;
00992       }
00993
00994       siuSetup.tog_cid1 = 0;
00995       printf ("Send CID control message %d to channel 1\n", siuSetup.cid_ctlMsg1.ctlCode);
00996       cidControl (siuInst[0].cidInst, &siuSetup.cid_ctlMsg1);
00997     }
00998
00999     if (siuSetup.tog_cid2 == -1) {
01000       siuSetup.tog_cid2 = 0;
01001       siu_close_cid (2);
01002       siu_delete_cid (2);
01003       printf ("Channel 2 closed and deleted\n");
01004     }
01005     else if (siuSetup.tog_cid2 == 10) {
01006       siuSetup.tog_cid2 = 0;
01007       siuSetup.cid_ctlMsg2.ctlCode = cid_CTL_DEACTIVATE;
01008       cidControl (siuInst[1].cidInst, &siuSetup.cid_ctlMsg2);
01009     }
01010
01011     /* Toggle the CID for ch2 (detector) */
01012     if (siuSetup.tog_cid2 != 0) {
01013
01014       /* 1 - US, 2- NTT, 3 - ETSI, 4 - YDN, 5 - BT 6 - AUS. This code should be same as tog_cid1, to
01015        * provide compatible operation */
01016       siuSetup.cid_ctlMsg2.ctlCode = ((siuSetup.tog_cid2 - 1) << 1) + 2;
01017       siuSetup.tog_cid2 = 0;
01018       printf ("Send CID control message %d to channel 2\n", siuSetup.cid_ctlMsg2.ctlCode);
01019       cidControl (siuInst[1].cidInst, &siuSetup.cid_ctlMsg2);
01020     }
01021
01022     /* Toggle the channel simulator */
01023     if (siuSetup.tog_chnl_sim) {
01024       siuSetup.tog_chnl_sim = FALSE;
01025       siuSetup.chSim.chnl_sim_on = !siuSetup.chSim.chnl_sim_on;
01026     }
01027
01028     /* Toggle the RX signal generator */
01029     if (siuSetup.tog_rx_SGN) {
01030       siuSetup.tog_rx_SGN = FALSE;
01031       siuSetup.rxSGN.state = !siuSetup.rxSGN.state;
01032       siu_set_sgn (sgnRxInst, (siuSGNPars_t*)&siuSetup.rxSGN);
01033     }
01034
01035     /* RX Frames MUST be generated before cidReceiveIn() starts!!! */
01036     generate_rx_frame (frame_size, frame_in);
01037
01038     /* Save input to CID generator into buffer */
01039     for (i=0; i<frame_size; i++) {
01040       siuRxInStream[i] = frame_in[i];
01041     }
01042
01043     /* CID generator */
01044     rptBuff = 0;
01045     /* This flag is set to TRUE by function cidReceiveIn, if samples are created by CID generator */
01046     rxReplace = FALSE;
01047     /* If set to TRUE, only generator can work */
01048     genWork   = TRUE;
01049
01050     /* Input samples are replaced with CID generated sequence */
01051     cidsim_profile_start (cidsim_PROFILE_RCV_IDX);
01052     cidReceiveIn (siuInst[0].cidInst, frame_in, genWork, &rxReplace);
01053     cidsim_profile_stop (cidsim_PROFILE_RCV_IDX);
01054
01055     /* Save input to CID detector into buffer */
01056     for (i=0; i<frame_size; i++) {
01057       siuPcmInStream[i] = frame_in[i];
01058     }
01059
01060     siuChSim (frame_in);
01061
01062     /* CID detector */
01063     rptBuff = 1;
01064     cidsim_profile_start (cidsim_PROFILE_SND_IDX);
01065     cidSendIn (siuInst[1].cidInst, frame_in);
01066     cidsim_profile_stop (cidsim_PROFILE_SND_IDX);
01067     cidsim_profile_print (NULL);
01068   }
01069 } /* main */
01070
01071 /* @} */ /* ingroup */
01072
01073 /* 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
  • e
  • f
  • h
  • i
  • n
  • p
  • r
  • s
  • t
  • u
  • 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

- e -

  • enabled : cidProfile_t

- f -

  • f1 : siuSGNPars_t
  • f2 : siuSGNPars_t
  • fptr : cidProfile_t
  • frame_size : siuSetup_t

- h -

  • hoth_seed : siuSGNPars_t

- i -

  • ID : siuInst_t
  • ignore_cycles : cidProfile_t
  • ignore_ovrhd : cidProfile_t
  • ignore_start : cidProfile_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
  • profile_cycles : cidProfile_t
  • profile_ovrhd : cidProfile_t
  • profile_start : cidProfile_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

- u -

  • use_cache : cidProfile_t

- w -

  • wftype : siuSGNPars_t
  • write_ix : gmpData_t


CID Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • c
  • d
  • e
  • f
  • h
  • i
  • n
  • p
  • r
  • s
  • t
  • u
  • 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

- e -

  • enabled : cidProfile_t

- f -

  • f1 : siuSGNPars_t
  • f2 : siuSGNPars_t
  • fptr : cidProfile_t
  • frame_size : siuSetup_t

- h -

  • hoth_seed : siuSGNPars_t

- i -

  • ID : siuInst_t
  • ignore_cycles : cidProfile_t
  • ignore_ovrhd : cidProfile_t
  • ignore_start : cidProfile_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
  • profile_cycles : cidProfile_t
  • profile_ovrhd : cidProfile_t
  • profile_start : cidProfile_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

- u -

  • use_cache : cidProfile_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
  • cidProfile : cidsim.c
  • cidsim_ignore_start() : cidsim.c
  • cidsim_ignore_stop() : cidsim.c
  • cidsim_profile_close() : cidsim.c
  • cidsim_profile_disable() : cidsim.c
  • cidsim_profile_enable() : cidsim.c
  • cidsim_PROFILE_FNAME : cidsim.c
  • cidsim_profile_init() : cidsim.c
  • cidsim_profile_print() : cidsim.c
  • cidsim_PROFILE_RCV_IDX : cidsim.c
  • cidsim_PROFILE_SND_IDX : cidsim.c
  • cidsim_profile_start() : cidsim.c
  • cidsim_profile_stop() : 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
  • cidsim_PROFILE_FNAME : cidsim.c
  • cidsim_PROFILE_RCV_IDX : cidsim.c
  • cidsim_PROFILE_SND_IDX : 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
  • c
  • g
  • m
  • s
  • t

- c -

  • cidsim_ignore_start() : cidsim.c
  • cidsim_ignore_stop() : cidsim.c
  • cidsim_profile_close() : cidsim.c
  • cidsim_profile_disable() : cidsim.c
  • cidsim_profile_enable() : cidsim.c
  • cidsim_profile_init() : cidsim.c
  • cidsim_profile_print() : cidsim.c
  • cidsim_profile_start() : cidsim.c
  • cidsim_profile_stop() : cidsim.c

- g -

  • generate_rx_frame() : cidsim.c
  • gmpAllocGmc() : tstgmp.c
  • gmpCreate() : tstgmp.c
  • gmpDelete() : tstgmp.c
  • gmpFreeGmc() : tstgmp.c
  • gmpRead() : tstgmp.c
  • gmpWrite() : tstgmp.c

- m -

  • main() : ccs2pcm.c , wav2ccs.c , cidsim.c

- s -

  • 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

- t -

  • 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
  • cidProfile : 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 | cidProfile_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 | cidsim_PROFILE_FNAME "profile.txt"
#define | cidsim_PROFILE_SND_IDX 0
#define | cidsim_PROFILE_RCV_IDX 1
#define | loop for(;;)
#define | NTT_MSG_LENGTH 90
#define | BELLCORE_MSG_LENGTH 26

Functions

void | tstgmpInit ()
static void | cidsim_profile_enable (void)
static void | cidsim_profile_disable (void)
static void | cidsim_profile_start (tint code)
static void | cidsim_profile_stop (tint code)
static void | cidsim_ignore_start (void)
static void | cidsim_ignore_stop (void)
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 | cidsim_profile_init (void)
void | cidsim_profile_close (void)
void | cidsim_profile_print (char *msg)
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
cidProfile_t cidProfile
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 31 of file cidsim.c.

Referenced by siu_open_cid().

#define SIU_NUMBER_OF_CHANNELS 2

Definition at line 33 of file cidsim.c.

Referenced by main().

#define SIU_MAX_FRAME_LENGTH 44

Definition at line 35 of file cidsim.c.

Referenced by main().

#define SIU_MAX_BYTES 39

Definition at line 38 of file cidsim.c.

#define NUMBER_OF_FRAMES 1

Definition at line 40 of file cidsim.c.

#define MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)

Definition at line 41 of file cidsim.c.

#define MSG_BUF_LEN 50

Definition at line 42 of file cidsim.c.

#define SIU_DBGMSG_SIZE 256

Definition at line 77 of file cidsim.c.

Referenced by siuDebugInternal().

#define cidsim_PROFILE_FNAME "profile.txt"

Definition at line 92 of file cidsim.c.

Referenced by cidsim_profile_init().

#define cidsim_PROFILE_SND_IDX 0

Definition at line 93 of file cidsim.c.

Referenced by cidsim_profile_print(), and main().

#define cidsim_PROFILE_RCV_IDX 1

Definition at line 94 of file cidsim.c.

Referenced by cidsim_profile_print(), and main().

#define loop for(;;)

Definition at line 199 of file cidsim.c.

Referenced by main(), and siuException().

#define NTT_MSG_LENGTH 90

Definition at line 242 of file cidsim.c.

Referenced by main().

#define BELLCORE_MSG_LENGTH 26

Definition at line 252 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 cidsim_profile_enable ( void ) [inline, static]

Definition at line 122 of file cidsim.c.

References cidProfile, and cidProfile_t::enabled.

Referenced by main().

static void cidsim_profile_disable ( void ) [inline, static]

Definition at line 128 of file cidsim.c.

References cidProfile, and cidProfile_t::enabled.

Referenced by cidsim_profile_close(), cidsim_profile_init(), and siuCidRptIn().

static void cidsim_profile_start ( tint code ) [inline, static]

Definition at line 134 of file cidsim.c.

References cidProfile, cidProfile_t::ignore_cycles, cidProfile_t::profile_cycles, cidProfile_t::profile_start, and cidProfile_t::use_cache.

Referenced by cidsim_profile_init(), and main().

static void cidsim_profile_stop ( tint code ) [inline, static]

Definition at line 150 of file cidsim.c.

References cidProfile, cidProfile_t::ignore_cycles, cidProfile_t::profile_cycles, cidProfile_t::profile_ovrhd, and cidProfile_t::profile_start.

Referenced by cidsim_profile_init(), and main().

static void cidsim_ignore_start ( void ) [inline, static]

Definition at line 166 of file cidsim.c.

References cidProfile, and cidProfile_t::ignore_start.

Referenced by cidsim_profile_init(), siuCidRptIn(), and siuDebugInfo().

static void cidsim_ignore_stop ( void ) [inline, static]

Definition at line 173 of file cidsim.c.

References cidProfile, cidProfile_t::ignore_cycles, cidProfile_t::ignore_ovrhd, and cidProfile_t::ignore_start.

Referenced by cidsim_profile_init(), siuCidRptIn(), and siuDebugInfo().

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

Debug & exception functions.

Definition at line 362 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 379 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 395 of file cidsim.c.

References cidsim_ignore_start(), and cidsim_ignore_stop().

Referenced by main().

Here is the call graph for this function:

sgnFileIo_t* siu_rx_file ( sgnFileIo_t * dsc )

Definition at line 418 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 440 of file cidsim.c.

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

Referenced by main().

void cidsim_profile_init ( void )

Definition at line 455 of file cidsim.c.

References cidProfile, cidsim_ignore_start(), cidsim_ignore_stop(), cidsim_profile_disable(), cidsim_PROFILE_FNAME, cidsim_profile_start(), cidsim_profile_stop(), cidProfile_t::fptr, cidProfile_t::ignore_cycles, cidProfile_t::ignore_ovrhd, cidProfile_t::profile_cycles, cidProfile_t::profile_ovrhd, and cidProfile_t::use_cache.

Referenced by main().

Here is the call graph for this function:

void cidsim_profile_close ( void )

Definition at line 487 of file cidsim.c.

References cidProfile, cidsim_profile_disable(), and cidProfile_t::fptr.

Referenced by main().

Here is the call graph for this function:

void cidsim_profile_print ( char * msg )

Definition at line 500 of file cidsim.c.

References cidProfile, cidsim_PROFILE_RCV_IDX, cidsim_PROFILE_SND_IDX, cidProfile_t::enabled, cidProfile_t::fptr, siuSetup_t::frame_size, cidProfile_t::profile_cycles, and siuSetup.

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 532 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 575 of file cidsim.c.

References cidsim_ignore_start(), cidsim_ignore_stop(), cidsim_profile_disable(), multi_msg_idx, multi_msg_len, siuSetup, siuSetup_t::tog_cid1, and siuSetup_t::tog_cid2.

Referenced by main().

Here is the call graph for this function:

void siu_new_cid ( tint chnum )

Creates a CID instance.

Parameters:
[in] chnum Channel number

Definition at line 623 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 683 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 711 of file cidsim.c.

References siuInst_t::cidInst, and siuInst.

Referenced by main().

void siu_delete_cid ( tint chnum )

Definition at line 730 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 756 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 768 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 814 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 870 of file cidsim.c.

References BELLCORE_MSG_LENGTH, siuCHSMPars_t::chnl_sim_on, siuSetup_t::chSim, siuSetup_t::cid_ctlMsg1, siuSetup_t::cid_ctlMsg2, cidsim_profile_close(), cidsim_profile_enable(), cidsim_profile_init(), cidsim_profile_print(), cidsim_PROFILE_RCV_IDX, cidsim_PROFILE_SND_IDX, cidsim_profile_start(), cidsim_profile_stop(), frame_in, siuSetup_t::frame_size, generate_rx_frame(), loop, multi_msg, multi_msg_idx, multi_msg_len, 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 45 of file cidsim.c.

Referenced by main().

linSample siuPcmOutStream[MAX_STREAM_SIZE]

PCM output samples from GNRT

Definition at line 46 of file cidsim.c.

Referenced by siuChSim().

linSample siuPcmInStream[MAX_STREAM_SIZE]

PCM input samples to DTCT

Definition at line 47 of file cidsim.c.

Referenced by main().

tint v21_flags = 0x7e7e

Definition at line 50 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 73 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 74 of file cidsim.c.

Referenced by main().

char siu_dbg_message[SIU_DBGMSG_SIZE]

Definition at line 78 of file cidsim.c.

Referenced by siuDebugInternal().

tuint siu_dbg_id

Definition at line 79 of file cidsim.c.

Referenced by siuDebugInternal().

tint rptBuff

Indicator of instance

Definition at line 80 of file cidsim.c.

Referenced by main().

tuint multi_msg_idx = 0

Definition at line 81 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

tuint multi_msg_len = 0

Definition at line 82 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

tint* multi_msg

Definition at line 83 of file cidsim.c.

Referenced by main().

void* sgnRxInst = (void *) NULL

Definition at line 86 of file cidsim.c.

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

tint flog = 0

Definition at line 87 of file cidsim.c.

cidProfile_t cidProfile

Initial value:

 {
  (FILE *) NULL,
  TRUE,
  FALSE,
  0L,
  0L,
  {0L,0L},
  0L,
  0L,
  0L,
}

Definition at line 108 of file cidsim.c.

Referenced by cidsim_ignore_start(), cidsim_ignore_stop(), cidsim_profile_close(), cidsim_profile_disable(), cidsim_profile_enable(), cidsim_profile_init(), cidsim_profile_print(), cidsim_profile_start(), and cidsim_profile_stop().

struct { ... } csmInst

Referenced by siu_open_csm(), and siuChSim().

tint { ... } nscale [inherited]

Definition at line 194 of file cidsim.c.

tuint { ... } rng_state [inherited]

Definition at line 195 of file cidsim.c.

cidBindConfig_t cidBindConfig

Definition at line 201 of file cidsim.c.

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 243 of file cidsim.c.

tint bellcore_message[]

Initial value:

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

Definition at line 253 of file cidsim.c.

siuSetup_t siuSetup

Definition at line 297 of file cidsim.c.

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

volatile tbool glob_flg

Definition at line 390 of file cidsim.c.

tuint glob_msgLength

Definition at line 391 of file cidsim.c.

tuint glob_moduleID

Definition at line 392 of file cidsim.c.

tuint glob_msgType

Definition at line 392 of file cidsim.c.

tuint glob_messageCode

Definition at line 392 of file cidsim.c.

tuint glob_msgData[4]

Definition at line 393 of file cidsim.c.


CID Test: CID Unit Test

CID 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 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 into CCSV5 and build. All projects will reside in the cid\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main CID documentation.

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.X or above and may be used for those who haven't yet upgraded to CCS version 4.X or above.

  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.X or above.

  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
  • CCS Project Conversion
  • Disclaimer


CID Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the cid\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_CID_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all CID component Unit Test CCS projects in the cid\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the cid\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_CID_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all CID component Unit Test CCS projects in the cid\test\ccsProjects directory such that they will load and build with CCS version 4.2


CID Test: cidProfile_t Struct Reference

  • Data Structures
  • Data Fields

cidProfile_t Struct Reference
[CIDTEST]

Detailed Description

Definition at line 96 of file cidsim.c.

Data Fields

FILE * | fptr
tbool | use_cache
tbool | enabled
tlong | profile_ovrhd
tlong | profile_start
tlong | profile_cycles [2]
tlong | ignore_ovrhd
tlong | ignore_start
tlong | ignore_cycles

Field Documentation

FILE* cidProfile_t::fptr

FILE pointer for profiling data

Definition at line 97 of file cidsim.c.

Referenced by cidsim_profile_close(), cidsim_profile_init(), and cidsim_profile_print().

tbool cidProfile_t::use_cache

Boolean to enable/disable cache usage/flush

Definition at line 98 of file cidsim.c.

Referenced by cidsim_profile_init(), and cidsim_profile_start().

tbool cidProfile_t::enabled

Boolean to enable disable internally

Definition at line 99 of file cidsim.c.

Referenced by cidsim_profile_disable(), cidsim_profile_enable(), and cidsim_profile_print().

tlong cidProfile_t::profile_ovrhd

Cycle overhead for profile cycle measurement

Definition at line 100 of file cidsim.c.

Referenced by cidsim_profile_init(), and cidsim_profile_stop().

tlong cidProfile_t::profile_start

Cycle start count prior to profile call

Definition at line 101 of file cidsim.c.

Referenced by cidsim_profile_start(), and cidsim_profile_stop().

tlong cidProfile_t::profile_cycles[2]

Total cycles for RX/TX

Definition at line 102 of file cidsim.c.

Referenced by cidsim_profile_init(), cidsim_profile_print(), cidsim_profile_start(), and cidsim_profile_stop().

tlong cidProfile_t::ignore_ovrhd

Cycle overhead for ignored cycle measurement

Definition at line 103 of file cidsim.c.

Referenced by cidsim_ignore_stop(), and cidsim_profile_init().

tlong cidProfile_t::ignore_start

Cycle start count prior to ignore call

Definition at line 104 of file cidsim.c.

Referenced by cidsim_ignore_start(), and cidsim_ignore_stop().

tlong cidProfile_t::ignore_cycles

Cycle count for calls to be ignored

Definition at line 105 of file cidsim.c.

Referenced by cidsim_ignore_stop(), cidsim_profile_init(), cidsim_profile_start(), and cidsim_profile_stop().

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


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 278 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 279 of file cidsim.c.

Referenced by main(), and siuChSim().

tint siuCHSMPars_t::nlevel

channel noise level in dBm0

Definition at line 280 of file cidsim.c.

Referenced by siu_open_csm().

tuint siuCHSMPars_t::nseed

channel noise seed

Definition at line 281 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 58 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 59 of file cidsim.c.

Referenced by siu_delete_cid(), and siu_new_cid().

tuint siuInst_t::ID

Definition at line 62 of file cidsim.c.

void* siuInst_t::cidInst

Definition at line 63 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 64 of file cidsim.c.

Referenced by siu_delete_cid(), and siu_new_cid().

tint siuInst_t::cid_heap_size

Definition at line 65 of file cidsim.c.

Referenced by siu_delete_cid().

tint siuInst_t::aux_heap_size

Definition at line 68 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 262 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 263 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 264 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::wftype

one of sgn_WFT_'s

Definition at line 265 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 266 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 267 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 268 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 269 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 270 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tuint siuSGNPars_t::nseed

idle noise seed

Definition at line 271 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::ntype

noise type sgn_NT_xxx

Definition at line 272 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::pow_level

Hoth or CSS power level in dBm0

Definition at line 273 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tuint siuSGNPars_t::hoth_seed

Hoth noise seed

Definition at line 274 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 284 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 285 of file cidsim.c.

tint siuSetup_t::frame_size

# samples in frame (80 for 10ms frame)

Definition at line 286 of file cidsim.c.

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

tint siuSetup_t::tog_cid1

TRUE: change CID control parameters in cid_ctlMsg1 for ch1

Definition at line 287 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

cidCtlMsg_t siuSetup_t::cid_ctlMsg1

CID control message for ch1

Definition at line 288 of file cidsim.c.

Referenced by main().

tint siuSetup_t::tog_cid2

TRUE: change CID control parameters for ch2

Definition at line 289 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 290 of file cidsim.c.

Referenced by main().

tbool siuSetup_t::tog_chnl_sim

TRUE: toggle channel simulator

Definition at line 291 of file cidsim.c.

Referenced by main().

siuCHSMPars_t siuSetup_t::chSim

channel simulator parameters

Definition at line 292 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 293 of file cidsim.c.

Referenced by main().

siuSGNPars_t siuSetup_t::rxSGN

Rx Signal Generator Parameters

Definition at line 294 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 (92)
#define | ti_mas_ecu_Version_XVERTICAL (0)
#define | ti_mas_ecu_Version_PATCH (0)
#define | ti_mas_ecu_Version_BUILD (4)
#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 (92)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_ecu_Version_BUILD (4)

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 (92)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_ecu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_ecu_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_ecu_Version_BUILD (4)
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.92.0.4

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<starg>_<ver>.zip
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<starg>_<ver>.zip
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<starg>_<ver>.zip
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<starg>_<ver>.zip
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<starg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


ECU: ECU Integration

ECU (Echo Canceller Unit) Package

ECU Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the ECU root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the ECU makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

Optimal Buffer Placement

ECU Buffer Cross Reference
Index | Name | Description
1 | Foreground Filter Buffer | Holds coefficients for foreground filter segments
2 | Background Filter Buffer | Holds coefficients for background filter segments
4 | Delay Line Buffer | Stores previous receive-path samples. The number of samples depends on the configured tail length. Note that when delay line compression is used, this buffer stores packed PCM samples (see ECU.pdf for details)
5 | Expanded Delay Line Buffer | This buffer is only used in the case of delay line compression. In this case, packed PCM samples from the delay line buffer are expanded here as needed.
6 | Background Update Buffer | This is a scratch buffer for the background LMS update operation.
14 | Search Filter Buffer | This buffer holds the filter coefficients used by the ECU search algorithm to identify filter "segment" candidates for the background update buffer.

In order to achieve the optimal MIPS performance for the ECU, the following rules regarding buffer and code placement should be followed. Note that the two sets of rules are provided based on the delay line compression compile-time option. The "ECU Buffer Cross Reference" Table above should be referenced as needed.

Linear Delay Line Build

Following are the rules that define the optimal buffer and code placement strategy for ECU builds that do not exploit delay line compression for memory savings.

  1. Buffer index 1 should not occupy the same memory bank as buffer index 4
  2. Buffer index 2 should not occupy the same memory bank as buffer indices 4 and 6
  3. Buffer index 4 should reside in dual-access memory (DARAM, for C55x)
  4. Buffer index 6 should not occupy the same memory bank as buffer indices 2 and 4
  5. Buffer index 14 should not occupy the same memory bank as buffer indices 4 and 6
  6. The system stack should not occupy the same memory bank as buffer index 4
  7. Buffer indices 2, 4, 6 and 14 should not occupy the same memory bank as the object code eculms.obj
  8. Buffer indices 1 and 4 should not occupy the same memory bank as the object code ecuerm.obj

Compressed Delay Line Build

Following are the rules that define the optimal buffer and code placement strategy for ECU builds that exploit delay line compression for memory savings.

  1. Buffer index 1 should not occupy the same memory bank as buffer index 5
  2. Buffer index 2 should not occupy the same memory bank as buffer indices 5 and 6
  3. Buffer index 5 should reside in dual-access memory (DARAM, for C55x)
  4. Buffer index 6 should not occupy the same memory bank as buffer indices 2 and 5
  5. Buffer index 14 should not occupy the same memory bank as buffer indices 4 and 5
  6. The system stack should not occupy the same memory bank as buffer index 5
  7. Buffer indices 2, 5, 6 and 14 should not occupy the same memory bank as the object code eculms.obj
  8. Buffer indices 1 and 5 should not occupy the same memory bank as the object code ecuerm.obj

Notes:
  1. All buffer indices are zero-based and based on the buffer indices as specified by the ecuNew() and ecuGetSizes() API routines.
  2. Delay-line compression is enabled in a build if the size requirement for buffer index 5, as returned by ecuGetSizes(), is non-zero.

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

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

Structures Requiring Initialization

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. C6000 Target
    • C6000 8KHz ECU Data Memory Requirements
    • C64x 8KHz ECU Program Memory Requirements
    • C64x+ 8KHz ECU Program Memory Requirements
    • C66x 8KHz ECU Program Memory Requirements
  5. C6000 16KHz Target
    • C6000 16KHz ECU Data Memory Requirements
    • C64x 16KHz ECU Program Memory Requirements
    • C64x+ 16KHz ECU Program Memory Requirements
    • C66x 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)
  6. Delay line compression enabled (except wideband)

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

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

Notes:
  1. Kbyte above represents 1024 bytes.

C6000 Target

C6000 8KHz ECU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  |  |  |  | Scratch/Dedicated
 |  | 8ms | 16ms | 32ms | 64ms | 128ms
0 | 8 | 664 | 664 | 664 | 664 | 664 | Dedicated
1 | 8 | 128 | 256 | 512 | 512 | 512 | Dedicated
2 | 8 | 128 | 256 | 512 | 512 | 512 | Dedicated
3 | 2 | 80 | 80 | 80 | 80 | 80 | Scratch
4 | 8 | 144 | 208 | 336 | 592 | 1104 | Dedicated
5 | (See Note 1 below) | 292 | 420 | 676 | 1188 | 2212 | Scratch
6 | N/A | 0 | 0 | 0 | 0 | 0 | Scratch
7 | 4 | 12 | 12 | 12 | 16 | 28 | Dedicated
8 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
9 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
10 | 4 | 4 | 4 | 4 | 12 | 12 | Dedicated
11 | 4 | 4 | 4 | 4 | 12 | 12 | Dedicated
12 | N/A | 0 | 0 | 0 | 0 | 0 | Dedicated
13 | N/A | 0 | 0 | 0 | 0 | 0 | Scratch
14 | 8 | 0 | 0 | 0 | 1024 | 2048 | Dedicated
15 | 4 | 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 | 82
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

Notes:
  1. Kbyte above represents 1024 bytes.

C64x+ 8KHz ECU Program Memory Requirements

C64x+ 8KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 43.5 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables

Notes:
  1. Kbyte above represents 1024 bytes.

C66x 8KHz ECU Program Memory Requirements

C66x 8KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 43.7 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables

Notes:
  1. Kbyte above represents 1024 bytes.

C6000 16KHz Target

C6000 16KHz ECU Data Memory Requirements

Per Instance Data Buffers
Buffer ID | Alignment (Bytes) | Size (Bytes) |  |  |  |  | Scratch/Dedicated
 |  | 8ms | 16ms | 32ms | 64ms | 128ms
0 | 8 | 690 | 690 | 690 | 690 | 690 | Dedicated
1 | 8 | 128 | 256 | 512 | 512 | 512 | Dedicated
2 | 8 | 128 | 256 | 512 | 512 | 512 | Dedicated
3 | 2 | 80 | 80 | 80 | 80 | 80 | Scratch
4 | (See Note 1 below) | 448 | 576 | 832 | 1184 | 2208 | Dedicated
5 | N/A | 0 | 0 | 0 | 0 | 0 | Scratch
6 | 2 | 128 | 256 | 512 | 1024 | 2048 | Scratch
7 | 4 | 12 | 12 | 12 | 16 | 28 | Dedicated
8 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
9 | 2 | 16 | 16 | 16 | 28 | 54 | Dedicated
10 | 4 | 4 | 4 | 4 | 12 | 12 | Dedicated
11 | 4 | 4 | 4 | 4 | 12 | 12 | Dedicated
12 | 2 | 256 | 256 | 256 | 256 | 256 | Dedicated
13 | 2 | 384 | 384 | 384 | 384 | 384 | Scratch
14 | 8 | 0 | 0 | 0 | 1024 | 2048 | Dedicated
15 | 4 | 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 | 150
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

Notes:
  1. Kbyte above represents 1024 bytes.

C64x+ 16KHz ECU Program Memory Requirements

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

Notes:
  1. Kbyte above represents 1024 bytes.

C66x 16KHz ECU Program Memory Requirements

C66x 16KHz ECU Program Memory Requirements
Section | Size | Placement | Description
.text | 46.5 Kbyte | Internal | Core ECU code
.switch | 72 Byte | Internal | Switch tables

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
  • C66x 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.1 | 2.1
16ms | 2.7 | 2.2
32ms | 3.4 | 2.7

ECU MIPS - Multisegment Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
64ms | 4.9 | 3.3
128ms | 6.5 | 4.9

C66x Target

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

ECU MIPS - Multisegment Configuration
ECU Peak MIPS (10ms frame)
Filter Length | Initial Convergence | Steady State
64ms | 4.7 | 3.1
128ms | 6.0 | 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: Data Structures

  • Data Structures
  • Data Fields

ECU Test Data Structures

Here are the data structures with brief descriptions:
bidSilenceCtrl_t
bidSilenceDet_t
ecuAutoConfig_t
ecuAutoFout_t
ecuAutoLoopCfg_t
ecuChnConfig_t
ecuMemConfig_t
ecuMemHeap_t
ecuProfile_t
ecuSimFileIo_t
iramSeg_t
pcmPatternDet_t
pcmPatternGen_t
piuCompandingCfg_t
piuConfig_t
piuContext_t
piuControl_t
piuEnergyDCLevel_t
piuInst_s
piuNewConfig_t
piuPcmPatternDetect_t
piuSizeConfig_t
piuStats_t
receive_in_buf_t
setFrame_t
siuConfig_t
siuContext_t
siuGetFlt_t
siuInst_t
siuSetup_s
siuSGNPars_t
siuSlimInst_t
siuTxConfig_t
siuTxInst_t
siuTxSendOut_t


ECU Test: cheap.c File Reference

  • File List
  • Globals

cheap.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/ecu/test/src/cheap.h>

Include dependency graph for cheap.c:

Go to the source code of this file.

Variables

tword siu_core_heap [SIU_CORE_HEAP_SIZE]

Variable Documentation

tword siu_core_heap[SIU_CORE_HEAP_SIZE]

Definition at line 24 of file cheap.c.

Referenced by main().


ECU Test: cheap.c Source File

  • File List
  • Globals

cheap.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Core heap.
00003  ******************************************************************************
00004  * FILE NAME:   cheap.c
00005  *
00006  * DESCRIPTION: Contains core heap.
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: cheap.c 1.1 1997/07/14 15:32:24 BOGDANK Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: cheap.c $
00015  * Revision 1.1  1997/07/14 15:32:24  BOGDANK
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/ecu/test/src/cheap.h>
00023
00024 tword siu_core_heap[SIU_CORE_HEAP_SIZE];
00025 /* nothing past this point */


ECU Test: cheap.h File Reference

  • File List
  • Globals

cheap.h File Reference

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

Include dependency graph for cheap.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | SIU_CORE_HEAP_SIZE 3072

Variables

tword | siu_core_heap []

Define Documentation

#define SIU_CORE_HEAP_SIZE 3072

Definition at line 27 of file cheap.h.

Referenced by main().

Variable Documentation

tword siu_core_heap[]

Definition at line 24 of file cheap.c.

Referenced by main().


ECU Test: cheap.h Source File

  • File List
  • Globals

cheap.h

Go to the documentation of this file.
00001 #ifndef _CHEAP_H
00002 #define _CHEAP_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Core heap definitions.
00005  ******************************************************************************
00006  * FILE NAME:   cheap.h
00007  *
00008  * DESCRIPTION: Contains core heap definitions.
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: cheap.h 1.2 1998/10/22 14:14:18 DLI Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: cheap.h $
00017  * Revision 1.2  1998/10/22 14:14:18  DLI
00018  *   - heap size increased to 3K
00019  * Revision 1.1  1997/07/14 15:32:25  BOGDANK
00020  * Initial revision
00021  *
00022  * (C) Copyright 1997, TELOGY Networks, Inc.
00023  *****************************************************************************/
00024
00025 #include <ti/mas/types/types.h>
00026
00027 #define SIU_CORE_HEAP_SIZE  3072
00028 extern tword siu_core_heap[];
00029
00030 #endif  /* _CHEAP_H */
00031 /* nothing past this point */


ECU Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

All simulation configuration parameters are in the ecuSim 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, ecuSim->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 ecuSim->exec to the value 1,
  4. Choose a signal source:
    • By default, ecuSim->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\vectors\inp\rin.pcm, and ecu\test\vectors\inp\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 ecuSim->rin->fname and ecuSim->sin->fname.
    • The data files may be linear 16-bit PCM format (little Endian) Ulaw or Alaw, though the ecuSim->pcm_format setting must match the file format (0 = Alaw, 1 = Ulaw, 2 = Linear). The default is Ulaw.
    • When ecuSim->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 ecuSim->toggle_tx_sg or ecuSim->toggle_rx_sg (or both) to 1 to toggle a re-configuration, while setting the fields in ecuSim->txSGN and/or ecuSim->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 ecuSim->toggle_hyb to 1, and configuring the fields in ecuSim->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 ecuSim->toggle_ecu to 1, and configuring the ecuSim->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

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


ECU 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


ECU Test: ecmemdef.c File Reference

  • File List
  • Globals

ecmemdef.c File Reference

#include <stdlib.h>
#include <ti/mas/ecu/ecu.h>
#include <ti/mas/ecu/test/src/ecusim.h>
#include <ti/mas/ecu/test/src/siu.h>
#include <ti/mas/ecu/test/src/siuloc.h>
#include <ti/mas/ecu/test/src/siuport.h>
#include <ti/mas/ecu/test/src/vctypes.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/types/types.h>

Include dependency graph for ecmemdef.c:

Go to the source code of this file.

Variables

ecuContext_t ecuContext

Variable Documentation

ecuContext_t ecuContext

Initial value:

 {

  (vfnptr) siuDebugInfo,

  NULL,

  NULL,

  NULL,
  ecu_send_out,
  piuReceiveIn,
  SIU_MAX_FRAME_LENGTH,
  SIU_MAX_ECU_FILTER_LENGTH,
  SIU_MAX_ECU_FLTSEG_LENGTH,
  SIU_MAX_ECU_FLTSEG,
  SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH,

  0L,
  NULL,
  NULL,
  NULL,
}

Definition at line 44 of file ecmemdef.c.

Referenced by main().


ECU Test: ecmemdef.c Source File

  • File List
  • Globals

ecmemdef.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Memory definition/allocation/initialization for ECU &
00003  *               MAG simulation.
00004  ******************************************************************************
00005  * FILE NAME:   ecmemdef.c
00006  *
00007  * DESCRIPTION: Contains memory declarations for ECU & MAG simulation.
00008  *              Most structures/tables here are declared in the system in
00009  *              ggcfg.c or ggmemdef.c.
00010  *
00011  * TABS: NONE
00012  *
00013  * (C) Copyright 2008, Texas Instruments, Inc.
00014  *****************************************************************************/
00015
00016 /* Definition of NULL */
00017 #include <stdlib.h>
00018
00019 /* ECU header files */
00020 #include <ti/mas/ecu/ecu.h>
00021 #include <ti/mas/ecu/test/src/ecusim.h>
00022
00023 /* MAG header file */
00024 #if ECUSIM_INCLUDE_MAG
00025 #include <ti/mas/ecu/mag.h>
00026 #endif
00027
00028 /* SIU header files */
00029 #include <ti/mas/ecu/test/src/siu.h>
00030 #include <ti/mas/ecu/test/src/siuloc.h>
00031 #include <ti/mas/ecu/test/src/siuport.h>
00032 #include <ti/mas/ecu/test/src/vctypes.h>
00033
00034 /* Other ECO files */
00035 #include <ti/mas/ecu/test/src/piu.h>
00036
00037 /* System header files */
00038 #include <ti/mas/types/types.h>
00039
00040 /******************************************************************************/
00041 /*****************      START OF ECU CONTEXT         **************************/
00042 /******************************************************************************/
00043
00044 ecuContext_t ecuContext = {
00045 #ifndef _HWDSKT
00046   (vfnptr) siuDebugInfo,      /* Void function pointer to SIU exception handler */
00047 #else
00048   exception_fcn,
00049 #endif
00050   NULL,                       /* Debug streaming function pointer */
00051 #if ECUSIM_INCLUDE_MAG
00052   magEvtEcuInst,              /* MIPS Agent open/close event handler */
00053 #else
00054   NULL,
00055 #endif
00056   NULL,                       /* Search filter swapping function */
00057   ecu_send_out,               /* Send out function pointer */
00058   piuReceiveIn,               /* Receive out function pointer */
00059   SIU_MAX_FRAME_LENGTH,       /* Maximum number of samples per frame */
00060   SIU_MAX_ECU_FILTER_LENGTH,  /* Maximum filter length in taps */
00061   SIU_MAX_ECU_FLTSEG_LENGTH,  /* Maximum filter segment buffer length in taps */
00062   SIU_MAX_ECU_FLTSEG,         /* Maximum allowed active filter segments */
00063   SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH,
00064                               /* Maximum y2x delay in samples */
00065   0L,                         /* Bitfield representing those portions of the
00066                                * delay line already expanded. */
00067   NULL,                       /* Pointer to base of the scratch delay line */
00068   NULL,                       /* TDM aligned pointer within scratch delay line */
00069   NULL,                       /* TDM aligned pointer within packed delay line */
00070 };
00071
00072 /******************************************************************************/
00073 /*****************       END OF ECU CONTEXT          **************************/
00074 /******************************************************************************/
00075
00076
00077 #if ECUSIM_INCLUDE_MAG
00078 /******************************************************************************/
00079 /***************** START OF MIPS AGENT MIPS TABLES   **************************/
00080 /******************************************************************************/
00081
00082 /******************************************************************************
00083  * DATA DEFINITION: ECU static MIPS structure
00084  ******************************************************************************
00085  * DESCRIPTION: FG overhead MIPS.
00086  *
00087  *****************************************************************************/
00088 magEcuMips_t magEcuStaticMips = {
00089   /* FG overhead MIPS */
00090   mag_MIPS_CONVERT(1.414)
00091 };
00092
00093 /******************************************************************************
00094  * DATA DEFINITION: ECU Search Function 5ms frame Cycle coefficients table
00095  ******************************************************************************
00096  * DESCRIPTION: Cycle coefficients for MSEC Search Function.
00097  *
00098  *****************************************************************************/
00099 tuint magTblEcuSearch[][mag_NUM_COEFF] = {
00100   /* 40Nt + 0Ns + 2547 */
00101   { mag_SEARCH_CYCLES_CONVERT(40),
00102     mag_SEARCH_CYCLES_CONVERT(0) ,
00103     mag_SEARCH_CYCLES_CONVERT(2400) },
00104   /* TODO */
00105   { mag_SEARCH_CYCLES_CONVERT(80),
00106     mag_SEARCH_CYCLES_CONVERT(0) ,
00107     mag_SEARCH_CYCLES_CONVERT(4100) }
00108 };
00109
00110
00111 /******************************************************************************
00112  * DATA DEFINITION: ECU Update Function 5ms frame Cycle coefficients table
00113  ******************************************************************************
00114  * DESCRIPTION: Cycle coefficients for MSEC BG Update Function.  States supported
00115  *              are: mag_ECU_UPDATE_SLOW, mag_ECU_UPDATE_FAST.
00116  *
00117  *****************************************************************************/
00118 tuint magTblEcuUpdate[][mag_NUM_COEFF] = {
00119   /* 41Nt + 381Ns + 2920 */
00120   { mag_UPDATE_CYCLES_CONVERT(41)  ,
00121     mag_UPDATE_CYCLES_CONVERT(381) ,
00122     mag_UPDATE_CYCLES_CONVERT(2920) },
00123   /* 81Nt + 760Ns + 4034 */
00124   { mag_UPDATE_CYCLES_CONVERT(81)  ,
00125     mag_UPDATE_CYCLES_CONVERT(760) ,
00126     mag_UPDATE_CYCLES_CONVERT(4034) }
00127 };
00128
00129 /******************************************************************************
00130  * DATA DEFINITION: ECU Echo Removal Function 5ms frame Cycle coefficients
00131  *                  table.
00132  ******************************************************************************
00133  * DESCRIPTION: Cycle coefficients for MSEC Echo Removal Function.  Only one
00134  *              state supported.
00135  *
00136  *****************************************************************************/
00137 tuint magTblEcuRemove[][mag_NUM_COEFF] = {
00138   /*  40Nt + 520Ns + 1372 */
00139   { mag_REMOVE_CYCLES_CONVERT(40)  ,
00140     mag_REMOVE_CYCLES_CONVERT(520) ,
00141     mag_REMOVE_CYCLES_CONVERT(1372) }
00142 };
00143
00144 /******************************************************************************
00145  * DATA DEFINITION: ECU PCM expansion Cycle coefficients table.
00146  ******************************************************************************
00147  * DESCRIPTION: Cycle coefficients for MSEC PCM delay line expansion.
00148  *              The first row is for 5ms/5.5ms frame sizes and the second
00149  *              row for 10ms/11ms frame sizes.
00150  *
00151  *****************************************************************************/
00152 tuint magTblPcmExpand[][mag_NUM_COEFF] = {
00153   /* 5ms/5.5ms frame -- 4Nt + 1200 Cycles */
00154   { mag_EXPAND_CYCLES_CONVERT(4)   ,
00155     mag_EXPAND_CYCLES_CONVERT(0)   ,
00156     mag_EXPAND_CYCLES_CONVERT(1200)},
00157   /* 10ms/11ms frame -- 2Nt + 600 Cycles (equiv) */
00158   { mag_EXPAND_CYCLES_CONVERT(2)   ,
00159     mag_EXPAND_CYCLES_CONVERT(0)   ,
00160     mag_EXPAND_CYCLES_CONVERT(600) }
00161 };
00162
00163 /******************************************************************************
00164  * DATA DEFINITION: Codec encode/decode MIPS table
00165  ******************************************************************************
00166  * DESCRIPTION: Codec type followed by MIPS consumption (U6.10) for encode and
00167  *              decode respectively.
00168  *
00169  *****************************************************************************/
00170 magCodecMips_t magTblCodecMips[] = {
00171   /*--------------------------------------------------------------*/
00172   /* Coding type   Encoder MIPS               Decoder MIPS        */
00173   /*--------------------------------------------------------------*/
00174   {VCT_8APCM,    mag_MIPS_CONVERT(0.16), mag_MIPS_CONVERT(0.13) }, /* A-law */
00175   {VCT_8MUPCM,   mag_MIPS_CONVERT(0.16), mag_MIPS_CONVERT(0.13) }, /* U-law */
00176   {VCT_2ADPCM,   mag_MIPS_CONVERT(4.80), mag_MIPS_CONVERT(5.30) }, /* G.726 16K */
00177   {VCT_3ADPCM,   mag_MIPS_CONVERT(4.90), mag_MIPS_CONVERT(5.40) }, /* G.726 24K */
00178   {VCT_4ADPCM,   mag_MIPS_CONVERT(5.00), mag_MIPS_CONVERT(5.40) }, /* G.726 32K */
00179   {VCT_5ADPCM,   mag_MIPS_CONVERT(5.10), mag_MIPS_CONVERT(5.60) }  /* G.726 40K */
00180 };
00181
00182 /******************************************************************************
00183  * DATA DEFINITION: Channel overhead MIPS table
00184  ******************************************************************************
00185  * DESCRIPTION: MIPS consumption (U6.10) for each channel state. Note that only
00186  *              those channel states valid for this build need to be supplied
00187  *
00188  *****************************************************************************/
00189 magChStateMips_t magTblChanMips[] = {
00190   {SIU_CHST_CLOSED ,mag_MIPS_CONVERT(0)    },
00191   /* IDLE = 0.20 + 0.6 HPIint + 0.83 PCMint + 0.1 mag + 0.46 RXTX =  2.19 MIPS  */
00192   {SIU_CHST_IDLE   ,mag_MIPS_CONVERT(2.19) },
00193   /* VOICE = 3.45 + 0.6 HPIint + 0.83 PCMint + 0.1 mag + 0.46 RXTX =  5.44 MIPS */
00194   {SIU_CHST_VOICE  ,mag_MIPS_CONVERT(5.44) },
00195   /* DTMF = 3.30 + 0.6 HPIint + 0.83 PCMint + 0.1 mag + 0.46 RXTX =  5.29 MIPS  */
00196   {SIU_CHST_DTMF   ,mag_MIPS_CONVERT(5.29) }
00197 };
00198
00199 /******************************************************************************/
00200 /***************** END OF MIPS AGENT MIPS TABLES   ****************************/
00201 /******************************************************************************/
00202
00203
00204 /******************************************************************************/
00205 /***************** START OF MIPS AGENT BUFFERS     ****************************/
00206 /******************************************************************************/
00207
00208 tint           queue1[MAX_CHANNELS];
00209 tint           queue2[MAX_CHANNELS];
00210 UFract         priority[MAX_CHANNELS];
00211 magChannel_t buf1[MAX_CHANNELS] =
00212 {
00213   mag_INIT_CHANNEL_STRUCT, /* Channel  1 context */
00214   mag_INIT_CHANNEL_STRUCT, /* Channel  2 context */
00215   mag_INIT_CHANNEL_STRUCT, /* Channel  3 context */
00216   mag_INIT_CHANNEL_STRUCT, /* Channel  4 context */
00217   mag_INIT_CHANNEL_STRUCT, /* Channel  5 context */
00218   mag_INIT_CHANNEL_STRUCT, /* Channel  6 context */
00219   mag_INIT_CHANNEL_STRUCT, /* Channel  7 context */
00220   mag_INIT_CHANNEL_STRUCT, /* Channel  8 context */
00221   mag_INIT_CHANNEL_STRUCT, /* Channel  9 context */
00222   mag_INIT_CHANNEL_STRUCT  /* Channel 10 context */
00223 };
00224
00225 /******************************************************************************/
00226 /***************** END OF MIPS AGENT BUFFERS       ****************************/
00227 /******************************************************************************/
00228
00229
00230 /******************************************************************************/
00231 /***************** START OF MIPS AGENT CONTEXT     ****************************/
00232 /******************************************************************************/
00233
00234 magContext_t mipsAgent = {
00235   siuMakeID(SIU_MID_ECU,0), /* mag module ID (ECU module, channel 0) */
00236   0,                        /* Clock */
00237   TRUE,                     /* Clock is enabled */
00238   0,                        /* No tasks scheduled */
00239   3,                        /* Search scheduling tick */
00240   2,                        /* Update scheduling tick */
00241   1,                        /* MIPS allocation tick */
00242   4,                        /* Refresh rate (ticks) */
00243   80*65,                    /* Time increment for fuzzy scheduler */
00244   MAX_MIPS,                 /* allotted_mips      MIPS in U22.10 */
00245   0L,                       /* offset_mips        MIPS in U22.10 (0) */
00246   0L,                       /* channel_mips       MIPS in U22.10 (0) */
00247   0L,                       /* codec_mips         MIPS in U22.10 (0) */
00248   0L,                       /* ecufg_mips         MIPS in U22.10 (0) */
00249   MAX_MIPS,                 /* ecu_function_mips  MIPS in U22.10 */
00250   &magEcuStaticMips,      /* Pointer to ECU static MIPS structure */
00251   magTblCodecMips,        /* Pointer to codec MIPS table */
00252   0,                        /* Number of codec records */
00253   magTblChanMips,         /* Pointer to channel state MIPS table */
00254   0,                        /* Number of channel state records */
00255   magTblPcmExpand,        /* Pointer to PCM expansion MIPS table */
00256   /* mipTrack_t structures */
00257   {
00258     /* mipTrack_t structure for Search function */
00259     {
00260       0,                  /* Total MIPS in U6.10 (0)*/
00261       0,                  /* Zero Search instances open */
00262       0,                  /* Zero Search instances active */
00263       magTblEcuSearch   /* Pointer to Search MIPS coeff table */
00264     },
00265     /* mipTrack_t structure for BG Update function */
00266     {
00267       0,                  /* Total MIPS in U6.10 (0)*/
00268       0,                  /* Zero BG Update instances open */
00269       0,                  /* Zero BG Update instances active */
00270       magTblEcuUpdate   /* Pointer to BG Update MIPS coeff table */
00271     },
00272     /* mipTrack_t structure for Echo Removal function */
00273     {
00274       0,                  /* Total MIPS in U6.10 (0)*/
00275       0,                  /* Zero echo removal instances open */
00276       0,                  /* Zero echo removal instances active */
00277       magTblEcuRemove   /* Pointer to Echo Removal MIPS coeff table */
00278     }
00279   },
00280   /* Queue pointers */
00281   {
00282     &queue1[0],           /* Search Queue (no init necessary) */
00283     &queue2[0]            /* Update Queue (no init necessary)*/
00284   },
00285   &buf1[0],               /* Channel structures (no init necessary)*/
00286   &priority[0],           /* channel priority array */
00287   mag_dummy_dp,         /* Dummy function pointer */
00288   NULL,                   /* Debug streaming function pointer */
00289   (vfnptr) siuDebugInfo   /* Exception function pointer */
00290 };
00291
00292 /******************************************************************************/
00293 /*****************   END OF MIPS AGENT CONTEXT     ****************************/
00294 /******************************************************************************/
00295
00296 /******************************************************************************
00297  * FUNCTION PURPOSE:  Initialization of some MIPS agent structure fields
00298  ******************************************************************************
00299  * DESCRIPTION: Fills some fields of MIPS agent table that cannot be inserted in the
00300  *              mipsAgent table in ggcfg.c directly.
00301  *              Also, this function cannot be in ggcfg.c file because
00302  *              it needs to be where the above tables for codec and chan mips are
00303  *              created due to reference to their sizes i.e. in THIS file.
00304  *
00305  *****************************************************************************/
00306
00307 void ggmagTblInit(void)
00308 {
00309   mipsAgent.codecTableNumRecords    = sizeof(magTblCodecMips)/sizeof(magCodecMips_t);
00310   mipsAgent.chStateMipTblNumRecords = sizeof(magTblChanMips)/sizeof(magChStateMips_t);
00311 }
00312 #endif
00313
00314 /* nothing past this point */


ECU Test: ecuauto.c File Reference

  • File List
  • Globals

ecuauto.c File Reference

#include <ti/mas/ecu/ecu.h>
#include <ti/mas/sdk/src/sgnuta.h>
#include <ti/mas/sdk/src/hybuta.h>
#include <ti/mas/ecu/test/src/ecuauto.h>
#include <ti/mas/ecu/test/src/ecuautoport.h>
#include <ti/mas/ecu/test/src/ecumem.h>
#include <ti/mas/ecu/test/src/ecuuta.h>
#include <ti/mas/sdk/uta.h>
#include <ti/mas/sdk/sgn.h>
#include <ti/mas/sdk/hyb.h>
#include <ti/mas/sdk/memarchcfg.h>

Include dependency graph for ecuauto.c:

Go to the source code of this file.

Functions

void | ecu_auto_exception (tuint id, tuint type, tuint code, tuint length, tuint *data)
void | ecu_auto_print (char *str)
void | ecu_auto_iprint (char *str, ECU_AUTO_ITYPE ivar)
void | ecu_auto_sprint (char *str, char *svar)
void | ecu_auto_banner_print (char *str, ECU_AUTO_ITYPE ivar)
void | ecu_auto_check_rc (ecuAutoErr_e id, tuint rc, tuint pass_code)
void | main ()
void | ecuAuto_process_loop (ecuAutoLoopCfg_t *cfg)
void | ecuAuto_prep_fout (void)
tuint | ecuAuto_create_chn (tint index, ecuNewConfig_t *ncfg, ecuMemConfig_t *mcfg)
tuint | ecuAuto_open_chn (tint index, ecuConfig_t *cfg)
tuint | ecuAuto_config_chn (tint index, ecuChnConfig_t *cfg)
tuint | ecuAuto_close_chn (tint index)
tuint | ecuAuto_delete_chn (tint index)
tuint | ecuAuto_get_filter (tint index, tint filter, char *fname)
void | ecu_auto_gen_sgnfrms (void)
void | ecu_auto_addmod_uta (tint module)
void | ecu_auto_set_defaults (void)
void | lec_auto_initialize (void)
void | ecu_auto_init_rxsgn (void)
void | ecu_auto_init_txsgn (void)
void | ecu_auto_compand (tint pcm_format, linSample *in, linSample *out)
void | ecu_auto_dline_pack (tint pcm_format, linSample *in, tword *out)
void | ecu_auto_dline_unpack (tint pcm_format, tword *in, linSample *out)
void | ecu_auto_sample_cnt (void)
void | ecu_auto_write_pcm (ecuAutoFout_t *fout, tword *pcmbuf, tint bufsize)
void | ecu_auto_output_ulaw (void *vfout)
void | ecu_auto_output_alaw (void *vfout)
void | ecu_auto_output_lin (void *vfout)
void | ecu_auto_output_pcm (tbool enable, tbool marker, tbool flush)
void | ecu_auto_close_fout (void)
void | ecu_auto_process_uta (void)
void | ecu_auto_create_uta (void)
void | ecu_auto_create_hyb (void)
void | ecu_auto_create_sgn (void **inst)

Variables

volatile tbool | autoBreak
ecuAutoErr_e autoErrorId
tuint | ecuVersion = 0
tuint | ecuRevision = 0
tuint | ecuPatch = 0
tuint | ecuBuild = 0
linSample | sgnrxBuffer [ecu_AUTO_SGN_BUF_SZ]
linSample | sgntxBuffer [ecu_AUTO_SGN_BUF_SZ]
linSample | rinBuffer [ecu_AUTO_MAX_FRAME_SZ]
linSample | sinBuffer [ecu_AUTO_MAX_FRAME_SZ]
linSample | routBuffer [ecu_AUTO_MAX_FRAME_SZ]
linSample | soutBuffer [ecu_AUTO_MAX_FRAME_SZ]
linSample | markBuffer [ecu_AUTO_MARK_SIZE]
void * | ecuAutoEcuInst [ecu_AUTO_MAX_INST]
void * | ecuAutoSgnInst [2]
void * | ecuAutoHybInst
void * | ecuAutoUtaInst
ecuAutoFout_t | outFile [ecu_AUTO_NUM_OUTFILES]
tulong | AutoDssMemCount
tulong | AutoDssMemAddr
tint | AutoDssFileType
tint | AutoDssPcmFormat
char | file_string [ecu_AUTO_MAX_STRING]
char | print_string [ecu_AUTO_MAX_STRING]
tint | ecuAutoFrameSize
tint | ecuAutoFrmIndex
tint | ecuAutoFrmRemain
ecuAutoConfig_t ecuAutoConfig
ecuAutoConfig_t * autoCfg = &ecuAutoConfig
ecuContext_t | ecuContext

Function Documentation

void ecu_auto_exception | ( | tuint | id,
 |  | tuint | type,
 |  | tuint | code,
 |  | tuint | length,
 |  | tuint * | data
 | ) |  |

Definition at line 109 of file ecuauto.c.

void ecu_auto_print ( char * str )

Definition at line 121 of file ecuauto.c.

References autoCfg, and ecuAutoConfig_t::verbose_print.

Referenced by ecu_auto_banner_print(), ecu_auto_create_hyb(), ecu_auto_create_sgn(), ecu_auto_create_uta(), ecu_auto_init_rxsgn(), ecu_auto_init_txsgn(), ecu_auto_iprint(), ecu_auto_process_uta(), ecu_auto_set_defaults(), ecu_auto_sprint(), ecuAuto_config_chn(), ecuAuto_open_chn(), and lec_auto_initialize().

void ecu_auto_iprint | ( | char * | str,
 |  | ECU_AUTO_ITYPE | ivar
 | ) |  |

Definition at line 132 of file ecuauto.c.

References ecu_auto_print(), and print_string.

Referenced by ecu_auto_banner_print(), ecu_auto_check_rc(), ecu_auto_sample_cnt(), ecu_mem_alloc_eco(), ecuAuto_close_chn(), ecuAuto_config_chn(), ecuAuto_create_chn(), ecuAuto_delete_chn(), ecuAuto_get_filter(), and ecuAuto_open_chn().

Here is the call graph for this function:

void ecu_auto_sprint | ( | char * | str,
 |  | char * | svar
 | ) |  |

Definition at line 144 of file ecuauto.c.

References ecu_auto_print(), and print_string.

Referenced by ecu_auto_close_fout(), ecuAuto_get_filter(), and ecuAuto_prep_fout().

Here is the call graph for this function:

void ecu_auto_banner_print | ( | char * | str,
 |  | ECU_AUTO_ITYPE | ivar
 | ) |  |

Definition at line 156 of file ecuauto.c.

References ecu_auto_iprint(), and ecu_auto_print().

Referenced by ecuAuto_process_loop(), and main().

Here is the call graph for this function:

void ecu_auto_check_rc | ( | ecuAutoErr_e | id,
 |  | tuint | rc,
 |  | tuint | pass_code
 | ) |  |

Definition at line 170 of file ecuauto.c.

References autoErrorId, and ecu_auto_iprint().

Referenced by ecu_auto_addmod_uta(), ecu_auto_create_hyb(), ecu_auto_create_sgn(), ecu_auto_create_uta(), ecu_auto_process_uta(), ecuAuto_config_chn(), ecuAuto_create_chn(), ecuAuto_get_filter(), ecuAuto_process_loop(), ecucmd_chncfg_handler(), ecucmd_chndel_handler(), ecucmd_chnnew_handler(), ecucmd_close_handler(), ecucmd_getflt_handler(), and ecucmd_open_handler().

Here is the call graph for this function:

void main ( void )

Definition at line 188 of file ecuauto.c.

References ecu_auto_addmod_uta(), ecu_auto_banner_print(), ecu_auto_close_fout(), ecu_auto_create_hyb(), ecu_auto_create_sgn(), ecu_auto_create_uta(), ecu_AUTO_MOD_ECU, ecu_AUTO_MOD_HYB, ecu_AUTO_MOD_SGN, ecu_auto_process_uta(), ecu_AUTO_RXSGN, ecu_auto_set_defaults(), ecu_AUTO_TXSGN, ecuAutoSgnInst, and lec_auto_initialize().

Here is the call graph for this function:

void ecuAuto_process_loop ( ecuAutoLoopCfg_t * cfg )

Definition at line 244 of file ecuauto.c.

References autoCfg, ecuAutoConfig_t::cache_flush, ecuAutoLoopCfg_t::chn_index, ecu_auto_banner_print(), ecu_auto_check_rc(), ecu_auto_compand(), ecu_auto_dline_pack(), ecu_auto_dline_unpack(), ecu_AUTO_ERR_HYBECHO, ecu_auto_gen_sgnfrms(), ecu_AUTO_MRK_POST, ecu_AUTO_MRK_PRE, ecu_auto_output_pcm(), ecu_AUTO_SAMP_PER_MS, ecu_auto_sample_cnt(), ecuAutoEcuInst, ecuAutoFrameSize, ecuAutoFrmIndex, ecuAutoFrmRemain, ecuAutoHybInst, ecuAutoLoopCfg_t::enable_out, ecuAutoConfig_t::iteration, ecuAutoLoopCfg_t::marker, ecuAutoLoopCfg_t::pcm_format, rinBuffer, routBuffer, sgnrxBuffer, sgntxBuffer, sinBuffer, soutBuffer, and ecuAutoLoopCfg_t::time_ms.

Referenced by ecucmd_runsim_handler().

Here is the call graph for this function:

void ecuAuto_prep_fout ( void )

Definition at line 331 of file ecuauto.c.

References ecu_AUTO_NUM_OUTFILES, ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), ecu_AUTO_PCM_ALAW, ecu_AUTO_PCM_LIN, ecu_AUTO_PCM_ULAW, ecu_auto_sprint(), file_string, ecuAutoFout_t::fname, ecuAutoFout_t::fptr, outFile, ecuAutoFout_t::output_data, ecuAutoFout_t::pcm_format, and ecuAutoFout_t::pcmout_fcn.

Here is the call graph for this function:

tuint ecuAuto_create_chn | ( | tint | index,
 |  | ecuNewConfig_t * | ncfg,
 |  | ecuMemConfig_t * | mcfg
 | ) |  |

Definition at line 395 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR, ecu_AUTO_ERR_CREATECHN, ecu_AUTO_ERR_ECUGETSZ, ecu_AUTO_ERR_ECUNEW, ecu_AUTO_ERR_NUMBUF, ecu_auto_iprint(), ecu_AUTO_MAX_ECOBUFS, ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, ecu_mem_alloc_eco(), and ecuAutoEcuInst.

Referenced by ecucmd_chnnew_handler().

Here is the call graph for this function:

tuint ecuAuto_open_chn | ( | tint | index,
 |  | ecuConfig_t * | cfg
 | ) |  |

Definition at line 436 of file ecuauto.c.

References ecu_AUTO_ERR_OPENCHN, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecuAutoEcuInst, ecuAutoFrameSize, ecuBuild, ecuPatch, ecuRevision, and ecuVersion.

Referenced by ecucmd_open_handler().

Here is the call graph for this function:

tuint ecuAuto_config_chn | ( | tint | index,
 |  | ecuChnConfig_t * | cfg
 | ) |  |

Definition at line 516 of file ecuauto.c.

References ecuChnConfig_t::bypass, ecu_AUTO_CHCFG_BYP_VALID, ecu_AUTO_CHCFG_CLR_VALID, ecu_AUTO_CHCFG_ERL_VALID, ecu_AUTO_CHCFG_HLD_VALID, ecu_AUTO_CHCFG_NLP_VALID, ecu_auto_check_rc(), ecu_AUTO_ERL_0DB, ecu_AUTO_ERL_3DB, ecu_AUTO_ERL_6DB, ecu_AUTO_ERR, ecu_AUTO_ERR_CONFIGCHN, ecu_AUTO_ERR_ECUCONTROL, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_MIN_SEARCH, ecu_AUTO_NLP_CNG_ON, ecu_AUTO_NLP_OFF, ecu_AUTO_NLP_ON, ecu_AUTO_NOERR, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecuAutoEcuInst, ecuChnConfig_t::hreg_clear, ecuChnConfig_t::hreg_hold, ecuChnConfig_t::min_erl, ecuChnConfig_t::nlp_mode, and ecuChnConfig_t::valid_bitfield.

Referenced by ecucmd_chncfg_handler().

Here is the call graph for this function:

tuint ecuAuto_close_chn ( tint index )

Definition at line 719 of file ecuauto.c.

References ecu_AUTO_ERR_CLOSECHN, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, and ecuAutoEcuInst.

Referenced by ecucmd_close_handler().

Here is the call graph for this function:

tuint ecuAuto_delete_chn ( tint index )

Definition at line 745 of file ecuauto.c.

References ecu_AUTO_ERR_DELETECHN, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, and ecuAutoEcuInst.

Referenced by ecucmd_chndel_handler().

Here is the call graph for this function:

tuint ecuAuto_get_filter | ( | tint | index,
 |  | tint | filter,
 |  | char * | fname
 | ) |  |

Definition at line 771 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_GETFLT_BSIZE, ecu_AUTO_ERR_DELETECHN, ecu_AUTO_ERR_ECUGETFLT, ecu_AUTO_ERR_GETFILTER, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, ecu_auto_sprint(), and ecuAutoEcuInst.

Referenced by ecucmd_getflt_handler().

Here is the call graph for this function:

void ecu_auto_gen_sgnfrms ( void )

Definition at line 862 of file ecuauto.c.

References ecu_AUTO_RXSGN, ecu_AUTO_SGN_FRAME_SZ, ecu_AUTO_TXSGN, ecuAutoFrameSize, ecuAutoFrmIndex, ecuAutoFrmRemain, ecuAutoSgnInst, sgnrxBuffer, and sgntxBuffer.

Referenced by ecuAuto_process_loop().

void ecu_auto_addmod_uta ( tint module )

Definition at line 894 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_UTAADDMOD, ecu_AUTO_MOD_ECU, ecu_AUTO_MOD_HYB, ecu_AUTO_MOD_SGN, ecu_AUTO_NUM_HYB_INST, ecu_AUTO_NUM_SGN_INST, ecuAutoHybInst, ecuAutoSgnInst, ecuAutoUtaInst, ecucmd_AUTO_NUM_CMD, and ecuCommands.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_set_defaults ( void )

Definition at line 937 of file ecuauto.c.

References autoBreak, autoCfg, AutoDssMemAddr, AutoDssMemCount, autoErrorId, ecuAutoConfig_t::cache_enable, ecuAutoConfig_t::cache_flush, ecuAutoConfig_t::dss_output, ecu_AUTO_DEF_PCM_FORMAT, ecu_AUTO_DEF_PCM_HOLD_BSIZE, ecu_AUTO_DEF_RIN_FNAME, ecu_AUTO_DEF_ROUT_FNAME, ecu_AUTO_DEF_SIN_FNAME, ecu_AUTO_DEF_SOUT_FNAME, ecu_AUTO_ERR_NONE, ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT, ecu_AUTO_MAX_INST, ecu_auto_print(), ecuAutoEcuInst, ecuAutoFout_t::file_type, ecuAutoConfig_t::get_filter, ecuAutoConfig_t::iteration, outFile, ecuAutoConfig_t::output_rin, ecuAutoConfig_t::output_rout, ecuAutoConfig_t::output_sin, ecuAutoConfig_t::output_sout, ecuAutoFout_t::pcm_format, ecuAutoConfig_t::pcm_hold_sz, ecuAutoConfig_t::sample_bp, ecuAutoConfig_t::sample_cnt, ecuAutoConfig_t::second_cnt, and ecuAutoConfig_t::verbose_print.

Referenced by main().

Here is the call graph for this function:

void lec_auto_initialize ( void )

Definition at line 997 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::cache_enable, ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT, ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_NUM_OUTFILES, ecu_auto_print(), ecu_AUTO_SGN_BUF_SZ, ecu_mem_init_heap(), ecuAutoEcuInst, ecuAutoFrmIndex, ecuAutoFrmRemain, ecuAutoHybInst, ecuAutoSgnInst, ecuAutoUtaInst, ecuAutoFout_t::hold_buf_sz, ecuAutoFout_t::hold_count, outFile, ecuAutoFout_t::output_data, ecuAutoFout_t::output_flush, ecuAutoFout_t::output_mark, ecuAutoConfig_t::output_rin, ecuAutoConfig_t::output_rout, ecuAutoConfig_t::output_sin, ecuAutoConfig_t::output_sout, ecuAutoConfig_t::pcm_hold_sz, ecuAutoFout_t::pcmout_fcn, rinBuffer, routBuffer, sgnrxBuffer, sgntxBuffer, sinBuffer, and soutBuffer.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_init_rxsgn ( void )

Definition at line 1072 of file ecuauto.c.

References ecu_AUTO_DEF_FS, ecu_AUTO_DEF_SGN_AMP1, ecu_AUTO_DEF_SGN_DCOFF, ecu_AUTO_DEF_SGN_DELAY, ecu_AUTO_DEF_SGN_FREQ1, ecu_AUTO_DEF_SGN_NLEVEL, ecu_AUTO_DEF_SGN_NTYPE, ecu_AUTO_DEF_SGN_RX_NSEED, ecu_AUTO_DEF_SGN_SLEVEL, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_AUTO_RXSGN, and ecuAutoSgnInst.

Here is the call graph for this function:

void ecu_auto_init_txsgn ( void )

Definition at line 1117 of file ecuauto.c.

References ecu_AUTO_DEF_FS, ecu_AUTO_DEF_SGN_AMP1, ecu_AUTO_DEF_SGN_DCOFF, ecu_AUTO_DEF_SGN_DELAY, ecu_AUTO_DEF_SGN_FREQ1, ecu_AUTO_DEF_SGN_NLEVEL, ecu_AUTO_DEF_SGN_NTYPE, ecu_AUTO_DEF_SGN_TX_NSEED, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_AUTO_TXSGN, and ecuAutoSgnInst.

Here is the call graph for this function:

void ecu_auto_compand | ( | tint | pcm_format,
 |  | linSample * | in,
 |  | linSample * | out
 | ) |  |

Definition at line 1162 of file ecuauto.c.

References ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_PCM_ALAW, ecu_AUTO_PCM_LIN, ecu_AUTO_PCM_ULAW, and ecuAutoFrameSize.

Referenced by ecuAuto_process_loop().

void ecu_auto_dline_pack | ( | tint | pcm_format,
 |  | linSample * | in,
 |  | tword * | out
 | ) |  |

Definition at line 1203 of file ecuauto.c.

References ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_PCM_ALAW, and ecuAutoFrameSize.

Referenced by ecuAuto_process_loop().

void ecu_auto_dline_unpack | ( | tint | pcm_format,
 |  | tword * | in,
 |  | linSample * | out
 | ) |  |

Definition at line 1225 of file ecuauto.c.

References ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_PCM_ALAW, and ecuAutoFrameSize.

Referenced by ecuAuto_process_loop().

void ecu_auto_sample_cnt ( void )

Definition at line 1256 of file ecuauto.c.

References autoCfg, ecu_AUTO_DEF_FS, ecu_auto_iprint(), ecuAutoFrameSize, ecuAutoConfig_t::sample_bp, ecuAutoConfig_t::sample_cnt, and ecuAutoConfig_t::second_cnt.

Referenced by ecuAuto_process_loop().

Here is the call graph for this function:

void ecu_auto_write_pcm | ( | ecuAutoFout_t * | fout,
 |  | tword * | pcmbuf,
 |  | tint | bufsize
 | ) |  |

Definition at line 1288 of file ecuauto.c.

References autoCfg, AutoDssFileType, AutoDssMemAddr, AutoDssMemCount, AutoDssPcmFormat, ecuAutoConfig_t::dss_output, ecuAutoFout_t::file_type, ecuAutoFout_t::hold_buf, ecuAutoFout_t::hold_buf_sz, ecuAutoFout_t::hold_count, ecuAutoFout_t::output_flush, and ecuAutoFout_t::pcm_format.

Referenced by ecu_auto_output_alaw(), and ecu_auto_output_ulaw().

void ecu_auto_output_ulaw ( void * vfout )

Definition at line 1339 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::dss_output, ecu_AUTO_MARK_SIZE, ecu_AUTO_MAX_FRAME_SZ, ecu_auto_write_pcm(), ecuAutoFrameSize, ecuAutoFout_t::fptr, markBuffer, ecuAutoFout_t::output_data, and ecuAutoFout_t::output_mark.

Referenced by ecuAuto_prep_fout().

Here is the call graph for this function:

void ecu_auto_output_alaw ( void * vfout )

Definition at line 1374 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::dss_output, ecu_AUTO_MARK_SIZE, ecu_AUTO_MAX_FRAME_SZ, ecu_auto_write_pcm(), ecuAutoFrameSize, ecuAutoFout_t::fptr, markBuffer, ecuAutoFout_t::output_data, and ecuAutoFout_t::output_mark.

Referenced by ecuAuto_prep_fout().

Here is the call graph for this function:

void ecu_auto_output_lin ( void * vfout )

Definition at line 1409 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::dss_output, ecu_AUTO_MARK_SIZE, ecuAutoFrameSize, ecuAutoFout_t::fptr, markBuffer, and ecuAutoFout_t::output_mark.

Referenced by ecuAuto_prep_fout().

void ecu_auto_output_pcm | ( | tbool | enable,
 |  | tbool | marker,
 |  | tbool | flush
 | ) |  |

Definition at line 1433 of file ecuauto.c.

References ecu_AUTO_NUM_OUTFILES, outFile, ecuAutoFout_t::output_flush, ecuAutoFout_t::output_mark, and ecuAutoFout_t::pcmout_fcn.

Referenced by ecu_auto_close_fout(), and ecuAuto_process_loop().

void ecu_auto_close_fout ( void )

Definition at line 1460 of file ecuauto.c.

References ecu_AUTO_NUM_OUTFILES, ecu_auto_output_pcm(), ecu_AUTO_PCM_ALAW, ecu_AUTO_PCM_LIN, ecu_AUTO_PCM_ULAW, ecu_AUTO_PRINT_DONE, ecu_auto_sprint(), file_string, ecuAutoFout_t::fname, ecuAutoFout_t::fptr, outFile, ecuAutoFout_t::output_data, and ecuAutoFout_t::pcm_format.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_process_uta ( void )

Definition at line 1510 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_UTACMD, ecu_AUTO_ERR_UTAIDX, ecu_AUTO_ERR_UTAMOD, ecu_AUTO_ERR_UTAOPT, ecu_AUTO_ERR_UTAPROC, ecu_auto_print(), and ecuAutoUtaInst.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_create_uta ( void )

Definition at line 1552 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_UTA_FNAME, ecu_AUTO_ERR_UTAGETSZ, ecu_AUTO_ERR_UTAINIT, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_mem_alloc_align(), and ecuAutoUtaInst.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_create_hyb ( void )

Definition at line 1581 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_HYB_ID, ecu_AUTO_DEF_INIT_PATTERN, ecu_AUTO_ERR, ecu_AUTO_ERR_HYBGETSZ, ecu_AUTO_ERR_HYBNEW, ecu_AUTO_ERR_NUMBUF, ecu_AUTO_MAX_DELAY, ecu_AUTO_MAX_ECOBUFS, ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_MAX_TAIL_LEN, ecu_AUTO_NOERR, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_mem_alloc_eco(), ecuAutoHybInst, ecuMemConfig_t::init_pattern, and ecuMemConfig_t::pre_init_bufs.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_create_sgn ( void ** inst )

Definition at line 1634 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_SGNGETSZ, ecu_auto_print(), ecu_AUTO_PRINT_DONE, and ecu_mem_alloc_align().

Referenced by main().

Here is the call graph for this function:

Variable Documentation

volatile tbool autoBreak

Definition at line 28 of file ecuauto.c.

Referenced by ecu_auto_set_defaults().

ecuAutoErr_e autoErrorId

Definition at line 31 of file ecuauto.c.

Referenced by ecu_auto_check_rc(), and ecu_auto_set_defaults().

tuint ecuVersion = 0

Definition at line 34 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

tuint ecuRevision = 0

Definition at line 35 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

tuint ecuPatch = 0

Definition at line 36 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

tuint ecuBuild = 0

Definition at line 37 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

linSample sgnrxBuffer[ecu_AUTO_SGN_BUF_SZ]

Definition at line 40 of file ecuauto.c.

Referenced by ecu_auto_gen_sgnfrms(), ecuAuto_process_loop(), and lec_auto_initialize().

linSample sgntxBuffer[ecu_AUTO_SGN_BUF_SZ]

Definition at line 41 of file ecuauto.c.

Referenced by ecu_auto_gen_sgnfrms(), ecuAuto_process_loop(), and lec_auto_initialize().

linSample rinBuffer[ecu_AUTO_MAX_FRAME_SZ]

Definition at line 44 of file ecuauto.c.

Referenced by ecuAuto_process_loop(), generate_rx_tone_frame(), lec_auto_initialize(), and main().

linSample sinBuffer[ecu_AUTO_MAX_FRAME_SZ]

Definition at line 45 of file ecuauto.c.

Referenced by ecuAuto_process_loop(), lec_auto_initialize(), and main().

linSample routBuffer[ecu_AUTO_MAX_FRAME_SZ]

Definition at line 46 of file ecuauto.c.

Referenced by ecuAuto_process_loop(), and lec_auto_initialize().

linSample soutBuffer[ecu_AUTO_MAX_FRAME_SZ]

Definition at line 47 of file ecuauto.c.

Referenced by ecuAuto_process_loop(), lec_auto_initialize(), and main().

linSample markBuffer[ecu_AUTO_MARK_SIZE]

Initial value:

 {
  0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x8001, 0x8001, 0x8001, 0x8001,
}

Definition at line 50 of file ecuauto.c.

Referenced by ecu_auto_output_alaw(), ecu_auto_output_lin(), and ecu_auto_output_ulaw().

void* ecuAutoEcuInst[ecu_AUTO_MAX_INST]

Definition at line 55 of file ecuauto.c.

Referenced by ecu_auto_set_defaults(), ecuAuto_close_chn(), ecuAuto_config_chn(), ecuAuto_create_chn(), ecuAuto_delete_chn(), ecuAuto_get_filter(), ecuAuto_open_chn(), ecuAuto_process_loop(), and lec_auto_initialize().

void* ecuAutoSgnInst[2]

Definition at line 56 of file ecuauto.c.

Referenced by ecu_auto_addmod_uta(), ecu_auto_gen_sgnfrms(), ecu_auto_init_rxsgn(), ecu_auto_init_txsgn(), lec_auto_initialize(), and main().

void* ecuAutoHybInst

Definition at line 57 of file ecuauto.c.

Referenced by ecu_auto_addmod_uta(), ecu_auto_create_hyb(), ecuAuto_process_loop(), and lec_auto_initialize().

void* ecuAutoUtaInst

Definition at line 58 of file ecuauto.c.

Referenced by ecu_auto_addmod_uta(), ecu_auto_create_uta(), ecu_auto_process_uta(), and lec_auto_initialize().

ecuAutoFout_t outFile[ecu_AUTO_NUM_OUTFILES]

Definition at line 61 of file ecuauto.c.

Referenced by ecu_auto_close_fout(), ecu_auto_output_pcm(), ecu_auto_set_defaults(), ecuAuto_prep_fout(), ecucmd_output_handler(), and lec_auto_initialize().

tulong AutoDssMemCount

Definition at line 64 of file ecuauto.c.

Referenced by ecu_auto_set_defaults(), and ecu_auto_write_pcm().

tulong AutoDssMemAddr

Definition at line 65 of file ecuauto.c.

Referenced by ecu_auto_set_defaults(), and ecu_auto_write_pcm().

tint AutoDssFileType

Definition at line 66 of file ecuauto.c.

Referenced by ecu_auto_write_pcm().

tint AutoDssPcmFormat

Definition at line 67 of file ecuauto.c.

Referenced by ecu_auto_write_pcm().

char file_string[ecu_AUTO_MAX_STRING]

Definition at line 70 of file ecuauto.c.

Referenced by ecu_auto_close_fout(), and ecuAuto_prep_fout().

char print_string[ecu_AUTO_MAX_STRING]

Definition at line 71 of file ecuauto.c.

Referenced by ecu_auto_iprint(), and ecu_auto_sprint().

tint ecuAutoFrameSize

Definition at line 74 of file ecuauto.c.

Referenced by ecu_auto_compand(), ecu_auto_dline_pack(), ecu_auto_dline_unpack(), ecu_auto_gen_sgnfrms(), ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), ecu_auto_sample_cnt(), ecuAuto_open_chn(), and ecuAuto_process_loop().

tint ecuAutoFrmIndex

Definition at line 77 of file ecuauto.c.

Referenced by ecu_auto_gen_sgnfrms(), ecuAuto_process_loop(), and lec_auto_initialize().

tint ecuAutoFrmRemain

Definition at line 78 of file ecuauto.c.

Referenced by ecu_auto_gen_sgnfrms(), ecuAuto_process_loop(), and lec_auto_initialize().

ecuAutoConfig_t ecuAutoConfig

Definition at line 81 of file ecuauto.c.

ecuAutoConfig_t* autoCfg = &ecuAutoConfig

Definition at line 82 of file ecuauto.c.

Referenced by ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), ecu_auto_print(), ecu_auto_sample_cnt(), ecu_auto_set_defaults(), ecu_auto_write_pcm(), ecuAuto_process_loop(), and lec_auto_initialize().

ecuContext_t ecuContext

Initial value:

 {
  (vfnptr) ecu_auto_exception,
  (void *) NULL,
  (void *) NULL,
  (void *) NULL,
  (void *) NULL,
  (void *) NULL,
  ecu_AUTO_MAX_FRAME_SZ,
  ecu_AUTO_MAX_TAIL_LEN,
  ecu_AUTO_MAX_SEG_LEN,
  ecu_AUTO_MAX_SEG_NUM,
  ecu_AUTO_MAX_DELAY,
  0L,
  NULL,
  NULL,
  NULL,
}

Definition at line 85 of file ecuauto.c.


ECU Test: ecuauto.c Source File

  • File List
  • Globals

ecuauto.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: ECU Automation.
00003  ******************************************************************************
00004  * FILE NAME:   ecuauto
00005  *
00006  * DESCRIPTION: Contains ECU Automation Code
00007  *
00008  * (C) Copyright 2009 Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 /* ECU component and simulation headers */
00012 #include <ti/mas/ecu/ecu.h>
00013 #include <ti/mas/sdk/src/sgnuta.h>
00014 #include <ti/mas/sdk/src/hybuta.h>
00015 #include <ti/mas/ecu/test/src/ecuauto.h>
00016 #include <ti/mas/ecu/test/src/ecuautoport.h>
00017 #include <ti/mas/ecu/test/src/ecumem.h>
00018 #include <ti/mas/ecu/test/src/ecuuta.h>
00019
00020 /* RTSC component headers */
00021 #include <ti/mas/sdk/uta.h>
00022 #include <ti/mas/sdk/sgn.h>
00023 #include <ti/mas/sdk/hyb.h>
00024 #include <ti/mas/sdk/memarchcfg.h>
00025
00026
00027 /* Global booleans */
00028 volatile tbool autoBreak;
00029
00030 /* Global eror code */
00031 ecuAutoErr_e autoErrorId;
00032
00033 /* Global Engine version */
00034 tuint ecuVersion  = 0;
00035 tuint ecuRevision = 0;
00036 tuint ecuPatch    = 0;
00037 tuint ecuBuild    = 0;
00038
00039 /* SGN simulation buffers/indices */
00040 linSample sgnrxBuffer[ecu_AUTO_SGN_BUF_SZ];
00041 linSample sgntxBuffer[ecu_AUTO_SGN_BUF_SZ];
00042
00043 /* ECU simulation buffers */
00044 linSample rinBuffer  [ecu_AUTO_MAX_FRAME_SZ];
00045 linSample sinBuffer  [ecu_AUTO_MAX_FRAME_SZ];
00046 linSample routBuffer [ecu_AUTO_MAX_FRAME_SZ];
00047 linSample soutBuffer [ecu_AUTO_MAX_FRAME_SZ];
00048
00049 /* Marker buffer */
00050 linSample markBuffer [ecu_AUTO_MARK_SIZE] = {
00051   0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x8001, 0x8001, 0x8001, 0x8001,
00052 };
00053
00054 /* Module pointers */
00055 void *ecuAutoEcuInst[ecu_AUTO_MAX_INST]; /* ECU Channel instance pointers */
00056 void *ecuAutoSgnInst[2];  /* RX/TX path signal generator instance pointers */
00057 void *ecuAutoHybInst;     /* Hybrid simulation instance pointer */
00058 void *ecuAutoUtaInst;     /* Unit Test automation instance pointer */
00059
00060 /* File output structure array */
00061 ecuAutoFout_t outFile[ecu_AUTO_NUM_OUTFILES];
00062
00063 /* Memory read globals */
00064 tulong AutoDssMemCount;
00065 tulong AutoDssMemAddr;
00066 tint   AutoDssFileType;
00067 tint   AutoDssPcmFormat;
00068
00069 /* Global string for logfile printing */
00070 char file_string [ecu_AUTO_MAX_STRING];
00071 char print_string[ecu_AUTO_MAX_STRING];
00072
00073 /* Globals that are initialized on Engine creation */
00074 tint ecuAutoFrameSize;
00075
00076 /* Globals used for SGN frame handling */
00077 tint ecuAutoFrmIndex;
00078 tint ecuAutoFrmRemain;
00079
00080 /* Automation configuration structure & pointer */
00081 ecuAutoConfig_t ecuAutoConfig;
00082 ecuAutoConfig_t *autoCfg = &ecuAutoConfig;
00083
00084 /* ECU Context declaration */
00085 ecuContext_t ecuContext = {
00086   (vfnptr) ecu_auto_exception, /* Exception handler         */
00087   (void *) NULL,            /* Debug streaming handler      */
00088   (void *) NULL,            /* MIPS Agent event handler     */
00089   (void *) NULL,            /* Search preparation handler   */
00090   (void *) NULL,            /* Send out function pointer    */
00091   (void *) NULL,            /* Receive out function pointer */
00092   ecu_AUTO_MAX_FRAME_SZ,    /* Maximum samples per frame    */
00093   ecu_AUTO_MAX_TAIL_LEN,    /* Maximum filter length (taps) */
00094   ecu_AUTO_MAX_SEG_LEN,     /* Maximum segmnt length (taps) */
00095   ecu_AUTO_MAX_SEG_NUM,     /* Maximum filter segments      */
00096   ecu_AUTO_MAX_DELAY,       /* Maximum sys delay (samples)  */
00097   0L,                       /* Delay line expansion BF      */
00098   NULL,                     /* Scratch delay line base      */
00099   NULL,                     /* Scratch delay line pointer   */
00100   NULL,                     /* Packed delay line pointer    */
00101 };
00102
00103
00104 /*-----------------------------------------------------------------
00105  * Function:  ecu_auto_exception
00106  *
00107  * Description: Exception function for automation.
00108  *-----------------------------------------------------------------*/
00109 void ecu_auto_exception (tuint id, tuint type, tuint code, tuint length, tuint *data)
00110 {
00111   printf ("EXC-m:%d-ch:%d, Type: %d, Code: %d\n", id >> 8, id & 0x00FF, type, code);
00112   utaBreakPoint ();
00113 }
00114
00115
00116 /*-----------------------------------------------------------------
00117  * Function:  ecu_auto_print
00118  *
00119  * Description: Utility to provide static progress information.
00120  *-----------------------------------------------------------------*/
00121 void ecu_auto_print (char *str)
00122 {
00123   if (autoCfg->verbose_print) printf (str);
00124 }
00125
00126
00127 /*-----------------------------------------------------------------
00128  * Function:  ecu_auto_iprint
00129  *
00130  * Description: Utility to provide integer progress information.
00131  *-----------------------------------------------------------------*/
00132 void ecu_auto_iprint (char *str, ECU_AUTO_ITYPE ivar)
00133 {
00134   sprintf (print_string, str, ivar);
00135   ecu_auto_print (print_string);
00136 }
00137
00138
00139 /*-----------------------------------------------------------------
00140  * Function:  ecu_auto_sprint
00141  *
00142  * Description: Utility to provide string progress information.
00143  *-----------------------------------------------------------------*/
00144 void ecu_auto_sprint (char *str, char *svar)
00145 {
00146   sprintf (print_string, str, svar);
00147   ecu_auto_print (print_string);
00148 }
00149
00150
00151 /*-----------------------------------------------------------------
00152  * Function:  ecu_auto_banner_print
00153  *
00154  * Description: Utility to provide major progress information.
00155  *-----------------------------------------------------------------*/
00156 void ecu_auto_banner_print (char *str, ECU_AUTO_ITYPE ivar)
00157 {
00158   ecu_auto_print  ("\n");
00159   ecu_auto_print  ("------------------------------\n");
00160   ecu_auto_iprint (str, ivar);
00161   ecu_auto_print  ("------------------------------\n");
00162 }
00163
00164
00165 /*-----------------------------------------------------------------
00166  * Function:  ecu_auto_check_rc
00167  *
00168  * Description: Check return code for failure.
00169  *-----------------------------------------------------------------*/
00170 void ecu_auto_check_rc (ecuAutoErr_e id, tuint rc, tuint pass_code)
00171 {
00172   /* Wait forever */
00173   if (rc != pass_code) {
00174     /* Set ID for quick identifcation */
00175     autoErrorId = id;
00176     ecu_auto_iprint ("\nERROR Bad Return Code: 0x%4x\n\n", (tlong) id);
00177     utaBreakPoint ();
00178   }
00179 }
00180
00181
00182
00183 /*-----------------------------------------------------------------
00184  * Filename:  main
00185  *
00186  * Description: Automated ECU test
00187  *-----------------------------------------------------------------*/
00188 void main ()
00189 {
00190   /* Automation default settings */
00191   ecu_auto_set_defaults ();
00192
00193   /* Automation initialization */
00194   lec_auto_initialize ();
00195
00196   /* Progress (verbose only) */
00197   ecu_auto_banner_print ("Automation:  BEGIN\n",0);
00198
00199   /* Hybrid simulation creation */
00200   ecu_auto_create_hyb ();
00201
00202   /* RX/TX Signal generator creation */
00203   ecu_auto_create_sgn (&ecuAutoSgnInst[ecu_AUTO_RXSGN]);
00204   ecu_auto_create_sgn (&ecuAutoSgnInst[ecu_AUTO_TXSGN]);
00205
00206   /* Unit Test Automation instance creation */
00207   ecu_auto_create_uta ();
00208
00209   /* Add ECU module */
00210   ecu_auto_addmod_uta (ecu_AUTO_MOD_ECU);
00211
00212   /* Add SGN module */
00213   ecu_auto_addmod_uta (ecu_AUTO_MOD_SGN);
00214
00215   /* Add HYB module */
00216   ecu_auto_addmod_uta (ecu_AUTO_MOD_HYB);
00217
00218   /* Run the TDF script "test.tdf" */
00219   ecu_auto_process_uta ();
00220
00221   /* Close all (active) output files */
00222   ecu_auto_close_fout ();
00223
00224   /* Progress (verbose only) */
00225   ecu_auto_banner_print ("Automation:  END\n",0);
00226
00227   /* Halt at the end */
00228   utaBreakPoint ();
00229 }
00230
00231
00232
00233 /******************************************************************************/
00234 /******************************************************************************
00235  **   EXTERNAL API FUNCTIONS  (ecuAuto_...)
00236  ******************************************************************************/
00237 /******************************************************************************/
00238
00239 /*-----------------------------------------------------------------
00240  * Function:  ecuAuto_process_loop
00241  *
00242  * Description: ECU simulation core loop.
00243  *-----------------------------------------------------------------*/
00244 void ecuAuto_process_loop (ecuAutoLoopCfg_t *cfg)
00245 {
00246   tlong rem_samples;
00247   void *inst = ecuAutoEcuInst[cfg->chn_index];
00248   tint  ret_code;
00249
00250   /* Set local values */
00251   rem_samples = cfg->time_ms * ecu_AUTO_SAMP_PER_MS;
00252
00253   /* Progress (verbose only) */
00254   ecu_auto_banner_print ("Loop Iteration %d: BEGIN\n", autoCfg->iteration);
00255
00256   /* Check for pre-marker */
00257   if (cfg->marker == ecu_AUTO_MRK_PRE) {
00258     ecu_auto_output_pcm (cfg->enable_out, TRUE, FALSE);
00259   }
00260
00261   while (rem_samples >= ecuAutoFrameSize) {
00262     /* Generate SGN RX/TX frames as required */
00263     ecu_auto_gen_sgnfrms ();
00264
00265     /* Compress/expand RX samples */
00266     ecu_auto_compand (cfg->pcm_format, &sgnrxBuffer[ecuAutoFrmIndex], rinBuffer);
00267
00268     /* Copy TX samples to Sin buffer */
00269     memcpy ((void *) sinBuffer, (void *) &sgntxBuffer[ecuAutoFrmIndex],
00270             ecuAutoFrameSize * sizeof(linSample)/sizeof(tword));
00271
00272     /* Add echo to Sin samples */
00273     ret_code = hybAddEcho (ecuAutoHybInst, (void *) sinBuffer, (void *) routBuffer);
00274     ecu_auto_check_rc (ecu_AUTO_ERR_HYBECHO, ret_code, hyb_NOERR);
00275
00276     /* Compress/expand TX samples */
00277     ecu_auto_compand (cfg->pcm_format, sinBuffer, sinBuffer);
00278
00279     /* Flush cache (if configured) */
00280     if (autoCfg->cache_flush) {
00281       memarchcfg_cacheFlush ();
00282     }
00283
00284     /* Handle delay line compression */
00285 #if ecu_DELAY_LINE_COMPRESS
00286     ecu_auto_dline_pack (cfg->pcm_format, rinBuffer, (tword *) rinBuffer);
00287 #endif
00288
00289     /* ECU receive-path processing */
00290     ecuReceiveIn (inst, (void *) routBuffer);
00291
00292     /* ECU send-path processing */
00293     ecuSendIn (inst, (void *) sinBuffer, (void *) rinBuffer, (void *) soutBuffer);
00294
00295     /* Handle delay line compression */
00296 #if ecu_DELAY_LINE_COMPRESS
00297     ecu_auto_dline_unpack (cfg->pcm_format, (tword *) rinBuffer, rinBuffer);
00298 #endif
00299
00300     /* Output buffer data to FILE */
00301     ecu_auto_output_pcm (cfg->enable_out, FALSE, FALSE);
00302
00303     /* Copy RX samples to Rout buffer (delayed to incur frame Y2X delay) */
00304     memcpy ((void *) routBuffer, (void *) rinBuffer,
00305             ecuAutoFrameSize * sizeof(linSample)/sizeof(tword));
00306
00307     /* Sample count and Breakpoint check */
00308     ecu_auto_sample_cnt ();
00309
00310     /* Update indices and counts */
00311     ecuAutoFrmIndex  += ecuAutoFrameSize;
00312     ecuAutoFrmRemain -= ecuAutoFrameSize;
00313     rem_samples      -= ecuAutoFrameSize;
00314   } /* End of loop */
00315
00316   /* Check for post-marker */
00317   if (cfg->marker == ecu_AUTO_MRK_POST) {
00318     ecu_auto_output_pcm (cfg->enable_out, TRUE, FALSE);
00319   }
00320
00321   /* Progress (verbose only) */
00322   ecu_auto_banner_print ("Loop Iteration %d: END\n", autoCfg->iteration++);
00323 }
00324
00325
00326 /*-----------------------------------------------------------------
00327  * Function:  ecuAuto_prep_fout
00328  *
00329  * Description: Automation PCM data output initialization.
00330  *-----------------------------------------------------------------*/
00331 void ecuAuto_prep_fout (void)
00332 {
00333   ecuAutoFout_t *fout;
00334   tint i;
00335
00336   for (i=0; i<ecu_AUTO_NUM_OUTFILES; i++) {
00337     /* Get file output pointer */
00338     fout = &outFile[i];
00339
00340     /* Check if file is already opened (first close) */
00341     if (fout->fptr != (FILE *) NULL) {
00342       fclose (fout->fptr);
00343       fout->fptr = (FILE *) NULL;
00344     }
00345
00346     /* Prepare for File IO (IF triggered) */
00347     if (!fout->output_data) continue;
00348
00349     /* Create file path string */
00350     strcpy (file_string, fout->fname);
00351
00352     /* Progress report */
00353     ecu_auto_sprint ("Opening file: %s for output...", file_string);
00354
00355     /* Add appropriate extension and set output function pointer */
00356     switch (fout->pcm_format) {
00357     case ecu_AUTO_PCM_ULAW:
00358       strcat (file_string, ".ula");
00359       fout->pcmout_fcn = ecu_auto_output_ulaw;
00360       break;
00361     case ecu_AUTO_PCM_ALAW:
00362       strcat (file_string, ".ala");
00363       fout->pcmout_fcn = ecu_auto_output_alaw;
00364       break;
00365     case ecu_AUTO_PCM_LIN:
00366       strcat (file_string, ".pcm");
00367       fout->pcmout_fcn = ecu_auto_output_lin;
00368       break;
00369     }
00370
00371     /* Allocate PCM hold buffer memory */
00372     fout->hold_buf = (tword *) ecu_mem_alloc_align (autoCfg->pcm_hold_sz, 4, ecu_AUTO_FIO_MEM);
00373
00374     /* Open file (write binary) and check for error */
00375     /* Open file (write binary) and check for error (if using file I/O) */
00376     if (!autoCfg->dss_output) {
00377       if ((fout->fptr = fopen (file_string, "wb")) == (FILE *) NULL) {
00378         ecu_auto_sprint ("Unable to open file: %s\n", file_string);
00379         fout->output_data = FALSE;
00380       }
00381       else {
00382         /* Progress (verbose only) */
00383         ecu_AUTO_PRINT_DONE ();
00384       }
00385     }
00386   }
00387 }
00388
00389
00390 /*-----------------------------------------------------------------
00391  * Function:  ecuAuto_create_chn
00392  *
00393  * Description: ECU Channel instantiation.
00394  *-----------------------------------------------------------------*/
00395 tuint ecuAuto_create_chn (tint index, ecuNewConfig_t *ncfg, ecuMemConfig_t *mcfg)
00396 {
00397   const ecomemBuffer_t *sizeBufs;
00398   ecomemBuffer_t  ecuBufs[ecu_AUTO_MAX_ECOBUFS];
00399   tint ret_code;
00400   tint nbufs;
00401
00402   /* Check that the channel is free and the index is within bounds */
00403   if ((ecuAutoEcuInst[index] != (void *) NULL) || (index >= ecu_AUTO_MAX_INST)) {
00404     return (ecu_AUTO_ERR_CREATECHN);
00405   }
00406
00407   /* Progress (verbose only) */
00408   ecu_auto_iprint ("Instantiating ECU Channel %d ...\n", index);
00409
00410   /* Get ECU Channel buffer requirements and ensure #buffers within limits */
00411   ret_code = ecuGetSizes (&nbufs, &sizeBufs, (void *) NULL);
00412   ecu_auto_check_rc (ecu_AUTO_ERR_ECUGETSZ, ret_code, ecu_NOERR);
00413   ret_code = (nbufs > ecu_AUTO_MAX_ECOBUFS) ? ecu_AUTO_ERR : ecu_AUTO_NOERR;
00414   ecu_auto_check_rc (ecu_AUTO_ERR_NUMBUF, ret_code, ecu_AUTO_NOERR);
00415
00416   /* Allocate buffers */
00417   ecu_mem_alloc_eco (nbufs, sizeBufs, ecuBufs, mcfg, ecu_AUTO_ECO_MEM);
00418
00419   /* Create (NEW) ECU instance */
00420   ret_code = ecuNew (&ecuAutoEcuInst[index], nbufs, ecuBufs, ncfg);
00421   ecu_auto_check_rc (ecu_AUTO_ERR_ECUNEW, ret_code, ecu_NOERR);
00422
00423   /* Progress (verbose only) */
00424   ecu_AUTO_PRINT_DONE ();
00425
00426   /* Return success */
00427   return (ecu_AUTO_NOERR);
00428 }
00429
00430
00431 /*-----------------------------------------------------------------
00432  * Function:  ecuAuto_open_chn
00433  *
00434  * Description: ECU Channel open.
00435  *-----------------------------------------------------------------*/
00436 tuint ecuAuto_open_chn (tint index, ecuConfig_t *cfg)
00437 {
00438   /* Check that the channel is free and the index is within bounds */
00439   if ((ecuAutoEcuInst[index] == (void *) NULL) || (index >= ecu_AUTO_MAX_INST)) {
00440     return (ecu_AUTO_ERR_OPENCHN);
00441   }
00442
00443   /* Set globals that are used throught and cannot be changed */
00444   ecuAutoFrameSize  = cfg->samples_per_frame;
00445
00446   /* Progress (verbose only) */
00447   ecu_auto_iprint ("Opening ECU Channel: %d\n", index);
00448
00449   /* Open ECU channel */
00450   ecuOpen (ecuAutoEcuInst[index], cfg);
00451
00452   /* Display ECU version information (once) */
00453   if (ecuVersion + ecuRevision + ecuPatch + ecuBuild == 0) {
00454     ecuVersion_t ver;
00455     union {
00456       ecuPerform_t    perf;
00457       ecuUpdateStat_t ustat;
00458       LFract noise;
00459       Fract  rerl;
00460       tint   tail;
00461       tint   bfield[2];
00462     } u;
00463
00464     /* Read version from Instance */
00465     ecuGetPerformance (ecuAutoEcuInst[index], u.bfield, &ver, &u.perf, &u.ustat,
00466                        &u.noise, &u.noise, &u.rerl, &u.tail, FALSE);
00467
00468     /* Set global version information */
00469     ecuVersion  = ver.version;
00470     ecuRevision = ver.revision;
00471     ecuPatch    = ver.patch;
00472     ecuBuild    = ver.build;
00473
00474     /* Display ECU version information */
00475     ecu_auto_print ("\n-----------------------------------\n");
00476     ecu_auto_iprint ("ECU Version: %d.", (tlong) ecuVersion);
00477     ecu_auto_iprint ("%d.",              (tlong) ecuRevision);
00478     ecu_auto_iprint ("%d" ,              (tlong) ecuPatch);
00479     ecu_auto_iprint ("%d.",              (tlong) ecuBuild);
00480     ecu_auto_print ("\n-----------------------------------\n");
00481
00482     /* Display TEC compile-time features */
00483     ecu_auto_print ("Compiled Features:\n");
00484     if (ver.feature & ecu_VERF_MULTISEGMENT)
00485       ecu_auto_print (" - Multiple segment support\n");
00486     if (ver.feature & ecu_VERF_5P5MS_FRAME)
00487       ecu_auto_print (" - 5.5ms frame (AAL1/AAL2) support\n");
00488     if (ver.feature & ecu_VERF_DLINE_COMPRESS)
00489       ecu_auto_print (" - Delay line compression\n");
00490     if (ver.feature & ecu_VERF_03DB_CONFIG)
00491       ecu_auto_print (" - 0/3dB ERL support\n");
00492     if (ver.feature & ecu_VERF_CONST_PCM_DETECT)
00493       ecu_auto_print (" - Constant PCM detection\n");
00494     if (ver.feature & ecu_VERF_INST_RELOCATION)
00495       ecu_auto_print (" - Instance relocation\n");
00496     if (ver.feature & ecu_VERF_RERL_ESTIMATE)
00497       ecu_auto_print (" - RERL estimation\n");
00498     if (ver.feature & ecu_VERF_WIDE_BAND)
00499       ecu_auto_print (" - Wide-band support\n");
00500     ecu_auto_print ("-----------------------------------\n\n");
00501   }
00502
00503   /* Progress (verbose only) */
00504   ecu_AUTO_PRINT_DONE ();
00505
00506   /* Return success */
00507   return (ecu_AUTO_NOERR);
00508 }
00509
00510
00511 /*-----------------------------------------------------------------
00512  * Function:  ecuAuto_config_chn
00513  *
00514  * Description: ECU Channel configuration.
00515  *-----------------------------------------------------------------*/
00516 tuint ecuAuto_config_chn (tint index, ecuChnConfig_t *cfg)
00517 {
00518   ecuControl_t ctl;
00519   union {
00520     ecuVersion_t    ver;
00521     ecuPerform_t    perf;
00522     ecuUpdateStat_t ustat;
00523     LFract noise;
00524     Fract  rerl;
00525   } u;
00526   tint  bfield[2];
00527   tint  tail;
00528   tint  min_erl;
00529   tbool fixed_cng;
00530   tint  ret_code;
00531
00532   /* Check that the channel is open and the index is within bounds */
00533   if ((ecuAutoEcuInst[index] == (void *) NULL) || (index >= ecu_AUTO_MAX_INST)) {
00534     return (ecu_AUTO_ERR_CONFIGCHN);
00535   }
00536
00537   /* Get the current ECU state and initialize the control structure w*/
00538   ecuGetPerformance (ecuAutoEcuInst[index], bfield, &u.ver, &u.perf, &u.ustat,
00539                      &u.noise, &u.noise, &u.rerl, &tail, FALSE);
00540   ctl.ctl_code = ecu_CTL_MASK;
00541   ctl.u.ctl_mask[0] = 0;
00542   ctl.u.ctl_mask[1] = 0;
00543   fixed_cng         = TRUE;
00544
00545   /* Progress (verbose only) */
00546   ecu_auto_iprint ("Current ECU State [0]: 0x%04x\n", (tuint) bfield[0]);
00547   ecu_auto_iprint ("                  [1]: 0x%04x\n", (tuint) bfield[1]);
00548
00549   /* Translate current ECU state to ECU control structure */
00550   if (bfield[0] & ecu_CTRL0_BIT_ENABLE_EC) {
00551     ctl.u.ctl_mask[0] |= ecu_ENABLE_ECHO_CANCELLER;
00552   }
00553   if (bfield[0] & ecu_CTRL0_BIT_USE_NLP) {
00554     ctl.u.ctl_mask[0] |= ecu_ENABLE_NLP;
00555   }
00556   if (bfield[0] & ecu_CTRL0_BIT_NLP_ADAPT) {
00557     ctl.u.ctl_mask[0] |= ecu_ENABLE_CNG_ADAPT;
00558     fixed_cng = FALSE;
00559   }
00560   if (!(bfield[0] & ecu_CTRL0_BIT_FREEZE_EC)) {
00561     ctl.u.ctl_mask[0] |= ecu_ENABLE_UPDATE;
00562   }
00563   if (!(bfield[0] & ecu_CTRL0_BIT_NO_SEARCH)) {
00564     ctl.u.ctl_mask[0] |= ecu_ENABLE_SEARCH;
00565   }
00566   if (bfield[0] & ecu_CTRL0_BIT_OPNLP_EN) {
00567     ctl.u.ctl_mask[0] |= ecu_ENABLE_OPNLP_DETECT;
00568   }
00569   if (!(bfield[0] & ecu_CTRL0_BIT_DEMEAN_EN)) {
00570     ctl.u.ctl_mask[0] |= ecu_DISABLE_DEMEANING;
00571   }
00572   if (bfield[1] & ecu_CTRL1_BIT_NLP_NORM_LEV) {
00573     ctl.u.ctl_mask[0] |= ecu_NLP_NORMAL_LEVEL;
00574   }
00575   if (bfield[1] & ecu_CTRL1_BIT_NLP_PHASE_RND_EN) {
00576     ctl.u.ctl_mask[1] |= ecu_ENABLE_NLP_PHASE_RND;
00577   }
00578   if (bfield[1] & ecu_CTRL1_CPD_DETECT_EN) {
00579     ctl.u.ctl_mask[1] |= ecu_ENABLE_CPD_DETECT;
00580   }
00581   if (bfield[1] & ecu_CTRL1_ECP_CHG_DETECT_EN) {
00582     ctl.u.ctl_mask[1] |= ecu_ENABLE_ECP_CHG_DETECT;
00583   }
00584   if (bfield[1] & ecu_CTRL1_0DB_CONFIG) {
00585     ctl.u.ctl_mask[1] |= ecu_ERL_CONFIG_BIT_1;
00586   }
00587   if (bfield[1] & ecu_CTRL1_3DB_CONFIG) {
00588     ctl.u.ctl_mask[1] |= ecu_ERL_CONFIG_BIT_0;
00589   }
00590
00591   /* Progress (verbose only) */
00592   ecu_auto_iprint ("\nConfiguring ECU Channel: %d ...\n", index);
00593
00594   /* NLP configuration change */
00595   if (cfg->valid_bitfield & ecu_AUTO_CHCFG_NLP_VALID) {
00596     switch (cfg->nlp_mode) {
00597       case ecu_AUTO_NLP_OFF:
00598         ctl.u.ctl_mask[0] &= ~ecu_ENABLE_NLP;
00599         ecu_auto_print (" - NLP Configuration: OFF\n");
00600         break;
00601       case ecu_AUTO_NLP_ON:
00602         fixed_cng = TRUE;
00603         ctl.u.ctl_mask[0] |= ecu_ENABLE_NLP;
00604         ecu_auto_print (" NLP Configuration: ON\n");
00605         ctl.u.ctl_mask[0] &= ~ecu_ENABLE_CNG_ADAPT;
00606         ecu_auto_print (" - CNG Configuration: OFF\n");
00607         break;
00608       case ecu_AUTO_NLP_CNG_ON:
00609         fixed_cng = FALSE;
00610         ctl.u.ctl_mask[0] |= ecu_ENABLE_NLP;
00611         ecu_auto_print (" - NLP Configuration: ON\n");
00612         ctl.u.ctl_mask[0] |= ecu_ENABLE_CNG_ADAPT;
00613         ecu_auto_print (" - CNG Configuration: ON\n");
00614         break;
00615       default:
00616         return (ecu_AUTO_ERR);
00617     }
00618   }
00619
00620   /* Minimum ERL configuration change */
00621   if (cfg->valid_bitfield & ecu_AUTO_CHCFG_ERL_VALID) {
00622     switch (cfg->min_erl) {
00623       case ecu_AUTO_ERL_6DB:
00624         ctl.u.ctl_mask[1] &= ~ecu_ERL_CONFIG_BIT_1;
00625         ctl.u.ctl_mask[1] &= ~ecu_ERL_CONFIG_BIT_0;
00626         min_erl = 6;
00627         break;
00628       case ecu_AUTO_ERL_3DB:
00629         ctl.u.ctl_mask[1] &= ~ecu_ERL_CONFIG_BIT_1;
00630         ctl.u.ctl_mask[1] |=  ecu_ERL_CONFIG_BIT_0;
00631         min_erl = 3;
00632         break;
00633       case ecu_AUTO_ERL_0DB:
00634         ctl.u.ctl_mask[1] |=  ecu_ERL_CONFIG_BIT_1;
00635         ctl.u.ctl_mask[1] &= ~ecu_ERL_CONFIG_BIT_0;
00636         min_erl = 0;
00637         break;
00638       default:
00639         return (ecu_AUTO_ERR);
00640     }
00641     ecu_auto_iprint (" Minimum ERL: %d dB\n", (tuint) min_erl);
00642   }
00643
00644   /* Bypass (OFF) configuration change */
00645   if (cfg->valid_bitfield & ecu_AUTO_CHCFG_BYP_VALID) {
00646     if (cfg->bypass) {
00647       ctl.u.ctl_mask[0] &= ~ecu_ENABLE_ECHO_CANCELLER;
00648       ecu_auto_print (" - ECU Bypass: ON\n");
00649     }
00650     else {
00651       ctl.u.ctl_mask[0] |= ecu_ENABLE_ECHO_CANCELLER;
00652       ecu_auto_print (" - ECU Bypass: OFF\n");
00653     }
00654   }
00655
00656   /* H-register hold configuration change */
00657   if (cfg->valid_bitfield & ecu_AUTO_CHCFG_HLD_VALID) {
00658     if (cfg->hreg_hold) {
00659       ctl.u.ctl_mask[0] &= ~ecu_ENABLE_UPDATE;
00660       if (tail >= ecu_AUTO_MIN_SEARCH) {
00661         ctl.u.ctl_mask[0] &= ~ecu_ENABLE_SEARCH;
00662       }
00663       ecu_auto_print (" - H-register Hold: ON\n");
00664     }
00665     else {
00666       ctl.u.ctl_mask[0] |= ecu_ENABLE_UPDATE;
00667       if (tail >= ecu_AUTO_MIN_SEARCH) {
00668         ctl.u.ctl_mask[0] |= ecu_ENABLE_SEARCH;
00669       }
00670       ecu_auto_print (" - H-register Hold: OFF\n");
00671     }
00672   }
00673
00674   /* H-register clear request */
00675   if (cfg->valid_bitfield & ecu_AUTO_CHCFG_CLR_VALID) {
00676     if (cfg->hreg_clear) {
00677       ctl.u.ctl_mask[0] |= ecu_CLEAR_FG;
00678       ctl.u.ctl_mask[0] |= ecu_CLEAR_BG;
00679       if (tail >= ecu_AUTO_MIN_SEARCH) {
00680         ctl.u.ctl_mask[0] |= ecu_CLEAR_SEARCH;
00681       }
00682       ecu_auto_print (" - H-register Cleared\n");
00683     }
00684   }
00685
00686   /* Configure the ECU instance */
00687   ret_code = ecuControl (ecuAutoEcuInst[index], &ctl);
00688   ecu_auto_check_rc (ecu_AUTO_ERR_ECUCONTROL, ret_code, ecu_NOERR);
00689
00690   /* Set fixed CNG level to lowest possible (-70dBm0) */
00691   if (fixed_cng) {
00692     ctl.ctl_code = ecu_CTL_FIXED_NOISE_LEVEL;
00693     ctl.u.n_level = -70;
00694     ret_code = ecuControl (ecuAutoEcuInst[index], &ctl);
00695     ecu_auto_check_rc (ecu_AUTO_ERR_ECUCONTROL, ret_code, ecu_NOERR);
00696   }
00697
00698   /* Get the current ECU state and initialize the control structure */
00699   ecuGetPerformance (ecuAutoEcuInst[index], bfield, &u.ver, &u.perf, &u.ustat,
00700                      &u.noise, &u.noise, &u.rerl, &tail, FALSE);
00701
00702   /* Progress (verbose only) */
00703   ecu_auto_iprint ("\nNew ECU State [0]: 0x%04x\n", bfield[0]);
00704   ecu_auto_iprint ("              [1]: 0x%04x\n", bfield[1]);
00705
00706   /* Progress (verbose only) */
00707   ecu_AUTO_PRINT_DONE ();
00708
00709   /* Return success */
00710   return (ecu_AUTO_NOERR);
00711 }
00712
00713
00714 /*-----------------------------------------------------------------
00715  * Function:  ecuAuto_close_chn
00716  *
00717  * Description: ECU Channel close.
00718  *-----------------------------------------------------------------*/
00719 tuint ecuAuto_close_chn (tint index)
00720 {
00721   /* Check that the channel is open and the index is within bounds */
00722   if ((ecuAutoEcuInst[index] == (void *) NULL) || (index >= ecu_AUTO_MAX_INST)) {
00723     return (ecu_AUTO_ERR_CLOSECHN);
00724   }
00725
00726   /* Progress (verbose only) */
00727   ecu_auto_iprint ("Closing ECU Channel: %d ...\n", index);
00728
00729   /* Close the ECU channel */
00730   ecuClose (ecuAutoEcuInst[index]);
00731
00732   /* Progress (verbose only) */
00733   ecu_AUTO_PRINT_DONE ();
00734
00735   /* Return success */
00736   return (ecu_AUTO_NOERR);
00737 }
00738
00739
00740 /*-----------------------------------------------------------------
00741  * Function:  ecuAuto_delete_chn
00742  *
00743  * Description: ECU Channel destruction.
00744  *-----------------------------------------------------------------*/
00745 tuint ecuAuto_delete_chn (tint index)
00746 {
00747   /* Check that the channel is not already deleted and the index is within bounds */
00748   if ((ecuAutoEcuInst[index] == (void *) NULL) || (index >= ecu_AUTO_MAX_INST)) {
00749     return (ecu_AUTO_ERR_DELETECHN);
00750   }
00751
00752   /* Progress (verbose only) */
00753   ecu_auto_iprint ("Deleting ECU Channel: %d ...\n", index);
00754
00755   /* Officially delete the ECU instance */
00756   ecuDelete (&ecuAutoEcuInst[index], 0, (ecomemBuffer_t *) NULL);
00757
00758   /* Progress (verbose only) */
00759   ecu_AUTO_PRINT_DONE ();
00760
00761   /* Return success */
00762   return (ecu_AUTO_NOERR);
00763 }
00764
00765
00766 /*-----------------------------------------------------------------
00767  * Function:  ecuAuto_get_filter
00768  *
00769  * Description: ECU filter extraction.
00770  *-----------------------------------------------------------------*/
00771 tuint ecuAuto_get_filter (tint index, tint filter, char *fname)
00772 {
00773   Fract h[ecu_AUTO_DEF_GETFLT_BSIZE];
00774   union {
00775     ecuVersion_t    ver;
00776     ecuPerform_t    perf;
00777     ecuUpdateStat_t ustat;
00778     LFract noise;
00779     Fract  rerl;
00780     tint   bfield[2];
00781   } u;
00782   FILE  *fptr;
00783   tint tail_len;
00784   tint bsize;
00785   tint ret_code;
00786   tint i, k;
00787
00788   /* Check that the channel is open and the index is within bounds */
00789   if ((ecuAutoEcuInst[index] == (void *) NULL) || (index >= ecu_AUTO_MAX_INST)) {
00790     return (ecu_AUTO_ERR_DELETECHN);
00791   }
00792
00793   /* Get ECU tail length */
00794   ecuGetPerformance (ecuAutoEcuInst[index], u.bfield, &u.ver, &u.perf, &u.ustat,
00795                      &u.noise, &u.noise, &u.rerl, &tail_len, FALSE);
00796
00797   /* Open file for write and assign file pointer */
00798   fptr = fopen (fname, "w");
00799
00800   /* Ensure open success */
00801   if (fptr == NULL) {
00802     ecu_auto_sprint ("Unable to open file: %s for H-register coefficient dump\n", fname);
00803     return (ecu_AUTO_ERR_GETFILTER);
00804   }
00805   else {
00806     ecu_auto_sprint ("Opening file \"%s\" for H-register coefficient dump...\n", fname);
00807   }
00808
00809   /* Ensure the filter is valid */
00810   if ((filter != ecu_FLT_FOREGROUND) && (filter != ecu_FLT_BACKGROUND) &&
00811       (filter != ecu_FLT_SEARCH)) {
00812     return (ecu_AUTO_ERR_GETFILTER);
00813   }
00814
00815   /* Loop and get all coefficients */
00816   k = 0;
00817   bsize = ecu_AUTO_DEF_GETFLT_BSIZE;
00818   while (k < tail_len) {
00819     /* Ensure we reduce block size on last pass (if necessary) */
00820     if (k + bsize > tail_len) {
00821       bsize = tail_len - k;
00822     }
00823     /* Get block of coefficients and check */
00824     ret_code = ecuGetFilter (ecuAutoEcuInst[index], filter, k, bsize, h);
00825     ecu_auto_check_rc (ecu_AUTO_ERR_ECUGETFLT, ret_code, ecu_NOERR);
00826
00827     /* Output filter coefficients to file */
00828     for (i=0; i<bsize; i++) {
00829       fprintf (fptr, "%d\n", h[i]);
00830     }
00831
00832     /* Progress */
00833     ecu_auto_iprint (" Dumped %d coefficients...\n", bsize);
00834
00835     /* Increment start coefficient */
00836     k += bsize;
00837   }
00838
00839   /* Close file pointer */
00840   fclose (fptr);
00841   ecu_auto_sprint ("Closing H-register coefficient file \"%s\" ...\n", fname);
00842
00843   /* Progress (verbose only) */
00844   ecu_AUTO_PRINT_DONE ();
00845
00846   /* Return success */
00847   return (ecu_AUTO_NOERR);
00848 }
00849
00850
00851 /******************************************************************************/
00852 /******************************************************************************
00853  **   LOCAL API FUNCTIONS (ecu_auto_...)
00854  ******************************************************************************/
00855 /******************************************************************************/
00856
00857 /*-----------------------------------------------------------------
00858  * Function:  ecu_auto_gen_sgnfrms
00859  *
00860  * Description: SGN RX/TX frame generation
00861  *-----------------------------------------------------------------*/
00862 void ecu_auto_gen_sgnfrms (void)
00863 {
00864   /* Only generate new frames if ecuAutoFrameSize samples not available */
00865   if (ecuAutoFrmRemain < ecuAutoFrameSize) {
00866     /* Copy any remaining TX samples to the beginning */
00867     memcpy ((void *) &sgntxBuffer[0], (void *) &sgntxBuffer[ecuAutoFrmIndex],
00868             ecuAutoFrmRemain * sizeof(linSample)/sizeof(tword));
00869
00870     /* Generate an additional super-frame of TX samples */
00871     sgnGenerateFrame (ecuAutoSgnInst[ecu_AUTO_TXSGN], ecu_AUTO_SGN_FRAME_SZ,
00872                       (void *) &sgntxBuffer[ecuAutoFrmRemain]);
00873
00874     /* Copy any remaining RX samples to the beginning */
00875     memcpy ((void *) &sgnrxBuffer[0], (void *) &sgnrxBuffer[ecuAutoFrmIndex],
00876             ecuAutoFrmRemain * sizeof(linSample)/sizeof(tword));
00877
00878     /* Generate an additional super-frame of RX samples */
00879     sgnGenerateFrame (ecuAutoSgnInst[ecu_AUTO_RXSGN], ecu_AUTO_SGN_FRAME_SZ,
00880                       (void *) &sgnrxBuffer[ecuAutoFrmRemain]);
00881
00882     /* Update indices */
00883     ecuAutoFrmIndex   = 0;
00884     ecuAutoFrmRemain += ecu_AUTO_SGN_FRAME_SZ;
00885   }
00886 }
00887
00888
00889 /*-----------------------------------------------------------------
00890  * Function:  ecu_auto_addmod_uta
00891  *
00892  * Description: Add a module to UTA instance.
00893  *-----------------------------------------------------------------*/
00894 void ecu_auto_addmod_uta (tint module)
00895 {
00896   utaModConfig_t cfg;
00897   tint ret_code;
00898
00899   switch (module) {
00900   /* Signal generator module */
00901   case ecu_AUTO_MOD_SGN:
00902     cfg.name = "SGN";
00903     cfg.num_command  = sgncmd_AUTO_NUM_CMD;
00904     cfg.num_instance = ecu_AUTO_NUM_SGN_INST;
00905     cfg.cmds = sgnCommands;
00906     cfg.inst_ptrs = &ecuAutoSgnInst[0];
00907     break;
00908   /* Hybrid simulation module */
00909   case ecu_AUTO_MOD_HYB:
00910     cfg.name = "HYB";
00911     cfg.num_command  = hybcmd_AUTO_NUM_CMD;
00912     cfg.num_instance = ecu_AUTO_NUM_HYB_INST;
00913     cfg.cmds = hybCommands;
00914     cfg.inst_ptrs = &ecuAutoHybInst;
00915     break;
00916   /* ECU module */
00917   case ecu_AUTO_MOD_ECU:
00918     cfg.name = "ECU";
00919     cfg.num_command  = ecucmd_AUTO_NUM_CMD;
00920     cfg.num_instance = 0;
00921     cfg.cmds = ecuCommands;
00922     cfg.inst_ptrs = (void *) NULL;
00923     break;
00924   }
00925
00926   /* Add module to UTA instance */
00927   ret_code = utaAddModule (ecuAutoUtaInst, &cfg);
00928   ecu_auto_check_rc (ecu_AUTO_ERR_UTAADDMOD, ret_code, uta_NO_ERROR);
00929 }
00930
00931
00932 /*-----------------------------------------------------------------
00933  * Function:  ecu_auto_set_defaults
00934  *
00935  * Description: ECU automation default initialization.
00936  *-----------------------------------------------------------------*/
00937 void ecu_auto_set_defaults (void)
00938 {
00939   tint i;
00940
00941   /* Default globals initialization */
00942   autoBreak   = TRUE;
00943   autoErrorId = ecu_AUTO_ERR_NONE;
00944
00945   /* Default boolean initialization */
00946   autoCfg->verbose_print = TRUE;
00947   autoCfg->cache_enable  = TRUE;
00948   autoCfg->get_filter    = TRUE;
00949   autoCfg->dss_output    = FALSE;
00950   autoCfg->cache_flush   = TRUE;
00951
00952   /* Default Simulation config */
00953   autoCfg->pcm_hold_sz   = (tlong) ecu_AUTO_DEF_PCM_HOLD_BSIZE;
00954   autoCfg->sample_cnt    = 0L;
00955   autoCfg->second_cnt    = 0L;
00956   autoCfg->sample_bp     = 0L;
00957   autoCfg->iteration     = 1;
00958
00959   /* Set default PCM output booleans */
00960   autoCfg->output_sout   = TRUE;
00961   autoCfg->output_rin    = TRUE;
00962   autoCfg->output_sin    = TRUE;
00963   autoCfg->output_rout   = TRUE;
00964
00965   /* Initialize ECU instances */
00966   for (i=0; i<ecu_AUTO_MAX_INST; i++) {
00967     ecuAutoEcuInst[i] = (void *) NULL;
00968   }
00969
00970   /* Default File IO formats */
00971   outFile[ecu_AUTO_FILE_RIN].pcm_format  = ecu_AUTO_DEF_PCM_FORMAT;
00972   outFile[ecu_AUTO_FILE_SIN].pcm_format  = ecu_AUTO_DEF_PCM_FORMAT;
00973   outFile[ecu_AUTO_FILE_ROUT].pcm_format = ecu_AUTO_DEF_PCM_FORMAT;
00974   outFile[ecu_AUTO_FILE_SOUT].pcm_format = ecu_AUTO_DEF_PCM_FORMAT;
00975
00976   /* Default File IO names */
00977   strcpy (outFile[ecu_AUTO_FILE_RIN].fname , ecu_AUTO_DEF_RIN_FNAME);
00978   strcpy (outFile[ecu_AUTO_FILE_SIN].fname , ecu_AUTO_DEF_SIN_FNAME);
00979   strcpy (outFile[ecu_AUTO_FILE_ROUT].fname, ecu_AUTO_DEF_ROUT_FNAME);
00980   strcpy (outFile[ecu_AUTO_FILE_SOUT].fname, ecu_AUTO_DEF_SOUT_FNAME);
00981
00982   /* Set file type enumeration */
00983   outFile[ecu_AUTO_FILE_RIN].file_type  = (tint) ecu_AUTO_FILE_RIN;
00984   outFile[ecu_AUTO_FILE_SIN].file_type  = (tint) ecu_AUTO_FILE_SIN;
00985   outFile[ecu_AUTO_FILE_ROUT].file_type = (tint) ecu_AUTO_FILE_ROUT;
00986   outFile[ecu_AUTO_FILE_SOUT].file_type = (tint) ecu_AUTO_FILE_SOUT;
00987
00988   /* Initialize to 0 unless used */
00989   AutoDssMemCount = 0L;
00990   AutoDssMemAddr  = 0L;
00991
00992   /* Progress (verbose only) */
00993   ecu_auto_print ("Simulation defaults initialized...\n");
00994 }
00995
00996
00997 void lec_auto_initialize (void)
00998 {
00999   tint i;
01000
01001   /* Set associated buffers for PCM output */
01002   outFile[ecu_AUTO_FILE_RIN].buf   = rinBuffer;
01003   outFile[ecu_AUTO_FILE_SIN].buf   = sinBuffer;
01004   outFile[ecu_AUTO_FILE_ROUT].buf  = routBuffer;
01005   outFile[ecu_AUTO_FILE_SOUT].buf  = soutBuffer;
01006
01007   /* Initialize file output based on triggers */
01008   outFile[ecu_AUTO_FILE_RIN].output_data   = autoCfg->output_rin;
01009   outFile[ecu_AUTO_FILE_SIN].output_data   = autoCfg->output_sin;
01010   outFile[ecu_AUTO_FILE_ROUT].output_data  = autoCfg->output_rout;
01011   outFile[ecu_AUTO_FILE_SOUT].output_data  = autoCfg->output_sout;
01012
01013   /* Initialize all FILE and FCN pointers to NULL */
01014   for (i=0; i<ecu_AUTO_NUM_OUTFILES; i++) {
01015     outFile[i].fptr         = (FILE *) NULL;
01016     outFile[i].pcmout_fcn   = NULL;
01017     outFile[i].output_mark  = FALSE;
01018     outFile[i].output_flush = FALSE;
01019     outFile[i].hold_count   = 0;
01020     outFile[i].hold_buf_sz  = autoCfg->pcm_hold_sz;
01021   }
01022
01026
01027   /* Iitialize module instance pointers */
01028   ecuAutoEcuInst[0] = (void *) NULL;
01029   ecuAutoSgnInst[0] = (void *) NULL;
01030   ecuAutoSgnInst[1] = (void *) NULL;
01031   ecuAutoHybInst    = (void *) NULL;
01032   ecuAutoUtaInst    = (void *) NULL;
01033
01034   /* Initialize automation PCM loop buffers */
01035   memset ((void *) sgnrxBuffer,  0, ecu_AUTO_SGN_BUF_SZ   * sizeof (linSample));
01036   memset ((void *) sgntxBuffer,  0, ecu_AUTO_SGN_BUF_SZ   * sizeof (linSample));
01037   memset ((void *) rinBuffer  ,  0, ecu_AUTO_MAX_FRAME_SZ * sizeof (linSample));
01038   memset ((void *) sinBuffer  ,  0, ecu_AUTO_MAX_FRAME_SZ * sizeof (linSample));
01039   memset ((void *) routBuffer ,  0, ecu_AUTO_MAX_FRAME_SZ * sizeof (linSample));
01040   memset ((void *) soutBuffer ,  0, ecu_AUTO_MAX_FRAME_SZ * sizeof (linSample));
01041
01042   /* Initialize global indices and counts */
01043   ecuAutoFrmRemain = 0;
01044   ecuAutoFrmIndex  = 0;
01045
01046   /* Initialize for cache usage */
01047   if (autoCfg->cache_enable) {
01048     memarchcfg_cacheEnable ();
01049   }
01050
01054
01055   /* Initialize the Channel/Engine heap */
01056   ecu_mem_init_heap ();
01057
01061
01062   /* Progress (verbose only) */
01063   ecu_auto_print ("Simulation initialization complete...\n");
01064 }
01065
01066
01067 /*-----------------------------------------------------------------
01068  * Function:  ecu_auto_init_rxsgn
01069  *
01070  * Description: RX path Signal generator initialization.
01071  *-----------------------------------------------------------------*/
01072 void ecu_auto_init_rxsgn (void)
01073 {
01074   sgnConfig_t cfg;
01075
01076   /* RX Signal generator sgnInit() parameters */
01077   cfg.Fs            = ecu_AUTO_DEF_FS;
01078   cfg.f2            = 0;
01079   cfg.t_amp2        = 0;
01080   cfg.pr_enable     = FALSE;
01081   cfg.pr_period     = 0;
01082   cfg.hoth_wng_seed = 0;
01083   cfg.addr          = 0L;
01084   cfg.count         = 0L;
01085   cfg.pcmtbl        = (const tint *) NULL;
01086   cfg.exception     = NULL;
01087   cfg.debug         = NULL;
01088   cfg.fsk_duration  = 0;
01089   cfg.fsk_numword   = 0;
01090   cfg.fsk_dataptr   = NULL;
01091   cfg.delay         = ecu_AUTO_DEF_SGN_DELAY;
01092   cfg.dc_offset     = ecu_AUTO_DEF_SGN_DCOFF;
01093   cfg.f1            = ecu_AUTO_DEF_SGN_FREQ1;
01094   cfg.t_amp1        = ecu_AUTO_DEF_SGN_AMP1;
01095   cfg.noise_level   = ecu_AUTO_DEF_SGN_NLEVEL;
01096   cfg.noise_seed    = ecu_AUTO_DEF_SGN_RX_NSEED;
01097   cfg.noise_type    = ecu_AUTO_DEF_SGN_NTYPE;
01098   cfg.wf_type       = sgn_WFT_CSS;
01099   cfg.power_level   = ecu_AUTO_DEF_SGN_SLEVEL;
01100
01101   /* Progress (verbose only) */
01102   ecu_auto_print ("Initializing RX Path Signal generator...\n");
01103
01104   /* Initialize Signal generator instance */
01105   sgnInit (ecuAutoSgnInst[ecu_AUTO_RXSGN], &cfg);
01106
01107   /* Progress (verbose only) */
01108   ecu_AUTO_PRINT_DONE ();
01109 }
01110
01111
01112 /*-----------------------------------------------------------------
01113  * Function:  ecu_auto_init_txsgn
01114  *
01115  * Description: TX path Signal generator initialization.
01116  *-----------------------------------------------------------------*/
01117 void ecu_auto_init_txsgn (void)
01118 {
01119   sgnConfig_t cfg;
01120
01121   /* TX Signal generator sgnInit() parameters */
01122   cfg.Fs            = ecu_AUTO_DEF_FS;
01123   cfg.f2            = 0;
01124   cfg.t_amp2        = 0;
01125   cfg.pr_enable     = FALSE;
01126   cfg.pr_period     = 0;
01127   cfg.hoth_wng_seed = 0;
01128   cfg.addr          = 0L;
01129   cfg.count         = 0L;
01130   cfg.pcmtbl        = (const tint *) NULL;
01131   cfg.exception     = NULL;
01132   cfg.debug         = NULL;
01133   cfg.fsk_duration  = 0;
01134   cfg.fsk_numword   = 0;
01135   cfg.fsk_dataptr   = NULL;
01136   cfg.delay         = ecu_AUTO_DEF_SGN_DELAY;
01137   cfg.dc_offset     = ecu_AUTO_DEF_SGN_DCOFF;
01138   cfg.f1            = ecu_AUTO_DEF_SGN_FREQ1;
01139   cfg.t_amp1        = ecu_AUTO_DEF_SGN_AMP1;
01140   cfg.noise_level   = ecu_AUTO_DEF_SGN_NLEVEL;
01141   cfg.noise_seed    = ecu_AUTO_DEF_SGN_TX_NSEED;
01142   cfg.noise_type    = ecu_AUTO_DEF_SGN_NTYPE;
01143   cfg.wf_type       = sgn_WFT_CSS;
01144   cfg.power_level   = -80;
01145
01146   /* Progress (verbose only) */
01147   ecu_auto_print ("Initializing TX Path Signal generator...\n");
01148
01149   /* Initialize Signal generator instance */
01150   sgnInit (ecuAutoSgnInst[ecu_AUTO_TXSGN], &cfg);
01151
01152   /* Progress (verbose only) */
01153   ecu_AUTO_PRINT_DONE ();
01154 }
01155
01156
01157 /*-----------------------------------------------------------------
01158  * Function:  ecu_auto_compand
01159  *
01160  * Description: Perform PCM companding on frame of samples
01161  *-----------------------------------------------------------------*/
01162 void ecu_auto_compand (tint pcm_format, linSample *in, linSample *out)
01163 {
01164   const tint *tbl;
01165   tint buf[ecu_AUTO_MAX_FRAME_SZ];
01166   tint index;
01167   tint i;
01168
01169   /* Compress based on PCM format */
01170   switch (pcm_format) {
01171   /* U-law 8-bit PCM */
01172   case ecu_AUTO_PCM_ULAW:
01173     muaTblUlawCmpr (ecuAutoFrameSize, in, buf);
01174     tbl = muaTblUlaw;
01175     break;
01176   /* A-law 8-bit PCM */
01177   case ecu_AUTO_PCM_ALAW:
01178     muaTblAlawCmpr (ecuAutoFrameSize, in, buf);
01179     tbl = muaTblAlaw;
01180     break;
01181   /* Linear 16-bit PCM */
01182   case ecu_AUTO_PCM_LIN:
01183     /* Copy samples from in-2-out */
01184     for (i=0; i<ecuAutoFrameSize; i++) {
01185       out[i] = in[i];
01186     }
01187     return;
01188   }
01189
01190   /* Expand to "out" */
01191   for (i=0; i<ecuAutoFrameSize; i++) {
01192     index  = (tint) (buf[i] & 0xFF);
01193     out[i] = (linSample) tbl[index];
01194   }
01195 }
01196
01197
01198 /*-----------------------------------------------------------------
01199  * Function:  ecu_auto_dline_pack
01200  *
01201  * Description: Perform PCM companding and packing on Rin samples
01202  *-----------------------------------------------------------------*/
01203 void ecu_auto_dline_pack (tint pcm_format, linSample *in, tword *out)
01204 {
01205   tint buf[ecu_AUTO_MAX_FRAME_SZ];
01206
01207   /* Compress based on PCM format */
01208   if (pcm_format == ecu_AUTO_PCM_ALAW) {
01209     muaTblAlawCmpr (ecuAutoFrameSize, in, buf);
01210   }
01211   else {
01212     muaTblUlawCmpr (ecuAutoFrameSize, in, buf);
01213   }
01214
01215   /* Pack to "out" */
01216   ecu_dline_pcm_pack (buf, out, ecuAutoFrameSize);
01217 }
01218
01219
01220 /*-----------------------------------------------------------------
01221  * Function:  ecu_auto_dline_unpack
01222  *
01223  * Description: Perform PCM companding and packing on Rin samples
01224  *-----------------------------------------------------------------*/
01225 void ecu_auto_dline_unpack (tint pcm_format, tword *in, linSample *out)
01226 {
01227   const tint *tbl;
01228   tint buf[ecu_AUTO_MAX_FRAME_SZ];
01229   tint index;
01230   tint i;
01231
01232   /* Unpack to "buf" */
01233   ecu_dline_pcm_unpack (in, buf, ecuAutoFrameSize);
01234
01235   /* Set expansion table */
01236   if (pcm_format == ecu_AUTO_PCM_ALAW) {
01237     tbl = muaTblAlaw;
01238   }
01239   else {
01240     tbl = muaTblUlaw;
01241   }
01242
01243   /* Expand to "out" */
01244   for (i=0; i<ecuAutoFrameSize; i++) {
01245     index  = (tint) (buf[i] & 0xFF);
01246     out[i] = (linSample) tbl[index];
01247   }
01248 }
01249
01250
01251 /*-----------------------------------------------------------------
01252  * Function:  ecu_auto_sample_cnt
01253  *
01254  * Description: Update sample counters and check for BP
01255  *-----------------------------------------------------------------*/
01256 void ecu_auto_sample_cnt (void)
01257 {
01258   tlong sample_cnt = autoCfg->sample_cnt;
01259   tlong second_cnt = autoCfg->second_cnt;
01260   tlong sample_bp  = autoCfg->sample_bp;
01261
01262   /* Update sample counter */
01263   sample_cnt += ecuAutoFrameSize;
01264   if (sample_cnt >= (second_cnt + 1) * ecu_AUTO_DEF_FS) {
01265     second_cnt++;
01266     ecu_auto_iprint (" - Progress: %d seconds\n", second_cnt);
01267   }
01268
01269   /* Check for simulation BP */
01270   if (sample_bp != 0 && sample_cnt >= sample_bp) {
01271     ecu_auto_iprint (" - Halting after %d samples\n", sample_cnt);
01272     utaBreakPoint ();
01273     sample_bp = 0;
01274   }
01275
01276   /* Replace new values */
01277   autoCfg->sample_cnt = sample_cnt;
01278   autoCfg->second_cnt = second_cnt;
01279   autoCfg->sample_bp  = sample_bp;
01280 }
01281
01282
01283 /*-----------------------------------------------------------------
01284  * Function:  ecu_auto_write_pcm
01285  *
01286  * Description: Write PCM output
01287  *-----------------------------------------------------------------*/
01288 void ecu_auto_write_pcm (ecuAutoFout_t *fout, tword *pcmbuf, tint bufsize)
01289 {
01290   tint i;
01291   tint count;
01292
01293   /* Pack buffer for PCM output */
01294   ecu_pcm_pack (pcmbuf, bufsize);
01295
01296   /* Write to PCM holding buffer (except on FLUSH) */
01297   count = fout->hold_count;
01298   if (!fout->output_flush) {
01299     for (i=0; i<bufsize; i++) {
01300       fout->hold_buf[count++] = pcmbuf[i];
01301     }
01302   }
01303
01304   /* Check for buffer full */
01305   if (fout->output_flush || (fout->hold_buf_sz - count) < bufsize) {
01306     /* Break and output via DSS */
01307     if (autoCfg->dss_output) {
01308       AutoDssMemCount  = count;
01309       AutoDssMemAddr   = (tulong) fout->hold_buf;
01310       AutoDssFileType  = fout->file_type;
01311       AutoDssPcmFormat = (tint) fout->pcm_format;
01312       asm ("  NOP");
01313       asm ("  NOP");
01314       asm ("  NOP");
01315       asm ("Auto_Sim_Do_Fout:  ");
01316       asm ("  NOP");
01317       asm ("  NOP");
01318       asm ("  NOP");
01319     }
01320     /* Write to the file */
01321     else {
01322       fwrite ((void *) fout->hold_buf, 1, count, fout->fptr);
01323     }
01324
01325     /* Reset the count */
01326     count = 0;
01327   }
01328
01329   /* Write back new count */
01330   fout->hold_count = count;
01331 }
01332
01333
01334 /*-----------------------------------------------------------------
01335  * Function:  ecu_auto_output_ulaw
01336  *
01337  * Description: Perform PCM ulaw file output
01338  *-----------------------------------------------------------------*/
01339 void ecu_auto_output_ulaw (void *vfout)
01340 {
01341   ecuAutoFout_t *fout = (ecuAutoFout_t *) vfout;
01342   tword pcmbuf[ecu_AUTO_MAX_FRAME_SZ*sizeof(linSample)/sizeof(tword)];
01343   linSample *buf;
01344   tint size;
01345
01346   /* Ensure this point is prepared for File output */
01347   if (!fout->output_data || (!autoCfg->dss_output && fout->fptr == NULL)) {
01348     return;
01349   }
01350
01351   /* Get local pointers and values for frame versus marker output */
01352   if (fout->output_mark) {
01353     size = ecu_AUTO_MARK_SIZE;
01354     buf  = markBuffer;
01355   }
01356   else {
01357     size = ecuAutoFrameSize;
01358     buf  = fout->buf;
01359   }
01360
01361   /* Compress to local buffer first */
01362   muaTblUlawCmpr (size, buf, (tint *) pcmbuf);
01363
01364   /* Write PCM output */
01365   ecu_auto_write_pcm (fout, pcmbuf, size);
01366 }
01367
01368
01369 /*-----------------------------------------------------------------
01370  * Function:  ecu_auto_output_alaw
01371  *
01372  * Description: Perform PCM alaw file output
01373  *-----------------------------------------------------------------*/
01374 void ecu_auto_output_alaw (void *vfout)
01375 {
01376   ecuAutoFout_t *fout = (ecuAutoFout_t *) vfout;
01377   tword pcmbuf[ecu_AUTO_MAX_FRAME_SZ*sizeof(linSample)/sizeof(tword)];
01378   linSample *buf;
01379   tint size;
01380
01381   /* Ensure this point is prepared for File output */
01382   if (!fout->output_data || (!autoCfg->dss_output && fout->fptr == NULL)) {
01383     return;
01384   }
01385
01386   /* Get local pointers and values for frame versus marker output */
01387   if (fout->output_mark) {
01388     size = ecu_AUTO_MARK_SIZE;
01389     buf  = markBuffer;
01390   }
01391   else {
01392     size = ecuAutoFrameSize;
01393     buf  = fout->buf;
01394   }
01395
01396   /* Compress to local buffer first */
01397   muaTblAlawCmpr (size, buf, (tint *) pcmbuf);
01398
01399   /* Write PCM output */
01400   ecu_auto_write_pcm (fout, pcmbuf, size);
01401 }
01402
01403
01404 /*-----------------------------------------------------------------
01405  * Function:  ecu_auto_output_lin
01406  *
01407  * Description: Perform PCM linear file output
01408  *-----------------------------------------------------------------*/
01409 void ecu_auto_output_lin (void *vfout)
01410 {
01411   ecuAutoFout_t *fout = (ecuAutoFout_t *) vfout;
01412
01413   /* Ensure this point is prepared for File output */
01414   if (autoCfg->dss_output) {
01415     return;
01416   }
01417
01418   /* Write to the file */
01419   if (fout->output_mark) {
01420     fwrite ((void *) markBuffer, 2, ecu_AUTO_MARK_SIZE, fout->fptr);
01421   }
01422   else {
01423     fwrite ((void *) fout->buf, 2, ecuAutoFrameSize, fout->fptr);
01424   }
01425 }
01426
01427
01428 /*-----------------------------------------------------------------
01429  * Function:  ecu_auto_output_pcm
01430  *
01431  * Description: Utility to call PCM output function.
01432  *-----------------------------------------------------------------*/
01433 void ecu_auto_output_pcm (tbool enable, tbool marker, tbool flush)
01434 {
01435   ecuAutoFout_t *fout;
01436   tint i;
01437
01438   /* Check if output is desired */
01439   if (!enable) return;
01440
01441   for (i=0; i<ecu_AUTO_NUM_OUTFILES; i++) {
01442     /* Get file output pointer and set marker boolean */
01443     fout = &outFile[i];
01444     fout->output_mark  = marker;
01445     fout->output_flush = flush;
01446
01447     /* Output if enabled */
01448     if (fout->pcmout_fcn) {
01449       (*fout->pcmout_fcn) ((void *) fout);
01450     }
01451   }
01452 }
01453
01454
01455 /*-----------------------------------------------------------------
01456  * Function:  ecu_auto_close_fout
01457  *
01458  * Description: Simulation PCM data output cleanup.
01459  *-----------------------------------------------------------------*/
01460 void ecu_auto_close_fout (void)
01461 {
01462   ecuAutoFout_t *fout;
01463   tint i;
01464
01465   /* Flush the output for all active files */
01466   ecu_auto_output_pcm (TRUE, FALSE, TRUE);
01467
01468   for (i=0; i<ecu_AUTO_NUM_OUTFILES; i++) {
01469     /* Get file output pointer */
01470     fout = &outFile[i];
01471
01472     /* Prepare to close File IO (if enabled) */
01473     if (!fout->output_data && fout->fptr == NULL) continue;
01474
01475     /* Create file path string */
01476     strcpy (file_string, fout->fname);
01477
01478     /* Add appropriate extension and set output function pointer */
01479     switch (fout->pcm_format) {
01480     case ecu_AUTO_PCM_ULAW:
01481       strcat (file_string, ".ula");
01482       break;
01483     case ecu_AUTO_PCM_ALAW:
01484       strcat (file_string, ".ala");
01485       break;
01486     case ecu_AUTO_PCM_LIN:
01487       strcat (file_string, ".pcm");
01488       break;
01489     }
01490
01491     /* Provide feedback */
01492     ecu_auto_sprint ("Closing output file: %s ...", file_string);
01493
01494     /* Close file and set file pointer to NULL */
01495     fclose (fout->fptr);
01496     fout->fptr = NULL;
01497     fout->output_data = FALSE;
01498
01499     /* Progress (verbose only) */
01500     ecu_AUTO_PRINT_DONE ();
01501   }
01502 }
01503
01504
01505 /*-----------------------------------------------------------------
01506  * Function:  ecu_auto_process_uta
01507  *
01508  * Description: Unit test automation (UTA) processing.
01509  *-----------------------------------------------------------------*/
01510 void ecu_auto_process_uta (void)
01511 {
01512   tint ret_code;
01513
01514   /* Progress (verbose only) */
01515   ecu_auto_print ("Parsing TDF file...\n\n");
01516
01517   /* UTA processing */
01518   ret_code = utaProcess (ecuAutoUtaInst);
01519
01523
01524   /* UTA error checking */
01525   if (ret_code == uta_MOD_ERROR) {
01526     ecu_auto_check_rc (ecu_AUTO_ERR_UTAMOD, ret_code, uta_NO_ERROR);
01527   }
01528   else if (ret_code == uta_CMD_ERROR) {
01529     ecu_auto_check_rc (ecu_AUTO_ERR_UTACMD, ret_code, uta_NO_ERROR);
01530   }
01531   else if (ret_code == uta_IDX_ERROR) {
01532     ecu_auto_check_rc (ecu_AUTO_ERR_UTAIDX, ret_code, uta_NO_ERROR);
01533   }
01534   else if (ret_code == uta_OPT_ERROR) {
01535     ecu_auto_check_rc (ecu_AUTO_ERR_UTAOPT, ret_code, uta_NO_ERROR);
01536   }
01537   else {
01538     ecu_auto_check_rc (ecu_AUTO_ERR_UTAPROC, ret_code, uta_NO_ERROR);
01539   }
01540
01544 }
01545
01546
01547 /*-----------------------------------------------------------------
01548  * Function:  ecu_auto_create_uta
01549  *
01550  * Description: Unit test automation (UTA) instantiation.
01551  *-----------------------------------------------------------------*/
01552 void ecu_auto_create_uta (void)
01553 {
01554   utaConfig_t cfg;
01555   tint uta_size;
01556   tint ret_code;
01557
01558   /* Progress (verbose only) */
01559   ecu_auto_print ("Instantiating UTA...\n");
01560
01561   /* Allocate UTA instance */
01562   ret_code = utaGetSizes (&uta_size);
01563   ecu_auto_check_rc (ecu_AUTO_ERR_UTAGETSZ, ret_code, uta_NO_ERROR);
01564   ecuAutoUtaInst = ecu_mem_alloc_align (uta_size, 8, ecu_AUTO_ECO_MEM);
01565
01566   /* Initialize the UTA instance */
01567   cfg.fname = ecu_AUTO_DEF_UTA_FNAME;
01568   ret_code = utaInit (ecuAutoUtaInst, &cfg);
01569   ecu_auto_check_rc (ecu_AUTO_ERR_UTAINIT, ret_code, uta_NO_ERROR);
01570
01571   /* Progress (verbose only) */
01572   ecu_AUTO_PRINT_DONE ();
01573 }
01574
01575
01576 /*-----------------------------------------------------------------
01577  * Function:  ecu_auto_create_hyb
01578  *
01579  * Description: Hybrid simulation instantiation.
01580  *-----------------------------------------------------------------*/
01581 void ecu_auto_create_hyb (void)
01582 {
01583   const ecomemBuffer_t *sizeBufs;
01584   ecomemBuffer_t  hybBufs[ecu_AUTO_MAX_ECOBUFS];
01585   hybSizeConfig_t scfg;
01586   hybNewConfig_t  ncfg;
01587   ecuMemConfig_t  mcfg;
01588   tint ret_code;
01589   tint nbufs;
01590
01591   /* Memory configuration parameters */
01592   mcfg.pre_init_bufs = FALSE;
01593   mcfg.init_pattern  = ecu_AUTO_DEF_INIT_PATTERN;
01594
01595   /* hybGetSizes() parameters */
01596   scfg.max_samples_per_frame = ecu_AUTO_MAX_FRAME_SZ;
01597   scfg.max_filter_length     = ecu_AUTO_MAX_TAIL_LEN;
01598   scfg.max_rx_delay          = ecu_AUTO_MAX_DELAY;
01599   scfg.max_tx_delay          = ecu_AUTO_MAX_DELAY;
01600
01601   /* hybNew() parameters */
01602   ncfg.ID                    = ecu_AUTO_DEF_HYB_ID;
01603   ncfg.max_samples_per_frame = ecu_AUTO_MAX_FRAME_SZ;
01604   ncfg.max_filter_length     = ecu_AUTO_MAX_TAIL_LEN;
01605   ncfg.max_rx_delay          = ecu_AUTO_MAX_DELAY;
01606   ncfg.max_tx_delay          = ecu_AUTO_MAX_DELAY;
01607
01608   /* Progress (verbose only) */
01609   ecu_auto_print ("Instantiating Hybrid simulation...\n");
01610
01611   /* Get Hybrid buffer requirements and ensure #buffers within limits */
01612   ret_code = hybGetSizes (&nbufs, &sizeBufs, &scfg);
01613   ecu_auto_check_rc (ecu_AUTO_ERR_HYBGETSZ, ret_code, hyb_NOERR);
01614   ret_code = (nbufs > ecu_AUTO_MAX_ECOBUFS) ? ecu_AUTO_ERR : ecu_AUTO_NOERR;
01615   ecu_auto_check_rc (ecu_AUTO_ERR_NUMBUF, ret_code, ecu_AUTO_NOERR);
01616
01617   /* Allocate buffers */
01618   ecu_mem_alloc_eco (nbufs, sizeBufs, hybBufs, &mcfg, ecu_AUTO_ECO_MEM);
01619
01620   /* Create (NEW) Hybrid simulation instance */
01621   ret_code = hybNew (&ecuAutoHybInst, nbufs, hybBufs, &ncfg);
01622   ecu_auto_check_rc (ecu_AUTO_ERR_HYBNEW, ret_code, hyb_NOERR);
01623
01624   /* Progress (verbose only) */
01625   ecu_AUTO_PRINT_DONE ();
01626 }
01627
01628
01629 /*-----------------------------------------------------------------
01630  * Function:  ecu_auto_create_sgn
01631  *
01632  * Description: Signal generator instantiation.
01633  *-----------------------------------------------------------------*/
01634 void ecu_auto_create_sgn (void **inst)
01635 {
01636   void *sgnInst;
01637   tint ret_code;
01638   tint inst_sz;
01639
01640   /* Progress (verbose only) */
01641   ecu_auto_print ("Instantiating Signal generator...\n");
01642
01643   /* Get instance size and allocate memory */
01644   ret_code = sgnGetSizes (&inst_sz);
01645   ecu_auto_check_rc (ecu_AUTO_ERR_SGNGETSZ, ret_code, sgn_NOERR);
01646   sgnInst = ecu_mem_alloc_align (inst_sz, 8, ecu_AUTO_ECO_MEM);
01647
01648   /* Check for NULL instance before assigning output */
01649   *inst = sgnInst;
01650
01651   /* Progress (verbose only) */
01652   ecu_AUTO_PRINT_DONE ();
01653 }
01654
01655 /* Nothing past this point */


ECU Test: ecuauto.h File Reference

  • File List
  • Globals

ecuauto.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/types/const.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/sdk/hyb.h>
#include <ti/mas/sdk/sgn.h>
#include <ti/mas/ecu/test/src/ecumem.h>
#include <ti/mas/ecu/test/src/ecuautoport.h>

Include dependency graph for ecuauto.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | ecuAutoFout_t
struct | ecuChnConfig_t
struct | ecuAutoLoopCfg_t
struct | ecuAutoConfig_t

Defines

#define | ecu_AUTO_MAX_INST 1
#define | ecu_AUTO_MAX_ECOBUFS 20
#define | ecu_AUTO_MAX_STRING 256
#define | ecu_AUTO_DEF_FS 8000
#define | ecu_AUTO_NUM_SGN_INST 2
#define | ecu_AUTO_NUM_HYB_INST 1
#define | ecu_AUTO_MARK_SIZE 8
#define | ecu_AUTO_SAMP_PER_MS (ecu_AUTO_DEF_FS/1000)
#define | ecu_AUTO_MAX_DELAY (10 *ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_SGN_FRAME_SZ (40 *ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_MAX_FRAME_SZ (10 *ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_SGN_BUF_SZ (ecu_AUTO_SGN_FRAME_SZ+(2*ecu_AUTO_MAX_FRAME_SZ))
#define | ecu_AUTO_MAX_TAIL_LEN (32 *ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_MAX_SEG_LEN (32 *ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_MAX_SEG_NUM 1
#define | ecu_AUTO_CHCFG_NLP_VALID 0x0001
#define | ecu_AUTO_CHCFG_ERL_VALID 0x0002
#define | ecu_AUTO_CHCFG_BYP_VALID 0x0004
#define | ecu_AUTO_CHCFG_HLD_VALID 0x0008
#define | ecu_AUTO_CHCFG_CLR_VALID 0x0010
#define | ecu_AUTO_DEF_PCM_FORMAT ecu_AUTO_PCM_ULAW
#define | ecu_AUTO_DEF_INIT_PATTERN 0x55
#define | ecu_AUTO_DEF_GETFLT_BSIZE 128
#define | ecu_AUTO_DEF_PCM_HOLD_BSIZE ecu_AUTO_PCM_BSIZE
#define | ecu_AUTO_DEF_UTA_FNAME "test.tdf"
#define | ecu_AUTO_DEF_GETFLT_FNAME "hreg.txt"
#define | ecu_AUTO_DEF_RIN_FNAME "rin"
#define | ecu_AUTO_DEF_SIN_FNAME "sin"
#define | ecu_AUTO_DEF_ROUT_FNAME "rout"
#define | ecu_AUTO_DEF_SOUT_FNAME "sout"
#define | ecu_AUTO_DEF_TEST_CHNUM 1
#define | ecu_AUTO_DEF_MIN_ERL ecu_AUTO_ERL_6DB
#define | ecu_AUTO_DEF_NLP_MODE ecu_AUTO_NLP_CNG_ON
#define | ecu_AUTO_DEF_FRAME_SZ (10*ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_DEF_Y2X_DELAY ecu_AUTO_DEF_FRAME_SZ
#define | ecu_AUTO_DEF_TAIL_LEN (128*ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_MIN_SEARCH (64*ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_DEF_HYB_ID 0xBBBB
#define | ecu_AUTO_DEF_HYB_RX_DELAY 0
#define | ecu_AUTO_DEF_HYB_TX_DELAY 0
#define | ecu_AUTO_DEF_HYB_MODEL hyb_ST_G168_M1
#define | ecu_AUTO_DEF_HYB_ERL 6
#define | ecu_AUTO_DEF_HYB_DELAY (4*ecu_AUTO_SAMP_PER_MS)
#define | ecu_AUTO_DEF_SGN_DELAY 0
#define | ecu_AUTO_DEF_SGN_DCOFF 0
#define | ecu_AUTO_DEF_SGN_FREQ1 1004
#define | ecu_AUTO_DEF_SGN_AMP1 4096
#define | ecu_AUTO_DEF_SGN_NLEVEL (-70)
#define | ecu_AUTO_DEF_SGN_RX_NSEED 0x1234
#define | ecu_AUTO_DEF_SGN_TX_NSEED 0x5678
#define | ecu_AUTO_DEF_SGN_NTYPE sgn_NT_GAUSS
#define | ecu_AUTO_DEF_SGN_SLEVEL (-10)
#define | ecu_AUTO_PRINT_DONE() { ecu_auto_print (" DONE\n"); }

Enumerations

enum ecuAutoErr_e {
ecu_AUTO_ERR_NONE = 0x0000, ecu_AUTO_ERR_HYBGETSZ = 0x1000, ecu_AUTO_ERR_HYBNEW, ecu_AUTO_ERR_HYBOPEN,
ecu_AUTO_ERR_HYBCONTROL, ecu_AUTO_ERR_HYBECHO, ecu_AUTO_ERR_SGNGETSZ = 0x2000, ecu_AUTO_ERR_ECUNEW = 0x3000,
ecu_AUTO_ERR_ECUGETSZ, ecu_AUTO_ERR_ECUCONTROL, ecu_AUTO_ERR_ECUGETFLT, ecu_AUTO_ERR_UTAGETSZ = 0x4000,
ecu_AUTO_ERR_UTAINIT, ecu_AUTO_ERR_UTAADDMOD, ecu_AUTO_ERR_UTAPROC, ecu_AUTO_ERR_UTAMOD,
ecu_AUTO_ERR_UTACMD, ecu_AUTO_ERR_UTAIDX, ecu_AUTO_ERR_UTAOPT, ecu_AUTO_ERR_CREATECHN = 0x6000,
ecu_AUTO_ERR_DELETECHN, ecu_AUTO_ERR_OPENCHN, ecu_AUTO_ERR_CONFIGCHN, ecu_AUTO_ERR_CLOSECHN,
ecu_AUTO_ERR_NUMBUF, ecu_AUTO_ERR_GETFILTER, ecu_AUTO_ERR_GETVERSION
}
enum | { ecu_AUTO_NOERR, ecu_AUTO_ERR }
enum | { ecu_AUTO_RXSGN, ecu_AUTO_TXSGN }
enum | { ecu_AUTO_MOD_SGN, ecu_AUTO_MOD_HYB, ecu_AUTO_MOD_ECU }
enum | { ecu_AUTO_MRK_NONE, ecu_AUTO_MRK_PRE, ecu_AUTO_MRK_POST }
enum | ecuPcm_e { ecu_AUTO_PCM_ALAW = const_COMP_ALAW_8, ecu_AUTO_PCM_ULAW = const_COMP_MULAW_8, ecu_AUTO_PCM_LIN = const_COMP_LINEAR }
enum | ecuNlp_e { ecu_AUTO_NLP_OFF = 0x0000, ecu_AUTO_NLP_ON = ecu_ENABLE_NLP, ecu_AUTO_NLP_CNG_ON = ecu_ENABLE_CNG_ADAPT }
enum | ecuErl_e { ecu_AUTO_ERL_6DB = 0x0000, ecu_AUTO_ERL_3DB = ecu_ERL_CONFIG_BIT_0, ecu_AUTO_ERL_0DB = ecu_ERL_CONFIG_BIT_1 }
enum {
ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT,
ecu_AUTO_NUM_OUTFILES
}

Functions

void | ecuAuto_process_loop (ecuAutoLoopCfg_t *cfg)
void | ecuAuto_prep_fout (void)
tuint | ecuAuto_create_chn (tint index, ecuNewConfig_t *ncfg, ecuMemConfig_t *mcfg)
tuint | ecuAuto_open_chn (tint index, ecuConfig_t *cfg)
tuint | ecuAuto_config_chn (tint index, ecuChnConfig_t *cfg)
tuint | ecuAuto_close_chn (tint index)
tuint | ecuAuto_delete_chn (tint index)
tuint | ecuAuto_get_filter (tint index, tint filter, char *fname)
void | ecu_auto_exception (tuint id, tuint type, tuint code, tuint length, tuint *data)
void | ecu_auto_halt (void)
void | lec_auto_initialize (void)
void | ecu_auto_set_defaults (void)
void | ecu_auto_check_rc (ecuAutoErr_e id, tuint rc, tuint pass_code)
void | ecu_auto_init_rxsgn (void)
void | ecu_auto_init_txsgn (void)
void | ecu_auto_gen_sgnfrms (void)
void | ecu_auto_addmod_uta (tint module)
void | ecu_auto_create_sgn (void **inst)
void | ecu_auto_create_hyb (void)
void | ecu_auto_create_uta (void)
void | ecu_auto_process_uta (void)
void | ecu_auto_sample_cnt (void)
void | ecu_auto_compand (tint pcm_format, linSample *in, linSample *out)
void | ecu_auto_close_fout (void)
void | ecu_auto_output_pcm (tbool enable, tbool marker, tbool flush)
void | ecu_auto_output_ulaw (void *vfout)
void | ecu_auto_output_alaw (void *vfout)
void | ecu_auto_output_lin (void *vfout)
void | ecu_auto_dline_pack (tint pcm_format, linSample *in, tword *out)
void | ecu_auto_dline_unpack (tint pcm_format, tword *in, linSample *out)

Variables

ecuAutoFout_t outFile []

Define Documentation

#define ecu_AUTO_MAX_INST 1

Definition at line 34 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), ecuAuto_close_chn(), ecuAuto_config_chn(), ecuAuto_create_chn(), ecuAuto_delete_chn(), ecuAuto_get_filter(), and ecuAuto_open_chn().

#define ecu_AUTO_MAX_ECOBUFS 20

Definition at line 35 of file ecuauto.h.

Referenced by ecu_auto_create_hyb(), and ecuAuto_create_chn().

#define ecu_AUTO_MAX_STRING 256

Definition at line 36 of file ecuauto.h.

Referenced by ecucmd_getflt_handler().

#define ecu_AUTO_DEF_FS 8000

Definition at line 37 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), ecu_auto_init_txsgn(), and ecu_auto_sample_cnt().

#define ecu_AUTO_NUM_SGN_INST 2

Definition at line 38 of file ecuauto.h.

Referenced by ecu_auto_addmod_uta().

#define ecu_AUTO_NUM_HYB_INST 1

Definition at line 39 of file ecuauto.h.

Referenced by ecu_auto_addmod_uta().

#define ecu_AUTO_MARK_SIZE 8

Definition at line 40 of file ecuauto.h.

Referenced by ecu_auto_output_alaw(), ecu_auto_output_lin(), and ecu_auto_output_ulaw().

#define ecu_AUTO_SAMP_PER_MS (ecu_AUTO_DEF_FS/1000)

Definition at line 41 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_open_handler().

#define ecu_AUTO_MAX_DELAY (10 *ecu_AUTO_SAMP_PER_MS)

Definition at line 42 of file ecuauto.h.

Referenced by ecu_auto_create_hyb().

#define ecu_AUTO_SGN_FRAME_SZ (40 *ecu_AUTO_SAMP_PER_MS)

Definition at line 43 of file ecuauto.h.

Referenced by ecu_auto_gen_sgnfrms().

#define ecu_AUTO_MAX_FRAME_SZ (10 *ecu_AUTO_SAMP_PER_MS)

Definition at line 44 of file ecuauto.h.

Referenced by ecu_auto_compand(), ecu_auto_create_hyb(), ecu_auto_dline_pack(), ecu_auto_dline_unpack(), ecu_auto_output_alaw(), ecu_auto_output_ulaw(), and lec_auto_initialize().

#define ecu_AUTO_SGN_BUF_SZ (ecu_AUTO_SGN_FRAME_SZ+(2*ecu_AUTO_MAX_FRAME_SZ))

Definition at line 45 of file ecuauto.h.

Referenced by lec_auto_initialize().

#define ecu_AUTO_MAX_TAIL_LEN (32 *ecu_AUTO_SAMP_PER_MS)

Definition at line 52 of file ecuauto.h.

Referenced by ecu_auto_create_hyb().

#define ecu_AUTO_MAX_SEG_LEN (32 *ecu_AUTO_SAMP_PER_MS)

Definition at line 53 of file ecuauto.h.

#define ecu_AUTO_MAX_SEG_NUM 1

Definition at line 54 of file ecuauto.h.

#define ecu_AUTO_CHCFG_NLP_VALID 0x0001

Definition at line 173 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_ERL_VALID 0x0002

Definition at line 174 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_BYP_VALID 0x0004

Definition at line 175 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_HLD_VALID 0x0008

Definition at line 176 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_CLR_VALID 0x0010

Definition at line 177 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_DEF_PCM_FORMAT ecu_AUTO_PCM_ULAW

Definition at line 210 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_INIT_PATTERN 0x55

Definition at line 211 of file ecuauto.h.

Referenced by ecu_auto_create_hyb(), and ecucmd_chnnew_handler().

#define ecu_AUTO_DEF_GETFLT_BSIZE 128

Definition at line 212 of file ecuauto.h.

Referenced by ecuAuto_get_filter().

#define ecu_AUTO_DEF_PCM_HOLD_BSIZE ecu_AUTO_PCM_BSIZE

Definition at line 213 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_UTA_FNAME "test.tdf"

Definition at line 214 of file ecuauto.h.

Referenced by ecu_auto_create_uta().

#define ecu_AUTO_DEF_GETFLT_FNAME "hreg.txt"

Definition at line 215 of file ecuauto.h.

#define ecu_AUTO_DEF_RIN_FNAME "rin"

Definition at line 216 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_SIN_FNAME "sin"

Definition at line 217 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_ROUT_FNAME "rout"

Definition at line 218 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_SOUT_FNAME "sout"

Definition at line 219 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_TEST_CHNUM 1

Definition at line 222 of file ecuauto.h.

#define ecu_AUTO_DEF_MIN_ERL ecu_AUTO_ERL_6DB

Definition at line 223 of file ecuauto.h.

#define ecu_AUTO_DEF_NLP_MODE ecu_AUTO_NLP_CNG_ON

Definition at line 224 of file ecuauto.h.

#define ecu_AUTO_DEF_FRAME_SZ (10*ecu_AUTO_SAMP_PER_MS)

Definition at line 225 of file ecuauto.h.

#define ecu_AUTO_DEF_Y2X_DELAY ecu_AUTO_DEF_FRAME_SZ

Definition at line 226 of file ecuauto.h.

#define ecu_AUTO_DEF_TAIL_LEN (128*ecu_AUTO_SAMP_PER_MS)

Definition at line 227 of file ecuauto.h.

#define ecu_AUTO_MIN_SEARCH (64*ecu_AUTO_SAMP_PER_MS)

Definition at line 228 of file ecuauto.h.

Referenced by ecuAuto_config_chn().

#define ecu_AUTO_DEF_HYB_ID 0xBBBB

Definition at line 231 of file ecuauto.h.

Referenced by ecu_auto_create_hyb().

#define ecu_AUTO_DEF_HYB_RX_DELAY 0

Definition at line 232 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_TX_DELAY 0

Definition at line 233 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_MODEL hyb_ST_G168_M1

Definition at line 234 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_ERL 6

Definition at line 235 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_DELAY (4*ecu_AUTO_SAMP_PER_MS)

Definition at line 236 of file ecuauto.h.

#define ecu_AUTO_DEF_SGN_DELAY 0

Definition at line 239 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), and ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_DCOFF 0

Definition at line 240 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), and ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_FREQ1 1004

Definition at line 241 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), and ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_AMP1 4096

Definition at line 242 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), and ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_NLEVEL (-70)

Definition at line 243 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), and ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_RX_NSEED 0x1234

Definition at line 244 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn().

#define ecu_AUTO_DEF_SGN_TX_NSEED 0x5678

Definition at line 245 of file ecuauto.h.

Referenced by ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_NTYPE sgn_NT_GAUSS

Definition at line 246 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn(), and ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_SLEVEL (-10)

Definition at line 247 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn().

#define ecu_AUTO_PRINT_DONE ( ) { ecu_auto_print (" DONE\n"); }

Definition at line 293 of file ecuauto.h.

Referenced by ecu_auto_close_fout(), ecu_auto_create_hyb(), ecu_auto_create_sgn(), ecu_auto_create_uta(), ecu_auto_init_rxsgn(), ecu_auto_init_txsgn(), ecuAuto_close_chn(), ecuAuto_config_chn(), ecuAuto_create_chn(), ecuAuto_delete_chn(), ecuAuto_get_filter(), and ecuAuto_open_chn().

Enumeration Type Documentation

enum ecuAutoErr_e

Enumerator:
ecu_AUTO_ERR_NONE
ecu_AUTO_ERR_HYBGETSZ
ecu_AUTO_ERR_HYBNEW
ecu_AUTO_ERR_HYBOPEN
ecu_AUTO_ERR_HYBCONTROL
ecu_AUTO_ERR_HYBECHO
ecu_AUTO_ERR_SGNGETSZ
ecu_AUTO_ERR_ECUNEW
ecu_AUTO_ERR_ECUGETSZ
ecu_AUTO_ERR_ECUCONTROL
ecu_AUTO_ERR_ECUGETFLT
ecu_AUTO_ERR_UTAGETSZ
ecu_AUTO_ERR_UTAINIT
ecu_AUTO_ERR_UTAADDMOD
ecu_AUTO_ERR_UTAPROC
ecu_AUTO_ERR_UTAMOD
ecu_AUTO_ERR_UTACMD
ecu_AUTO_ERR_UTAIDX
ecu_AUTO_ERR_UTAOPT
ecu_AUTO_ERR_CREATECHN
ecu_AUTO_ERR_DELETECHN
ecu_AUTO_ERR_OPENCHN
ecu_AUTO_ERR_CONFIGCHN
ecu_AUTO_ERR_CLOSECHN
ecu_AUTO_ERR_NUMBUF
ecu_AUTO_ERR_GETFILTER
ecu_AUTO_ERR_GETVERSION

Definition at line 58 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_NOERR
ecu_AUTO_ERR

Definition at line 89 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_RXSGN
ecu_AUTO_TXSGN

Definition at line 95 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_MOD_SGN
ecu_AUTO_MOD_HYB
ecu_AUTO_MOD_ECU

Definition at line 101 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_MRK_NONE
ecu_AUTO_MRK_PRE
ecu_AUTO_MRK_POST

Definition at line 108 of file ecuauto.h.

enum ecuPcm_e

Enumerator:
ecu_AUTO_PCM_ALAW
ecu_AUTO_PCM_ULAW
ecu_AUTO_PCM_LIN

Definition at line 115 of file ecuauto.h.

enum ecuNlp_e

Enumerator:
ecu_AUTO_NLP_OFF
ecu_AUTO_NLP_ON
ecu_AUTO_NLP_CNG_ON

Definition at line 122 of file ecuauto.h.

enum ecuErl_e

Enumerator:
ecu_AUTO_ERL_6DB
ecu_AUTO_ERL_3DB
ecu_AUTO_ERL_0DB

Definition at line 129 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_FILE_RIN
ecu_AUTO_FILE_ROUT
ecu_AUTO_FILE_SIN
ecu_AUTO_FILE_SOUT
ecu_AUTO_NUM_OUTFILES

Definition at line 136 of file ecuauto.h.

Function Documentation

void ecuAuto_process_loop ( ecuAutoLoopCfg_t * cfg )

Definition at line 244 of file ecuauto.c.

References autoCfg, ecuAutoConfig_t::cache_flush, ecuAutoLoopCfg_t::chn_index, ecu_auto_banner_print(), ecu_auto_check_rc(), ecu_auto_compand(), ecu_auto_dline_pack(), ecu_auto_dline_unpack(), ecu_AUTO_ERR_HYBECHO, ecu_auto_gen_sgnfrms(), ecu_AUTO_MRK_POST, ecu_AUTO_MRK_PRE, ecu_auto_output_pcm(), ecu_AUTO_SAMP_PER_MS, ecu_auto_sample_cnt(), ecuAutoEcuInst, ecuAutoFrameSize, ecuAutoFrmIndex, ecuAutoFrmRemain, ecuAutoHybInst, ecuAutoLoopCfg_t::enable_out, ecuAutoConfig_t::iteration, ecuAutoLoopCfg_t::marker, ecuAutoLoopCfg_t::pcm_format, rinBuffer, routBuffer, sgnrxBuffer, sgntxBuffer, sinBuffer, soutBuffer, and ecuAutoLoopCfg_t::time_ms.

Referenced by ecucmd_runsim_handler().

Here is the call graph for this function:

void ecuAuto_prep_fout ( void )

Definition at line 331 of file ecuauto.c.

References ecu_AUTO_NUM_OUTFILES, ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), ecu_AUTO_PCM_ALAW, ecu_AUTO_PCM_LIN, ecu_AUTO_PCM_ULAW, ecu_auto_sprint(), file_string, ecuAutoFout_t::fname, ecuAutoFout_t::fptr, outFile, ecuAutoFout_t::output_data, ecuAutoFout_t::pcm_format, and ecuAutoFout_t::pcmout_fcn.

Here is the call graph for this function:

tuint ecuAuto_create_chn | ( | tint | index,
 |  | ecuNewConfig_t * | ncfg,
 |  | ecuMemConfig_t * | mcfg
 | ) |  |

Definition at line 395 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR, ecu_AUTO_ERR_CREATECHN, ecu_AUTO_ERR_ECUGETSZ, ecu_AUTO_ERR_ECUNEW, ecu_AUTO_ERR_NUMBUF, ecu_auto_iprint(), ecu_AUTO_MAX_ECOBUFS, ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, ecu_mem_alloc_eco(), and ecuAutoEcuInst.

Referenced by ecucmd_chnnew_handler().

Here is the call graph for this function:

tuint ecuAuto_open_chn | ( | tint | index,
 |  | ecuConfig_t * | cfg
 | ) |  |

Definition at line 436 of file ecuauto.c.

References ecu_AUTO_ERR_OPENCHN, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecuAutoEcuInst, ecuAutoFrameSize, ecuBuild, ecuPatch, ecuRevision, and ecuVersion.

Referenced by ecucmd_open_handler().

Here is the call graph for this function:

tuint ecuAuto_config_chn | ( | tint | index,
 |  | ecuChnConfig_t * | cfg
 | ) |  |

Definition at line 516 of file ecuauto.c.

References ecuChnConfig_t::bypass, ecu_AUTO_CHCFG_BYP_VALID, ecu_AUTO_CHCFG_CLR_VALID, ecu_AUTO_CHCFG_ERL_VALID, ecu_AUTO_CHCFG_HLD_VALID, ecu_AUTO_CHCFG_NLP_VALID, ecu_auto_check_rc(), ecu_AUTO_ERL_0DB, ecu_AUTO_ERL_3DB, ecu_AUTO_ERL_6DB, ecu_AUTO_ERR, ecu_AUTO_ERR_CONFIGCHN, ecu_AUTO_ERR_ECUCONTROL, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_MIN_SEARCH, ecu_AUTO_NLP_CNG_ON, ecu_AUTO_NLP_OFF, ecu_AUTO_NLP_ON, ecu_AUTO_NOERR, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecuAutoEcuInst, ecuChnConfig_t::hreg_clear, ecuChnConfig_t::hreg_hold, ecuChnConfig_t::min_erl, ecuChnConfig_t::nlp_mode, and ecuChnConfig_t::valid_bitfield.

Referenced by ecucmd_chncfg_handler().

Here is the call graph for this function:

tuint ecuAuto_close_chn ( tint index )

Definition at line 719 of file ecuauto.c.

References ecu_AUTO_ERR_CLOSECHN, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, and ecuAutoEcuInst.

Referenced by ecucmd_close_handler().

Here is the call graph for this function:

tuint ecuAuto_delete_chn ( tint index )

Definition at line 745 of file ecuauto.c.

References ecu_AUTO_ERR_DELETECHN, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, and ecuAutoEcuInst.

Referenced by ecucmd_chndel_handler().

Here is the call graph for this function:

tuint ecuAuto_get_filter | ( | tint | index,
 |  | tint | filter,
 |  | char * | fname
 | ) |  |

Definition at line 771 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_GETFLT_BSIZE, ecu_AUTO_ERR_DELETECHN, ecu_AUTO_ERR_ECUGETFLT, ecu_AUTO_ERR_GETFILTER, ecu_auto_iprint(), ecu_AUTO_MAX_INST, ecu_AUTO_NOERR, ecu_AUTO_PRINT_DONE, ecu_auto_sprint(), and ecuAutoEcuInst.

Referenced by ecucmd_getflt_handler().

Here is the call graph for this function:

void ecu_auto_exception | ( | tuint | id,
 |  | tuint | type,
 |  | tuint | code,
 |  | tuint | length,
 |  | tuint * | data
 | ) |  |

Definition at line 109 of file ecuauto.c.

void ecu_auto_halt ( void )

void lec_auto_initialize ( void )

Definition at line 997 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::cache_enable, ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT, ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_NUM_OUTFILES, ecu_auto_print(), ecu_AUTO_SGN_BUF_SZ, ecu_mem_init_heap(), ecuAutoEcuInst, ecuAutoFrmIndex, ecuAutoFrmRemain, ecuAutoHybInst, ecuAutoSgnInst, ecuAutoUtaInst, ecuAutoFout_t::hold_buf_sz, ecuAutoFout_t::hold_count, outFile, ecuAutoFout_t::output_data, ecuAutoFout_t::output_flush, ecuAutoFout_t::output_mark, ecuAutoConfig_t::output_rin, ecuAutoConfig_t::output_rout, ecuAutoConfig_t::output_sin, ecuAutoConfig_t::output_sout, ecuAutoConfig_t::pcm_hold_sz, ecuAutoFout_t::pcmout_fcn, rinBuffer, routBuffer, sgnrxBuffer, sgntxBuffer, sinBuffer, and soutBuffer.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_set_defaults ( void )

Definition at line 937 of file ecuauto.c.

References autoBreak, autoCfg, AutoDssMemAddr, AutoDssMemCount, autoErrorId, ecuAutoConfig_t::cache_enable, ecuAutoConfig_t::cache_flush, ecuAutoConfig_t::dss_output, ecu_AUTO_DEF_PCM_FORMAT, ecu_AUTO_DEF_PCM_HOLD_BSIZE, ecu_AUTO_DEF_RIN_FNAME, ecu_AUTO_DEF_ROUT_FNAME, ecu_AUTO_DEF_SIN_FNAME, ecu_AUTO_DEF_SOUT_FNAME, ecu_AUTO_ERR_NONE, ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT, ecu_AUTO_MAX_INST, ecu_auto_print(), ecuAutoEcuInst, ecuAutoFout_t::file_type, ecuAutoConfig_t::get_filter, ecuAutoConfig_t::iteration, outFile, ecuAutoConfig_t::output_rin, ecuAutoConfig_t::output_rout, ecuAutoConfig_t::output_sin, ecuAutoConfig_t::output_sout, ecuAutoFout_t::pcm_format, ecuAutoConfig_t::pcm_hold_sz, ecuAutoConfig_t::sample_bp, ecuAutoConfig_t::sample_cnt, ecuAutoConfig_t::second_cnt, and ecuAutoConfig_t::verbose_print.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_check_rc | ( | ecuAutoErr_e | id,
 |  | tuint | rc,
 |  | tuint | pass_code
 | ) |  |

Definition at line 170 of file ecuauto.c.

References autoErrorId, and ecu_auto_iprint().

Referenced by ecu_auto_addmod_uta(), ecu_auto_create_hyb(), ecu_auto_create_sgn(), ecu_auto_create_uta(), ecu_auto_process_uta(), ecuAuto_config_chn(), ecuAuto_create_chn(), ecuAuto_get_filter(), ecuAuto_process_loop(), ecucmd_chncfg_handler(), ecucmd_chndel_handler(), ecucmd_chnnew_handler(), ecucmd_close_handler(), ecucmd_getflt_handler(), and ecucmd_open_handler().

Here is the call graph for this function:

void ecu_auto_init_rxsgn ( void )

Definition at line 1072 of file ecuauto.c.

References ecu_AUTO_DEF_FS, ecu_AUTO_DEF_SGN_AMP1, ecu_AUTO_DEF_SGN_DCOFF, ecu_AUTO_DEF_SGN_DELAY, ecu_AUTO_DEF_SGN_FREQ1, ecu_AUTO_DEF_SGN_NLEVEL, ecu_AUTO_DEF_SGN_NTYPE, ecu_AUTO_DEF_SGN_RX_NSEED, ecu_AUTO_DEF_SGN_SLEVEL, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_AUTO_RXSGN, and ecuAutoSgnInst.

Here is the call graph for this function:

void ecu_auto_init_txsgn ( void )

Definition at line 1117 of file ecuauto.c.

References ecu_AUTO_DEF_FS, ecu_AUTO_DEF_SGN_AMP1, ecu_AUTO_DEF_SGN_DCOFF, ecu_AUTO_DEF_SGN_DELAY, ecu_AUTO_DEF_SGN_FREQ1, ecu_AUTO_DEF_SGN_NLEVEL, ecu_AUTO_DEF_SGN_NTYPE, ecu_AUTO_DEF_SGN_TX_NSEED, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_AUTO_TXSGN, and ecuAutoSgnInst.

Here is the call graph for this function:

void ecu_auto_gen_sgnfrms ( void )

Definition at line 862 of file ecuauto.c.

References ecu_AUTO_RXSGN, ecu_AUTO_SGN_FRAME_SZ, ecu_AUTO_TXSGN, ecuAutoFrameSize, ecuAutoFrmIndex, ecuAutoFrmRemain, ecuAutoSgnInst, sgnrxBuffer, and sgntxBuffer.

Referenced by ecuAuto_process_loop().

void ecu_auto_addmod_uta ( tint module )

Definition at line 894 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_UTAADDMOD, ecu_AUTO_MOD_ECU, ecu_AUTO_MOD_HYB, ecu_AUTO_MOD_SGN, ecu_AUTO_NUM_HYB_INST, ecu_AUTO_NUM_SGN_INST, ecuAutoHybInst, ecuAutoSgnInst, ecuAutoUtaInst, ecucmd_AUTO_NUM_CMD, and ecuCommands.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_create_sgn ( void ** inst )

Definition at line 1634 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_SGNGETSZ, ecu_auto_print(), ecu_AUTO_PRINT_DONE, and ecu_mem_alloc_align().

Referenced by main().

Here is the call graph for this function:

void ecu_auto_create_hyb ( void )

Definition at line 1581 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_HYB_ID, ecu_AUTO_DEF_INIT_PATTERN, ecu_AUTO_ERR, ecu_AUTO_ERR_HYBGETSZ, ecu_AUTO_ERR_HYBNEW, ecu_AUTO_ERR_NUMBUF, ecu_AUTO_MAX_DELAY, ecu_AUTO_MAX_ECOBUFS, ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_MAX_TAIL_LEN, ecu_AUTO_NOERR, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_mem_alloc_eco(), ecuAutoHybInst, ecuMemConfig_t::init_pattern, and ecuMemConfig_t::pre_init_bufs.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_create_uta ( void )

Definition at line 1552 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_UTA_FNAME, ecu_AUTO_ERR_UTAGETSZ, ecu_AUTO_ERR_UTAINIT, ecu_auto_print(), ecu_AUTO_PRINT_DONE, ecu_mem_alloc_align(), and ecuAutoUtaInst.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_process_uta ( void )

Definition at line 1510 of file ecuauto.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_UTACMD, ecu_AUTO_ERR_UTAIDX, ecu_AUTO_ERR_UTAMOD, ecu_AUTO_ERR_UTAOPT, ecu_AUTO_ERR_UTAPROC, ecu_auto_print(), and ecuAutoUtaInst.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_sample_cnt ( void )

Definition at line 1256 of file ecuauto.c.

References autoCfg, ecu_AUTO_DEF_FS, ecu_auto_iprint(), ecuAutoFrameSize, ecuAutoConfig_t::sample_bp, ecuAutoConfig_t::sample_cnt, and ecuAutoConfig_t::second_cnt.

Referenced by ecuAuto_process_loop().

Here is the call graph for this function:

void ecu_auto_compand | ( | tint | pcm_format,
 |  | linSample * | in,
 |  | linSample * | out
 | ) |  |

Definition at line 1162 of file ecuauto.c.

References ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_PCM_ALAW, ecu_AUTO_PCM_LIN, ecu_AUTO_PCM_ULAW, and ecuAutoFrameSize.

Referenced by ecuAuto_process_loop().

void ecu_auto_close_fout ( void )

Definition at line 1460 of file ecuauto.c.

References ecu_AUTO_NUM_OUTFILES, ecu_auto_output_pcm(), ecu_AUTO_PCM_ALAW, ecu_AUTO_PCM_LIN, ecu_AUTO_PCM_ULAW, ecu_AUTO_PRINT_DONE, ecu_auto_sprint(), file_string, ecuAutoFout_t::fname, ecuAutoFout_t::fptr, outFile, ecuAutoFout_t::output_data, and ecuAutoFout_t::pcm_format.

Referenced by main().

Here is the call graph for this function:

void ecu_auto_output_pcm | ( | tbool | enable,
 |  | tbool | marker,
 |  | tbool | flush
 | ) |  |

Definition at line 1433 of file ecuauto.c.

References ecu_AUTO_NUM_OUTFILES, outFile, ecuAutoFout_t::output_flush, ecuAutoFout_t::output_mark, and ecuAutoFout_t::pcmout_fcn.

Referenced by ecu_auto_close_fout(), and ecuAuto_process_loop().

void ecu_auto_output_ulaw ( void * vfout )

Definition at line 1339 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::dss_output, ecu_AUTO_MARK_SIZE, ecu_AUTO_MAX_FRAME_SZ, ecu_auto_write_pcm(), ecuAutoFrameSize, ecuAutoFout_t::fptr, markBuffer, ecuAutoFout_t::output_data, and ecuAutoFout_t::output_mark.

Referenced by ecuAuto_prep_fout().

Here is the call graph for this function:

void ecu_auto_output_alaw ( void * vfout )

Definition at line 1374 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::dss_output, ecu_AUTO_MARK_SIZE, ecu_AUTO_MAX_FRAME_SZ, ecu_auto_write_pcm(), ecuAutoFrameSize, ecuAutoFout_t::fptr, markBuffer, ecuAutoFout_t::output_data, and ecuAutoFout_t::output_mark.

Referenced by ecuAuto_prep_fout().

Here is the call graph for this function:

void ecu_auto_output_lin ( void * vfout )

Definition at line 1409 of file ecuauto.c.

References autoCfg, ecuAutoFout_t::buf, ecuAutoConfig_t::dss_output, ecu_AUTO_MARK_SIZE, ecuAutoFrameSize, ecuAutoFout_t::fptr, markBuffer, and ecuAutoFout_t::output_mark.

Referenced by ecuAuto_prep_fout().

void ecu_auto_dline_pack | ( | tint | pcm_format,
 |  | linSample * | in,
 |  | tword * | out
 | ) |  |

Definition at line 1203 of file ecuauto.c.

References ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_PCM_ALAW, and ecuAutoFrameSize.

Referenced by ecuAuto_process_loop().

void ecu_auto_dline_unpack | ( | tint | pcm_format,
 |  | tword * | in,
 |  | linSample * | out
 | ) |  |

Definition at line 1225 of file ecuauto.c.

References ecu_AUTO_MAX_FRAME_SZ, ecu_AUTO_PCM_ALAW, and ecuAutoFrameSize.

Referenced by ecuAuto_process_loop().

Variable Documentation

ecuAutoFout_t outFile[]

Definition at line 61 of file ecuauto.c.

Referenced by ecu_auto_close_fout(), ecu_auto_output_pcm(), ecu_auto_set_defaults(), ecuAuto_prep_fout(), ecucmd_output_handler(), and lec_auto_initialize().


ECU Test: ecuauto.h Source File

  • File List
  • Globals

ecuauto.h

Go to the documentation of this file.
00001 #ifndef _ECUAUTO_H
00002 #define _ECUAUTO_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Definitions and prototypes for ECU Automation.
00005  ******************************************************************************
00006  * FILE NAME:   ecuauto.h
00007  *
00008  * DESCRIPTION: Contains definitions and function prototypes for ECU
00009  *              Automation.
00010  *
00011  * (C) Copyright 2009 Texas Instruments, Inc.
00012  *****************************************************************************/
00013
00014 /* ANSI C headers */
00015 #include <stdlib.h>
00016 #include <stdio.h>
00017 #include <string.h>
00018
00019 /* RTSC headers */
00020 #include <ti/mas/types/types.h>
00021 #include <ti/mas/types/const.h>
00022 #include <ti/mas/util/ecomem.h>
00023 #include <ti/mas/util/utl.h>
00024 #include <ti/mas/util/mua.h>
00025 #include <ti/mas/sdk/hyb.h>
00026 #include <ti/mas/sdk/sgn.h>
00027
00028 /* ECU Unit Test headers */
00029 #include <ti/mas/ecu/test/src/ecumem.h>
00030 #include <ti/mas/ecu/test/src/ecuautoport.h>
00031
00032
00033 /* Simulation constraints */
00034 #define ecu_AUTO_MAX_INST          1     /* Maximum ECU Instances        */
00035 #define ecu_AUTO_MAX_ECOBUFS      20     /* Maximum module buffers       */
00036 #define ecu_AUTO_MAX_STRING      256     /* Maximum string size          */
00037 #define ecu_AUTO_DEF_FS         8000     /* Sampling frequency           */
00038 #define ecu_AUTO_NUM_SGN_INST      2     /* Number of signal generators  */
00039 #define ecu_AUTO_NUM_HYB_INST      1     /* Number of hybrid simulations */
00040 #define ecu_AUTO_MARK_SIZE         8     /* Number of samples in marker  */
00041 #define ecu_AUTO_SAMP_PER_MS    (ecu_AUTO_DEF_FS/1000)     /* Samples per ms */
00042 #define ecu_AUTO_MAX_DELAY      (10 *ecu_AUTO_SAMP_PER_MS) /* Maximum system delay */
00043 #define ecu_AUTO_SGN_FRAME_SZ   (40 *ecu_AUTO_SAMP_PER_MS) /* SigGen frame size  */
00044 #define ecu_AUTO_MAX_FRAME_SZ   (10 *ecu_AUTO_SAMP_PER_MS) /* Max ECU frame size */
00045 #define ecu_AUTO_SGN_BUF_SZ     (ecu_AUTO_SGN_FRAME_SZ+(2*ecu_AUTO_MAX_FRAME_SZ))
00046
00047 #if ecu_SEARCH_ENABLE
00048 # define ecu_AUTO_MAX_TAIL_LEN   (128*ecu_AUTO_SAMP_PER_MS) /* Maximum tail length     */
00049 # define ecu_AUTO_MAX_SEG_LEN    (32 *ecu_AUTO_SAMP_PER_MS) /* Maximum seg length      */
00050 # define ecu_AUTO_MAX_SEG_NUM     3                         /* Maximum filter segments */
00051 #else
00052 # define ecu_AUTO_MAX_TAIL_LEN   (32 *ecu_AUTO_SAMP_PER_MS) /* Maximum tail length      */
00053 # define ecu_AUTO_MAX_SEG_LEN    (32 *ecu_AUTO_SAMP_PER_MS) /* Maximum seg length       */
00054 # define ecu_AUTO_MAX_SEG_NUM     1                         /* Maximum filter segments  */
00055 #endif
00056
00057 /* Error identifier enumerations */
00058 typedef enum {
00059   ecu_AUTO_ERR_NONE        = 0x0000,     /* ECU NO ERROR           */
00060   ecu_AUTO_ERR_HYBGETSZ    = 0x1000,     /* HYB API ERRORS         */
00061   ecu_AUTO_ERR_HYBNEW,                   /* hybNew()               */
00062   ecu_AUTO_ERR_HYBOPEN,                  /* hybOpen()              */
00063   ecu_AUTO_ERR_HYBCONTROL,               /* hybControl()           */
00064   ecu_AUTO_ERR_HYBECHO,                  /* hybAddEcho()           */
00065   ecu_AUTO_ERR_SGNGETSZ    = 0x2000,     /* SGN API ERRORS         */
00066   ecu_AUTO_ERR_ECUNEW      = 0x3000,     /* ECU API ERRORS         */
00067   ecu_AUTO_ERR_ECUGETSZ,                 /* ecuGetSizes()          */
00068   ecu_AUTO_ERR_ECUCONTROL,               /* ecuControl()           */
00069   ecu_AUTO_ERR_ECUGETFLT,                /* ecuGetFilter()         */
00070   ecu_AUTO_ERR_UTAGETSZ    = 0x4000,     /* UTA API ERRORS         */
00071   ecu_AUTO_ERR_UTAINIT,                  /* utaInit()              */
00072   ecu_AUTO_ERR_UTAADDMOD,                /* utaAddModule()         */
00073   ecu_AUTO_ERR_UTAPROC,                  /* utaProcess()           */
00074   ecu_AUTO_ERR_UTAMOD,                   /* utaProcess MOD error   */
00075   ecu_AUTO_ERR_UTACMD,                   /* utaProcess CMD error   */
00076   ecu_AUTO_ERR_UTAIDX,                   /* utaProcess IDX error   */
00077   ecu_AUTO_ERR_UTAOPT,                   /* utaProcess OPT error   */
00078   ecu_AUTO_ERR_CREATECHN   = 0x6000,     /* ECU AUTO API ERRORS    */
00079   ecu_AUTO_ERR_DELETECHN,                /* ecuAuto_delete_chn()   */
00080   ecu_AUTO_ERR_OPENCHN,                  /* ecuAuto_open_chn()     */
00081   ecu_AUTO_ERR_CONFIGCHN,                /* ecuAuto_config_chn()   */
00082   ecu_AUTO_ERR_CLOSECHN,                 /* ecuAuto_close_chn()    */
00083   ecu_AUTO_ERR_NUMBUF,                   /* ecu_AUTO_MAX_ECOBUFS   */
00084   ecu_AUTO_ERR_GETFILTER,                /* ecuAuto_get_filter()   */
00085   ecu_AUTO_ERR_GETVERSION                /* ecuAuto_prnt_version() */
00086 } ecuAutoErr_e;
00087
00088 /* Automation error indication  */
00089 enum {
00090   ecu_AUTO_NOERR,                            /* Simulation function pass         */
00091   ecu_AUTO_ERR                               /* Simulation function failure      */
00092 };
00093
00094 /* Signal generator enumeration */
00095 enum {
00096   ecu_AUTO_RXSGN,                            /* RX path signal generator         */
00097   ecu_AUTO_TXSGN                             /* TX path signal generator         */
00098 };
00099
00100 /* Module enumeration for UTA */
00101 enum {
00102   ecu_AUTO_MOD_SGN,                          /* Signal generator module          */
00103   ecu_AUTO_MOD_HYB,                          /* Hybrid simulation module         */
00104   ecu_AUTO_MOD_ECU                           /* ECU ECAN module                  */
00105 };
00106
00107 /* Marker enumeration for UTA */
00108 enum {
00109   ecu_AUTO_MRK_NONE,                          /* Provide no marker               */
00110   ecu_AUTO_MRK_PRE,                           /* Provide marker before data      */
00111   ecu_AUTO_MRK_POST                           /* Provide marker after data       */
00112 };
00113
00114 /* Automation PCM format enumeration */
00115 typedef enum {
00116   ecu_AUTO_PCM_ALAW  = const_COMP_ALAW_8,    /* 8-bit ulaw PCM                   */
00117   ecu_AUTO_PCM_ULAW  = const_COMP_MULAW_8,   /* 8-bit alaw PCM                   */
00118   ecu_AUTO_PCM_LIN   = const_COMP_LINEAR     /* Linear PCM (Platform-Endian)     */
00119 } ecuPcm_e;
00120
00121 /* Automation NLP configuration */
00122 typedef enum {
00123   ecu_AUTO_NLP_OFF    = 0x0000,              /* NLP disabled                     */
00124   ecu_AUTO_NLP_ON     = ecu_ENABLE_NLP,      /* NLP enabled, CNG fixed           */
00125   ecu_AUTO_NLP_CNG_ON = ecu_ENABLE_CNG_ADAPT /* NLP enabled, CNG adaptive        */
00126 } ecuNlp_e;
00127
00128 /* Automation minimum ERL configuration */
00129 typedef enum {
00130   ecu_AUTO_ERL_6DB = 0x0000,                 /* Minimum ERL expected - 6dB       */
00131   ecu_AUTO_ERL_3DB = ecu_ERL_CONFIG_BIT_0,   /* Minimum ERL expected - 3dB       */
00132   ecu_AUTO_ERL_0DB = ecu_ERL_CONFIG_BIT_1    /* Minimum ERL expected - 0dB       */
00133 } ecuErl_e;
00134
00135 /* Automation Output file enumeration */
00136 enum {
00137   ecu_AUTO_FILE_RIN,                         /* Rin file in file array           */
00138   ecu_AUTO_FILE_ROUT,                        /* Rout file in file array          */
00139   ecu_AUTO_FILE_SIN,                         /* Sin file in file array           */
00140   ecu_AUTO_FILE_SOUT,                        /* Sout file in file array          */
00141   ecu_AUTO_NUM_OUTFILES                      /* Size of output file array        */
00142 };
00143
00144 /* ECU PCM file output structure */
00145 typedef struct {
00146   tbool     output_data;                    /* TRUE: Output PCM data            */
00147   tbool     output_mark;                    /* TRUE: Output a marker            */
00148                                             /*   "output_data" must be TRUE     */
00149   tbool     output_flush;                   /* TRUE: Flush output               */
00150   ecuPcm_e  pcm_format;                     /* PCM output format                */
00151   tint      file_type;                      /* File type enumeration            */
00152   FILE      *fptr;                          /* File pointer for read/write      */
00153   linSample *buf;                           /* Buffer from which to output      */
00154   tword     *hold_buf;                      /* Holding buffer between FWRITEs   */
00155   tlong     hold_buf_sz;                    /* Size of holding buf (bytes)      */
00156   tint      hold_count;                     /* Current hold count               */
00157   char      fname[ecu_AUTO_MAX_STRING];      /* File name for output data        */
00158   void      (*pcmout_fcn) (void *fout);     /* PCM output fcn (READ ONLY)       */
00159 } ecuAutoFout_t;
00160 extern ecuAutoFout_t outFile[];
00161
00162 /* ECU Channel configuration structure */
00163 typedef struct {
00164   tuint    valid_bitfield;                  /* Designates valid parameters      */
00165   ecuNlp_e nlp_mode;                        /* NLP/CNG mode                     */
00166   ecuErl_e min_erl;                         /* Minimum expected ERL             */
00167   tbool    bypass;                          /* TRUE: Channel placed in bypass   */
00168   tbool    hreg_hold;                       /* TRUE: H-register contents frozen */
00169   tbool    hreg_clear;                      /* TRUE: H-register contents reset  */
00170 } ecuChnConfig_t;
00171
00172 /* Definitions for ecuChnConfig_t valid_bitfield */
00173 #define ecu_AUTO_CHCFG_NLP_VALID    0x0001  /* NLP configuration change         */
00174 #define ecu_AUTO_CHCFG_ERL_VALID    0x0002  /* Minimum ERL setting change       */
00175 #define ecu_AUTO_CHCFG_BYP_VALID    0x0004  /* ECU Bypass requested             */
00176 #define ecu_AUTO_CHCFG_HLD_VALID    0x0008  /* H-register hold config change    */
00177 #define ecu_AUTO_CHCFG_CLR_VALID    0x0010  /* H-register clear requested       */
00178
00179 /* ECU Run-time parameter structure */
00180 typedef struct {
00181   tint  pcm_format;                         /* PCM companding law               */
00182   tint  chn_index;                          /* Index of channel under test      */
00183   tint  marker;                             /* Marker type enumeration          */
00184   tlong time_ms;                            /* Time (ms) to process             */
00185   tbool enable_out;                         /* TRUE: Perform sample output      */
00186 } ecuAutoLoopCfg_t;
00187
00188 /* Automation configuration structure */
00189 typedef struct {
00190   /* Automation configuration booleans */
00191   tbool verbose_print;                      /* TRUE: Provide progress info      */
00192   tbool cache_enable;                       /* TRUE: Enable and configure cache */
00193   tbool cache_flush;                        /* TRUE: Flush cache each pass      */
00194   tbool get_filter;                         /* TRUE: Dump online filter coeffs  */
00195   tbool dss_output;                         /* TRUE: Output file data via DSS   */
00196   tbool output_rin;                         /* Rin PCM output structure         */
00197   tbool output_sin;                         /* Sin PCM output structure         */
00198   tbool output_rout;                        /* Rout PCM output structure        */
00199   tbool output_sout;                        /* Sout PCM output structure        */
00200
00201   tuint iteration;                          /* Main loop iteration count        */
00202   tlong pcm_hold_sz;                        /* Size of local PCM buffer (bytes) */
00203   tlong sample_cnt;                         /* Overall processed sample counter */
00204   tlong second_cnt;                         /* Seconds counter                  */
00205   tlong sample_bp;                          /* Break when sample_bp is reached  */
00206 } ecuAutoConfig_t;
00207
00208
00209 /* Simulation defaults */
00210 #define ecu_AUTO_DEF_PCM_FORMAT        ecu_AUTO_PCM_ULAW
00211 #define ecu_AUTO_DEF_INIT_PATTERN      0x55
00212 #define ecu_AUTO_DEF_GETFLT_BSIZE      128
00213 #define ecu_AUTO_DEF_PCM_HOLD_BSIZE    ecu_AUTO_PCM_BSIZE
00214 #define ecu_AUTO_DEF_UTA_FNAME         "test.tdf"
00215 #define ecu_AUTO_DEF_GETFLT_FNAME      "hreg.txt"
00216 #define ecu_AUTO_DEF_RIN_FNAME         "rin"
00217 #define ecu_AUTO_DEF_SIN_FNAME         "sin"
00218 #define ecu_AUTO_DEF_ROUT_FNAME        "rout"
00219 #define ecu_AUTO_DEF_SOUT_FNAME        "sout"
00220
00221 /* Channel defaults */
00222 #define ecu_AUTO_DEF_TEST_CHNUM        1
00223 #define ecu_AUTO_DEF_MIN_ERL           ecu_AUTO_ERL_6DB
00224 #define ecu_AUTO_DEF_NLP_MODE          ecu_AUTO_NLP_CNG_ON
00225 #define ecu_AUTO_DEF_FRAME_SZ          (10*ecu_AUTO_SAMP_PER_MS)
00226 #define ecu_AUTO_DEF_Y2X_DELAY         ecu_AUTO_DEF_FRAME_SZ
00227 #define ecu_AUTO_DEF_TAIL_LEN          (128*ecu_AUTO_SAMP_PER_MS)
00228 #define ecu_AUTO_MIN_SEARCH            (64*ecu_AUTO_SAMP_PER_MS)
00229
00230 /* Hybrid defaults */
00231 #define ecu_AUTO_DEF_HYB_ID            0xBBBB
00232 #define ecu_AUTO_DEF_HYB_RX_DELAY      0
00233 #define ecu_AUTO_DEF_HYB_TX_DELAY      0
00234 #define ecu_AUTO_DEF_HYB_MODEL         hyb_ST_G168_M1
00235 #define ecu_AUTO_DEF_HYB_ERL           6
00236 #define ecu_AUTO_DEF_HYB_DELAY         (4*ecu_AUTO_SAMP_PER_MS)
00237
00238 /* Signal generator defaults */
00239 #define ecu_AUTO_DEF_SGN_DELAY         0
00240 #define ecu_AUTO_DEF_SGN_DCOFF         0
00241 #define ecu_AUTO_DEF_SGN_FREQ1         1004
00242 #define ecu_AUTO_DEF_SGN_AMP1          4096
00243 #define ecu_AUTO_DEF_SGN_NLEVEL        (-70)
00244 #define ecu_AUTO_DEF_SGN_RX_NSEED      0x1234
00245 #define ecu_AUTO_DEF_SGN_TX_NSEED      0x5678
00246 #define ecu_AUTO_DEF_SGN_NTYPE         sgn_NT_GAUSS
00247 #define ecu_AUTO_DEF_SGN_SLEVEL        (-10)
00248
00249
00250 /* Simulation Specific Function Prototypes */
00251 void ecuAuto_process_loop (ecuAutoLoopCfg_t *cfg);
00252 void ecuAuto_prep_fout    (void);
00253
00254 /* ECU Channel Function Prototypes */
00255 tuint ecuAuto_create_chn  (tint index, ecuNewConfig_t *ncfg, ecuMemConfig_t *mcfg);
00256 tuint ecuAuto_open_chn    (tint index, ecuConfig_t *cfg);
00257 tuint ecuAuto_config_chn  (tint index, ecuChnConfig_t *cfg);
00258 tuint ecuAuto_close_chn   (tint index);
00259 tuint ecuAuto_delete_chn  (tint index);
00260 tuint ecuAuto_get_filter  (tint index, tint filter, char *fname);
00261
00262
00263 /* ECU Automation internal API functions ("ecu_auto_") */
00264 void ecu_auto_exception    (tuint id, tuint type, tuint code, tuint length, tuint *data);
00265 void ecu_auto_halt         (void);
00266 void lec_auto_initialize   (void);
00267 void ecu_auto_set_defaults (void);
00268 void ecu_auto_check_rc     (ecuAutoErr_e id, tuint rc, tuint pass_code);
00269 void ecu_auto_init_rxsgn   (void);
00270 void ecu_auto_init_txsgn   (void);
00271 void ecu_auto_gen_sgnfrms  (void);
00272 void ecu_auto_addmod_uta   (tint module);
00273 void ecu_auto_create_sgn   (void **inst);
00274 void ecu_auto_create_hyb   (void);
00275 void ecu_auto_create_uta   (void);
00276 void ecu_auto_process_uta  (void);
00277 void ecu_auto_sample_cnt   (void);
00278 void ecu_auto_compand      (tint pcm_format, linSample *in, linSample *out);
00279 void ecu_auto_close_fout   (void);
00280 void ecu_auto_output_pcm   (tbool enable, tbool marker, tbool flush);
00281 void ecu_auto_output_ulaw  (void *vfout);
00282 void ecu_auto_output_alaw  (void *vfout);
00283 void ecu_auto_output_lin   (void *vfout);
00284 void ecu_auto_dline_pack   (tint pcm_format, linSample *in, tword *out);
00285 void ecu_auto_dline_unpack (tint pcm_format, tword *in, linSample *out);
00286
00287
00288 /*-----------------------------------------------------------------
00289  * Macro:  ecu_AUTO_PRINT_DONE
00290  *
00291  * Description: Utility to print completion of a task.
00292  *-----------------------------------------------------------------*/
00293 #define ecu_AUTO_PRINT_DONE() { ecu_auto_print (" DONE\n"); }
00294
00295 #endif /* _ECUAUTO_H */
00296
00297 /* Nothing past this point */


ECU Test: ecuautoport.h File Reference

  • File List
  • Globals

ecuautoport.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | ecu_SEARCH_ENABLE FALSE
#define | ecu_WIDE_BAND FALSE
#define | ecu_DELAY_LINE_COMPRESS FALSE
#define | ecu_INST_RELOCATION FALSE
#define | ecu_5P5MS_FRAME_ENABLE FALSE
#define | ecu_DBGSTRM_ENABLE FALSE
#define | ecu_03DB_ENABLE FALSE
#define | ecu_CPD_ENABLE FALSE
#define | ecu_RERL_ENABLE FALSE
#define | _ECUAUTOPORT_C54 0
#define | _ECUAUTOPORT_C54F 0
#define | _ECUAUTOPORT_C55 0
#define | _ECUAUTOPORT_C55L 0
#define | _ECUAUTOPORT_C64 0
#define | _ECUAUTOPORT_C64_BIG_ENDIAN 0
#define | _ECUAUTOPORT_C64P 0
#define | _ECUAUTOPORT_C64P_BIG_ENDIAN 0
#define | _ECUAUTOPORT_ELF_C64P 0
#define | _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 0
#define | _ECUAUTOPORT_C66 0
#define | _ECUAUTOPORT_ELF_C66 0
#define | _ECUAUTOPORT_C66_BIG_ENDIAN 0
#define | _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 0

Define Documentation

#define ecu_SEARCH_ENABLE FALSE

Definition at line 23 of file ecuautoport.h.

#define ecu_WIDE_BAND FALSE

Definition at line 30 of file ecuautoport.h.

#define ecu_DELAY_LINE_COMPRESS FALSE

Definition at line 40 of file ecuautoport.h.

#define ecu_INST_RELOCATION FALSE

Definition at line 50 of file ecuautoport.h.

#define ecu_5P5MS_FRAME_ENABLE FALSE

Definition at line 59 of file ecuautoport.h.

#define ecu_DBGSTRM_ENABLE FALSE

Definition at line 68 of file ecuautoport.h.

#define ecu_03DB_ENABLE FALSE

Definition at line 75 of file ecuautoport.h.

#define ecu_CPD_ENABLE FALSE

Definition at line 82 of file ecuautoport.h.

#define ecu_RERL_ENABLE FALSE

Definition at line 89 of file ecuautoport.h.

#define _ECUAUTOPORT_C54 0

Definition at line 95 of file ecuautoport.h.

#define _ECUAUTOPORT_C54F 0

Definition at line 101 of file ecuautoport.h.

#define _ECUAUTOPORT_C55 0

Definition at line 107 of file ecuautoport.h.

#define _ECUAUTOPORT_C55L 0

Definition at line 113 of file ecuautoport.h.

#define _ECUAUTOPORT_C64 0

Definition at line 119 of file ecuautoport.h.

#define _ECUAUTOPORT_C64_BIG_ENDIAN 0

Definition at line 125 of file ecuautoport.h.

#define _ECUAUTOPORT_C64P 0

Definition at line 131 of file ecuautoport.h.

#define _ECUAUTOPORT_C64P_BIG_ENDIAN 0

Definition at line 137 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C64P 0

Definition at line 143 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 149 of file ecuautoport.h.

#define _ECUAUTOPORT_C66 0

Definition at line 155 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C66 0

Definition at line 161 of file ecuautoport.h.

#define _ECUAUTOPORT_C66_BIG_ENDIAN 0

Definition at line 167 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 173 of file ecuautoport.h.


ECU Test: ecuautoport.h Source File

  • File List
  • Globals

ecuautoport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Primary port file for ECU automation.
00003  ******************************************************************************
00004  * FILE NAME:   ecuautoport.h
00005  *
00006  * DESCRIPTION: Contains core macros and definitions specific to different
00007  *              DSP/ARM platforms.  Pulls in required port file.
00008  *
00009  * TABS: NONE
00010  *
00011  * (C) Copyright 2009, Texas Instruments, Inc.
00012  *****************************************************************************/
00013 #ifndef _ECUAUTOPORT_H
00014 #define _ECUAUTOPORT_H
00015
00016 /* buildfile command line options */
00017
00018 /* Command line search enable/disable (ECU_TAIL) */
00019 #ifdef ENABLE_SEARCH
00020 #define ecu_SEARCH_ENABLE        TRUE /* TRUE:  Use search algorithm, request
00021                                        *        memory for search. */
00022 #else
00023 #define ecu_SEARCH_ENABLE       FALSE /* FALSE: Full filter implementation. */
00024 #endif
00025
00026 /* Command line WB enable/disable (WB=YES/NO) */
00027 #ifdef ENABLE_WB
00028 #define ecu_WIDE_BAND            TRUE /* TRUE:  Use wide band canceller */
00029 #else
00030 #define ecu_WIDE_BAND           FALSE /* FALSE: narrow band only */
00031 #endif
00032
00033 /* Command line PCM delay line compression enable/disable (ecu_DLCOMP=YES/NO) */
00034 #ifdef ENABLE_COMPRESS
00035 #define ecu_DELAY_LINE_COMPRESS  TRUE /* TRUE:  Assume that we receive compressed
00036                                        *        and packed PCM samples for our delay
00037                                        *        line from the PIU.  Perform expansion
00038                                        *        before usage.  */
00039 #else
00040 #define ecu_DELAY_LINE_COMPRESS FALSE /* FALSE: Assume that we DO NOT receive compressed
00041                                        *        and packed PCM samples for our delay
00042                                        *        line from the PIU. */
00043 #endif
00044
00045 /* Command line instance relocation enable/disable (ecu_RELOC=YES/NO) */
00046 #ifdef ENABLE_RELOC
00047 #define ecu_INST_RELOCATION      TRUE /* TRUE:  Assume that we DO support instance
00048                                                 relocation.  */
00049 #else
00050 #define ecu_INST_RELOCATION     FALSE /* FALSE: Assume that we DO NOT support instance
00051                                                 relocation. */
00052 #endif
00053
00054 /* Command line 5.5ms frame handling enable/disable (ecu_5P5MS=YES/NO) */
00055 #ifdef ENABLE_5P5MS
00056 #define ecu_5P5MS_FRAME_ENABLE   TRUE /* TRUE:  Allow multiple of 5.5ms AND 5ms frame
00057                                        *        sizes. */
00058 #else
00059 #define ecu_5P5MS_FRAME_ENABLE  FALSE /* FALSE: Allow multiple of 5ms frame sizes
00060                                        *        only. */
00061 #endif
00062
00063 /* Command line debug streaming enable/disable (ecu_DEBUG=YES/NO) */
00064 #ifdef ENABLE_DEBUG
00065 #define ecu_DBGSTRM_ENABLE       TRUE /* TRUE:  Compile in debug streaming messages
00066                                        *        through DS0's defined in siudbgstrm.h. */
00067 #else
00068 #define ecu_DBGSTRM_ENABLE      FALSE /* FALSE: No debug streaming messages. */
00069 #endif
00070
00071 /* Command line 0/3dB configuration enable/disable (ecu_03DB=YES/NO) */
00072 #ifdef ENABLE_03DB
00073 #define ecu_03DB_ENABLE          TRUE /* TRUE:  Enable 0/3dB ERL support */
00074 #else
00075 #define ecu_03DB_ENABLE         FALSE /* FALSE: Disable 0/3dB ERL support */
00076 #endif
00077
00078 /* Command line constant PCM pattern detection enable/disable (ecu_CPD=YES/NO) */
00079 #ifdef ENABLE_CPD
00080 #define ecu_CPD_ENABLE           TRUE /* TRUE:  Enable const PCM detection */
00081 #else
00082 #define ecu_CPD_ENABLE          FALSE /* FALSE: Disable const PCM detection */
00083 #endif
00084
00085 /* Command line RERL estimation enable/disable (ecu_RERL=YES/NO) */
00086 #ifdef ENABLE_RERL
00087 #define ecu_RERL_ENABLE          TRUE /* TRUE:  Enable RERL estimation  */
00088 #else
00089 #define ecu_RERL_ENABLE         FALSE /* FALSE: Disable RERL estimation */
00090 #endif
00091
00092 #ifdef ti_targets_C54
00093 #define _ECUAUTOPORT_C54 1
00094 #else
00095 #define _ECUAUTOPORT_C54 0
00096 #endif
00097
00098 #ifdef ti_targets_C54_far
00099 #define _ECUAUTOPORT_C54F 1
00100 #else
00101 #define _ECUAUTOPORT_C54F 0
00102 #endif
00103
00104 #ifdef ti_targets_C55
00105 #define _ECUAUTOPORT_C55 1
00106 #else
00107 #define _ECUAUTOPORT_C55 0
00108 #endif
00109
00110 #ifdef ti_targets_C55_large
00111 #define _ECUAUTOPORT_C55L 1
00112 #else
00113 #define _ECUAUTOPORT_C55L 0
00114 #endif
00115
00116 #ifdef ti_targets_C64
00117 #define _ECUAUTOPORT_C64 1
00118 #else
00119 #define _ECUAUTOPORT_C64 0
00120 #endif
00121
00122 #ifdef ti_targets_C64_big_endian
00123 #define _ECUAUTOPORT_C64_BIG_ENDIAN 1
00124 #else
00125 #define _ECUAUTOPORT_C64_BIG_ENDIAN 0
00126 #endif
00127
00128 #ifdef ti_targets_C64P
00129 #define _ECUAUTOPORT_C64P 1
00130 #else
00131 #define _ECUAUTOPORT_C64P 0
00132 #endif
00133
00134 #ifdef ti_targets_C64P_big_endian
00135 #define _ECUAUTOPORT_C64P_BIG_ENDIAN 1
00136 #else
00137 #define _ECUAUTOPORT_C64P_BIG_ENDIAN 0
00138 #endif
00139
00140 #ifdef ti_targets_elf_C64P
00141 #define _ECUAUTOPORT_ELF_C64P 1
00142 #else
00143 #define _ECUAUTOPORT_ELF_C64P 0
00144 #endif
00145
00146 #ifdef ti_targets_elf_C64P_big_endian
00147 #define _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 1
00148 #else
00149 #define _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 0
00150 #endif
00151
00152 #ifdef ti_targets_C66
00153 #define _ECUAUTOPORT_C66 1
00154 #else
00155 #define _ECUAUTOPORT_C66 0
00156 #endif
00157
00158 #ifdef ti_targets_elf_C66
00159 #define _ECUAUTOPORT_ELF_C66 1
00160 #else
00161 #define _ECUAUTOPORT_ELF_C66 0
00162 #endif
00163
00164 #ifdef ti_targets_C66_big_endian
00165 #define _ECUAUTOPORT_C66_BIG_ENDIAN 1
00166 #else
00167 #define _ECUAUTOPORT_C66_BIG_ENDIAN 0
00168 #endif
00169
00170 #ifdef ti_targets_elf_C66_big_endian
00171 #define _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 1
00172 #else
00173 #define _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 0
00174 #endif
00175
00176
00177 #if   (_ECUAUTOPORT_C54 || _ECUAUTOPORT_C54F)
00178 #include <ti/mas/ecu/test/src/c54/ecuautoport.h>
00179 #elif (_ECUAUTOPORT_C55 || _ECUAUTOPORT_C55L)
00180 #include <ti/mas/ecu/test/src/c55/ecuautoport.h>
00181 #elif (_ECUAUTOPORT_C64       || _ECUAUTOPORT_C64_BIG_ENDIAN      || \
00182        _ECUAUTOPORT_C64P      || _ECUAUTOPORT_C64P_BIG_ENDIAN     || \
00183        _ECUAUTOPORT_ELF_C64P  || _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN || \
00184        _ECUAUTOPORT_C66       || _ECUAUTOPORT_C66_BIG_ENDIAN      || \
00185        _ECUAUTOPORT_ELF_C66   || _ECUAUTOPORT_ELF_C66_BIG_ENDIAN)
00186 #include <ti/mas/ecu/test/src/c64/ecuautoport.h>
00187 #else
00188 #error invalid target
00189 #endif
00190
00191 #endif /* _ECUAUTOPORT_H */
00192 /* nothing after this point */


ECU Test: ecufio.c File Reference

  • File List
  • Globals

ecufio.c File Reference

#include <string.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/ecu/test/src/ecufio.h>
#include <ti/mas/ecu/test/src/ecusim.h>

Include dependency graph for ecufio.c:

Go to the source code of this file.

Functions

void | ecu_sim_fileio_init (volatile ecuSimFileIo_t *fioptr, tuint code)
void | ecu_sim_fileio_end (volatile ecuSimFileIo_t *fioptr)
tbool | ecu_sim_fread (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
void | ecu_sim_get_xlaw (tword *src, linSample *dst, tint n, const tint *tbl)
void | ecu_sim_get_linear (tword *src, linSample *dst, tint n)
void | ecu_sim_put_linear (linSample *src, tword *dst, tint n)
void | ecu_sim_input (tword *buf, linSample *linbuf)
void | ecu_sim_fwrite (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
void | ecu_sim_output (tword *buf, linSample *linbuf)

Variables

volatile siuSetup_t * | ecuSim

Function Documentation

void ecu_sim_fileio_init | ( | volatile ecuSimFileIo_t * | fioptr,
 |  | tuint | code
 | ) |  |

Definition at line 27 of file ecufio.c.

References ecu_SIM_FILEIO_READ, and ecu_SIM_FILEIO_WRITE.

Referenced by main().

void ecu_sim_fileio_end ( volatile ecuSimFileIo_t * fioptr )

Definition at line 66 of file ecufio.c.

tbool ecu_sim_fread | ( | tword * | buf,
 |  | tint | buf_size,
 |  | volatile ecuSimFileIo_t * | fioptr
 | ) |  |

Definition at line 88 of file ecufio.c.

References ecuSim, and siuSetup_s::pcm_format.

Referenced by generate_rx_tone_frame(), and main().

void ecu_sim_get_xlaw | ( | tword * | src,
 |  | linSample * | dst,
 |  | tint | n,
 |  | const tint * | tbl
 | ) |  |

Definition at line 124 of file ecufio.c.

Referenced by ecu_sim_input().

void ecu_sim_get_linear | ( | tword * | src,
 |  | linSample * | dst,
 |  | tint | n
 | ) |  |

Definition at line 141 of file ecufio.c.

Referenced by ecu_sim_input().

void ecu_sim_put_linear | ( | linSample * | src,
 |  | tword * | dst,
 |  | tint | n
 | ) |  |

Definition at line 157 of file ecufio.c.

Referenced by ecu_sim_output().

void ecu_sim_input | ( | tword * | buf,
 |  | linSample * | linbuf
 | ) |  |

Definition at line 174 of file ecufio.c.

References ecu_sim_get_linear(), ecu_sim_get_xlaw(), ecuSim, siuSetup_s::frame_size, and siuSetup_s::pcm_format.

Referenced by generate_rx_tone_frame(), and main().

Here is the call graph for this function:

void ecu_sim_fwrite | ( | tword * | buf,
 |  | tint | buf_size,
 |  | volatile ecuSimFileIo_t * | fioptr
 | ) |  |

Definition at line 199 of file ecufio.c.

References ecuSim, and siuSetup_s::pcm_format.

Referenced by main().

void ecu_sim_output | ( | tword * | buf,
 |  | linSample * | linbuf
 | ) |  |

Definition at line 236 of file ecufio.c.

References _ECUSIMPORT_C55, _ECUSIMPORT_C55L, ecu_sim_put_linear(), ecuSim, siuSetup_s::frame_size, siuSetup_s::pcm_format, and SIU_MAX_FRAME_LENGTH.

Referenced by main().

Here is the call graph for this function:

Variable Documentation

volatile siuSetup_t* ecuSim

Definition at line 75 of file ecusimfunc.c.

Referenced by ecu_sim_fread(), ecu_sim_fwrite(), ecu_sim_init(), ecu_sim_input(), ecu_sim_output(), generate_rx_tone_frame(), main(), siu_open_ecu(), siu_open_rxsgn(), siu_open_txhyb(), and siu_open_txsgn().


ECU Test: ecufio.c Source File

  • File List
  • Globals

ecufio.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Functions to support file read/write
00003  ******************************************************************************
00004  * FILE NAME:   ecufio.c
00005  *
00006  * DESCRIPTION: Contains routines to support file read and write operations.
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #include <string.h>
00012
00013 #include <ti/mas/util/mua.h>
00014 /* Associated header */
00015 #include <ti/mas/ecu/test/src/ecufio.h>
00016 #include <ti/mas/ecu/test/src/ecusim.h>
00017
00018 /* External references */
00019 extern volatile siuSetup_t *ecuSim;
00020
00021
00022 /*-----------------------------------------------------------------
00023  * Function:  ecu_sim_fileio_init
00024  *
00025  * Description: Initialize simulation for file I/O
00026  *-----------------------------------------------------------------*/
00027 void ecu_sim_fileio_init (volatile ecuSimFileIo_t *fioptr, tuint code)
00028 {
00029   if (fioptr->fio) {
00030     /* Ensure that file pointer is NULL (closed) */
00031     if (fioptr->fptr != NULL) {
00032       printf (" - File already open: %s\n", fioptr->fname);
00033       return;
00034     }
00035
00036     /* Open file (read/write binary) and assign file pointer */
00037     if (code == ecu_SIM_FILEIO_READ) {
00038       fioptr->fptr = fopen ((const char *) fioptr->fname, "rb");
00039     }
00040     else if (code == ecu_SIM_FILEIO_WRITE) {
00041       fioptr->fptr = fopen ((const char *) fioptr->fname, "wb");
00042     }
00043     else {
00044       printf ("Error: unrecognized file action %d \n", code);
00045       return;
00046     }
00047
00048     /* Ensure open success */
00049     if (fioptr->fptr == NULL) {
00050       printf ("Unable to open file: %s\n", fioptr->fname);
00051       fioptr->fio = FALSE;
00052     }
00053     else {
00054       printf (" - Opened file: %s\n", fioptr->fname);
00055       fioptr->eof = FALSE;
00056     }
00057   }
00058 }
00059
00060
00061 /*-----------------------------------------------------------------
00062  * Function:  ecu_sim_fileio_end
00063  *
00064  * Description: Clear simulation after file I/O
00065  *-----------------------------------------------------------------*/
00066 void ecu_sim_fileio_end (volatile ecuSimFileIo_t *fioptr)
00067 {
00068   if (fioptr->fio) {
00069     /* Close file pointer */
00070     if (fioptr->fptr == NULL) {
00071       printf ("Warning: premature file close\n");
00072     }
00073     else {
00074       if (fioptr->eof) {
00075         fclose (fioptr->fptr);
00076         fioptr->fptr = (FILE *) NULL;
00077         /* Print progress */
00078         printf (" - Closed file: %s\n", fioptr->fname);
00079       }
00080     }
00081   }
00082 }
00083 /*-----------------------------------------------------------------
00084  * Function:  ecu_sim_fread
00085  *
00086  * Description: Perform file input
00087  *-----------------------------------------------------------------*/
00088 tbool ecu_sim_fread (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
00089 {
00090   tuint num;
00091   tuint sample_size;
00092
00093   tbool ret_code = FALSE;
00094
00095   if (fioptr->fio) {
00096     /* Set the sample size (in twords) */
00097     sample_size = sizeof(tword);
00098     if (ecuSim->pcm_format == const_COMP_LINEAR) {
00099       sample_size = sizeof(linSample)/sizeof(tword);
00100
00101     }
00102
00103     /* Read from the file */
00104     num = fread (buf, sample_size, buf_size, fioptr->fptr);
00105
00106     /* check for end of file */
00107     if (num != (sample_size * buf_size)) {
00108       fioptr->eof = TRUE;
00109     }
00110     else {
00111       ret_code = TRUE;
00112     }
00113   }
00114   /* Indicate if EOF has been reached */
00115   return (ret_code);
00116 }
00117
00118
00119 /*-----------------------------------------------------------------
00120  * Function:  ecu_sim_get_xlaw
00121  *
00122  * Description: Copy and expand U/A-law PCM samples
00123  *-----------------------------------------------------------------*/
00124 void ecu_sim_get_xlaw (tword *src, linSample *dst, tint n, const tint *tbl)
00125 {
00126   tuint i;
00127   tuint index;
00128
00129   for (i=0; i<n; i++) {
00130     index  = (tuint) src[i];
00131     dst[i] = (linSample) tbl[index];
00132   }
00133 }
00134
00135
00136 /*-----------------------------------------------------------------
00137  * Function:  ecu_sim_get_linear
00138  *
00139  * Description: Copy linear PCM samples
00140  *-----------------------------------------------------------------*/
00141 void ecu_sim_get_linear (tword *src, linSample *dst, tint n)
00142 {
00143   tuint i;
00144   linSample *pcm = (linSample *) src;
00145
00146   for (i=0; i<n; i++) {
00147     dst[i] = pcm[i];
00148   }
00149 }
00150
00151
00152 /*-----------------------------------------------------------------
00153  * Function:  ecu_sim_put_linear
00154  *
00155  * Description: Copy linear PCM samples
00156  *-----------------------------------------------------------------*/
00157 void ecu_sim_put_linear (linSample *src, tword *dst, tint n)
00158 {
00159   tuint i;
00160   linSample *pcm = (linSample *) dst;
00161
00162   for (i=0; i<n; i++) {
00163     pcm[i] = src[i];
00164   }
00165 }
00166
00167
00168 /*-----------------------------------------------------------------
00169  * Function:  ecu_sim_input_mux
00170  *
00171  * Description: Get input samples and expand/shift before
00172  *              broadcasting to all active channels.
00173  *-----------------------------------------------------------------*/
00174 void ecu_sim_input(tword *buf, linSample *linbuf)
00175 {
00176   /* Convert to linear PCM format (if necessary) */
00177   switch (ecuSim->pcm_format) {
00178   /* A-law 8-bit PCM */
00179   case const_COMP_ALAW_8:
00180     ecu_sim_get_xlaw (buf, linbuf, ecuSim->frame_size, muaTblAlaw);
00181     break;
00182   /* U-law 8-bit PCM */
00183   case const_COMP_MULAW_8:
00184     ecu_sim_get_xlaw (buf, linbuf, ecuSim->frame_size, muaTblUlaw);
00185     break;
00186   /* Linear 16-bit PCM */
00187   case const_COMP_LINEAR:
00188     ecu_sim_get_linear (buf, linbuf, ecuSim->frame_size);
00189     break;
00190   }
00191 }
00192
00193
00194 /*-----------------------------------------------------------------
00195  * Function:  ecu_sim_fwrite
00196  *
00197  * Description: Perform file output
00198  *-----------------------------------------------------------------*/
00199 void ecu_sim_fwrite (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
00200 {
00201   tuint sample_size;
00202   tuint start;
00203   tint  i, j;
00204
00205   /* */
00206   if (fioptr->fio) {
00207     /* Set the sample size (in twords) */
00208     sample_size = sizeof(tword);
00209     if (ecuSim->pcm_format == const_COMP_LINEAR) {
00210       sample_size = sizeof(linSample)/sizeof(tword);
00211     }
00212
00213     /* Pack to 8-bit data */
00214     else {
00215 #ifdef _BIG_ENDIAN
00216       start = 1;
00217 #else
00218       start = 0;
00219 #endif
00220       for (i=0, j=start; i<buf_size; i++, j+=2) {
00221         buf[i] = buf[j];
00222       }
00223     }
00224
00225     /* Write to the file */
00226     fwrite (buf, sample_size, buf_size, fioptr->fptr);
00227   }
00228 }
00229
00230
00231 /*-----------------------------------------------------------------
00232  * Function:  ecu_sim_output
00233  *
00234  * Description: Perform file output
00235  *-----------------------------------------------------------------*/
00236 void ecu_sim_output (tword *buf, linSample *linbuf)
00237 {
00238 #if _ECUSIMPORT_C55 || _ECUSIMPORT_C55L
00239   tint i;
00240   linSample temp_buffer[SIU_MAX_FRAME_LENGTH*2];
00241
00242   for (i = 0; i<ecuSim->frame_size; i++) {
00243     temp_buffer[2*i+0] = linbuf[i];
00244     temp_buffer[2*i+1] = 0;
00245   }
00246 #endif
00247
00248   /* Convert to linear PCM format (if necessary) */
00249   switch (ecuSim->pcm_format) {
00250     /* A-law 8-bit PCM */
00251     case const_COMP_ALAW_8:
00252       muaTblAlawCmpr (ecuSim->frame_size, linbuf, (tint *) buf);
00253       break;
00254
00255     /* U-law 8-bit PCM */
00256     case const_COMP_MULAW_8:
00257 #if _ECUSIMPORT_C55 || _ECUSIMPORT_C55L
00258       muaTblUlawCmpr (ecuSim->frame_size*2, temp_buffer, (tint *) buf);
00259 #else
00260       muaTblUlawCmpr (ecuSim->frame_size, linbuf, (tint *) buf);
00261 #endif
00262       break;
00263
00264     /* Linear 16-bit PCM */
00265     case const_COMP_LINEAR:
00266       ecu_sim_put_linear (linbuf, buf, ecuSim->frame_size);
00267       break;
00268   }
00269 }
00270
00271 /* nothing past this point */


ECU Test: ecufio.h File Reference

  • File List
  • Globals

ecufio.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/types/const.h>
#include <ti/mas/ecu/test/src/ecusim.h>

Include dependency graph for ecufio.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | ecu_sim_fileio_init (volatile ecuSimFileIo_t *fioptr, tuint code)
void | ecu_sim_fileio_end (volatile ecuSimFileIo_t *fioptr)
void | ecu_sim_input (tword *buf, linSample *linbuf)
void | ecu_sim_output (tword *buf, linSample *linbuf)
tbool | ecu_sim_fread (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
void | ecu_sim_fwrite (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)

Variables

tword | rinBuffer []
tword | sinBuffer []
tword | routBuffer []
tword | soutBuffer []

Function Documentation

void ecu_sim_fileio_init | ( | volatile ecuSimFileIo_t * | fioptr,
 |  | tuint | code
 | ) |  |

Definition at line 27 of file ecufio.c.

References ecu_SIM_FILEIO_READ, and ecu_SIM_FILEIO_WRITE.

Referenced by main().

void ecu_sim_fileio_end ( volatile ecuSimFileIo_t * fioptr )

Definition at line 66 of file ecufio.c.

void ecu_sim_input | ( | tword * | buf,
 |  | linSample * | linbuf
 | ) |  |

Definition at line 174 of file ecufio.c.

References ecu_sim_get_linear(), ecu_sim_get_xlaw(), ecuSim, siuSetup_s::frame_size, and siuSetup_s::pcm_format.

Referenced by generate_rx_tone_frame(), and main().

Here is the call graph for this function:

void ecu_sim_output | ( | tword * | buf,
 |  | linSample * | linbuf
 | ) |  |

Definition at line 236 of file ecufio.c.

References _ECUSIMPORT_C55, _ECUSIMPORT_C55L, ecu_sim_put_linear(), ecuSim, siuSetup_s::frame_size, siuSetup_s::pcm_format, and SIU_MAX_FRAME_LENGTH.

Referenced by main().

Here is the call graph for this function:

tbool ecu_sim_fread | ( | tword * | buf,
 |  | tint | buf_size,
 |  | volatile ecuSimFileIo_t * | fioptr
 | ) |  |

Definition at line 88 of file ecufio.c.

References ecuSim, and siuSetup_s::pcm_format.

Referenced by generate_rx_tone_frame(), and main().

void ecu_sim_fwrite | ( | tword * | buf,
 |  | tint | buf_size,
 |  | volatile ecuSimFileIo_t * | fioptr
 | ) |  |

Definition at line 199 of file ecufio.c.

References ecuSim, and siuSetup_s::pcm_format.

Referenced by main().

Variable Documentation

tword rinBuffer[]

Definition at line 44 of file ecuauto.c.

tword sinBuffer[]

Definition at line 45 of file ecuauto.c.

tword routBuffer[]

Definition at line 46 of file ecuauto.c.

tword soutBuffer[]

Definition at line 47 of file ecuauto.c.


ECU Test: ecufio.h Source File

  • File List
  • Globals

ecufio.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Functions to support FILE Input/output in ECU simulation
00003  ******************************************************************************
00004  * FILE NAME:   ecufio.h
00005  *
00006  * DESCRIPTION: Contains constants and definitions for FILE I/O in
00007  *              ECU simulation
00008  *
00009  * (C) Copyright 2008, Texas Instruments, Inc.
00010  *****************************************************************************/
00011 #ifndef _ECUFIO_H
00012 #define _ECUFIO_H
00013
00014 #include <ti/mas/types/types.h>
00015 #include <ti/mas/types/const.h>
00016 #include <ti/mas/ecu/test/src/ecusim.h>
00017
00018 /******************************************************************************
00019  * External References
00020  ******************************************************************************/
00021 extern tword rinBuffer [];
00022 extern tword sinBuffer [];
00023 extern tword routBuffer[];
00024 extern tword soutBuffer[];
00025
00026 /******************************************************************************
00027  * Function prototypes
00028  ******************************************************************************/
00029 void  ecu_sim_fileio_init  (volatile ecuSimFileIo_t *fioptr, tuint code);
00030 void  ecu_sim_fileio_end   (volatile ecuSimFileIo_t *fioptr);
00031 void  ecu_sim_input        (tword *buf, linSample *linbuf);
00032 void  ecu_sim_output       (tword *buf, linSample *linbuf);
00033 tbool ecu_sim_fread        (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr);
00034 void  ecu_sim_fwrite       (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr);
00035
00036 #endif /* _ECUFIO_H */
00037
00038 /* nothing past this point */


ECU Test: ecuiram.c File Reference

  • File List
  • Globals

ecuiram.c File Reference

#include <ti/mas/ecu/test/src/ecuiram.h>

Include dependency graph for ecuiram.c:

Go to the source code of this file.

Variables

linSample | piu_ecu_receive [IRAM_PIU_ECU_RECEIVE_LENGTH]
Fract | ecu_bg_work [IRAM_ECU_BG_WORK_LENGTH]
linSample | ecu_bg_e [IRAM_ECU_BG_E_LENGTH]
Fract | ecu_bg_filter [IRAM_ECU_BG_FLTSEG_LENGTH]
Fract | ecu_fg_filter [IRAM_ECU_FG_FLTSEG_LENGTH]
iramSeg_t iramSeg

Variable Documentation

linSample piu_ecu_receive[IRAM_PIU_ECU_RECEIVE_LENGTH]

Definition at line 27 of file ecuiram.c.

Fract ecu_bg_work[IRAM_ECU_BG_WORK_LENGTH]

Definition at line 32 of file ecuiram.c.

linSample ecu_bg_e[IRAM_ECU_BG_E_LENGTH]

Definition at line 33 of file ecuiram.c.

Fract ecu_bg_filter[IRAM_ECU_BG_FLTSEG_LENGTH]

Definition at line 34 of file ecuiram.c.

Fract ecu_fg_filter[IRAM_ECU_FG_FLTSEG_LENGTH]

Definition at line 35 of file ecuiram.c.

iramSeg_t iramSeg

Initial value:

 {

    &piu_ecu_receive[0],

    &ecu_bg_work[0],
    &ecu_bg_e[0],
    &ecu_bg_filter[0],
    &ecu_fg_filter[0]
  }

Definition at line 37 of file ecuiram.c.

Referenced by siu_new_ecu().


ECU Test: ecuiram.c Source File

  • File List
  • Globals

ecuiram.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Reserve space for special ECU IRAM buffers that need alignment.
00003  ******************************************************************************
00004  * FILE NAME:   ecuiram.c
00005  *
00006  * DESCRIPTION: Reserves space for ECU IRAM buffers that need alignment.
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: ecuiram.c 1.1 1997/01/16 12:47:58 BOGDANK Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: ecuiram.c $
00015  * Revision 1.1  1997/01/16 12:47:58  BOGDANK
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include <ti/mas/ecu/test/src/ecuiram.h>
00022
00023 #if ecu_DELAY_LINE_COMPRESS
00024   linSample ecu_pcm_expand[IRAM_ECU_EXPAND_LENGTH];
00025   tword     piu_ecu_receive[IRAM_PIU_ECU_RECEIVE_LENGTH];
00026 #else
00027   linSample piu_ecu_receive[IRAM_PIU_ECU_RECEIVE_LENGTH];
00028 #endif
00029 #if ecu_SEARCH_ENABLE
00030   Fract     ecu_srch_filter[IRAM_ECU_SRCH_FILTER_LENGTH];
00031 #endif
00032   Fract     ecu_bg_work[IRAM_ECU_BG_WORK_LENGTH];
00033   linSample ecu_bg_e[IRAM_ECU_BG_E_LENGTH];
00034   Fract     ecu_bg_filter[IRAM_ECU_BG_FLTSEG_LENGTH];
00035   Fract     ecu_fg_filter[IRAM_ECU_FG_FLTSEG_LENGTH];
00036
00037   iramSeg_t iramSeg = {
00038 #if ecu_DELAY_LINE_COMPRESS
00039     &ecu_pcm_expand[0],
00040     &piu_ecu_receive[0],
00041 #else
00042     &piu_ecu_receive[0],
00043 #endif
00044 #if ecu_SEARCH_ENABLE
00045     &ecu_srch_filter[0],
00046 #endif
00047     &ecu_bg_work[0],
00048     &ecu_bg_e[0],
00049     &ecu_bg_filter[0],
00050     &ecu_fg_filter[0]
00051   };
00052
00053 /* nothing past this point */


ECU Test: ecuiram.h File Reference

  • File List
  • Globals

ecuiram.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/ecu/ecu.h>
#include <ti/mas/ecu/test/src/ecusim.h>

Include dependency graph for ecuiram.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | iramSeg_t

Defines

#define | IRAM_ECU_MAX_FLTSEG_LENGTH 256
#define | IRAM_ECU_BLOCK_LENGTH 40
#define | IRAM_ECU_SRCH_FILTER_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH
#define | ecu_DELAY_LINE_LENGTH (IRAM_ECU_SRCH_FILTER_LENGTH + 2*IRAM_ECU_BLOCK_LENGTH + SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH)
#define | IRAM_PIU_ECU_RECEIVE_LENGTH ecu_DELAY_LINE_LENGTH
#define | IRAM_ECU_BG_WORK_LENGTH IRAM_ECU_SRCH_FILTER_LENGTH
#define | IRAM_ECU_BG_E_LENGTH IRAM_ECU_BLOCK_LENGTH
#define | IRAM_ECU_BG_FLTSEG_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH
#define | IRAM_ECU_FG_FLTSEG_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Variables

iramSeg_t iramSeg

Define Documentation

#define IRAM_ECU_MAX_FLTSEG_LENGTH 256

Definition at line 39 of file ecuiram.h.

#define IRAM_ECU_BLOCK_LENGTH 40

Definition at line 40 of file ecuiram.h.

#define IRAM_ECU_SRCH_FILTER_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Definition at line 49 of file ecuiram.h.

Referenced by siu_new_ecu().

#define ecu_DELAY_LINE_LENGTH (IRAM_ECU_SRCH_FILTER_LENGTH + 2*IRAM_ECU_BLOCK_LENGTH + SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH)

Definition at line 53 of file ecuiram.h.

#define IRAM_PIU_ECU_RECEIVE_LENGTH ecu_DELAY_LINE_LENGTH

Definition at line 58 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_BG_WORK_LENGTH IRAM_ECU_SRCH_FILTER_LENGTH

Definition at line 60 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_BG_E_LENGTH IRAM_ECU_BLOCK_LENGTH

Definition at line 63 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_BG_FLTSEG_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Definition at line 64 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_FG_FLTSEG_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Definition at line 65 of file ecuiram.h.

Referenced by siu_new_ecu().

Variable Documentation

iramSeg_t iramSeg

Definition at line 37 of file ecuiram.c.

Referenced by siu_new_ecu().


ECU Test: ecuiram.h Source File

  • File List
  • Globals

ecuiram.h

Go to the documentation of this file.
00001 #ifndef _ECUIRAM_H
00002 #define _ECUIRAM_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Allocate IRAM buffers satisfying circular/bit reversed
00005  *               addressing constraints. (16-bit C54x version)
00006  ******************************************************************************
00007  * FILE NAME:   ecuiram.h
00008  *
00009  * DESCRIPTION: This file defines a segment of memory containing ECU IRAM
00010  *              buffers which are accessed using circular or bit-reversed
00011  *              addressing modes. The segment is partitioned using a C data
00012  *              structure which assigns each buffer in the partition to a
00013  *              corresponding DSP software unit.
00014  *
00015  * TABS: None
00016  *
00017  * (C) Copyright 2008, Texas Instruments, Inc.
00018  *****************************************************************************/
00019
00020 #include <ti/mas/types/types.h>
00021
00022 #include <ti/mas/ecu/ecu.h>
00023
00024 #include <ti/mas/ecu/test/src/ecusim.h>     /* for simulation-specific defines */
00025
00026 /*****************************************************************************
00027  * DATA DEFINITION: Partition definition for special addressing mode
00028  *                  segment. piu_ecu_receive[] buffer must be aligned to
00029  *                  the nearest larger power of 2 for the sake of circular
00030  *                  addressing. This is necessary only when the circular
00031  *                  buffer is accessed usign circular addressing mode in
00032  *                  either ECU module or PCM interface module (e.g. PIU) which
00033  *                  syncronizes far end samples after the optional resampling.
00034  *
00035  *                  Actual piu_ecu_receive[] length must always be whole number
00036  *                  of frames as required by PCM interface module.
00037  *****************************************************************************/
00038
00039 #define IRAM_ECU_MAX_FLTSEG_LENGTH    256
00040 #define IRAM_ECU_BLOCK_LENGTH         40
00041 #if ecu_5P5MS_FRAME_ENABLE
00042 #undef  IRAM_ECU_BLOCK_LENGTH
00043 #define IRAM_ECU_BLOCK_LENGTH         44
00044 #endif
00045
00046 #if ecu_SEARCH_ENABLE
00047 #define IRAM_ECU_SRCH_FILTER_LENGTH   1024
00048 #else
00049 #define IRAM_ECU_SRCH_FILTER_LENGTH   IRAM_ECU_MAX_FLTSEG_LENGTH
00050 #endif
00051 /* NOTE:  The following limits the maximum frame size to 2 ECU blocks, */
00052 /*        (i.e., 10ms or 11ms)                                         */
00053 #define ecu_DELAY_LINE_LENGTH         (IRAM_ECU_SRCH_FILTER_LENGTH + 2*IRAM_ECU_BLOCK_LENGTH + SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH)
00054 #if ecu_DELAY_LINE_COMPRESS
00055 #define IRAM_ECU_EXPAND_LENGTH        (ecu_DELAY_LINE_LENGTH - IRAM_ECU_BLOCK_LENGTH)
00056 #define IRAM_PIU_ECU_RECEIVE_LENGTH   (ecu_DELAY_LINE_LENGTH/ecu_SIM_DLINE_SAMPLES_PER_WORD)
00057 #else
00058 #define IRAM_PIU_ECU_RECEIVE_LENGTH   ecu_DELAY_LINE_LENGTH /* linSample, for 128ms hybrid */
00059 #endif
00060 #define IRAM_ECU_BG_WORK_LENGTH       IRAM_ECU_SRCH_FILTER_LENGTH  /* changed from 8*/
00061                                             /* 1024 for search filter length */
00062                                             /* Fract (see ecuport.h, eculms.s) */
00063 #define IRAM_ECU_BG_E_LENGTH          IRAM_ECU_BLOCK_LENGTH   /* linSample */
00064 #define IRAM_ECU_BG_FLTSEG_LENGTH     IRAM_ECU_MAX_FLTSEG_LENGTH  /* Fract */
00065 #define IRAM_ECU_FG_FLTSEG_LENGTH     IRAM_ECU_MAX_FLTSEG_LENGTH  /* Fract */
00066
00067 typedef struct {
00068 #if ecu_DELAY_LINE_COMPRESS
00069   linSample *ecu_pcm_expand_ptr;
00070   tword     *piu_ecu_receive_ptr;
00071 #else
00072   linSample *piu_ecu_receive_ptr;
00073 #endif
00074 #if ecu_SEARCH_ENABLE
00075   Fract     *ecu_srch_filter_ptr;
00076 #endif
00077   Fract     *ecu_bg_work_ptr;
00078   linSample *ecu_bg_e_ptr;
00079   Fract     *ecu_bg_filter_ptr;
00080   Fract     *ecu_fg_filter_ptr;
00081 } iramSeg_t;
00082
00083 extern iramSeg_t iramSeg;
00084
00085 #endif /* _ecuiram_h */
00086 /* nothing past this point */


ECU Test: ecumem.c File Reference

  • File List
  • Globals

ecumem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/ecu/test/src/ecumem.h>

Include dependency graph for ecumem.c:

Go to the source code of this file.

Functions

void | ecu_mem_heap_init (ecuMemHeap_t *ptr, tword *heapBase, tulong size)
void | ecu_mem_init_heap (void)
void * | ecu_mem_align (void *addr, tuint lin_align)
tword * | ecu_mem_heap_alloc (ecuMemHeap_t *ptr, tulong size)
void * | ecu_mem_alloc_align (tulong size, tint linAlign, tint heap_id)
void | ecu_mem_alloc_eco (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr, ecuMemConfig_t *mem, tint heap_id)

Variables

tword | ecuMem1 [ecu_HEAP1_SIZE]
tword | ecuMem2 [ecu_HEAP2_SIZE]
ecuMemHeap_t | ecuHeap [ecu_HEAP_CNT]

Function Documentation

void ecu_mem_heap_init | ( | ecuMemHeap_t * | ptr,
 |  | tword * | heapBase,
 |  | tulong | size
 | ) |  |

Definition at line 17 of file ecumem.c.

References ecuMemHeap_t::base, ecuMemHeap_t::indx, and ecuMemHeap_t::size.

Referenced by ecu_mem_init_heap().

void ecu_mem_init_heap ( void )

Definition at line 26 of file ecumem.c.

References ecu_HEAP_ID1, ecu_HEAP_ID2, ecu_mem_heap_init(), ecuHeap, ecuMem1, and ecuMem2.

Referenced by lec_auto_initialize().

Here is the call graph for this function:

void* ecu_mem_align | ( | void * | addr,
 |  | tuint | lin_align
 | ) |  |

Definition at line 34 of file ecumem.c.

Referenced by ecu_mem_alloc_align().

tword* ecu_mem_heap_alloc | ( | ecuMemHeap_t * | ptr,
 |  | tulong | size
 | ) |  |

Definition at line 43 of file ecumem.c.

References ecuMemHeap_t::base, ecuMemHeap_t::indx, and ecuMemHeap_t::size.

Referenced by ecu_mem_alloc_align().

void* ecu_mem_alloc_align | ( | tulong | size,
 |  | tint | linAlign,
 |  | tint | heap_id
 | ) |  |

Definition at line 54 of file ecumem.c.

References ecu_mem_align(), ecu_mem_heap_alloc(), and ecuHeap.

Referenced by ecu_auto_create_sgn(), ecu_auto_create_uta(), and ecu_mem_alloc_eco().

Here is the call graph for this function:

void ecu_mem_alloc_eco | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr,
 |  | ecuMemConfig_t * | mem,
 |  | tint | heap_id
 | ) |  |

Definition at line 67 of file ecumem.c.

References ecu_auto_iprint(), ecu_mem_alloc_align(), ecuMemConfig_t::init_pattern, and ecuMemConfig_t::pre_init_bufs.

Referenced by ecu_auto_create_hyb(), and ecuAuto_create_chn().

Here is the call graph for this function:

Variable Documentation

tword ecuMem1[ecu_HEAP1_SIZE]

Definition at line 11 of file ecumem.c.

Referenced by ecu_mem_init_heap().

tword ecuMem2[ecu_HEAP2_SIZE]

Definition at line 13 of file ecumem.c.

Referenced by ecu_mem_init_heap().

ecuMemHeap_t ecuHeap[ecu_HEAP_CNT]

Definition at line 14 of file ecumem.c.

Referenced by ecu_mem_alloc_align(), and ecu_mem_init_heap().


ECU Test: ecumem.c Source File

  • File List
  • Globals

ecumem.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004
00005 #include <ti/mas/types/types.h>
00006 #include <ti/mas/util/ecomem.h>
00007 #include <ti/mas/ecu/test/src/ecumem.h>
00008
00009
00010 #pragma DATA_SECTION (ecuMem1, "ecu_heap_1");
00011 tword ecuMem1[ecu_HEAP1_SIZE];
00012 #pragma DATA_SECTION (ecuMem2, "ecu_heap_2");
00013 tword ecuMem2[ecu_HEAP2_SIZE];
00014 ecuMemHeap_t ecuHeap[ecu_HEAP_CNT];
00015
00016
00017 void ecu_mem_heap_init (ecuMemHeap_t *ptr, tword *heapBase, tulong size)
00018 {
00019   ptr->base = heapBase;
00020   ptr->size = size;
00021   ptr->indx = 0;
00022   /* Note : memory is not initialized deliberately to expose
00023             uninitialized memory read problems */
00024 }
00025
00026 void ecu_mem_init_heap (void)
00027 {
00028   /* Internal heap 1 */
00029   ecu_mem_heap_init (&ecuHeap[ecu_HEAP_ID1], ecuMem1, ecu_HEAP1_SIZE);
00030   /* Internal heap 2 */
00031   ecu_mem_heap_init (&ecuHeap[ecu_HEAP_ID2], ecuMem2, ecu_HEAP2_SIZE);
00032 }
00033
00034 void *ecu_mem_align (void *addr, tuint lin_align)
00035 {
00036   tulong align_addr;
00037
00038   align_addr = ((tulong) addr + lin_align - 1UL) & (0xFFFFFFFFUL - lin_align + 1UL);
00039   return ((void *) align_addr);
00040 }
00041
00042
00043 tword *ecu_mem_heap_alloc (ecuMemHeap_t *ptr, tulong size)
00044 {
00045   tword *alloc = NULL;
00046
00047   if ((ptr->indx + size) <= ptr->size) {
00048     alloc = &ptr->base[ptr->indx];
00049     ptr->indx += size;
00050   }
00051   return (alloc);
00052 }
00053
00054 void *ecu_mem_alloc_align (tulong size, tint linAlign, tint heap_id)
00055 {
00056   ecuMemHeap_t *hptr = &ecuHeap[heap_id];
00057   void         *allocPtr;
00058
00059   if ((allocPtr = (void *) ecu_mem_heap_alloc (hptr, size + linAlign - 1)) == NULL) {
00060     printf("\nNot enough heap, exiting\n");
00061     exit (0);
00062   }
00063
00064   return (ecu_mem_align (allocPtr, linAlign));
00065 }
00066
00067 void ecu_mem_alloc_eco (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr,
00068                         ecuMemConfig_t *mem, tint heap_id)
00069 {
00070   tint   i;
00071   tuint  linAlign;
00072   tuint  log2align;
00073
00074
00075   for (i=0; i<nbufs; i++) {
00076     log2align = sizeBufsPtr[i].log2align;
00077     linAlign = (tuint) 1 << log2align;
00078
00079     ecoBufsPtr[i].size      = sizeBufsPtr[i].size;
00080     ecoBufsPtr[i].volat     = sizeBufsPtr[i].volat;
00081     ecoBufsPtr[i].log2align = sizeBufsPtr[i].log2align;
00082     ecoBufsPtr[i].mclass    = ecomem_CLASS_INTERNAL;
00083
00084     ecu_auto_iprint (" Buffer: %d", i);
00085     ecu_auto_iprint (" align:  %d", linAlign);
00086     ecu_auto_iprint ("  size:  %d", sizeBufsPtr[i].size);
00087     if (mem->pre_init_bufs) {
00088       ecu_auto_iprint ("  init: %d", (tint) mem->init_pattern);
00089     }
00090     ecu_auto_iprint ("  heap:  %d\n", heap_id);
00091
00092     if (ecoBufsPtr[i].size == 0) {
00093       ecoBufsPtr[i].base = NULL;
00094       continue;
00095     }
00096
00097     ecoBufsPtr[i].base = ecu_mem_alloc_align (ecoBufsPtr[i].size, linAlign, heap_id);
00098
00099     if (mem->pre_init_bufs) {
00100       memset (ecoBufsPtr[i].base, mem->init_pattern, ecoBufsPtr[i].size);
00101     }
00102   }
00103 }
00104
00105 /* Nothing past this point */


ECU Test: ecumem.h File Reference

  • File List
  • Globals

ecumem.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/ecu/test/src/ecuautoport.h>

Include dependency graph for ecumem.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | ecuMemHeap_t
struct | ecuMemConfig_t

Defines

#define | ecu_HEAP_ID1 0
#define | ecu_HEAP_ID2 1
#define | ecu_HEAP_CNT 2

Functions

void | ecu_auto_print (char *str)
void * | ecu_mem_align (void *addr, tuint lin_align)
void | ecu_mem_init_heap (void)
void | ecu_mem_alloc_eco (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr, ecuMemConfig_t *mem, tint id)
void * | ecu_mem_alloc_align (tulong size, tint linAlign, tint id)

Define Documentation

#define ecu_HEAP_ID1 0

Definition at line 21 of file ecumem.h.

Referenced by ecu_mem_init_heap().

#define ecu_HEAP_ID2 1

Definition at line 22 of file ecumem.h.

Referenced by ecu_mem_init_heap().

#define ecu_HEAP_CNT 2

Definition at line 23 of file ecumem.h.

Function Documentation

void ecu_auto_print ( char * str )

Definition at line 121 of file ecuauto.c.

References autoCfg, and ecuAutoConfig_t::verbose_print.

Referenced by ecu_auto_banner_print(), ecu_auto_create_hyb(), ecu_auto_create_sgn(), ecu_auto_create_uta(), ecu_auto_init_rxsgn(), ecu_auto_init_txsgn(), ecu_auto_iprint(), ecu_auto_process_uta(), ecu_auto_set_defaults(), ecu_auto_sprint(), ecuAuto_config_chn(), ecuAuto_open_chn(), and lec_auto_initialize().

void* ecu_mem_align | ( | void * | addr,
 |  | tuint | lin_align
 | ) |  |

Definition at line 34 of file ecumem.c.

Referenced by ecu_mem_alloc_align().

void ecu_mem_init_heap ( void )

Definition at line 26 of file ecumem.c.

References ecu_HEAP_ID1, ecu_HEAP_ID2, ecu_mem_heap_init(), ecuHeap, ecuMem1, and ecuMem2.

Referenced by lec_auto_initialize().

Here is the call graph for this function:

void ecu_mem_alloc_eco | ( | tint | nbufs,
 |  | const ecomemBuffer_t * | sizeBufsPtr,
 |  | ecomemBuffer_t * | ecoBufsPtr,
 |  | ecuMemConfig_t * | mem,
 |  | tint | id
 | ) |  |

Definition at line 67 of file ecumem.c.

References ecu_auto_iprint(), ecu_mem_alloc_align(), ecuMemConfig_t::init_pattern, and ecuMemConfig_t::pre_init_bufs.

Referenced by ecu_auto_create_hyb(), and ecuAuto_create_chn().

Here is the call graph for this function:

void* ecu_mem_alloc_align | ( | tulong | size,
 |  | tint | linAlign,
 |  | tint | id
 | ) |  |

Definition at line 54 of file ecumem.c.

References ecu_mem_align(), ecu_mem_heap_alloc(), and ecuHeap.

Referenced by ecu_auto_create_sgn(), ecu_auto_create_uta(), and ecu_mem_alloc_eco().

Here is the call graph for this function:


ECU Test: ecumem.h Source File

  • File List
  • Globals

ecumem.h

Go to the documentation of this file.
00001 #ifndef _ECUMEM_H
00002 #define _ECUMEM_H
00003
00004 #include <ti/mas/types/types.h>
00005 #include <ti/mas/util/ecomem.h>
00006 #include <ti/mas/ecu/test/src/ecuautoport.h>
00007
00008 extern void ecu_auto_print  (char *str);
00009
00010 typedef struct {
00011   tword *base;
00012   tulong indx;
00013   tulong size;
00014 } ecuMemHeap_t;
00015
00016 typedef struct {
00017   tbool pre_init_bufs;
00018   tword init_pattern;
00019 } ecuMemConfig_t;
00020
00021 #define ecu_HEAP_ID1  0
00022 #define ecu_HEAP_ID2  1
00023 #define ecu_HEAP_CNT  2
00024
00025 void *ecu_mem_align       (void *addr, tuint lin_align);
00026 void  ecu_mem_init_heap   (void);
00027 void  ecu_mem_alloc_eco   (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr,
00028                            ecuMemConfig_t *mem, tint id);
00029 void *ecu_mem_alloc_align (tulong size, tint linAlign, tint id);
00030
00031 #endif /* _ECUMEM_H */
00032
00033 /* Nothing past this point */


ECU Test: ecuprof.c File Reference

  • File List
  • Globals

ecuprof.c File Reference

#include <stdio.h>
#include <ti/mas/sdk/profile.h>
#include <ti/mas/sdk/memArchCfg.h>
#include <ti/mas/ecu/test/src/ecusim.h>

Include dependency graph for ecuprof.c:

Go to the source code of this file.

Functions

void | ecusim_profile_start (void)
void | ecusim_profile_stop (void)
void | ecusim_profile_init (void)
void | ecusim_profile_close (void)
void | ecusim_profile_print (void)

Variables

ecuProfile_t ecuProfile

Function Documentation

void ecusim_profile_start ( void )

Definition at line 37 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecuProfile_t::start_cnt, and ecuProfile_t::use_cache.

Referenced by ecusim_profile_init(), and main().

void ecusim_profile_stop ( void )

Definition at line 50 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecuProfile_t::overhead, and ecuProfile_t::start_cnt.

Referenced by ecusim_profile_init(), and main().

void ecusim_profile_init ( void )

Definition at line 66 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecusim_PROFILE_FNAME, ecusim_profile_start(), ecusim_profile_stop(), ecuProfile_t::enabled, ecuProfile_t::fptr, ecuProfile_t::overhead, and ecuProfile_t::use_cache.

Referenced by main().

Here is the call graph for this function:

void ecusim_profile_close ( void )

Definition at line 95 of file ecuprof.c.

References ecuProfile, ecusim_PROFILE_FNAME, ecuProfile_t::enabled, and ecuProfile_t::fptr.

void ecusim_profile_print ( void )

Definition at line 112 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecuProfile_t::enabled, and ecuProfile_t::fptr.

Referenced by main().

Variable Documentation

ecuProfile_t ecuProfile

Initial value:

 {
  (FILE *) NULL,
  TRUE,
  FALSE,
  0L,
  0L,
  0L
}

Definition at line 22 of file ecuprof.c.

Referenced by ecusim_profile_close(), ecusim_profile_init(), ecusim_profile_print(), ecusim_profile_start(), ecusim_profile_stop(), and main().


ECU Test: ecuprof.c Source File

  • File List
  • Globals

ecuprof.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: ECU profiling commands.
00003  ******************************************************************************
00004  * FILE NAME:   ecuprof.c
00005  *
00006  * DESCRIPTION: Defines profiling routines used in the ECU simulation
00007  *
00008  * (C) Copyright 2011, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #include <stdio.h>
00012
00013 #include <ti/mas/sdk/profile.h>
00014 #include <ti/mas/sdk/memArchCfg.h>
00015
00016 #include <ti/mas/ecu/test/src/ecusim.h>
00017
00018
00019 /***********************************************************************
00020  * Profiling structure
00021  ***********************************************************************/
00022 ecuProfile_t ecuProfile = {
00023   (FILE *) NULL,            /* fptr:  initialize to NULL    */
00024   TRUE,                     /* use_cache:  TRUE by default  */
00025   FALSE,                    /* enabled:    FALSE by default */
00026   0L,                       /* overhead:   cleared          */
00027   0L,                       /* start_cnt:  cleared          */
00028   0L                        /* cycles:     cleared          */
00029 };
00030
00031
00032 /***********************************************************************
00033  * Profiling routines
00034  ***********************************************************************/
00035
00036  /* ============ ecusim_profile_start () ========== */
00037 void ecusim_profile_start (void)
00038 {
00039   /* Flush the cache */
00040   if (ecuProfile.use_cache) {
00041     memarchcfg_cacheFlush ();
00042   }
00043
00044   /* Clear the total cycles and get the start count */
00045   ecuProfile.cycles     = 0L;
00046   ecuProfile.start_cnt  = profile_getCPUcycleCount ();
00047 }
00048
00049 /* ============ ecusim_profile_stop () ========== */
00050 void ecusim_profile_stop (void)
00051 {
00052   /* Get end cycles */
00053   tlong count = profile_getCPUcycleCount();
00054
00055   /* Calculate total cycles (correct for timer wrap) */
00056   count -= ecuProfile.start_cnt;
00057   if (count < 0) {
00058     count += sdk_PROFILE_MAXCNT;
00059   }
00060
00061   /* Store adjusted total cycles */
00062   ecuProfile.cycles = count - ecuProfile.overhead;
00063 }
00064
00065 /* ============ ecusim_profile_init () ========== */
00066 void ecusim_profile_init (void)
00067 {
00068   /* Always open in the "disabled mode" */
00069   ecuProfile.enabled = FALSE;
00070
00071   /* Initialize SDK profiling and cache */
00072   profile_initCycleProfiling ();
00073   if (ecuProfile.use_cache) {
00074     memarchcfg_cacheEnable ();
00075   }
00076
00077   /* Get estimate of profile cycle call overhead */
00078   ecuProfile.overhead = 0L;
00079   ecusim_profile_start ();
00080   ecusim_profile_stop  ();
00081   ecuProfile.overhead = ecuProfile.cycles;
00082
00083   /* Open profiling data file */
00084   ecuProfile.fptr = fopen (ecusim_PROFILE_FNAME, "w");
00085   if (ecuProfile.fptr == (FILE *) NULL) {
00086     fprintf (stderr, "Unable to open profiling file");
00087   }
00088   else {
00089     fprintf (stdout, " - Opened file: %s\n", ecusim_PROFILE_FNAME);
00090   }
00091 } /* ecusim_profile_init */
00092
00093
00094 /* ============ ecusim_profile_close () ========== */
00095 void ecusim_profile_close (void)
00096 {
00097   /* Ensure profiling is disabled */
00098   ecuProfile.enabled = FALSE;
00099
00100   /* Close SDK profiler */
00101   profile_closeCycleProfiling ();
00102
00103   /* Close profiling data file */
00104   if (ecuProfile.fptr != NULL) {
00105     fclose (ecuProfile.fptr);
00106     fprintf (stdout, " - Closed file: %s\n", ecusim_PROFILE_FNAME);
00107   }
00108 } /* ecusim_profile_close */
00109
00110
00111 /* ============ ecusim_profile_print () ========== */
00112 void ecusim_profile_print (void)
00113 {
00114   /* Only report if profiling is enabled */
00115   if (ecuProfile.enabled && ecuProfile.fptr != NULL) {
00116     fprintf (ecuProfile.fptr, "%8d\n", ecuProfile.cycles);
00117     fflush  (ecuProfile.fptr);
00118   }
00119 } /* ecusim_profile_print */
00120
00121 /* nothing past this point */


ECU Test: ecuprof.h File Reference

  • File List
  • Globals

ecuprof.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | ecusim_profile_close (void)
void | ecusim_profile_print (void)
void | ecusim_profile_init (void)
void | ecusim_profile_start (void)
void | ecusim_profile_stop (void)

Variables

ecuProfile_t ecuProfile

Function Documentation

void ecusim_profile_close ( void )

Definition at line 95 of file ecuprof.c.

References ecuProfile, ecusim_PROFILE_FNAME, ecuProfile_t::enabled, and ecuProfile_t::fptr.

void ecusim_profile_print ( void )

Definition at line 112 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecuProfile_t::enabled, and ecuProfile_t::fptr.

Referenced by main().

void ecusim_profile_init ( void )

Definition at line 66 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecusim_PROFILE_FNAME, ecusim_profile_start(), ecusim_profile_stop(), ecuProfile_t::enabled, ecuProfile_t::fptr, ecuProfile_t::overhead, and ecuProfile_t::use_cache.

Referenced by main().

Here is the call graph for this function:

void ecusim_profile_start ( void )

Definition at line 37 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecuProfile_t::start_cnt, and ecuProfile_t::use_cache.

Referenced by ecusim_profile_init(), and main().

void ecusim_profile_stop ( void )

Definition at line 50 of file ecuprof.c.

References ecuProfile_t::cycles, ecuProfile, ecuProfile_t::overhead, and ecuProfile_t::start_cnt.

Referenced by ecusim_profile_init(), and main().

Variable Documentation

ecuProfile_t ecuProfile

Definition at line 22 of file ecuprof.c.

Referenced by ecusim_profile_close(), ecusim_profile_init(), ecusim_profile_print(), ecusim_profile_start(), ecusim_profile_stop(), and main().


ECU Test: ecuprof.h Source File

  • File List
  • Globals

ecuprof.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: ECU profiling commands.
00003  ******************************************************************************
00004  * FILE NAME:   ecuprof.h
00005  *
00006  * DESCRIPTION: Defines profiling routines used in the ECU simulation
00007  *
00008  * (C) Copyright 2011, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #ifndef _ECUPROF_H
00012 #define _ECUPROF_H
00013
00014
00015 /***********************************************************************
00016  * Function prototypes
00017  ***********************************************************************/
00018 void ecusim_profile_close (void);
00019 void ecusim_profile_print (void);
00020 void ecusim_profile_init  (void);
00021 void ecusim_profile_start (void);
00022 void ecusim_profile_stop  (void);
00023
00024 /***********************************************************************
00025  * Profiling structure
00026  ***********************************************************************/
00027 extern ecuProfile_t ecuProfile;
00028
00029
00030 #endif /* _ECUPROF_H */
00031
00032 /* nothing past this point */


ECU Test: ecusim.c File Reference

  • File List
  • Globals

ecusim.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/ecu/test/src/ecusim.h>
#include <ti/mas/ecu/test/src/ecufio.h>
#include <ti/mas/ecu/test/src/ecuprof.h>
#include <ti/mas/ecu/test/src/vheap.h>
#include <ti/mas/ecu/test/src/cheap.h>

Include dependency graph for ecusim.c:

Go to the source code of this file.

Defines

#define | SIU_MAX_GETFLT 64

Functions

void | generate_tx_tone_frame (tint frame_size, linSample *frame)
void | convert_tx_tone_frame (tint frame_length, tint pcm_law, linSample *frame)
tint | generate_rx_tone_frame (tint frame_size, linSample *frame)
void | ecu_send_out (void *ecuSoInst, void *samples_in)
void | siu_new_ecu (tint chnum)
void | siu_open_ecu (tint chnum, tint frame_size)
void | siu_open_txhyb (tint chnum, tint frame_length, tint filter_length)
void | siu_open_rxsgn (tint chnum)
void | siu_open_txsgn (tint chnum)
void | siu_set_sgn (void *inst, siuSGNPars_t *sgn)
void | siuTxRxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id)
void | siuPcmSampleTrace (tint chnum, tint pcm_size, void *pcm_in, tuint dir)
void | siuPiuReport (void *siuInst, tint report_code)
void | siuDebugInfoNew (tuint moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *messageData)
void | ecu_sim_init (void)
void | ecu_halt (volatile tbool *exec)
void | main (void)

Variables

linSample * | piu_segment_in
linSample * | piu_segment_out
linSample * | segment_in
linSample * | rx_segment_out
linSample * | rx_frame_in
Fract | siu_getflt [SIU_MAX_GETFLT]
void * | sgnTxInst
void * | sgnRxInst
void * | hybTxInst
tint | siuInStream []
tuint | siuInUCmpStream []
tuint | siuInACmpStream []
linSample | siuRxInStream []
linSample | siuOutErrStream []
volatile siuSetup_t * | ecuSim

Define Documentation

#define SIU_MAX_GETFLT 64

Definition at line 34 of file ecusim.c.

Referenced by main().

Function Documentation

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

Definition at line 218 of file ecusimfunc.c.

References sgnTxInst.

Referenced by main().

void convert_tx_tone_frame | ( | tint | frame_length,
 |  | tint | pcm_law,
 |  | linSample * | frame
 | ) |  |

Definition at line 225 of file ecusimfunc.c.

References acmpr(), mucmpr(), piu_segment_in, siuInACmpStream, siuInStream, and siuInUCmpStream.

Referenced by main().

Here is the call graph for this function:

tint generate_rx_tone_frame | ( | tint | frame_size,
 |  | linSample * | frame
 | ) |  |

Definition at line 266 of file ecusimfunc.c.

References ecu_sim_fread(), ecu_sim_input(), ecu_SIM_SIG_SRC_SGN, ecuSim, siuSetup_s::frame_size, siuSetup_s::rin, rinBuffer, sgnRxInst, siuSetup_s::sig_src, and siuRxInStream.

Referenced by main().

Here is the call graph for this function:

void ecu_send_out | ( | void * | ecuSoInst,
 |  | void * | samples_in
 | ) |  |

Definition at line 300 of file ecusimfunc.c.

void siu_new_ecu ( tint chnum )

Definition at line 337 of file ecusimfunc.c.

References ecu_BG_E_BUF, iramSeg_t::ecu_bg_e_ptr, iramSeg_t::ecu_bg_filter_ptr, ecu_BG_FLTSEG, ecu_BG_UPDATE_BUF, iramSeg_t::ecu_bg_work_ptr, ecu_EXPAND_DL_BUF, iramSeg_t::ecu_fg_filter_ptr, ecu_FG_FLTSEG, ecu_RECEIVE_IN, ecu_SEARCH_FILTER_BUF, siuInst_t::ecuInst, IRAM_ECU_BG_E_LENGTH, IRAM_ECU_BG_FLTSEG_LENGTH, IRAM_ECU_BG_WORK_LENGTH, IRAM_ECU_FG_FLTSEG_LENGTH, IRAM_ECU_SRCH_FILTER_LENGTH, IRAM_PIU_ECU_RECEIVE_LENGTH, iramSeg, iramSeg_t::piu_ecu_receive_ptr, siu_exc_assert, SIU_MID_ECU, siuInst, siuMakeID, siuVAlloc(), and siuInst_t::vheap_used.

Referenced by main().

Here is the call graph for this function:

void siu_open_ecu | ( | tint | chnum,
 |  | tint | frame_size
 | ) |  |

Definition at line 449 of file ecusimfunc.c.

References siuSetup_s::ecu_filter_length, siuSetup_s::ecu_y2x_delay, siuSetup_s::ecuCtl, siuInst_t::ecuInst, ecuSim, siuSetup_s::pcm_format, SIU_ALAW_ZERO, siu_exc_assert, SIU_ULAW_ZERO, and siuInst.

Referenced by main().

void siu_open_txhyb | ( | tint | chnum,
 |  | tint | frame_length,
 |  | tint | filter_length
 | ) |  |

Definition at line 481 of file ecusimfunc.c.

References ecu_halt(), ecu_HYB_SIM_MAX_ECOBUFS, ecu_SIM_ERR_HYB, ecuSim, siuSetup_s::error_id, siuInst_t::exception, siuSetup_s::exec, hybTxInst, MAX_HYB_FILTER_LEN, MAX_HYB_RX_DELAY, MAX_HYB_SAMPLES_PER_FRAME, MAX_HYB_TX_DELAY, and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_rxsgn ( tint chnum )

Definition at line 535 of file ecusimfunc.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuInst_t::companding_law, siuSGNPars_t::dcoffset, siuInst_t::debug, siuSGNPars_t::delay, ecu_halt(), ecu_SIM_ERR_SGN, ecuSim, siuSetup_s::error_id, siuInst_t::exception, siuSetup_s::exec, siuSGNPars_t::f1, siuSGNPars_t::f2, siuSetup_s::Fs, siuSGNPars_t::hoth_seed, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSGNPars_t::num_sample, siuSGNPars_t::pow_level, siuSetup_s::rxSGN, siuSGNPars_t::sdram_addr, sgnRxInst, siu_rx_file(), siuInst, v21_flags, and siuSGNPars_t::wftype.

Referenced by main().

Here is the call graph for this function:

void siu_open_txsgn ( tint chnum )

Definition at line 581 of file ecusimfunc.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuInst_t::companding_law, siuSGNPars_t::dcoffset, siuInst_t::debug, siuSGNPars_t::delay, ecu_halt(), ecu_SIM_ERR_SGN, ecuSim, siuSetup_s::error_id, siuInst_t::exception, siuSetup_s::exec, siuSGNPars_t::f1, siuSGNPars_t::f2, siuSetup_s::Fs, siuSGNPars_t::hoth_seed, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSGNPars_t::num_sample, siuSGNPars_t::pow_level, siuSGNPars_t::sdram_addr, sgnTxInst, siu_tx_file(), siuInst, siuSetup_s::txSGN, 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
 | ) |  |

Definition at line 626 of file ecusimfunc.c.

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

Referenced by main().

void siuTxRxSendIn | ( | void * | siuInst,
 |  | void * | send_frame,
 |  | void * | recv_frame,
 |  | tint | queue_id
 | ) |  |

Definition at line 981 of file ecusimfunc.c.

Referenced by siu_new_piu().

void siuPcmSampleTrace | ( | tint | chnum,
 |  | tint | pcm_size,
 |  | void * | pcm_in,
 |  | tuint | dir
 | ) |  |

Definition at line 969 of file ecusimfunc.c.

Referenced by siu_new_piu().

void siuPiuReport | ( | void * | siuInst,
 |  | tint | report_code
 | ) |  |

Definition at line 958 of file ecusimfunc.c.

Referenced by siu_new_piu().

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

Definition at line 924 of file ecusimfunc.c.

Referenced by siu_new_piu().

void ecu_sim_init ( void )

Definition at line 690 of file ecusimfunc.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuSetup_s::clock_mul, piuControl_t::ctl_code, piuControl_t::dc_offset_removal_select, siuSGNPars_t::dcoffset, siuSGNPars_t::delay, siuSetup_s::ecu_filter_length, siuSetup_s::ecu_fltseg_length, siuSetup_s::ecu_num_fltseg, ecu_SIM_DEF_BASE_INDIR, ecu_SIM_DEF_BASE_OUTDIR, ecu_SIM_DEF_FS, ecu_SIM_DEF_RIN_FNAME, ecu_SIM_DEF_ROUT_FNAME, ecu_SIM_DEF_SIN_FNAME, ecu_SIM_DEF_SOUT_FNAME, ecu_SIM_SIG_SRC_FILE, siuSetup_s::ecu_y2x_delay, siuSetup_s::ecuCtl, ecuSim, ecuSimFileIo_t::eof, siuSetup_s::error_id, siuSetup_s::exec, siuSGNPars_t::f1, siuSGNPars_t::f2, ecuSimFileIo_t::fio, ecuSimFileIo_t::fname, ecuSimFileIo_t::fptr, siuSetup_s::frame_size, siuSetup_s::freerun_frame_cnt, siuSetup_s::Fs, siuSetup_s::getflt, siuSGNPars_t::hoth_seed, siuSetup_s::hyb_filter_length, siuSetup_s::hybCtl, MIPS_AGENT_CTRL, siuGetFlt_t::ncoeff, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSetup_s::num_channel, siuSetup_s::output_chnum, siuSetup_s::pcm_bits, siuSetup_s::pcm_format, piu_DC_OFFSET_MODE2, piu_DC_OFFSET_REMOVAL, siuSetup_s::piuCtl, siuSGNPars_t::pow_level, siuSetup_s::profile_enable, siuSGNPars_t::reset, siuGetFlt_t::retstat, siuSetup_s::rin, siuSetup_s::rout, siuSetup_s::rxSGN, siuSetup_s::sample_cnt, siuSetup_s::save_to_file, siuGetFlt_t::select, siuSetup_s::sig_src, siuSetup_s::sin, SIU_MAX_ECU_FILTER_LENGTH, SIU_MAX_ECU_FLTSEG, SIU_MAX_ECU_FLTSEG_LENGTH, SIU_MAX_HYBRID_LENGTH, siuSetup_s::sout, siuGetFlt_t::start, siuSGNPars_t::state, siuSetup_s::toggle_ecu, siuSetup_s::toggle_freerun, siuSetup_s::toggle_getflt, siuSetup_s::toggle_hyb, siuSetup_s::toggle_piu, siuSetup_s::toggle_rx_sg, siuSetup_s::toggle_tx_sg, siuSetup_s::txSGN, piuControl_t::u, and siuSGNPars_t::wftype.

Referenced by main().

void ecu_halt ( volatile tbool * exec )

Definition at line 74 of file ecusim.c.

Referenced by main(), siu_open_rxsgn(), siu_open_txhyb(), and siu_open_txsgn().

void main ( void )

Definition at line 93 of file ecusim.c.

References siuInst_t::cheap_used, siuSetup_s::clock_mul, siuInst_t::companding_law, siuConfig_t::companding_law, convert_tx_tone_frame(), siuConfig_t::core_heap, piuControl_t::ctl_code, siuConfig_t::debug, siuSGNPars_t::delay, siuSetup_s::ecu_fltseg_length, ecu_halt(), siuSetup_s::ecu_num_fltseg, ecu_SIM_DEF_FS, ecu_SIM_ERR_SLM, ecu_sim_fileio_init(), ecu_SIM_FILEIO_READ, ecu_SIM_FILEIO_WRITE, ecu_sim_fread(), ecu_sim_fwrite(), ecu_sim_init(), ecu_sim_input(), ecu_sim_output(), ecu_SIM_SIG_SRC_FILE, ecu_SIM_SIG_SRC_SGN, ecuContext, siuSetup_s::ecuCtl, siuInst_t::ecuInst, ecuProfile, ecuSim, ecuSIM_MAXSENDOUT_LENGTH, ecusim_profile_init(), ecusim_profile_print(), ecusim_profile_start(), ecusim_profile_stop(), ecuProfile_t::enabled, siuSetup_s::error_id, siuConfig_t::exception, siuSetup_s::exec, FILEIO_FRM_FACTOR, ecuSimFileIo_t::fname, setFrame_t::frame_size, siuSetup_s::frame_size, siuSetup_s::freerun_frame_cnt, siuSetup_s::Fs, generate_rx_tone_frame(), generate_tx_tone_frame(), siuSetup_s::getflt, siuSetup_s::hyb_filter_length, siuSetup_s::hybCtl, hybTxInst, siuConfig_t::ID, siuGetFlt_t::ncoeff, siuSetup_s::pcm_bits, siuConfig_t::pcm_bits, siuSetup_s::pcm_format, piu_segment_in, piu_segment_out, piu_SET_FRAME_SIZE, piuControl(), siuSetup_s::piuCtl, siuInst_t::piuInst, piuReceiveIn(), piuReceiveOut(), piuSendIn(), siuSetup_s::profile_enable, setFrame_t::receive_in_buf, siuTxInst_t::recv_frame_ptr, siuGetFlt_t::retstat, siuSetup_s::rin, rinBuffer, siuSetup_s::rout, rx_frame_in, rx_segment_out, siuSetup_s::rxSGN, siuSetup_s::save_to_file, segment_in, siuGetFlt_t::select, siuTxInst_t::send_frame_length, siuTxInst_t::send_frame_ptr, setFrame_t::send_out_buf, piuControl_t::set_frame, sgnRxInst, sgnTxInst, siuSetup_s::sig_src, siuSetup_s::sin, sinBuffer, siu_core_heap, SIU_CORE_HEAP_SIZE, siu_exc_assert, siu_getflt, SIU_MAX_FRAME_LENGTH, SIU_MAX_GETFLT, SIU_MID_SIU, siu_new_ecu(), siu_new_piu(), siu_open_ecu(), siu_open_piu(), siu_open_rxsgn(), siu_open_tx(), siu_open_txhyb(), siu_open_txsgn(), siu_set_sgn(), siu_voice_heap, SIU_VOICE_HEAP_SIZE, siuCAlloc(), siuDebug(), siuException(), siuInit(), siuInst, siuMakeID, siuOutErrStream, siuInst_t::slmInst, siuSetup_s::sout, soutBuffer, siuGetFlt_t::start, siuSGNPars_t::state, siuTxSendOut_t::targetInst, thwClockSet(), siuSetup_s::toggle_ecu, siuSetup_s::toggle_freerun, siuSetup_s::toggle_getflt, siuSetup_s::toggle_hyb, siuSetup_s::toggle_piu, siuSetup_s::toggle_rx_sg, siuSetup_s::toggle_tx_sg, siuInst_t::TxInst, siuTxInst_t::TxSendOut, siuSetup_s::txSGN, piuControl_t::u, siuConfig_t::voice_heap, and siuSGNPars_t::wftype.

Here is the call graph for this function:

Variable Documentation

linSample* piu_segment_in

Definition at line 27 of file ecusim.c.

Referenced by convert_tx_tone_frame(), and main().

linSample* piu_segment_out

Definition at line 28 of file ecusim.c.

Referenced by main().

linSample* segment_in

Definition at line 29 of file ecusim.c.

Referenced by main().

linSample* rx_segment_out

Definition at line 30 of file ecusim.c.

Referenced by main().

linSample* rx_frame_in

Definition at line 31 of file ecusim.c.

Referenced by main().

Fract siu_getflt[SIU_MAX_GETFLT]

Definition at line 35 of file ecusim.c.

Referenced by main().

void* sgnTxInst

Definition at line 44 of file ecusimfunc.c.

Referenced by generate_tx_tone_frame(), main(), and siu_open_txsgn().

void* sgnRxInst

Definition at line 45 of file ecusimfunc.c.

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

void* hybTxInst

Definition at line 48 of file ecusimfunc.c.

Referenced by main(), and siu_open_txhyb().

tint siuInStream[]

Definition at line 31 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInUCmpStream[]

Definition at line 32 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInACmpStream[]

Definition at line 33 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

linSample siuRxInStream[]

Definition at line 34 of file ecusimfunc.c.

Referenced by generate_rx_tone_frame().

linSample siuOutErrStream[]

Definition at line 38 of file ecusimfunc.c.

Referenced by ecu_send_out(), and main().

volatile siuSetup_t* ecuSim

Definition at line 75 of file ecusimfunc.c.


ECU Test: ecusim.c Source File

  • File List
  • Globals

ecusim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main program and supporting routines for the simulation of ECU.
00003  ******************************************************************************
00004  * FILE NAME:   ecusim.c
00005  *
00006  * DESCRIPTION: Contains main program and supporting routines for the
00007  *              simulation of ECU. Depends on SIU support module.
00008  *
00009  * TABS: NONE
00010  *
00011  * REVISION HISTORY:
00012  *
00013  * (C) Copyright 2008, Texas Instruments, Inc.
00014  *****************************************************************************/
00015 #include <stdio.h>
00016 #include <stdlib.h>
00017 #include <string.h>
00018
00019 /* Test include files */
00020 #include <ti/mas/ecu/test/src/ecusim.h>     /* for simulation-specific defines */
00021 #include <ti/mas/ecu/test/src/ecufio.h>     /* file I/O functions */
00022 #include <ti/mas/ecu/test/src/ecuprof.h>    /* ECU profiling */
00023 #include <ti/mas/ecu/test/src/vheap.h>      /* Voice heap */
00024 #include <ti/mas/ecu/test/src/cheap.h>      /* Core heap */
00025
00026 /* global pointers */
00027 linSample *piu_segment_in;       /* PCM buffers for piuPcmIo() */
00028 linSample *piu_segment_out;
00029 linSample *segment_in;      /* linear buffer for Tx generator */
00030 linSample *rx_segment_out;  /* linear buffer for Rx out display */
00031 linSample *rx_frame_in;     /* linear buffer for Rx generator */
00032
00033 /* ecuGetFilter() support data */
00034 #define SIU_MAX_GETFLT    64
00035 Fract siu_getflt[SIU_MAX_GETFLT];   /* coefficient buffer */
00036
00037 /* Signal Generator Instances */
00038 extern void  *sgnTxInst;
00039 extern void  *sgnRxInst;
00040
00041 /* Hybrid Instance and hybrid filter */
00042 extern void  *hybTxInst;
00043
00044 /* Input streams */
00045 extern tint  siuInStream[];       /* input samples in Q0 */
00046 extern tuint siuInUCmpStream[];   /* u-law coded input samples */
00047 extern tuint siuInACmpStream[];   /* A-law coded input samples */
00048 extern linSample siuRxInStream[]; /* Rx input samples in Q0 */
00049
00050 /* Output streams */
00051 extern linSample siuOutErrStream[];   /* output error in Q0   */
00052 /* simulation setup structure */
00053 extern volatile siuSetup_t *ecuSim;
00054
00055 /* function prototypes used in this file */
00056 extern void generate_tx_tone_frame (tint frame_size, linSample *frame);
00057 extern void convert_tx_tone_frame (tint frame_length, tint pcm_law, linSample *frame);
00058 extern tint generate_rx_tone_frame (tint frame_size, linSample *frame);
00059 extern void ecu_send_out (void *ecuSoInst, void *samples_in);
00060 extern void siu_new_ecu (tint chnum);
00061 extern void siu_open_ecu (tint chnum, tint frame_size);
00062 extern void siu_open_txhyb (tint chnum, tint frame_length, tint filter_length);
00063
00064 extern void siu_open_rxsgn (tint chnum);
00065 extern void siu_open_txsgn (tint chnum);
00066 extern void siu_set_sgn (void *inst, siuSGNPars_t *sgn);
00067 extern void siuTxRxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id);
00068 extern void siuPcmSampleTrace (tint chnum, tint pcm_size, void *pcm_in, tuint dir);
00069 extern void siuPiuReport (void *siuInst, tint report_code);
00070 extern void siuDebugInfoNew (tuint moduleID, tuint msgType, tuint messageCode,
00071                       tuint msgLength, tuint *messageData);
00072 extern void ecu_sim_init(void);
00073
00074 void ecu_halt (volatile tbool *exec)
00075 {
00076   /* Wait for further actions - run when user sets "exec" to TRUE, i.e., 1 */
00077   while (!(*exec)) {
00078     asm ("  NOP");
00079     asm ("Set_BP_Here:  ");
00080     asm ("  NOP");
00081     asm ("  NOP");
00082   }
00083 }
00084
00085
00086 /******************************************************************************
00087  * FUNCTION PURPOSE: Main program.
00088  ******************************************************************************
00089  * DESCRIPTION: Main program. Starts the system.
00090  *
00091  *****************************************************************************/
00092
00093 void main (void)
00094 {
00095   int i;
00096   piuControl_t piuCtrl;
00097   siuConfig_t  siuCfg;
00098 #if ECU_SIM_USE_VPE
00099   slmConfig_t  slmCfg;
00100 #endif
00101   siuInst_t    *inst;
00102   void *cheap;
00103   void *vheap;
00104   tint chnum;
00105   tint frame_size;
00106   tint ulaw;
00107   tint hyb_filter_length;
00108   tint seg_count;
00109   tbool do_freerun = FALSE;
00110   tint  dataIn = 1;
00111   linSample ecu_out_buf[ecuSIM_MAXSENDOUT_LENGTH+1],*ecu_out_buf_start;
00112 #if ECU_SIM_USE_VPE
00113   tint slmSize, retVal;
00114 #endif
00115   tuint sample_count = 0;
00116   tuint sec_count = 0;
00117
00118   /* align ecu out buf */
00119   ecu_out_buf_start = typChkAlign(ecu_out_buf,1)? ecu_out_buf : (ecu_out_buf+1);
00120
00121   /* We may need exception routines rather soon */
00122   siuCfg.ID             = siuMakeID (SIU_MID_SIU, 0); /* use chnum 0 this time */
00123 # ifndef _HWDSKT
00124     siuCfg.exception    = siuException;
00125     siuCfg.debug        = siuDebug;
00126 # else
00127     siuCfg.exception    = exception_fcn;
00128     siuCfg.debug        = debug_fcn;
00129 # endif
00130
00131   /* Initialize simulation parameters */
00132   ecu_sim_init();
00133   /* wait here, change any simulation parameters before run again */
00134   ecu_halt (&ecuSim->exec);
00135   /*----------------------------------------------*/
00136   /* Set the clock mode register.                 */
00137   /*----------------------------------------------*/
00138 #if 0  /* Remove for now until c55x target hardware utilities are defined */
00139   if (ecuSim->clock_mul != 0)
00140     thwClockSet (ecuSim->clock_mul);
00141 #endif
00142
00143   /*----------------------------------------------*/
00144   /* Set some simulation configuration parameters */
00145   /*----------------------------------------------*/
00146   ulaw = ecuSim->pcm_format;         /* specify type of physical I/O */
00147   siu_exc_assert (ulaw >= -1 && ulaw <= 2, &siuCfg);
00148
00149   /* NOTE: physical I/O type is used for Voice Coding Companding Law!!! */
00150   /*-----------------------------*/
00151   /* Initialize DSP Architecture */
00152   /*-----------------------------*/
00153
00154   /* Initialize profiling */
00155   ecusim_profile_init ();
00156
00157   /* Initialize heaps */
00158   cheap = mhmCreate (siu_core_heap, SIU_CORE_HEAP_SIZE,0);
00159   siu_exc_assert (cheap != NULL, &siuCfg);
00160   vheap = mhmCreate (siu_voice_heap, SIU_VOICE_HEAP_SIZE,0);
00161   siu_exc_assert (vheap != NULL, &siuCfg);
00162
00163   /* Init SIU */
00164   siuCfg.companding_law = ulaw;                 /* physical I/O type */
00165   siuCfg.pcm_bits       = ecuSim->pcm_bits;    /* # of bits in physical I/O */
00166   siuCfg.core_heap      = cheap;
00167   siuCfg.voice_heap     = vheap;
00168   siuInit (&siuCfg);                /* inits siuContext & siuInst[] */
00169
00170   /* from now on, deal with channel #1 */
00171   chnum = 1;
00172   inst = &siuInst[chnum-1];       /* SIU instance for channel #1 */
00173
00174   frame_size = ecuSim->frame_size;     /* 5ms default */
00175   siu_exc_assert ((frame_size >= ecuSim->rxSGN.delay     &&
00176                    frame_size >= ecuSim->txSGN.delay)    ||
00177                   (ecuSim->rxSGN.wftype != sgn_WFT_FILE  &&
00178                    ecuSim->txSGN.wftype != sgn_WFT_FILE), &siuCfg);
00179   do_freerun = FALSE;                   /* No free run until toggled */
00180   hyb_filter_length = ecuSim->hyb_filter_length;
00181
00182   /* Alter ECU context based on siuSetup selections */
00183   ecuContext.max_filter_seg_length = ecuSim->ecu_fltseg_length;
00184   ecuContext.max_filter_seg_count  = ecuSim->ecu_num_fltseg;
00185
00186   /* Print some parameters (sorry, no printer available at this time) */
00187
00188   /* Create some modules. Order is important:
00189    *  ECU, PIU must be in this order. */
00190
00191   /* Create ECU module */
00192   siu_new_ecu (chnum);
00193
00194   /* Create PIU module */
00195   siu_new_piu (chnum, (tint)SIU_MAX_FRAME_LENGTH);
00196
00197 #if ECU_SIM_USE_VPE
00198   /* initialize signal limiter */
00199   retVal = slmGetSizes(&slmSize);
00200   if (retVal != slm_NOERR){
00201     ecuSim->error_id = ecu_SIM_ERR_SLM;
00202     ecuSim->exec = FALSE;
00203     ecu_halt (&ecuSim->exec);
00204   }
00205   inst->slmInst = malloc(slmSize);
00206   /* configure slm */
00207   slmCfg.valid_bf = 0;
00208   /* configure sampling rate */
00209   slmCfg.valid_bf |= 0x01;
00210   if (ecuSim->Fs == ecu_SIM_DEF_FS)
00211     slmCfg.srate_factor = slm_SRATE_FACTOR_8K;
00212   else
00213     slmCfg.srate_factor = slm_SRATE_FACTOR_16K;
00214   slmInit (inst->slmInst, &slmCfg);
00215 #endif
00216
00217   /* Allocate PIU Sample Segment Buffers */
00218   segment_in = (linSample*)siuCAlloc (FILEIO_FRM_FACTOR*frame_size*sizeof(linSample));
00219   inst->cheap_used += frame_size*sizeof(linSample);
00220   siu_exc_assert (segment_in != NULL, inst);
00221   utlLsMemSet (&segment_in[0], (linSample)0,FILEIO_FRM_FACTOR*frame_size);
00222
00223   rx_segment_out = (linSample*)siuCAlloc (frame_size*sizeof(linSample));
00224   inst->cheap_used += frame_size*sizeof(linSample);
00225   siu_exc_assert (rx_segment_out != NULL, inst);
00226   /* Zero it out! */
00227   for (i = 0; i < frame_size; i++)
00228     rx_segment_out[i] = (linSample)0;
00229
00230   /* Allocate receive in samples segment buffer */
00231   rx_frame_in = (linSample*)siuCAlloc(FILEIO_FRM_FACTOR*frame_size*sizeof(linSample));
00232   inst->cheap_used += frame_size*sizeof(linSample);
00233   siu_exc_assert (rx_frame_in != NULL, inst);
00234   utlLsMemSet (&rx_frame_in[0], (linSample)0,FILEIO_FRM_FACTOR*frame_size);
00235
00236    /* Open Tx Task */
00237   siu_open_tx (chnum, frame_size);
00238   /* Open ECU module */
00239   siu_open_ecu (chnum, frame_size);
00240
00241   /* Open PIU module */
00242   siu_open_piu (chnum, frame_size);
00243
00244   /* Open Hybrid in Tx Path */
00245   siu_open_txhyb (chnum, frame_size, hyb_filter_length);
00246   /* Open Tx Signal Generator */
00247   siu_open_txsgn (chnum);
00248   /* Open Rx Signal Generator */
00249   siu_open_rxsgn (chnum);
00250
00251   /* sync signal generation with PIU */
00252   piuCtrl.ctl_code                 = piu_SET_FRAME_SIZE;
00253   piuCtrl.u.set_frame.frame_size   = frame_size;
00254   piuControl (inst->piuInst, &piuCtrl);
00255   piu_segment_in  = (linSample *)(piuCtrl.u.set_frame.send_out_buf);
00256   piu_segment_out = (linSample *)(piuCtrl.u.set_frame.receive_in_buf);
00257
00258   if (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE){
00259     /* open the input files */
00260     ecu_sim_fileio_init (&ecuSim->rin, ecu_SIM_FILEIO_READ);
00261     ecu_sim_fileio_init (&ecuSim->sin, ecu_SIM_FILEIO_READ);
00262     /* open output files */
00263     ecu_sim_fileio_init (&ecuSim->rout, ecu_SIM_FILEIO_WRITE);
00264     ecu_sim_fileio_init (&ecuSim->sout, ecu_SIM_FILEIO_WRITE);
00265   }
00266   else if (ecuSim->save_to_file == TRUE){
00267     /* rin file I/O init */
00268     strcpy((char *)ecuSim->rin.fname, "rin_sgn.pcm");
00269     /* sin file I/O init */
00270     strcpy((char *)ecuSim->sin.fname, "sin_sgn.pcm");
00271     /* rout file I/O init */
00272     strcpy((char *)ecuSim->rout.fname, "rout_sgn.pcm");
00273     /* sout file I/O init */
00274     strcpy((char *)ecuSim->sout.fname, "sout_sgn.pcm");
00275     ecu_sim_fileio_init (&ecuSim->rin, ecu_SIM_FILEIO_WRITE);
00276     ecu_sim_fileio_init (&ecuSim->sin, ecu_SIM_FILEIO_WRITE);
00277     /* open output files */
00278     ecu_sim_fileio_init (&ecuSim->rout, ecu_SIM_FILEIO_WRITE);
00279     ecu_sim_fileio_init (&ecuSim->sout, ecu_SIM_FILEIO_WRITE);
00280   }
00281
00282
00283   /* Enter main loop */
00284   while (dataIn) {
00285     /* one segment of Tx samples generated in each pass!
00286      *  Rx frames are generated every segs_per_frame segments! */
00287     if (ecuSim->toggle_getflt) {
00288       ecuSim->toggle_getflt = FALSE;
00289       if (ecuSim->getflt.ncoeff > SIU_MAX_GETFLT) {
00290         ecuSim->getflt.ncoeff = SIU_MAX_GETFLT;
00291       }
00292       ecuSim->getflt.retstat = ecuGetFilter (inst->ecuInst,
00293                                ecuSim->getflt.select, ecuSim->getflt.start,
00294                                ecuSim->getflt.ncoeff, &siu_getflt[0]);
00295     }
00296     if (ecuSim->toggle_ecu) {
00297       ecuSim->toggle_ecu = FALSE;
00298       ecuControl (inst->ecuInst, (ecuControl_t*)&ecuSim->ecuCtl);
00299     }
00300     if (ecuSim->toggle_piu) {
00301       ecuSim->toggle_piu = FALSE;
00302       piuControl (inst->piuInst, (piuControl_t*)&ecuSim->piuCtl);
00303     }
00304     if (ecuSim->toggle_tx_sg) {
00305       ecuSim->toggle_tx_sg = FALSE;
00306       ecuSim->txSGN.state = !ecuSim->txSGN.state;
00307       siu_set_sgn (sgnTxInst, (siuSGNPars_t*)&ecuSim->txSGN);
00308     }
00309     if (ecuSim->toggle_rx_sg) {
00310       ecuSim->toggle_rx_sg = FALSE;
00311       ecuSim->rxSGN.state = !ecuSim->rxSGN.state;
00312       siu_set_sgn (sgnRxInst, (siuSGNPars_t*)&ecuSim->rxSGN);
00313     }
00314     if (ecuSim->toggle_hyb) {
00315       ecuSim->toggle_hyb = FALSE;
00316       hybControl (hybTxInst, (hybControl_t*)&ecuSim->hybCtl);
00317     }
00318     if (ecuSim->toggle_freerun) {
00319       ecuSim->toggle_freerun = FALSE;
00320       seg_count  = ecuSim->freerun_frame_cnt;
00321       do_freerun = TRUE;
00322     }
00323 #if ECU_SIM_USE_VPE
00324     if (ecuSim->toggle_slm) {
00325       ecuSim->toggle_slm = FALSE;
00326       slmControl (inst->slmInst, ecuSim->slm_mode);
00327     }
00328 #endif
00329
00330     /* Allow dynamic profiling enable/disable */
00331     ecuProfile.enabled = ecuSim->profile_enable;
00332
00333     /* Free running over many frames */
00334     if (do_freerun) {
00335       if (seg_count-- < 0) {
00336         /* Place breakpoint here */
00337         do_freerun = FALSE;
00338         asm (" nop");
00339         asm (" nop");
00340       }
00341     }
00342
00343     /* RX Frame MUST be generated before piuPcmIo() starts!!! */
00344     dataIn = generate_rx_tone_frame (frame_size, rx_frame_in);
00345
00346     /* if signal is from SGN and want to save to a file */
00347     if ((ecuSim->sig_src      == ecu_SIM_SIG_SRC_SGN) &&
00348         (ecuSim->save_to_file == TRUE)) {
00349       /* write rin to a file */
00350       ecu_sim_output (rinBuffer, rx_frame_in);
00351       ecu_sim_fwrite (rinBuffer, ecuSim->frame_size, &ecuSim->rin);
00352     }
00353 #if ECU_SIM_USE_VPE
00354     slmProcess (inst->slmInst, rx_frame_in, frame_size);
00355 #endif
00356     piuReceiveIn (inst->piuInst, rx_frame_in);
00357
00358     /* Now generate TX segment */
00359     if (ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN) {
00360       generate_tx_tone_frame (frame_size, segment_in);
00361       /* Implement hybrid simulation */
00362       hybAddEcho (hybTxInst, &segment_in[0], &rx_segment_out[0]);
00363       /* if signal is from SGN and want to save to a file */
00364       if ((ecuSim->sig_src      == ecu_SIM_SIG_SRC_SGN) &&
00365           (ecuSim->save_to_file == TRUE)){
00366         ecu_sim_output (sinBuffer, segment_in);
00367         ecu_sim_fwrite (sinBuffer, ecuSim->frame_size, &ecuSim->sin);
00368       }
00369     }
00370     else {
00371       dataIn &= ecu_sim_fread (sinBuffer, frame_size, &ecuSim->sin);
00372       ecu_sim_input (sinBuffer, segment_in);
00373     }
00374
00375     /* Convert near-end signal into u/A-law */
00376     convert_tx_tone_frame (frame_size, inst->companding_law, &segment_in[0]);
00377
00378     piuSendIn (inst->piuInst, (tword **) &piu_segment_in, 0, frame_size);
00379     piuReceiveOut (inst->piuInst, (tword **) &piu_segment_out, 0, frame_size);
00380
00381     /* Explicitly call ecuSendIn() every frame */
00382     ecusim_profile_start ();
00383     ecuSendIn (inst->TxInst.TxSendOut.targetInst, inst->TxInst.send_frame_ptr,
00384                inst->TxInst.recv_frame_ptr, ecu_out_buf_start);
00385     ecusim_profile_stop ();
00386     ecusim_profile_print ();
00387
00388     /* copy out resulting samples */
00389     for (i=0; i<inst->TxInst.send_frame_length; i++) {
00390       siuOutErrStream[i] = ecu_out_buf_start[i];
00391     }
00392
00393     /* write Sout to output file */
00394     if ( (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE) ||
00395         ((ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN ) &&
00396          (ecuSim->save_to_file == TRUE))) {
00397       ecu_sim_output (soutBuffer, siuOutErrStream);
00398       ecu_sim_fwrite (soutBuffer, ecuSim->frame_size, &ecuSim->sout);
00399     }
00400
00401     /* Convert piu_segment_out to rx_segment_out */
00402     if (inst->companding_law == const_COMP_MULAW_8) {
00403       for (i=0; i<frame_size; i++) {
00404         rx_segment_out[i] = (linSample)muaTblUlaw[piu_segment_out[i]];
00405       }
00406     }
00407     else if (inst->companding_law == const_COMP_ALAW_8) {
00408       for (i=0; i<frame_size; i++) {
00409         rx_segment_out[i] = (linSample)muaTblAlaw[piu_segment_out[i]];
00410       }
00411     }
00412     else if (inst->companding_law == const_COMP_LINEAR) {
00413       for (i=0; i<frame_size; i++) {
00414         rx_segment_out[i] = (linSample) (piu_segment_out[i] << (16 - inst->pcm_bits));
00415       }
00416     }
00417     else {                          /* use u-law in transparent mode */
00418       for (i=0; i<frame_size; i++) {
00419         rx_segment_out[i] = (linSample)muaTblUlaw[piu_segment_out[i]];
00420       }
00421     }
00422
00423     /* write rout (really Rin) to output file */
00424     if ( (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE) ||
00425         ((ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN ) &&
00426          (ecuSim->save_to_file == TRUE))) {
00427       ecu_sim_output (routBuffer, rx_segment_out);
00428       ecu_sim_fwrite (routBuffer, ecuSim->frame_size, &ecuSim->rout);
00429     }
00430
00431     /* Update sample count and notify time progress */
00432     sample_count += ecuSim->frame_size;
00433     if (sample_count >= ecuSim->Fs) {
00434       sample_count -= ecuSim->Fs;
00435       sec_count++;
00436       printf (" - Progress: %d seconds\n", sec_count);
00437     }
00438
00439     /* Check for simulation progress */
00440     ecuSim->sample_cnt = ((tulong)sec_count * ecuSim->Fs) + sample_count;
00441   }
00442   /* Close profiling */
00443   ecusim_profile_close ();
00444
00445   /* close files if needed */
00446   if ( (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE) ||
00447       ((ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN)  &&
00448        (ecuSim->save_to_file == TRUE))) {
00449     ecu_sim_fileio_end (&ecuSim->rin);
00450     ecu_sim_fileio_end (&ecuSim->sin);
00451     ecu_sim_fileio_end (&ecuSim->rout);
00452     ecu_sim_fileio_end (&ecuSim->sout);
00453   }
00454   ecuSim->error_id = ecu_SIM_END;
00455   ecuSim->exec     = FALSE;
00456   ecu_halt (&ecuSim->exec);
00457 } /* main */
00458
00459 /* end of ecusim.c*/
00460
00461


ECU Test: ecusim.h File Reference

  • File List
  • Globals

ecusim.h File Reference

#include <stdio.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/sdk/sgn.h>
#include <ti/mas/sdk/hyb.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/mhm/mhm.h>
#include <ti/mas/ecu/ecu.h>
#include <ti/mas/ecu/test/src/siu.h>
#include <ti/mas/ecu/test/src/siuloc.h>
#include <ti/mas/ecu/test/src/siuport.h>
#include <ti/mas/ecu/test/src/ecusimport.h>
#include <ti/mas/ecu/test/src/piu.h>

Include dependency graph for ecusim.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuSGNPars_t
struct | siuGetFlt_t
struct | ecuSimFileIo_t
struct | ecuProfile_t
struct | siuSetup_s

Defines

#define | ECUSIM_INCLUDE_MAG 0
#define | ECU_SIM_USE_VPE 0
#define | NUMBER_OF_FRAMES 1
#define | SIU_MAX_FRAME_LENGTH 80
#define | SIU_MAX_SYSTEM_DELAY 40
#define | MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
#define | MAX_HYBSEG_LENGTH 256
#define | MAX_HYB_SAMPLES_PER_FRAME SIU_MAX_FRAME_LENGTH
#define | MAX_HYB_FILTER_LEN 1024
#define | MAX_HYB_RX_DELAY 0
#define | MAX_HYB_TX_DELAY SIU_MAX_SYSTEM_DELAY
#define | ecu_HYB_SIM_MAX_ECOBUFS 5
#define | SIU_MAX_ECU_FILTER_LENGTH 256
#define | SIU_MAX_HYBRID_LENGTH 256
#define | SIU_MAX_ECU_FLTSEG 1
#define | SIU_MAX_ECU_FLTSEG_LENGTH 256
#define | SIU_CHST_CLOSED 0
#define | SIU_CHST_IDLE 1
#define | SIU_CHST_VOICE 2
#define | SIU_CHST_DTMF 3
#define | ecu_SIM_MAX_CHANNELS 16
#define | ecu_SIM_MAX_SAMPLES MAX_STREAM_SIZE
#define | ecu_SIM_MAX_TAIL_LEN 128
#define | ecu_SIM_MAX_ECOBUFS 5
#define | ecu_SIM_MAX_STRING 256
#define | ecu_SIM_MAX_BSIZE 128
#define | ecu_SIM_FILEIO_READ ( 0)
#define | ecu_SIM_FILEIO_WRITE ( 1)
#define | ecu_SIM_ERR_SLM ( 1)
#define | ecu_SIM_ERR_HYB ( 2)
#define | ecu_SIM_ERR_SGN ( 4)
#define | ecu_SIM_ERR_5 ( 5)
#define | ecu_SIM_ERR_6 ( 6)
#define | ecu_SIM_ERR_7 ( 7)
#define | ecu_SIM_ERR_8 ( 8)
#define | ecu_SIM_ERR_9 ( 9)
#define | ecu_SIM_ERR_10 (10)
#define | ecu_SIM_ERR_11 (11)
#define | ecu_SIM_ERR_12 (12)
#define | ecu_SIM_ERR_13 (13)
#define | ecu_SIM_ERR_14 (14)
#define | ecu_SIM_ERR_15 (15)
#define | ecu_SIM_END (16)
#define | ecu_SIM_SIG_SRC_FILE 0
#define | ecu_SIM_SIG_SRC_SGN 1
#define | ecu_SIM_DEF_FS 8000
#define | ecu_SIM_DEF_RIN_FNAME "rin.pcm"
#define | ecu_SIM_DEF_SIN_FNAME "sin.pcm"
#define | ecu_SIM_DEF_ROUT_FNAME "rout.pcm"
#define | ecu_SIM_DEF_SOUT_FNAME "sout.pcm"
#define | ecu_SIM_DEF_FILT_FNAME "hreg.txt"
#define | ecusim_PROFILE_FNAME "../../vectors/profile/profile.txt"
#define | ecu_SIM_DEF_BASE_INDIR "../../vectors/inp/"
#define | ecu_SIM_DEF_BASE_OUTDIR "../../vectors/out/"
#define | FILEIO_FRM_FACTOR 3
#define | SEG_END_TBLSIZE 8
#define | ecuSIM_MAXSENDOUT_LENGTH 88

Typedefs

typedef siuSetup_s | siuSetup_t

Functions

void | ecu_send_out (void *ecuSoInst, void *samples_in)

Define Documentation

#define ECUSIM_INCLUDE_MAG 0

Definition at line 36 of file ecusim.h.

#define ECU_SIM_USE_VPE 0

Definition at line 37 of file ecusim.h.

#define NUMBER_OF_FRAMES 1

Definition at line 48 of file ecusim.h.

#define SIU_MAX_FRAME_LENGTH 80

Definition at line 54 of file ecusim.h.

Referenced by ecu_sim_output(), and main().

#define SIU_MAX_SYSTEM_DELAY 40

Definition at line 55 of file ecusim.h.

#define MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)

Definition at line 57 of file ecusim.h.

#define MAX_HYBSEG_LENGTH 256

Definition at line 58 of file ecusim.h.

#define MAX_HYB_SAMPLES_PER_FRAME SIU_MAX_FRAME_LENGTH

Definition at line 59 of file ecusim.h.

Referenced by siu_open_txhyb().

#define MAX_HYB_FILTER_LEN 1024

Definition at line 60 of file ecusim.h.

Referenced by siu_open_txhyb().

#define MAX_HYB_RX_DELAY 0

Definition at line 61 of file ecusim.h.

Referenced by siu_open_txhyb().

#define MAX_HYB_TX_DELAY SIU_MAX_SYSTEM_DELAY

Definition at line 62 of file ecusim.h.

Referenced by siu_open_txhyb().

#define ecu_HYB_SIM_MAX_ECOBUFS 5

Definition at line 63 of file ecusim.h.

Referenced by siu_open_txhyb().

#define SIU_MAX_ECU_FILTER_LENGTH 256

Definition at line 71 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_MAX_HYBRID_LENGTH 256

Definition at line 72 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_MAX_ECU_FLTSEG 1

Definition at line 73 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_MAX_ECU_FLTSEG_LENGTH 256

Definition at line 74 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_CHST_CLOSED 0

Definition at line 85 of file ecusim.h.

#define SIU_CHST_IDLE 1

Definition at line 86 of file ecusim.h.

#define SIU_CHST_VOICE 2

Definition at line 87 of file ecusim.h.

#define SIU_CHST_DTMF 3

Definition at line 88 of file ecusim.h.

#define ecu_SIM_MAX_CHANNELS 16

Definition at line 91 of file ecusim.h.

#define ecu_SIM_MAX_SAMPLES MAX_STREAM_SIZE

Definition at line 92 of file ecusim.h.

#define ecu_SIM_MAX_TAIL_LEN 128

Definition at line 93 of file ecusim.h.

#define ecu_SIM_MAX_ECOBUFS 5

Definition at line 94 of file ecusim.h.

#define ecu_SIM_MAX_STRING 256

Definition at line 95 of file ecusim.h.

#define ecu_SIM_MAX_BSIZE 128

Definition at line 96 of file ecusim.h.

#define ecu_SIM_FILEIO_READ ( 0)

Definition at line 99 of file ecusim.h.

Referenced by ecu_sim_fileio_init(), and main().

#define ecu_SIM_FILEIO_WRITE ( 1)

Definition at line 100 of file ecusim.h.

Referenced by ecu_sim_fileio_init(), and main().

#define ecu_SIM_ERR_SLM ( 1)

Definition at line 103 of file ecusim.h.

Referenced by main().

#define ecu_SIM_ERR_HYB ( 2)

Definition at line 104 of file ecusim.h.

Referenced by siu_open_txhyb().

#define ecu_SIM_ERR_SGN ( 4)

Definition at line 105 of file ecusim.h.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

#define ecu_SIM_ERR_5 ( 5)

Definition at line 106 of file ecusim.h.

#define ecu_SIM_ERR_6 ( 6)

Definition at line 107 of file ecusim.h.

#define ecu_SIM_ERR_7 ( 7)

Definition at line 108 of file ecusim.h.

#define ecu_SIM_ERR_8 ( 8)

Definition at line 109 of file ecusim.h.

#define ecu_SIM_ERR_9 ( 9)

Definition at line 110 of file ecusim.h.

#define ecu_SIM_ERR_10 (10)

Definition at line 111 of file ecusim.h.

#define ecu_SIM_ERR_11 (11)

Definition at line 112 of file ecusim.h.

#define ecu_SIM_ERR_12 (12)

Definition at line 113 of file ecusim.h.

#define ecu_SIM_ERR_13 (13)

Definition at line 114 of file ecusim.h.

#define ecu_SIM_ERR_14 (14)

Definition at line 115 of file ecusim.h.

#define ecu_SIM_ERR_15 (15)

Definition at line 116 of file ecusim.h.

#define ecu_SIM_END (16)

Definition at line 117 of file ecusim.h.

#define ecu_SIM_SIG_SRC_FILE 0

Definition at line 120 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

#define ecu_SIM_SIG_SRC_SGN 1

Definition at line 121 of file ecusim.h.

Referenced by generate_rx_tone_frame(), and main().

#define ecu_SIM_DEF_FS 8000

Definition at line 124 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

#define ecu_SIM_DEF_RIN_FNAME "rin.pcm"

Definition at line 125 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_SIN_FNAME "sin.pcm"

Definition at line 126 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_ROUT_FNAME "rout.pcm"

Definition at line 127 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_SOUT_FNAME "sout.pcm"

Definition at line 128 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_FILT_FNAME "hreg.txt"

Definition at line 129 of file ecusim.h.

#define ecusim_PROFILE_FNAME "../../vectors/profile/profile.txt"

Definition at line 137 of file ecusim.h.

Referenced by ecusim_profile_close(), and ecusim_profile_init().

#define ecu_SIM_DEF_BASE_INDIR "../../vectors/inp/"

Definition at line 138 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_BASE_OUTDIR "../../vectors/out/"

Definition at line 139 of file ecusim.h.

Referenced by ecu_sim_init().

#define FILEIO_FRM_FACTOR 3

Definition at line 143 of file ecusim.h.

Referenced by main().

#define SEG_END_TBLSIZE 8

Definition at line 146 of file ecusim.h.

Referenced by acmpr(), and mucmpr().

#define ecuSIM_MAXSENDOUT_LENGTH 88

Definition at line 147 of file ecusim.h.

Referenced by main().

Typedef Documentation

typedef struct siuSetup_s siuSetup_t

Function Documentation

void ecu_send_out | ( | void * | ecuSoInst,
 |  | void * | samples_in
 | ) |  |

Definition at line 300 of file ecusimfunc.c.

References siuTxInst_t::send_frame_length, siuOutErrStream, and siuInst_t::TxInst.


ECU Test: ecusim.h Source File

  • File List
  • Globals

ecusim.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Header file ECU context.
00003  ******************************************************************************
00004  * FILE NAME: ecusim.h
00005  *
00006  * DESCRIPTION: Header file for ECU context initialization.
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #ifndef _ECUSIM_H
00011 #define _ECUSIM_H
00012
00013 #include <stdio.h>
00014
00015 /* System level includes */
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/util/utl.h>
00018 #include <ti/mas/sdk/sgn.h>
00019 #include <ti/mas/sdk/hyb.h>
00020 #include <ti/mas/util/mua.h>
00021 #include <ti/mas/mhm/mhm.h>
00022
00023 /* ECU includes */
00024 #include <ti/mas/ecu/ecu.h>        /* for ecuGetSizes(), ecuNew(), ecuOpen(),... */
00025
00026 /* SIU header files */
00027 #include <ti/mas/ecu/test/src/siu.h>
00028 #include <ti/mas/ecu/test/src/siuloc.h>
00029 #include <ti/mas/ecu/test/src/siuport.h>
00030
00031 /* Test include files */
00032 #include <ti/mas/ecu/test/src/ecusimport.h>
00033 #include <ti/mas/ecu/test/src/piu.h>        /* for piuPcmIo() */
00034
00035 /* Options */
00036 #define ECUSIM_INCLUDE_MAG  0
00037 #define ECU_SIM_USE_VPE     0
00038
00039 #if ECU_SIM_USE_VPE
00040 #include <ti/mas/vpe/slm.h>
00041 #endif
00042
00043 #if ECUSIM_INCLUDE_MAG
00044 #include <ti/mas/ecu/mag.h>
00045 #endif
00046
00047
00048 #define NUMBER_OF_FRAMES          1       /* # of frames to save */
00049
00050 #if ecu_5P5MS_FRAME_ENABLE
00051 #define SIU_MAX_FRAME_LENGTH      88      /* 11ms maximum frame duration */
00052 #define SIU_MAX_SYSTEM_DELAY      44      /* maximum extra system delay in samples */
00053 #else
00054 #define SIU_MAX_FRAME_LENGTH      80      /* 10ms maximum frame duration */
00055 #define SIU_MAX_SYSTEM_DELAY      40      /* maximum extra system delay in samples */
00056 #endif
00057 #define MAX_STREAM_SIZE   (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
00058 #define MAX_HYBSEG_LENGTH         256     /* maximum hybrid segment length */
00059 #define MAX_HYB_SAMPLES_PER_FRAME SIU_MAX_FRAME_LENGTH
00060 #define MAX_HYB_FILTER_LEN        1024
00061 #define MAX_HYB_RX_DELAY          0
00062 #define MAX_HYB_TX_DELAY          SIU_MAX_SYSTEM_DELAY
00063 #define ecu_HYB_SIM_MAX_ECOBUFS   5
00064 /* Define search related constants */
00065 #if ecu_SEARCH_ENABLE
00066 #define SIU_MAX_ECU_FILTER_LENGTH 1024    /* maximum echo tail in taps */
00067 #define SIU_MAX_HYBRID_LENGTH     1024    /* maximum hybrid filter length in taps */
00068 #define SIU_MAX_ECU_FLTSEG        3       /* maximum number of filter segments */
00069 #define SIU_MAX_ECU_FLTSEG_LENGTH 256     /* maximum taps for all filter segments */
00070 #else
00071 #define SIU_MAX_ECU_FILTER_LENGTH 256     /* maximum echo tail in taps */
00072 #define SIU_MAX_HYBRID_LENGTH     256     /* maximum hybrid filter length in taps */
00073 #define SIU_MAX_ECU_FLTSEG        1       /* maximum number of filter segments */
00074 #define SIU_MAX_ECU_FLTSEG_LENGTH 256     /* maximum taps for all filter segments */
00075 #endif
00076
00077 #if ECUSIM_INCLUDE_MAG
00078 /* MIPS Agent Required definitions */
00079 #define MAX_CHANNELS   10          /* Number of channels for the build */
00080 #define MAX_MIPS       0x00017C00L /* maximum MIPS = 95.0 in U22.10 */
00081 #define mag_INIT_CHANNEL_STRUCT {0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}
00082 #endif
00083
00084 /* SIU channel state definitions */
00085 #define SIU_CHST_CLOSED 0
00086 #define SIU_CHST_IDLE   1
00087 #define SIU_CHST_VOICE  2
00088 #define SIU_CHST_DTMF   3
00089
00090 /* Simulation constraints */
00091 #define ecu_SIM_MAX_CHANNELS         16          // Maximum number of channels to simulate
00092 #define ecu_SIM_MAX_SAMPLES    MAX_STREAM_SIZE   // Maximum frame_size
00093 #define ecu_SIM_MAX_TAIL_LEN        128          // Maximum tail length
00094 #define ecu_SIM_MAX_ECOBUFS           5          // Maximum module buffers
00095 #define ecu_SIM_MAX_STRING          256          // Maximum string size
00096 #define ecu_SIM_MAX_BSIZE           128          // Maximum filter block size
00097
00098 /* Simulation file open actions */
00099 #define ecu_SIM_FILEIO_READ         ( 0)    // Open file for read (binary)
00100 #define ecu_SIM_FILEIO_WRITE        ( 1)    // Open file for write (binary)
00101
00102 /* Simulation error identifiers */
00103 #define ecu_SIM_ERR_SLM             ( 1)    /* SLM related errors   */
00104 #define ecu_SIM_ERR_HYB             ( 2)    /* HYB related errors   */
00105 #define ecu_SIM_ERR_SGN             ( 4)    /* SGN related errors   */
00106 #define ecu_SIM_ERR_5               ( 5)    /* related errors   */
00107 #define ecu_SIM_ERR_6               ( 6)    /* related errors   */
00108 #define ecu_SIM_ERR_7               ( 7)    /* related errors   */
00109 #define ecu_SIM_ERR_8               ( 8)    /* related errors   */
00110 #define ecu_SIM_ERR_9               ( 9)    /* related errors   */
00111 #define ecu_SIM_ERR_10              (10)    /* related errors   */
00112 #define ecu_SIM_ERR_11              (11)    /* related errors   */
00113 #define ecu_SIM_ERR_12              (12)    /* related errors   */
00114 #define ecu_SIM_ERR_13              (13)    /* related errors   */
00115 #define ecu_SIM_ERR_14              (14)    /* related errors   */
00116 #define ecu_SIM_ERR_15              (15)    /* related errors   */
00117 #define ecu_SIM_END                 (16)    /* simulation ends  */
00118
00119 /* simulation signal source */
00120 #define ecu_SIM_SIG_SRC_FILE        0
00121 #define ecu_SIM_SIG_SRC_SGN         1
00122
00123 /* simulation default settings */
00124 #define ecu_SIM_DEF_FS             8000     /* default sampling rate 8kHz */
00125 #define ecu_SIM_DEF_RIN_FNAME      "rin.pcm"
00126 #define ecu_SIM_DEF_SIN_FNAME      "sin.pcm"
00127 #define ecu_SIM_DEF_ROUT_FNAME     "rout.pcm"
00128 #define ecu_SIM_DEF_SOUT_FNAME     "sout.pcm"
00129 #define ecu_SIM_DEF_FILT_FNAME     "hreg.txt"
00130
00131 /* Handle CCS Project paths */
00132 #ifdef  __CCS_PROJECT_REL_PATH
00133 #define ecusim_PROFILE_FNAME       "../../../vectors/profile/profile.txt"
00134 #define ecu_SIM_DEF_BASE_INDIR     "../../../vectors/inp/"
00135 #define ecu_SIM_DEF_BASE_OUTDIR    "../../../vectors/out/"
00136 #else
00137 #define ecusim_PROFILE_FNAME       "../../vectors/profile/profile.txt"
00138 #define ecu_SIM_DEF_BASE_INDIR     "../../vectors/inp/"
00139 #define ecu_SIM_DEF_BASE_OUTDIR    "../../vectors/out/"
00140 #endif
00141
00142 /* Miscellaneous defines */
00143 #define FILEIO_FRM_FACTOR   3    /* Increase RX/TX frames by this factor when */
00144                                  /* using file I/O to allow for delay */
00145
00146 #define SEG_END_TBLSIZE   8     /* number of u/A-law segments */
00147 #define ecuSIM_MAXSENDOUT_LENGTH   88      /* 10ms for 8kHz */
00148
00149 /* Signal Generator Parameters */
00150 typedef struct {
00151   tbool      state;     /* TRUE: generator is on. */
00152   tbool      reset;     /* TRUE: reset the generator (only for CSS) */
00153   tint      delay;      /* number of samples to delay signal generation */
00154   linSample dcoffset;   /* dc offset (Q0 format) */
00155   tint      wftype;     /* one of sgn_WFT_'s */
00156   tint      f1;         /* the first frequency in Hz */
00157   tint      f2;         /* the second frequency in Hz */
00158   linSample amp1;       /* amplitude of the first component (Q0) */
00159   linSample amp2;       /* amplitude of the second component (Q0) */
00160   tint      nlevel;     /* idle noise level in dBm0 */
00161   tuint     nseed;      /* idle noise seed */
00162   tint      ntype;      /* noise type sgn_NT_xxx */
00163   tint      pow_level;  /* Hoth or CSS power level in dBm0 */
00164   tuint     hoth_seed;  /* Hoth noise seed */
00165   tulong    sdram_addr; /* Address of SDRAM samples */
00166   tulong    num_sample; /* Number of SDRAM samples */
00167 } siuSGNPars_t;
00168
00169 /* Get filter parameters */
00170 typedef struct {
00171   tint  select;       /* 0 - FG, 1 - BG */
00172   tint  start;        /* starting index */
00173   tint  ncoeff;       /* # of coefficients (up to SIU_MAX_GETFLT) */
00174   tint  retstat;      /* most recent return status */
00175 } siuGetFlt_t;
00176
00177 #if ECUSIM_INCLUDE_MAG
00178 typedef struct {
00179   tint    event;        /* Event type generated */
00180   union {
00181     tint ecu_event;     /* ECU event code */
00182     struct {
00183       tint id;          /* Channel ID (indexing starts at 1) */
00184       tint codec;       /* Codec code (see vctypes.h) */
00185       tint event;       /* Codec event (open/close) */
00186       tint type;        /* Codec type (encoder/decoder) */
00187     } codec;
00188     struct {
00189       tint id;          /* Channel ID (indexing starts at 1) */
00190       tint ostate;      /* Old channel state */
00191       tint nstate;      /* New channel state */
00192     } channel;
00193     magControl_t ctl; /* MIPS Agent control structure */
00194   } u;
00195 } siuMaEvt_t;
00196 #endif
00197
00198 typedef struct {
00199   tbool fio;                            // TRUE: Get/put samples from/to file
00200   tbool eof;                            // TRUE: End of file reached
00201   FILE  *fptr;                          // File pointer for read/write
00202   char  fname[ecu_SIM_MAX_STRING];      // File name to open/close
00203 } ecuSimFileIo_t;
00204
00205 typedef struct {
00206   FILE  *fptr;              /* FILE pointer for profiling data */
00207   tbool use_cache;          /* Boolean to enable/disable cache usage/flush */
00208   tbool enabled;            /* Boolean to enable disable internally */
00209   tlong overhead;           /* Cycle overhead for profile cycle measurement */
00210   tlong start_cnt;          /* Cycle start count prior to profile call */
00211   tlong cycles;             /* Total cycles for ecuSendIn() */
00212 } ecuProfile_t;
00213
00214 /* SIU Setup Structure (simulator configuration) */
00215 typedef struct siuSetup_s {
00216   tbool           exec;               /* execution flag */
00217   tulong          sample_cnt;         /* number of samples executed */
00218   tuint           clock_mul;          /* Clock multiplier value (1-16) */
00219   tint            pcm_format;         /* companding law -1 (transparent),
00220                                        *  0 (A-law), 1 (u-law), 2 (linear) */
00221   tint            pcm_bits;           /* (1-16), number of bits in a pcm-sample */
00222   tint            frame_size;         /* # samples in frame */
00223   tint            ecu_y2x_delay;      /* ECU y2x delay (0 for SDRAM input) */
00224   tint            ecu_fltseg_length;  /* max # taps total for filter segments */
00225   tint            ecu_num_fltseg;     /* max # filter segments */
00226   tint            ecu_filter_length;  /* # taps in ECU tail */
00227   tint            hyb_filter_length;  /* # taps in hybrid filter */
00228   tbool           toggle_ecu;         /* TRUE: change ECU control parameters */
00229   ecuControl_t    ecuCtl;             /* ECU control parameters */
00230   tbool           toggle_hyb;         /* TRUE: change hybrid parameters */
00231   hybControl_t    hybCtl;             /* Hybrid control parameters */
00232   tbool           toggle_tx_sg;       /* TRUE: toggle Tx signal generator */
00233   siuSGNPars_t    txSGN;              /* Tx Signal Generator Parameters */
00234   tbool           toggle_rx_sg;       /* TRUE: toggle Rx signal generator */
00235   siuSGNPars_t    rxSGN;              /* Rx Signal Generator Parameters */
00236   tbool           toggle_piu;         /* TRUE: change ECU control parameters */
00237   piuControl_t    piuCtl;             /* PIU control parameters */
00238   tbool           toggle_getflt;      /* TRUE: get filter coefficients */
00239   siuGetFlt_t     getflt;             /* Get filter parameters */
00240 #if ECUSIM_INCLUDE_MAG
00241   tbool           toggle_mipsevt;     /* TRUE: Generate event for MIPS Agent */
00242   siuMaEvt_t      mipsEvt;            /* MIPS Agent event parameters */
00243 #endif
00244   tbool           profile_enable;     /* TRUE: enable ECU profiling */
00245 #if ECU_SIM_USE_VPE
00246   tbool           toggle_slm;         /* TRUE: change signal limiter mode */
00247   tint            slm_mode;           /* signal limiter mode */
00248 #endif
00249   tbool           toggle_freerun;     /* TRUE: Run "free" for a scpecific period */
00250   tuint           freerun_frame_cnt;  /* Number of frames to run "free" */
00251   tuint           Fs;                 /* sampling rate */
00252   tuint           error_id;           /* error return ID */
00253   tuint           sig_src;            /* signal source, from SGN or from file */
00254   tbool           save_to_file;       /* if signal source is from SGN, whether save to a file*/
00255   tuint           num_channel;        /* number of channels in the simulation */
00256   tuint           output_chnum;       /* output channel number */
00257   ecuSimFileIo_t  rin;                /* rin file I/O structure  */
00258   ecuSimFileIo_t  sin;                /* sin file I/O structure  */
00259   ecuSimFileIo_t  rout;               /* rout file I/O structure */
00260   ecuSimFileIo_t  sout;               /* sout file I/O structure */
00261 } siuSetup_t;
00262
00263
00264 /* Prototypes needed for initialization */
00265 void  ecu_send_out   (void *ecuSoInst, void *samples_in);
00266
00267 #if ECUSIM_INCLUDE_MAG
00268 tuint mag_dummy_dp (tint code, tint action);
00269 #endif
00270
00271 #endif /* _ECUSIM_H */
00272 /* nothing after this point */


ECU Test: ecusimfunc.c File Reference

  • File List
  • Globals

ecusimfunc.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/ecu/test/src/ecusim.h>
#include <ti/mas/ecu/test/src/ecufio.h>
#include <ti/mas/ecu/test/src/ecuiram.h>
#include <ti/mas/ecu/test/src/vheap.h>
#include <ti/mas/ecu/test/src/cheap.h>
#include <ti/mas/ecu/test/src/piu.h>

Include dependency graph for ecusimfunc.c:

Go to the source code of this file.

Defines

#define | MIPS_AGENT_CTRL 0
#define | MIPS_AGENT_EVENT_ECU 1
#define | MIPS_AGENT_EVENT_CODEC 2
#define | MIPS_AGENT_EVENT_CHSTATE 3
#define | QUANT_MASK (0xf)
#define | SEG_SHIFT (4)
#define | SEG_MASK (0x70)
#define | BIAS (0x84)
#define | ecu_FG_FLTSEG 1
#define | ecu_BG_FLTSEG 2
#define | ecu_BG_E_BUF 3
#define | ecu_RECEIVE_IN 4
#define | ecu_EXPAND_DL_BUF 5
#define | ecu_BG_UPDATE_BUF 6
#define | ecu_SEARCH_FILTER_BUF 14

Functions

void | thwClockSet (tuint clk_mult)
static tint | search (tint val, tint *table, tint size)
static tint | acmpr (tint sample)
static tint | mucmpr (tint sample)
void | ecu_halt (volatile tbool *exec)
sgnFileIo_t * | siu_tx_file (sgnFileIo_t *dsc)
sgnFileIo_t * | siu_rx_file (sgnFileIo_t *dsc)
void | generate_tx_tone_frame (tint frame_size, linSample *frame)
void | convert_tx_tone_frame (tint frame_length, tint pcm_law, linSample *frame)
tint | generate_rx_tone_frame (tint frame_size, linSample *frame)
void | ecu_send_out (void *ecuSoInst, void *samples_in)
void | siu_new_ecu (tint chnum)
void | siu_open_ecu (tint chnum, tint frame_size)
void | siu_open_txhyb (tint chnum, tint frame_length, tint filter_length)
void | siu_open_rxsgn (tint chnum)
void | siu_open_txsgn (tint chnum)
void | siu_set_sgn (void *inst, siuSGNPars_t *sgn)
void | ecu_sim_init (void)
void | siuUpdateECUPowers (siuInst_t *siuInst, linSample *send_in, linSample *recv_in)
static void | siu_tuint_to_hex (char *dest, tuint val)
void | siuDebugInfoNew (tuint moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *messageData)
void | siuPiuReport (void *siuInst, tint report_code)
void | siuPcmSampleTrace (tint chnum, tint pcm_size, void *pcm_in, tuint dir)
void | siuTxRxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id)

Variables

tint | siuInStream [MAX_STREAM_SIZE]
tuint | siuInUCmpStream [MAX_STREAM_SIZE]
tuint | siuInACmpStream [MAX_STREAM_SIZE]
linSample | siuRxInStream [MAX_STREAM_SIZE]
linSample | siuOutStream [MAX_STREAM_SIZE]
linSample | siuOutErrStream [MAX_STREAM_SIZE]
linSample * | piu_segment_in
void * | sgnTxInst = NULL
void * | sgnRxInst = NULL
void * | hybTxInst = NULL
Fract | hybUserFilter [MAX_HYBSEG_LENGTH]
tint | v21_flags = 0x7e7e
tint | gelFlag = 0
static tint | seg_end [SEG_END_TBLSIZE]
volatile siuSetup_t | siuSetup
volatile siuSetup_t * | ecuSim = &siuSetup
tword | rinBuffer [SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]
tword | sinBuffer [SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]
tword | routBuffer [SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]
tword | soutBuffer [SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]
tint | siu_piu_report_code

Define Documentation

#define MIPS_AGENT_CTRL 0

Definition at line 58 of file ecusimfunc.c.

Referenced by ecu_sim_init().

#define MIPS_AGENT_EVENT_ECU 1

Definition at line 59 of file ecusimfunc.c.

#define MIPS_AGENT_EVENT_CODEC 2

Definition at line 60 of file ecusimfunc.c.

#define MIPS_AGENT_EVENT_CHSTATE 3

Definition at line 61 of file ecusimfunc.c.

#define QUANT_MASK (0xf)

Definition at line 64 of file ecusimfunc.c.

Referenced by acmpr().

#define SEG_SHIFT (4)

Definition at line 65 of file ecusimfunc.c.

Referenced by acmpr().

#define SEG_MASK (0x70)

Definition at line 66 of file ecusimfunc.c.

#define BIAS (0x84)

Definition at line 67 of file ecusimfunc.c.

Referenced by mucmpr().

#define ecu_FG_FLTSEG 1

Definition at line 329 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_BG_FLTSEG 2

Definition at line 330 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_BG_E_BUF 3

Definition at line 331 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_RECEIVE_IN 4

Definition at line 332 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_EXPAND_DL_BUF 5

Definition at line 333 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_BG_UPDATE_BUF 6

Definition at line 334 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_SEARCH_FILTER_BUF 14

Definition at line 335 of file ecusimfunc.c.

Referenced by siu_new_ecu().

Function Documentation

void thwClockSet ( tuint clk_mult )

Referenced by main().

static tint search | ( | tint | val,
 |  | tint * | table,
 |  | tint | size |
 | ) |  |  | [inline, static]

Definition at line 117 of file ecusimfunc.c.

Referenced by acmpr(), and mucmpr().

static tint acmpr ( tint sample ) [inline, static]

Definition at line 128 of file ecusimfunc.c.

References QUANT_MASK, search(), seg_end, SEG_END_TBLSIZE, and SEG_SHIFT.

Referenced by convert_tx_tone_frame().

Here is the call graph for this function:

static tint mucmpr ( tint sample ) [inline, static]

Definition at line 159 of file ecusimfunc.c.

References BIAS, search(), seg_end, and SEG_END_TBLSIZE.

Referenced by convert_tx_tone_frame().

Here is the call graph for this function:

void ecu_halt ( volatile tbool * exec )

Definition at line 74 of file ecusim.c.

Referenced by main(), siu_open_rxsgn(), siu_open_txhyb(), and siu_open_txsgn().

sgnFileIo_t* siu_tx_file ( sgnFileIo_t * dsc )

Definition at line 192 of file ecusimfunc.c.

Referenced by siu_open_txsgn().

sgnFileIo_t* siu_rx_file ( sgnFileIo_t * dsc )

Definition at line 205 of file ecusimfunc.c.

Referenced by siu_open_rxsgn().

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

Definition at line 218 of file ecusimfunc.c.

References sgnTxInst.

Referenced by main().

void convert_tx_tone_frame | ( | tint | frame_length,
 |  | tint | pcm_law,
 |  | linSample * | frame
 | ) |  |

Definition at line 225 of file ecusimfunc.c.

References acmpr(), mucmpr(), piu_segment_in, siuInACmpStream, siuInStream, and siuInUCmpStream.

Referenced by main().

Here is the call graph for this function:

tint generate_rx_tone_frame | ( | tint | frame_size,
 |  | linSample * | frame
 | ) |  |

Definition at line 266 of file ecusimfunc.c.

References ecu_sim_fread(), ecu_sim_input(), ecu_SIM_SIG_SRC_SGN, ecuSim, siuSetup_s::frame_size, siuSetup_s::rin, rinBuffer, sgnRxInst, siuSetup_s::sig_src, and siuRxInStream.

Referenced by main().

Here is the call graph for this function:

void ecu_send_out | ( | void * | ecuSoInst,
 |  | void * | samples_in
 | ) |  |

Definition at line 300 of file ecusimfunc.c.

References siuTxInst_t::send_frame_length, siuOutErrStream, and siuInst_t::TxInst.

void siu_new_ecu ( tint chnum )

Definition at line 337 of file ecusimfunc.c.

References ecu_BG_E_BUF, iramSeg_t::ecu_bg_e_ptr, iramSeg_t::ecu_bg_filter_ptr, ecu_BG_FLTSEG, ecu_BG_UPDATE_BUF, iramSeg_t::ecu_bg_work_ptr, ecu_EXPAND_DL_BUF, iramSeg_t::ecu_fg_filter_ptr, ecu_FG_FLTSEG, ecu_RECEIVE_IN, ecu_SEARCH_FILTER_BUF, siuInst_t::ecuInst, IRAM_ECU_BG_E_LENGTH, IRAM_ECU_BG_FLTSEG_LENGTH, IRAM_ECU_BG_WORK_LENGTH, IRAM_ECU_FG_FLTSEG_LENGTH, IRAM_ECU_SRCH_FILTER_LENGTH, IRAM_PIU_ECU_RECEIVE_LENGTH, iramSeg, iramSeg_t::piu_ecu_receive_ptr, siu_exc_assert, SIU_MID_ECU, siuInst, siuMakeID, siuVAlloc(), and siuInst_t::vheap_used.

Referenced by main().

Here is the call graph for this function:

void siu_open_ecu | ( | tint | chnum,
 |  | tint | frame_size
 | ) |  |

Definition at line 449 of file ecusimfunc.c.

References siuSetup_s::ecu_filter_length, siuSetup_s::ecu_y2x_delay, siuSetup_s::ecuCtl, siuInst_t::ecuInst, ecuSim, siuSetup_s::pcm_format, SIU_ALAW_ZERO, siu_exc_assert, SIU_ULAW_ZERO, and siuInst.

Referenced by main().

void siu_open_txhyb | ( | tint | chnum,
 |  | tint | frame_length,
 |  | tint | filter_length
 | ) |  |

Definition at line 481 of file ecusimfunc.c.

References ecu_halt(), ecu_HYB_SIM_MAX_ECOBUFS, ecu_SIM_ERR_HYB, ecuSim, siuSetup_s::error_id, siuInst_t::exception, siuSetup_s::exec, hybTxInst, MAX_HYB_FILTER_LEN, MAX_HYB_RX_DELAY, MAX_HYB_SAMPLES_PER_FRAME, MAX_HYB_TX_DELAY, and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_rxsgn ( tint chnum )

Definition at line 535 of file ecusimfunc.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuInst_t::companding_law, siuSGNPars_t::dcoffset, siuInst_t::debug, siuSGNPars_t::delay, ecu_halt(), ecu_SIM_ERR_SGN, ecuSim, siuSetup_s::error_id, siuInst_t::exception, siuSetup_s::exec, siuSGNPars_t::f1, siuSGNPars_t::f2, siuSetup_s::Fs, siuSGNPars_t::hoth_seed, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSGNPars_t::num_sample, siuSGNPars_t::pow_level, siuSetup_s::rxSGN, siuSGNPars_t::sdram_addr, sgnRxInst, siu_rx_file(), siuInst, v21_flags, and siuSGNPars_t::wftype.

Referenced by main().

Here is the call graph for this function:

void siu_open_txsgn ( tint chnum )

Definition at line 581 of file ecusimfunc.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuInst_t::companding_law, siuSGNPars_t::dcoffset, siuInst_t::debug, siuSGNPars_t::delay, ecu_halt(), ecu_SIM_ERR_SGN, ecuSim, siuSetup_s::error_id, siuInst_t::exception, siuSetup_s::exec, siuSGNPars_t::f1, siuSGNPars_t::f2, siuSetup_s::Fs, siuSGNPars_t::hoth_seed, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSGNPars_t::num_sample, siuSGNPars_t::pow_level, siuSGNPars_t::sdram_addr, sgnTxInst, siu_tx_file(), siuInst, siuSetup_s::txSGN, 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
 | ) |  |

Definition at line 626 of file ecusimfunc.c.

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

Referenced by main().

void ecu_sim_init ( void )

Definition at line 690 of file ecusimfunc.c.

References siuSGNPars_t::amp1, siuSGNPars_t::amp2, siuSetup_s::clock_mul, piuControl_t::ctl_code, piuControl_t::dc_offset_removal_select, siuSGNPars_t::dcoffset, siuSGNPars_t::delay, siuSetup_s::ecu_filter_length, siuSetup_s::ecu_fltseg_length, siuSetup_s::ecu_num_fltseg, ecu_SIM_DEF_BASE_INDIR, ecu_SIM_DEF_BASE_OUTDIR, ecu_SIM_DEF_FS, ecu_SIM_DEF_RIN_FNAME, ecu_SIM_DEF_ROUT_FNAME, ecu_SIM_DEF_SIN_FNAME, ecu_SIM_DEF_SOUT_FNAME, ecu_SIM_SIG_SRC_FILE, siuSetup_s::ecu_y2x_delay, siuSetup_s::ecuCtl, ecuSim, ecuSimFileIo_t::eof, siuSetup_s::error_id, siuSetup_s::exec, siuSGNPars_t::f1, siuSGNPars_t::f2, ecuSimFileIo_t::fio, ecuSimFileIo_t::fname, ecuSimFileIo_t::fptr, siuSetup_s::frame_size, siuSetup_s::freerun_frame_cnt, siuSetup_s::Fs, siuSetup_s::getflt, siuSGNPars_t::hoth_seed, siuSetup_s::hyb_filter_length, siuSetup_s::hybCtl, MIPS_AGENT_CTRL, siuGetFlt_t::ncoeff, siuSGNPars_t::nlevel, siuSGNPars_t::nseed, siuSGNPars_t::ntype, siuSetup_s::num_channel, siuSetup_s::output_chnum, siuSetup_s::pcm_bits, siuSetup_s::pcm_format, piu_DC_OFFSET_MODE2, piu_DC_OFFSET_REMOVAL, siuSetup_s::piuCtl, siuSGNPars_t::pow_level, siuSetup_s::profile_enable, siuSGNPars_t::reset, siuGetFlt_t::retstat, siuSetup_s::rin, siuSetup_s::rout, siuSetup_s::rxSGN, siuSetup_s::sample_cnt, siuSetup_s::save_to_file, siuGetFlt_t::select, siuSetup_s::sig_src, siuSetup_s::sin, SIU_MAX_ECU_FILTER_LENGTH, SIU_MAX_ECU_FLTSEG, SIU_MAX_ECU_FLTSEG_LENGTH, SIU_MAX_HYBRID_LENGTH, siuSetup_s::sout, siuGetFlt_t::start, siuSGNPars_t::state, siuSetup_s::toggle_ecu, siuSetup_s::toggle_freerun, siuSetup_s::toggle_getflt, siuSetup_s::toggle_hyb, siuSetup_s::toggle_piu, siuSetup_s::toggle_rx_sg, siuSetup_s::toggle_tx_sg, siuSetup_s::txSGN, piuControl_t::u, and siuSGNPars_t::wftype.

Referenced by main().

void siuUpdateECUPowers | ( | siuInst_t * | siuInst,
 |  | linSample * | send_in,
 |  | linSample * | recv_in
 | ) |  |

Definition at line 888 of file ecusimfunc.c.

Referenced by siu_tx_execute().

static void siu_tuint_to_hex | ( | char * | dest,
 |  | tuint | val |
 | ) |  |  | [inline, static]

Definition at line 909 of file ecusimfunc.c.

Referenced by siuDebugInfo(), and siuDebugInfoNew().

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

Definition at line 924 of file ecusimfunc.c.

References SIU_DEBUG_FATAL, siu_tuint_to_hex(), and siuException().

Here is the call graph for this function:

void siuPiuReport | ( | void * | siuInst,
 |  | tint | report_code
 | ) |  |

Definition at line 958 of file ecusimfunc.c.

void siuPcmSampleTrace | ( | tint | chnum,
 |  | tint | pcm_size,
 |  | void * | pcm_in,
 |  | tuint | dir
 | ) |  |

Definition at line 969 of file ecusimfunc.c.

void siuTxRxSendIn | ( | void * | siuInst,
 |  | void * | send_frame,
 |  | void * | recv_frame,
 |  | tint | queue_id
 | ) |  |

Definition at line 981 of file ecusimfunc.c.

References siuInst_t::piuInst, and piuTxRxProc().

Here is the call graph for this function:

Variable Documentation

tint siuInStream[MAX_STREAM_SIZE]

Definition at line 31 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInUCmpStream[MAX_STREAM_SIZE]

Definition at line 32 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInACmpStream[MAX_STREAM_SIZE]

Definition at line 33 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

linSample siuRxInStream[MAX_STREAM_SIZE]

Definition at line 34 of file ecusimfunc.c.

Referenced by generate_rx_tone_frame().

linSample siuOutStream[MAX_STREAM_SIZE]

Definition at line 37 of file ecusimfunc.c.

Referenced by siu_tx_execute().

linSample siuOutErrStream[MAX_STREAM_SIZE]

Definition at line 38 of file ecusimfunc.c.

Referenced by ecu_send_out(), and main().

linSample* piu_segment_in

Definition at line 27 of file ecusim.c.

Referenced by convert_tx_tone_frame(), and main().

void* sgnTxInst = NULL

Definition at line 44 of file ecusimfunc.c.

Referenced by generate_tx_tone_frame(), main(), and siu_open_txsgn().

void* sgnRxInst = NULL

Definition at line 45 of file ecusimfunc.c.

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

void* hybTxInst = NULL

Definition at line 48 of file ecusimfunc.c.

Referenced by main(), and siu_open_txhyb().

Fract hybUserFilter[MAX_HYBSEG_LENGTH]

Definition at line 49 of file ecusimfunc.c.

tint v21_flags = 0x7e7e

Definition at line 52 of file ecusimfunc.c.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

tint gelFlag = 0

Definition at line 55 of file ecusimfunc.c.

tint seg_end[SEG_END_TBLSIZE] [static]

Initial value:

 {
  0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF
}

Definition at line 69 of file ecusimfunc.c.

Referenced by acmpr(), and mucmpr().

volatile siuSetup_t siuSetup

Definition at line 74 of file ecusimfunc.c.

volatile siuSetup_t* ecuSim = &siuSetup

Definition at line 75 of file ecusimfunc.c.

tword rinBuffer[SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]

Definition at line 78 of file ecusimfunc.c.

tword sinBuffer[SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]

Definition at line 79 of file ecusimfunc.c.

tword routBuffer[SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]

Definition at line 80 of file ecusimfunc.c.

tword soutBuffer[SIU_MAX_FRAME_LENGTH *sizeof(linSample)/sizeof(tword)]

Definition at line 81 of file ecusimfunc.c.

tint siu_piu_report_code

Definition at line 956 of file ecusimfunc.c.


ECU Test: ecusimfunc.c Source File

  • File List
  • Globals

ecusimfunc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main program and supporting routines for the simulation of ECU.
00003  ******************************************************************************
00004  * FILE NAME:   ecusim.c
00005  *
00006  * DESCRIPTION: Contains main program and supporting routines for the
00007  *              simulation of ECU. Depends on SIU support module.
00008  *
00009  * TABS: NONE
00010  *
00011  * REVISION HISTORY:
00012  *
00013  * (C) Copyright 2008, Texas Instruments, Inc.
00014  *****************************************************************************/
00015 #include <stdio.h>
00016 #include <stdlib.h>
00017 #include <string.h>
00018
00019 /* System level includes */
00020 #include <ti/mas/util/ecomem.h>
00021
00022 /* Test include files */
00023 #include <ti/mas/ecu/test/src/ecusim.h>     /* for simulation-specific defines */
00024 #include <ti/mas/ecu/test/src/ecufio.h>     /* file I/O functions */
00025 #include <ti/mas/ecu/test/src/ecuiram.h>    /* HW circular buffers in IRAM, etc. */
00026 #include <ti/mas/ecu/test/src/vheap.h>      /* Voice heap */
00027 #include <ti/mas/ecu/test/src/cheap.h>      /* Core heap */
00028 #include <ti/mas/ecu/test/src/piu.h>        /* for piuPcmIo() */
00029
00030 /* Input streams */
00031 tint  siuInStream[MAX_STREAM_SIZE];       /* input samples in Q0 */
00032 tuint siuInUCmpStream[MAX_STREAM_SIZE];   /* u-law coded input samples */
00033 tuint siuInACmpStream[MAX_STREAM_SIZE];   /* A-law coded input samples */
00034 linSample siuRxInStream[MAX_STREAM_SIZE]; /* Rx input samples in Q0 */
00035
00036 /* Output streams */
00037 linSample siuOutStream[MAX_STREAM_SIZE];      /* output samples in Q0 */
00038 linSample siuOutErrStream[MAX_STREAM_SIZE];   /* output error in Q0   */
00039
00040 /* External arrays */
00041 extern linSample *piu_segment_in;       /* PCM buffers for piuPcmIo() */
00042
00043 /* Signal Generator Instances */
00044 void  *sgnTxInst= NULL;
00045 void  *sgnRxInst= NULL;
00046
00047 /* Hybrid Instance and hybrid filter */
00048 void  *hybTxInst = NULL;
00049 Fract  hybUserFilter[MAX_HYBSEG_LENGTH];   /* user defined hybrid seg */
00050
00051 /* V.21 flags */
00052 tint v21_flags = 0x7e7e;
00053
00054 /* GEL flag */
00055 tint gelFlag = 0;
00056
00057 /* MIPS Agent Codes */
00058 #define MIPS_AGENT_CTRL             0
00059 #define MIPS_AGENT_EVENT_ECU        1
00060 #define MIPS_AGENT_EVENT_CODEC      2
00061 #define MIPS_AGENT_EVENT_CHSTATE    3
00062
00063 /* u-law/A-law stuff */
00064 #define QUANT_MASK      (0xf)     /* Quantization field mask. */
00065 #define SEG_SHIFT       (4)       /* Left shift for segment number. */
00066 #define SEG_MASK        (0x70)    /* Segment field mask. */
00067 #define BIAS            (0x84)    /* Bias for linear code. */
00068
00069 static tint seg_end[SEG_END_TBLSIZE] = {
00070   0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF
00071 };
00072
00073 /* simulation setup structure */
00074 volatile siuSetup_t siuSetup;
00075 volatile siuSetup_t *ecuSim = &siuSetup;
00076
00077 /* Global PCM data buffers */
00078 tword rinBuffer [SIU_MAX_FRAME_LENGTH * sizeof(linSample)/sizeof(tword)];
00079 tword sinBuffer [SIU_MAX_FRAME_LENGTH * sizeof(linSample)/sizeof(tword)];
00080 tword routBuffer[SIU_MAX_FRAME_LENGTH * sizeof(linSample)/sizeof(tword)];
00081 tword soutBuffer[SIU_MAX_FRAME_LENGTH * sizeof(linSample)/sizeof(tword)];
00082
00083 /******************************************************************************
00084  * FUNCTION PURPOSE: Set the clock speed for the processor (Prototype)
00085  ******************************************************************************
00086  * DESCRIPTION: This function is used to properly initialize the
00087  *              processor's clock.  The user supplies a clock multipler value
00088  *              (1 - 16).
00089  *
00090  *              This routine sets the memory-map clock register as follows:
00091  *
00092  *              PLLMUL    (bits 15-12)  - set to the user defined multipler - 1
00093  *              PLLDIV    (bit 11)      - set to 0
00094  *              PLLCOUNT  (bits 10-3)   - set to 150
00095  *              PLLON/OFF (bit 2)       - set to 1
00096  *              PLLNDIV   (bit 1)       - set to 1
00097  *              PLLSTATUS (bit 0)       - read-only bit
00098  *
00099  *              These setting will enable operation of the PLL with the user
00100  *              specified clock multiplying factor.  Note if the user specifies
00101  *              a muliplier greater than 16, the PLL will operated but not at
00102  *              the selected rate.
00103  *              The PLLCOUNT determines the time allowed for the PLL to
00104  *              lock-up and the processor to begin operating from the PLL
00105  *              derived clock.  Note, the PLLCOUNT is fixed at 150.  The
00106  *              lock-up time is given by:
00107  *
00108  *              lock-up time = PLLCOUNT * 16 * (1/Fclkin)
00109  *
00110  *  void thwClockSet(clock multipler) The accumulator A is assumed to contains
00111  *                                    desired the clock multipler factor.
00112  *
00113  *****************************************************************************/
00114 extern void thwClockSet (tuint clk_mult);
00115
00116 /*  */
00117 static inline tint search (tint val, tint *table, tint size)
00118 {
00119   int i;
00120
00121   for (i = 0; i < size; i++) {
00122     if (val <= *table++)
00123       return (i);
00124   }
00125   return (size);
00126 } /* search */
00127
00128 static inline tint acmpr (tint sample)
00129 {
00130   tint mask, seg, pcm_val, pcm_code;
00131   tuint aval;
00132
00133   pcm_val = sample;
00134
00135   if (pcm_val >= 0)
00136     mask = 0xD5;            /* sign (7th) bit = 1 */
00137   else {
00138     mask = 0x55;            /* sign bit = 0 */
00139     pcm_val = -pcm_val;
00140   }
00141
00142   /* Convert the scaled magnitude to segment number. */
00143   seg = search (pcm_val, seg_end, SEG_END_TBLSIZE);
00144
00145   /* Combine the sign, segment, and quantization bits. */
00146   if (seg >= SEG_END_TBLSIZE)     /* out of range, return maximum value. */
00147     pcm_code =  0x7F ^ mask;
00148   else {
00149     aval = seg << SEG_SHIFT;
00150     if (seg < 2)
00151       aval |= (pcm_val >> 4) & QUANT_MASK;
00152     else
00153       aval |= (pcm_val >> (seg + 3)) & QUANT_MASK;
00154     pcm_code = aval ^ mask;
00155   }
00156   return(pcm_code);
00157 } /* acmpr */
00158
00159 static inline tint mucmpr (tint sample)
00160 {
00161   tint mask, seg, pcm_val, pcm_code;
00162   tuint uval;
00163
00164   pcm_val = sample;
00165
00166   /* Get the sign and the magnitude of the value. */
00167   if (pcm_val < 0) {
00168     pcm_val = BIAS - pcm_val;
00169     mask = 0x7F;
00170   }
00171   else {
00172     pcm_val += BIAS;
00173     mask = 0xFF;
00174   }
00175
00176   /* Convert the scaled magnitude to segment number. */
00177   seg = search(pcm_val, seg_end, SEG_END_TBLSIZE);
00178
00179   /* Combine the sign, segment, quantization bits; and complement the code word. */
00180   if (seg >= SEG_END_TBLSIZE)         /* out of range, return maximum value. */
00181     pcm_code = 0x7F ^ mask;
00182   else {
00183     uval = (seg << 4) | ((pcm_val >> (seg + 3)) & 0xF);
00184     pcm_code = uval ^ mask;
00185   }
00186   return(pcm_code);
00187 } /* mucmpr */
00188
00189 extern void ecu_halt (volatile tbool *exec);
00190
00191 /* Tx and Rx file inputs */
00192 sgnFileIo_t *siu_tx_file (sgnFileIo_t *dsc)
00193 {
00194 #ifndef _HWDSKT
00195   asm (" nop");
00196   asm (" nop");
00197   asm (" nop");
00198   asm (" nop");
00199   asm (" nop");
00200   asm (" nop");
00201 #endif
00202   return (dsc);
00203 } /* siu_tx_file */
00204
00205 sgnFileIo_t *siu_rx_file (sgnFileIo_t *dsc)
00206 {
00207 #ifndef _HWDKST
00208   asm (" nop");
00209   asm (" nop");
00210   asm (" nop");
00211   asm (" nop");
00212   asm (" nop");
00213   asm (" nop");
00214 #endif
00215   return (dsc);
00216 } /* siu_rx_file */
00217
00218 void generate_tx_tone_frame (tint frame_size, linSample *frame)
00219 {
00220   /* Generate one frame of linear samples */
00221   sgnGenerateFrame (sgnTxInst, frame_size, frame);
00222
00223 } /* generate_tx_tone_frame */
00224
00225 void convert_tx_tone_frame (tint frame_length, tint pcm_law, linSample *frame)
00226 {
00227   int k;
00228   tint u_code;
00229   tint a_code;
00230   tint pcm_value;
00231
00232   /* Convert Tx stream into u-law/A-law */
00233   for (k=0; k<frame_length; k++) {
00234     pcm_value = (int)frame[k];
00235     if (pcm_value > mua_TBL_MAX_PCM_VAL) {
00236       pcm_value = mua_TBL_MAX_PCM_VAL;
00237       frame[k] = (linSample)pcm_value;  /* make sure frame is saturated */
00238     }
00239     else if (pcm_value < -mua_TBL_MAX_PCM_VAL) {
00240       pcm_value = -mua_TBL_MAX_PCM_VAL;
00241       frame[k] = (linSample)pcm_value;
00242     }
00243     u_code = mucmpr (pcm_value);
00244     a_code = acmpr  (pcm_value);
00245
00246     siuInStream[k]     = pcm_value;
00247     siuInUCmpStream[k] = u_code;
00248     siuInACmpStream[k] = a_code;
00249
00250     /* convert segment_in to piu_segment_in */
00251     if (pcm_law == const_COMP_MULAW_8) {
00252       piu_segment_in[k] = u_code;
00253     }
00254     else if (pcm_law == const_COMP_ALAW_8) {
00255       piu_segment_in[k] = a_code;
00256     }
00257     else if (pcm_law == const_COMP_LINEAR) {
00258       piu_segment_in[k] = pcm_value;
00259     }
00260     else {
00261       piu_segment_in[k] = u_code;
00262     }
00263   }
00264 } /* convert_tx_tone_frame */
00265
00266 tint generate_rx_tone_frame (tint frame_size, linSample *frame)
00267 {
00268   tint k;
00269   tint value, data = 1;
00270   tlong smpidx = 0;
00271
00272   /* Generate one frame of samples */
00273   if (ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN){
00274     sgnGenerateFrame (sgnRxInst, frame_size, frame);
00275   }
00276   else{
00277     data = ecu_sim_fread (rinBuffer, ecuSim->frame_size, &ecuSim->rin);
00278     ecu_sim_input(rinBuffer, frame);
00279   }
00280
00281   /* Clip Rx stream for later conversion to u-law/A-law */
00282   for (k = 0; k < frame_size; k++) {
00283     value = (int)frame[k];
00284     if (value > mua_TBL_MAX_PCM_VAL) {
00285       value = mua_TBL_MAX_PCM_VAL;
00286       frame[k] = (linSample)value;
00287     }
00288     else if (value < -mua_TBL_MAX_PCM_VAL) {
00289       value = -mua_TBL_MAX_PCM_VAL;
00290       frame[k] = (linSample)value;
00291     }
00292
00293     siuRxInStream[smpidx] = value;
00294     smpidx++;
00295   }
00296   return data;
00297 } /* generate_rx_tone_frame */
00298
00299 /* ecuSendOut function */
00300 void ecu_send_out (void *ecuSoInst, void *samples_in)
00301 {
00302   int k;
00303   siuInst_t *inst   = (siuInst_t*)ecuSoInst;
00304   linSample *insamp = (linSample*)samples_in;
00305
00306   /* copy out resulting samples */
00307   for (k = 0; k < inst->TxInst.send_frame_length; k++) {
00308     siuOutErrStream[k] = insamp[k];
00309   }
00310 } /* ecu_send_out */
00311
00312 /******************************************************************************
00313  * FUNCTION PURPOSE: Create ECU module.
00314  ******************************************************************************
00315  * DESCRIPTION: Obtains info on ECU buffers, and creates one instance of ECU.
00316  *
00317  *              NOTE: Should save number of buffers and buffer descriptors
00318  *                    in order to make delete possible.
00319  *
00320  *                    Allocates ECU receive-in buffer that is used in PIU.
00321  *                    Assumes receive-in buffer is offset 5.
00322  *
00323  *  void siu_new_ecu (
00324  *    tint chnum)              - channel number (1 to SIU_MAX_CHANNELS)
00325  *
00326  *****************************************************************************/
00327
00328 /* Buffer numbers.  Ensure that these coincide with #defines in ecuinit.c */
00329 #define ecu_FG_FLTSEG             1
00330 #define ecu_BG_FLTSEG             2
00331 #define ecu_BG_E_BUF              3
00332 #define ecu_RECEIVE_IN            4
00333 #define ecu_EXPAND_DL_BUF         5
00334 #define ecu_BG_UPDATE_BUF         6
00335 #define ecu_SEARCH_FILTER_BUF     14
00336
00337 void siu_new_ecu (tint chnum)
00338 {
00339   int i;
00340   tint stat, ecuNbufs;
00341 #if !ecu_DELAY_LINE_COMPRESS
00342   tint length;
00343 #endif
00344
00345   const ecomemBuffer_t *bufs;
00346   ecomemBuffer_t       *ecuBufs;
00347   ecuNewConfig_t    ecuCfgNew;
00348
00349   siuInst_t *inst = &siuInst[chnum-1];
00350
00351   /* ECU get sizes */
00352   stat = ecuGetSizes (&ecuNbufs, &bufs, (void *)NULL);
00353   siu_exc_assert (stat == ecu_NOERR, inst);
00354
00355   ecuBufs = (ecomemBuffer_t*)siuVAlloc (ecuNbufs*sizeof(ecomemBuffer_t));
00356   inst->vheap_used += ecuNbufs*sizeof(ecomemBuffer_t);
00357   siu_exc_assert (ecuBufs != NULL, inst);
00358
00359   /* assume all buffers are in external memory, no alignment requests */
00360   /* NOTE: This is not true for target platform!!! */
00361   for (i = 0; i < ecuNbufs; i++) {
00362     ecuBufs[i] = bufs[i];
00363     if (i == ecu_FG_FLTSEG) {   /* FG Filter */
00364       ecuBufs[i].base = iramSeg.ecu_fg_filter_ptr;
00365       ecuBufs[i].size = IRAM_ECU_FG_FLTSEG_LENGTH*sizeof(Fract);
00366     }
00367     else if (i == ecu_BG_FLTSEG) {  /* BG Filter */
00368       ecuBufs[i].base = iramSeg.ecu_bg_filter_ptr;
00369       ecuBufs[i].size = IRAM_ECU_BG_FLTSEG_LENGTH*sizeof(Fract);
00370     }
00371     else if (i == ecu_BG_E_BUF) {  /* BG Error Buffer IRAM */
00372       ecuBufs[i].base = iramSeg.ecu_bg_e_ptr;
00373       ecuBufs[i].size = IRAM_ECU_BG_E_LENGTH*sizeof(linSample);
00374     }
00375 #if ecu_DELAY_LINE_COMPRESS
00376     else if (i == ecu_RECEIVE_IN) {  /* ECU's recv-in buffer is aligned! */
00377       ecuBufs[i].volat  = FALSE;
00378       ecuBufs[i].base   = iramSeg.piu_ecu_receive_ptr;
00379       ecuBufs[i].size   = IRAM_PIU_ECU_RECEIVE_LENGTH*sizeof(linSample);
00380     }
00381     else if (i == ecu_EXPAND_DL_BUF) {  /* ECU's recv-in buffer is aligned! */
00382       ecuBufs[i].volat  = TRUE;
00383       ecuBufs[i].base   = iramSeg.ecu_pcm_expand_ptr;
00384       ecuBufs[i].size   = IRAM_ECU_EXPAND_LENGTH*sizeof(linSample);
00385     }
00386 #else
00387     else if (i == ecu_RECEIVE_IN) {  /* ECU's recv-in buffer is aligned! */
00388       ecuBufs[i].volat  = FALSE;
00389       ecuBufs[i].base   = iramSeg.piu_ecu_receive_ptr;
00390       /* tempory fix to work arround size miscalculation */
00391       length = IRAM_PIU_ECU_RECEIVE_LENGTH;
00392       ecuBufs[i].size   = length * sizeof(linSample);
00393 /*      ecuBufs[i].size   = IRAM_PIU_ECU_RECEIVE_LENGTH*sizeof(linSample);*/
00394     }
00395 #endif
00396     else if (i == ecu_BG_UPDATE_BUF) {  /* BG Work Buffer IRAM */
00397       if (ecuBufs[i].size > 0) {
00398         ecuBufs[i].base = iramSeg.ecu_bg_work_ptr;
00399         ecuBufs[i].size = IRAM_ECU_BG_WORK_LENGTH*sizeof(Fract);
00400       }
00401       else {    /* Float version may not use this buffer */
00402         ecuBufs[i].base = NULL;
00403         ecuBufs[i].size = 0;
00404       }
00405     }
00406 #if ecu_SEARCH_ENABLE
00407     else if (i == ecu_SEARCH_FILTER_BUF) {  /* Search filter buffer IRAM */
00408       ecuBufs[i].volat  = FALSE;
00409       ecuBufs[i].base   = iramSeg.ecu_srch_filter_ptr;
00410       ecuBufs[i].size   = IRAM_ECU_SRCH_FILTER_LENGTH*sizeof(Fract);
00411     }
00412 #endif
00413     else {
00414       if (ecuBufs[i].size > 0) {
00415         ecuBufs[i].volat  = FALSE;
00416         ecuBufs[i].base   = siuVAlloc (bufs[i].size);
00417         inst->vheap_used += bufs[i].size;
00418         siu_exc_assert (ecuBufs[i].base != NULL, inst);
00419       }
00420       else {    /* no buffer allocated if size zero or less */
00421         ecuBufs[i].base = NULL;
00422         ecuBufs[i].size = 0;
00423       }
00424     }
00425   }
00426   /* inst->ecuBufs  =...
00427    * inst->ecuNbufs =...  NOTE: needs it to delete ECU one day. */
00428
00429   /* ecuNew */
00430   ecuCfgNew.ID = siuMakeID (SIU_MID_ECU, chnum);
00431   stat = ecuNew (&inst->ecuInst, ecuNbufs, ecuBufs, &ecuCfgNew);
00432   siu_exc_assert (stat == ecu_NOERR, inst);
00433
00434 } /* siu_new_ecu */
00435
00436 /******************************************************************************
00437  * FUNCTION PURPOSE: Open ECU module.
00438  ******************************************************************************
00439  * DESCRIPTION: Opens one instance of ECU module.
00440  *
00441  *              NOTE: Receive-in buffer is sized here!
00442  *
00443  *  void siu_open_ecu (
00444  *    tint chnum,                 - channel number (1 to SIU_MAX_CHANNELS)
00445  *    tint frame_size)            - # samples in the frame
00446  *
00447  *****************************************************************************/
00448
00449 void siu_open_ecu (tint chnum, tint frame_size)
00450 {
00451   ecuConfig_t      ecuCfg;
00452   ecuConfigParam_t cfgParam;
00453   siuInst_t        *inst = &siuInst[chnum-1];
00454   tint             pcm   = ecuSim->pcm_format;
00455
00456   ecuCfg.cfgParam              = &cfgParam;
00457   ecuCfg.y2x_delay             = ecuSim->ecu_y2x_delay;
00458   ecuCfg.samples_per_frame     = frame_size;
00459
00460 #if ecu_DELAY_LINE_COMPRESS
00461   siu_exc_assert (pcm == const_COMP_MULAW_8 ||
00462                   pcm == const_COMP_ALAW_8, inst);
00463   if (pcm == const_COMP_MULAW_8) {
00464     ecuCfg.pcm_expand_tbl = &muaTblUlaw[0];
00465     ecuCfg.pcm_zero       = SIU_ULAW_ZERO;
00466   }
00467   else {
00468     ecuCfg.pcm_expand_tbl = &muaTblAlaw[0];
00469     ecuCfg.pcm_zero       = SIU_ALAW_ZERO;
00470   }
00471 #endif
00472   cfgParam.filter_length       = ecuSim->ecu_filter_length;
00473   cfgParam.noise_level         = 0;   /* Use default (-70) if fixed */
00474   cfgParam.config_bitfield     = ecuSim->ecuCtl.u.ctl_mask[0];
00475   cfgParam.config_bitfield1    = ecuSim->ecuCtl.u.ctl_mask[1];
00476   cfgParam.nlp_aggress         = 0;   /* balance performance */
00477   cfgParam.cn_config           = 0;   /* pink noise */
00478   ecuOpen (inst->ecuInst, &ecuCfg);
00479 } /* siu_open_ecu */
00480
00481 void siu_open_txhyb (tint chnum, tint frame_length,
00482                      tint filter_length)
00483 {
00484   siuInst_t *inst = &siuInst[chnum-1];
00485   const ecomemBuffer_t *hybsizeBufs;
00486   ecomemBuffer_t  hybBufs[ecu_HYB_SIM_MAX_ECOBUFS];
00487   hybSizeConfig_t sizeCfg;
00488   tint      hybnbufs, retVal, i;
00489   hybNewConfig_t newcfg;
00490   hybConfig_t cfg;
00491
00492   /* allocate memory for hyb instance */
00493   sizeCfg.max_filter_length = MAX_HYB_FILTER_LEN;
00494   sizeCfg.max_rx_delay = MAX_HYB_RX_DELAY;
00495   sizeCfg.max_samples_per_frame = MAX_HYB_SAMPLES_PER_FRAME;
00496   sizeCfg.max_tx_delay = MAX_HYB_TX_DELAY;
00497
00498   retVal = hybGetSizes(&hybnbufs, &hybsizeBufs, &sizeCfg);
00499   if (retVal != hyb_NOERR){
00500     ecuSim->error_id = ecu_SIM_ERR_HYB;
00501     ecuSim->exec = FALSE;
00502     ecu_halt (&ecuSim->exec);
00503   }
00504
00505   /* a new instance of hyb */
00506   newcfg.ID                    = chnum;
00507   newcfg.max_samples_per_frame = frame_length;
00508   newcfg.max_filter_length     = filter_length;
00509   newcfg.max_rx_delay          = 0;
00510   newcfg.max_tx_delay          = 0;
00511
00512   for (i=0; i<hybnbufs; i++) {
00513     hybBufs[i].mclass = hybsizeBufs[i].mclass;
00514     hybBufs[i].log2align = hybsizeBufs[i].log2align;
00515     hybBufs[i].size = hybsizeBufs[i].size;
00516     hybBufs[i].volat = hybsizeBufs[i].volat;
00517     hybBufs[i].base = malloc(hybBufs[i].size);
00518   }
00519   retVal = hybNew(&hybTxInst, hybnbufs, hybBufs, &newcfg);
00520   if (retVal != hyb_NOERR){
00521     ecuSim->error_id = ecu_SIM_ERR_HYB;
00522     ecuSim->exec = FALSE;
00523     ecu_halt (&ecuSim->exec);
00524   }
00525   /* active hyb */
00526   cfg.samples_per_frame = frame_length;
00527   cfg.filter_length     = filter_length;
00528   cfg.rx_delay          = 0;
00529   cfg.tx_delay          = 0;
00530   cfg.exception         = inst->exception;
00531
00532   hybOpen (hybTxInst, &cfg);
00533 } /* siu_open_txhyb */
00534
00535 void siu_open_rxsgn (tint chnum)
00536 {
00537   siuInst_t *inst = &siuInst[chnum-1];
00538   sgnConfig_t cfg;
00539   tint sgnSize, retVal;
00540
00541   /* init sgn */
00542   retVal = sgnGetSizes(&sgnSize);
00543   if (retVal != sgn_NOERR){
00544     ecuSim->error_id = ecu_SIM_ERR_SGN;
00545     ecuSim->exec = FALSE;
00546     ecu_halt (&ecuSim->exec);
00547   }
00548
00549   sgnRxInst = malloc(sgnSize);
00550
00551   cfg.delay         = ecuSim->rxSGN.delay;
00552   cfg.dc_offset     = ecuSim->rxSGN.dcoffset;
00553   cfg.wf_type       = ecuSim->rxSGN.wftype;
00554   cfg.f1            = ecuSim->rxSGN.f1;
00555   cfg.f2            = ecuSim->rxSGN.f2;
00556   cfg.t_amp1        = ecuSim->rxSGN.amp1;
00557   cfg.t_amp2        = ecuSim->rxSGN.amp2;
00558   cfg.pr_period     = 1000;      /* # of samples between phase reversals */
00559   cfg.pr_enable     = FALSE;     /* disable phase reversal */
00560   cfg.noise_level   = ecuSim->rxSGN.nlevel;
00561   cfg.noise_seed    = ecuSim->rxSGN.nseed;
00562   cfg.noise_type    = ecuSim->rxSGN.ntype;
00563   cfg.fsk_duration  = 90;           /* 90/300 = 300ms */
00564   cfg.fsk_dataptr   = &v21_flags;   /* V.21 flags */
00565   cfg.fsk_numword   = 1;
00566   cfg.power_level   = ecuSim->rxSGN.pow_level;
00567   cfg.hoth_wng_seed = ecuSim->rxSGN.hoth_seed;
00568   cfg.file_io_fcn   = siu_rx_file;
00569   cfg.addr          = ecuSim->rxSGN.sdram_addr;
00570   cfg.count         = ecuSim->rxSGN.num_sample;
00571   if (inst->companding_law == const_COMP_MULAW_8)
00572     cfg.pcmtbl      = &muaTblUlaw[0];
00573   else if (inst->companding_law == const_COMP_ALAW_8)
00574     cfg.pcmtbl      = &muaTblAlaw[0];
00575   cfg.exception     = inst->exception;
00576   cfg.debug         = inst->debug;
00577   cfg.Fs            = ecuSim->Fs;
00578   sgnInit (sgnRxInst, &cfg);
00579 } /* siu_open_rxsgn */
00580
00581 void siu_open_txsgn (tint chnum)
00582 {
00583   siuInst_t *inst = &siuInst[chnum-1];
00584   sgnConfig_t cfg;
00585   tint sgnSize, retVal;
00586
00587   /* init sgn */
00588   retVal = sgnGetSizes(&sgnSize);
00589   if (retVal != sgn_NOERR){
00590     ecuSim->error_id = ecu_SIM_ERR_SGN;
00591     ecuSim->exec = FALSE;
00592     ecu_halt (&ecuSim->exec);
00593   }
00594   sgnTxInst = malloc(sgnSize);
00595
00596   cfg.delay         = ecuSim->txSGN.delay;
00597   cfg.dc_offset     = ecuSim->txSGN.dcoffset;
00598   cfg.wf_type       = ecuSim->txSGN.wftype;
00599   cfg.f1            = ecuSim->txSGN.f1;
00600   cfg.f2            = ecuSim->txSGN.f2;
00601   cfg.t_amp1        = ecuSim->txSGN.amp1;
00602   cfg.t_amp2        = ecuSim->txSGN.amp2;
00603   cfg.pr_period     = 1000;      /* # of samples between phase reversals */
00604   cfg.pr_enable     = FALSE;     /* disable phase reversal */
00605   cfg.noise_level   = ecuSim->txSGN.nlevel;
00606   cfg.noise_seed    = ecuSim->txSGN.nseed;
00607   cfg.noise_type    = ecuSim->txSGN.ntype;
00608   cfg.fsk_duration  = 90;           /* 90/300 = 300ms */
00609   cfg.fsk_dataptr   = &v21_flags;   /* V.21 flags */
00610   cfg.fsk_numword   = 1;
00611   cfg.power_level   = ecuSim->txSGN.pow_level;
00612   cfg.hoth_wng_seed = ecuSim->txSGN.hoth_seed;
00613   cfg.file_io_fcn   = siu_tx_file;
00614   cfg.addr          = ecuSim->txSGN.sdram_addr;
00615   cfg.count         = ecuSim->txSGN.num_sample;
00616   if (inst->companding_law == const_COMP_MULAW_8)
00617     cfg.pcmtbl      = &muaTblUlaw[0];
00618   else if (inst->companding_law == const_COMP_ALAW_8)
00619     cfg.pcmtbl      = &muaTblAlaw[0];
00620   cfg.exception     = inst->exception;
00621   cfg.debug         = inst->debug;
00622   cfg.Fs            = ecuSim->Fs;
00623   sgnInit (sgnTxInst, &cfg);
00624 } /* siu_open_txsgn */
00625
00626 void siu_set_sgn (void *inst, siuSGNPars_t *sgn)
00627 {
00628   sgnControl_t  ctl;
00629
00630   if (sgn->state) {
00631     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00632       ctl.code          = sgn_CTL_CSS_POW;
00633       ctl.u.power_level = sgn->pow_level;
00634     }
00635     else if (sgn->wftype == sgn_WFT_HOTH) {
00636       ctl.code          = sgn_CTL_HOTH_POW;
00637       ctl.u.power_level = sgn->pow_level;
00638     }
00639     else {
00640       ctl.code      = sgn_CTL_TONE;
00641       ctl.u.t.f1    = sgn->f1;
00642       ctl.u.t.f2    = sgn->f2;
00643       ctl.u.t.amp1  = sgn->amp1;
00644       ctl.u.t.amp2  = sgn->amp2;
00645     }
00646     sgnControl (inst, &ctl);
00647
00648     ctl.code           = sgn_CTL_NOISE;
00649     ctl.u.noise_level  = sgn->nlevel;
00650   }
00651   else {
00652     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00653       ctl.code          = sgn_CTL_CSS_POW;
00654       ctl.u.power_level = -100;
00655     }
00656     else if (sgn->wftype == sgn_WFT_HOTH) {
00657       ctl.code          = sgn_CTL_HOTH_POW;
00658       ctl.u.power_level = -80;
00659     }
00660     else {
00661       ctl.code     = sgn_CTL_TONE;
00662       ctl.u.t.f1   = sgn->f1;
00663       ctl.u.t.f2   = sgn->f2;
00664       ctl.u.t.amp1 = 0;
00665       ctl.u.t.amp2 = 0;
00666     }
00667     sgnControl (inst, &ctl);
00668
00669     ctl.code           = sgn_CTL_NOISE;
00670     ctl.u.noise_level  = -80;
00671   }
00672   sgnControl (inst, &ctl);
00673
00674   ctl.code = sgn_CTL_DCOFFSET;
00675   ctl.u.dc_offset = sgn->dcoffset;
00676   sgnControl (inst, &ctl);
00677
00678   /* Reset CSS generation */
00679   if (sgn->reset) {
00680     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK )
00681       ctl.code = sgn_CTL_CSS_RESET;
00682     else if (sgn->wftype == sgn_WFT_SDRAM)
00683       ctl.code = sgn_CTL_SDRAM_RST;
00684     sgnControl (inst, &ctl);
00685     sgn->reset = FALSE;
00686   }
00687 } /* siu_set_sgn */
00688
00689
00690 void ecu_sim_init(void)
00691 {
00692   ecuSim->exec        = FALSE;
00693   ecuSim->sample_cnt  = 0;
00694   ecuSim->clock_mul   = 0;                                /* default clock multiplier is 0 (bypass) */
00695   ecuSim->pcm_format  = const_COMP_MULAW_8;               /* u-law is default companding law */
00696   ecuSim->pcm_bits          = 8;                          /* u-law uses 8-bits */
00697   ecuSim->frame_size        = 5*8;                        /* 5ms default frame duration */
00698   ecuSim->ecu_y2x_delay     = 5*8;                        /* One frame default y2x delay */
00699   ecuSim->ecu_fltseg_length = SIU_MAX_ECU_FLTSEG_LENGTH;  /* 32ms default ECU segment duration */
00700   ecuSim->ecu_num_fltseg    = SIU_MAX_ECU_FLTSEG;                                 /* default 3 active filter segments max */
00701   ecuSim->ecu_filter_length = SIU_MAX_ECU_FILTER_LENGTH ; /* 128ms default ECU tail */
00702   ecuSim->hyb_filter_length = SIU_MAX_HYBRID_LENGTH;      /* 128ms default hybrid path */
00703
00704   /* ecu initialization */
00705   ecuSim->toggle_ecu           = TRUE;                         /* toggle ECU mode */
00706   ecuSim->ecuCtl.ctl_code      = ecu_CTL_MASK;
00707   ecuSim->ecuCtl.u.ctl_mask[0] = ecu_ENABLE_ECHO_CANCELLER |   /* ENABLE ECU, ENABLE NLP, ENABLE UPDATE */
00708                                  ecu_ENABLE_UPDATE         |
00709                                 // ecu_ENABLE_NLP            |
00710                                  ecu_ENABLE_AUTO_UPDATE    |
00711                                  ecu_ENABLE_SEARCH         |
00712                                  ecu_ENABLE_CNG_ADAPT      |
00713                                  ecu_ENABLE_OPNLP_DETECT;
00714   ecuSim->ecuCtl.u.ctl_mask[1] = ecu_ENABLE_NLP_PHASE_RND;
00715
00716   /* hyb initialization */
00717   ecuSim->toggle_hyb                      = TRUE;                 /* toggle hybrid parameters */
00718   ecuSim->hybCtl.code                     = hyb_CTL_FIRST_SEG;    /* Set the first segment */
00719   ecuSim->hybCtl.u.segment.type           = hyb_ST_G168_M1;       /* M1 */
00720   ecuSim->hybCtl.u.segment.erl            = 12;                   /* 12dB*/
00721   ecuSim->hybCtl.u.segment.delay          = 10*8;                 /* 10ms delay*/
00722   ecuSim->hybCtl.u.segment.negative_phase = FALSE;                /* positive phase */
00723
00724   /* tx sgn initialization */
00725   ecuSim->toggle_tx_sg    = FALSE;           /* toggle Tx generator at the beginning */
00726   ecuSim->txSGN.state     = TRUE;            /* default state is on */
00727   ecuSim->txSGN.reset     = FALSE;           /* default to no reset */
00728   ecuSim->txSGN.delay     = 0;               /* default is no delay */
00729   ecuSim->txSGN.dcoffset  = 0;               /* default dc-offset */
00730 //  ecuSim->txSGN.wftype    = sgn_WFT_COSINE;  /* default waveform */
00731   ecuSim->txSGN.wftype    = sgn_WFT_SILENCE;
00732   ecuSim->txSGN.f1        = 500;             /* default frequencies for tone generator in Hz (Q0) */
00733   ecuSim->txSGN.f2        = 0;
00734   ecuSim->txSGN.amp1      = 0;               /* default amplitudes of the two frequencies */
00735   ecuSim->txSGN.amp2      = 0;
00736   ecuSim->txSGN.nlevel    = -80;             /* default noise generator level in dBm0 */
00737   ecuSim->txSGN.nseed     = 0;               /* initial noise generator seed */
00738   ecuSim->txSGN.ntype     = sgn_NT_GAUSS;    /* Gaussian white noise */
00739   ecuSim->txSGN.pow_level = -70;             /* default HOTH/CSS power level in dBm0 */
00740   ecuSim->txSGN.hoth_seed = 8477;            /* initial HOTH generator seed */
00741
00742   /* rx sgn initialization */
00743   ecuSim->toggle_rx_sg    = FALSE;           /* do not toggle Rx generator */
00744   ecuSim->rxSGN.state     = TRUE;            /* default state is on */
00745   ecuSim->rxSGN.reset     = FALSE;           /* default to no reset */
00746   ecuSim->rxSGN.delay     = 0;               /* default is no delay */
00747   ecuSim->rxSGN.dcoffset  = 0;               /* default dc-offset */
00748 //  ecuSim->rxSGN.wftype    =   sgn_WFT_COSINE;  /* default waveform */
00749   ecuSim->rxSGN.wftype    = sgn_WFT_CSS;
00750   ecuSim->rxSGN.f1        = 1000;            /* default frequencies for tone generator in Hz (Q0) */
00751   ecuSim->rxSGN.f2        = 0;
00752   ecuSim->rxSGN.amp1      = 0;               /* default amplitudes of the two frequencies */
00753   ecuSim->rxSGN.amp2      = 0,
00754   ecuSim->rxSGN.nlevel    = -100;             /* default noise generator level in dBm0 */
00755   ecuSim->rxSGN.nseed     = 1531;            /* initial noise generator seed */
00756   ecuSim->rxSGN.ntype     = sgn_NT_GAUSS;    /* Gaussian white noise */
00757   ecuSim->rxSGN.pow_level = -10;             /* default HOTH/CSS power level in dBm0 */
00758   ecuSim->rxSGN.hoth_seed = 9184;            /* initial HOTH generator seed */
00759
00760   /* piu initialization */
00761   ecuSim->toggle_piu      = FALSE;           /* do not toggle PIU */
00762  /* PIU control parameters */
00763   ecuSim->piuCtl.ctl_code                   = piu_DC_OFFSET_REMOVAL;
00764   ecuSim->piuCtl.u.dc_offset_removal_select = piu_DC_OFFSET_MODE2;
00765
00766
00767   ecuSim->toggle_getflt   = FALSE;  /* do not ask for filter coefficients */
00768   /* get filter */
00769   ecuSim->getflt.select   = 0;      /* FG */
00770   ecuSim->getflt.start    = 0;      /* start=0               */
00771   ecuSim->getflt.ncoeff   = 8;      /* get 8 coefficients    */
00772   ecuSim->getflt.retstat  = 0;      /* ecu_NOERR             */
00773
00774
00775 #if ECUSIM_INCLUDE_MAG
00776   /* MA event */
00777   ecuSim->toggle_mipsevt       = FALSE;         /* do not generate a MIPS Agent event */
00778   ecuSim->mipsEvt.event        = MIPS_AGENT_CTRL;
00779   ecuSim->mipsEvt.u.channel.id = 0;
00780 #endif
00781
00782   /* slm initialization */
00783 #if ECU_SIM_USE_VPE
00784   ecuSim->toggle_slm        = FALSE;        /* do not change signal limiter mode */
00785   ecuSim->slm_mode          = slm_DISABLE;  /* signal limiter disabled */
00786 #endif
00787
00788   /* freerun initialization */
00789   ecuSim->toggle_freerun    = FALSE;        /* do not do free run */
00790   ecuSim->freerun_frame_cnt = 0;
00791
00792   /* Misc initialization */
00793   ecuSim->profile_enable = FALSE;
00794   ecuSim->Fs             = ecu_SIM_DEF_FS;        /* sampling rate 8kHz */
00795   ecuSim->error_id       = 0;                     /* no error */
00796   ecuSim->sig_src        = ecu_SIM_SIG_SRC_FILE;  /* signals from file */
00797   ecuSim->save_to_file   = FALSE;                 /* if signal source is from SGN,
00798                                                      don't save the signals to files */
00799   ecuSim->ecu_y2x_delay  = 0;                     /* 0 y2x delay when reading from files */
00800   ecuSim->num_channel    = 1;                     /* 1 channel active */
00801   ecuSim->output_chnum   = 0;                     /* channel 0 as output */
00802
00803   /* rin file I/O init */
00804   ecuSim->rin.eof        = FALSE;
00805   ecuSim->rin.fio        = TRUE;
00806   strcpy ((char *)ecuSim->rin.fname, ecu_SIM_DEF_BASE_INDIR);
00807   strcat ((char *)ecuSim->rin.fname, ecu_SIM_DEF_RIN_FNAME);
00808   ecuSim->rin.fptr       = (FILE *) NULL;
00809
00810   /* sin file I/O init */
00811   ecuSim->sin.eof        = FALSE;
00812   ecuSim->sin.fio        = TRUE;
00813   strcpy ((char *)ecuSim->sin.fname, ecu_SIM_DEF_BASE_INDIR);
00814   strcat ((char *)ecuSim->sin.fname, ecu_SIM_DEF_SIN_FNAME);
00815   ecuSim->sin.fptr       = (FILE *) NULL;
00816
00817   /* rout file I/O init */
00818   ecuSim->rout.eof        = FALSE;
00819   ecuSim->rout.fio        = TRUE;
00820   strcpy ((char *)ecuSim->rout.fname, ecu_SIM_DEF_BASE_OUTDIR);
00821   strcat ((char *)ecuSim->rout.fname, ecu_SIM_DEF_ROUT_FNAME);
00822   ecuSim->rout.fptr       = (FILE *) NULL;
00823
00824   /* sout file I/O init */
00825   ecuSim->sout.eof        = FALSE;
00826   ecuSim->sout.fio        = TRUE;
00827   strcpy ((char *)ecuSim->sout.fname, ecu_SIM_DEF_BASE_OUTDIR);
00828   strcat ((char *)ecuSim->sout.fname, ecu_SIM_DEF_SOUT_FNAME);
00829   ecuSim->sout.fptr       = (FILE *) NULL;
00830 }
00831 /* end of ecu_sim_init() */
00832
00833 #if ECUSIM_INCLUDE_MAG
00834 void siu_gen_mag_evt(siuMaEvt_t *evt)
00835 {
00836   siuInst_t * inst = &siuInst[0];
00837
00838   switch (evt->event) {
00839   /* Generate a MIPS Alarm */
00840   case MIPS_AGENT_CTRL:
00841     magControl (&evt->u.ctl);
00842     break;
00843
00844   /* Generate an ECU open/close event */
00845   case MIPS_AGENT_EVENT_ECU:
00846     magEvtEcuInst ((void *)inst->ecuInst, evt->u.ecu_event);
00847     break;
00848
00849   /* Generate a codec open/close event */
00850   case MIPS_AGENT_EVENT_CODEC:
00851     magEvtCodecInst (evt->u.codec.id, evt->u.codec.codec, evt->u.codec.event,
00852                        evt->u.codec.type);
00853     break;
00854
00855   /* Generate a channel open/close event */
00856   case MIPS_AGENT_EVENT_CHSTATE:
00857     magEvtChanState (evt->u.channel.id, evt->u.channel.ostate, evt->u.channel.nstate);
00858     break;
00859
00860   /* Unrecognized MIPS Agent event */
00861   default:
00862     break;
00863   }
00864 } /* siu_gen_mag_evt */
00865 #endif
00866
00867
00868 #ifdef _HWDSKT
00869 /* debug function */
00870 void debug_fcn (tuint id, char *str)
00871 {
00872   printf ("DBG-m:%d-ch:%d, %s\n", id >> 8, id & 0x00FF, str);
00873 }
00874
00875 /* exception function */
00876 void exception_fcn (tuint id, tuint type, tuint code, tuint length, tuint *data)
00877 {
00878   printf ("EXC-m:%d-ch:%d, Type: %d, Code: %d\n", id >> 8, id & 0x00FF, type, code);
00879   exit(1);
00880 }
00881 #endif
00882
00883 /******************************************************************************
00884  * FUNCTION PURPOSE: This is a dummy function. Provides the same API as in the
00885  *                   G168 test programs. This function is called in siutx.c,
00886  *                   does nothing here in ecusim, updates power in G168 tests.
00887  *****************************************************************************/
00888 void siuUpdateECUPowers (siuInst_t *siuInst, linSample *send_in, linSample *recv_in)
00889 {}
00890
00891
00892 #if ECUSIM_INCLUDE_MAG
00893 /* MIPS Agent dummy data page function */
00894 tuint mag_dummy_dp (tint code, tint action) {
00895   return ((tuint)0);
00896 }
00897 #endif
00898
00899 /******************************************************************************
00900  * FUNCTION PURPOSE: Debug info function
00901  ******************************************************************************
00902  * DESCRIPTION: Processes DebugInfo calls by software modules.  If the module
00903  *              indicate a FATAL ERROR, the SIU calls an exception and provides
00904  *              a debug string specifing the FATAL ERROR code.  If the module
00905  *              provides INFORMATION data, the SIU sends the data to the debug
00906  *              task.
00907  *
00908  *****************************************************************************/
00909 static inline void siu_tuint_to_hex (char *dest, tuint val)
00910 {
00911   tint i;
00912
00913   dest[4] = 0; /* Null terminate */
00914
00915   for (i=3; i>=0; i--) {
00916     dest[i] = (val & 0xF);
00917     if (dest[i] > 9)
00918       dest[i] += 'A' - 10;
00919     else
00920       dest[i] += '0';
00921     val >>= 4;
00922   }
00923 }
00924 void siuDebugInfoNew (tuint moduleID, tuint msgType, tuint messageCode,
00925                       tuint msgLength, tuint *messageData)
00926 {
00927   char exc_string[25];
00928
00929   switch (msgType)
00930   {
00931      case SIU_DEBUG_FATAL:
00932         /* Convert message code to a string -- call SIU exception handler */
00933         strcpy (exc_string, "Exception 0x");
00934         /* Tack exception code after previous string */
00935         siu_tuint_to_hex (exc_string+12,
00936                           ((moduleID & 0xFF00) << 2) | (messageCode & 0x3FF));
00937         siuException (moduleID, exc_string);
00938
00939      default:
00940         break;  /* Ignore other message types */
00941   }
00942 } /* siuDebugInfoNew() */
00943
00944 /******************************************************************************
00945  * FUNCTION PURPOSE: Report from PIU for Bidirectional Silence/Pattern detectin
00946  ******************************************************************************
00947  * DESCRIPTION: This function reports when Bidirectional Silence or
00948  *              Pattern is detected.
00949  *
00950  *  void siuPiuReport (
00951  *    void *siuInst,    - target instance
00952  *    tint report_code) - indication of Bidirectional Silence or pattern detected
00953  *
00954  *****************************************************************************/
00955
00956 tint siu_piu_report_code;   /* to keep piu reports */
00957
00958 void siuPiuReport (void *siuInst, tint report_code)
00959 {
00960   siu_piu_report_code = report_code;
00961 } /* siuPiuReport */
00962
00963 /******************************************************************************
00964  * FUNCTION PURPOSE: PCM Sample Trace Processing
00965  ******************************************************************************
00966  * DESCRIPTION: Collecting PCM samples from selected channel.
00967  *
00968  *****************************************************************************/
00969 void siuPcmSampleTrace (tint chnum, tint pcm_size, void *pcm_in, tuint dir)
00970 {
00971   /* no trace in simulation */
00972 } /* siuPcmSampleTrace */
00973
00974 /******************************************************************************
00975  * FUNCTION PURPOSE: Accept send and receive samples for TxRx task.
00976  ******************************************************************************
00977  * DESCRIPTION: Accepts send and receive samples for TxRx task. Starts TxRx task
00978  *
00979  *****************************************************************************/
00980
00981 void siuTxRxSendIn (void *siuInst, void *send_frame, void *recv_frame,
00982                   tint queue_id)
00983 {
00984   siuInst_t *inst = (siuInst_t*)siuInst;
00985
00986   piuTxRxProc (inst->piuInst, send_frame, recv_frame);
00987 } /* siuTxRxSendIn */
00988
00989 /* end of ecusim.c*/
00990
00991


ECU Test: ecusimport.h File Reference

  • File List
  • Globals

ecusimport.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | ecu_SEARCH_ENABLE FALSE
#define | ecu_WIDE_BAND FALSE
#define | ecu_DELAY_LINE_COMPRESS FALSE
#define | ecu_INST_RELOCATION FALSE
#define | ecu_5P5MS_FRAME_ENABLE FALSE
#define | ecu_DBGSTRM_ENABLE FALSE
#define | ecu_03DB_ENABLE FALSE
#define | ecu_CPD_ENABLE FALSE
#define | ecu_RERL_ENABLE FALSE
#define | _ECUSIMPORT_C54 0
#define | _ECUSIMPORT_C54F 0
#define | _ECUSIMPORT_C55 0
#define | _ECUSIMPORT_C55L 0
#define | _ECUSIMPORT_C64 0
#define | _ECUSIMPORT_C64_BIG_ENDIAN 0
#define | _ECUSIMPORT_C64P 0
#define | _ECUSIMPORT_C64P_BIG_ENDIAN 0
#define | _ECUSIMPORT_ELF_C64P 0
#define | _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 0
#define | _ECUSIMPORT_C66 0
#define | _ECUSIMPORT_ELF_C66 0
#define | _ECUSIMPORT_C66_BIG_ENDIAN 0
#define | _ECUSIMPORT_ELF_C66_BIG_ENDIAN 0

Define Documentation

#define ecu_SEARCH_ENABLE FALSE

Definition at line 23 of file ecusimport.h.

#define ecu_WIDE_BAND FALSE

Definition at line 30 of file ecusimport.h.

#define ecu_DELAY_LINE_COMPRESS FALSE

Definition at line 40 of file ecusimport.h.

#define ecu_INST_RELOCATION FALSE

Definition at line 50 of file ecusimport.h.

#define ecu_5P5MS_FRAME_ENABLE FALSE

Definition at line 59 of file ecusimport.h.

#define ecu_DBGSTRM_ENABLE FALSE

Definition at line 68 of file ecusimport.h.

#define ecu_03DB_ENABLE FALSE

Definition at line 75 of file ecusimport.h.

#define ecu_CPD_ENABLE FALSE

Definition at line 82 of file ecusimport.h.

#define ecu_RERL_ENABLE FALSE

Definition at line 89 of file ecusimport.h.

#define _ECUSIMPORT_C54 0

Definition at line 95 of file ecusimport.h.

#define _ECUSIMPORT_C54F 0

Definition at line 101 of file ecusimport.h.

#define _ECUSIMPORT_C55 0

Definition at line 107 of file ecusimport.h.

Referenced by ecu_sim_output().

#define _ECUSIMPORT_C55L 0

Definition at line 113 of file ecusimport.h.

Referenced by ecu_sim_output().

#define _ECUSIMPORT_C64 0

Definition at line 119 of file ecusimport.h.

#define _ECUSIMPORT_C64_BIG_ENDIAN 0

Definition at line 125 of file ecusimport.h.

#define _ECUSIMPORT_C64P 0

Definition at line 131 of file ecusimport.h.

#define _ECUSIMPORT_C64P_BIG_ENDIAN 0

Definition at line 137 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C64P 0

Definition at line 143 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 149 of file ecusimport.h.

#define _ECUSIMPORT_C66 0

Definition at line 155 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C66 0

Definition at line 161 of file ecusimport.h.

#define _ECUSIMPORT_C66_BIG_ENDIAN 0

Definition at line 167 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 173 of file ecusimport.h.


ECU Test: ecusimport.h Source File

  • File List
  • Globals

ecusimport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Definitions specific to the 16-bit implementation of ECU.
00003  ******************************************************************************
00004  * FILE NAME:   ecusimport.h
00005  *
00006  * DESCRIPTION: Contains macros and definitions specific to implementation
00007  *              with or without MXP operating environment.
00008  *
00009  * TABS: NONE
00010  *
00011  * (C) Copyright 2008, Texas Instruments, Inc.
00012  *****************************************************************************/
00013 #ifndef _ECUSIMPORT_H
00014 #define _ECUSIMPORT_H
00015
00016 /* buildfile command line options */
00017
00018 /* Command line search enable/disable (ECU_TAIL) */
00019 #ifdef ENABLE_SEARCH
00020 #define ecu_SEARCH_ENABLE        TRUE /* TRUE:  Use search algorithm, request
00021                                        *        memory for search. */
00022 #else
00023 #define ecu_SEARCH_ENABLE       FALSE /* FALSE: Full filter implementation. */
00024 #endif
00025
00026 /* Command line WB enable/disable (WB=YES/NO) */
00027 #ifdef ENABLE_WB
00028 #define ecu_WIDE_BAND            TRUE /* TRUE:  Use wide band canceller */
00029 #else
00030 #define ecu_WIDE_BAND           FALSE /* FALSE: narrow band only */
00031 #endif
00032
00033 /* Command line PCM delay line compression enable/disable (ecu_DLCOMP=YES/NO) */
00034 #ifdef ENABLE_COMPRESS
00035 #define ecu_DELAY_LINE_COMPRESS  TRUE /* TRUE:  Assume that we receive compressed
00036                                        *        and packed PCM samples for our delay
00037                                        *        line from the PIU.  Perform expansion
00038                                        *        before usage.  */
00039 #else
00040 #define ecu_DELAY_LINE_COMPRESS FALSE /* FALSE: Assume that we DO NOT receive compressed
00041                                        *        and packed PCM samples for our delay
00042                                        *        line from the PIU. */
00043 #endif
00044
00045 /* Command line instance relocation enable/disable (ecu_RELOC=YES/NO) */
00046 #ifdef ENABLE_RELOC
00047 #define ecu_INST_RELOCATION      TRUE /* TRUE:  Assume that we DO support instance
00048                                                 relocation.  */
00049 #else
00050 #define ecu_INST_RELOCATION     FALSE /* FALSE: Assume that we DO NOT support instance
00051                                                 relocation. */
00052 #endif
00053
00054 /* Command line 5.5ms frame handling enable/disable (ecu_5P5MS=YES/NO) */
00055 #ifdef ENABLE_5P5MS
00056 #define ecu_5P5MS_FRAME_ENABLE   TRUE /* TRUE:  Allow multiple of 5.5ms AND 5ms frame
00057                                        *        sizes. */
00058 #else
00059 #define ecu_5P5MS_FRAME_ENABLE  FALSE /* FALSE: Allow multiple of 5ms frame sizes
00060                                        *        only. */
00061 #endif
00062
00063 /* Command line debug streaming enable/disable (ecu_DEBUG=YES/NO) */
00064 #ifdef ENABLE_DEBUG
00065 #define ecu_DBGSTRM_ENABLE       TRUE /* TRUE:  Compile in debug streaming messages
00066                                        *        through DS0's defined in siudbgstrm.h. */
00067 #else
00068 #define ecu_DBGSTRM_ENABLE      FALSE /* FALSE: No debug streaming messages. */
00069 #endif
00070
00071 /* Command line 0/3dB configuration enable/disable (ecu_03DB=YES/NO) */
00072 #ifdef ENABLE_03DB
00073 #define ecu_03DB_ENABLE          TRUE /* TRUE:  Enable 0/3dB ERL support */
00074 #else
00075 #define ecu_03DB_ENABLE         FALSE /* FALSE: Disable 0/3dB ERL support */
00076 #endif
00077
00078 /* Command line constant PCM pattern detection enable/disable (ecu_CPD=YES/NO) */
00079 #ifdef ENABLE_CPD
00080 #define ecu_CPD_ENABLE           TRUE /* TRUE:  Enable const PCM detection */
00081 #else
00082 #define ecu_CPD_ENABLE          FALSE /* FALSE: Disable const PCM detection */
00083 #endif
00084
00085 /* Command line RERL estimation enable/disable (ecu_RERL=YES/NO) */
00086 #ifdef ENABLE_RERL
00087 #define ecu_RERL_ENABLE          TRUE /* TRUE:  Enable RERL estimation  */
00088 #else
00089 #define ecu_RERL_ENABLE         FALSE /* FALSE: Disable RERL estimation */
00090 #endif
00091
00092 #ifdef ti_targets_C54
00093 #define _ECUSIMPORT_C54 1
00094 #else
00095 #define _ECUSIMPORT_C54 0
00096 #endif
00097
00098 #ifdef ti_targets_C54_far
00099 #define _ECUSIMPORT_C54F 1
00100 #else
00101 #define _ECUSIMPORT_C54F 0
00102 #endif
00103
00104 #ifdef ti_targets_C55
00105 #define _ECUSIMPORT_C55 1
00106 #else
00107 #define _ECUSIMPORT_C55 0
00108 #endif
00109
00110 #ifdef ti_targets_C55_large
00111 #define _ECUSIMPORT_C55L 1
00112 #else
00113 #define _ECUSIMPORT_C55L 0
00114 #endif
00115
00116 #ifdef ti_targets_C64
00117 #define _ECUSIMPORT_C64 1
00118 #else
00119 #define _ECUSIMPORT_C64 0
00120 #endif
00121
00122 #ifdef ti_targets_C64_big_endian
00123 #define _ECUSIMPORT_C64_BIG_ENDIAN 1
00124 #else
00125 #define _ECUSIMPORT_C64_BIG_ENDIAN 0
00126 #endif
00127
00128 #ifdef ti_targets_C64P
00129 #define _ECUSIMPORT_C64P 1
00130 #else
00131 #define _ECUSIMPORT_C64P 0
00132 #endif
00133
00134 #ifdef ti_targets_C64P_big_endian
00135 #define _ECUSIMPORT_C64P_BIG_ENDIAN 1
00136 #else
00137 #define _ECUSIMPORT_C64P_BIG_ENDIAN 0
00138 #endif
00139
00140 #ifdef ti_targets_elf_C64P
00141 #define _ECUSIMPORT_ELF_C64P 1
00142 #else
00143 #define _ECUSIMPORT_ELF_C64P 0
00144 #endif
00145
00146 #ifdef ti_targets_elf_C64P_big_endian
00147 #define _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 1
00148 #else
00149 #define _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 0
00150 #endif
00151
00152 #ifdef ti_targets_C66
00153 #define _ECUSIMPORT_C66 1
00154 #else
00155 #define _ECUSIMPORT_C66 0
00156 #endif
00157
00158 #ifdef ti_targets_elf_C66
00159 #define _ECUSIMPORT_ELF_C66 1
00160 #else
00161 #define _ECUSIMPORT_ELF_C66 0
00162 #endif
00163
00164 #ifdef ti_targets_C66_big_endian
00165 #define _ECUSIMPORT_C66_BIG_ENDIAN 1
00166 #else
00167 #define _ECUSIMPORT_C66_BIG_ENDIAN 0
00168 #endif
00169
00170 #ifdef ti_targets_elf_C66_big_endian
00171 #define _ECUSIMPORT_ELF_C66_BIG_ENDIAN 1
00172 #else
00173 #define _ECUSIMPORT_ELF_C66_BIG_ENDIAN 0
00174 #endif
00175
00176
00177 #if   (_ECUSIMPORT_C54 || _ECUSIMPORT_C54F)
00178 #include <ti/mas/ecu/test/src/c54/ecusimport.h>
00179 #elif (_ECUSIMPORT_C55 || _ECUSIMPORT_C55L)
00180 #include <ti/mas/ecu/test/src/c55/ecusimport.h>
00181 #elif (_ECUSIMPORT_C64       || _ECUSIMPORT_C64_BIG_ENDIAN      || \
00182        _ECUSIMPORT_C64P      || _ECUSIMPORT_C64P_BIG_ENDIAN     || \
00183        _ECUSIMPORT_ELF_C64P  || _ECUSIMPORT_ELF_C64P_BIG_ENDIAN || \
00184        _ECUSIMPORT_C66       || _ECUSIMPORT_C66_BIG_ENDIAN      || \
00185        _ECUSIMPORT_ELF_C66   || _ECUSIMPORT_ELF_C66_BIG_ENDIAN)
00186 #include <ti/mas/ecu/test/src/c64/ecusimport.h>
00187 #else
00188 #error invalid target
00189 #endif
00190
00191 #endif /* _ECUSIMPORT_H */
00192 /* nothing after this point */


ECU Test: ecuuta.c File Reference

  • File List
  • Globals

ecuuta.c File Reference

#include <ti/mas/ecu/ecu.h>
#include <ti/mas/sdk/sgn.h>
#include <ti/mas/sdk/hyb.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/ecu/test/src/ecuuta.h>
#include <ti/mas/ecu/test/src/ecuautoport.h>

Include dependency graph for ecuuta.c:

Go to the source code of this file.

Functions

tint | ecucmd_chnnew_handler (tint index, void *options)
tint | ecucmd_chndel_handler (tint index, void *options)
tint | ecucmd_open_handler (tint index, void *options)
tint | ecucmd_close_handler (tint index, void *options)
tint | ecucmd_chncfg_handler (tint index, void *options)
tint | ecucmd_runsim_handler (tint index, void *options)
tint | ecucmd_output_handler (tint index, void *options)
tint | ecucmd_getflt_handler (tint index, void *options)

Variables

const utaCommand_t | ecuCommands [ecucmd_AUTO_NUM_CMD]
const utaEnum_t | ecuPcmVals [3]
const utaEnum_t | ecuBoolVals [2]
const utaEnum_t | ecuFilterVals [3]
const utaEnum_t | ecuMarkVals [3]
const utaOption_t | ecuChnnewOpts [ecucmd_NUM_CHNNEW_OPT]
const utaOption_t | ecuOpenOpts [ecucmd_NUM_OPEN_OPT]
const utaOption_t | ecuChncfgOpts [ecucmd_NUM_CHNCFG_OPT]
const utaOption_t | ecuRunsimOpts [ecucmd_NUM_RUNSIM_OPT]
const utaOption_t | ecuOutputOpts [ecucmd_NUM_OUTPUT_OPT]
const utaOption_t | ecuGetfltOpts [ecucmd_NUM_GETFLT_OPT]

Function Documentation

tint ecucmd_chnnew_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 119 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_INIT_PATTERN, ecu_AUTO_ERR_CREATECHN, ecu_AUTO_NOERR, ecuAuto_create_chn(), ecuMemConfig_t::init_pattern, and ecuMemConfig_t::pre_init_bufs.

Here is the call graph for this function:

tint ecucmd_chndel_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 152 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_DELETECHN, ecu_AUTO_NOERR, and ecuAuto_delete_chn().

Here is the call graph for this function:

tint ecucmd_open_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 176 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_OPENCHN, ecu_AUTO_NOERR, ecu_AUTO_PCM_ALAW, ecu_AUTO_SAMP_PER_MS, ecuAuto_open_chn(), ecucmd_OPEN_OPT_CHIDX_ID, ecucmd_OPEN_OPT_FRAME_DEF, ecucmd_OPEN_OPT_FRAME_ID, ecucmd_OPEN_OPT_PCM_ID, ecucmd_OPEN_OPT_TAIL_DEF, ecucmd_OPEN_OPT_TAIL_ID, ecucmd_OPEN_OPT_Y2X_DEF, and ecucmd_OPEN_OPT_Y2X_ID.

Here is the call graph for this function:

tint ecucmd_close_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 258 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_OPENCHN, ecu_AUTO_NOERR, and ecuAuto_close_chn().

Here is the call graph for this function:

tint ecucmd_chncfg_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 282 of file ecuuta.c.

References ecuChnConfig_t::bypass, ecu_AUTO_CHCFG_BYP_VALID, ecu_AUTO_CHCFG_CLR_VALID, ecu_AUTO_CHCFG_ERL_VALID, ecu_AUTO_CHCFG_HLD_VALID, ecu_AUTO_CHCFG_NLP_VALID, ecu_auto_check_rc(), ecu_AUTO_ERL_0DB, ecu_AUTO_ERL_3DB, ecu_AUTO_ERL_6DB, ecu_AUTO_ERR_CONFIGCHN, ecu_AUTO_NLP_CNG_ON, ecu_AUTO_NLP_OFF, ecu_AUTO_NLP_ON, ecu_AUTO_NOERR, ecuAuto_config_chn(), ecucmd_CHNCFG_OPT_BYPASS_ID, ecucmd_CHNCFG_OPT_CNG_ID, ecucmd_CHNCFG_OPT_HCLEAR_ID, ecucmd_CHNCFG_OPT_HHOLD_ID, ecucmd_CHNCFG_OPT_MINERL_ID, ecucmd_CHNCFG_OPT_NLP_ID, ecucmd_CHNCFG_OPT_RESET_ID, ecucmd_CHNCFG_OPT_TAIL_ID, ecuChnConfig_t::hreg_clear, ecuChnConfig_t::hreg_hold, ecuChnConfig_t::min_erl, ecuChnConfig_t::nlp_mode, and ecuChnConfig_t::valid_bitfield.

Here is the call graph for this function:

tint ecucmd_runsim_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 378 of file ecuuta.c.

References ecuAutoLoopCfg_t::chn_index, ecuAuto_process_loop(), ecucmd_RUNSIM_OPT_MARK_DEF, ecucmd_RUNSIM_OPT_MARK_ID, ecucmd_RUNSIM_OPT_NOFOUT_ID, ecucmd_RUNSIM_OPT_PCM_DEF, ecucmd_RUNSIM_OPT_PCM_ID, ecucmd_RUNSIM_OPT_TIME_ID, ecuAutoLoopCfg_t::enable_out, ecuAutoLoopCfg_t::marker, ecuAutoLoopCfg_t::pcm_format, and ecuAutoLoopCfg_t::time_ms.

Here is the call graph for this function:

tint ecucmd_output_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 433 of file ecuuta.c.

References ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT, ecu_AUTO_NUM_OUTFILES, ecucmd_OUTPUT_OPT_RIN, ecucmd_OUTPUT_OPT_ROUT, ecucmd_OUTPUT_OPT_SIN, ecucmd_OUTPUT_OPT_SOUT, outFile, ecuAutoFout_t::output_data, and ecuAutoFout_t::pcm_format.

tint ecucmd_getflt_handler | ( | tint | index,
 |  | void * | options
 | ) |  |

Definition at line 492 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_GETFILTER, ecu_AUTO_MAX_STRING, ecu_AUTO_NOERR, ecuAuto_get_filter(), ecucmd_GETFLT_OPT_FILTER_DEF, ecucmd_GETFLT_OPT_FILTER_ID, and ecucmd_GETFLT_OPT_FNAME_ID.

Here is the call graph for this function:

Variable Documentation

const utaCommand_t ecuCommands[ecucmd_AUTO_NUM_CMD]

Initial value:

 {
  { "CHNNEW", ecucmd_chnnew_handler, ecucmd_NUM_CHNNEW_OPT, ecuChnnewOpts },
  { "CHNDEL", ecucmd_chndel_handler, 0 },
  { "OPEN",   ecucmd_open_handler,   ecucmd_NUM_OPEN_OPT,   ecuOpenOpts   },
  { "CLOSE",  ecucmd_close_handler,  0 },
  { "CHNCFG", ecucmd_chncfg_handler, ecucmd_NUM_CHNCFG_OPT, ecuChncfgOpts },
  { "RUNSIM", ecucmd_runsim_handler, ecucmd_NUM_RUNSIM_OPT, ecuRunsimOpts },
  { "OUTPUT", ecucmd_output_handler, ecucmd_NUM_OUTPUT_OPT, ecuOutputOpts },
  { "GETFLT", ecucmd_getflt_handler, ecucmd_NUM_GETFLT_OPT, ecuGetfltOpts }
}

Definition at line 20 of file ecuuta.c.

Referenced by ecu_auto_addmod_uta().

const utaEnum_t ecuPcmVals[3]

Initial value:

 {
  { "ULA", ecu_AUTO_PCM_ULAW },
  { "ALA", ecu_AUTO_PCM_ALAW },
  { "LIN", ecu_AUTO_PCM_LIN  }
}

Definition at line 32 of file ecuuta.c.

const utaEnum_t ecuBoolVals[2]

Initial value:

 {
  { "OFF", FALSE },
  { "ON",  TRUE  }
}

Definition at line 39 of file ecuuta.c.

const utaEnum_t ecuFilterVals[3]

Initial value:

 {
  { "FG",   ecu_FLT_FOREGROUND },
  { "BG",   ecu_FLT_BACKGROUND },
  { "SRCH", ecu_FLT_SEARCH     }
}

Definition at line 45 of file ecuuta.c.

const utaEnum_t ecuMarkVals[3]

Initial value:

 {
  { "NONE", ecu_AUTO_MRK_NONE },
  { "PRE",  ecu_AUTO_MRK_PRE  },
  { "POST", ecu_AUTO_MRK_POST }
}

Definition at line 52 of file ecuuta.c.

const utaOption_t ecuChnnewOpts[ecucmd_NUM_CHNNEW_OPT]

Initial value:

 {
  { { "TAIL", ecucmd_CHNNEW_OPT_TAIL_ID }, uta_OPT_TYPE_INT },
  { { "Y2X",  ecucmd_CHNNEW_OPT_Y2X_ID },  uta_OPT_TYPE_INT }
}

Definition at line 59 of file ecuuta.c.

const utaOption_t ecuOpenOpts[ecucmd_NUM_OPEN_OPT]

Initial value:

 {
  { { "TAIL",  ecucmd_OPEN_OPT_TAIL_ID  }, uta_OPT_TYPE_INT },
  { { "Y2X",   ecucmd_OPEN_OPT_Y2X_ID   }, uta_OPT_TYPE_INT },
  { { "CHIDX", ecucmd_OPEN_OPT_CHIDX_ID }, uta_OPT_TYPE_INT },
  { { "FRAME", ecucmd_OPEN_OPT_FRAME_ID }, uta_OPT_TYPE_INT },
  { { "PCM",   ecucmd_OPEN_OPT_PCM_ID   }, uta_OPT_TYPE_ENUM, { 2, ecuPcmVals } }
}

Definition at line 65 of file ecuuta.c.

const utaOption_t ecuChncfgOpts[ecucmd_NUM_CHNCFG_OPT]

Initial value:

 {
  { { "RESET",  ecucmd_CHNCFG_OPT_RESET_ID  }, uta_OPT_TYPE_NONE },
  { { "HCLEAR", ecucmd_CHNCFG_OPT_HCLEAR_ID }, uta_OPT_TYPE_NONE },
  { { "MINERL", ecucmd_CHNCFG_OPT_MINERL_ID }, uta_OPT_TYPE_INT  },
  { { "TAIL",   ecucmd_CHNCFG_OPT_TAIL_ID   }, uta_OPT_TYPE_INT  },
  { { "BYPASS", ecucmd_CHNCFG_OPT_BYPASS_ID }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
  { { "NLP",    ecucmd_CHNCFG_OPT_NLP_ID    }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
  { { "CNG",    ecucmd_CHNCFG_OPT_CNG_ID    }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
  { { "HHOLD",  ecucmd_CHNCFG_OPT_HHOLD_ID  }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } }
}

Definition at line 74 of file ecuuta.c.

const utaOption_t ecuRunsimOpts[ecucmd_NUM_RUNSIM_OPT]

Initial value:

 {
  { { "TIME",   ecucmd_RUNSIM_OPT_TIME_ID   }, uta_OPT_TYPE_INT },
  { { "PCM",    ecucmd_RUNSIM_OPT_PCM_ID    }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals  } },
  { { "NOFOUT", ecucmd_RUNSIM_OPT_NOFOUT_ID }, uta_OPT_TYPE_NONE },
  { { "MARK",   ecucmd_RUNSIM_OPT_MARK_ID   }, uta_OPT_TYPE_ENUM, { 3, ecuMarkVals } }
}

Definition at line 86 of file ecuuta.c.

const utaOption_t ecuOutputOpts[ecucmd_NUM_OUTPUT_OPT]

Initial value:

 {
  { { "RIN",   ecucmd_OUTPUT_OPT_RIN   }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
  { { "SIN",   ecucmd_OUTPUT_OPT_SIN   }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
  { { "ROUT",  ecucmd_OUTPUT_OPT_ROUT  }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
  { { "SOUT",  ecucmd_OUTPUT_OPT_SOUT  }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } }
}

Definition at line 94 of file ecuuta.c.

const utaOption_t ecuGetfltOpts[ecucmd_NUM_GETFLT_OPT]

Initial value:

 {
  { { "FNAME",  ecucmd_GETFLT_OPT_FNAME_ID  }, uta_OPT_TYPE_STR  },
  { { "FILTER", ecucmd_GETFLT_OPT_FILTER_ID }, uta_OPT_TYPE_ENUM, { 3, ecuFilterVals } },
}

Definition at line 102 of file ecuuta.c.


ECU Test: ecuuta.c Source File

  • File List
  • Globals

ecuuta.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: ECU Automation commands.
00003  ******************************************************************************
00004  * FILE NAME:   ecuuta.c
00005  *
00006  * DESCRIPTION: Defines the ECU module automation commands.
00007  *
00008  * (C) Copyright 2009, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #include <ti/mas/ecu/ecu.h>
00012 #include <ti/mas/sdk/sgn.h>
00013 #include <ti/mas/sdk/hyb.h>
00014 #include <ti/mas/util/mua.h>
00015 #include <ti/mas/ecu/test/src/ecuuta.h>
00016 #include <ti/mas/ecu/test/src/ecuautoport.h>
00017
00018
00019 /* Allocate and fill ECU command table */
00020 const utaCommand_t ecuCommands[ecucmd_AUTO_NUM_CMD] = {
00021   { "CHNNEW", ecucmd_chnnew_handler, ecucmd_NUM_CHNNEW_OPT, ecuChnnewOpts },
00022   { "CHNDEL", ecucmd_chndel_handler, 0 },
00023   { "OPEN",   ecucmd_open_handler,   ecucmd_NUM_OPEN_OPT,   ecuOpenOpts   },
00024   { "CLOSE",  ecucmd_close_handler,  0 },
00025   { "CHNCFG", ecucmd_chncfg_handler, ecucmd_NUM_CHNCFG_OPT, ecuChncfgOpts },
00026   { "RUNSIM", ecucmd_runsim_handler, ecucmd_NUM_RUNSIM_OPT, ecuRunsimOpts },
00027   { "OUTPUT", ecucmd_output_handler, ecucmd_NUM_OUTPUT_OPT, ecuOutputOpts },
00028   { "GETFLT", ecucmd_getflt_handler, ecucmd_NUM_GETFLT_OPT, ecuGetfltOpts }
00029 };
00030
00031 /* Channel open PCM option (PCM) value enumerations */
00032 const utaEnum_t ecuPcmVals[3] = {
00033   { "ULA", ecu_AUTO_PCM_ULAW },
00034   { "ALA", ecu_AUTO_PCM_ALAW },
00035   { "LIN", ecu_AUTO_PCM_LIN  }
00036 };
00037
00038 /* Boolean option value enumerations */
00039 const utaEnum_t ecuBoolVals[2] = {
00040   { "OFF", FALSE },
00041   { "ON",  TRUE  }
00042 };
00043
00044 /* Filter option value enumerations */
00045 const utaEnum_t ecuFilterVals[3] = {
00046   { "FG",   ecu_FLT_FOREGROUND },
00047   { "BG",   ecu_FLT_BACKGROUND },
00048   { "SRCH", ecu_FLT_SEARCH     }
00049 };
00050
00051 /* Execution marker enumerations */
00052 const utaEnum_t ecuMarkVals[3] = {
00053   { "NONE", ecu_AUTO_MRK_NONE },
00054   { "PRE",  ecu_AUTO_MRK_PRE  },
00055   { "POST", ecu_AUTO_MRK_POST }
00056 };
00057
00058 /* Channel creation (CHNNEW) options */
00059 const utaOption_t ecuChnnewOpts[ecucmd_NUM_CHNNEW_OPT] = {
00060   { { "TAIL", ecucmd_CHNNEW_OPT_TAIL_ID }, uta_OPT_TYPE_INT },
00061   { { "Y2X",  ecucmd_CHNNEW_OPT_Y2X_ID },  uta_OPT_TYPE_INT }
00062 };
00063
00064 /* Channel open (OPEN) options */
00065 const utaOption_t ecuOpenOpts[ecucmd_NUM_OPEN_OPT] = {
00066   { { "TAIL",  ecucmd_OPEN_OPT_TAIL_ID  }, uta_OPT_TYPE_INT },
00067   { { "Y2X",   ecucmd_OPEN_OPT_Y2X_ID   }, uta_OPT_TYPE_INT },
00068   { { "CHIDX", ecucmd_OPEN_OPT_CHIDX_ID }, uta_OPT_TYPE_INT },
00069   { { "FRAME", ecucmd_OPEN_OPT_FRAME_ID }, uta_OPT_TYPE_INT },
00070   { { "PCM",   ecucmd_OPEN_OPT_PCM_ID   }, uta_OPT_TYPE_ENUM, { 2, ecuPcmVals } }
00071 };
00072
00073 /* Channel config (CHNCFG) options */
00074 const utaOption_t ecuChncfgOpts[ecucmd_NUM_CHNCFG_OPT] = {
00075   { { "RESET",  ecucmd_CHNCFG_OPT_RESET_ID  }, uta_OPT_TYPE_NONE },
00076   { { "HCLEAR", ecucmd_CHNCFG_OPT_HCLEAR_ID }, uta_OPT_TYPE_NONE },
00077   { { "MINERL", ecucmd_CHNCFG_OPT_MINERL_ID }, uta_OPT_TYPE_INT  },
00078   { { "TAIL",   ecucmd_CHNCFG_OPT_TAIL_ID   }, uta_OPT_TYPE_INT  },
00079   { { "BYPASS", ecucmd_CHNCFG_OPT_BYPASS_ID }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
00080   { { "NLP",    ecucmd_CHNCFG_OPT_NLP_ID    }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
00081   { { "CNG",    ecucmd_CHNCFG_OPT_CNG_ID    }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
00082   { { "HHOLD",  ecucmd_CHNCFG_OPT_HHOLD_ID  }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } }
00083 };
00084
00085 /* Execution (RUNSIM) options */
00086 const utaOption_t ecuRunsimOpts[ecucmd_NUM_RUNSIM_OPT] = {
00087   { { "TIME",   ecucmd_RUNSIM_OPT_TIME_ID   }, uta_OPT_TYPE_INT },
00088   { { "PCM",    ecucmd_RUNSIM_OPT_PCM_ID    }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals  } },
00089   { { "NOFOUT", ecucmd_RUNSIM_OPT_NOFOUT_ID }, uta_OPT_TYPE_NONE },
00090   { { "MARK",   ecucmd_RUNSIM_OPT_MARK_ID   }, uta_OPT_TYPE_ENUM, { 3, ecuMarkVals } }
00091 };
00092
00093 /* File output (OUTPUT) options */
00094 const utaOption_t ecuOutputOpts[ecucmd_NUM_OUTPUT_OPT] = {
00095   { { "RIN",   ecucmd_OUTPUT_OPT_RIN   }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
00096   { { "SIN",   ecucmd_OUTPUT_OPT_SIN   }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
00097   { { "ROUT",  ecucmd_OUTPUT_OPT_ROUT  }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
00098   { { "SOUT",  ecucmd_OUTPUT_OPT_SOUT  }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } }
00099 };
00100
00101 /* Filter coefficient output (GETFLT) options */
00102 const utaOption_t ecuGetfltOpts[ecucmd_NUM_GETFLT_OPT] = {
00103   { { "FNAME",  ecucmd_GETFLT_OPT_FNAME_ID  }, uta_OPT_TYPE_STR  },
00104   { { "FILTER", ecucmd_GETFLT_OPT_FILTER_ID }, uta_OPT_TYPE_ENUM, { 3, ecuFilterVals } },
00105 };
00106
00107
00108
00109 /******************************************************************************
00110  * FUNCTION PURPOSE: ECU automation "CHNNEW" handler function.
00111  ******************************************************************************
00112  * DESCRIPTION: UTA command handler for ECU command "CHNNEW"
00113  *
00114  *  tint ecucmd_chnnew_handler (
00115  *    tint index,     - Channel instance index
00116  *    void *options)  - pointer to array of option:value pairs
00117  *
00118  *****************************************************************************/
00119 tint ecucmd_chnnew_handler (tint index, void *options)
00120 {
00121   ecuNewConfig_t ncfg;
00122   ecuMemConfig_t mcfg;
00123   tint ret_code;
00124
00125   /* Channel create configuration */
00126   ncfg.ID = index + 1;
00127
00128   /* Memory initialization */
00129   mcfg.pre_init_bufs = FALSE;
00130   mcfg.init_pattern  = ecu_AUTO_DEF_INIT_PATTERN;
00131
00132   /* Create ECU Channel */
00133   ret_code = ecuAuto_create_chn (index, &ncfg, &mcfg);
00134   ecu_auto_check_rc (ecu_AUTO_ERR_CREATECHN, ret_code, ecu_AUTO_NOERR);
00135
00136   /* Return success */
00137   return (uta_NO_ERROR);
00138 }
00139
00140
00141
00142 /******************************************************************************
00143  * FUNCTION PURPOSE: ECU automation "CHNDEL" handler function.
00144  ******************************************************************************
00145  * DESCRIPTION: UTA command handler for ECU command "CHNDEL"
00146  *
00147  *  tint ecucmd_chndel_handler (
00148  *    tint index,     - Channel instance index
00149  *    void *options)  - pointer to array of option:value pairs
00150  *
00151  *****************************************************************************/
00152 tint ecucmd_chndel_handler (tint index, void *options)
00153 {
00154   tint ret_code;
00155
00156   /* Delete Channel and check for errors */
00157   ret_code = ecuAuto_delete_chn (index);
00158   ecu_auto_check_rc (ecu_AUTO_ERR_DELETECHN, ret_code, ecu_AUTO_NOERR);
00159
00160   /* Return success */
00161   return (uta_NO_ERROR);
00162 }
00163
00164
00165
00166 /******************************************************************************
00167  * FUNCTION PURPOSE: ECU automation "OPEN" handler function.
00168  ******************************************************************************
00169  * DESCRIPTION: UTA command handler for ECU command "OPEN"
00170  *
00171  *  tint ecucmd_open_handler (
00172  *    tint index,     - Channel instance index
00173  *    void *options)  - pointer to array of option:value pairs
00174  *
00175  *****************************************************************************/
00176 tint ecucmd_open_handler (tint index, void *options)
00177 {
00178   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00179   ecuConfigParam_t cfg_param;
00180   ecuConfig_t cfg;
00181   tint ret_code;
00182
00183   /* ECU ecuOpen() non-configurable parameters */
00184   cfg.sendOutInst = (void *) NULL;  /* Non-configurable */
00185   cfg.recOutInst  = (void *) NULL;  /* Non-configurable */
00186   cfg.cfgParam    = &cfg_param;     /* Non-configurable */
00187   cfg_param.config_bitfield  = ecu_ENABLE_ECHO_CANCELLER
00188                              | ecu_ENABLE_UPDATE
00189                              | ecu_ENABLE_NLP
00190                              | ecu_ENABLE_AUTO_UPDATE
00191                              | ecu_ENABLE_SEARCH
00192                              | ecu_ENABLE_CNG_ADAPT
00193                              | ecu_ENABLE_OPNLP_DETECT
00194                              | ecu_CLEAR_FG
00195                              | ecu_CLEAR_BG
00196                              | ecu_CLEAR_SEARCH;
00197   cfg_param.config_bitfield1 = ecu_ENABLE_NLP_PHASE_RND;
00198   cfg_param.noise_level      = 0;
00199   cfg_param.nlp_aggress      = 0;
00200   cfg_param.cn_config        = 16384;
00201
00202   /* ECU ecuOpen() default configurable parameters */
00203   cfg_param.filter_length = ecucmd_OPEN_OPT_TAIL_DEF;
00204   cfg.y2x_delay         = ecucmd_OPEN_OPT_Y2X_DEF;
00205   cfg.pcm_expand_tbl    = muaTblUlaw;
00206   cfg.pcm_zero          = ecu_AUTO_ULA_ZERO;
00207   cfg.samples_per_frame = ecucmd_OPEN_OPT_FRAME_DEF;
00208
00209   /* UTA option definition structure */
00210   while (opts->id != uta_IDX_NULL) {
00211     /* Switch based on option ID */
00212     switch (opts->id) {
00213     case ecucmd_OPEN_OPT_TAIL_ID:
00214       cfg_param.filter_length = opts->value.integer * ecu_AUTO_SAMP_PER_MS;
00215       break;
00216     case ecucmd_OPEN_OPT_Y2X_ID:
00217       cfg.y2x_delay = (tint) opts->value.integer;
00218       break;
00219     case ecucmd_OPEN_OPT_FRAME_ID:
00220       cfg.samples_per_frame = (tint) opts->value.integer;
00221       break;
00222     case ecucmd_OPEN_OPT_PCM_ID:
00223       if ((tint) opts->value.integer == ecu_AUTO_PCM_ALAW) {
00224         cfg.pcm_expand_tbl = muaTblAlaw;
00225         cfg.pcm_zero       = ecu_AUTO_ALA_ZERO;
00226       }
00227       break;
00228     case ecucmd_OPEN_OPT_CHIDX_ID:
00229       break;
00230     default:
00231       /* Illegal index */
00232       return (uta_TDF_ERROR);
00233     }
00234     /* Increment options pointer */
00235     opts++;
00236   }
00237
00238   /* Open ECU Channel */
00239   ret_code = ecuAuto_open_chn (index, &cfg);
00240   ecu_auto_check_rc (ecu_AUTO_ERR_OPENCHN, ret_code, ecu_AUTO_NOERR);
00241
00242   /* Return success */
00243   return (uta_NO_ERROR);
00244 }
00245
00246
00247
00248 /******************************************************************************
00249  * FUNCTION PURPOSE: ECU automation "CLOSE" handler function.
00250  ******************************************************************************
00251  * DESCRIPTION: UTA command handler for ECU command "CLOSE"
00252  *
00253  *  tint ecucmd_close_handler (
00254  *    tint index,     - Channel instance index
00255  *    void *options)  - pointer to array of option:value pairs
00256  *
00257  *****************************************************************************/
00258 tint ecucmd_close_handler (tint index, void *options)
00259 {
00260   tint ret_code;
00261
00262   /* Close ECU instance */
00263   ret_code = ecuAuto_close_chn (index);
00264   ecu_auto_check_rc (ecu_AUTO_ERR_OPENCHN, ret_code, ecu_AUTO_NOERR);
00265
00266   /* Return success */
00267   return (uta_NO_ERROR);
00268 }
00269
00270
00271
00272 /******************************************************************************
00273  * FUNCTION PURPOSE: ECU automation "CHNCFG" handler function.
00274  ******************************************************************************
00275  * DESCRIPTION: UTA command handler for ECU command "CHNCFG"
00276  *
00277  *  tint ecucmd_chncfg_handler (
00278  *    tint index,     - Channel instance index
00279  *    void *options)  - pointer to array of option:value pairs
00280  *
00281  *****************************************************************************/
00282 tint ecucmd_chncfg_handler (tint index, void *options)
00283 {
00284   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00285   ecuChnConfig_t cfg;
00286   tint  min_erl;
00287   tbool nlp_on;
00288   tbool cng_on;
00289   tint  ret_code;
00290
00291   /* Initialization */
00292   cfg.valid_bitfield = 0;
00293   nlp_on = TRUE;
00294   cng_on = TRUE;
00295
00296   /* UTA option definition structure */
00297   while (opts->id != uta_IDX_NULL) {
00298     /* Switch based on option ID */
00299     switch (opts->id) {
00300     /* Channel reset */
00301     case ecucmd_CHNCFG_OPT_RESET_ID:
00302     case ecucmd_CHNCFG_OPT_HCLEAR_ID:
00303       /* Set to reset the channel */
00304       cfg.valid_bitfield |= ecu_AUTO_CHCFG_CLR_VALID;
00305       cfg.hreg_clear = TRUE;
00306       break;
00307     /* Minimum ERL change */
00308     case ecucmd_CHNCFG_OPT_MINERL_ID:
00309       /* Find the associated minimum ERL bits */
00310       cfg.valid_bitfield |= ecu_AUTO_CHCFG_ERL_VALID;
00311       cfg.min_erl = ecu_AUTO_ERL_6DB;
00312       min_erl = (tint) opts->value.integer;
00313       if      (min_erl == 0) cfg.min_erl = ecu_AUTO_ERL_0DB;
00314       else if (min_erl == 3) cfg.min_erl = ecu_AUTO_ERL_3DB;
00315       else if (min_erl != 6) return (uta_TDF_ERROR);
00316       break;
00317     /* Tail length change */
00318     case ecucmd_CHNCFG_OPT_TAIL_ID:
00319       /* Ignore */
00320       break;
00321     /* Bypass mode change */
00322     case ecucmd_CHNCFG_OPT_BYPASS_ID:
00323       cfg.valid_bitfield |= ecu_AUTO_CHCFG_BYP_VALID;
00324       cfg.bypass = (tbool) opts->value.integer;
00325       break;
00326     /* NLP mode change */
00327     case ecucmd_CHNCFG_OPT_NLP_ID:
00328       cfg.valid_bitfield |= ecu_AUTO_CHCFG_NLP_VALID;
00329       nlp_on = ((tbool) opts->value.integer);
00330       break;
00331     /* CNG mode change */
00332     case ecucmd_CHNCFG_OPT_CNG_ID:
00333       cfg.valid_bitfield |= ecu_AUTO_CHCFG_NLP_VALID;
00334       cng_on = ((tbool) opts->value.integer);
00335       break;
00336     /* H-register hold mode change */
00337     case ecucmd_CHNCFG_OPT_HHOLD_ID:
00338       cfg.valid_bitfield |= ecu_AUTO_CHCFG_HLD_VALID;
00339       cfg.hreg_hold = (tbool) opts->value.integer;
00340       break;
00341     default:
00342       /* Illegal index */
00343       return (uta_TDF_ERROR);
00344     }
00345     /* Increment options pointer */
00346     opts++;
00347   }
00348
00349   /* Set NLP/CNG based on settings */
00350   cfg.nlp_mode = ecu_AUTO_NLP_OFF;
00351   if (nlp_on) {
00352     cfg.nlp_mode = ecu_AUTO_NLP_ON;
00353     if (cng_on) {
00354       cfg.nlp_mode = ecu_AUTO_NLP_CNG_ON;
00355     }
00356   }
00357
00358   /* Configure the ECU instance */
00359   ret_code = ecuAuto_config_chn (index, &cfg);
00360   ecu_auto_check_rc (ecu_AUTO_ERR_CONFIGCHN, ret_code, ecu_AUTO_NOERR);
00361
00362   /* Return success */
00363   return (uta_NO_ERROR);
00364 }
00365
00366
00367
00368 /******************************************************************************
00369  * FUNCTION PURPOSE: ECU automation "RUNSIM" handler function.
00370  ******************************************************************************
00371  * DESCRIPTION: UTA command handler for ECU command "RUNSIM"
00372  *
00373  *  tint ecucmd_runsim_handler (
00374  *    tint index,     - instance index
00375  *    void *options)  - pointer to array of option:value pairs
00376  *
00377  *****************************************************************************/
00378 tint ecucmd_runsim_handler (tint index, void *options)
00379 {
00380   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00381   ecuAutoLoopCfg_t cfg;
00382
00383   /* Set the parameters for the loop */
00384   cfg.enable_out = TRUE;
00385   cfg.chn_index  = index;
00386   cfg.time_ms    = 0;
00387   cfg.marker     = ecucmd_RUNSIM_OPT_MARK_DEF;
00388   cfg.pcm_format = ecucmd_RUNSIM_OPT_PCM_DEF;
00389
00390   /* UTA option definition structure */
00391   while (opts->id != uta_IDX_NULL) {
00392     /* Switch based on option ID */
00393     switch (opts->id) {
00394     case ecucmd_RUNSIM_OPT_TIME_ID:
00395       cfg.time_ms = opts->value.integer;
00396       break;
00397     case ecucmd_RUNSIM_OPT_PCM_ID:
00398       cfg.pcm_format = (tint) opts->value.integer;
00399       break;
00400     case ecucmd_RUNSIM_OPT_NOFOUT_ID:
00401       cfg.enable_out = FALSE;
00402       break;
00403     case ecucmd_RUNSIM_OPT_MARK_ID:
00404       cfg.marker = (tint) opts->value.integer;
00405       break;
00406     default:
00407       /* Illegal index */
00408       return (uta_TDF_ERROR);
00409     }
00410     /* Increment options pointer */
00411     opts++;
00412   }
00413
00414   /* Call the echo simulation processing loop */
00415   ecuAuto_process_loop (&cfg);
00416
00417   /* Return success */
00418   return (uta_NO_ERROR);
00419 }
00420
00421
00422
00423 /******************************************************************************
00424  * FUNCTION PURPOSE: ECU automation ECU file output "OUTPUT" handler function.
00425  ******************************************************************************
00426  * DESCRIPTION: UTA command handler for ECU command "OUTPUT"
00427  *
00428  *  tint ecucmd_output_handler (
00429  *    tint index,     - instance index
00430  *    void *options)  - pointer to array of option:value pairs
00431  *
00432  *****************************************************************************/
00433 tint ecucmd_output_handler (tint index, void *options)
00434 {
00435   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00436   tint i;
00437
00438   /* Index is irrelevant - take output from active channel instance */
00439
00440   /* Disable all file output */
00441   for (i=0; i<ecu_AUTO_NUM_OUTFILES; i++) {
00442     outFile[i].output_data = FALSE;
00443   }
00444
00445   /* UTA option definition structure */
00446   while (opts->id != uta_IDX_NULL) {
00447     /* Switch based on option ID */
00448     switch (opts->id) {
00449     case ecucmd_OUTPUT_OPT_RIN:
00450       outFile[ecu_AUTO_FILE_RIN].output_data  = TRUE;
00451       outFile[ecu_AUTO_FILE_RIN].pcm_format   = (ecuPcm_e) opts->value.integer;
00452       break;
00453     case ecucmd_OUTPUT_OPT_SIN:
00454       outFile[ecu_AUTO_FILE_SIN].output_data  = TRUE;
00455       outFile[ecu_AUTO_FILE_SIN].pcm_format   = (ecuPcm_e) opts->value.integer;
00456       break;
00457     case ecucmd_OUTPUT_OPT_ROUT:
00458       outFile[ecu_AUTO_FILE_ROUT].output_data = TRUE;
00459       outFile[ecu_AUTO_FILE_ROUT].pcm_format  = (ecuPcm_e) opts->value.integer;
00460       break;
00461     case ecucmd_OUTPUT_OPT_SOUT:
00462       outFile[ecu_AUTO_FILE_SOUT].output_data = TRUE;
00463       outFile[ecu_AUTO_FILE_SOUT].pcm_format  = (ecuPcm_e) opts->value.integer;
00464       break;
00465     default:
00466       /* Illegal index */
00467       return (uta_TDF_ERROR);
00468     }
00469     /* Increment options pointer */
00470     opts++;
00471   }
00472
00473   /* Prepare for file output */
00474   ecuAuto_prep_fout ();
00475
00476   /* Return success */
00477   return (uta_NO_ERROR);
00478 }
00479
00480
00481
00482 /******************************************************************************
00483  * FUNCTION PURPOSE: ECU automation get filter "GETFLT" handler function.
00484  ******************************************************************************
00485  * DESCRIPTION: UTA command handler for ECU command "GETFLT"
00486  *
00487  *  tint ecucmd_getflt_handler (
00488  *    tint index,     - Channel instance index
00489  *    void *options)  - pointer to array of option:value pairs
00490  *
00491  *****************************************************************************/
00492 tint ecucmd_getflt_handler (tint index, void *options)
00493 {
00494   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00495   char fname[ecu_AUTO_MAX_STRING];
00496   tint ret_code;
00497   tint filter;
00498
00499   /* Set all defaults */
00500   filter = ecucmd_GETFLT_OPT_FILTER_DEF;
00501
00502   /* UTA option definition structure */
00503   while (opts->id != uta_IDX_NULL) {
00504     /* Switch based on option ID */
00505     switch (opts->id) {
00506     case ecucmd_GETFLT_OPT_FNAME_ID:
00507       strcpy (fname, opts->value.string);
00508       break;
00509     case ecucmd_GETFLT_OPT_FILTER_ID:
00510       filter = (tint) opts->value.integer;
00511       break;
00512     default:
00513       /* Illegal index */
00514       return (uta_TDF_ERROR);
00515     }
00516     /* Increment options pointer */
00517     opts++;
00518   }
00519
00520   /* Perform filter coefficient output */
00521   ret_code = ecuAuto_get_filter (index, filter, fname);
00522   ecu_auto_check_rc (ecu_AUTO_ERR_GETFILTER, ret_code, ecu_AUTO_NOERR);
00523
00524   /* Return success */
00525   return (uta_NO_ERROR);
00526 }
00527
00528 /* nothing past this point */


ECU Test: ecuuta.h File Reference

  • File List
  • Globals

ecuuta.h File Reference

#include <ti/mas/ecu/test/src/ecuauto.h>
#include <ti/mas/types/types.h>
#include <ti/mas/sdk/uta.h>

Include dependency graph for ecuuta.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | ecucmd_AUTO_NUM_CMD 8
#define | ecucmd_NUM_CHNNEW_OPT 2
#define | ecucmd_CHNNEW_OPT_TAIL_ID 0
#define | ecucmd_CHNNEW_OPT_Y2X_ID 1
#define | ecucmd_NUM_OPEN_OPT 5
#define | ecucmd_OPEN_OPT_TAIL_ID 0
#define | ecucmd_OPEN_OPT_Y2X_ID 1
#define | ecucmd_OPEN_OPT_CHIDX_ID 2
#define | ecucmd_OPEN_OPT_FRAME_ID 3
#define | ecucmd_OPEN_OPT_PCM_ID 4
#define | ecucmd_OPEN_OPT_TAIL_DEF ecu_AUTO_DEF_TAIL_LEN
#define | ecucmd_OPEN_OPT_Y2X_DEF ecu_AUTO_DEF_Y2X_DELAY
#define | ecucmd_OPEN_OPT_PCM_DEF ecu_AUTO_DEF_PCM_FORMAT
#define | ecucmd_OPEN_OPT_FRAME_DEF ecu_AUTO_DEF_FRAME_SZ
#define | ecucmd_NUM_CHNCFG_OPT 8
#define | ecucmd_CHNCFG_OPT_HCLEAR_ID 0
#define | ecucmd_CHNCFG_OPT_MINERL_ID 1
#define | ecucmd_CHNCFG_OPT_TAIL_ID 2
#define | ecucmd_CHNCFG_OPT_BYPASS_ID 3
#define | ecucmd_CHNCFG_OPT_NLP_ID 4
#define | ecucmd_CHNCFG_OPT_CNG_ID 5
#define | ecucmd_CHNCFG_OPT_HHOLD_ID 6
#define | ecucmd_CHNCFG_OPT_MINERL_DEF 6
#define | ecucmd_CHNCFG_OPT_RESET_ID 7
#define | ecucmd_CHNCFG_OPT_TAIL_DEF 128
#define | ecucmd_CHNCFG_OPT_BYPASS_DEF FALSE
#define | ecucmd_CHNCFG_OPT_NLP_DEF TRUE
#define | ecucmd_CHNCFG_OPT_CNG_DEF TRUE
#define | ecucmd_CHNCFG_OPT_HHOLD_DEF FALSE
#define | ecucmd_NUM_RUNSIM_OPT 4
#define | ecucmd_RUNSIM_OPT_TIME_ID 0
#define | ecucmd_RUNSIM_OPT_PCM_ID 1
#define | ecucmd_RUNSIM_OPT_NOFOUT_ID 2
#define | ecucmd_RUNSIM_OPT_MARK_ID 3
#define | ecucmd_RUNSIM_OPT_PCM_DEF ecu_AUTO_PCM_ULAW
#define | ecucmd_RUNSIM_OPT_MARK_DEF ecu_AUTO_MRK_NONE
#define | ecucmd_NUM_OUTPUT_OPT 4
#define | ecucmd_OUTPUT_OPT_RIN 0
#define | ecucmd_OUTPUT_OPT_SIN 1
#define | ecucmd_OUTPUT_OPT_ROUT 2
#define | ecucmd_OUTPUT_OPT_SOUT 3
#define | ecucmd_NUM_GETFLT_OPT 2
#define | ecucmd_GETFLT_OPT_FNAME_ID 0
#define | ecucmd_GETFLT_OPT_FILTER_ID 1
#define | ecucmd_GETFLT_OPT_FILTER_DEF ecu_FLT_FOREGROUND

Functions

tint | ecucmd_chnnew_handler (tint index, void *opt_pairs)
tint | ecucmd_chndel_handler (tint index, void *opt_pairs)
tint | ecucmd_open_handler (tint index, void *opt_pairs)
tint | ecucmd_close_handler (tint index, void *opt_pairs)
tint | ecucmd_chncfg_handler (tint index, void *opt_pairs)
tint | ecucmd_runsim_handler (tint index, void *opt_pairs)
tint | ecucmd_output_handler (tint index, void *opt_pairs)
tint | ecucmd_getflt_handler (tint index, void *opt_pairs)

Variables

const utaCommand_t | ecuCommands []
const utaOption_t | ecuChnnewOpts []
const utaOption_t | ecuOpenOpts []
const utaOption_t | ecuChncfgOpts []
const utaOption_t | ecuRunsimOpts []
const utaOption_t | ecuOutputOpts []
const utaOption_t | ecuGetfltOpts []

Define Documentation

#define ecucmd_AUTO_NUM_CMD 8

Definition at line 40 of file ecuuta.h.

Referenced by ecu_auto_addmod_uta().

#define ecucmd_NUM_CHNNEW_OPT 2

Definition at line 43 of file ecuuta.h.

#define ecucmd_CHNNEW_OPT_TAIL_ID 0

Definition at line 44 of file ecuuta.h.

#define ecucmd_CHNNEW_OPT_Y2X_ID 1

Definition at line 45 of file ecuuta.h.

#define ecucmd_NUM_OPEN_OPT 5

Definition at line 48 of file ecuuta.h.

#define ecucmd_OPEN_OPT_TAIL_ID 0

Definition at line 49 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_Y2X_ID 1

Definition at line 50 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_CHIDX_ID 2

Definition at line 51 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_FRAME_ID 3

Definition at line 52 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_PCM_ID 4

Definition at line 53 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_TAIL_DEF ecu_AUTO_DEF_TAIL_LEN

Definition at line 54 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_Y2X_DEF ecu_AUTO_DEF_Y2X_DELAY

Definition at line 55 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_PCM_DEF ecu_AUTO_DEF_PCM_FORMAT

Definition at line 56 of file ecuuta.h.

#define ecucmd_OPEN_OPT_FRAME_DEF ecu_AUTO_DEF_FRAME_SZ

Definition at line 57 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_NUM_CHNCFG_OPT 8

Definition at line 60 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_HCLEAR_ID 0

Definition at line 61 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_MINERL_ID 1

Definition at line 62 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_TAIL_ID 2

Definition at line 63 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_BYPASS_ID 3

Definition at line 64 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_NLP_ID 4

Definition at line 65 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_CNG_ID 5

Definition at line 66 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_HHOLD_ID 6

Definition at line 67 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_MINERL_DEF 6

Definition at line 68 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_RESET_ID 7

Definition at line 69 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_TAIL_DEF 128

Definition at line 70 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_BYPASS_DEF FALSE

Definition at line 71 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_NLP_DEF TRUE

Definition at line 72 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_CNG_DEF TRUE

Definition at line 73 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_HHOLD_DEF FALSE

Definition at line 74 of file ecuuta.h.

#define ecucmd_NUM_RUNSIM_OPT 4

Definition at line 77 of file ecuuta.h.

#define ecucmd_RUNSIM_OPT_TIME_ID 0

Definition at line 78 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_PCM_ID 1

Definition at line 79 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_NOFOUT_ID 2

Definition at line 80 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_MARK_ID 3

Definition at line 81 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_PCM_DEF ecu_AUTO_PCM_ULAW

Definition at line 82 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_MARK_DEF ecu_AUTO_MRK_NONE

Definition at line 83 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_NUM_OUTPUT_OPT 4

Definition at line 86 of file ecuuta.h.

#define ecucmd_OUTPUT_OPT_RIN 0

Definition at line 87 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_OUTPUT_OPT_SIN 1

Definition at line 88 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_OUTPUT_OPT_ROUT 2

Definition at line 89 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_OUTPUT_OPT_SOUT 3

Definition at line 90 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_NUM_GETFLT_OPT 2

Definition at line 93 of file ecuuta.h.

#define ecucmd_GETFLT_OPT_FNAME_ID 0

Definition at line 94 of file ecuuta.h.

Referenced by ecucmd_getflt_handler().

#define ecucmd_GETFLT_OPT_FILTER_ID 1

Definition at line 95 of file ecuuta.h.

Referenced by ecucmd_getflt_handler().

#define ecucmd_GETFLT_OPT_FILTER_DEF ecu_FLT_FOREGROUND

Definition at line 96 of file ecuuta.h.

Referenced by ecucmd_getflt_handler().

Function Documentation

tint ecucmd_chnnew_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 119 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_DEF_INIT_PATTERN, ecu_AUTO_ERR_CREATECHN, ecu_AUTO_NOERR, ecuAuto_create_chn(), ecuMemConfig_t::init_pattern, and ecuMemConfig_t::pre_init_bufs.

Here is the call graph for this function:

tint ecucmd_chndel_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 152 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_DELETECHN, ecu_AUTO_NOERR, and ecuAuto_delete_chn().

Here is the call graph for this function:

tint ecucmd_open_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 176 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_OPENCHN, ecu_AUTO_NOERR, ecu_AUTO_PCM_ALAW, ecu_AUTO_SAMP_PER_MS, ecuAuto_open_chn(), ecucmd_OPEN_OPT_CHIDX_ID, ecucmd_OPEN_OPT_FRAME_DEF, ecucmd_OPEN_OPT_FRAME_ID, ecucmd_OPEN_OPT_PCM_ID, ecucmd_OPEN_OPT_TAIL_DEF, ecucmd_OPEN_OPT_TAIL_ID, ecucmd_OPEN_OPT_Y2X_DEF, and ecucmd_OPEN_OPT_Y2X_ID.

Here is the call graph for this function:

tint ecucmd_close_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 258 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_OPENCHN, ecu_AUTO_NOERR, and ecuAuto_close_chn().

Here is the call graph for this function:

tint ecucmd_chncfg_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 282 of file ecuuta.c.

References ecuChnConfig_t::bypass, ecu_AUTO_CHCFG_BYP_VALID, ecu_AUTO_CHCFG_CLR_VALID, ecu_AUTO_CHCFG_ERL_VALID, ecu_AUTO_CHCFG_HLD_VALID, ecu_AUTO_CHCFG_NLP_VALID, ecu_auto_check_rc(), ecu_AUTO_ERL_0DB, ecu_AUTO_ERL_3DB, ecu_AUTO_ERL_6DB, ecu_AUTO_ERR_CONFIGCHN, ecu_AUTO_NLP_CNG_ON, ecu_AUTO_NLP_OFF, ecu_AUTO_NLP_ON, ecu_AUTO_NOERR, ecuAuto_config_chn(), ecucmd_CHNCFG_OPT_BYPASS_ID, ecucmd_CHNCFG_OPT_CNG_ID, ecucmd_CHNCFG_OPT_HCLEAR_ID, ecucmd_CHNCFG_OPT_HHOLD_ID, ecucmd_CHNCFG_OPT_MINERL_ID, ecucmd_CHNCFG_OPT_NLP_ID, ecucmd_CHNCFG_OPT_RESET_ID, ecucmd_CHNCFG_OPT_TAIL_ID, ecuChnConfig_t::hreg_clear, ecuChnConfig_t::hreg_hold, ecuChnConfig_t::min_erl, ecuChnConfig_t::nlp_mode, and ecuChnConfig_t::valid_bitfield.

Here is the call graph for this function:

tint ecucmd_runsim_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 378 of file ecuuta.c.

References ecuAutoLoopCfg_t::chn_index, ecuAuto_process_loop(), ecucmd_RUNSIM_OPT_MARK_DEF, ecucmd_RUNSIM_OPT_MARK_ID, ecucmd_RUNSIM_OPT_NOFOUT_ID, ecucmd_RUNSIM_OPT_PCM_DEF, ecucmd_RUNSIM_OPT_PCM_ID, ecucmd_RUNSIM_OPT_TIME_ID, ecuAutoLoopCfg_t::enable_out, ecuAutoLoopCfg_t::marker, ecuAutoLoopCfg_t::pcm_format, and ecuAutoLoopCfg_t::time_ms.

Here is the call graph for this function:

tint ecucmd_output_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 433 of file ecuuta.c.

References ecu_AUTO_FILE_RIN, ecu_AUTO_FILE_ROUT, ecu_AUTO_FILE_SIN, ecu_AUTO_FILE_SOUT, ecu_AUTO_NUM_OUTFILES, ecucmd_OUTPUT_OPT_RIN, ecucmd_OUTPUT_OPT_ROUT, ecucmd_OUTPUT_OPT_SIN, ecucmd_OUTPUT_OPT_SOUT, outFile, ecuAutoFout_t::output_data, and ecuAutoFout_t::pcm_format.

tint ecucmd_getflt_handler | ( | tint | index,
 |  | void * | opt_pairs
 | ) |  |

Definition at line 492 of file ecuuta.c.

References ecu_auto_check_rc(), ecu_AUTO_ERR_GETFILTER, ecu_AUTO_MAX_STRING, ecu_AUTO_NOERR, ecuAuto_get_filter(), ecucmd_GETFLT_OPT_FILTER_DEF, ecucmd_GETFLT_OPT_FILTER_ID, and ecucmd_GETFLT_OPT_FNAME_ID.

Here is the call graph for this function:

Variable Documentation

const utaCommand_t ecuCommands[]

Definition at line 20 of file ecuuta.c.

Referenced by ecu_auto_addmod_uta().

const utaOption_t ecuChnnewOpts[]

Definition at line 59 of file ecuuta.c.

const utaOption_t ecuOpenOpts[]

Definition at line 65 of file ecuuta.c.

const utaOption_t ecuChncfgOpts[]

Definition at line 74 of file ecuuta.c.

const utaOption_t ecuRunsimOpts[]

Definition at line 86 of file ecuuta.c.

const utaOption_t ecuOutputOpts[]

Definition at line 94 of file ecuuta.c.

const utaOption_t ecuGetfltOpts[]

Definition at line 102 of file ecuuta.c.


ECU Test: ecuuta.h Source File

  • File List
  • Globals

ecuuta.h

Go to the documentation of this file.
00001 #ifndef _ECUUTA_H
00002 #define _ECUUTA_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Internal definitions and prototypes for ECU automation.
00005  ******************************************************************************
00006  * FILE NAME:   ecuuta.h
00007  *
00008  * DESCRIPTION: Contains internal definitions and function prototypes for
00009  *              ECU automation via UTA.
00010  *
00011  * (C) Copyright 2009 Texas Instruments, Inc.
00012  *****************************************************************************/
00013
00014 #include <ti/mas/ecu/test/src/ecuauto.h>
00015 #include <ti/mas/types/types.h>
00016 #include <ti/mas/sdk/uta.h>
00017
00018
00019 /* ECU command table and options */
00020 extern const utaCommand_t ecuCommands[];
00021 extern const utaOption_t ecuChnnewOpts[];
00022 extern const utaOption_t ecuOpenOpts[];
00023 extern const utaOption_t ecuChncfgOpts[];
00024 extern const utaOption_t ecuRunsimOpts[];
00025 extern const utaOption_t ecuOutputOpts[];
00026 extern const utaOption_t ecuGetfltOpts[];
00027
00028 /* ECU command handler prototypes */
00029 tint ecucmd_chnnew_handler (tint index, void *opt_pairs);
00030 tint ecucmd_chndel_handler (tint index, void *opt_pairs);
00031 tint ecucmd_open_handler   (tint index, void *opt_pairs);
00032 tint ecucmd_close_handler  (tint index, void *opt_pairs);
00033 tint ecucmd_chncfg_handler (tint index, void *opt_pairs);
00034 tint ecucmd_runsim_handler (tint index, void *opt_pairs);
00035 tint ecucmd_output_handler (tint index, void *opt_pairs);
00036 tint ecucmd_getflt_handler (tint index, void *opt_pairs);
00037
00038
00039 /* Main ECU defines for UTA */
00040 #define ecucmd_AUTO_NUM_CMD                 8
00041
00042 /* Channel creation (CHNNEW) defines */
00043 #define ecucmd_NUM_CHNNEW_OPT               2
00044 #define ecucmd_CHNNEW_OPT_TAIL_ID           0
00045 #define ecucmd_CHNNEW_OPT_Y2X_ID            1
00046
00047 /* Channel open (OPEN) defines */
00048 #define ecucmd_NUM_OPEN_OPT                 5
00049 #define ecucmd_OPEN_OPT_TAIL_ID             0
00050 #define ecucmd_OPEN_OPT_Y2X_ID              1
00051 #define ecucmd_OPEN_OPT_CHIDX_ID            2
00052 #define ecucmd_OPEN_OPT_FRAME_ID            3
00053 #define ecucmd_OPEN_OPT_PCM_ID              4
00054 #define ecucmd_OPEN_OPT_TAIL_DEF            ecu_AUTO_DEF_TAIL_LEN
00055 #define ecucmd_OPEN_OPT_Y2X_DEF             ecu_AUTO_DEF_Y2X_DELAY
00056 #define ecucmd_OPEN_OPT_PCM_DEF             ecu_AUTO_DEF_PCM_FORMAT
00057 #define ecucmd_OPEN_OPT_FRAME_DEF           ecu_AUTO_DEF_FRAME_SZ
00058
00059 /* Channel config (CHNCFG) defines */
00060 #define ecucmd_NUM_CHNCFG_OPT               8
00061 #define ecucmd_CHNCFG_OPT_HCLEAR_ID         0
00062 #define ecucmd_CHNCFG_OPT_MINERL_ID         1
00063 #define ecucmd_CHNCFG_OPT_TAIL_ID           2
00064 #define ecucmd_CHNCFG_OPT_BYPASS_ID         3
00065 #define ecucmd_CHNCFG_OPT_NLP_ID            4
00066 #define ecucmd_CHNCFG_OPT_CNG_ID            5
00067 #define ecucmd_CHNCFG_OPT_HHOLD_ID          6
00068 #define ecucmd_CHNCFG_OPT_MINERL_DEF        6
00069 #define ecucmd_CHNCFG_OPT_RESET_ID          7
00070 #define ecucmd_CHNCFG_OPT_TAIL_DEF        128
00071 #define ecucmd_CHNCFG_OPT_BYPASS_DEF        FALSE
00072 #define ecucmd_CHNCFG_OPT_NLP_DEF           TRUE
00073 #define ecucmd_CHNCFG_OPT_CNG_DEF           TRUE
00074 #define ecucmd_CHNCFG_OPT_HHOLD_DEF         FALSE
00075
00076 /* ECU automation (RUNSIM) defines */
00077 #define ecucmd_NUM_RUNSIM_OPT               4
00078 #define ecucmd_RUNSIM_OPT_TIME_ID           0
00079 #define ecucmd_RUNSIM_OPT_PCM_ID            1
00080 #define ecucmd_RUNSIM_OPT_NOFOUT_ID         2
00081 #define ecucmd_RUNSIM_OPT_MARK_ID           3
00082 #define ecucmd_RUNSIM_OPT_PCM_DEF           ecu_AUTO_PCM_ULAW
00083 #define ecucmd_RUNSIM_OPT_MARK_DEF          ecu_AUTO_MRK_NONE
00084
00085 /* File output (OUTPUT) defines */
00086 #define ecucmd_NUM_OUTPUT_OPT               4
00087 #define ecucmd_OUTPUT_OPT_RIN               0
00088 #define ecucmd_OUTPUT_OPT_SIN               1
00089 #define ecucmd_OUTPUT_OPT_ROUT              2
00090 #define ecucmd_OUTPUT_OPT_SOUT              3
00091
00092 /* Filter output (GETFLT) defines */
00093 #define ecucmd_NUM_GETFLT_OPT               2
00094 #define ecucmd_GETFLT_OPT_FNAME_ID          0
00095 #define ecucmd_GETFLT_OPT_FILTER_ID         1
00096 #define ecucmd_GETFLT_OPT_FILTER_DEF        ecu_FLT_FOREGROUND
00097
00098 #endif  /* _ECUUTA_H */
00099 /* nothing past this point */


ECU Test: File Index

  • File List
  • Globals

ECU Test File List

Here is a list of all files with brief descriptions:
cheap.c [code]
cheap.h [code]
doxygen.h [code]
ecmemdef.c [code]
ecuauto.c [code]
ecuauto.h [code]
ecuautoport.h [code]
ecufio.c [code]
ecufio.h [code]
ecuiram.c [code]
ecuiram.h [code]
ecumem.c [code]
ecumem.h [code]
ecuprof.c [code]
ecuprof.h [code]
ecusim.c [code]
ecusim.h [code]
ecusimfunc.c [code]
ecusimport.h [code]
ecuuta.c [code]
ecuuta.h [code]
piu.c [code]
piu.h [code]
piuexpan.c [code]
piufutil.c [code]
piuinit.c [code]
piuisr.c [code]
piuloc.h [code]
piuport.h [code]
piutxrx.c [code]
siu.c [code]
siu.h [code]
siuloc.h [code]
siumgr.c [code]
siuport.h [code]
siutx.c [code]
vctypes.h [code]
vheap.c [code]
vheap.h [code]


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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 -

  • amp1 : siuSGNPars_t
  • amp2 : siuSGNPars_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- l -

  • law : piuCompandingCfg_t
  • loopback_select : piuControl_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- m -

  • marker : ecuAutoLoopCfg_t
  • max_pcm_val : piuContext_t , piuConfig_t
  • max_samples_per_segment : piuSizeConfig_t
  • min_erl : ecuChnConfig_t
  • mode : siuSlimInst_t
  • mode_bitfield : piuInst_s


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- n -

  • ncoeff : siuGetFlt_t
  • nlevel : siuSGNPars_t
  • nlp_mode : ecuChnConfig_t
  • nseed : siuSGNPars_t
  • ntype : siuSGNPars_t
  • num_channel : siuSetup_s
  • num_sample : siuSGNPars_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- o -

  • out_ptr : receive_in_buf_t
  • output_chnum : siuSetup_s
  • output_data : ecuAutoFout_t
  • output_flush : ecuAutoFout_t
  • output_mark : ecuAutoFout_t
  • output_rin : ecuAutoConfig_t
  • output_rout : ecuAutoConfig_t
  • output_sin : ecuAutoConfig_t
  • output_sout : ecuAutoConfig_t
  • overhead : ecuProfile_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- b -

  • base : ecuMemHeap_t
  • bid_silence_detect : piuControl_t
  • bidSilence : piuInst_s
  • buf : ecuAutoFout_t
  • bypass : ecuChnConfig_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- c -

  • cache_enable : ecuAutoConfig_t
  • cache_flush : ecuAutoConfig_t
  • cheap : siuContext_t
  • cheap_used : siuContext_t , siuInst_t
  • chn_index : ecuAutoLoopCfg_t
  • clock_mul : siuSetup_s
  • cnt : piuPcmPatternDetect_t , bidSilenceCtrl_t
  • companding : piuControl_t , piuConfig_t
  • companding_law : siuInst_t , siuConfig_t
  • context : piuNewConfig_t
  • core_heap : siuConfig_t
  • ctl_code : piuControl_t
  • custom : piuPcmPatternDetect_t , pcmPatternDet_t
  • cycles : ecuProfile_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- d -

  • dc_offset_removal_select : piuControl_t
  • dcoffset : siuSGNPars_t
  • debug : siuContext_t , siuInst_t , siuConfig_t
  • debugInfo : piuContext_t
  • delay : siuSGNPars_t
  • dss_output : ecuAutoConfig_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- e -

  • ecu_bg_e_ptr : iramSeg_t
  • ecu_bg_filter_ptr : iramSeg_t
  • ecu_bg_work_ptr : iramSeg_t
  • ecu_fg_filter_ptr : iramSeg_t
  • ecu_filter_length : siuSetup_s
  • ecu_fltseg_length : siuSetup_s
  • ecu_num_fltseg : siuSetup_s
  • ecu_y2x_delay : siuSetup_s
  • ecuCtl : siuSetup_s
  • ecuInst : siuInst_t
  • enable : pcmPatternDet_t , pcmPatternGen_t , bidSilenceDet_t
  • enable_out : ecuAutoLoopCfg_t
  • enabled : siuTxInst_t , ecuProfile_t
  • end_ptr : receive_in_buf_t
  • energy_DClevel : piuInst_s
  • eof : ecuSimFileIo_t
  • error_id : siuSetup_s
  • exception : siuContext_t , siuInst_t , siuConfig_t
  • exec : siuSetup_s


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- f -

  • f1 : siuSGNPars_t
  • f2 : siuSGNPars_t
  • fcn : siuTxSendOut_t
  • file_type : ecuAutoFout_t
  • fio : ecuSimFileIo_t
  • fname : ecuSimFileIo_t , ecuAutoFout_t
  • fptr : ecuAutoFout_t , ecuProfile_t , ecuSimFileIo_t
  • frame_size : piuControl_t , setFrame_t , siuSetup_s
  • freerun_frame_cnt : siuSetup_s
  • Fs : siuSetup_s


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- g -

  • generatePattern : piuInst_s
  • get_filter : ecuAutoConfig_t
  • getflt : siuSetup_s


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- h -

  • hangover : bidSilenceDet_t
  • hold_buf : ecuAutoFout_t
  • hold_buf_sz : ecuAutoFout_t
  • hold_count : ecuAutoFout_t
  • hoth_seed : siuSGNPars_t
  • hreg_clear : ecuChnConfig_t
  • hreg_hold : ecuChnConfig_t
  • hyb_filter_length : siuSetup_s
  • hybCtl : siuSetup_s


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- i -

  • ID : piuNewConfig_t , siuInst_t , piuInst_s , siuConfig_t , siuContext_t
  • in_ptr : receive_in_buf_t
  • indx : ecuMemHeap_t
  • init_pattern : ecuMemConfig_t
  • initCnt : bidSilenceCtrl_t , piuPcmPatternDetect_t
  • iteration : ecuAutoConfig_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- p -

  • pattern : pcmPatternGen_t
  • pattern_detect : piuControl_t
  • pattern_generate : piuControl_t
  • pcm_bits : siuConfig_t , siuInst_t , siuSetup_s
  • pcm_expand_table : piuInst_s , piuCompandingCfg_t
  • pcm_format : ecuAutoFout_t , siuSetup_s , piuInst_s , ecuAutoLoopCfg_t
  • pcm_hold_sz : ecuAutoConfig_t
  • pcmout_fcn : ecuAutoFout_t
  • pcmPattern : piuInst_s
  • pcmSampleTrace : piuContext_t
  • piu_ecu_receive_ptr : iramSeg_t
  • piuCtl : siuSetup_s
  • piuInst : siuInst_t
  • pow_level : siuSGNPars_t
  • pre_init_bufs : ecuMemConfig_t
  • profile_enable : siuSetup_s


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- r -

  • receive_in_buf : setFrame_t , piuInst_s
  • receive_out : piuStats_t
  • receive_out_buf : piuInst_s
  • receive_out_buf_ptr : piuInst_s
  • receive_out_mean : piuStats_t
  • recv_frame_length : siuTxConfig_t , siuTxInst_t
  • recv_frame_ptr : siuTxInst_t
  • reportOutFcn : piuContext_t
  • reportOutTargetInst : piuInst_s , piuConfig_t
  • reset : siuSGNPars_t
  • retstat : siuGetFlt_t
  • rin : siuSetup_s
  • rout : siuSetup_s
  • rx_delay : piuInst_s , piuConfig_t
  • rx_overflow_cnt : piuInst_s
  • rx_triple_buffering : piuSizeConfig_t
  • rx_underflow_cnt : piuInst_s
  • rxDClevel : piuEnergyDCLevel_t
  • rxEnergy : piuEnergyDCLevel_t
  • rxSGN : siuSetup_s
  • rxSilDetEnergy : bidSilenceCtrl_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- s -

  • sample_bp : ecuAutoConfig_t
  • sample_cnt : siuSetup_s , ecuAutoConfig_t
  • save_to_file : siuSetup_s
  • sdram_addr : siuSGNPars_t
  • second_cnt : ecuAutoConfig_t
  • segment_count : receive_in_buf_t
  • segment_size : piuConfig_t , piuInst_s
  • select : siuGetFlt_t
  • send_frame_length : siuTxConfig_t , siuTxInst_t
  • send_frame_ptr : siuTxInst_t
  • send_out : piuStats_t
  • send_out_buf : setFrame_t , piuInst_s
  • send_out_buf_ptr : piuInst_s
  • send_out_mean : piuStats_t
  • sendOutIsrFcn : piuContext_t
  • sendOutIsrTargetInst : piuInst_s , piuConfig_t
  • sendOutProcFcn : piuContext_t
  • sendOutProcTargetInst : piuInst_s , piuConfig_t
  • set_frame : piuControl_t
  • sig_src : siuSetup_s
  • sign : siuSlimInst_t
  • silence_pattern : piuInst_s
  • sin : siuSetup_s
  • size : ecuMemHeap_t
  • sizeCfg : piuNewConfig_t
  • slmInst : siuInst_t
  • sout : siuSetup_s
  • start : siuGetFlt_t
  • start_cnt : ecuProfile_t
  • start_ptr : receive_in_buf_t
  • state : piuInst_s , siuSGNPars_t
  • stats : piuControl_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- t -

  • targetInst : siuTxSendOut_t
  • thresh_idx : siuSlimInst_t
  • threshold : bidSilenceDet_t , bidSilenceCtrl_t
  • time : pcmPatternDet_t
  • time_ms : ecuAutoLoopCfg_t
  • toggle_ecu : siuSetup_s
  • toggle_freerun : siuSetup_s
  • toggle_getflt : siuSetup_s
  • toggle_hyb : siuSetup_s
  • toggle_piu : siuSetup_s
  • toggle_rx_sg : siuSetup_s
  • toggle_tx_sg : siuSetup_s
  • top_ptr : receive_in_buf_t
  • transp_mode : piuConfig_t
  • txDClevel : piuEnergyDCLevel_t
  • txEnergy : piuEnergyDCLevel_t
  • TxInst : siuInst_t
  • TxSendOut : siuTxInst_t , siuTxConfig_t
  • txSGN : siuSetup_s
  • txSilDetEnergy : bidSilenceCtrl_t
  • type : piuPcmPatternDetect_t , pcmPatternDet_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- u -

  • u : piuControl_t
  • underrun : piuStats_t
  • use_cache : ecuProfile_t
  • use_recv_out_buf : piuConfig_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- v -

  • valid_bitfield : ecuChnConfig_t
  • verbose_print : ecuAutoConfig_t
  • vheap : siuContext_t
  • vheap_used : siuContext_t , siuInst_t
  • voice_heap : siuConfig_t


ECU Test: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • 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:

- w -

  • wftype : siuSGNPars_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • amp1 : siuSGNPars_t
  • amp2 : siuSGNPars_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- l -

  • law : piuCompandingCfg_t
  • loopback_select : piuControl_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- m -

  • marker : ecuAutoLoopCfg_t
  • max_pcm_val : piuContext_t , piuConfig_t
  • max_samples_per_segment : piuSizeConfig_t
  • min_erl : ecuChnConfig_t
  • mode : siuSlimInst_t
  • mode_bitfield : piuInst_s


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- n -

  • ncoeff : siuGetFlt_t
  • nlevel : siuSGNPars_t
  • nlp_mode : ecuChnConfig_t
  • nseed : siuSGNPars_t
  • ntype : siuSGNPars_t
  • num_channel : siuSetup_s
  • num_sample : siuSGNPars_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- o -

  • out_ptr : receive_in_buf_t
  • output_chnum : siuSetup_s
  • output_data : ecuAutoFout_t
  • output_flush : ecuAutoFout_t
  • output_mark : ecuAutoFout_t
  • output_rin : ecuAutoConfig_t
  • output_rout : ecuAutoConfig_t
  • output_sin : ecuAutoConfig_t
  • output_sout : ecuAutoConfig_t
  • overhead : ecuProfile_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- b -

  • base : ecuMemHeap_t
  • bid_silence_detect : piuControl_t
  • bidSilence : piuInst_s
  • buf : ecuAutoFout_t
  • bypass : ecuChnConfig_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- c -

  • cache_enable : ecuAutoConfig_t
  • cache_flush : ecuAutoConfig_t
  • cheap : siuContext_t
  • cheap_used : siuContext_t , siuInst_t
  • chn_index : ecuAutoLoopCfg_t
  • clock_mul : siuSetup_s
  • cnt : piuPcmPatternDetect_t , bidSilenceCtrl_t
  • companding : piuControl_t , piuConfig_t
  • companding_law : siuInst_t , siuConfig_t
  • context : piuNewConfig_t
  • core_heap : siuConfig_t
  • ctl_code : piuControl_t
  • custom : piuPcmPatternDetect_t , pcmPatternDet_t
  • cycles : ecuProfile_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- d -

  • dc_offset_removal_select : piuControl_t
  • dcoffset : siuSGNPars_t
  • debug : siuContext_t , siuInst_t , siuConfig_t
  • debugInfo : piuContext_t
  • delay : siuSGNPars_t
  • dss_output : ecuAutoConfig_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- e -

  • ecu_bg_e_ptr : iramSeg_t
  • ecu_bg_filter_ptr : iramSeg_t
  • ecu_bg_work_ptr : iramSeg_t
  • ecu_fg_filter_ptr : iramSeg_t
  • ecu_filter_length : siuSetup_s
  • ecu_fltseg_length : siuSetup_s
  • ecu_num_fltseg : siuSetup_s
  • ecu_y2x_delay : siuSetup_s
  • ecuCtl : siuSetup_s
  • ecuInst : siuInst_t
  • enable : pcmPatternDet_t , pcmPatternGen_t , bidSilenceDet_t
  • enable_out : ecuAutoLoopCfg_t
  • enabled : siuTxInst_t , ecuProfile_t
  • end_ptr : receive_in_buf_t
  • energy_DClevel : piuInst_s
  • eof : ecuSimFileIo_t
  • error_id : siuSetup_s
  • exception : siuContext_t , siuInst_t , siuConfig_t
  • exec : siuSetup_s


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- f -

  • f1 : siuSGNPars_t
  • f2 : siuSGNPars_t
  • fcn : siuTxSendOut_t
  • file_type : ecuAutoFout_t
  • fio : ecuSimFileIo_t
  • fname : ecuSimFileIo_t , ecuAutoFout_t
  • fptr : ecuAutoFout_t , ecuProfile_t , ecuSimFileIo_t
  • frame_size : piuControl_t , setFrame_t , siuSetup_s
  • freerun_frame_cnt : siuSetup_s
  • Fs : siuSetup_s


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- g -

  • generatePattern : piuInst_s
  • get_filter : ecuAutoConfig_t
  • getflt : siuSetup_s


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- h -

  • hangover : bidSilenceDet_t
  • hold_buf : ecuAutoFout_t
  • hold_buf_sz : ecuAutoFout_t
  • hold_count : ecuAutoFout_t
  • hoth_seed : siuSGNPars_t
  • hreg_clear : ecuChnConfig_t
  • hreg_hold : ecuChnConfig_t
  • hyb_filter_length : siuSetup_s
  • hybCtl : siuSetup_s


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- i -

  • ID : piuNewConfig_t , siuInst_t , piuInst_s , siuConfig_t , siuContext_t
  • in_ptr : receive_in_buf_t
  • indx : ecuMemHeap_t
  • init_pattern : ecuMemConfig_t
  • initCnt : bidSilenceCtrl_t , piuPcmPatternDetect_t
  • iteration : ecuAutoConfig_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- p -

  • pattern : pcmPatternGen_t
  • pattern_detect : piuControl_t
  • pattern_generate : piuControl_t
  • pcm_bits : siuConfig_t , siuInst_t , siuSetup_s
  • pcm_expand_table : piuInst_s , piuCompandingCfg_t
  • pcm_format : ecuAutoFout_t , siuSetup_s , piuInst_s , ecuAutoLoopCfg_t
  • pcm_hold_sz : ecuAutoConfig_t
  • pcmout_fcn : ecuAutoFout_t
  • pcmPattern : piuInst_s
  • pcmSampleTrace : piuContext_t
  • piu_ecu_receive_ptr : iramSeg_t
  • piuCtl : siuSetup_s
  • piuInst : siuInst_t
  • pow_level : siuSGNPars_t
  • pre_init_bufs : ecuMemConfig_t
  • profile_enable : siuSetup_s


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- r -

  • receive_in_buf : setFrame_t , piuInst_s
  • receive_out : piuStats_t
  • receive_out_buf : piuInst_s
  • receive_out_buf_ptr : piuInst_s
  • receive_out_mean : piuStats_t
  • recv_frame_length : siuTxConfig_t , siuTxInst_t
  • recv_frame_ptr : siuTxInst_t
  • reportOutFcn : piuContext_t
  • reportOutTargetInst : piuInst_s , piuConfig_t
  • reset : siuSGNPars_t
  • retstat : siuGetFlt_t
  • rin : siuSetup_s
  • rout : siuSetup_s
  • rx_delay : piuInst_s , piuConfig_t
  • rx_overflow_cnt : piuInst_s
  • rx_triple_buffering : piuSizeConfig_t
  • rx_underflow_cnt : piuInst_s
  • rxDClevel : piuEnergyDCLevel_t
  • rxEnergy : piuEnergyDCLevel_t
  • rxSGN : siuSetup_s
  • rxSilDetEnergy : bidSilenceCtrl_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- s -

  • sample_bp : ecuAutoConfig_t
  • sample_cnt : siuSetup_s , ecuAutoConfig_t
  • save_to_file : siuSetup_s
  • sdram_addr : siuSGNPars_t
  • second_cnt : ecuAutoConfig_t
  • segment_count : receive_in_buf_t
  • segment_size : piuConfig_t , piuInst_s
  • select : siuGetFlt_t
  • send_frame_length : siuTxConfig_t , siuTxInst_t
  • send_frame_ptr : siuTxInst_t
  • send_out : piuStats_t
  • send_out_buf : setFrame_t , piuInst_s
  • send_out_buf_ptr : piuInst_s
  • send_out_mean : piuStats_t
  • sendOutIsrFcn : piuContext_t
  • sendOutIsrTargetInst : piuInst_s , piuConfig_t
  • sendOutProcFcn : piuContext_t
  • sendOutProcTargetInst : piuInst_s , piuConfig_t
  • set_frame : piuControl_t
  • sig_src : siuSetup_s
  • sign : siuSlimInst_t
  • silence_pattern : piuInst_s
  • sin : siuSetup_s
  • size : ecuMemHeap_t
  • sizeCfg : piuNewConfig_t
  • slmInst : siuInst_t
  • sout : siuSetup_s
  • start : siuGetFlt_t
  • start_cnt : ecuProfile_t
  • start_ptr : receive_in_buf_t
  • state : piuInst_s , siuSGNPars_t
  • stats : piuControl_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- t -

  • targetInst : siuTxSendOut_t
  • thresh_idx : siuSlimInst_t
  • threshold : bidSilenceDet_t , bidSilenceCtrl_t
  • time : pcmPatternDet_t
  • time_ms : ecuAutoLoopCfg_t
  • toggle_ecu : siuSetup_s
  • toggle_freerun : siuSetup_s
  • toggle_getflt : siuSetup_s
  • toggle_hyb : siuSetup_s
  • toggle_piu : siuSetup_s
  • toggle_rx_sg : siuSetup_s
  • toggle_tx_sg : siuSetup_s
  • top_ptr : receive_in_buf_t
  • transp_mode : piuConfig_t
  • txDClevel : piuEnergyDCLevel_t
  • txEnergy : piuEnergyDCLevel_t
  • TxInst : siuInst_t
  • TxSendOut : siuTxInst_t , siuTxConfig_t
  • txSGN : siuSetup_s
  • txSilDetEnergy : bidSilenceCtrl_t
  • type : piuPcmPatternDetect_t , pcmPatternDet_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- u -

  • u : piuControl_t
  • underrun : piuStats_t
  • use_cache : ecuProfile_t
  • use_recv_out_buf : piuConfig_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- v -

  • valid_bitfield : ecuChnConfig_t
  • verbose_print : ecuAutoConfig_t
  • vheap : siuContext_t
  • vheap_used : siuContext_t , siuInst_t
  • voice_heap : siuConfig_t


ECU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- w -

  • wftype : siuSGNPars_t


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- _ -

  • __SIUSTR : siuloc.h
  • _ECUAUTOPORT_C54 : ecuautoport.h
  • _ECUAUTOPORT_C54F : ecuautoport.h
  • _ECUAUTOPORT_C55 : ecuautoport.h
  • _ECUAUTOPORT_C55L : ecuautoport.h
  • _ECUAUTOPORT_C64 : ecuautoport.h
  • _ECUAUTOPORT_C64_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_C64P : ecuautoport.h
  • _ECUAUTOPORT_C64P_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_C66 : ecuautoport.h
  • _ECUAUTOPORT_C66_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_ELF_C64P : ecuautoport.h
  • _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_ELF_C66 : ecuautoport.h
  • _ECUAUTOPORT_ELF_C66_BIG_ENDIAN : ecuautoport.h
  • _ECUSIM_PIU_PORT_C54 : piuport.h
  • _ECUSIM_PIU_PORT_C54F : piuport.h
  • _ECUSIM_PIU_PORT_C55 : piuport.h
  • _ECUSIM_PIU_PORT_C55L : piuport.h
  • _ECUSIM_PIU_PORT_C64 : piuport.h
  • _ECUSIM_PIU_PORT_C64_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_C64P : piuport.h
  • _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_C66 : piuport.h
  • _ECUSIM_PIU_PORT_C66_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C64P : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C66 : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN : piuport.h
  • _ECUSIMPORT_C54 : ecusimport.h
  • _ECUSIMPORT_C54F : ecusimport.h
  • _ECUSIMPORT_C55 : ecusimport.h
  • _ECUSIMPORT_C55L : ecusimport.h
  • _ECUSIMPORT_C64 : ecusimport.h
  • _ECUSIMPORT_C64_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_C64P : ecusimport.h
  • _ECUSIMPORT_C64P_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_C66 : ecusimport.h
  • _ECUSIMPORT_C66_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_ELF_C64P : ecusimport.h
  • _ECUSIMPORT_ELF_C64P_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_ELF_C66 : ecusimport.h
  • _ECUSIMPORT_ELF_C66_BIG_ENDIAN : ecusimport.h
  • _SIUSTR : siuloc.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- l -

  • lec_auto_initialize() : ecuauto.c , ecuauto.h
  • LIN_LOOPBACK_ON : piu.h
  • loop : siutx.c , siu.c
  • LOOPBACK_OFF : piu.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- m -

  • main() : ecuauto.c , ecusim.c
  • markBuffer : ecuauto.c
  • MAX_HYB_FILTER_LEN : ecusim.h
  • MAX_HYB_RX_DELAY : ecusim.h
  • MAX_HYB_SAMPLES_PER_FRAME : ecusim.h
  • MAX_HYB_TX_DELAY : ecusim.h
  • MAX_HYBSEG_LENGTH : ecusim.h
  • MAX_STREAM_SIZE : ecusim.h
  • MIPS_AGENT_CTRL : ecusimfunc.c
  • MIPS_AGENT_EVENT_CHSTATE : ecusimfunc.c
  • MIPS_AGENT_EVENT_CODEC : ecusimfunc.c
  • MIPS_AGENT_EVENT_ECU : ecusimfunc.c
  • mucmpr() : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- n -

  • NUMBER_OF_FRAMES : ecusim.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- o -

  • outFile : ecuauto.c , ecuauto.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- a -

  • acmpr() : ecusimfunc.c
  • autoBreak : ecuauto.c
  • autoCfg : ecuauto.c
  • AutoDssFileType : ecuauto.c
  • AutoDssMemAddr : ecuauto.c
  • AutoDssMemCount : ecuauto.c
  • AutoDssPcmFormat : ecuauto.c
  • autoErrorId : ecuauto.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- b -

  • BIAS : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- c -

  • convert_tx_tone_frame() : ecusim.c , ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- d -

  • DATA_FLOW_DISABLE : piu.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- e -

  • ecu_03DB_ENABLE : ecuautoport.h , ecusimport.h
  • ecu_5P5MS_FRAME_ENABLE : ecuautoport.h , ecusimport.h
  • ecu_auto_addmod_uta() : ecuauto.c , ecuauto.h
  • ecu_auto_banner_print() : ecuauto.c
  • ecu_AUTO_CHCFG_BYP_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_CLR_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_ERL_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_HLD_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_NLP_VALID : ecuauto.h
  • ecu_auto_check_rc() : ecuauto.c , ecuauto.h
  • ecu_auto_close_fout() : ecuauto.c , ecuauto.h
  • ecu_auto_compand() : ecuauto.c , ecuauto.h
  • ecu_auto_create_hyb() : ecuauto.c , ecuauto.h
  • ecu_auto_create_sgn() : ecuauto.c , ecuauto.h
  • ecu_auto_create_uta() : ecuauto.c , ecuauto.h
  • ecu_AUTO_DEF_FRAME_SZ : ecuauto.h
  • ecu_AUTO_DEF_FS : ecuauto.h
  • ecu_AUTO_DEF_GETFLT_BSIZE : ecuauto.h
  • ecu_AUTO_DEF_GETFLT_FNAME : ecuauto.h
  • ecu_AUTO_DEF_HYB_DELAY : ecuauto.h
  • ecu_AUTO_DEF_HYB_ERL : ecuauto.h
  • ecu_AUTO_DEF_HYB_ID : ecuauto.h
  • ecu_AUTO_DEF_HYB_MODEL : ecuauto.h
  • ecu_AUTO_DEF_HYB_RX_DELAY : ecuauto.h
  • ecu_AUTO_DEF_HYB_TX_DELAY : ecuauto.h
  • ecu_AUTO_DEF_INIT_PATTERN : ecuauto.h
  • ecu_AUTO_DEF_MIN_ERL : ecuauto.h
  • ecu_AUTO_DEF_NLP_MODE : ecuauto.h
  • ecu_AUTO_DEF_PCM_FORMAT : ecuauto.h
  • ecu_AUTO_DEF_PCM_HOLD_BSIZE : ecuauto.h
  • ecu_AUTO_DEF_RIN_FNAME : ecuauto.h
  • ecu_AUTO_DEF_ROUT_FNAME : ecuauto.h
  • ecu_AUTO_DEF_SGN_AMP1 : ecuauto.h
  • ecu_AUTO_DEF_SGN_DCOFF : ecuauto.h
  • ecu_AUTO_DEF_SGN_DELAY : ecuauto.h
  • ecu_AUTO_DEF_SGN_FREQ1 : ecuauto.h
  • ecu_AUTO_DEF_SGN_NLEVEL : ecuauto.h
  • ecu_AUTO_DEF_SGN_NTYPE : ecuauto.h
  • ecu_AUTO_DEF_SGN_RX_NSEED : ecuauto.h
  • ecu_AUTO_DEF_SGN_SLEVEL : ecuauto.h
  • ecu_AUTO_DEF_SGN_TX_NSEED : ecuauto.h
  • ecu_AUTO_DEF_SIN_FNAME : ecuauto.h
  • ecu_AUTO_DEF_SOUT_FNAME : ecuauto.h
  • ecu_AUTO_DEF_TAIL_LEN : ecuauto.h
  • ecu_AUTO_DEF_TEST_CHNUM : ecuauto.h
  • ecu_AUTO_DEF_UTA_FNAME : ecuauto.h
  • ecu_AUTO_DEF_Y2X_DELAY : ecuauto.h
  • ecu_auto_dline_pack() : ecuauto.c , ecuauto.h
  • ecu_auto_dline_unpack() : ecuauto.c , ecuauto.h
  • ecu_AUTO_ERL_0DB : ecuauto.h
  • ecu_AUTO_ERL_3DB : ecuauto.h
  • ecu_AUTO_ERL_6DB : ecuauto.h
  • ecu_AUTO_ERR : ecuauto.h
  • ecu_AUTO_ERR_CLOSECHN : ecuauto.h
  • ecu_AUTO_ERR_CONFIGCHN : ecuauto.h
  • ecu_AUTO_ERR_CREATECHN : ecuauto.h
  • ecu_AUTO_ERR_DELETECHN : ecuauto.h
  • ecu_AUTO_ERR_ECUCONTROL : ecuauto.h
  • ecu_AUTO_ERR_ECUGETFLT : ecuauto.h
  • ecu_AUTO_ERR_ECUGETSZ : ecuauto.h
  • ecu_AUTO_ERR_ECUNEW : ecuauto.h
  • ecu_AUTO_ERR_GETFILTER : ecuauto.h
  • ecu_AUTO_ERR_GETVERSION : ecuauto.h
  • ecu_AUTO_ERR_HYBCONTROL : ecuauto.h
  • ecu_AUTO_ERR_HYBECHO : ecuauto.h
  • ecu_AUTO_ERR_HYBGETSZ : ecuauto.h
  • ecu_AUTO_ERR_HYBNEW : ecuauto.h
  • ecu_AUTO_ERR_HYBOPEN : ecuauto.h
  • ecu_AUTO_ERR_NONE : ecuauto.h
  • ecu_AUTO_ERR_NUMBUF : ecuauto.h
  • ecu_AUTO_ERR_OPENCHN : ecuauto.h
  • ecu_AUTO_ERR_SGNGETSZ : ecuauto.h
  • ecu_AUTO_ERR_UTAADDMOD : ecuauto.h
  • ecu_AUTO_ERR_UTACMD : ecuauto.h
  • ecu_AUTO_ERR_UTAGETSZ : ecuauto.h
  • ecu_AUTO_ERR_UTAIDX : ecuauto.h
  • ecu_AUTO_ERR_UTAINIT : ecuauto.h
  • ecu_AUTO_ERR_UTAMOD : ecuauto.h
  • ecu_AUTO_ERR_UTAOPT : ecuauto.h
  • ecu_AUTO_ERR_UTAPROC : ecuauto.h
  • ecu_auto_exception() : ecuauto.c , ecuauto.h
  • ecu_AUTO_FILE_RIN : ecuauto.h
  • ecu_AUTO_FILE_ROUT : ecuauto.h
  • ecu_AUTO_FILE_SIN : ecuauto.h
  • ecu_AUTO_FILE_SOUT : ecuauto.h
  • ecu_auto_gen_sgnfrms() : ecuauto.c , ecuauto.h
  • ecu_auto_halt() : ecuauto.h
  • ecu_auto_init_rxsgn() : ecuauto.c , ecuauto.h
  • ecu_auto_init_txsgn() : ecuauto.c , ecuauto.h
  • ecu_auto_iprint() : ecuauto.c
  • ecu_AUTO_MARK_SIZE : ecuauto.h
  • ecu_AUTO_MAX_DELAY : ecuauto.h
  • ecu_AUTO_MAX_ECOBUFS : ecuauto.h
  • ecu_AUTO_MAX_FRAME_SZ : ecuauto.h
  • ecu_AUTO_MAX_INST : ecuauto.h
  • ecu_AUTO_MAX_SEG_LEN : ecuauto.h
  • ecu_AUTO_MAX_SEG_NUM : ecuauto.h
  • ecu_AUTO_MAX_STRING : ecuauto.h
  • ecu_AUTO_MAX_TAIL_LEN : ecuauto.h
  • ecu_AUTO_MIN_SEARCH : ecuauto.h
  • ecu_AUTO_MOD_ECU : ecuauto.h
  • ecu_AUTO_MOD_HYB : ecuauto.h
  • ecu_AUTO_MOD_SGN : ecuauto.h
  • ecu_AUTO_MRK_NONE : ecuauto.h
  • ecu_AUTO_MRK_POST : ecuauto.h
  • ecu_AUTO_MRK_PRE : ecuauto.h
  • ecu_AUTO_NLP_CNG_ON : ecuauto.h
  • ecu_AUTO_NLP_OFF : ecuauto.h
  • ecu_AUTO_NLP_ON : ecuauto.h
  • ecu_AUTO_NOERR : ecuauto.h
  • ecu_AUTO_NUM_HYB_INST : ecuauto.h
  • ecu_AUTO_NUM_OUTFILES : ecuauto.h
  • ecu_AUTO_NUM_SGN_INST : ecuauto.h
  • ecu_auto_output_alaw() : ecuauto.c , ecuauto.h
  • ecu_auto_output_lin() : ecuauto.c , ecuauto.h
  • ecu_auto_output_pcm() : ecuauto.c , ecuauto.h
  • ecu_auto_output_ulaw() : ecuauto.c , ecuauto.h
  • ecu_AUTO_PCM_ALAW : ecuauto.h
  • ecu_AUTO_PCM_LIN : ecuauto.h
  • ecu_AUTO_PCM_ULAW : ecuauto.h
  • ecu_auto_print() : ecuauto.c , ecumem.h
  • ecu_AUTO_PRINT_DONE : ecuauto.h
  • ecu_auto_process_uta() : ecuauto.c , ecuauto.h
  • ecu_AUTO_RXSGN : ecuauto.h
  • ecu_AUTO_SAMP_PER_MS : ecuauto.h
  • ecu_auto_sample_cnt() : ecuauto.c , ecuauto.h
  • ecu_auto_set_defaults() : ecuauto.c , ecuauto.h
  • ecu_AUTO_SGN_BUF_SZ : ecuauto.h
  • ecu_AUTO_SGN_FRAME_SZ : ecuauto.h
  • ecu_auto_sprint() : ecuauto.c
  • ecu_AUTO_TXSGN : ecuauto.h
  • ecu_auto_write_pcm() : ecuauto.c
  • ecu_bg_e : ecuiram.c
  • ecu_BG_E_BUF : ecusimfunc.c
  • ecu_bg_filter : ecuiram.c
  • ecu_BG_FLTSEG : ecusimfunc.c
  • ecu_BG_UPDATE_BUF : ecusimfunc.c
  • ecu_bg_work : ecuiram.c
  • ecu_CPD_ENABLE : ecusimport.h , ecuautoport.h
  • ecu_DBGSTRM_ENABLE : ecusimport.h , ecuautoport.h
  • ecu_DELAY_LINE_COMPRESS : ecuautoport.h , ecusimport.h
  • ecu_DELAY_LINE_LENGTH : ecuiram.h
  • ecu_EXPAND_DL_BUF : ecusimfunc.c
  • ecu_fg_filter : ecuiram.c
  • ecu_FG_FLTSEG : ecusimfunc.c
  • ecu_halt() : ecusim.c , ecusimfunc.c
  • ecu_HEAP_CNT : ecumem.h
  • ecu_HEAP_ID1 : ecumem.h
  • ecu_HEAP_ID2 : ecumem.h
  • ecu_HYB_SIM_MAX_ECOBUFS : ecusim.h
  • ecu_INST_RELOCATION : ecuautoport.h , ecusimport.h
  • ecu_mem_align() : ecumem.c , ecumem.h
  • ecu_mem_alloc_align() : ecumem.c , ecumem.h
  • ecu_mem_alloc_eco() : ecumem.c , ecumem.h
  • ecu_mem_heap_alloc() : ecumem.c
  • ecu_mem_heap_init() : ecumem.c
  • ecu_mem_init_heap() : ecumem.c , ecumem.h
  • ecu_RECEIVE_IN : ecusimfunc.c
  • ecu_RERL_ENABLE : ecusimport.h , ecuautoport.h
  • ecu_SEARCH_ENABLE : ecuautoport.h , ecusimport.h
  • ecu_SEARCH_FILTER_BUF : ecusimfunc.c
  • ecu_send_out() : ecusim.h , ecusim.c , ecusimfunc.c
  • ecu_SIM_DEF_BASE_INDIR : ecusim.h
  • ecu_SIM_DEF_BASE_OUTDIR : ecusim.h
  • ecu_SIM_DEF_FILT_FNAME : ecusim.h
  • ecu_SIM_DEF_FS : ecusim.h
  • ecu_SIM_DEF_RIN_FNAME : ecusim.h
  • ecu_SIM_DEF_ROUT_FNAME : ecusim.h
  • ecu_SIM_DEF_SIN_FNAME : ecusim.h
  • ecu_SIM_DEF_SOUT_FNAME : ecusim.h
  • ecu_SIM_END : ecusim.h
  • ecu_SIM_ERR_10 : ecusim.h
  • ecu_SIM_ERR_11 : ecusim.h
  • ecu_SIM_ERR_12 : ecusim.h
  • ecu_SIM_ERR_13 : ecusim.h
  • ecu_SIM_ERR_14 : ecusim.h
  • ecu_SIM_ERR_15 : ecusim.h
  • ecu_SIM_ERR_5 : ecusim.h
  • ecu_SIM_ERR_6 : ecusim.h
  • ecu_SIM_ERR_7 : ecusim.h
  • ecu_SIM_ERR_8 : ecusim.h
  • ecu_SIM_ERR_9 : ecusim.h
  • ecu_SIM_ERR_HYB : ecusim.h
  • ecu_SIM_ERR_SGN : ecusim.h
  • ecu_SIM_ERR_SLM : ecusim.h
  • ecu_sim_fileio_end() : ecufio.c , ecufio.h
  • ecu_sim_fileio_init() : ecufio.c , ecufio.h
  • ecu_SIM_FILEIO_READ : ecusim.h
  • ecu_SIM_FILEIO_WRITE : ecusim.h
  • ecu_sim_fread() : ecufio.c , ecufio.h
  • ecu_sim_fwrite() : ecufio.c , ecufio.h
  • ecu_sim_get_linear() : ecufio.c
  • ecu_sim_get_xlaw() : ecufio.c
  • ecu_sim_init() : ecusim.c , ecusimfunc.c
  • ecu_sim_input() : ecufio.c , ecufio.h
  • ecu_SIM_MAX_BSIZE : ecusim.h
  • ecu_SIM_MAX_CHANNELS : ecusim.h
  • ecu_SIM_MAX_ECOBUFS : ecusim.h
  • ecu_SIM_MAX_SAMPLES : ecusim.h
  • ecu_SIM_MAX_STRING : ecusim.h
  • ecu_SIM_MAX_TAIL_LEN : ecusim.h
  • ecu_sim_output() : ecufio.h , ecufio.c
  • ecu_sim_put_linear() : ecufio.c
  • ecu_SIM_SIG_SRC_FILE : ecusim.h
  • ecu_SIM_SIG_SRC_SGN : ecusim.h
  • ECU_SIM_USE_VPE : ecusim.h
  • ecu_WIDE_BAND : ecuautoport.h , ecusimport.h
  • ecuAuto_close_chn() : ecuauto.c , ecuauto.h
  • ecuAuto_config_chn() : ecuauto.c , ecuauto.h
  • ecuAuto_create_chn() : ecuauto.c , ecuauto.h
  • ecuAuto_delete_chn() : ecuauto.c , ecuauto.h
  • ecuAuto_get_filter() : ecuauto.c , ecuauto.h
  • ecuAuto_open_chn() : ecuauto.h , ecuauto.c
  • ecuAuto_prep_fout() : ecuauto.c , ecuauto.h
  • ecuAuto_process_loop() : ecuauto.h , ecuauto.c
  • ecuAutoConfig : ecuauto.c
  • ecuAutoEcuInst : ecuauto.c
  • ecuAutoErr_e : ecuauto.h
  • ecuAutoFrameSize : ecuauto.c
  • ecuAutoFrmIndex : ecuauto.c
  • ecuAutoFrmRemain : ecuauto.c
  • ecuAutoHybInst : ecuauto.c
  • ecuAutoSgnInst : ecuauto.c
  • ecuAutoUtaInst : ecuauto.c
  • ecuBoolVals : ecuuta.c
  • ecuBuild : ecuauto.c
  • ecuChncfgOpts : ecuuta.c , ecuuta.h
  • ecuChnnewOpts : ecuuta.c , ecuuta.h
  • ecucmd_AUTO_NUM_CMD : ecuuta.h
  • ecucmd_chncfg_handler() : ecuuta.c , ecuuta.h
  • ecucmd_CHNCFG_OPT_BYPASS_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_BYPASS_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_CNG_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_CNG_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_HCLEAR_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_HHOLD_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_HHOLD_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_MINERL_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_MINERL_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_NLP_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_NLP_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_RESET_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_TAIL_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_TAIL_ID : ecuuta.h
  • ecucmd_chndel_handler() : ecuuta.c , ecuuta.h
  • ecucmd_chnnew_handler() : ecuuta.h , ecuuta.c
  • ecucmd_CHNNEW_OPT_TAIL_ID : ecuuta.h
  • ecucmd_CHNNEW_OPT_Y2X_ID : ecuuta.h
  • ecucmd_close_handler() : ecuuta.h , ecuuta.c
  • ecucmd_getflt_handler() : ecuuta.c , ecuuta.h
  • ecucmd_GETFLT_OPT_FILTER_DEF : ecuuta.h
  • ecucmd_GETFLT_OPT_FILTER_ID : ecuuta.h
  • ecucmd_GETFLT_OPT_FNAME_ID : ecuuta.h
  • ecucmd_NUM_CHNCFG_OPT : ecuuta.h
  • ecucmd_NUM_CHNNEW_OPT : ecuuta.h
  • ecucmd_NUM_GETFLT_OPT : ecuuta.h
  • ecucmd_NUM_OPEN_OPT : ecuuta.h
  • ecucmd_NUM_OUTPUT_OPT : ecuuta.h
  • ecucmd_NUM_RUNSIM_OPT : ecuuta.h
  • ecucmd_open_handler() : ecuuta.c , ecuuta.h
  • ecucmd_OPEN_OPT_CHIDX_ID : ecuuta.h
  • ecucmd_OPEN_OPT_FRAME_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_FRAME_ID : ecuuta.h
  • ecucmd_OPEN_OPT_PCM_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_PCM_ID : ecuuta.h
  • ecucmd_OPEN_OPT_TAIL_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_TAIL_ID : ecuuta.h
  • ecucmd_OPEN_OPT_Y2X_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_Y2X_ID : ecuuta.h
  • ecucmd_output_handler() : ecuuta.c , ecuuta.h
  • ecucmd_OUTPUT_OPT_RIN : ecuuta.h
  • ecucmd_OUTPUT_OPT_ROUT : ecuuta.h
  • ecucmd_OUTPUT_OPT_SIN : ecuuta.h
  • ecucmd_OUTPUT_OPT_SOUT : ecuuta.h
  • ecucmd_runsim_handler() : ecuuta.c , ecuuta.h
  • ecucmd_RUNSIM_OPT_MARK_DEF : ecuuta.h
  • ecucmd_RUNSIM_OPT_MARK_ID : ecuuta.h
  • ecucmd_RUNSIM_OPT_NOFOUT_ID : ecuuta.h
  • ecucmd_RUNSIM_OPT_PCM_DEF : ecuuta.h
  • ecucmd_RUNSIM_OPT_PCM_ID : ecuuta.h
  • ecucmd_RUNSIM_OPT_TIME_ID : ecuuta.h
  • ecuCommands : ecuuta.c , ecuuta.h
  • ecuContext : ecmemdef.c , ecuauto.c
  • ecuErl_e : ecuauto.h
  • ecuFilterVals : ecuuta.c
  • ecuGetfltOpts : ecuuta.c , ecuuta.h
  • ecuHeap : ecumem.c
  • ecuMarkVals : ecuuta.c
  • ecuMem1 : ecumem.c
  • ecuMem2 : ecumem.c
  • ecuNlp_e : ecuauto.h
  • ecuOpenOpts : ecuuta.h , ecuuta.c
  • ecuOutputOpts : ecuuta.h , ecuuta.c
  • ecuPatch : ecuauto.c
  • ecuPcm_e : ecuauto.h
  • ecuPcmVals : ecuuta.c
  • ecuProfile : ecuprof.c , ecuprof.h
  • ecuRevision : ecuauto.c
  • ecuRunsimOpts : ecuuta.h , ecuuta.c
  • ecuSim : ecusimfunc.c , ecufio.c , ecusim.c
  • ECUSIM_INCLUDE_MAG : ecusim.h
  • ecuSIM_MAXSENDOUT_LENGTH : ecusim.h
  • ecusim_profile_close() : ecuprof.h , ecuprof.c
  • ecusim_PROFILE_FNAME : ecusim.h
  • ecusim_profile_init() : ecuprof.h , ecuprof.c
  • ecusim_profile_print() : ecuprof.h , ecuprof.c
  • ecusim_profile_start() : ecuprof.h , ecuprof.c
  • ecusim_profile_stop() : ecuprof.h , ecuprof.c
  • ecuVersion : ecuauto.c
  • EVCT_CSACELP : vctypes.h
  • EVCT_CSACELP_IS641 : vctypes.h
  • EVCT_DATA : vctypes.h
  • EVCT_E2_2ADPCM : vctypes.h
  • EVCT_E3_2ADPCM : vctypes.h
  • EVCT_FAX : vctypes.h
  • EVCT_G723_53 : vctypes.h
  • EVCT_G723_63 : vctypes.h
  • EVCT_G729 : vctypes.h
  • EVCT_G729A : vctypes.h
  • EVCT_G729AB : vctypes.h
  • EVCT_G729E : vctypes.h
  • EVCT_GSMEFR : vctypes.h
  • EVCT_GSMFR : vctypes.h
  • EVCT_INVALID : vctypes.h
  • EVCT_LDCELP_16K : vctypes.h
  • EVCT_MRU : vctypes.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- f -

  • file_string : ecuauto.c
  • FILEIO_FRM_FACTOR : ecusim.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- g -

  • gelFlag : ecusimfunc.c
  • generate_rx_tone_frame() : ecusimfunc.c , ecusim.c
  • generate_tx_tone_frame() : ecusimfunc.c , ecusim.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- h -

  • hybTxInst : ecusim.c , ecusimfunc.c
  • hybUserFilter : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- i -

  • IRAM_ECU_BG_E_LENGTH : ecuiram.h
  • IRAM_ECU_BG_FLTSEG_LENGTH : ecuiram.h
  • IRAM_ECU_BG_WORK_LENGTH : ecuiram.h
  • IRAM_ECU_BLOCK_LENGTH : ecuiram.h
  • IRAM_ECU_FG_FLTSEG_LENGTH : ecuiram.h
  • IRAM_ECU_MAX_FLTSEG_LENGTH : ecuiram.h
  • IRAM_ECU_SRCH_FILTER_LENGTH : ecuiram.h
  • IRAM_PIU_ECU_RECEIVE_LENGTH : ecuiram.h
  • iramSeg : ecuiram.h , ecuiram.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- p -

  • PCM_LOOPBACK_ON : piu.h
  • piu_ALAW_SILENCE : piu.h
  • PIU_BEGIN_CRITICAL_SECTION : piuport.h
  • piu_bid_silence_detect() : piutxrx.c , piuloc.h
  • piu_BID_SILENCE_DETECTION : piu.h
  • piu_BIDIR_SILENCE_DETECTED : piu.h
  • piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION : piuloc.h
  • piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR : piuloc.h
  • piu_CLOSED : piuloc.h
  • piu_COMP_ALAW : piu.h
  • piu_COMP_FIRST : piu.h
  • piu_COMP_LAST : piu.h
  • piu_COMP_LINEAR : piu.h
  • piu_COMP_ULAW : piu.h
  • piu_CTRL_BIT_BID_SILENCE_DET : piu.h
  • piu_CTRL_BIT_DC_FILTR_SELECT_MODE1 : piu.h
  • piu_CTRL_BIT_DO_LIN_LOOPBACK : piu.h
  • piu_CTRL_BIT_DO_PCM_LOOPBACK : piu.h
  • piu_CTRL_BIT_LOOPBACK_NOPASS : piu.h
  • piu_CTRL_BIT_PATTERN_DETECT : piu.h
  • piu_CTRL_BIT_PATTERN_GENERATE : piu.h
  • piu_CTRL_BIT_RECV_IN_BUF_EMPTY : piu.h
  • piu_CTRL_BIT_REMOVE_DC_COMP : piu.h
  • piu_CTRL_BIT_TRANSPARENT_MODE : piu.h
  • piu_CTRL_BIT_TRIPLE_RX_BUF : piu.h
  • piu_CTRL_BIT_UNDERRUN_REPORT : piu.h
  • piu_CTRL_BIT_USE_RECV_OUT_BUF : piu.h
  • piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT : piuloc.h
  • piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT : piuloc.h
  • piu_DC_OFFSET_DISABLE : piu.h
  • piu_DC_OFFSET_MODE1 : piu.h
  • piu_DC_OFFSET_MODE2 : piu.h
  • piu_DC_OFFSET_REMOVAL : piu.h
  • piu_DISABLE_UNDERRUN_REPORT : piu.h
  • piu_ecu_receive : ecuiram.c
  • piu_ENABLE_UNDERRUN_REPORT : piu.h
  • PIU_END_CRITICAL_SECTION : piuport.h
  • piu_energy_dc_measurement() : piuloc.h
  • piu_ERROR : piu.h
  • piu_exc_assert : piuloc.h
  • piu_EXC_DELETE : piu.h
  • piu_EXC_OPEN : piu.h
  • piu_EXC_SUBFRAMESIZE : piu.h
  • piu_exception() : piu.c , piuloc.h
  • piu_frame_DClevel() : piufutil.c , piuloc.h
  • piu_frame_energy() : piufutil.c , piuloc.h
  • piu_GET_LEVELS : piu.h
  • piu_get_stats() : piutxrx.c , piuloc.h
  • piu_INSTANCE_BUFN : piuinit.c
  • piu_LINEAR_SILENCE : piu.h
  • piu_loopback_config() : piu.c
  • PIU_MAX_SUBSEGLENGTH : piuport.h
  • piu_MULAW_SILENCE : piu.h
  • piu_NBUFS : piuinit.c
  • piu_NOERR : piu.h
  • piu_NOMEMORY : piu.h
  • piu_NUMSEGM_RX2 : piuloc.h
  • piu_NUMSEGM_RX3 : piuloc.h
  • piu_NUMSEGM_TX : piuloc.h
  • piu_OPEN : piuloc.h
  • piu_PATTERN_DETECTED : piu.h
  • piu_PATTERN_DETECTION : piu.h
  • piu_PATTERN_GENERATION : piu.h
  • piu_pcm_companding() : piutxrx.c , piuloc.h
  • piu_pcm_compressing() : piutxrx.c , piuloc.h
  • piu_PCM_PATTERN_CUSTOM : piuloc.h
  • piu_pcm_pattern_detect() : piutxrx.c , piuloc.h
  • piu_PCM_PATTERN_E1 : piuloc.h
  • piu_pcm_pattern_generate() : piutxrx.c , piuloc.h
  • piu_PCM_PATTERN_T1 : piuloc.h
  • piu_RECVIN_BUFN : piuinit.c
  • piu_RECVOUT_BUFN : piuinit.c
  • piu_remove_dc_component() : piuloc.h , piufutil.c
  • piu_reset_receive_in_buf() : piu.c
  • piu_segment_in : ecusimfunc.c , ecusim.c
  • piu_segment_out : ecusim.c
  • piu_SENDOUT_BUFN : piuinit.c
  • piu_SET_COMPANDING : piu.h
  • piu_SET_FRAME_SIZE : piu.h
  • piu_SET_IDLE_NOISE_LEVEL : piu.h
  • piu_SET_LOOPBACK : piu.h
  • PIU_STATE_BEGIN : piuport.h
  • PIU_STATE_END : piuport.h
  • piu_TX_TASK_ID : piuloc.h
  • piu_TXRX_TASK_ID : piuloc.h
  • piu_UNDERRUN : piu.h
  • piu_update_buf_ptr() : piuloc.h , piutxrx.c
  • piuABS : piuisr.c
  • piuBidSilenceDetect() : piu.c
  • piuBufs : piuinit.c
  • piuClose() : piu.h , piu.c
  • piuContext : piu.c , piu.h
  • piuControl() : piu.c , piu.h
  • piuDcOffsetRemoval() : piu.h , piu.c
  • piuDelete() : piu.h , piu.c
  • PIUDLCOMP_ENABLE : piuport.h
  • piuGetSizes() : piuinit.c , piu.h
  • piuInst_t : piuloc.h
  • piuNew() : piuinit.c , piu.h
  • piuOpen() : piu.c , piu.h
  • piuPatternDetect() : piu.c
  • piuPatternGeneration() : piu.c
  • piuReceiveIn() : piutxrx.c , piu.h
  • piuReceiveOut() : piuisr.c , piu.h
  • piuSendIn() : piuisr.c , piu.h
  • piuSetCompanding() : piu.c
  • piuTxRxProc() : piu.h , piutxrx.c
  • print_string : ecuauto.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- q -

  • QUANT_MASK : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- r -

  • rinBuffer : ecuauto.c , ecufio.h , ecusimfunc.c
  • routBuffer : ecuauto.c , ecufio.h , ecusimfunc.c
  • rx_frame_in : ecusim.c
  • rx_segment_out : ecusim.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- s -

  • search() : ecusimfunc.c
  • seg_end : ecusimfunc.c
  • SEG_END_TBLSIZE : ecusim.h
  • SEG_MASK : ecusimfunc.c
  • SEG_SHIFT : ecusimfunc.c
  • segment_in : ecusim.c
  • sgnrxBuffer : ecuauto.c
  • sgnRxInst : ecusim.c , ecusimfunc.c
  • sgntxBuffer : ecuauto.c
  • sgnTxInst : ecusim.c , ecusimfunc.c
  • sinBuffer : ecuauto.c , ecufio.h , ecusimfunc.c
  • SIU_ALAW_ZERO : siuport.h
  • SIU_CHST_CLOSED : ecusim.h
  • SIU_CHST_DTMF : ecusim.h
  • SIU_CHST_IDLE : ecusim.h
  • SIU_CHST_VOICE : ecusim.h
  • siu_core_heap : cheap.c , cheap.h
  • SIU_CORE_HEAP_SIZE : cheap.h
  • siu_dbg_id : siu.c
  • siu_dbg_message : siu.c
  • siu_dbg_out : siuloc.h
  • SIU_DBGMSG_SIZE : siuport.h
  • SIU_DEBUG_FATAL : siuloc.h
  • SIU_DEBUG_INFO : siuloc.h
  • SIU_DEBUG_WARNING : siuloc.h
  • SIU_ERROR : siu.h
  • siu_exc_assert : siuloc.h
  • siu_getflt : ecusim.c
  • SIU_MAX_CHANNELS : siuport.h
  • SIU_MAX_ECU_FILTER_LENGTH : ecusim.h
  • SIU_MAX_ECU_FLTSEG : ecusim.h
  • SIU_MAX_ECU_FLTSEG_LENGTH : ecusim.h
  • SIU_MAX_FRAME_LENGTH : ecusim.h
  • SIU_MAX_GETFLT : ecusim.c
  • SIU_MAX_HYBRID_LENGTH : ecusim.h
  • SIU_MAX_SYSTEM_DELAY : ecusim.h
  • SIU_MID_ECU : siuport.h
  • SIU_MID_PIU : siuport.h
  • SIU_MID_SIU : siuport.h
  • SIU_MID_VCA : siuport.h
  • SIU_MID_VCU : siuport.h
  • siu_new_ecu() : ecusim.c , ecusimfunc.c
  • siu_new_piu() : siuloc.h , siumgr.c
  • SIU_NOERR : siu.h
  • siu_open_ecu() : ecusim.c , ecusimfunc.c
  • siu_open_piu() : siumgr.c , siuloc.h
  • siu_open_rxsgn() : ecusim.c , ecusimfunc.c
  • siu_open_tx() : siuloc.h , siumgr.c
  • siu_open_txhyb() : ecusim.c , ecusimfunc.c
  • siu_open_txsgn() : ecusim.c , ecusimfunc.c
  • siu_piu_report_code : ecusimfunc.c
  • siu_rx_file() : ecusimfunc.c
  • siu_set_sgn() : ecusimfunc.c , ecusim.c
  • siu_spad_process() : siuloc.h
  • siu_tuint_to_hex() : ecusimfunc.c , siu.c
  • siu_tx_execute() : siutx.c
  • siu_tx_file() : ecusimfunc.c
  • siu_tx_sleep() : siutx.c
  • siu_tx_wake_up() : siutx.c
  • SIU_ULAW_ZERO : siuport.h
  • siu_voice_heap : vheap.c , vheap.h
  • SIU_VOICE_HEAP_SIZE : vheap.h
  • siuCAlloc() : siuloc.h
  • siuContext : siuloc.h , siu.c
  • siuDebug() : siu.c , siuloc.h
  • siuDebugInfo() : siu.c , siuloc.h
  • siuDebugInfoNew() : ecusim.c , siu.h , ecusimfunc.c
  • siuDebugInternal() : siu.c
  • siuException() : siu.c , siuloc.h
  • siuInACmpStream : ecusim.c , ecusimfunc.c
  • siuInit() : siu.h , siu.c
  • siuInst : siu.c , siuloc.h
  • siuInStream : ecusimfunc.c , ecusim.c
  • siuInUCmpStream : ecusimfunc.c , ecusim.c
  • siuMakeID : siuloc.h
  • siuOutErrStream : ecusimfunc.c , ecusim.c
  • siuOutStream : ecusimfunc.c
  • siuPcmSampleTrace() : ecusim.c , ecusimfunc.c , siu.h
  • siuPiuReport() : ecusimfunc.c , siu.h , ecusim.c
  • siuRxInStream : ecusimfunc.c , ecusim.c
  • siuSetup : ecusimfunc.c
  • siuSetup_t : ecusim.h
  • siuTxMain() : siutx.c
  • siuTxOpen() : siutx.c , siu.h
  • siuTxRxSendIn() : siu.h , ecusim.c , ecusimfunc.c
  • siuTxSendIn() : siutx.c , siu.h
  • siuUpdateECUPowers() : ecusimfunc.c
  • siuVAlloc() : siuloc.h
  • soutBuffer : ecuauto.c , ecusimfunc.c , ecufio.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- t -

  • thwClockSet() : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- u -

  • UAExpand() : piu.h , piuexpan.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

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

- v -

  • v21_flags : ecusimfunc.c
  • VCT_1BITS : vctypes.h
  • VCT_2ADPCM : vctypes.h
  • VCT_2BITS : vctypes.h
  • VCT_3ADPCM : vctypes.h
  • VCT_3BITS : vctypes.h
  • VCT_4ADPCM : vctypes.h
  • VCT_4BITS : vctypes.h
  • VCT_5ADPCM : vctypes.h
  • VCT_5BITS : vctypes.h
  • VCT_6BITS : vctypes.h
  • VCT_7BITS : vctypes.h
  • VCT_8APCM : vctypes.h
  • VCT_8BITS : vctypes.h
  • VCT_8MUPCM : vctypes.h
  • VCT_E4_2ADPCM : vctypes.h
  • VCT_E5_2ADPCM : vctypes.h
  • VCT_E8_6ADPCM : vctypes.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- _ -

  • __SIUSTR : siuloc.h
  • _ECUAUTOPORT_C54 : ecuautoport.h
  • _ECUAUTOPORT_C54F : ecuautoport.h
  • _ECUAUTOPORT_C55 : ecuautoport.h
  • _ECUAUTOPORT_C55L : ecuautoport.h
  • _ECUAUTOPORT_C64 : ecuautoport.h
  • _ECUAUTOPORT_C64_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_C64P : ecuautoport.h
  • _ECUAUTOPORT_C64P_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_C66 : ecuautoport.h
  • _ECUAUTOPORT_C66_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_ELF_C64P : ecuautoport.h
  • _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN : ecuautoport.h
  • _ECUAUTOPORT_ELF_C66 : ecuautoport.h
  • _ECUAUTOPORT_ELF_C66_BIG_ENDIAN : ecuautoport.h
  • _ECUSIM_PIU_PORT_C54 : piuport.h
  • _ECUSIM_PIU_PORT_C54F : piuport.h
  • _ECUSIM_PIU_PORT_C55 : piuport.h
  • _ECUSIM_PIU_PORT_C55L : piuport.h
  • _ECUSIM_PIU_PORT_C64 : piuport.h
  • _ECUSIM_PIU_PORT_C64_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_C64P : piuport.h
  • _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_C66 : piuport.h
  • _ECUSIM_PIU_PORT_C66_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C64P : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C66 : piuport.h
  • _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN : piuport.h
  • _ECUSIMPORT_C54 : ecusimport.h
  • _ECUSIMPORT_C54F : ecusimport.h
  • _ECUSIMPORT_C55 : ecusimport.h
  • _ECUSIMPORT_C55L : ecusimport.h
  • _ECUSIMPORT_C64 : ecusimport.h
  • _ECUSIMPORT_C64_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_C64P : ecusimport.h
  • _ECUSIMPORT_C64P_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_C66 : ecusimport.h
  • _ECUSIMPORT_C66_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_ELF_C64P : ecusimport.h
  • _ECUSIMPORT_ELF_C64P_BIG_ENDIAN : ecusimport.h
  • _ECUSIMPORT_ELF_C66 : ecusimport.h
  • _ECUSIMPORT_ELF_C66_BIG_ENDIAN : ecusimport.h
  • _SIUSTR : siuloc.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- l -

  • LIN_LOOPBACK_ON : piu.h
  • loop : siutx.c , siu.c
  • LOOPBACK_OFF : piu.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- m -

  • MAX_HYB_FILTER_LEN : ecusim.h
  • MAX_HYB_RX_DELAY : ecusim.h
  • MAX_HYB_SAMPLES_PER_FRAME : ecusim.h
  • MAX_HYB_TX_DELAY : ecusim.h
  • MAX_HYBSEG_LENGTH : ecusim.h
  • MAX_STREAM_SIZE : ecusim.h
  • MIPS_AGENT_CTRL : ecusimfunc.c
  • MIPS_AGENT_EVENT_CHSTATE : ecusimfunc.c
  • MIPS_AGENT_EVENT_CODEC : ecusimfunc.c
  • MIPS_AGENT_EVENT_ECU : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- n -

  • NUMBER_OF_FRAMES : ecusim.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- b -

  • BIAS : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- d -

  • DATA_FLOW_DISABLE : piu.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- e -

  • ecu_03DB_ENABLE : ecuautoport.h , ecusimport.h
  • ecu_5P5MS_FRAME_ENABLE : ecuautoport.h , ecusimport.h
  • ecu_AUTO_CHCFG_BYP_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_CLR_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_ERL_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_HLD_VALID : ecuauto.h
  • ecu_AUTO_CHCFG_NLP_VALID : ecuauto.h
  • ecu_AUTO_DEF_FRAME_SZ : ecuauto.h
  • ecu_AUTO_DEF_FS : ecuauto.h
  • ecu_AUTO_DEF_GETFLT_BSIZE : ecuauto.h
  • ecu_AUTO_DEF_GETFLT_FNAME : ecuauto.h
  • ecu_AUTO_DEF_HYB_DELAY : ecuauto.h
  • ecu_AUTO_DEF_HYB_ERL : ecuauto.h
  • ecu_AUTO_DEF_HYB_ID : ecuauto.h
  • ecu_AUTO_DEF_HYB_MODEL : ecuauto.h
  • ecu_AUTO_DEF_HYB_RX_DELAY : ecuauto.h
  • ecu_AUTO_DEF_HYB_TX_DELAY : ecuauto.h
  • ecu_AUTO_DEF_INIT_PATTERN : ecuauto.h
  • ecu_AUTO_DEF_MIN_ERL : ecuauto.h
  • ecu_AUTO_DEF_NLP_MODE : ecuauto.h
  • ecu_AUTO_DEF_PCM_FORMAT : ecuauto.h
  • ecu_AUTO_DEF_PCM_HOLD_BSIZE : ecuauto.h
  • ecu_AUTO_DEF_RIN_FNAME : ecuauto.h
  • ecu_AUTO_DEF_ROUT_FNAME : ecuauto.h
  • ecu_AUTO_DEF_SGN_AMP1 : ecuauto.h
  • ecu_AUTO_DEF_SGN_DCOFF : ecuauto.h
  • ecu_AUTO_DEF_SGN_DELAY : ecuauto.h
  • ecu_AUTO_DEF_SGN_FREQ1 : ecuauto.h
  • ecu_AUTO_DEF_SGN_NLEVEL : ecuauto.h
  • ecu_AUTO_DEF_SGN_NTYPE : ecuauto.h
  • ecu_AUTO_DEF_SGN_RX_NSEED : ecuauto.h
  • ecu_AUTO_DEF_SGN_SLEVEL : ecuauto.h
  • ecu_AUTO_DEF_SGN_TX_NSEED : ecuauto.h
  • ecu_AUTO_DEF_SIN_FNAME : ecuauto.h
  • ecu_AUTO_DEF_SOUT_FNAME : ecuauto.h
  • ecu_AUTO_DEF_TAIL_LEN : ecuauto.h
  • ecu_AUTO_DEF_TEST_CHNUM : ecuauto.h
  • ecu_AUTO_DEF_UTA_FNAME : ecuauto.h
  • ecu_AUTO_DEF_Y2X_DELAY : ecuauto.h
  • ecu_AUTO_MARK_SIZE : ecuauto.h
  • ecu_AUTO_MAX_DELAY : ecuauto.h
  • ecu_AUTO_MAX_ECOBUFS : ecuauto.h
  • ecu_AUTO_MAX_FRAME_SZ : ecuauto.h
  • ecu_AUTO_MAX_INST : ecuauto.h
  • ecu_AUTO_MAX_SEG_LEN : ecuauto.h
  • ecu_AUTO_MAX_SEG_NUM : ecuauto.h
  • ecu_AUTO_MAX_STRING : ecuauto.h
  • ecu_AUTO_MAX_TAIL_LEN : ecuauto.h
  • ecu_AUTO_MIN_SEARCH : ecuauto.h
  • ecu_AUTO_NUM_HYB_INST : ecuauto.h
  • ecu_AUTO_NUM_SGN_INST : ecuauto.h
  • ecu_AUTO_PRINT_DONE : ecuauto.h
  • ecu_AUTO_SAMP_PER_MS : ecuauto.h
  • ecu_AUTO_SGN_BUF_SZ : ecuauto.h
  • ecu_AUTO_SGN_FRAME_SZ : ecuauto.h
  • ecu_BG_E_BUF : ecusimfunc.c
  • ecu_BG_FLTSEG : ecusimfunc.c
  • ecu_BG_UPDATE_BUF : ecusimfunc.c
  • ecu_CPD_ENABLE : ecusimport.h , ecuautoport.h
  • ecu_DBGSTRM_ENABLE : ecusimport.h , ecuautoport.h
  • ecu_DELAY_LINE_COMPRESS : ecuautoport.h , ecusimport.h
  • ecu_DELAY_LINE_LENGTH : ecuiram.h
  • ecu_EXPAND_DL_BUF : ecusimfunc.c
  • ecu_FG_FLTSEG : ecusimfunc.c
  • ecu_HEAP_CNT : ecumem.h
  • ecu_HEAP_ID1 : ecumem.h
  • ecu_HEAP_ID2 : ecumem.h
  • ecu_HYB_SIM_MAX_ECOBUFS : ecusim.h
  • ecu_INST_RELOCATION : ecuautoport.h , ecusimport.h
  • ecu_RECEIVE_IN : ecusimfunc.c
  • ecu_RERL_ENABLE : ecusimport.h , ecuautoport.h
  • ecu_SEARCH_ENABLE : ecuautoport.h , ecusimport.h
  • ecu_SEARCH_FILTER_BUF : ecusimfunc.c
  • ecu_SIM_DEF_BASE_INDIR : ecusim.h
  • ecu_SIM_DEF_BASE_OUTDIR : ecusim.h
  • ecu_SIM_DEF_FILT_FNAME : ecusim.h
  • ecu_SIM_DEF_FS : ecusim.h
  • ecu_SIM_DEF_RIN_FNAME : ecusim.h
  • ecu_SIM_DEF_ROUT_FNAME : ecusim.h
  • ecu_SIM_DEF_SIN_FNAME : ecusim.h
  • ecu_SIM_DEF_SOUT_FNAME : ecusim.h
  • ecu_SIM_END : ecusim.h
  • ecu_SIM_ERR_10 : ecusim.h
  • ecu_SIM_ERR_11 : ecusim.h
  • ecu_SIM_ERR_12 : ecusim.h
  • ecu_SIM_ERR_13 : ecusim.h
  • ecu_SIM_ERR_14 : ecusim.h
  • ecu_SIM_ERR_15 : ecusim.h
  • ecu_SIM_ERR_5 : ecusim.h
  • ecu_SIM_ERR_6 : ecusim.h
  • ecu_SIM_ERR_7 : ecusim.h
  • ecu_SIM_ERR_8 : ecusim.h
  • ecu_SIM_ERR_9 : ecusim.h
  • ecu_SIM_ERR_HYB : ecusim.h
  • ecu_SIM_ERR_SGN : ecusim.h
  • ecu_SIM_ERR_SLM : ecusim.h
  • ecu_SIM_FILEIO_READ : ecusim.h
  • ecu_SIM_FILEIO_WRITE : ecusim.h
  • ecu_SIM_MAX_BSIZE : ecusim.h
  • ecu_SIM_MAX_CHANNELS : ecusim.h
  • ecu_SIM_MAX_ECOBUFS : ecusim.h
  • ecu_SIM_MAX_SAMPLES : ecusim.h
  • ecu_SIM_MAX_STRING : ecusim.h
  • ecu_SIM_MAX_TAIL_LEN : ecusim.h
  • ecu_SIM_SIG_SRC_FILE : ecusim.h
  • ecu_SIM_SIG_SRC_SGN : ecusim.h
  • ECU_SIM_USE_VPE : ecusim.h
  • ecu_WIDE_BAND : ecuautoport.h , ecusimport.h
  • ecucmd_AUTO_NUM_CMD : ecuuta.h
  • ecucmd_CHNCFG_OPT_BYPASS_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_BYPASS_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_CNG_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_CNG_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_HCLEAR_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_HHOLD_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_HHOLD_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_MINERL_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_MINERL_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_NLP_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_NLP_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_RESET_ID : ecuuta.h
  • ecucmd_CHNCFG_OPT_TAIL_DEF : ecuuta.h
  • ecucmd_CHNCFG_OPT_TAIL_ID : ecuuta.h
  • ecucmd_CHNNEW_OPT_TAIL_ID : ecuuta.h
  • ecucmd_CHNNEW_OPT_Y2X_ID : ecuuta.h
  • ecucmd_GETFLT_OPT_FILTER_DEF : ecuuta.h
  • ecucmd_GETFLT_OPT_FILTER_ID : ecuuta.h
  • ecucmd_GETFLT_OPT_FNAME_ID : ecuuta.h
  • ecucmd_NUM_CHNCFG_OPT : ecuuta.h
  • ecucmd_NUM_CHNNEW_OPT : ecuuta.h
  • ecucmd_NUM_GETFLT_OPT : ecuuta.h
  • ecucmd_NUM_OPEN_OPT : ecuuta.h
  • ecucmd_NUM_OUTPUT_OPT : ecuuta.h
  • ecucmd_NUM_RUNSIM_OPT : ecuuta.h
  • ecucmd_OPEN_OPT_CHIDX_ID : ecuuta.h
  • ecucmd_OPEN_OPT_FRAME_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_FRAME_ID : ecuuta.h
  • ecucmd_OPEN_OPT_PCM_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_PCM_ID : ecuuta.h
  • ecucmd_OPEN_OPT_TAIL_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_TAIL_ID : ecuuta.h
  • ecucmd_OPEN_OPT_Y2X_DEF : ecuuta.h
  • ecucmd_OPEN_OPT_Y2X_ID : ecuuta.h
  • ecucmd_OUTPUT_OPT_RIN : ecuuta.h
  • ecucmd_OUTPUT_OPT_ROUT : ecuuta.h
  • ecucmd_OUTPUT_OPT_SIN : ecuuta.h
  • ecucmd_OUTPUT_OPT_SOUT : ecuuta.h
  • ecucmd_RUNSIM_OPT_MARK_DEF : ecuuta.h
  • ecucmd_RUNSIM_OPT_MARK_ID : ecuuta.h
  • ecucmd_RUNSIM_OPT_NOFOUT_ID : ecuuta.h
  • ecucmd_RUNSIM_OPT_PCM_DEF : ecuuta.h
  • ecucmd_RUNSIM_OPT_PCM_ID : ecuuta.h
  • ecucmd_RUNSIM_OPT_TIME_ID : ecuuta.h
  • ECUSIM_INCLUDE_MAG : ecusim.h
  • ecuSIM_MAXSENDOUT_LENGTH : ecusim.h
  • ecusim_PROFILE_FNAME : ecusim.h
  • EVCT_CSACELP : vctypes.h
  • EVCT_CSACELP_IS641 : vctypes.h
  • EVCT_DATA : vctypes.h
  • EVCT_E2_2ADPCM : vctypes.h
  • EVCT_E3_2ADPCM : vctypes.h
  • EVCT_FAX : vctypes.h
  • EVCT_G723_53 : vctypes.h
  • EVCT_G723_63 : vctypes.h
  • EVCT_G729 : vctypes.h
  • EVCT_G729A : vctypes.h
  • EVCT_G729AB : vctypes.h
  • EVCT_G729E : vctypes.h
  • EVCT_GSMEFR : vctypes.h
  • EVCT_GSMFR : vctypes.h
  • EVCT_INVALID : vctypes.h
  • EVCT_LDCELP_16K : vctypes.h
  • EVCT_MRU : vctypes.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- f -

  • FILEIO_FRM_FACTOR : ecusim.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- i -

  • IRAM_ECU_BG_E_LENGTH : ecuiram.h
  • IRAM_ECU_BG_FLTSEG_LENGTH : ecuiram.h
  • IRAM_ECU_BG_WORK_LENGTH : ecuiram.h
  • IRAM_ECU_BLOCK_LENGTH : ecuiram.h
  • IRAM_ECU_FG_FLTSEG_LENGTH : ecuiram.h
  • IRAM_ECU_MAX_FLTSEG_LENGTH : ecuiram.h
  • IRAM_ECU_SRCH_FILTER_LENGTH : ecuiram.h
  • IRAM_PIU_ECU_RECEIVE_LENGTH : ecuiram.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- p -

  • PCM_LOOPBACK_ON : piu.h
  • piu_ALAW_SILENCE : piu.h
  • PIU_BEGIN_CRITICAL_SECTION : piuport.h
  • piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION : piuloc.h
  • piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR : piuloc.h
  • piu_CTRL_BIT_BID_SILENCE_DET : piu.h
  • piu_CTRL_BIT_DC_FILTR_SELECT_MODE1 : piu.h
  • piu_CTRL_BIT_DO_LIN_LOOPBACK : piu.h
  • piu_CTRL_BIT_DO_PCM_LOOPBACK : piu.h
  • piu_CTRL_BIT_LOOPBACK_NOPASS : piu.h
  • piu_CTRL_BIT_PATTERN_DETECT : piu.h
  • piu_CTRL_BIT_PATTERN_GENERATE : piu.h
  • piu_CTRL_BIT_RECV_IN_BUF_EMPTY : piu.h
  • piu_CTRL_BIT_REMOVE_DC_COMP : piu.h
  • piu_CTRL_BIT_TRANSPARENT_MODE : piu.h
  • piu_CTRL_BIT_TRIPLE_RX_BUF : piu.h
  • piu_CTRL_BIT_UNDERRUN_REPORT : piu.h
  • piu_CTRL_BIT_USE_RECV_OUT_BUF : piu.h
  • piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT : piuloc.h
  • piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT : piuloc.h
  • PIU_END_CRITICAL_SECTION : piuport.h
  • piu_exc_assert : piuloc.h
  • piu_INSTANCE_BUFN : piuinit.c
  • piu_LINEAR_SILENCE : piu.h
  • PIU_MAX_SUBSEGLENGTH : piuport.h
  • piu_MULAW_SILENCE : piu.h
  • piu_NBUFS : piuinit.c
  • piu_NUMSEGM_RX2 : piuloc.h
  • piu_NUMSEGM_RX3 : piuloc.h
  • piu_NUMSEGM_TX : piuloc.h
  • piu_RECVIN_BUFN : piuinit.c
  • piu_RECVOUT_BUFN : piuinit.c
  • piu_SENDOUT_BUFN : piuinit.c
  • PIU_STATE_BEGIN : piuport.h
  • PIU_STATE_END : piuport.h
  • piu_TX_TASK_ID : piuloc.h
  • piu_TXRX_TASK_ID : piuloc.h
  • piuABS : piuisr.c
  • PIUDLCOMP_ENABLE : piuport.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- q -

  • QUANT_MASK : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- s -

  • SEG_END_TBLSIZE : ecusim.h
  • SEG_MASK : ecusimfunc.c
  • SEG_SHIFT : ecusimfunc.c
  • SIU_ALAW_ZERO : siuport.h
  • SIU_CHST_CLOSED : ecusim.h
  • SIU_CHST_DTMF : ecusim.h
  • SIU_CHST_IDLE : ecusim.h
  • SIU_CHST_VOICE : ecusim.h
  • SIU_CORE_HEAP_SIZE : cheap.h
  • siu_dbg_out : siuloc.h
  • SIU_DBGMSG_SIZE : siuport.h
  • SIU_DEBUG_FATAL : siuloc.h
  • SIU_DEBUG_INFO : siuloc.h
  • SIU_DEBUG_WARNING : siuloc.h
  • siu_exc_assert : siuloc.h
  • SIU_MAX_CHANNELS : siuport.h
  • SIU_MAX_ECU_FILTER_LENGTH : ecusim.h
  • SIU_MAX_ECU_FLTSEG : ecusim.h
  • SIU_MAX_ECU_FLTSEG_LENGTH : ecusim.h
  • SIU_MAX_FRAME_LENGTH : ecusim.h
  • SIU_MAX_GETFLT : ecusim.c
  • SIU_MAX_HYBRID_LENGTH : ecusim.h
  • SIU_MAX_SYSTEM_DELAY : ecusim.h
  • SIU_MID_ECU : siuport.h
  • SIU_MID_PIU : siuport.h
  • SIU_MID_SIU : siuport.h
  • SIU_MID_VCA : siuport.h
  • SIU_MID_VCU : siuport.h
  • SIU_ULAW_ZERO : siuport.h
  • SIU_VOICE_HEAP_SIZE : vheap.h
  • siuMakeID : siuloc.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • d
  • e
  • f
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • v

- v -

  • VCT_1BITS : vctypes.h
  • VCT_2ADPCM : vctypes.h
  • VCT_2BITS : vctypes.h
  • VCT_3ADPCM : vctypes.h
  • VCT_3BITS : vctypes.h
  • VCT_4ADPCM : vctypes.h
  • VCT_4BITS : vctypes.h
  • VCT_5ADPCM : vctypes.h
  • VCT_5BITS : vctypes.h
  • VCT_6BITS : vctypes.h
  • VCT_7BITS : vctypes.h
  • VCT_8APCM : vctypes.h
  • VCT_8BITS : vctypes.h
  • VCT_8MUPCM : vctypes.h
  • VCT_E4_2ADPCM : vctypes.h
  • VCT_E5_2ADPCM : vctypes.h
  • VCT_E8_6ADPCM : vctypes.h


ECU Test: Data Fields

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

  • ecuAutoErr_e : ecuauto.h
  • ecuErl_e : ecuauto.h
  • ecuNlp_e : ecuauto.h
  • ecuPcm_e : ecuauto.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • e
  • p
  • s

- e -

  • ecu_AUTO_ERL_0DB : ecuauto.h
  • ecu_AUTO_ERL_3DB : ecuauto.h
  • ecu_AUTO_ERL_6DB : ecuauto.h
  • ecu_AUTO_ERR : ecuauto.h
  • ecu_AUTO_ERR_CLOSECHN : ecuauto.h
  • ecu_AUTO_ERR_CONFIGCHN : ecuauto.h
  • ecu_AUTO_ERR_CREATECHN : ecuauto.h
  • ecu_AUTO_ERR_DELETECHN : ecuauto.h
  • ecu_AUTO_ERR_ECUCONTROL : ecuauto.h
  • ecu_AUTO_ERR_ECUGETFLT : ecuauto.h
  • ecu_AUTO_ERR_ECUGETSZ : ecuauto.h
  • ecu_AUTO_ERR_ECUNEW : ecuauto.h
  • ecu_AUTO_ERR_GETFILTER : ecuauto.h
  • ecu_AUTO_ERR_GETVERSION : ecuauto.h
  • ecu_AUTO_ERR_HYBCONTROL : ecuauto.h
  • ecu_AUTO_ERR_HYBECHO : ecuauto.h
  • ecu_AUTO_ERR_HYBGETSZ : ecuauto.h
  • ecu_AUTO_ERR_HYBNEW : ecuauto.h
  • ecu_AUTO_ERR_HYBOPEN : ecuauto.h
  • ecu_AUTO_ERR_NONE : ecuauto.h
  • ecu_AUTO_ERR_NUMBUF : ecuauto.h
  • ecu_AUTO_ERR_OPENCHN : ecuauto.h
  • ecu_AUTO_ERR_SGNGETSZ : ecuauto.h
  • ecu_AUTO_ERR_UTAADDMOD : ecuauto.h
  • ecu_AUTO_ERR_UTACMD : ecuauto.h
  • ecu_AUTO_ERR_UTAGETSZ : ecuauto.h
  • ecu_AUTO_ERR_UTAIDX : ecuauto.h
  • ecu_AUTO_ERR_UTAINIT : ecuauto.h
  • ecu_AUTO_ERR_UTAMOD : ecuauto.h
  • ecu_AUTO_ERR_UTAOPT : ecuauto.h
  • ecu_AUTO_ERR_UTAPROC : ecuauto.h
  • ecu_AUTO_FILE_RIN : ecuauto.h
  • ecu_AUTO_FILE_ROUT : ecuauto.h
  • ecu_AUTO_FILE_SIN : ecuauto.h
  • ecu_AUTO_FILE_SOUT : ecuauto.h
  • ecu_AUTO_MOD_ECU : ecuauto.h
  • ecu_AUTO_MOD_HYB : ecuauto.h
  • ecu_AUTO_MOD_SGN : ecuauto.h
  • ecu_AUTO_MRK_NONE : ecuauto.h
  • ecu_AUTO_MRK_POST : ecuauto.h
  • ecu_AUTO_MRK_PRE : ecuauto.h
  • ecu_AUTO_NLP_CNG_ON : ecuauto.h
  • ecu_AUTO_NLP_OFF : ecuauto.h
  • ecu_AUTO_NLP_ON : ecuauto.h
  • ecu_AUTO_NOERR : ecuauto.h
  • ecu_AUTO_NUM_OUTFILES : ecuauto.h
  • ecu_AUTO_PCM_ALAW : ecuauto.h
  • ecu_AUTO_PCM_LIN : ecuauto.h
  • ecu_AUTO_PCM_ULAW : ecuauto.h
  • ecu_AUTO_RXSGN : ecuauto.h
  • ecu_AUTO_TXSGN : ecuauto.h

- p -

  • piu_BID_SILENCE_DETECTION : piu.h
  • piu_BIDIR_SILENCE_DETECTED : piu.h
  • piu_CLOSED : piuloc.h
  • piu_COMP_ALAW : piu.h
  • piu_COMP_FIRST : piu.h
  • piu_COMP_LAST : piu.h
  • piu_COMP_LINEAR : piu.h
  • piu_COMP_ULAW : piu.h
  • piu_DC_OFFSET_DISABLE : piu.h
  • piu_DC_OFFSET_MODE1 : piu.h
  • piu_DC_OFFSET_MODE2 : piu.h
  • piu_DC_OFFSET_REMOVAL : piu.h
  • piu_DISABLE_UNDERRUN_REPORT : piu.h
  • piu_ENABLE_UNDERRUN_REPORT : piu.h
  • piu_ERROR : piu.h
  • piu_EXC_DELETE : piu.h
  • piu_EXC_OPEN : piu.h
  • piu_EXC_SUBFRAMESIZE : piu.h
  • piu_GET_LEVELS : piu.h
  • piu_NOERR : piu.h
  • piu_NOMEMORY : piu.h
  • piu_OPEN : piuloc.h
  • piu_PATTERN_DETECTED : piu.h
  • piu_PATTERN_DETECTION : piu.h
  • piu_PATTERN_GENERATION : piu.h
  • piu_PCM_PATTERN_CUSTOM : piuloc.h
  • piu_PCM_PATTERN_E1 : piuloc.h
  • piu_PCM_PATTERN_T1 : piuloc.h
  • piu_SET_COMPANDING : piu.h
  • piu_SET_FRAME_SIZE : piu.h
  • piu_SET_IDLE_NOISE_LEVEL : piu.h
  • piu_SET_LOOPBACK : piu.h
  • piu_UNDERRUN : piu.h

- s -

  • SIU_ERROR : siu.h
  • SIU_NOERR : siu.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- a -

  • acmpr() : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- l -

  • lec_auto_initialize() : ecuauto.c , ecuauto.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- m -

  • main() : ecuauto.c , ecusim.c
  • mucmpr() : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- c -

  • convert_tx_tone_frame() : ecusim.c , ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- e -

  • ecu_auto_addmod_uta() : ecuauto.c , ecuauto.h
  • ecu_auto_banner_print() : ecuauto.c
  • ecu_auto_check_rc() : ecuauto.h , ecuauto.c
  • ecu_auto_close_fout() : ecuauto.c , ecuauto.h
  • ecu_auto_compand() : ecuauto.c , ecuauto.h
  • ecu_auto_create_hyb() : ecuauto.c , ecuauto.h
  • ecu_auto_create_sgn() : ecuauto.c , ecuauto.h
  • ecu_auto_create_uta() : ecuauto.h , ecuauto.c
  • ecu_auto_dline_pack() : ecuauto.c , ecuauto.h
  • ecu_auto_dline_unpack() : ecuauto.c , ecuauto.h
  • ecu_auto_exception() : ecuauto.c , ecuauto.h
  • ecu_auto_gen_sgnfrms() : ecuauto.h , ecuauto.c
  • ecu_auto_halt() : ecuauto.h
  • ecu_auto_init_rxsgn() : ecuauto.c , ecuauto.h
  • ecu_auto_init_txsgn() : ecuauto.c , ecuauto.h
  • ecu_auto_iprint() : ecuauto.c
  • ecu_auto_output_alaw() : ecuauto.c , ecuauto.h
  • ecu_auto_output_lin() : ecuauto.c , ecuauto.h
  • ecu_auto_output_pcm() : ecuauto.h , ecuauto.c
  • ecu_auto_output_ulaw() : ecuauto.c , ecuauto.h
  • ecu_auto_print() : ecuauto.c , ecumem.h
  • ecu_auto_process_uta() : ecuauto.h , ecuauto.c
  • ecu_auto_sample_cnt() : ecuauto.c , ecuauto.h
  • ecu_auto_set_defaults() : ecuauto.c , ecuauto.h
  • ecu_auto_sprint() : ecuauto.c
  • ecu_auto_write_pcm() : ecuauto.c
  • ecu_halt() : ecusim.c , ecusimfunc.c
  • ecu_mem_align() : ecumem.c , ecumem.h
  • ecu_mem_alloc_align() : ecumem.c , ecumem.h
  • ecu_mem_alloc_eco() : ecumem.c , ecumem.h
  • ecu_mem_heap_alloc() : ecumem.c
  • ecu_mem_heap_init() : ecumem.c
  • ecu_mem_init_heap() : ecumem.c , ecumem.h
  • ecu_send_out() : ecusim.h , ecusim.c , ecusimfunc.c
  • ecu_sim_fileio_end() : ecufio.c , ecufio.h
  • ecu_sim_fileio_init() : ecufio.h , ecufio.c
  • ecu_sim_fread() : ecufio.c , ecufio.h
  • ecu_sim_fwrite() : ecufio.c , ecufio.h
  • ecu_sim_get_linear() : ecufio.c
  • ecu_sim_get_xlaw() : ecufio.c
  • ecu_sim_init() : ecusimfunc.c , ecusim.c
  • ecu_sim_input() : ecufio.c , ecufio.h
  • ecu_sim_output() : ecufio.c , ecufio.h
  • ecu_sim_put_linear() : ecufio.c
  • ecuAuto_close_chn() : ecuauto.h , ecuauto.c
  • ecuAuto_config_chn() : ecuauto.h , ecuauto.c
  • ecuAuto_create_chn() : ecuauto.c , ecuauto.h
  • ecuAuto_delete_chn() : ecuauto.h , ecuauto.c
  • ecuAuto_get_filter() : ecuauto.h , ecuauto.c
  • ecuAuto_open_chn() : ecuauto.h , ecuauto.c
  • ecuAuto_prep_fout() : ecuauto.h , ecuauto.c
  • ecuAuto_process_loop() : ecuauto.h , ecuauto.c
  • ecucmd_chncfg_handler() : ecuuta.c , ecuuta.h
  • ecucmd_chndel_handler() : ecuuta.h , ecuuta.c
  • ecucmd_chnnew_handler() : ecuuta.h , ecuuta.c
  • ecucmd_close_handler() : ecuuta.c , ecuuta.h
  • ecucmd_getflt_handler() : ecuuta.c , ecuuta.h
  • ecucmd_open_handler() : ecuuta.c , ecuuta.h
  • ecucmd_output_handler() : ecuuta.c , ecuuta.h
  • ecucmd_runsim_handler() : ecuuta.c , ecuuta.h
  • ecusim_profile_close() : ecuprof.c , ecuprof.h
  • ecusim_profile_init() : ecuprof.c , ecuprof.h
  • ecusim_profile_print() : ecuprof.c , ecuprof.h
  • ecusim_profile_start() : ecuprof.h , ecuprof.c
  • ecusim_profile_stop() : ecuprof.h , ecuprof.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- g -

  • generate_rx_tone_frame() : ecusim.c , ecusimfunc.c
  • generate_tx_tone_frame() : ecusimfunc.c , ecusim.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- p -

  • piu_bid_silence_detect() : piuloc.h , piutxrx.c
  • piu_energy_dc_measurement() : piuloc.h
  • piu_exception() : piu.c , piuloc.h
  • piu_frame_DClevel() : piuloc.h , piufutil.c
  • piu_frame_energy() : piuloc.h , piufutil.c
  • piu_get_stats() : piuloc.h , piutxrx.c
  • piu_loopback_config() : piu.c
  • piu_pcm_companding() : piuloc.h , piutxrx.c
  • piu_pcm_compressing() : piuloc.h , piutxrx.c
  • piu_pcm_pattern_detect() : piuloc.h , piutxrx.c
  • piu_pcm_pattern_generate() : piuloc.h , piutxrx.c
  • piu_remove_dc_component() : piuloc.h , piufutil.c
  • piu_reset_receive_in_buf() : piu.c
  • piu_update_buf_ptr() : piutxrx.c , piuloc.h
  • piuBidSilenceDetect() : piu.c
  • piuClose() : piu.c , piu.h
  • piuControl() : piu.h , piu.c
  • piuDcOffsetRemoval() : piu.h , piu.c
  • piuDelete() : piu.c , piu.h
  • piuGetSizes() : piuinit.c , piu.h
  • piuNew() : piu.h , piuinit.c
  • piuOpen() : piu.c , piu.h
  • piuPatternDetect() : piu.c
  • piuPatternGeneration() : piu.c
  • piuReceiveIn() : piutxrx.c , piu.h
  • piuReceiveOut() : piu.h , piuisr.c
  • piuSendIn() : piuisr.c , piu.h
  • piuSetCompanding() : piu.c
  • piuTxRxProc() : piu.h , piutxrx.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- s -

  • search() : ecusimfunc.c
  • siu_new_ecu() : ecusim.c , ecusimfunc.c
  • siu_new_piu() : siuloc.h , siumgr.c
  • siu_open_ecu() : ecusim.c , ecusimfunc.c
  • siu_open_piu() : siuloc.h , siumgr.c
  • siu_open_rxsgn() : ecusim.c , ecusimfunc.c
  • siu_open_tx() : siuloc.h , siumgr.c
  • siu_open_txhyb() : ecusimfunc.c , ecusim.c
  • siu_open_txsgn() : ecusimfunc.c , ecusim.c
  • siu_rx_file() : ecusimfunc.c
  • siu_set_sgn() : ecusimfunc.c , ecusim.c
  • siu_spad_process() : siuloc.h
  • siu_tuint_to_hex() : ecusimfunc.c , siu.c
  • siu_tx_execute() : siutx.c
  • siu_tx_file() : ecusimfunc.c
  • siu_tx_sleep() : siutx.c
  • siu_tx_wake_up() : siutx.c
  • siuCAlloc() : siuloc.h
  • siuDebug() : siuloc.h , siu.c
  • siuDebugInfo() : siuloc.h , siu.c
  • siuDebugInfoNew() : ecusimfunc.c , siu.h , ecusim.c
  • siuDebugInternal() : siu.c
  • siuException() : siuloc.h , siu.c
  • siuInit() : siu.h , siu.c
  • siuPcmSampleTrace() : ecusimfunc.c , siu.h , ecusim.c
  • siuPiuReport() : siu.h , ecusimfunc.c , ecusim.c
  • siuTxMain() : siutx.c
  • siuTxOpen() : siutx.c , siu.h
  • siuTxRxSendIn() : ecusimfunc.c , siu.h , ecusim.c
  • siuTxSendIn() : siutx.c , siu.h
  • siuUpdateECUPowers() : ecusimfunc.c
  • siuVAlloc() : siuloc.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- t -

  • thwClockSet() : ecusimfunc.c


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • e
  • g
  • l
  • m
  • p
  • s
  • t
  • u

- u -

  • UAExpand() : piu.h , piuexpan.c


ECU Test: Data Fields

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

  • piuInst_t : piuloc.h
  • siuSetup_t : ecusim.h


ECU Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • v

- a -

  • autoBreak : ecuauto.c
  • autoCfg : ecuauto.c
  • AutoDssFileType : ecuauto.c
  • AutoDssMemAddr : ecuauto.c
  • AutoDssMemCount : ecuauto.c
  • AutoDssPcmFormat : ecuauto.c
  • autoErrorId : ecuauto.c

- e -

  • ecu_bg_e : ecuiram.c
  • ecu_bg_filter : ecuiram.c
  • ecu_bg_work : ecuiram.c
  • ecu_fg_filter : ecuiram.c
  • ecuAutoConfig : ecuauto.c
  • ecuAutoEcuInst : ecuauto.c
  • ecuAutoFrameSize : ecuauto.c
  • ecuAutoFrmIndex : ecuauto.c
  • ecuAutoFrmRemain : ecuauto.c
  • ecuAutoHybInst : ecuauto.c
  • ecuAutoSgnInst : ecuauto.c
  • ecuAutoUtaInst : ecuauto.c
  • ecuBoolVals : ecuuta.c
  • ecuBuild : ecuauto.c
  • ecuChncfgOpts : ecuuta.c , ecuuta.h
  • ecuChnnewOpts : ecuuta.c , ecuuta.h
  • ecuCommands : ecuuta.h , ecuuta.c
  • ecuContext : ecmemdef.c , ecuauto.c
  • ecuFilterVals : ecuuta.c
  • ecuGetfltOpts : ecuuta.h , ecuuta.c
  • ecuHeap : ecumem.c
  • ecuMarkVals : ecuuta.c
  • ecuMem1 : ecumem.c
  • ecuMem2 : ecumem.c
  • ecuOpenOpts : ecuuta.c , ecuuta.h
  • ecuOutputOpts : ecuuta.c , ecuuta.h
  • ecuPatch : ecuauto.c
  • ecuPcmVals : ecuuta.c
  • ecuProfile : ecuprof.c , ecuprof.h
  • ecuRevision : ecuauto.c
  • ecuRunsimOpts : ecuuta.c , ecuuta.h
  • ecuSim : ecufio.c , ecusimfunc.c , ecusim.c
  • ecuVersion : ecuauto.c

- f -

  • file_string : ecuauto.c

- g -

  • gelFlag : ecusimfunc.c

- h -

  • hybTxInst : ecusim.c , ecusimfunc.c
  • hybUserFilter : ecusimfunc.c

- i -

  • iramSeg : ecuiram.c , ecuiram.h

- m -

  • markBuffer : ecuauto.c

- o -

  • outFile : ecuauto.c , ecuauto.h

- p -

  • piu_ecu_receive : ecuiram.c
  • piu_segment_in : ecusimfunc.c , ecusim.c
  • piu_segment_out : ecusim.c
  • piuBufs : piuinit.c
  • piuContext : piu.c , piu.h
  • print_string : ecuauto.c

- r -

  • rinBuffer : ecuauto.c , ecufio.h , ecusimfunc.c
  • routBuffer : ecuauto.c , ecufio.h , ecusimfunc.c
  • rx_frame_in : ecusim.c
  • rx_segment_out : ecusim.c

- s -

  • seg_end : ecusimfunc.c
  • segment_in : ecusim.c
  • sgnrxBuffer : ecuauto.c
  • sgnRxInst : ecusim.c , ecusimfunc.c
  • sgntxBuffer : ecuauto.c
  • sgnTxInst : ecusim.c , ecusimfunc.c
  • sinBuffer : ecuauto.c , ecufio.h , ecusimfunc.c
  • siu_core_heap : cheap.h , cheap.c
  • siu_dbg_id : siu.c
  • siu_dbg_message : siu.c
  • siu_getflt : ecusim.c
  • siu_piu_report_code : ecusimfunc.c
  • siu_voice_heap : vheap.c , vheap.h
  • siuContext : siu.c , siuloc.h
  • siuInACmpStream : ecusimfunc.c , ecusim.c
  • siuInst : siu.c , siuloc.h
  • siuInStream : ecusimfunc.c , ecusim.c
  • siuInUCmpStream : ecusim.c , ecusimfunc.c
  • siuOutErrStream : ecusim.c , ecusimfunc.c
  • siuOutStream : ecusimfunc.c
  • siuRxInStream : ecusimfunc.c , ecusim.c
  • siuSetup : ecusimfunc.c
  • soutBuffer : ecuauto.c , ecufio.h , ecusimfunc.c

- v -

  • v21_flags : ecusimfunc.c


ECU 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.


ECU Test: ECU Unit Test

ECU Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. ECU MIPS Profiling
  5. 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 into CCSV5 and build. All projects will reside in the ecu\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main ECU documentation.

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.X or above and may be used for those who haven't yet upgraded to CCS version 4.X or above.

  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.X or above.

  1. Open CCS
  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
  • ECU MIPS Profiling
  • CCS Project Conversion
  • Disclaimer


ECU Test: piu.c File Reference

  • File List
  • Globals

piu.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/util/wng.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/piuloc.h>
#include <ti/mas/ecu/test/src/piuport.h>

Include dependency graph for piu.c:

Go to the source code of this file.

Functions

void | piu_exception (tuint ID, tuint code)
void | piuDelete (void **piuInst, tint nbufs, ecomemBuffer_t *bufs)
void | piu_reset_receive_in_buf (piuInst_t *inst)
void | piuSetCompanding (piuInst_t *inst, piuCompandingCfg_t *cfg)
void | piuOpen (void *piuInst, piuConfig_t *cfg)
void | piuClose (void *piuInst)
void | piuBidSilenceDetect (void *piuInst, bidSilenceDet_t *ctrl)
void | piuPatternDetect (void *piuInst, pcmPatternDet_t *pattern_detect)
void | piuPatternGeneration (void *piuInst, pcmPatternGen_t *ctrl)
void | piu_loopback_config (void *piuInst, tint selection)
void | piuDcOffsetRemoval (void *piuInst, tint mode)
tint | piuControl (void *piuInst, piuControl_t *ctl)

Variables

piuContext_t piuContext

Function Documentation

void piu_exception | ( | tuint | ID,
 |  | tuint | code
 | ) |  |

Definition at line 38 of file piu.c.

References piuContext_t::debugInfo, and piuContext.

void piuDelete | ( | void ** | piuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Definition at line 55 of file piu.c.

References piu_CLOSED, piu_exc_assert, piu_EXC_DELETE, and piuInst_s::state.

void piu_reset_receive_in_buf ( piuInst_t * inst )

Definition at line 68 of file piu.c.

References receive_in_buf_t::end_ptr, receive_in_buf_t::in_ptr, receive_in_buf_t::out_ptr, piuInst_s::receive_in_buf, receive_in_buf_t::segment_count, piuInst_s::segment_size, receive_in_buf_t::start_ptr, and receive_in_buf_t::top_ptr.

Referenced by piuControl(), and piuOpen().

void piuSetCompanding | ( | piuInst_t * | inst,
 |  | piuCompandingCfg_t * | cfg
 | ) |  |

Definition at line 84 of file piu.c.

References piuCompandingCfg_t::law, piuCompandingCfg_t::pcm_expand_table, piuInst_s::pcm_expand_table, piuInst_s::pcm_format, piu_ALAW_SILENCE, piu_COMP_ALAW, piu_COMP_ULAW, piu_LINEAR_SILENCE, piu_MULAW_SILENCE, and piuInst_s::silence_pattern.

Referenced by piuControl(), and piuOpen().

void piuOpen | ( | void * | piuInst,
 |  | piuConfig_t * | cfg
 | ) |  |

Definition at line 108 of file piu.c.

References piuInst_s::bidSilence, piuConfig_t::companding, piuInst_s::energy_DClevel, piuInst_s::generatePattern, piuInst_s::mode_bitfield, piu_CLOSED, piu_CTRL_BIT_RECV_IN_BUF_EMPTY, piu_CTRL_BIT_TRANSPARENT_MODE, piu_CTRL_BIT_TRIPLE_RX_BUF, piu_CTRL_BIT_USE_RECV_OUT_BUF, piu_exc_assert, piu_EXC_OPEN, piu_EXC_SUBFRAMESIZE, piu_NUMSEGM_RX2, piu_NUMSEGM_RX3, piu_NUMSEGM_TX, piu_OPEN, piu_reset_receive_in_buf(), piuSetCompanding(), piuInst_s::receive_out_buf, piuInst_s::receive_out_buf_ptr, piuInst_s::reportOutTargetInst, piuConfig_t::reportOutTargetInst, piuInst_s::rx_delay, piuConfig_t::rx_delay, piuInst_s::rx_overflow_cnt, piuInst_s::rx_underflow_cnt, piuEnergyDCLevel_t::rxDClevel, piuEnergyDCLevel_t::rxEnergy, bidSilenceCtrl_t::rxSilDetEnergy, piuConfig_t::segment_size, piuInst_s::segment_size, piuInst_s::send_out_buf, piuInst_s::send_out_buf_ptr, piuInst_s::sendOutIsrTargetInst, piuConfig_t::sendOutIsrTargetInst, piuInst_s::sendOutProcTargetInst, piuConfig_t::sendOutProcTargetInst, piuInst_s::state, piuConfig_t::transp_mode, piuEnergyDCLevel_t::txDClevel, piuEnergyDCLevel_t::txEnergy, bidSilenceCtrl_t::txSilDetEnergy, and piuConfig_t::use_recv_out_buf.

Referenced by siu_open_piu().

Here is the call graph for this function:

void piuClose ( void * piuInst )

Definition at line 180 of file piu.c.

References piu_CLOSED, and piuInst_s::state.

void piuBidSilenceDetect | ( | void * | piuInst,
 |  | bidSilenceDet_t * | ctrl
 | ) |  |

Definition at line 202 of file piu.c.

References piuInst_s::bidSilence, bidSilenceCtrl_t::cnt, bidSilenceDet_t::enable, piuInst_s::energy_DClevel, bidSilenceDet_t::hangover, bidSilenceCtrl_t::initCnt, piuInst_s::mode_bitfield, piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR, piu_CTRL_BIT_BID_SILENCE_DET, piuEnergyDCLevel_t::rxDClevel, bidSilenceCtrl_t::rxSilDetEnergy, bidSilenceCtrl_t::threshold, bidSilenceDet_t::threshold, piuEnergyDCLevel_t::txDClevel, and bidSilenceCtrl_t::txSilDetEnergy.

Referenced by piuControl().

void piuPatternDetect | ( | void * | piuInst,
 |  | pcmPatternDet_t * | pattern_detect
 | ) |  |

Definition at line 242 of file piu.c.

References piuPcmPatternDetect_t::cnt, pcmPatternDet_t::custom, piuPcmPatternDetect_t::custom, pcmPatternDet_t::enable, piuPcmPatternDetect_t::initCnt, piuInst_s::mode_bitfield, piuInst_s::pcmPattern, piu_CTRL_BIT_PATTERN_DETECT, pcmPatternDet_t::time, pcmPatternDet_t::type, and piuPcmPatternDetect_t::type.

Referenced by piuControl().

void piuPatternGeneration | ( | void * | piuInst,
 |  | pcmPatternGen_t * | ctrl
 | ) |  |

Definition at line 271 of file piu.c.

References pcmPatternGen_t::enable, piuInst_s::generatePattern, piuInst_s::mode_bitfield, pcmPatternGen_t::pattern, and piu_CTRL_BIT_PATTERN_GENERATE.

Referenced by piuControl().

void piu_loopback_config | ( | void * | piuInst,
 |  | tint | selection
 | ) |  |

Definition at line 299 of file piu.c.

References DATA_FLOW_DISABLE, receive_in_buf_t::in_ptr, LIN_LOOPBACK_ON, piuInst_s::mode_bitfield, receive_in_buf_t::out_ptr, PCM_LOOPBACK_ON, piu_CTRL_BIT_DO_LIN_LOOPBACK, piu_CTRL_BIT_DO_PCM_LOOPBACK, piu_CTRL_BIT_LOOPBACK_NOPASS, piuInst_s::receive_in_buf, receive_in_buf_t::segment_count, piuInst_s::segment_size, and receive_in_buf_t::start_ptr.

Referenced by piuControl().

void piuDcOffsetRemoval | ( | void * | piuInst,
 |  | tint | mode
 | ) |  |

Definition at line 332 of file piu.c.

References piuInst_s::mode_bitfield, piu_CTRL_BIT_DC_FILTR_SELECT_MODE1, piu_CTRL_BIT_REMOVE_DC_COMP, piu_DC_OFFSET_DISABLE, and piu_DC_OFFSET_MODE1.

Referenced by piuControl().

tint piuControl | ( | void * | piuInst,
 |  | piuControl_t * | ctl
 | ) |  |

Definition at line 367 of file piu.c.

References piuControl_t::bid_silence_detect, piuControl_t::companding, piuControl_t::ctl_code, piuControl_t::dc_offset_removal_select, setFrame_t::frame_size, piuControl_t::loopback_select, piuInst_s::mode_bitfield, piuControl_t::pattern_detect, piuControl_t::pattern_generate, PIU_BEGIN_CRITICAL_SECTION, piu_BID_SILENCE_DETECTION, piu_CTRL_BIT_UNDERRUN_REPORT, piu_DC_OFFSET_REMOVAL, piu_DISABLE_UNDERRUN_REPORT, piu_ENABLE_UNDERRUN_REPORT, PIU_END_CRITICAL_SECTION, piu_ERROR, piu_GET_LEVELS, piu_get_stats(), piu_loopback_config(), piu_NOERR, piu_OPEN, piu_PATTERN_DETECTION, piu_PATTERN_GENERATION, piu_reset_receive_in_buf(), piu_SET_COMPANDING, piu_SET_FRAME_SIZE, piu_SET_LOOPBACK, piuBidSilenceDetect(), piuDcOffsetRemoval(), piuPatternDetect(), piuPatternGeneration(), piuSetCompanding(), setFrame_t::receive_in_buf, piuInst_s::receive_in_buf, piuInst_s::receive_out_buf, piuInst_s::receive_out_buf_ptr, piuInst_s::segment_size, piuInst_s::send_out_buf, setFrame_t::send_out_buf, piuInst_s::send_out_buf_ptr, piuControl_t::set_frame, receive_in_buf_t::start_ptr, piuInst_s::state, piuControl_t::stats, and piuControl_t::u.

Referenced by main().

Here is the call graph for this function:

Variable Documentation

piuContext_t piuContext

Definition at line 30 of file piu.c.

Referenced by piu_bid_silence_detect(), piu_exception(), piu_pcm_pattern_detect(), piuReceiveOut(), piuSendIn(), and piuTxRxProc().


ECU Test: piu.c Source File

  • File List
  • Globals

piu.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * PURPOSE : Main source file for the PCM Interface Unit (PIU).
00003  ******************************************************************************
00004  * FILE NAME:   piu.c
00005  *
00006  * DESCRIPTION: Contains main PIU functions.
00007  *
00008  * $Id: piu.c 1.29.1.5 1999/06/03 17:18:47 BONAL Exp $
00009  *
00010  * (C) Copyright 1995, 1996, 1997, 1998, Telogy Networks Inc.
00011  *****************************************************************************/
00012 /* Ansi C header files */
00013 #include <stdlib.h>
00014
00015 /* System Level header files */
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/fract/fract.h>
00018
00019 /* System Utilities' API's */
00020 #include <ti/mas/util/utl.h>
00021 #include <ti/mas/util/debug.h>
00022 #include <ti/mas/util/wng.h>
00023
00024 /* PIU related header files */
00025 #include <ti/mas/ecu/test/src/piu.h>
00026 #include <ti/mas/ecu/test/src/piuloc.h>
00027 #include <ti/mas/ecu/test/src/piuport.h>
00028
00029 /* Allocate the global ecu Context */
00030 piuContext_t piuContext;
00031
00032 /******************************************************************************
00033  * FUNCTION PURPOSE: Exception function
00034  ******************************************************************************
00035  * DESCRIPTION: Relays a fatal exception through the global exception
00036  *              pointer.
00037  *****************************************************************************/
00038 void piu_exception(tuint ID, tuint code)
00039 {
00040    piuContext.debugInfo ((void *)&ID, dbg_EXCEPTION_FATAL, code, 0, NULL);
00041 }
00042 /*****************************************************************************
00043  * FUNCTION PURPOSE: Delete a PIU instance
00044  *****************************************************************************
00045  * DESCRIPTION: Deletes an instance of PIU. Deallocates any memory allocated
00046  *              in piuNew() including PIU instance structure.
00047  *
00048  *   void piuDelete (
00049  *     void        **piuInst, - an address of memory location that contains
00050  *                              a pointer to instance structure
00051  *     tint        nbufs,     - number of memory buffers
00052  *     memBuffer_t *bufs)     - a vector of buffer descriptors
00053  *
00054  ****************************************************************************/
00055 void piuDelete (void **piuInst, tint nbufs, ecomemBuffer_t *bufs)
00056 {
00057   piuInst_t    *inst    = (piuInst_t *) *piuInst;
00058
00059   piu_exc_assert ((inst->state == piu_CLOSED), piu_EXC_DELETE, inst);
00060
00061   /* Mark the instance as free */
00062   *piuInst = NULL;
00063 } /* piuDelete */
00064
00065 /*****************************************************************************
00066  * FUNCTION PURPOSE: reset piu receive in buffer
00067  ****************************************************************************/
00068 void piu_reset_receive_in_buf (piuInst_t *inst)
00069 {
00070   inst->receive_in_buf.in_ptr  = inst->receive_in_buf.out_ptr =
00071   inst->receive_in_buf.end_ptr = inst->receive_in_buf.start_ptr;
00072   while ((inst->receive_in_buf.top_ptr - inst->receive_in_buf.end_ptr)
00073           >= inst->segment_size) {
00074     inst->receive_in_buf.end_ptr += inst->segment_size;
00075   };
00076   inst->receive_in_buf.segment_count = 0;
00077 } /* piu_reset_receive_in_buf */
00078 /*****************************************************************************
00079  * FUNCTION PURPOSE:
00080  *****************************************************************************
00081  * DESCRIPTION:
00082  *
00083  *****************************************************************************/
00084 void piuSetCompanding (piuInst_t *inst, piuCompandingCfg_t *cfg)
00085 {
00086   inst->pcm_expand_table  = cfg->pcm_expand_table;
00087   inst->pcm_format        = cfg->law;
00088   if (inst->pcm_format == piu_COMP_ULAW)
00089     inst->silence_pattern = piu_MULAW_SILENCE;
00090   else if (inst->pcm_format == piu_COMP_ALAW)
00091     inst->silence_pattern = piu_ALAW_SILENCE;
00092   else
00093     inst->silence_pattern = piu_LINEAR_SILENCE;
00094 }
00095
00096 /*****************************************************************************
00097  * FUNCTION PURPOSE: Open and configure a specific instance of a PIU
00098  *****************************************************************************
00099  * DESCRIPTION: This routine initializes and configures a specific instance
00100  * of a PIU. Instance structure is assumed to be allocated by piuNew(). In
00101  * case of error, generates an exception.
00102  *
00103  *   void piuOpen (
00104  *     void        *piuInst, - A pointer to PIU instance
00105  *     piuConfig_t *cfg)     - A pointer to PIU configuration structure
00106  *
00107   ****************************************************************************/
00108 void piuOpen (void *piuInst, piuConfig_t *cfg)
00109 {
00110   piuInst_t    *inst    = (piuInst_t *) piuInst;
00111   piu_exc_assert ((inst->state == piu_CLOSED), piu_EXC_OPEN, inst);
00112
00113   /* The TRIPLE_RX_BUF mode is controlled by piuNew(), so don't wipe it here */
00114   inst->mode_bitfield &= piu_CTRL_BIT_TRIPLE_RX_BUF;
00115   inst->mode_bitfield |= piu_CTRL_BIT_RECV_IN_BUF_EMPTY;
00116
00117   if (cfg->transp_mode) { /* Set transparent mode flag */
00118     inst->mode_bitfield    |= piu_CTRL_BIT_TRANSPARENT_MODE;
00119   }
00120   /* set compression mode - u-law or A-law */
00121   piuSetCompanding(inst, &cfg->companding);
00122
00123   /* segment_size is not more than what is assigned in piuNew and must be
00124    *  a multiple of sub_segment_size! */
00125   piu_exc_assert (cfg->segment_size > 0, piu_EXC_SUBFRAMESIZE, inst);
00126
00127   inst->segment_size      = cfg->segment_size;
00128   inst->rx_underflow_cnt  = inst->rx_overflow_cnt  = 0;
00129   inst->rx_delay          = cfg->rx_delay;
00130
00131   /* Initialize energy and DC level */
00132   inst->energy_DClevel.txEnergy  = inst->energy_DClevel.rxEnergy
00133   = inst->energy_DClevel.txDClevel = inst->energy_DClevel.rxDClevel = 0;
00134
00135   /* Initialize bi-directional silence detedtion parameters */
00136   inst->bidSilence.txSilDetEnergy = inst->bidSilence.rxSilDetEnergy = 0;
00137   /* Initialize target instances of report and sendout functions */
00138   inst->reportOutTargetInst    = cfg->reportOutTargetInst;
00139   inst->sendOutProcTargetInst  = cfg->sendOutProcTargetInst;
00140   inst->sendOutIsrTargetInst   = cfg->sendOutIsrTargetInst;
00141
00142   /* By default pattern generation is diabled */
00143   inst->generatePattern = 0;             /* Default pattern */
00144
00145   /* use receive out buf or not; if not allocated in new, do not use it */
00146   inst->receive_out_buf_ptr = inst->receive_out_buf;
00147   if (cfg->use_recv_out_buf) {
00148     tuint loc_segment_size;
00149
00150     loc_segment_size =
00151       (inst->mode_bitfield & piu_CTRL_BIT_TRIPLE_RX_BUF ? piu_NUMSEGM_RX3 : piu_NUMSEGM_RX2);
00152 #if PIUDLCOMP_ENABLE
00153     loc_segment_size *= (inst->segment_size>>1);
00154 #else
00155     loc_segment_size *= inst->segment_size;
00156 #endif
00157     utlLsMemSet (inst->receive_out_buf, (linSample) 0, loc_segment_size);
00158     inst->mode_bitfield |= piu_CTRL_BIT_USE_RECV_OUT_BUF;
00159   }
00160
00161   /* initialize send-out buffer */
00162   inst->send_out_buf_ptr = inst->send_out_buf;
00163   utlLsMemSet ( inst->send_out_buf, (linSample) 0,
00164                 piu_NUMSEGM_TX * inst->segment_size );
00165
00166   /* initialize receive_in buffer */
00167   piu_reset_receive_in_buf(inst);
00168   inst->state = piu_OPEN;     /* set state to open */
00169
00170 } /* piuOpen */
00171
00172 /*****************************************************************************
00173  * FUNCTION PURPOSE: Close an instance of a PIU
00174  *****************************************************************************
00175  * DESCRIPTION: Closes a PIU instance.
00176  *
00177  *   void piuClose ( void *piuInst ) - A pointer to PIU instance
00178  *
00179  ****************************************************************************/
00180 void piuClose ( void *piuInst )
00181 {
00182   piuInst_t *inst = (piuInst_t *) piuInst ;
00183
00184   /* set state to closed */
00185   inst->state = piu_CLOSED ;
00186 } /* piuClose */
00187
00188 /*****************************************************************************
00189  * FUNCTION PURPOSE: Bidirectional Silence Detection Enable/Disable
00190  *****************************************************************************
00191  * DESCRIPTION: The signal power level calculation for both directions is
00192  *              running all the time. This function enables or disables
00193  *              Bidirectional Silence Detection.
00194  *
00195  * void piuBidSilenceDetect (
00196  *   void *piuInst,  - instance structure
00197  *   tbool enable,    - enable/disable
00198  *   tint threshold, - power level under which the signal absence is declared
00199  *   tint hangover)  - in [ms], during which continuous absence is necessary
00200  *
00201  ****************************************************************************/
00202 void piuBidSilenceDetect (void *piuInst, bidSilenceDet_t *ctrl)
00203 {
00204   LFract    lin_thres;
00205   piuInst_t *inst = (piuInst_t *) piuInst;
00206   LFract    linpwr;
00207
00208   if (ctrl->enable) {
00209     linpwr = utldB2LinPower(frctAdjustQ (ctrl->threshold, 0, 4));
00210     inst->bidSilence.threshold = frctAdjustQ(linpwr,0,piu_ENERGY_Q);
00211     inst->bidSilence.initCnt   = (ctrl->hangover)<< piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR;
00212     inst->bidSilence.cnt       = inst->bidSilence.initCnt;
00213     inst->bidSilence.txSilDetEnergy = inst->energy_DClevel.txDClevel;
00214     inst->bidSilence.rxSilDetEnergy = inst->energy_DClevel.rxDClevel;
00215     lin_thres                       = inst->bidSilence.threshold*8;
00216     if (inst->energy_DClevel.txDClevel > lin_thres)
00217       inst->bidSilence.txSilDetEnergy = lin_thres;
00218     if (inst->energy_DClevel.rxDClevel > lin_thres)
00219       inst->bidSilence.rxSilDetEnergy = lin_thres;
00220
00221     /* sequence is important, this command has to be the last */
00222     inst->mode_bitfield |= piu_CTRL_BIT_BID_SILENCE_DET;
00223   }
00224   else
00225     inst->mode_bitfield &= (~piu_CTRL_BIT_BID_SILENCE_DET);
00226 } /* piuBidSilenceDetect */
00227
00228 /*****************************************************************************
00229  * FUNCTION PURPOSE: Detect presence/absence of specified pattern.
00230  *****************************************************************************
00231  * DESCRIPTION: If the specified pattern is present on the PCM interface, for
00232  *              specified duration of time, the detection message will be sent.
00233  *
00234  * void piuPatternDetect (
00235  *   void *piuInst,   - instance structure
00236  *   tbool enable,     - enable/disable
00237  *   tint type,       - custom, T1 or E1
00238  *   tint time,       - in [ms]
00239  *   tint custom)     - custom pattern to be detected.
00240  *
00241  ****************************************************************************/
00242 void piuPatternDetect (void *piuInst, pcmPatternDet_t *pattern_detect)
00243 {
00244   piuInst_t             *inst       = (piuInst_t *) piuInst;
00245   piuPcmPatternDetect_t *pcmPattern = &inst->pcmPattern;
00246
00247   if (pattern_detect->enable)
00248   {
00249     /* initialization */
00250     pcmPattern->type    = pattern_detect->type;
00251     pcmPattern->initCnt = pattern_detect->time;
00252     pcmPattern->cnt     = (pcmPattern->initCnt * 8); /* [ms] to [samples] */
00253     pcmPattern->custom  = pattern_detect->custom;
00254
00255     inst->mode_bitfield |= piu_CTRL_BIT_PATTERN_DETECT;
00256   }
00257   else
00258     inst->mode_bitfield &= (~piu_CTRL_BIT_PATTERN_DETECT);
00259 } /* piuPatternDetect */
00260
00261 /*****************************************************************************
00262  * FUNCTION PURPOSE: SIU passing pattern generation info to PIU
00263  *****************************************************************************
00264  * DESCRIPTION: This function passes the patterngeneration info from MIC
00265  *        message to PIU instance
00266  * void piuPatternGeneration(
00267  *   void *piuInst,       - Pointer to PIU instance
00268  *   tuint patternGenControl, - Pattern generation enable/disable flag
00269  *   tint pattern)        - Pattern to be generated
00270  *****************************************************************************/
00271 void piuPatternGeneration(void *piuInst, pcmPatternGen_t *ctrl)
00272 {
00273   piuInst_t *inst   = (piuInst_t *) piuInst;
00274   tuint     pattern = ctrl->pattern;
00275
00276   if(ctrl->enable)
00277   {
00278     inst->mode_bitfield  |= piu_CTRL_BIT_PATTERN_GENERATE;
00279     inst->generatePattern = pattern;
00280   }
00281   else {
00282     inst->mode_bitfield  &= (~piu_CTRL_BIT_PATTERN_GENERATE);
00283     inst->generatePattern = 0;
00284   }
00285 } /* piuPatternGeneration */
00286
00287 /*****************************************************************************
00288  * FUNCTION PURPOSE: Control voice samples loopback mode on a PIU
00289  *****************************************************************************
00290  * DESCRIPTION: Starts voice samples loopback if the loopback_on parameter is
00291  *              TRUE, stops loopback otherwise. Ignores the calls that come
00292  *              within improper state.
00293  *
00294  *   void piu_loopback_config (
00295  *     void *piuInst,    - A pointer to PIU instance
00296  *     tint selection)   - Loopback on if nonzero
00297  *
00298  ****************************************************************************/
00299 void piu_loopback_config (void *piuInst, tint selection)
00300 {
00301   piuInst_t *inst = (piuInst_t *) piuInst;
00302
00303   inst->mode_bitfield &= (~piu_CTRL_BIT_DO_PCM_LOOPBACK);
00304   inst->mode_bitfield &= (~piu_CTRL_BIT_DO_LIN_LOOPBACK);
00305   inst->mode_bitfield &= (~piu_CTRL_BIT_LOOPBACK_NOPASS); /* enable */
00306   if (selection & PCM_LOOPBACK_ON) { /* PCM loopback */
00307     inst->mode_bitfield |= piu_CTRL_BIT_DO_PCM_LOOPBACK;
00308     inst->receive_in_buf.in_ptr  = inst->receive_in_buf.start_ptr;
00309     inst->receive_in_buf.out_ptr = inst->receive_in_buf.start_ptr
00310                                     + inst->segment_size;                /* Why is this so ? */
00311     inst->receive_in_buf.segment_count = -1;
00312   }
00313   if (selection & LIN_LOOPBACK_ON) { /* linear loopback */
00314     inst->mode_bitfield |= piu_CTRL_BIT_DO_LIN_LOOPBACK;
00315   }
00316   if (selection & DATA_FLOW_DISABLE) { /* linear loopback */
00317     inst->mode_bitfield |= piu_CTRL_BIT_LOOPBACK_NOPASS;
00318   }
00319 } /* piu_loopback_config */
00320
00321
00322 /*****************************************************************************
00323  * FUNCTION PURPOSE: SIU passing Dc offset removal information to PIU
00324  *****************************************************************************
00325  * DESCRIPTION: This function passes the Dc offset removal information from MIC
00326  *        message to PIU instance
00327  * void piuDcOffsetRemoval(
00328  *   void *piuInst,       - Pointer to PIU instance
00329  *   tint mode,                 - Selects whether Dc offset removal is diabled
00330  *                                or if enabled then the mode of operation
00331  ******************************************************************************/
00332 void piuDcOffsetRemoval(void *piuInst, tint mode)
00333 {
00334   piuInst_t *inst   = (piuInst_t *) piuInst;
00335
00336   if(mode == piu_DC_OFFSET_DISABLE)
00337   {
00338     inst->mode_bitfield  &= (~piu_CTRL_BIT_REMOVE_DC_COMP);
00339   }
00340   else
00341   { /* DC offset is enabled select mode */
00342     inst->mode_bitfield  |= piu_CTRL_BIT_REMOVE_DC_COMP;
00343     if (mode == piu_DC_OFFSET_MODE1)
00344     {
00345        inst->mode_bitfield |= piu_CTRL_BIT_DC_FILTR_SELECT_MODE1;
00346     }
00347     else
00348     {
00349         inst->mode_bitfield &= (~piu_CTRL_BIT_DC_FILTR_SELECT_MODE1);
00350     }
00351   }
00352 } /* piuDcoffsetRemoval */
00353
00354
00355 /******************************************************************************
00356  * FUNCTION PURPOSE: Enable/disable the processes in PIU
00357  ******************************************************************************
00358  * DESCRIPTION: Enable/disable the processes in PIU.
00359  *
00360  *  tint piuControl (void         *piuInst, - pointer to instance information
00361  *                   piuControl_t *ctl)     - pointer to code/mode information
00362  *
00363  *  return value: piu_NOERR  - success
00364  *                piu_ERROR  - invalid control code or ecu not open
00365  *
00366  *****************************************************************************/
00367 tint piuControl (void *piuInst, piuControl_t *ctl)
00368 {
00369   piuInst_t  *inst = (piuInst_t *) piuInst;
00370   tint        ret_val = piu_NOERR;
00371   tint        code = ctl->ctl_code;
00372
00373   /* make sure the PIU is open */
00374   if (inst->state != piu_OPEN)
00375     return (piu_ERROR);
00376
00377   switch (code) {
00378   case piu_SET_LOOPBACK:
00379     piu_loopback_config (piuInst, ctl->u.loopback_select);
00380     break;
00381   case piu_SET_FRAME_SIZE:
00382     PIU_BEGIN_CRITICAL_SECTION();
00383       inst->segment_size = ctl->u.set_frame.frame_size;
00384       piu_reset_receive_in_buf(inst);
00385       inst->send_out_buf_ptr          = inst->send_out_buf;
00386       inst->receive_out_buf_ptr       = inst->receive_out_buf;
00387       ctl->u.set_frame.send_out_buf   = (tuint *)inst->send_out_buf;
00388       ctl->u.set_frame.receive_in_buf = (tuint *)inst->receive_in_buf.start_ptr;
00389     PIU_END_CRITICAL_SECTION();
00390     break;
00391   case piu_ENABLE_UNDERRUN_REPORT:
00392     inst->mode_bitfield |= piu_CTRL_BIT_UNDERRUN_REPORT;
00393     break;
00394   case piu_DISABLE_UNDERRUN_REPORT:
00395     inst->mode_bitfield &= (~piu_CTRL_BIT_UNDERRUN_REPORT);
00396     break;
00397   case piu_GET_LEVELS:
00398     piu_get_stats (piuInst, (piuStats_t *)&ctl->u.stats);
00399     break;
00400   case piu_PATTERN_GENERATION:
00401     piuPatternGeneration(piuInst, (pcmPatternGen_t *)&ctl->u.pattern_generate);
00402     break;
00403   case piu_PATTERN_DETECTION:
00404     piuPatternDetect (piuInst, (pcmPatternDet_t *)&ctl->u.pattern_detect);
00405     break;
00406   case piu_BID_SILENCE_DETECTION:
00407     piuBidSilenceDetect (piuInst, (bidSilenceDet_t *)&ctl->u.bid_silence_detect);
00408     break;
00409   case piu_SET_COMPANDING:
00410     piuSetCompanding (piuInst, &ctl->u.companding);
00411     break;
00412   case  piu_DC_OFFSET_REMOVAL:
00413     piuDcOffsetRemoval (piuInst, ctl->u.dc_offset_removal_select);
00414     break;
00415
00416   default:  /* invalid control code */
00417     ret_val = piu_ERROR;
00418     break;
00419   }
00420   return (ret_val);
00421 } /* piuControl */
00422 /* nothing past this point */


ECU Test: piu.h File Reference

  • File List
  • Globals

piu.h File Reference

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

Include dependency graph for piu.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | piuStats_t
struct | piuSizeConfig_t
struct | piuContext_t
struct | piuNewConfig_t
struct | bidSilenceDet_t
struct | pcmPatternDet_t
struct | pcmPatternGen_t
struct | piuCompandingCfg_t
struct | setFrame_t
struct | piuControl_t
struct | piuConfig_t

Defines

#define | piu_CTRL_BIT_TRANSPARENT_MODE 0x0001
#define | piu_CTRL_BIT_DO_PCM_LOOPBACK 0x0002
#define | piu_CTRL_BIT_DO_LIN_LOOPBACK 0x0004
#define | piu_CTRL_BIT_REMOVE_DC_COMP 0x0008
#define | piu_CTRL_BIT_LOOPBACK_NOPASS 0x0010
#define | piu_CTRL_BIT_BID_SILENCE_DET 0x0020
#define | piu_CTRL_BIT_PATTERN_DETECT 0x0040
#define | piu_CTRL_BIT_PATTERN_GENERATE 0x0080
#define | piu_CTRL_BIT_USE_RECV_OUT_BUF 0x0100
#define | piu_CTRL_BIT_TRIPLE_RX_BUF 0x0200
#define | piu_CTRL_BIT_RECV_IN_BUF_EMPTY 0x0400
#define | piu_CTRL_BIT_UNDERRUN_REPORT 0x0800
#define | piu_CTRL_BIT_DC_FILTR_SELECT_MODE1 0x1000
#define | piu_ALAW_SILENCE 0x55
#define | piu_MULAW_SILENCE 0x7F
#define | piu_LINEAR_SILENCE 0
#define | LOOPBACK_OFF 0
#define | PCM_LOOPBACK_ON 0x1
#define | LIN_LOOPBACK_ON 0x2
#define | DATA_FLOW_DISABLE 0x10

Enumerations

enum | { piu_NOMEMORY = -1, piu_NOERR = 0, piu_ERROR = 1 }
enum {
piu_COMP_FIRST = const_COMP_FIRST, piu_COMP_ALAW = const_COMP_ALAW_8, piu_COMP_ULAW = const_COMP_MULAW_8, piu_COMP_LINEAR = const_COMP_LINEAR,
piu_COMP_LAST = const_COMP_LAST
}
enum {
piu_SET_LOOPBACK = 0, piu_SET_FRAME_SIZE, piu_SET_IDLE_NOISE_LEVEL, piu_GET_LEVELS,
piu_PATTERN_GENERATION, piu_PATTERN_DETECTION, piu_BID_SILENCE_DETECTION, piu_ENABLE_UNDERRUN_REPORT,
piu_DISABLE_UNDERRUN_REPORT, piu_SET_COMPANDING, piu_DC_OFFSET_REMOVAL
}
enum | { piu_BIDIR_SILENCE_DETECTED = 0, piu_PATTERN_DETECTED = 1, piu_UNDERRUN = 2 }
enum | { piu_EXC_OPEN = 1, piu_EXC_DELETE = 2, piu_EXC_SUBFRAMESIZE = 3 }
enum | { piu_DC_OFFSET_DISABLE = 0, piu_DC_OFFSET_MODE1 = 1, piu_DC_OFFSET_MODE2 = 2 }

Functions

void | piuClose (void *piuInst)
void | piuDelete (void **piuInst, tint nbufs, ecomemBuffer_t *bufs)
tint | piuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, piuSizeConfig_t *cfg)
tint | piuNew (void **piuInst, tint nbufs, ecomemBuffer_t *bufs, piuNewConfig_t *cfg)
void | piuOpen (void *piuInst, piuConfig_t *cfg)
void | piuReceiveIn (void *piuInst, void *speech_samples)
void | piuTxRxProc (void *piuInst, linSample *tx_ptr, linSample *rx_ptr)
tint | piuControl (void *piuInst, piuControl_t *ctl)
void | piuDcOffsetRemoval (void *piuInst, tint mode)
void | UAExpand (tint sub_segment_size, tword *pcm_in, linSample **send_out_buf_ptr_ptr, const tint *pcm_expand_table)
void | piuSendIn (void *piuInst, tword **fromTdm, tuint timeStamp, tuint frameLength)
void | piuReceiveOut (void *piuInst, tword **toTdm, tuint timestamp, tuint frameLength)

Variables

piuContext_t piuContext

Define Documentation

#define piu_CTRL_BIT_TRANSPARENT_MODE 0x0001

Definition at line 30 of file piu.h.

Referenced by piu_pcm_companding(), piu_pcm_compressing(), and piuOpen().

#define piu_CTRL_BIT_DO_PCM_LOOPBACK 0x0002

Definition at line 31 of file piu.h.

Referenced by piu_loopback_config(), piuReceiveIn(), and piuTxRxProc().

#define piu_CTRL_BIT_DO_LIN_LOOPBACK 0x0004

Definition at line 32 of file piu.h.

Referenced by piu_loopback_config(), and piuTxRxProc().

#define piu_CTRL_BIT_REMOVE_DC_COMP 0x0008

Definition at line 33 of file piu.h.

Referenced by piuDcOffsetRemoval(), and piuTxRxProc().

#define piu_CTRL_BIT_LOOPBACK_NOPASS 0x0010

Definition at line 34 of file piu.h.

Referenced by piu_loopback_config(), and piuTxRxProc().

#define piu_CTRL_BIT_BID_SILENCE_DET 0x0020

Definition at line 35 of file piu.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), piuReceiveIn(), and piuTxRxProc().

#define piu_CTRL_BIT_PATTERN_DETECT 0x0040

Definition at line 36 of file piu.h.

Referenced by piu_pcm_pattern_detect(), piuPatternDetect(), and piuTxRxProc().

#define piu_CTRL_BIT_PATTERN_GENERATE 0x0080

Definition at line 37 of file piu.h.

Referenced by piuPatternGeneration(), piuReceiveIn(), and piuTxRxProc().

#define piu_CTRL_BIT_USE_RECV_OUT_BUF 0x0100

Definition at line 38 of file piu.h.

Referenced by piuOpen(), piuReceiveOut(), and piuTxRxProc().

#define piu_CTRL_BIT_TRIPLE_RX_BUF 0x0200

Definition at line 39 of file piu.h.

Referenced by piuNew(), piuOpen(), and piuReceiveIn().

#define piu_CTRL_BIT_RECV_IN_BUF_EMPTY 0x0400

Definition at line 40 of file piu.h.

Referenced by piuOpen(), and piuTxRxProc().

#define piu_CTRL_BIT_UNDERRUN_REPORT 0x0800

Definition at line 41 of file piu.h.

Referenced by piuControl(), and piuTxRxProc().

#define piu_CTRL_BIT_DC_FILTR_SELECT_MODE1 0x1000

Definition at line 42 of file piu.h.

Referenced by piuDcOffsetRemoval(), and piuTxRxProc().

#define piu_ALAW_SILENCE 0x55

Definition at line 60 of file piu.h.

Referenced by piuSetCompanding().

#define piu_MULAW_SILENCE 0x7F

Definition at line 61 of file piu.h.

Referenced by piuSetCompanding().

#define piu_LINEAR_SILENCE 0

Definition at line 62 of file piu.h.

Referenced by piuSetCompanding().

#define LOOPBACK_OFF 0

Definition at line 80 of file piu.h.

#define PCM_LOOPBACK_ON 0x1

Definition at line 81 of file piu.h.

Referenced by piu_loopback_config().

#define LIN_LOOPBACK_ON 0x2

Definition at line 82 of file piu.h.

Referenced by piu_loopback_config().

#define DATA_FLOW_DISABLE 0x10

Definition at line 83 of file piu.h.

Referenced by piu_loopback_config().

Enumeration Type Documentation

anonymous enum

Enumerator:
piu_NOMEMORY
piu_NOERR
piu_ERROR

Definition at line 45 of file piu.h.

anonymous enum

Enumerator:
piu_COMP_FIRST
piu_COMP_ALAW
piu_COMP_ULAW
piu_COMP_LINEAR
piu_COMP_LAST

Definition at line 52 of file piu.h.

anonymous enum

Enumerator:
piu_SET_LOOPBACK
piu_SET_FRAME_SIZE
piu_SET_IDLE_NOISE_LEVEL
piu_GET_LEVELS
piu_PATTERN_GENERATION
piu_PATTERN_DETECTION
piu_BID_SILENCE_DETECTION
piu_ENABLE_UNDERRUN_REPORT
piu_DISABLE_UNDERRUN_REPORT
piu_SET_COMPANDING
piu_DC_OFFSET_REMOVAL

Definition at line 65 of file piu.h.

anonymous enum

Enumerator:
piu_BIDIR_SILENCE_DETECTED
piu_PATTERN_DETECTED
piu_UNDERRUN

Definition at line 86 of file piu.h.

anonymous enum

Enumerator:
piu_EXC_OPEN
piu_EXC_DELETE
piu_EXC_SUBFRAMESIZE

Definition at line 93 of file piu.h.

anonymous enum

Enumerator:
piu_DC_OFFSET_DISABLE
piu_DC_OFFSET_MODE1
piu_DC_OFFSET_MODE2

Definition at line 100 of file piu.h.

Function Documentation

void piuClose ( void * piuInst )

Definition at line 180 of file piu.c.

References piu_CLOSED, and piuInst_s::state.

void piuDelete | ( | void ** | piuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Definition at line 55 of file piu.c.

References piu_CLOSED, piu_exc_assert, piu_EXC_DELETE, and piuInst_s::state.

tint piuGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | piuSizeConfig_t * | cfg
 | ) |  |

Definition at line 62 of file piuinit.c.

References piuSizeConfig_t::max_samples_per_segment, piu_INSTANCE_BUFN, piu_NBUFS, piu_NOERR, piu_NUMSEGM_RX2, piu_NUMSEGM_RX3, piu_NUMSEGM_TX, piu_RECVIN_BUFN, piu_RECVOUT_BUFN, piu_SENDOUT_BUFN, piuBufs, and piuSizeConfig_t::rx_triple_buffering.

Referenced by siu_new_piu().

tint piuNew | ( | void ** | piuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | piuNewConfig_t * | cfg
 | ) |  |

Definition at line 123 of file piuinit.c.

References receive_in_buf_t::end_ptr, piuSizeConfig_t::max_samples_per_segment, piuInst_s::mode_bitfield, piu_CTRL_BIT_TRIPLE_RX_BUF, piu_ERROR, piu_INSTANCE_BUFN, piu_NBUFS, piu_NOMEMORY, piu_NUMSEGM_RX3, piu_RECVIN_BUFN, piu_RECVOUT_BUFN, piu_SENDOUT_BUFN, piuInst_s::receive_in_buf, piuInst_s::receive_out_buf, piuSizeConfig_t::rx_triple_buffering, piuInst_s::send_out_buf, piuNewConfig_t::sizeCfg, and receive_in_buf_t::start_ptr.

Referenced by siu_new_piu().

void piuOpen | ( | void * | piuInst,
 |  | piuConfig_t * | cfg
 | ) |  |

Definition at line 108 of file piu.c.

References piuInst_s::bidSilence, piuConfig_t::companding, piuInst_s::energy_DClevel, piuInst_s::generatePattern, piuInst_s::mode_bitfield, piu_CLOSED, piu_CTRL_BIT_RECV_IN_BUF_EMPTY, piu_CTRL_BIT_TRANSPARENT_MODE, piu_CTRL_BIT_TRIPLE_RX_BUF, piu_CTRL_BIT_USE_RECV_OUT_BUF, piu_exc_assert, piu_EXC_OPEN, piu_EXC_SUBFRAMESIZE, piu_NUMSEGM_RX2, piu_NUMSEGM_RX3, piu_NUMSEGM_TX, piu_OPEN, piu_reset_receive_in_buf(), piuSetCompanding(), piuInst_s::receive_out_buf, piuInst_s::receive_out_buf_ptr, piuConfig_t::reportOutTargetInst, piuInst_s::reportOutTargetInst, piuConfig_t::rx_delay, piuInst_s::rx_delay, piuInst_s::rx_overflow_cnt, piuInst_s::rx_underflow_cnt, piuEnergyDCLevel_t::rxDClevel, piuEnergyDCLevel_t::rxEnergy, bidSilenceCtrl_t::rxSilDetEnergy, piuInst_s::segment_size, piuConfig_t::segment_size, piuInst_s::send_out_buf, piuInst_s::send_out_buf_ptr, piuConfig_t::sendOutIsrTargetInst, piuInst_s::sendOutIsrTargetInst, piuConfig_t::sendOutProcTargetInst, piuInst_s::sendOutProcTargetInst, piuInst_s::state, piuConfig_t::transp_mode, piuEnergyDCLevel_t::txDClevel, piuEnergyDCLevel_t::txEnergy, bidSilenceCtrl_t::txSilDetEnergy, and piuConfig_t::use_recv_out_buf.

Referenced by siu_open_piu().

Here is the call graph for this function:

void piuReceiveIn | ( | void * | piuInst,
 |  | void * | speech_samples
 | ) |  |

Definition at line 288 of file piutxrx.c.

References piuInst_s::bidSilence, piuInst_s::energy_DClevel, receive_in_buf_t::in_ptr, piuInst_s::mode_bitfield, PIU_BEGIN_CRITICAL_SECTION, piu_CTRL_BIT_BID_SILENCE_DET, piu_CTRL_BIT_DO_PCM_LOOPBACK, piu_CTRL_BIT_PATTERN_GENERATE, piu_CTRL_BIT_TRIPLE_RX_BUF, PIU_END_CRITICAL_SECTION, piu_frame_DClevel(), piu_frame_energy(), piu_NUMSEGM_RX2, piu_NUMSEGM_RX3, piu_OPEN, piu_pcm_compressing(), piu_update_buf_ptr(), piuInst_s::receive_in_buf, piuInst_s::rx_overflow_cnt, piuEnergyDCLevel_t::rxDClevel, piuEnergyDCLevel_t::rxEnergy, bidSilenceCtrl_t::rxSilDetEnergy, receive_in_buf_t::segment_count, piuInst_s::segment_size, and piuInst_s::state.

Referenced by main().

Here is the call graph for this function:

void piuTxRxProc | ( | void * | piuInst,
 |  | linSample * | tx_ptr,
 |  | linSample * | rx_ptr
 | ) |  |

Definition at line 343 of file piutxrx.c.

References piuInst_s::mode_bitfield, piu_bid_silence_detect(), piu_CTRL_BIT_BID_SILENCE_DET, piu_CTRL_BIT_DC_FILTR_SELECT_MODE1, piu_CTRL_BIT_DO_LIN_LOOPBACK, piu_CTRL_BIT_DO_PCM_LOOPBACK, piu_CTRL_BIT_LOOPBACK_NOPASS, piu_CTRL_BIT_PATTERN_DETECT, piu_CTRL_BIT_PATTERN_GENERATE, piu_CTRL_BIT_RECV_IN_BUF_EMPTY, piu_CTRL_BIT_REMOVE_DC_COMP, piu_CTRL_BIT_UNDERRUN_REPORT, piu_CTRL_BIT_USE_RECV_OUT_BUF, piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT, piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT, piu_frame_DClevel(), piu_frame_energy(), piu_OPEN, piu_pcm_companding(), piu_pcm_pattern_detect(), piu_pcm_pattern_generate(), piu_remove_dc_component(), piu_TX_TASK_ID, piu_UNDERRUN, piu_update_buf_ptr(), piuContext, piuContext_t::reportOutFcn, piuContext_t::sendOutProcFcn, and piuInst_s::state.

Referenced by siuTxRxSendIn().

Here is the call graph for this function:

tint piuControl | ( | void * | piuInst,
 |  | piuControl_t * | ctl
 | ) |  |

Definition at line 367 of file piu.c.

References piuControl_t::bid_silence_detect, piuControl_t::companding, piuControl_t::ctl_code, piuControl_t::dc_offset_removal_select, setFrame_t::frame_size, piuControl_t::loopback_select, piuInst_s::mode_bitfield, piuControl_t::pattern_detect, piuControl_t::pattern_generate, PIU_BEGIN_CRITICAL_SECTION, piu_BID_SILENCE_DETECTION, piu_CTRL_BIT_UNDERRUN_REPORT, piu_DC_OFFSET_REMOVAL, piu_DISABLE_UNDERRUN_REPORT, piu_ENABLE_UNDERRUN_REPORT, PIU_END_CRITICAL_SECTION, piu_ERROR, piu_GET_LEVELS, piu_get_stats(), piu_loopback_config(), piu_NOERR, piu_OPEN, piu_PATTERN_DETECTION, piu_PATTERN_GENERATION, piu_reset_receive_in_buf(), piu_SET_COMPANDING, piu_SET_FRAME_SIZE, piu_SET_LOOPBACK, piuBidSilenceDetect(), piuDcOffsetRemoval(), piuPatternDetect(), piuPatternGeneration(), piuSetCompanding(), piuInst_s::receive_in_buf, setFrame_t::receive_in_buf, piuInst_s::receive_out_buf, piuInst_s::receive_out_buf_ptr, piuInst_s::segment_size, setFrame_t::send_out_buf, piuInst_s::send_out_buf, piuInst_s::send_out_buf_ptr, piuControl_t::set_frame, receive_in_buf_t::start_ptr, piuInst_s::state, piuControl_t::stats, and piuControl_t::u.

Referenced by main().

Here is the call graph for this function:

void piuDcOffsetRemoval | ( | void * | piuInst,
 |  | tint | mode
 | ) |  |

Definition at line 332 of file piu.c.

References piuInst_s::mode_bitfield, piu_CTRL_BIT_DC_FILTR_SELECT_MODE1, piu_CTRL_BIT_REMOVE_DC_COMP, piu_DC_OFFSET_DISABLE, and piu_DC_OFFSET_MODE1.

Referenced by piuControl().

void UAExpand | ( | tint | sub_segment_size,
 |  | tword * | pcm_in,
 |  | linSample ** | send_out_buf_ptr_ptr,
 |  | const tint * | pcm_expand_table
 | ) |  |

Definition at line 45 of file piuexpan.c.

Referenced by piu_pcm_companding().

void piuSendIn | ( | void * | piuInst,
 |  | tword ** | fromTdm,
 |  | tuint | timeStamp,
 |  | tuint | frameLength
 | ) |  |

Definition at line 122 of file piuisr.c.

References piuInst_s::ID, piuContext_t::pcmSampleTrace, piu_OPEN, piuContext, piuInst_s::segment_size, piuInst_s::send_out_buf, piuInst_s::send_out_buf_ptr, and piuInst_s::state.

Referenced by main().

void piuReceiveOut | ( | void * | piuInst,
 |  | tword ** | toTdm,
 |  | tuint | timestamp,
 |  | tuint | frameLength
 | ) |  |

Definition at line 42 of file piuisr.c.

References piuInst_s::ID, receive_in_buf_t::in_ptr, piuInst_s::mode_bitfield, receive_in_buf_t::out_ptr, piuContext_t::pcmSampleTrace, piu_CTRL_BIT_USE_RECV_OUT_BUF, piu_OPEN, piu_TXRX_TASK_ID, piu_update_buf_ptr(), piuContext, piuInst_s::receive_in_buf, piuInst_s::receive_out_buf, piuInst_s::receive_out_buf_ptr, piuInst_s::rx_underflow_cnt, receive_in_buf_t::segment_count, piuInst_s::segment_size, piuInst_s::send_out_buf_ptr, piuContext_t::sendOutIsrFcn, piuInst_s::sendOutIsrTargetInst, piuInst_s::silence_pattern, and piuInst_s::state.

Referenced by main().

Here is the call graph for this function:

Variable Documentation

piuContext_t piuContext

Definition at line 30 of file piu.c.

Referenced by piu_bid_silence_detect(), piu_exception(), piu_pcm_pattern_detect(), piuReceiveOut(), piuSendIn(), and piuTxRxProc().


ECU Test: piu.h Source File

  • File List
  • Globals

piu.h

Go to the documentation of this file.
00001 #ifndef _PIU_H
00002 #define _PIU_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Main header file for PCM Interface Unit (PIU).
00005  ******************************************************************************
00006  * FILE NAME:   piu.h
00007  *
00008  * DESCRIPTION: This file defines the API and public data definitions
00009  *              for the PIU.
00010  *
00011  * REQUIRES: types.h   (generic DSP ECO types)
00012  *           const.h   (companding laws)
00013  *           memmgm.h  (ecomemBuffer_t)
00014  *
00015  * TABS: NONE
00016  *
00017  *
00018  * (C) Copyright 1995, 1996, 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 /* System level header files */
00022 #include <ti/mas/types/types.h>
00023 #include <ti/mas/types/const.h>
00024
00025 /* System utilities' API's */
00026 #include <ti/mas/util/ecomem.h>
00027 #include <ti/mas/util/debug.h>
00028
00029 /* PIU bit map definitions of different control mode */
00030 #define piu_CTRL_BIT_TRANSPARENT_MODE             0x0001 /* TRUE: Transp. mode enabled */
00031 #define piu_CTRL_BIT_DO_PCM_LOOPBACK              0x0002 /* TRUE: loopback PCM sample */
00032 #define piu_CTRL_BIT_DO_LIN_LOOPBACK              0x0004 /* TRUE: loopback linear sample*/
00033 #define piu_CTRL_BIT_REMOVE_DC_COMP               0x0008 /* TRUE: enables DC offset removal*/
00034 #define piu_CTRL_BIT_LOOPBACK_NOPASS              0x0010 /* TRUE: pass through disabled */
00035 #define piu_CTRL_BIT_BID_SILENCE_DET              0x0020 /* TRUE: Sil. Detection enabled*/
00036 #define piu_CTRL_BIT_PATTERN_DETECT               0x0040 /* TRUE: Patt Detection enabled*/
00037 #define piu_CTRL_BIT_PATTERN_GENERATE             0x0080 /* TRUE: Patt Generation enabled*/
00038 #define piu_CTRL_BIT_USE_RECV_OUT_BUF             0x0100 /* TRUE: recv_out buf is used */
00039 #define piu_CTRL_BIT_TRIPLE_RX_BUF                0x0200 /* TRUE: triple buffering in rx*/
00040 #define piu_CTRL_BIT_RECV_IN_BUF_EMPTY            0x0400 /* TRUE: recv_in buf is empty */
00041 #define piu_CTRL_BIT_UNDERRUN_REPORT              0x0800 /* TRUE: report */
00042 #define piu_CTRL_BIT_DC_FILTR_SELECT_MODE1        0x1000 /* TRUE: Select mode 1, else mode 2 */
00043
00044 /* PIU error codes */
00045 enum {
00046   piu_NOMEMORY = -1,        /* memory exhausted */
00047   piu_NOERR    =  0,        /* success */
00048   piu_ERROR    =  1         /* error */
00049 };
00050
00051 /* PCM companding law flags */
00052 enum {
00053   piu_COMP_FIRST  = const_COMP_FIRST,
00054   piu_COMP_ALAW   = const_COMP_ALAW_8,  /* 8-bit A-law */
00055   piu_COMP_ULAW   = const_COMP_MULAW_8, /* 8-bit u-law */
00056   piu_COMP_LINEAR = const_COMP_LINEAR,  /* 16 linear samples */
00057   piu_COMP_LAST   = const_COMP_LAST
00058 };
00059
00060 #define piu_ALAW_SILENCE    0x55  /* Corresponds to -8.0F */
00061 #define piu_MULAW_SILENCE   0x7F  /* Corresponds to 0.0F  */
00062 #define piu_LINEAR_SILENCE     0  /* Any linear A/D & D/A */
00063
00064 /* control code definition */
00065 enum {
00066   piu_SET_LOOPBACK    = 0,
00067   piu_SET_FRAME_SIZE,
00068   piu_SET_IDLE_NOISE_LEVEL,
00069   piu_GET_LEVELS,
00070   piu_PATTERN_GENERATION,
00071   piu_PATTERN_DETECTION,
00072   piu_BID_SILENCE_DETECTION,
00073   piu_ENABLE_UNDERRUN_REPORT,
00074   piu_DISABLE_UNDERRUN_REPORT,
00075   piu_SET_COMPANDING,
00076   piu_DC_OFFSET_REMOVAL
00077 };
00078
00079 /* PIU loopback options */
00080 #define LOOPBACK_OFF      0
00081 #define PCM_LOOPBACK_ON   0x1
00082 #define LIN_LOOPBACK_ON   0x2
00083 #define DATA_FLOW_DISABLE 0x10
00084
00085 /* PIU report options */
00086 enum {
00087   piu_BIDIR_SILENCE_DETECTED = 0,
00088   piu_PATTERN_DETECTED       = 1,
00089   piu_UNDERRUN               = 2
00090 };
00091
00092 /* Exception Messages */
00093 enum {
00094    piu_EXC_OPEN         = 1, /* Opened an already open channel */
00095    piu_EXC_DELETE       = 2, /* Deleted an open instance */
00096    piu_EXC_SUBFRAMESIZE = 3  /* Control request received by a closed channel */
00097 };
00098
00099 /* DC offset removal options */
00100 enum {
00101   piu_DC_OFFSET_DISABLE = 0,
00102   piu_DC_OFFSET_MODE1 = 1, /* Satisfies the mask given by the standard */
00103   piu_DC_OFFSET_MODE2 = 2 /* Used for echo canceller */
00104 };
00105
00106 /******************************************************************************
00107  * DATA DEFINITION: PIU signal level measurement structure
00108  ******************************************************************************
00109  * DESCRIPTION : This structure indicates the result of PIU
00110  * signal level measurements via piuGetLevels().
00111  ******************************************************************************/
00112
00113 typedef struct {
00114   tint  send_out;            /* send-out level in dBm0         */
00115   tint  send_out_mean;       /* send-out linear mean value     */
00116   tint  receive_out;         /* receive-out level in dBm0      */
00117   tint  receive_out_mean;    /* receive-out linear mean value  */
00118   tuint underrun;            /* underrun stats */
00119 } piuStats_t;
00120
00121 /******************************************************************************
00122  * DATA DEFINITION: PIU size configuration structure
00123  ******************************************************************************
00124  * DESCRIPTION: This structure contains information used in memory
00125  *              configuration.
00126  *****************************************************************************/
00127
00128 typedef struct {
00129   tint max_samples_per_segment;     /* Maximum number of samples per segment */
00130 #if 0
00131   /* TODO: if this functionality is needed, it has to be reworked */
00132   tbool alloc_recv_out_buf;          /* TRUE: allocate receive out buffer */
00133 #endif
00134   tbool rx_triple_buffering;         /* true:  triple buffering in Rx direction */
00135                                     /* false: double buffering in Rx direction */
00136                                     /* NOTE:  Tx direction is always double buffered */
00137 } piuSizeConfig_t;
00138
00139 typedef struct {
00140   tint max_pcm_val;        /* Max allowed PCM value */
00141   dbgInfo_t             debugInfo;
00142   void (*reportOutFcn)    (void *targetInst, tint report_code);
00143   void (*sendOutProcFcn)  (void *targetInst, void *send_data, void *rcv_data,
00144                            tint task_id);
00145   void (*sendOutIsrFcn)   (void *targetInst, void *send_data, void *rcv_data,
00146                            tint task_id);
00147   void (*pcmSampleTrace)  (tint chnum, tint pcm_size, void *pcm_in, tuint dir);
00148 } piuContext_t;
00149
00150 /******************************************************************************
00151  * DATA DEFINITION: Configuration structure for piuNew()
00152  ******************************************************************************
00153  * DESCRIPTION: This structure is supplied by the user during piuNew() to
00154  *              create a PIU object.
00155  *
00156  ******************************************************************************/
00157 typedef struct {
00158   tuint ID;                                    /* user-defined ID field  */
00159   piuContext_t    context;                    /* context initialization */
00160   piuSizeConfig_t sizeCfg;                    /* Size structure         */
00161 } piuNewConfig_t;
00162
00163 /******************************************************************************
00164  * DATA DEFINITION: PIU Control structure
00165  ******************************************************************************
00166  * DESCRIPTION: Contains parameters required for calls to piuControl().
00167  *
00168  *****************************************************************************/
00169 typedef struct {
00170   tbool enable;
00171   tint threshold;
00172   tuint hangover;
00173 } bidSilenceDet_t;
00174
00175
00176
00177 typedef struct {
00178   tbool enable;
00179   tint type;
00180   tint time;
00181   tint custom;
00182 } pcmPatternDet_t;
00183
00184 typedef struct {
00185   tbool  enable;
00186   tuint pattern;
00187 } pcmPatternGen_t;
00188
00189 typedef struct {
00190   tint  law;                     /* A-law, Mu-law or Linear law */
00191   const tint *pcm_expand_table;  /* Pointer to expansion table (linear is using NULL) */
00192 } piuCompandingCfg_t;
00193
00194 typedef struct {
00195   tuint frame_size;
00196   tuint *send_out_buf;
00197   tuint *receive_in_buf;
00198 } setFrame_t;
00199
00200 typedef struct {
00201   tint  ctl_code;  /* Code indicating what PIU function will be controlled */
00202   union {
00203     tint                loopback_select;
00204     tuint               frame_size;
00205     setFrame_t          set_frame;
00206     piuStats_t          stats;
00207     bidSilenceDet_t     bid_silence_detect;
00208     pcmPatternDet_t     pattern_detect;
00209     pcmPatternGen_t     pattern_generate;
00210     piuCompandingCfg_t  companding;
00211     tint                dc_offset_removal_select;
00212   } u;
00213 } piuControl_t;
00214
00215 /******************************************************************************
00216  * DATA DEFINITION: PIU configuration structure.
00217  ******************************************************************************
00218  * DESCRIPTION: This structure contains information used to initialize a
00219  *              PIU object for a specific configuration. The values defined in
00220  *              this structure apply to a specific instance of a PIU.
00221  *
00222  *****************************************************************************/
00223
00224 typedef struct {
00225   tbool transp_mode;             /* if TRUE, transparent mode is enabled. No
00226                                  *  conversion of PCM samples to linear samples
00227                                  *  is done. */
00228   tint segment_size;            /* Number of samples in a PIU voice segment */
00229   void *sendOutProcTargetInst;  /* Address of function and data structure to
00230                                  *  process voice samples sent from PIU from
00231                                  *  foreground processes */
00232   void *sendOutIsrTargetInst;   /* Address of function and data structure to
00233                                  *  process voice samples sent from PIU from
00234                                  *  ISR driven processes */
00235   void *reportOutTargetInst;    /* Bid Silence/pattern Out obj. descriptor */
00236   tint max_pcm_val;             /* Maximum allowed PCM value */
00237   tuint rx_delay;               /* delay length in samples */
00238   tbool  use_recv_out_buf;       /* if TRUE, receive_out_buf is be used */
00239   piuCompandingCfg_t companding; /* compading configuration data */
00240 } piuConfig_t;
00241
00242 /* External references to the PIU context */
00243 extern piuContext_t piuContext;
00244
00245 /***                         FUNCTION PROTOTYPES                         ***/
00246 void piuClose     (void *piuInst);
00247 void piuDelete    (void **piuInst, tint nbufs, ecomemBuffer_t *bufs);
00248 tint piuGetSizes  (tint *nbufs, const ecomemBuffer_t **bufs,
00249                    piuSizeConfig_t *cfg);
00250 tint piuNew       (void **piuInst, tint nbufs, ecomemBuffer_t *bufs,
00251                    piuNewConfig_t *cfg);
00252 void piuOpen      (void *piuInst, piuConfig_t *cfg);
00253 void piuReceiveIn (void *piuInst, void *speech_samples);
00254 void piuTxRxProc  (void *piuInst, linSample *tx_ptr, linSample *rx_ptr);
00255 tint piuControl   (void *piuInst, piuControl_t *ctl);
00256 void piuDcOffsetRemoval (void *piuInst, tint mode);
00257
00258 /* in piuexpan.s, used by PCM codec as well */
00259 void UAExpand  (tint sub_segment_size, tword *pcm_in,
00260                 linSample **send_out_buf_ptr_ptr, const tint *pcm_expand_table);
00261
00262 void piuSendIn (void *piuInst, tword **fromTdm, tuint timeStamp,
00263                 tuint frameLength);
00264 void piuReceiveOut (void *piuInst, tword **toTdm, tuint timestamp,
00265                     tuint frameLength);
00266 #endif /* _PIU_H */
00267 /* nothing past this point */


ECU Test: piuexpan.c File Reference

  • File List
  • Globals

piuexpan.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/util/cb.h>
#include <ti/mas/util/wng.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/piuloc.h>
#include <ti/mas/ecu/test/src/piuport.h>

Include dependency graph for piuexpan.c:

Go to the source code of this file.

Functions

void UAExpand (tint sub_segment_size, tword *pcm_in, linSample **send_out_buf_ptr_ptr, const tint *pcm_expand_table)

Function Documentation

void UAExpand | ( | tint | sub_segment_size,
 |  | tword * | pcm_in,
 |  | linSample ** | send_out_buf_ptr_ptr,
 |  | const tint * | pcm_expand_table
 | ) |  |

Definition at line 45 of file piuexpan.c.

Referenced by piu_pcm_companding().


ECU Test: piuexpan.c Source File

  • File List
  • Globals

piuexpan.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 * FILE PURPOSE: Contains the u_lam and a_law table look-up routines in assembly
00003 *               (C54x) for speech codecs.
00004 ******************************************************************************
00005 * FILE NAME:   piuexpan.s
00006 *
00007 * DESCRIPTION:
00008 *
00009 *
00010 * TABS: NONE
00011 *
00012 * $Id:
00013 * REVISION HISTORY:
00014 *
00015 * $Log: piuexpan.c $
00016 * Revision 1.1  1998/09/21 09:20:35  qsu
00017 * Initial revision
00018 *
00019 * (C) Copyright 1997 TELOGY Networks, Inc.
00020 *
00021 ******************************************************************************/
00022 /* system level header files */
00023 #include <ti/mas/types/types.h>
00024
00025 /* system utilities' API's */
00026 #include <ti/mas/util/utl.h>
00027 #include <ti/mas/util/mua.h>
00028 #include <ti/mas/util/cb.h>
00029 #include <ti/mas/util/wng.h>
00030
00031 /* PIU related header files */
00032 #include <ti/mas/ecu/test/src/piu.h>
00033 #include <ti/mas/ecu/test/src/piuloc.h>
00034 #include <ti/mas/ecu/test/src/piuport.h>
00035
00036  /*****************************************************************************
00037  * DESCRIPTION: U_law and A_law table look up
00038  * void UAExpand(
00039  *  tint         sub_segment_size,       - subsegment size
00040  *  tint         *pcm_in,                - input data array
00041  *  linSample    **send_out_buf_ptr_ptr, - address of output buffer pointer
00042  *  const tint   *pcm_expand_table)      - pointer to the A_law or U_law table
00043  *
00044  *****************************************************************************/
00045 void UAExpand(tint sub_segment_size, tword *pcm_in, linSample **send_out_buf_ptr_ptr,
00046               const tint *pcm_expand_table)
00047 {
00048   int       i, ratio = sizeof(linSample)/sizeof(tword);
00049   tint      pcm_val;
00050   tword     *pcmptr = pcm_in;
00051   linSample *send_out_buf_ptr;
00052
00053   send_out_buf_ptr = *send_out_buf_ptr_ptr;
00054
00055 #ifdef _BIG_ENDIAN
00056   pcmptr++;
00057 #endif
00058
00059   for (i=0; i<sub_segment_size; i++) {
00060     pcm_val = (tword)((tuint) *pcmptr & 0x00FF);
00061     pcmptr += ratio;
00062     *send_out_buf_ptr++ = pcm_expand_table[pcm_val];
00063   }
00064
00065   *send_out_buf_ptr_ptr = send_out_buf_ptr;    /* store the new value! */
00066 } /* UAExpand */
00067 /* nothing past this point */


ECU Test: piufutil.c File Reference

  • File List
  • Globals

piufutil.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/ecu/test/src/piuloc.h>

Include dependency graph for piufutil.c:

Go to the source code of this file.

Functions

void | piu_frame_energy (tint frameLen, Fract *frame, LFract *energy)
void | piu_frame_DClevel (tint frameLen, Fract *frame, LFract *DC_level)
void | piu_remove_dc_component (tint frameLen, Fract *frame, LFract *DC_level, tint alpha)

Function Documentation

void piu_frame_energy | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | energy
 | ) |  |

Definition at line 46 of file piufutil.c.

Referenced by piuReceiveIn(), and piuTxRxProc().

void piu_frame_DClevel | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | DC_level
 | ) |  |

Definition at line 77 of file piufutil.c.

Referenced by piuReceiveIn(), and piuTxRxProc().

void piu_remove_dc_component | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | DC_level,
 |  | tint | alpha
 | ) |  |

Definition at line 91 of file piufutil.c.

Referenced by piuTxRxProc().


ECU Test: piufutil.c Source File

  • File List
  • Globals

piufutil.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Fast utilities for the PIU.
00003  ******************************************************************************
00004  * FILE NAME:   piufutil.c
00005  *
00006  * DESCRIPTION: Contains fast utilities for the PIU (desktop version)
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: piufutil.c 1.3 1998/06/11 17:06:55 abura Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: piufutil.c $
00015  * Revision 1.3  1998/06/11 17:06:55  abura
00016  * - Bidirectional Silence Detection added.
00017  * Revision 1.2  1998/01/29 11:56:45  BOGDANK
00018  *     - phase Q-format changed
00019  *    16-bit arithmetic used when calculating tone.
00020  * Revision 1.1  1998/01/28 15:29:16  BOGDANK
00021  * Initial revision
00022  *
00023  * (C) Copyright 1998, TELOGY Networks, Inc.
00024  *****************************************************************************/
00025
00026 #include <ti/mas/types/types.h>
00027 #include <ti/mas/fract/fract.h>
00028 #include <ti/mas/util/utl.h>
00029
00030 #include <ti/mas/ecu/test/src/piuloc.h>
00031
00032 /*****************************************************************************
00033  * FUNCTION PURPOSE: Signal energy level
00034  *****************************************************************************
00035  * DESCRIPTION: This function calculates signal energy using geometric average.
00036  *              E(n) = E(n-1) + dE = E(n-1) + alpha * [e - E(n-1)]
00037  *
00038  * void piu_frame_energy (
00039  *   tint frameLen,  - number of samples in input frame
00040  *   Fract *frame,   - pointer to a data frame
00041  *   LFract *energy) - current mean value
00042  *
00043  * NOTE: alpha = 2^(-8), corresponding to time constant T=36ms.
00044  *
00045  ****************************************************************************/
00046 void piu_frame_energy (tint frameLen, Fract *frame, LFract *energy)
00047 {
00048   LFract x, e, dE;
00049   int    i;
00050
00051   *energy = frctAdjustQ(*energy,2,0);
00052   for (i = 0; i < frameLen; i++)
00053   {
00054     x = frctF2LF(frame[i], 0, 0);
00055     e = frctMulLFbyLF (x, 0, x, 0, 0);/* e */
00056     dE = e - *energy;                 /* e - E(n-1) */
00057     dE = frctDivLFbyP2 (dE, 0, 8, 0); /* alpha * [e - E(n-1)] */
00058     *energy += dE;
00059   }
00060   *energy = frctAdjustQ(*energy,0,2);
00061 }
00062
00063 /*****************************************************************************
00064  * FUNCTION PURPOSE: Signal DC level
00065  *****************************************************************************
00066  * DESCRIPTION: This function calculates signal energy using geometric average.
00067  *              DC(n) = DC(n-1) + dDC = DC(n-1) + alpha * [x - DC(n-1)]
00068  *
00069  * void piu_frame_DClevel (
00070  *   tint frameLen,  - number of samples in input frame
00071  *   Fract *frame,   - pointer to a data frame
00072  *   LFract *DC_level) - current mean value
00073  *
00074  * NOTE: alpha = 2^(-13), corresponding to time constant T=36ms.
00075  *
00076  ****************************************************************************/
00077 void piu_frame_DClevel (tint frameLen, Fract *frame, LFract *DC_level)
00078 {
00079   LFract dLevel;
00080   int    i;
00081
00082   for (i = 0; i < frameLen; i++)
00083   {
00084     dLevel = frame[i] - *DC_level;    /* dLevel = x - DC_level */
00085     dLevel = frctDivLFbyP2 (dLevel, 0, 13, 0); /* alpha(13)*(x-dc) */
00086     *DC_level += dLevel;                       /* dc+alpha*(x-dc)  */
00087   }
00088 }
00089
00090 /* C version of assembly -- Not tested */
00091 void piu_remove_dc_component (tint frameLen, Fract *frame, LFract *DC_level, tint alpha)
00092 /* alpha parameter is log2 of the multiplying factor
00093    y[n] = (1-beta)*y[n-1] + beta*x[n]
00094    beta = 2^alpha */
00095 {
00096   int   i;
00097   LFract dLevel;
00098
00099   for (i = 0; i < frameLen; i++)
00100   {
00101      dLevel = *DC_level - frame[i];
00102      dLevel = dLevel<<alpha;
00103      *DC_level -= dLevel;
00104      frame[i] -= *DC_level;
00105
00106   }
00107 }
00108 /* nothing past this point */


ECU Test: piuinit.c File Reference

  • File List
  • Globals

piuinit.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/piuloc.h>
#include <ti/mas/ecu/test/src/piuport.h>

Include dependency graph for piuinit.c:

Go to the source code of this file.

Defines

#define | piu_NBUFS 4
#define | piu_INSTANCE_BUFN 0
#define | piu_SENDOUT_BUFN 1
#define | piu_RECVIN_BUFN 2
#define | piu_RECVOUT_BUFN 3

Functions

tint | piuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, piuSizeConfig_t *cfg)
tint | piuNew (void **piuInst, tint nbufs, ecomemBuffer_t *bufs, piuNewConfig_t *cfg)

Variables

static ecomemBuffer_t | piuBufs [piu_NBUFS]

Define Documentation

#define piu_NBUFS 4

Definition at line 31 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_INSTANCE_BUFN 0

Definition at line 32 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_SENDOUT_BUFN 1

Definition at line 33 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_RECVIN_BUFN 2

Definition at line 34 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_RECVOUT_BUFN 3

Definition at line 35 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

Function Documentation

tint piuGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | piuSizeConfig_t * | cfg
 | ) |  |

Definition at line 62 of file piuinit.c.

References piuSizeConfig_t::max_samples_per_segment, piu_INSTANCE_BUFN, piu_NBUFS, piu_NOERR, piu_NUMSEGM_RX2, piu_NUMSEGM_RX3, piu_NUMSEGM_TX, piu_RECVIN_BUFN, piu_RECVOUT_BUFN, piu_SENDOUT_BUFN, piuBufs, and piuSizeConfig_t::rx_triple_buffering.

Referenced by siu_new_piu().

tint piuNew | ( | void ** | piuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | piuNewConfig_t * | cfg
 | ) |  |

Definition at line 123 of file piuinit.c.

References receive_in_buf_t::end_ptr, piuSizeConfig_t::max_samples_per_segment, piuInst_s::mode_bitfield, piu_CTRL_BIT_TRIPLE_RX_BUF, piu_ERROR, piu_INSTANCE_BUFN, piu_NBUFS, piu_NOMEMORY, piu_NUMSEGM_RX3, piu_RECVIN_BUFN, piu_RECVOUT_BUFN, piu_SENDOUT_BUFN, piuInst_s::receive_in_buf, piuInst_s::receive_out_buf, piuSizeConfig_t::rx_triple_buffering, piuInst_s::send_out_buf, piuNewConfig_t::sizeCfg, and receive_in_buf_t::start_ptr.

Referenced by siu_new_piu().

Variable Documentation

ecomemBuffer_t piuBufs[piu_NBUFS] [static]

Initial value:

 {

  ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL,
  ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL,
  ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL,
  ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL
}

Definition at line 38 of file piuinit.c.

Referenced by piuGetSizes(), and siu_new_piu().


ECU Test: piuinit.c Source File

  • File List
  • Globals

piuinit.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * PURPOSE : Main source file for the PCM Interface Unit (PIU).
00003  ******************************************************************************
00004  * FILE NAME:   piuinit.c
00005  *
00006  * DESCRIPTION: Contains main PIU initialization functions.
00007  *
00008  *
00009  * (C) Copyright 2001 Telogy Networks Inc.
00010  *****************************************************************************/
00011
00012 /* Ansi C header files */
00013 #include <stdlib.h>
00014
00015 /* System Level header files */
00016 #include <ti/mas/types/types.h>
00017
00018 /* System Utilities' API's */
00019 #include <ti/mas/util/ecomem.h>
00020
00021 /* PIU related header files */
00022 #include <ti/mas/ecu/test/src/piu.h>
00023 #include <ti/mas/ecu/test/src/piuloc.h>
00024 #include <ti/mas/ecu/test/src/piuport.h>
00025
00026 /*****************************************************************
00027  *                  Static Variable declarations                 *
00028  *****************************************************************/
00029
00030 /* PIU dynamic memory buffers */
00031 #define piu_NBUFS         4
00032 #define piu_INSTANCE_BUFN 0
00033 #define piu_SENDOUT_BUFN  1
00034 #define piu_RECVIN_BUFN   2
00035 #define piu_RECVOUT_BUFN  3
00036
00037 /* Memory buffers initialization */
00038 static ecomemBuffer_t piuBufs[piu_NBUFS] = {
00039 /* class,           log2align, size, volat, base */
00040   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL, /* instance structure */
00041   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL, /* send in buffer */
00042   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL, /* receive in buffer */
00043   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL  /* receive out buffer */
00044 };
00045
00046 /******************************************************************************
00047  * FUNCTION PURPOSE: Obtain memory requirements for an instance of PIU
00048  ******************************************************************************
00049  * DESCRIPTION: Memory buffer description as defined in memory.h is used for
00050  *              buffer description. Vector of memory buffer descriptions that
00051  *              is returned in bufs must not be changed by external software.
00052  *              Memory requirements are determined based on the size
00053  *              configuration structure.
00054  *
00055  *  tint piuGetSizes (
00056  *    tint               *nbufs, - number of buffers used
00057  *    const memBuffer_t  **bufs, - memory buffer description structure
00058  *    piuSizeConfig_t    *cfg)   - size configuration structure
00059  *
00060  *****************************************************************************/
00061
00062 tint piuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, piuSizeConfig_t *cfg)
00063 {
00064   *nbufs = piu_NBUFS;
00065
00066   piuBufs[piu_INSTANCE_BUFN].size = sizeof(piuInst_t);
00067   piuBufs[piu_SENDOUT_BUFN].size  = piu_NUMSEGM_TX *
00068                                     cfg->max_samples_per_segment *
00069                                     sizeof(linSample);
00070
00071   if (cfg->rx_triple_buffering) {
00072      /* Triple buffering case in Rx direction (VOICE app) */
00073      piuBufs[piu_RECVIN_BUFN].size   = piu_NUMSEGM_RX3 *
00074                                        cfg->max_samples_per_segment *
00075                                        sizeof(linSample);
00076 #if PIUDLCOMP_ENABLE
00077       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX3 *
00078                                       (cfg->max_samples_per_segment>>1) *
00079                                        sizeof(linSample);
00080 #else
00081       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX3 *
00082                                       cfg->max_samples_per_segment *
00083                                        sizeof(linSample);
00084 #endif
00085   }
00086   else {
00087      /* Double buffering case in Rx direction (e.g. FAX app) */
00088     piuBufs[piu_RECVIN_BUFN].size   = piu_NUMSEGM_RX2 *
00089                                        cfg->max_samples_per_segment *
00090                                        sizeof(linSample);
00091 #if PIUDLCOMP_ENABLE
00092       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX2 *
00093                                       (cfg->max_samples_per_segment>>1) *
00094                                        sizeof(linSample);
00095 #else
00096       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX2 *
00097                                       cfg->max_samples_per_segment *
00098                                        sizeof(linSample);
00099 #endif
00100   }
00101
00102   *bufs = piuBufs ;      /* Return pointer to instance */
00103
00104   return (piu_NOERR);
00105 } /* piuGetSizes */
00106
00107 /*****************************************************************************
00108  * FUNCTION PURPOSE: Create a PIU object and assign PIU globals
00109  *****************************************************************************
00110  * DESCRIPTION: Creates an instance of PIU and initializes its memory.
00111  *
00112  * int piuNew (
00113  *   void           **piuInst, - an address of memory location that will
00114  *                               receive a pointer to instance structure
00115  *   tint           nbufs,     - number of buffers used
00116  *   memBuffer_t    *bufs,     - a vector of buffer descriptors
00117  *   piuNewConfig_t *cfg)      - a pointer to configuration structure
00118  *
00119  * RETURN VALUE: piu_NOMEMORY  - heap exhausted
00120  *               piu_NOERR     - success
00121  *               piu_ERROR     - invalid input parameters
00122  ****************************************************************************/
00123 tint piuNew (void **piuInst, tint nbufs, ecomemBuffer_t *bufs, piuNewConfig_t *cfg)
00124 {
00125   int   i;
00126   tbool  failed;
00127   piuInst_t   *inst;
00128   ecomemBuffer_t *bufp;
00129
00130   /* Test instance pointer (Must be NULL) */
00131   if (*piuInst != NULL || nbufs != piu_NBUFS) return (piu_ERROR) ;
00132
00133   /* Allocate all dynamic buffers (base address != NULL ?)*/
00134   failed = FALSE;
00135   for (i = 0, bufp = &bufs[0]; i<nbufs; i++, bufp++) {
00136     /* ignore NULL pointer on receive_out_buf when it is not allocated */
00137     failed = failed || (bufp->base == NULL);
00138   }
00139   if (failed)
00140     return (piu_NOMEMORY);
00141
00142   /* Identify the instance structure */
00143   bufp = &bufs[piu_INSTANCE_BUFN];
00144   if (bufp->size < sizeof(piuInst_t)) return (piu_ERROR);
00145   inst = (piuInst_t *)bufp->base;
00146
00147   /* Identify the send-out buffer */
00148   bufp = &bufs[piu_SENDOUT_BUFN];
00149   inst->send_out_buf = (linSample *)bufp->base;
00150
00151   /* Identify the receive-in buffer */
00152   bufp = &bufs[piu_RECVIN_BUFN];
00153   inst->receive_in_buf.start_ptr = (linSample *)bufp->base;
00154
00155   /* Identify the receive-out buffer */
00156   bufp = &bufs[piu_RECVOUT_BUFN];
00157   inst->receive_out_buf = (linSample *)bufp->base;
00158
00159   inst->mode_bitfield          = 0;
00160   inst->receive_in_buf.end_ptr = inst->receive_in_buf.start_ptr;
00161   if (cfg->sizeCfg.rx_triple_buffering) {
00162     /* This is implicit indication of VOICE (or Modem) application.
00163      * It requires triple buffering scheme */
00164     inst->receive_in_buf.end_ptr += (piu_NUMSEGM_RX3 * cfg->sizeCfg.max_samples_per_segment);
00165     inst->mode_bitfield |= piu_CTRL_BIT_TRIPLE_RX_BUF;
00166   } else {
00167     /* It requires double buffering scheme */
00168     inst->receive_in_buf.end_ptr += (piu_NUMSEGM_RX2 * cfg->sizeCfg.max_samples_per_segment);
00169   }
00170   inst->receive_in_buf.top_ptr   = inst->receive_in_buf.end_ptr;
00171
00172   /* Save some configuration parameters */
00173   inst->ID      = cfg->ID;
00174   piuContext    = cfg->context;
00175   inst->state   = piu_CLOSED;     /* state is set to closed */
00176
00177   *piuInst = (void *)inst;          /* return the instance pointer */
00178
00179   return (piu_NOERR);
00180 } /* piuNew */
00181
00182
00183 /* nothing past this point */


ECU Test: piuisr.c File Reference

  • File List
  • Globals

piuisr.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/wng.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/pkt.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/piuloc.h>
#include <ti/mas/ecu/test/src/piuport.h>

Include dependency graph for piuisr.c:

Go to the source code of this file.

Defines

#define | piuABS(x) (((x)<0)?(-(x)):(x))

Functions

void | piuReceiveOut (void *piuInst, tword **toTdm, tuint timestamp, tuint frameLength)
void | piuSendIn (void *piuInst, tword **fromTdm, tuint timeStamp, tuint frameLength)

Define Documentation

#define piuABS ( x ) (((x)<0)?(-(x)):(x))

Definition at line 24 of file piuisr.c.

Function Documentation

void piuReceiveOut | ( | void * | piuInst,
 |  | tword ** | toTdm,
 |  | tuint | timestamp,
 |  | tuint | frameLength
 | ) |  |

Definition at line 42 of file piuisr.c.

References piuInst_s::ID, receive_in_buf_t::in_ptr, piuInst_s::mode_bitfield, receive_in_buf_t::out_ptr, piuContext_t::pcmSampleTrace, piu_CTRL_BIT_USE_RECV_OUT_BUF, piu_OPEN, piu_TXRX_TASK_ID, piu_update_buf_ptr(), piuContext, piuInst_s::receive_in_buf, piuInst_s::receive_out_buf, piuInst_s::receive_out_buf_ptr, piuInst_s::rx_underflow_cnt, receive_in_buf_t::segment_count, piuInst_s::segment_size, piuInst_s::send_out_buf_ptr, piuContext_t::sendOutIsrFcn, piuInst_s::sendOutIsrTargetInst, piuInst_s::silence_pattern, and piuInst_s::state.

Referenced by main().

Here is the call graph for this function:

void piuSendIn | ( | void * | piuInst,
 |  | tword ** | fromTdm,
 |  | tuint | timeStamp,
 |  | tuint | frameLength
 | ) |  |

Definition at line 122 of file piuisr.c.

References piuInst_s::ID, piuContext_t::pcmSampleTrace, piu_OPEN, piuContext, piuInst_s::segment_size, piuInst_s::send_out_buf, piuInst_s::send_out_buf_ptr, and piuInst_s::state.

Referenced by main().


ECU Test: piuisr.c Source File

  • File List
  • Globals

piuisr.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: PIU ISR Functions
00003  ******************************************************************************
00004  * FILE NAME:   piuisr.c
00005  *
00006  * DESCRIPTION: Contains some PIU functions that require fast execution.
00007  *
00008  * (C) Copyright 2001 TELOGY Networks, Inc.
00009  *****************************************************************************/
00010 /* system level header files */
00011 #include <ti/mas/types/types.h>
00012
00013 /* system utilities' API's */
00014 #include <ti/mas/util/wng.h>
00015 #include <ti/mas/util/utl.h>
00016 #include <ti/mas/util/pkt.h>
00017
00018 /* PIU related header files */
00019 #include <ti/mas/ecu/test/src/piu.h>
00020 #include <ti/mas/ecu/test/src/piuloc.h>
00021 #include <ti/mas/ecu/test/src/piuport.h>
00022
00023
00024 #define piuABS(x) (((x)<0)?(-(x)):(x))  /* Absolute value definition */
00025
00026 /*****************************************************************************
00027  * FUNCTION PURPOSE: Perform receive-out processing for piuPcmIo().
00028  *****************************************************************************
00029  * DESCRIPTION: Performs PIU receive-out processing to send speech
00030  *              data from the PIU to the PCM interface.
00031  *
00032  *  static void piuReceiveOut (
00033  *    piuInst_t *inst,        - a pointer to PIU instance
00034  *    tword     **toTdm       - On entry this points to the frame size buffer
00035  *                              that HAL has just finished processing. On exit
00036  *                              it must point to the buffer that will be used
00037  *                              by hal on the next frame.
00038  *    tuint      timestamp    - A sample counter provided by HAL
00039  *    tuint      frameLength  - The frame size used by HAL. This size is not
00040  *                              checked for a match with piu
00041  *****************************************************************************/
00042 void piuReceiveOut (void *piuInst, tword **toTdm , tuint timestamp, tuint frameLength)
00043 {
00044   piuInst_t *inst = (piuInst_t *)piuInst;
00045   piuContext_t *context = &piuContext;
00046   linSample *s_ptr,*r_ptr;
00047 #if !PIUDLCOMP_ENABLE
00048   tuint ratio = sizeof(linSample)/sizeof(tword);
00049 #endif
00050
00051   if (inst->state != piu_OPEN)
00052     return;
00053
00054   /* If underflow, there is now no data
00055    * to send to the HAL for output on the TDM line.
00056    * One frame of silence will be introduced here. */
00057   if (inst->receive_in_buf.segment_count <= 0)  {
00058     utlLsMemSet (inst->receive_in_buf.in_ptr, inst->silence_pattern,
00059                  inst->segment_size);
00060     piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00061     inst->rx_underflow_cnt++;
00062   }
00063
00064   /* Provide to HAL where to get the next data to send out the TDM interface */
00065   *toTdm = (tword *)inst->receive_in_buf.out_ptr;
00066   piu_update_buf_ptr (inst, 1, &inst->receive_in_buf.out_ptr);
00067
00068   /* we have compressed linear samples, expand it for ECU delay line!
00069    * Provide to the ECU the samples that HAL is about to transmit on the
00070    * PCM interface */
00071   r_ptr = inst->receive_out_buf_ptr;  /* Store send out value before update */
00072   if (inst->mode_bitfield & piu_CTRL_BIT_USE_RECV_OUT_BUF) {
00073
00074 #if PIUDLCOMP_ENABLE
00075     ecuSim_packLSBof16bitsIntoWords ((linSample *) *toTdm, (tword *)inst->receive_out_buf_ptr,
00076                                      inst->segment_size);
00077     inst->receive_out_buf_ptr += inst->segment_size >> 1; /* store the new value! */
00078 #else
00079     utlCopy((tword *)*toTdm, (tword *)inst->receive_out_buf_ptr, ratio*inst->segment_size);
00080     inst->receive_out_buf_ptr += inst->segment_size;    /* store the new value! */
00081 #endif
00082   }
00083
00084   /* The send out buffer pointer is updated in the HAL call to piu_send_in.
00085    * By convention piu_send_in has been called prior to this function.
00086    * Therefore on entry to this function the send_out_buf_ptr points to the
00087    * location of data that has just been received by HAL */
00088   s_ptr = inst->send_out_buf_ptr;
00089
00090   /* Receive Out is a ping-pong buffer */
00091   if (r_ptr != inst->receive_out_buf) {
00092     inst->receive_out_buf_ptr = inst->receive_out_buf;
00093   }
00094
00095   /* call send-out function */
00096   /* pcm trace */
00097   (*context->pcmSampleTrace)(((inst->ID&0xFF)-1), inst->segment_size,
00098                              *toTdm, 1);
00099
00100
00101   (*context->sendOutIsrFcn)(inst->sendOutIsrTargetInst, s_ptr, r_ptr,
00102                             piu_TXRX_TASK_ID);
00103
00104 } /* piuReceiveOut */
00105
00106 /*****************************************************************************
00107  * FUNCTION PURPOSE: Perform send_in processing for piuPcmIo().
00108  *****************************************************************************
00109  * DESCRIPTION: Performs PIU send-in processing to send
00110  *              data from the PCM to PIU.
00111  *
00112  *   void piuSendIn (
00113  *    piuInst_t *inst,        - a pointer to PIU instance
00114  *    word       **fromTdm    - A pointer to the frame of data that HAL has
00115  *                              completed. On return it will tell HAL where
00116  *                              to put data in the next frame.
00117  *    tuint      timeStamp    - A sample counter provided by HAL
00118  *    tuint      frameLength  - The frame size HAL is using. There is no
00119  *                              check that this is the piu frame size.
00120  *
00121  *****************************************************************************/
00122 void piuSendIn (void *piuInst, tword **fromTdm, tuint timeStamp, tuint frameLength)
00123 {
00124   piuInst_t    *inst = (piuInst_t *)piuInst;
00125   piuContext_t *context = &piuContext;
00126
00127   if (inst->state != piu_OPEN)
00128     return;
00129
00130   /* On entry, fromTdm contains a pointer to the frame of data that has
00131    * just been received by the TDM port */
00132   inst->send_out_buf_ptr = (linSample *)*fromTdm;
00133
00134   /* call pcmTrace function */
00135   (*context->pcmSampleTrace)(((inst->ID&0xFF)-1), inst->segment_size,
00136                              inst->send_out_buf_ptr, 0);
00137
00138   /* Return to HAL the buffer to place the next frame of data. The send
00139    * out buffer is stricly double buffered, so a simple check of the
00140    * just finished buffer is enough to find the location of the next
00141    * buffer half */
00142   if (inst->send_out_buf_ptr == inst->send_out_buf)
00143     *fromTdm = (tword *)&(inst->send_out_buf_ptr[inst->segment_size]);
00144   else
00145     *fromTdm = (tword *)inst->send_out_buf;
00146
00147 } /* piuSendIn */


ECU Test: piuloc.h File Reference

  • File List
  • Globals

piuloc.h File Reference

#include <ti/mas/types/const.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/cb.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/piuport.h>

Include dependency graph for piuloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | piuPcmPatternDetect_t
struct | piuEnergyDCLevel_t
struct | bidSilenceCtrl_t
struct | receive_in_buf_t
struct | piuInst_s

Defines

#define | piu_NUMSEGM_RX3 3
#define | piu_NUMSEGM_RX2 2
#define | piu_NUMSEGM_TX 2
#define | piu_TX_TASK_ID 2
#define | piu_TXRX_TASK_ID 0
#define | piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT -6
#define | piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT -2
#define | piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION 2
#define | piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR 1
#define | piu_exc_assert(expr, code, inst)

Typedefs

typedef piuInst_s | piuInst_t

Enumerations

enum | { piu_CLOSED = 0, piu_OPEN = 1 }
enum | { piu_PCM_PATTERN_CUSTOM, piu_PCM_PATTERN_T1, piu_PCM_PATTERN_E1 }

Functions

void | piu_exception (tuint id, tuint code)
void | piu_frame_energy (tint frameLen, Fract *frame, LFract *energy)
void | piu_frame_DClevel (tint frameLen, Fract *frame, LFract *DClevel)
void | piu_remove_dc_component (tint frameLen, Fract *frame, LFract *DClevel, tint alpha)
void | piu_get_stats (void *piuInst, piuStats_t *levels)
void | piu_pcm_pattern_detect (piuInst_t *inst, tint *pcm_in)
void | piu_pcm_pattern_generate (piuInst_t *inst)
void | piu_bid_silence_detect (piuInst_t *inst)
void | piu_energy_dc_measurement (piuInst_t *inst, tint *lin_samples)
void | piu_update_buf_ptr (piuInst_t *inst, tbool dir, linSample **in_ptr)
void | piu_pcm_companding (piuInst_t *inst, tint *pcm_in, tint *linear_out, tint length)
void | piu_pcm_compressing (piuInst_t *inst, tint *linear_in, tint *pcm_out, tint length)

Define Documentation

#define piu_NUMSEGM_RX3 3

Definition at line 36 of file piuloc.h.

Referenced by piuGetSizes(), piuNew(), piuOpen(), and piuReceiveIn().

#define piu_NUMSEGM_RX2 2

Definition at line 40 of file piuloc.h.

Referenced by piuGetSizes(), piuOpen(), and piuReceiveIn().

#define piu_NUMSEGM_TX 2

Definition at line 41 of file piuloc.h.

Referenced by piuGetSizes(), and piuOpen().

#define piu_TX_TASK_ID 2

Definition at line 44 of file piuloc.h.

Referenced by piuTxRxProc().

#define piu_TXRX_TASK_ID 0

Definition at line 45 of file piuloc.h.

Referenced by piuReceiveOut().

#define piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT -6

Definition at line 48 of file piuloc.h.

Referenced by piuTxRxProc().

#define piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT -2

Definition at line 49 of file piuloc.h.

Referenced by piuTxRxProc().

#define piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION 2

Definition at line 55 of file piuloc.h.

Referenced by piu_bid_silence_detect().

#define piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR 1

Definition at line 65 of file piuloc.h.

Referenced by piuBidSilenceDetect().

#define piu_exc_assert | ( | expr,
 |  | code,
 |  | inst | )

Value:

{ \
  (expr) ? ((void)0) : piu_exception((inst)->ID, code); }

Definition at line 157 of file piuloc.h.

Referenced by piuDelete(), and piuOpen().

Typedef Documentation

typedef struct piuInst_s piuInst_t

Enumeration Type Documentation

anonymous enum

Enumerator:
piu_CLOSED
piu_OPEN

Definition at line 69 of file piuloc.h.

anonymous enum

Enumerator:
piu_PCM_PATTERN_CUSTOM
piu_PCM_PATTERN_T1
piu_PCM_PATTERN_E1

Definition at line 75 of file piuloc.h.

Function Documentation

void piu_exception | ( | tuint | id,
 |  | tuint | code
 | ) |  |

Definition at line 38 of file piu.c.

References piuContext_t::debugInfo, and piuContext.

void piu_frame_energy | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | energy
 | ) |  |

Definition at line 46 of file piufutil.c.

Referenced by piuReceiveIn(), and piuTxRxProc().

void piu_frame_DClevel | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | DClevel
 | ) |  |

Definition at line 77 of file piufutil.c.

Referenced by piuReceiveIn(), and piuTxRxProc().

void piu_remove_dc_component | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | DClevel,
 |  | tint | alpha
 | ) |  |

Definition at line 91 of file piufutil.c.

Referenced by piuTxRxProc().

void piu_get_stats | ( | void * | piuInst,
 |  | piuStats_t * | levels
 | ) |  |

Definition at line 128 of file piutxrx.c.

References piuInst_s::energy_DClevel, piuStats_t::receive_out, piuStats_t::receive_out_mean, piuInst_s::rx_underflow_cnt, piuEnergyDCLevel_t::rxDClevel, piuEnergyDCLevel_t::rxEnergy, piuStats_t::send_out, piuStats_t::send_out_mean, piuEnergyDCLevel_t::txDClevel, piuEnergyDCLevel_t::txEnergy, and piuStats_t::underrun.

Referenced by piuControl().

void piu_pcm_pattern_detect | ( | piuInst_t * | inst,
 |  | tint * | pcm_in
 | ) |  |

Definition at line 206 of file piutxrx.c.

References piuPcmPatternDetect_t::cnt, piuPcmPatternDetect_t::custom, piuInst_s::mode_bitfield, piuInst_s::pcmPattern, piu_CTRL_BIT_PATTERN_DETECT, piu_PATTERN_DETECTED, piu_PCM_PATTERN_CUSTOM, piu_PCM_PATTERN_E1, piu_PCM_PATTERN_T1, piuContext, piuContext_t::reportOutFcn, piuInst_s::reportOutTargetInst, piuInst_s::segment_size, and piuPcmPatternDetect_t::type.

Referenced by piuTxRxProc().

void piu_pcm_pattern_generate ( piuInst_t * inst )

Definition at line 258 of file piutxrx.c.

References piuInst_s::generatePattern, receive_in_buf_t::in_ptr, piuInst_s::pcm_format, piu_COMP_ALAW, piu_COMP_ULAW, piu_update_buf_ptr(), piuInst_s::receive_in_buf, and piuInst_s::segment_size.

Referenced by piuTxRxProc().

Here is the call graph for this function:

void piu_bid_silence_detect ( piuInst_t * inst )

Definition at line 163 of file piutxrx.c.

References piuInst_s::bidSilence, bidSilenceCtrl_t::cnt, bidSilenceCtrl_t::initCnt, piuInst_s::mode_bitfield, piu_BIDIR_SILENCE_DETECTED, piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION, piu_CTRL_BIT_BID_SILENCE_DET, piuContext, piuContext_t::reportOutFcn, piuInst_s::reportOutTargetInst, bidSilenceCtrl_t::rxSilDetEnergy, piuInst_s::segment_size, bidSilenceCtrl_t::threshold, and bidSilenceCtrl_t::txSilDetEnergy.

Referenced by piuTxRxProc().

void piu_energy_dc_measurement | ( | piuInst_t * | inst,
 |  | tint * | lin_samples
 | ) |  |

void piu_update_buf_ptr | ( | piuInst_t * | inst,
 |  | tbool | dir,
 |  | linSample ** | in_ptr
 | ) |  |

Definition at line 102 of file piutxrx.c.

References receive_in_buf_t::end_ptr, piuInst_s::receive_in_buf, receive_in_buf_t::segment_count, piuInst_s::segment_size, and receive_in_buf_t::start_ptr.

Referenced by piu_pcm_pattern_generate(), piuReceiveIn(), piuReceiveOut(), and piuTxRxProc().

void piu_pcm_companding | ( | piuInst_t * | inst,
 |  | tint * | pcm_in,
 |  | tint * | linear_out,
 |  | tint | length
 | ) |  |

Definition at line 71 of file piutxrx.c.

References piuInst_s::mode_bitfield, piuInst_s::pcm_expand_table, piu_CTRL_BIT_TRANSPARENT_MODE, and UAExpand().

Referenced by piuTxRxProc().

Here is the call graph for this function:

void piu_pcm_compressing | ( | piuInst_t * | inst,
 |  | tint * | linear_in,
 |  | tint * | pcm_out,
 |  | tint | length
 | ) |  |

Definition at line 37 of file piutxrx.c.

References piuInst_s::mode_bitfield, piuInst_s::pcm_format, piu_COMP_ALAW, piu_COMP_ULAW, and piu_CTRL_BIT_TRANSPARENT_MODE.

Referenced by piuReceiveIn().


ECU Test: piuloc.h Source File

  • File List
  • Globals

piuloc.h

Go to the documentation of this file.
00001 #ifndef _PIULOC_H
00002 #define _PIULOC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Definitions local to the PCM Interface Unit (PIU)
00005  ******************************************************************************
00006  * FILE NAME:   piuloc.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions that are local to
00009  *              the PIU module.
00010  *
00011  * REQUIRES:    types.h   (generic DSP ECO types)
00012  *              const.h   (sampling rate)
00013  *              circbuf.h (software circular buffer defition)
00014  *              piu.h     (PIU configuration types)
00015  *              piuport.h (piu_MAX_SUBSEGLENGTH)
00016  *
00017  * TABS: NONE
00018  *
00019  * (C) Copyright 1996, 1997, 1998, TELOGY Networks, Inc.
00020  *****************************************************************************/
00021
00022 /* System level header files */
00023 #include <ti/mas/types/const.h>
00024 #include <ti/mas/types/types.h>
00025 #include <ti/mas/fract/fract.h>
00026
00027 /* System utilities' API's */
00028 #include <ti/mas/util/cb.h>
00029
00030 /* PIU high level header files */
00031 #include <ti/mas/ecu/test/src/piu.h>
00032 /* PIU low level header files */
00033 #include <ti/mas/ecu/test/src/piuport.h>
00034
00035 /* Triple buffering in Rx direction (VOICE application) */
00036 #define piu_NUMSEGM_RX3            3
00037 /* Double buffering in Rx direction                   *
00038  * (used only if receiveout buffer is not allocated,  *
00039  *  like for FAX application)                         */
00040 #define piu_NUMSEGM_RX2            2
00041 #define piu_NUMSEGM_TX             2
00042
00043 /* Sampling Frequency */
00044 #define piu_TX_TASK_ID   2 /* same as SIU_TX_QUEUE_ID */
00045 #define piu_TXRX_TASK_ID 0 /* same as SIU_TXRX_QUEUE_ID */
00046
00047 /* Parameters for DC offset removal */
00048 #define piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT -6
00049 #define piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT -2
00050
00051 #ifndef GG_MULTSAMPVC
00052
00053 /* Defines for Bidirectional Silence detection */
00054 /* Decrement the counter once every 2^2 = 4 sample Decreases precision to 0.5ms*/
00055 #define piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION  2
00056
00057 #else /* 16 KHz sampling rate */
00058
00059 /* Defines for Bidirectional Silence detection */
00060 /* Decrement the counter once every 2^3 = 8 sample Decreases precision to 0.5ms*/
00061 #define piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION  3
00062
00063 #endif
00064
00065 #define piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR 1 /* log2(65536 (max tuint) / 32768 (max time in ms)) */
00066
00067
00068 /* PIU global states */
00069 enum {
00070   piu_CLOSED = 0,
00071   piu_OPEN   = 1
00072 };
00073
00074 /* PCM Pattern Detection Types */
00075 enum {
00076   piu_PCM_PATTERN_CUSTOM,
00077   piu_PCM_PATTERN_T1,
00078   piu_PCM_PATTERN_E1
00079 };
00080
00081 typedef struct {
00082   tint type;       /* custom, T1 or E1 */
00083   tint custom;     /* custom pattern to be detected */
00084   tlong cnt;       /* Counts successive matching samples */
00085   tint initCnt;    /* Required number of matching samples */
00086 } piuPcmPatternDetect_t;
00087
00088 /* Geometric mean values */
00089 typedef struct {
00090   LFract txEnergy;
00091   LFract rxEnergy;
00092   LFract txDClevel;
00093   LFract rxDClevel;
00094 } piuEnergyDCLevel_t;
00095
00096 /* bi-directional silence detection */
00097 typedef struct {
00098   LFract txSilDetEnergy;  /* saturated energy */
00099   LFract rxSilDetEnergy;
00100   LFract threshold;       /* Below this power level the absence of
00101                            * signal is declared */
00102   tuint  cnt;             /* Hangover Timer; counts time while both,
00103                            * tx & rx, energies are below threshold */
00104   tuint   initCnt;         /* Initial value for Hangover Timer */
00105 } bidSilenceCtrl_t;
00106
00107 /* receive_in buf parameters */
00108 typedef struct {
00109   linSample *in_ptr;
00110   linSample *out_ptr;
00111   linSample *start_ptr;
00112   linSample *end_ptr;
00113   linSample *top_ptr;
00114   tint      segment_count;
00115 } receive_in_buf_t;
00116
00117
00118 /******************************************************************************
00119  * DATA DEFINITION: PIU instance data structure
00120  ******************************************************************************
00121  * DESCRIPTION: This structure specifies the state of an instance of a PIU.
00122  *
00123  ******************************************************************************/
00124 typedef struct piuInst_s {
00125   tuint ID;                       /* user-defined ID field */
00126   tint  state;                    /* indicates if PIU is open or closed */
00127   tuint mode_bitfield;            /* bit field of different mode */
00128   const tint *pcm_expand_table;   /* lookup table for PCM expansion */
00129   tint pcm_format;                /* PCM conversion format (u-law, A-law,
00130                                    *  linear) */
00131   tint segment_size;              /* # of samples in a PIU voice segment */
00132   tuint rx_delay;                 /* delay length in samples */
00133   tuint rx_underflow_cnt;         /* # of Rx underflows in receive-out fcn's */
00134   tuint rx_overflow_cnt;          /* # of Rx overflows in receive-out fcn's */
00135   linSample *receive_out_buf;     /* address of receive-out buffer */
00136   linSample *receive_out_buf_ptr; /* current receive-out buffer pointer    */
00137   linSample *send_out_buf;        /* address of send-in buffer             */
00138   linSample *send_out_buf_ptr;    /* current send-in buffer pointer     */
00139
00140   void *reportOutTargetInst;      /* report instance              */
00141   void *sendOutProcTargetInst;    /* foreground sendOut instance  */
00142   void *sendOutIsrTargetInst;     /* background sendOut instance  */
00143
00144   piuEnergyDCLevel_t    energy_DClevel; /* enery/DC levels of Tx/Rx */
00145   tuint                 generatePattern;/* pattern to be generated */
00146   receive_in_buf_t      receive_in_buf; /* receive in buffer parameters */
00147   bidSilenceCtrl_t      bidSilence;     /* bidSilence parameters */
00148   piuPcmPatternDetect_t pcmPattern;     /* PCM Pattern Detection parameters */
00149   linSample             silence_pattern;/* silence pattern */
00150 } piuInst_t;
00151
00152 /*----------------------------*/
00153 /* Exception and Debug Macros */
00154 /*----------------------------*/
00155
00156 /* Assert macro for the exceptions */
00157 #define piu_exc_assert(expr,code,inst) { \
00158   (expr) ? ((void)0) : piu_exception((inst)->ID, code); }
00159
00160 /* Function prototypes */
00161 /* piu.c */
00162 void piu_exception(tuint id, tuint code);
00163 /* piufutil.s */
00164 void piu_frame_energy   (tint frameLen, Fract *frame, LFract *energy);
00165 void piu_frame_DClevel  (tint frameLen, Fract *frame, LFract *DClevel);
00166 void piu_remove_dc_component (tint frameLen, Fract *frame, LFract *DClevel, tint alpha);
00167 /* piutxrx.c */
00168 void piu_get_stats             (void *piuInst, piuStats_t *levels);
00169 void piu_pcm_pattern_detect    (piuInst_t *inst, tint *pcm_in);
00170 void piu_pcm_pattern_generate  (piuInst_t *inst);
00171 void piu_bid_silence_detect    (piuInst_t *inst);
00172 void piu_energy_dc_measurement (piuInst_t *inst, tint *lin_samples);
00173 void piu_update_buf_ptr        (piuInst_t *inst, tbool dir, linSample **in_ptr);
00174 void piu_pcm_companding        (piuInst_t *inst, tint *pcm_in, tint *linear_out,
00175                                 tint length);
00176 void piu_pcm_compressing       (piuInst_t *inst, tint *linear_in, tint *pcm_out,
00177                                 tint length);
00178
00179
00180 #endif /* _PIULOC_H */
00181 /* nothing past this point */


ECU Test: piuport.h File Reference

  • File List
  • Globals

piuport.h File Reference

#include <ti/mas/ecu/test/src/ecusimport.h>

Include dependency graph for piuport.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | PIU_MAX_SUBSEGLENGTH 40
#define | PIU_STATE_BEGIN() ((void)0)
#define | PIU_STATE_END() ((void)0)
#define | PIU_BEGIN_CRITICAL_SECTION() ((void)0)
#define | PIU_END_CRITICAL_SECTION() ((void)0)
#define | PIUDLCOMP_ENABLE 0
#define | _ECUSIM_PIU_PORT_C54 0
#define | _ECUSIM_PIU_PORT_C54F 0
#define | _ECUSIM_PIU_PORT_C55 0
#define | _ECUSIM_PIU_PORT_C55L 0
#define | _ECUSIM_PIU_PORT_C64 0
#define | _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 0
#define | _ECUSIM_PIU_PORT_C64P 0
#define | _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 0
#define | _ECUSIM_PIU_PORT_ELF_C64P 0
#define | _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 0
#define | _ECUSIM_PIU_PORT_C66 0
#define | _ECUSIM_PIU_PORT_ELF_C66 0
#define | _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 0
#define | _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 0

Define Documentation

#define PIU_MAX_SUBSEGLENGTH 40

Definition at line 16 of file piuport.h.

#define PIU_STATE_BEGIN ( ) ((void)0)

Definition at line 23 of file piuport.h.

#define PIU_STATE_END ( ) ((void)0)

Definition at line 24 of file piuport.h.

#define PIU_BEGIN_CRITICAL_SECTION ( ) ((void)0)

Definition at line 27 of file piuport.h.

Referenced by piuControl(), and piuReceiveIn().

#define PIU_END_CRITICAL_SECTION ( ) ((void)0)

Definition at line 28 of file piuport.h.

Referenced by piuControl(), and piuReceiveIn().

#define PIUDLCOMP_ENABLE 0

Definition at line 33 of file piuport.h.

#define _ECUSIM_PIU_PORT_C54 0

Definition at line 39 of file piuport.h.

#define _ECUSIM_PIU_PORT_C54F 0

Definition at line 45 of file piuport.h.

#define _ECUSIM_PIU_PORT_C55 0

Definition at line 51 of file piuport.h.

#define _ECUSIM_PIU_PORT_C55L 0

Definition at line 57 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64 0

Definition at line 63 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 0

Definition at line 69 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64P 0

Definition at line 75 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 0

Definition at line 81 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C64P 0

Definition at line 87 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 93 of file piuport.h.

#define _ECUSIM_PIU_PORT_C66 0

Definition at line 99 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C66 0

Definition at line 105 of file piuport.h.

#define _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 0

Definition at line 111 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 0

Definition at line 117 of file piuport.h.


ECU Test: piuport.h Source File

  • File List
  • Globals

piuport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To include the header file specific to platforms for AEC.
00003  ******************************************************************************
00004  * FILE NAME:   piuport.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #ifndef _PIUPORT_H
00012 #define _PIUPORT_H
00013
00014 #include <ti/mas/ecu/test/src/ecusimport.h>
00015
00016 #define PIU_MAX_SUBSEGLENGTH   40   /* maximum 40 samples in a sub-segment */
00017
00018 /*-----------------------------*/
00019 /* PIU Critical Section Macros */
00020 /*-----------------------------*/
00021
00022 /* Critical section for the PIU states (piuInst->state) */
00023 #define PIU_STATE_BEGIN() ((void)0)
00024 #define PIU_STATE_END()   ((void)0)
00025
00026 /* Critical section for the PIU receive-in buffer synchronization */
00027 #define PIU_BEGIN_CRITICAL_SECTION() ((void)0)
00028 #define PIU_END_CRITICAL_SECTION()   ((void)0)
00029
00030 #if ecu_DELAY_LINE_COMPRESS
00031 #define PIUDLCOMP_ENABLE        1
00032 #else
00033 #define PIUDLCOMP_ENABLE        0
00034 #endif
00035
00036 #ifdef ti_targets_C54
00037 #define _ECUSIM_PIU_PORT_C54 1
00038 #else
00039 #define _ECUSIM_PIU_PORT_C54 0
00040 #endif
00041
00042 #ifdef ti_targets_C54_far
00043 #define _ECUSIM_PIU_PORT_C54F 1
00044 #else
00045 #define _ECUSIM_PIU_PORT_C54F 0
00046 #endif
00047
00048 #ifdef ti_targets_C55
00049 #define _ECUSIM_PIU_PORT_C55 1
00050 #else
00051 #define _ECUSIM_PIU_PORT_C55 0
00052 #endif
00053
00054 #ifdef ti_targets_C55_large
00055 #define _ECUSIM_PIU_PORT_C55L 1
00056 #else
00057 #define _ECUSIM_PIU_PORT_C55L 0
00058 #endif
00059
00060 #ifdef ti_targets_C64
00061 #define _ECUSIM_PIU_PORT_C64 1
00062 #else
00063 #define _ECUSIM_PIU_PORT_C64 0
00064 #endif
00065
00066 #ifdef ti_targets_C64_big_endian
00067 #define _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 1
00068 #else
00069 #define _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 0
00070 #endif
00071
00072 #ifdef ti_targets_C64P
00073 #define _ECUSIM_PIU_PORT_C64P 1
00074 #else
00075 #define _ECUSIM_PIU_PORT_C64P 0
00076 #endif
00077
00078 #ifdef ti_targets_C64P_big_endian
00079 #define _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 1
00080 #else
00081 #define _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 0
00082 #endif
00083
00084 #ifdef ti_targets_elf_C64P
00085 #define _ECUSIM_PIU_PORT_ELF_C64P 1
00086 #else
00087 #define _ECUSIM_PIU_PORT_ELF_C64P 0
00088 #endif
00089
00090 #ifdef ti_targets_elf_C64P_big_endian
00091 #define _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 1
00092 #else
00093 #define _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 0
00094 #endif
00095
00096 #ifdef ti_targets_C66
00097 #define _ECUSIM_PIU_PORT_C66 1
00098 #else
00099 #define _ECUSIM_PIU_PORT_C66 0
00100 #endif
00101
00102 #ifdef ti_targets_elf_C66
00103 #define _ECUSIM_PIU_PORT_ELF_C66 1
00104 #else
00105 #define _ECUSIM_PIU_PORT_ELF_C66 0
00106 #endif
00107
00108 #ifdef ti_targets_C66_big_endian
00109 #define _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 1
00110 #else
00111 #define _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 0
00112 #endif
00113
00114 #ifdef ti_targets_elf_C66_big_endian
00115 #define _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 1
00116 #else
00117 #define _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 0
00118 #endif
00119
00120
00121 #if   (_ECUSIM_PIU_PORT_C54 || _ECUSIM_PIU_PORT_C54F)
00122 #include <ti/mas/ecu/test/src/c54/piuport.h>
00123 #elif (_ECUSIM_PIU_PORT_C55 || _ECUSIM_PIU_PORT_C55L)
00124 #include <ti/mas/ecu/test/src/c55/piuport.h>
00125 #elif (_ECUSIM_PIU_PORT_C64       || _ECUSIM_PIU_PORT_C64_BIG_ENDIAN      || \
00126        _ECUSIM_PIU_PORT_C64P      || _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN     || \
00127        _ECUSIM_PIU_PORT_ELF_C64P  || _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN || \
00128        _ECUSIM_PIU_PORT_C66       || _ECUSIM_PIU_PORT_C66_BIG_ENDIAN      || \
00129        _ECUSIM_PIU_PORT_ELF_C66   || _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN)
00130 #include <ti/mas/ecu/test/src/c64/piuport.h>
00131 #else
00132 #error invalid target
00133 #endif
00134
00135 #endif /* _PIUPORT_H */
00136
00137 /* Nothing past this point */
00138
00139


ECU Test: piutxrx.c File Reference

  • File List
  • Globals

piutxrx.c File Reference

#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/piuloc.h>
#include <ti/mas/ecu/test/src/piuport.h>

Include dependency graph for piutxrx.c:

Go to the source code of this file.

Functions

void | piu_pcm_compressing (piuInst_t *inst, tint *linear_in, tint *pcm_out, tint length)
void | piu_pcm_companding (piuInst_t *inst, tint *pcm_in, tint *linear_out, tint length)
void | piu_update_buf_ptr (piuInst_t *inst, tbool dir, linSample **in_ptr)
void | piu_get_stats (void *piuInst, piuStats_t *stats)
void | piu_bid_silence_detect (piuInst_t *inst)
void | piu_pcm_pattern_detect (piuInst_t *inst, tint *pcm_in)
void | piu_pcm_pattern_generate (piuInst_t *inst)
void | piuReceiveIn (void *piuInst, void *speech_samples)
void | piuTxRxProc (void *piuInst, linSample *tx_ptr, linSample *rx_ptr)

Function Documentation

void piu_pcm_compressing | ( | piuInst_t * | inst,
 |  | tint * | linear_in,
 |  | tint * | pcm_out,
 |  | tint | length
 | ) |  |

Definition at line 37 of file piutxrx.c.

References piuInst_s::mode_bitfield, piuInst_s::pcm_format, piu_COMP_ALAW, piu_COMP_ULAW, and piu_CTRL_BIT_TRANSPARENT_MODE.

Referenced by piuReceiveIn().

void piu_pcm_companding | ( | piuInst_t * | inst,
 |  | tint * | pcm_in,
 |  | tint * | linear_out,
 |  | tint | length
 | ) |  |

Definition at line 71 of file piutxrx.c.

References piuInst_s::mode_bitfield, piuInst_s::pcm_expand_table, piu_CTRL_BIT_TRANSPARENT_MODE, and UAExpand().

Referenced by piuTxRxProc().

Here is the call graph for this function:

void piu_update_buf_ptr | ( | piuInst_t * | inst,
 |  | tbool | dir,
 |  | linSample ** | in_ptr
 | ) |  |

Definition at line 102 of file piutxrx.c.

References receive_in_buf_t::end_ptr, piuInst_s::receive_in_buf, receive_in_buf_t::segment_count, piuInst_s::segment_size, and receive_in_buf_t::start_ptr.

Referenced by piu_pcm_pattern_generate(), piuReceiveIn(), piuReceiveOut(), and piuTxRxProc().

void piu_get_stats | ( | void * | piuInst,
 |  | piuStats_t * | stats
 | ) |  |

Definition at line 128 of file piutxrx.c.

References piuInst_s::energy_DClevel, piuStats_t::receive_out, piuStats_t::receive_out_mean, piuInst_s::rx_underflow_cnt, piuEnergyDCLevel_t::rxDClevel, piuEnergyDCLevel_t::rxEnergy, piuStats_t::send_out, piuStats_t::send_out_mean, piuEnergyDCLevel_t::txDClevel, piuEnergyDCLevel_t::txEnergy, and piuStats_t::underrun.

Referenced by piuControl().

void piu_bid_silence_detect ( piuInst_t * inst )

Definition at line 163 of file piutxrx.c.

References piuInst_s::bidSilence, bidSilenceCtrl_t::cnt, bidSilenceCtrl_t::initCnt, piuInst_s::mode_bitfield, piu_BIDIR_SILENCE_DETECTED, piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION, piu_CTRL_BIT_BID_SILENCE_DET, piuContext, piuContext_t::reportOutFcn, piuInst_s::reportOutTargetInst, bidSilenceCtrl_t::rxSilDetEnergy, piuInst_s::segment_size, bidSilenceCtrl_t::threshold, and bidSilenceCtrl_t::txSilDetEnergy.

Referenced by piuTxRxProc().

void piu_pcm_pattern_detect | ( | piuInst_t * | inst,
 |  | tint * | pcm_in
 | ) |  |

Definition at line 206 of file piutxrx.c.

References piuPcmPatternDetect_t::cnt, piuPcmPatternDetect_t::custom, piuInst_s::mode_bitfield, piuInst_s::pcmPattern, piu_CTRL_BIT_PATTERN_DETECT, piu_PATTERN_DETECTED, piu_PCM_PATTERN_CUSTOM, piu_PCM_PATTERN_E1, piu_PCM_PATTERN_T1, piuContext, piuContext_t::reportOutFcn, piuInst_s::reportOutTargetInst, piuInst_s::segment_size, and piuPcmPatternDetect_t::type.

Referenced by piuTxRxProc().

void piu_pcm_pattern_generate ( piuInst_t * inst )

Definition at line 258 of file piutxrx.c.

References piuInst_s::generatePattern, receive_in_buf_t::in_ptr, piuInst_s::pcm_format, piu_COMP_ALAW, piu_COMP_ULAW, piu_update_buf_ptr(), piuInst_s::receive_in_buf, and piuInst_s::segment_size.

Referenced by piuTxRxProc().

Here is the call graph for this function:

void piuReceiveIn | ( | void * | piuInst,
 |  | void * | speech_samples
 | ) |  |

Definition at line 288 of file piutxrx.c.

References piuInst_s::bidSilence, piuInst_s::energy_DClevel, receive_in_buf_t::in_ptr, piuInst_s::mode_bitfield, PIU_BEGIN_CRITICAL_SECTION, piu_CTRL_BIT_BID_SILENCE_DET, piu_CTRL_BIT_DO_PCM_LOOPBACK, piu_CTRL_BIT_PATTERN_GENERATE, piu_CTRL_BIT_TRIPLE_RX_BUF, PIU_END_CRITICAL_SECTION, piu_frame_DClevel(), piu_frame_energy(), piu_NUMSEGM_RX2, piu_NUMSEGM_RX3, piu_OPEN, piu_pcm_compressing(), piu_update_buf_ptr(), piuInst_s::receive_in_buf, piuInst_s::rx_overflow_cnt, piuEnergyDCLevel_t::rxDClevel, piuEnergyDCLevel_t::rxEnergy, bidSilenceCtrl_t::rxSilDetEnergy, receive_in_buf_t::segment_count, piuInst_s::segment_size, and piuInst_s::state.

Referenced by main().

Here is the call graph for this function:

void piuTxRxProc | ( | void * | piuInst,
 |  | linSample * | tx_ptr,
 |  | linSample * | rx_ptr
 | ) |  |

Definition at line 343 of file piutxrx.c.

References piuInst_s::mode_bitfield, piu_bid_silence_detect(), piu_CTRL_BIT_BID_SILENCE_DET, piu_CTRL_BIT_DC_FILTR_SELECT_MODE1, piu_CTRL_BIT_DO_LIN_LOOPBACK, piu_CTRL_BIT_DO_PCM_LOOPBACK, piu_CTRL_BIT_LOOPBACK_NOPASS, piu_CTRL_BIT_PATTERN_DETECT, piu_CTRL_BIT_PATTERN_GENERATE, piu_CTRL_BIT_RECV_IN_BUF_EMPTY, piu_CTRL_BIT_REMOVE_DC_COMP, piu_CTRL_BIT_UNDERRUN_REPORT, piu_CTRL_BIT_USE_RECV_OUT_BUF, piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT, piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT, piu_frame_DClevel(), piu_frame_energy(), piu_OPEN, piu_pcm_companding(), piu_pcm_pattern_detect(), piu_pcm_pattern_generate(), piu_remove_dc_component(), piu_TX_TASK_ID, piu_UNDERRUN, piu_update_buf_ptr(), piuContext, piuContext_t::reportOutFcn, piuContext_t::sendOutProcFcn, and piuInst_s::state.

Referenced by siuTxRxSendIn().

Here is the call graph for this function:


ECU Test: piutxrx.c Source File

  • File List
  • Globals

piutxrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * PURPOSE : Main source file for the PCM Interface Unit (PIU).
00003  ******************************************************************************
00004  * FILE NAME:   piutxrx.c
00005  *
00006  * DESCRIPTION: Contains main PIU functions.
00007  * (C) Copyright 2001, Telogy Networks Inc.
00008  *****************************************************************************/
00009 /* Ansi C header files */
00010 #include <stdlib.h>
00011 #include <string.h>
00012
00013 /* System Level header files */
00014 #include <ti/mas/types/types.h>
00015
00016 /* System Utilities' API's */
00017 #include <ti/mas/util/utl.h>
00018 #include <ti/mas/util/mua.h>
00019
00020 /* PIU related header files */
00021 #include <ti/mas/ecu/test/src/piu.h>
00022 #include <ti/mas/ecu/test/src/piuloc.h>
00023 #include <ti/mas/ecu/test/src/piuport.h>
00024
00025 /*****************************************************************************
00026  * FUNCTION PURPOSE: Perform linear samples to PCM samples conversion.
00027  *****************************************************************************
00028  * DESCRIPTION: Performs 16-bit to n-bit PCM compression
00029  *
00030  *  void piu_pcm_compressing (
00031  *    piuInst_t *inst,        - a pointer to PIU instance
00032  *    tint      *linear_in,   - a pointer to input buffer
00033  *    tint      *pcm_out,     - a pointer to output buffer
00034  *    tint      length)       - number of samples to compress
00035  *
00036  *****************************************************************************/
00037 void piu_pcm_compressing (piuInst_t *inst, tint *linear_in,
00038                           tint *pcm_out, tint length)
00039 {
00040   linSample *in_ptr, *out_ptr;
00041
00042   /* Initialize common variable(s) */
00043   in_ptr  = linear_in;
00044   out_ptr = pcm_out;
00045   if ((inst->mode_bitfield&piu_CTRL_BIT_TRANSPARENT_MODE)) {
00046     utlCopy((tword *)in_ptr, (tword *)out_ptr, length);
00047   }
00048   else {
00049     /* Perform 16-bit to 8-bit compression or linear compression */
00050     if (inst->pcm_format == piu_COMP_ULAW)        /* u-law + saturation */
00051       muaTblUlawCmpr (length, in_ptr, out_ptr);
00052     else if (inst->pcm_format == piu_COMP_ALAW)   /* A-law + saturation */
00053       muaTblAlawCmpr (length, in_ptr, out_ptr);
00054     else                         /* linear 16 bit data, out = in */
00055       utlCopy((tword *)in_ptr, (tword *)out_ptr, length);
00056   }
00057 } /* piu_pcm_compressing */
00058
00059 /*****************************************************************************
00060  * FUNCTION PURPOSE: Perform PCM samples to linear samples conversion
00061  *****************************************************************************
00062  * DESCRIPTION: PCM samples to linear samples conversion.
00063  *
00064  *  void piu_pcm_companding (
00065  *    piuInst_t *inst,        - a pointer to PIU instance
00066  *    tint      *pcm_in,      - a pointer to input buffer
00067  *    tint      *linear_out,  - a pointer to output buffer
00068  *    tint      length)       - number of samples to compand
00069  *
00070  ****************************************************************************/
00071 void piu_pcm_companding (piuInst_t *inst, tint *pcm_in,
00072                          tint *linear_out, tint length)
00073 {
00074   tint  *linear_out_ptr;
00075   const tint *pcm_expand_table;
00076
00077   linear_out_ptr = linear_out;
00078   /* Perform n-bit to 16-bit PCM expansion */
00079   if ((!(inst->mode_bitfield&piu_CTRL_BIT_TRANSPARENT_MODE)) &&
00080     (inst->pcm_expand_table != NULL)) {
00081     pcm_expand_table = inst->pcm_expand_table;
00082     UAExpand(length, (tword *)pcm_in, &linear_out_ptr, pcm_expand_table);
00083   }
00084   else {    /* no processing in transparent mode or linear expansion */
00085     utlCopy((tword *)pcm_in, (tword *)linear_out_ptr, length);
00086   }
00087 } /* piu_pcm_companding */
00088
00089 /******************************************************************************
00090  * FUNCTION PURPOSE: Update (boundary check) the receive_in buffer in_index
00091  ******************************************************************************
00092  * DESCRIPTION: Update (boundary check) the receive_in buffer in_index.
00093  *
00094  *   void piu_update_buf_ptr (
00095  *     void *piuInst, - A pointer to PIU instance
00096  *     tbool dir,      - direction: 0-input, 1-output
00097  *     tint **inptr)  - Adress of receive_in buf in_ptr address
00098  *
00099  *
00100  *****************************************************************************/
00101
00102 void piu_update_buf_ptr (piuInst_t *inst, tbool dir, linSample **in_ptr)
00103 {
00104   *in_ptr += inst->segment_size;
00105   if (*in_ptr == inst->receive_in_buf.end_ptr) {
00106     *in_ptr = inst->receive_in_buf.start_ptr;
00107   }
00108   if (dir)
00109     inst->receive_in_buf.segment_count--;
00110   else
00111     inst->receive_in_buf.segment_count++;
00112 } /* piu_update_buf_ptr */
00113
00114 /******************************************************************************
00115  * FUNCTION PURPOSE: Measure signal levels
00116  ******************************************************************************
00117  * DESCRIPTION: This function reports the PIU send-out and receive-out signal
00118  *              levels. It is executed in the context of the calling task.
00119  *              The signal level reported in dBm0.
00120  *
00121  *   void piu_get_stats (
00122  *     void        *piuInst, - A pointer to PIU instance
00123  *     piuLevels_t *levels)  - Pointer to signal level structure
00124  *
00125  * NOTE: Vmax = 32768 for +3dBm0
00126  *
00127  *****************************************************************************/
00128 void piu_get_stats (void *piuInst, piuStats_t *stats)
00129 {
00130   tint db;
00131   LFract lin;
00132   piuInst_t          *inst       = (piuInst_t *)piuInst;
00133   piuEnergyDCLevel_t *lin_levels = (piuEnergyDCLevel_t *)&inst->energy_DClevel;
00134
00135   /* mean is reported in 16bits signed linear integer format */
00136   stats->send_out_mean     = frctLF2F(lin_levels->txDClevel, piu_MEAN_Q, 0);
00137   stats->receive_out_mean  = frctLF2F(lin_levels->rxDClevel, piu_MEAN_Q, 0);
00138
00139   /* energy is reported in 16bits signed dBm0 format */
00140   lin = frctAdjustQ (lin_levels->txEnergy, piu_ENERGY_Q, 0);
00141   if (lin <= 0) /* input to utlLin2dBPower must be > 0 */
00142     lin = 1;    /* -84 dBm0 */
00143   db = utlLin2dBPower (lin);
00144   stats->send_out = frctAdjustQ (db, piu_POWER_DB_Q, 0);
00145
00146   lin = frctAdjustQ (lin_levels->rxEnergy, piu_ENERGY_Q, 0);
00147   if (lin <= 0) /* input to utlLin2dBPower must be > 0 */
00148     lin = 1;    /* -84 dBm0 */
00149   db = utlLin2dBPower (lin);
00150   stats->receive_out = frctAdjustQ (db, piu_POWER_DB_Q, 0);
00151   stats->underrun    = inst->rx_underflow_cnt;
00152 } /* piu_get_stats */
00153
00154 /*****************************************************************************
00155  * FUNCTION PURPOSE: Bidirectional Silence Detection
00156  *****************************************************************************
00157  * DESCRIPTION: Bidirectional Silence Detection .
00158  *
00159  * void piu_bid_silence_detect (
00160  *    piuInst_t *inst) - a pointer to PIU instance
00161  *
00162  ****************************************************************************/
00163 void piu_bid_silence_detect (piuInst_t *inst)
00164 {
00165   LFract lin_thres;
00166   piuContext_t *context = &piuContext;
00167
00168   lin_thres = inst->bidSilence.threshold*8;
00169   if (inst->bidSilence.txSilDetEnergy > lin_thres)
00170     inst->bidSilence.txSilDetEnergy = lin_thres;
00171   if (inst->bidSilence.rxSilDetEnergy > lin_thres)
00172     inst->bidSilence.rxSilDetEnergy = lin_thres;
00173
00174   if ((inst->bidSilence.txSilDetEnergy < inst->bidSilence.threshold) &&
00175       (inst->bidSilence.rxSilDetEnergy < inst->bidSilence.threshold))
00176   {
00177     inst->bidSilence.cnt -= (inst->segment_size) >> piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION;  /* Since the
00178                                                           counter is decremented once every 4 samples */
00179
00180     if (inst->bidSilence.cnt <= 0)
00181     {
00182       /* disable the detection */
00183       inst->mode_bitfield &= (~piu_CTRL_BIT_BID_SILENCE_DET);
00184
00185       /* report detection */
00186       (*context->reportOutFcn) (inst->reportOutTargetInst,
00187                                 piu_BIDIR_SILENCE_DETECTED);
00188     }
00189   }
00190   else
00191     inst->bidSilence.cnt = inst->bidSilence.initCnt; /* re-initialize cntr */
00192 } /* piu_bid_silence_detect */
00193
00194 /*****************************************************************************
00195  * FUNCTION PURPOSE: Detect presence of specified pattern
00196  *****************************************************************************
00197  * DESCRIPTION: If the specified pattern is present on the PCM interface, for
00198  *              specified duration of time, the detection message will be sent.
00199  *
00200  * void piu_pcm_pattern_detect (
00201  *   piuInst_t *inst,   - instance structure
00202  *   tint *pcm_in)      - subsegment of input samples
00203  *
00204  ****************************************************************************/
00205
00206 void piu_pcm_pattern_detect (piuInst_t *inst, tint *pcm_in)
00207 {
00208   piuPcmPatternDetect_t *pcmPattern    = &inst->pcmPattern;
00209   piuContext_t          *context       = &piuContext;
00210   tbool                  patternPresent = TRUE;
00211   tuint                 pattern1, pattern2,pattern3;
00212   tint                  i, sample;
00213
00214   if (pcmPattern->type == piu_PCM_PATTERN_E1) {
00215     /* E1 patterns */
00216     pattern1 = 0x54; pattern2 = 0xD4; pattern3 = 0xD5;
00217   }
00218   else {
00219     if (pcmPattern->type == piu_PCM_PATTERN_CUSTOM){
00220       /* patterns defined by user */
00221       pattern1 = pattern2 = pattern3 = pcmPattern->custom;
00222     }
00223     else if (pcmPattern->type == piu_PCM_PATTERN_T1) {
00224       /* T1 patterns */
00225       pattern1 = pattern2 = pattern3 = 0x7f;
00226     }
00227     else patternPresent = FALSE;
00228     for (i = 0; i < inst->segment_size; i++) {
00229       sample = pcm_in[i] & 0xFF;
00230       if ((sample != pattern1) && (sample != pattern2) && (sample != pattern3))
00231         patternPresent = FALSE;
00232     }
00233   }
00234   if (patternPresent) {
00235     pcmPattern->cnt -= inst->segment_size;
00236     if (pcmPattern->cnt <= 0)
00237     {
00238       inst->mode_bitfield &= (~piu_CTRL_BIT_PATTERN_DETECT);
00239       /* report detection if the pattern appears consecutively for
00240          the configured length */
00241       (*context->reportOutFcn) (inst->reportOutTargetInst, piu_PATTERN_DETECTED);
00242     }
00243   }
00244   else /* pattern is not present consecutively, re-initialize cntr */
00245     pcmPattern->cnt = (pcmPattern->initCnt*8);
00246 } /* piu_pcm_pattern_detect */
00247
00248 /*****************************************************************************
00249  * FUNCTION PURPOSE: Generate specified pattern
00250  *****************************************************************************
00251  * DESCRIPTION: Generate specified pattern.
00252  *
00253  * void piu_pcm_pattern_generate (
00254  *   piuInst_t *inst)   - instance structure
00255  *
00256  ****************************************************************************/
00257
00258 void piu_pcm_pattern_generate (piuInst_t *inst)
00259 {
00260   int i;
00261
00262   if ((inst->pcm_format == piu_COMP_ULAW)||(inst->pcm_format == piu_COMP_ALAW)){
00263     /* generate 8 bit patterns and pack them to 16 bit */
00264     for(i=0; i < inst->segment_size; i+=2) {
00265       inst->receive_in_buf.in_ptr[i]  =(tint)((inst->generatePattern>>8)&0x00ff);
00266       inst->receive_in_buf.in_ptr[i+1]=(tint)(inst->generatePattern & 0x00ff);
00267     }
00268   }
00269   else {
00270     /* generate 16 bit patterns */
00271     utlLsMemSet (inst->receive_in_buf.in_ptr, (tint) (inst->generatePattern),
00272                  inst->segment_size );
00273   }
00274   piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00275 } /* piu_pcm_pattern_generate */
00276
00277 /******************************************************************************
00278  * FUNCTION PURPOSE : Write speech samples to PIU receive-in buffer for playout
00279  ******************************************************************************
00280  * DESCRIPTION : This function writes a segment of voice samples into the
00281  * PIU receive-in buffer.
00282  *
00283  *   void piuReceiveIn (
00284  *     void      *piuInst,        - A pointer to PIU instance
00285  *     linSample *speech_samples) - A pointer to a segment of voice samples
00286  *
00287  *****************************************************************************/
00288 void piuReceiveIn ( void *piuInst, void *speech_samples )
00289 {
00290   piuInst_t *inst          = (piuInst_t *) piuInst;
00291   linSample *voice_samples = (linSample *) speech_samples;
00292   tuint segment_rxcount;
00293
00294   if (inst->state != piu_OPEN)
00295     return;
00296   /* bypass if it is PCM loopback or do pattern generation */
00297   if(inst->mode_bitfield & (piu_CTRL_BIT_DO_PCM_LOOPBACK|
00298      piu_CTRL_BIT_PATTERN_GENERATE))
00299     return;
00300
00301   PIU_BEGIN_CRITICAL_SECTION();
00302
00303   /* Triple or double buffering ? */
00304   segment_rxcount =
00305     (inst->mode_bitfield & piu_CTRL_BIT_TRIPLE_RX_BUF ? piu_NUMSEGM_RX3 : piu_NUMSEGM_RX2);
00306
00307   /* check for overflow into buffers by RxIn */
00308   if (inst->receive_in_buf.segment_count >= segment_rxcount - 1)
00309   {
00310     inst->rx_overflow_cnt++;
00311     goto EXIT;
00312   }
00313   /* energy and DC level measurement for samples toward TDM */
00314   piu_frame_energy (inst->segment_size, voice_samples, &inst->energy_DClevel.rxEnergy);
00315   piu_frame_DClevel(inst->segment_size, voice_samples, &inst->energy_DClevel.rxDClevel);
00316   if (inst->mode_bitfield & piu_CTRL_BIT_BID_SILENCE_DET) {
00317     piu_frame_energy (inst->segment_size, voice_samples,
00318                       &inst->bidSilence.rxSilDetEnergy);
00319   }
00320   /* compress the voice samples and store them in the receive_in buffer */
00321   piu_pcm_compressing(inst, voice_samples, inst->receive_in_buf.in_ptr,
00322                       inst->segment_size);
00323
00324   /* buffer in-index update */
00325   piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00326
00327 EXIT:
00328   PIU_END_CRITICAL_SECTION();
00329 } /* piuReceiveIn */
00330
00331
00332 /*****************************************************************************
00333  * FUNCTION PURPOSE: PIU Processes
00334  *****************************************************************************
00335  * DESCRIPTION: PIU Processes.
00336  *
00337  * void piuTxRxProc (
00338  *    piuInst_t *inst,     - a pointer to PIU instance
00339  *    tint      *tx_ptr,   - a pointer to PIU send_out Buffer
00340  *    tint      *rx_ptr)   - a pointer to PIU receive_out Buffer
00341  *
00342  ****************************************************************************/
00343 void piuTxRxProc (void *piuInst, linSample *tx_ptr, linSample *rx_ptr)
00344 {
00345   piuInst_t    *inst    = (piuInst_t *) piuInst;
00346   piuContext_t *context = &piuContext;
00347   tint         *send_out_ptr, *linear_loopback_ptr;
00348   tuint ratio = sizeof(linSample)/sizeof(tword);
00349
00350 #if !PIUDLCOMP_ENABLE
00351   tint         *receive_out_ptr;
00352 #endif
00353
00354   if (inst->state != piu_OPEN) return ;
00355
00356   send_out_ptr    = (tint *)tx_ptr;
00357 #if !PIUDLCOMP_ENABLE
00358   receive_out_ptr = (tint *)rx_ptr;
00359 #endif
00360
00361   /* pattern generation if enabled */
00362   if(inst->mode_bitfield & piu_CTRL_BIT_PATTERN_GENERATE)
00363     piu_pcm_pattern_generate (inst);
00364
00365   /* PCM loopback processing */
00366   if (inst->mode_bitfield & piu_CTRL_BIT_DO_PCM_LOOPBACK) {
00367     /* tx PCM samples looped back to rx */
00368     utlCopy((tword *)send_out_ptr, (tword *)inst->receive_in_buf.in_ptr, ratio*inst->segment_size);
00369     piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00370     if (inst->mode_bitfield & piu_CTRL_BIT_LOOPBACK_NOPASS) {
00371       memset (send_out_ptr, inst->silence_pattern, inst->segment_size);
00372     }
00373   }
00374   else if (inst->mode_bitfield & piu_CTRL_BIT_DO_LIN_LOOPBACK) {
00375     /* rx Linear samples looped back to tx */
00376     if (inst->receive_in_buf.in_ptr == inst->receive_in_buf.start_ptr)
00377       linear_loopback_ptr = inst->receive_in_buf.end_ptr - inst->segment_size;
00378     else
00379       linear_loopback_ptr = inst->receive_in_buf.in_ptr - inst->segment_size;
00380     utlCopy((tword *)linear_loopback_ptr, (tword *)send_out_ptr, ratio*inst->segment_size);
00381     if (inst->mode_bitfield & piu_CTRL_BIT_LOOPBACK_NOPASS) {
00382       memset (linear_loopback_ptr, inst->silence_pattern, inst->segment_size);
00383     }
00384   }
00385
00386   /* PCM Pattern Detection */
00387   if (inst->mode_bitfield&piu_CTRL_BIT_PATTERN_DETECT)
00388     piu_pcm_pattern_detect (inst, tx_ptr);
00389   /* 8 bit to 16 bit conversion */
00390   piu_pcm_companding(inst, send_out_ptr, send_out_ptr, inst->segment_size);
00391 #if !PIUDLCOMP_ENABLE
00392   if (inst->mode_bitfield & piu_CTRL_BIT_USE_RECV_OUT_BUF){
00393       piu_pcm_companding(inst, receive_out_ptr, receive_out_ptr,
00394                          inst->segment_size);
00395   }
00396 #endif
00397   /* energy and DC level measurement for samples from TDM */
00398   piu_frame_energy (inst->segment_size, tx_ptr, &inst->energy_DClevel.txEnergy);
00399
00400   if(!(inst->mode_bitfield & piu_CTRL_BIT_REMOVE_DC_COMP))
00401   {
00402     /* Measure DC level for Statistics */
00403     piu_frame_DClevel(inst->segment_size, tx_ptr, &inst->energy_DClevel.txDClevel);
00404   }
00405   else
00406   { /* Measure and remove DC component */
00407     if (inst->mode_bitfield & piu_CTRL_BIT_DC_FILTR_SELECT_MODE1)
00408     {
00409         /* Select Mode 1 alpha = 1/64 */
00410         piu_remove_dc_component(inst->segment_size, tx_ptr, &inst->energy_DClevel.txDClevel,
00411         piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT);
00412     }
00413     else
00414     {
00415         /* Mode 2 for echo canceller alpha = 1/4 */
00416         piu_remove_dc_component(inst->segment_size, tx_ptr, &inst->energy_DClevel.txDClevel,
00417         piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT);
00418     }
00419
00420   }
00421
00422  /* bid Silence Detection */
00423   if (inst->mode_bitfield&piu_CTRL_BIT_BID_SILENCE_DET) {
00424     piu_frame_energy (inst->segment_size, tx_ptr, &inst->bidSilence.txSilDetEnergy);
00425     piu_bid_silence_detect (inst);
00426   }
00427
00428 #if 0 /* remove the underrun report for now */
00429   /* report underrun as error indication */
00430   if ((inst->mode_bitfield&piu_CTRL_BIT_RECV_IN_BUF_EMPTY)&&
00431       (inst->mode_bitfield&piu_CTRL_BIT_UNDERRUN_REPORT))
00432     (*context->reportOutFcn)(inst->reportOutTargetInst, piu_UNDERRUN);
00433 #endif
00434
00435   /* call send-out function */
00436   (*context->sendOutProcFcn)(inst->sendOutProcTargetInst, (void *)tx_ptr, (void *) rx_ptr,
00437                              piu_TX_TASK_ID);
00438 } /* piuTxRxProc */
00439 /* nothing past this point */


ECU Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the ecu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_ECU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all ECU component Unit Test CCS projects in the ecu\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the ecu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_ECU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all ECU component Unit Test CCS projects in the ecu\test\ccsProjects directory such that they will load and build with CCS version 4.2


ECU Test: ECU MIPS Profiling

ECU MIPS Profiling

The ECU unit test allows frame-by-frame cycle data can be captured to file. This allows ECU resource requirements to be estimated for various memory scenarios and ECU configurations prior to integration into a larger system with a known MIPS budget.

Profiling may be performed via the following procedure:

  1. Build the target ECU following the procedure in Building Unit Test
  2. Load the ECU image into CCS and follow the unit test procedure as outlined in Unit Test Procedures
    • Ensure the ecuSim->profile_enable flag is set to TRUE (1)
  3. All cycle information will be output to the file ecu\test\vectors\profile\profile.txt
    • The decimal value on each line of this file (line "N" for example) represents the cycles for execution of the ECU function ecuSendIn() for the Nth frame of data.


ECU Test: siu.c File Reference

  • File List
  • Globals

siu.c File Reference

#include <stdlib.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/ecu/test/src/siu.h>
#include <ti/mas/ecu/test/src/siuloc.h>
#include <ti/mas/ecu/test/src/siuport.h>

Include dependency graph for siu.c:

Go to the source code of this file.

Defines

#define | loop for(;;)

Functions

static void | siu_tuint_to_hex (char *dest, tuint val)
static void | siuDebugInternal (tuint id, char *str)
void | siuDebug (tuint id, char *s)
void | siuException (tuint id, char *s)
void | siuDebugInfo (tuint id, tuint type, tuint code, tuint len, tuint *data)
tint | siuInit (siuConfig_t *cfg)

Variables

siuContext_t siuContext
siuInst_t | siuInst [SIU_MAX_CHANNELS]
tuint | siu_dbg_id
char | siu_dbg_message [SIU_DBGMSG_SIZE]

Define Documentation

#define loop for(;;)

Definition at line 27 of file siu.c.

Referenced by siuException(), and siuTxMain().

Function Documentation

static void siu_tuint_to_hex | ( | char * | dest,
 |  | tuint | val |
 | ) |  |  | [inline, static]

Definition at line 42 of file siu.c.

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

Definition at line 58 of file siu.c.

References siu_dbg_id, siu_dbg_message, and SIU_DBGMSG_SIZE.

Referenced by siuDebug(), and siuException().

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

Definition at line 70 of file siu.c.

References siuDebugInternal().

Referenced by main(), and siuDebugInfo().

Here is the call graph for this function:

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

Definition at line 75 of file siu.c.

References loop, and siuDebugInternal().

Referenced by main(), siuDebugInfo(), and siuDebugInfoNew().

Here is the call graph for this function:

void siuDebugInfo | ( | tuint | id,
 |  | tuint | type,
 |  | tuint | code,
 |  | tuint | len,
 |  | tuint * | data
 | ) |  |

Definition at line 82 of file siu.c.

References siu_tuint_to_hex(), siuDebug(), and siuException().

Here is the call graph for this function:

tint siuInit ( siuConfig_t * cfg )

Definition at line 113 of file siu.c.

References siuContext_t::cheap, siuContext_t::cheap_used, siuInst_t::cheap_used, siuInst_t::companding_law, siuConfig_t::companding_law, siuConfig_t::core_heap, siuContext_t::debug, siuConfig_t::debug, siuInst_t::debug, siuInst_t::ecuInst, siuTxInst_t::enabled, siuContext_t::exception, siuConfig_t::exception, siuInst_t::exception, siuTxSendOut_t::fcn, siuContext_t::ID, siuConfig_t::ID, siuInst_t::pcm_bits, siuConfig_t::pcm_bits, siuInst_t::piuInst, siuTxInst_t::recv_frame_length, siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_length, siuTxInst_t::send_frame_ptr, SIU_MAX_CHANNELS, SIU_MID_SIU, SIU_NOERR, siuContext, siuInst, siuMakeID, siuInst_t::slmInst, siuTxSendOut_t::targetInst, siuInst_t::TxInst, siuTxInst_t::TxSendOut, siuContext_t::vheap, siuContext_t::vheap_used, siuInst_t::vheap_used, and siuConfig_t::voice_heap.

Referenced by main().

Variable Documentation

siuContext_t siuContext

Definition at line 29 of file siu.c.

Referenced by siuCAlloc(), siuInit(), and siuVAlloc().

siuInst_t siuInst[SIU_MAX_CHANNELS]

Definition at line 30 of file siu.c.

Referenced by main(), siu_new_ecu(), siu_new_piu(), siu_open_ecu(), siu_open_piu(), siu_open_rxsgn(), siu_open_tx(), siu_open_txhyb(), siu_open_txsgn(), and siuInit().

tuint siu_dbg_id

Definition at line 32 of file siu.c.

Referenced by siuDebugInternal().

char siu_dbg_message[SIU_DBGMSG_SIZE]

Definition at line 33 of file siu.c.

Referenced by siuDebugInternal().


ECU Test: siu.c Source File

  • File List
  • Globals

siu.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Software Integration Unit.
00003  ******************************************************************************
00004  * FILE NAME:   siu.c
00005  *
00006  * DESCRIPTION: Contains routines necessary for integrating DSP software.
00007  *
00008  * TABS: NONE
00009  *
00010  * (C) Copyright 1996, 1997, TELOGY Networks, Inc.
00011  *****************************************************************************/
00012
00013 /* #include <math.h> */     /* used for cosine initialization only */
00014 #include <stdlib.h>
00015 #include <string.h>
00016
00017 #include <ti/mas/types/types.h>
00018 #include <ti/mas/fract/fract.h>
00019 #include <ti/mas/util/debug.h>
00020
00021 /* SIU header files */
00022 #include <ti/mas/ecu/test/src/siu.h>
00023 #include <ti/mas/ecu/test/src/siuloc.h>
00024 #include <ti/mas/ecu/test/src/siuport.h>
00025
00026 /* Endless loop */
00027 #define loop      for(;;)
00028
00029 siuContext_t  siuContext;                 /* SIU Global Context */
00030 siuInst_t     siuInst[SIU_MAX_CHANNELS];  /* SIU instance structures */
00031
00032 tuint siu_dbg_id;     /* debug ID used in debug and exception functions */
00033 char siu_dbg_message[SIU_DBGMSG_SIZE];    /* debug message */
00034
00035 /******************************************************************************
00036  * FUNCTION PURPOSE: Debug & exception functions.
00037  ******************************************************************************
00038  * DESCRIPTION: Debug & exception functions.
00039  *
00040  *****************************************************************************/
00041
00042 static inline void siu_tuint_to_hex (char *dest, tuint val)
00043 {
00044   tint i;
00045
00046   dest[4] = 0; /* Null terminate */
00047
00048   for (i=3; i>=0; i--) {
00049     dest[i] = (val & 0xF);
00050     if (dest[i] > 9)
00051       dest[i] += 'A' - 10;
00052     else
00053       dest[i] += '0';
00054     val >>= 4;
00055   }
00056 }
00057
00058 static inline void siuDebugInternal (tuint id, char *str)
00059 {
00060   int i;
00061   char *src, *dst;
00062
00063   /* Copy id and message in a safe place */
00064   siu_dbg_id = id;
00065   src = str; dst = (char*)&siu_dbg_message[0];
00066   for (i = 0; i < SIU_DBGMSG_SIZE; i++)
00067     *dst++ = *src++;
00068 } /* siuDebugInternal */
00069
00070 void siuDebug (tuint id, char *s)
00071 {
00072   siuDebugInternal (id, s);
00073 } /* siuDebug */
00074
00075 void siuException (tuint id, char *s)
00076 {
00077   siuDebugInternal (id, s);
00078
00079   loop;     /* loop forever */
00080 } /* siuException */
00081
00082 void siuDebugInfo (tuint id, tuint type, tuint code, tuint len, tuint *data)
00083 {
00084   char exc_string[25];
00085
00086   /* Convert message code to a string -- call SIU exception handler */
00087   strcpy (exc_string, "Exception 0x");
00088
00089   /* Tack exception code after previous string */
00090   siu_tuint_to_hex (exc_string+12, ((id & 0xFF00) << 2) | (code & 0x3FF));
00091
00092   switch (type)
00093   {
00094     case dbg_EXCEPTION_FATAL:
00095       siuException (id, exc_string);
00096       break;
00097     case dbg_TRACE_INFO:
00098       /* Post debug trace to debug task */
00099       siuDebug (id, exc_string);
00100       break;
00101     default:
00102       break;  /* Ignore invalid message types */
00103   }
00104 }
00105
00106 /******************************************************************************
00107  * FUNCTION PURPOSE: SIU Initialization Function.
00108  ******************************************************************************
00109  * DESCRIPTION: Initializes SIU Global Context and all SIU channel instances.
00110  *
00111  *****************************************************************************/
00112
00113 tint siuInit (siuConfig_t *cfg)
00114 {
00115   int i;
00116
00117   /* Initialize global context */
00118   siuContext.ID           = cfg->ID;        /* has SIU MID and 0 for chnum */
00119   siuContext.exception    = cfg->exception;
00120   siuContext.debug        = cfg->debug;
00121   siuContext.cheap        = cfg->core_heap;
00122   siuContext.cheap_used   = 0;
00123   siuContext.vheap        = cfg->voice_heap;
00124   siuContext.vheap_used   = 0;
00125   /* here we could place some siuContext.magic = SIU_CONFIGURED as
00126    * magic number to verify SIU is configured when necessary. */
00127
00128   /* Initialize instances for all channels and "make" them "closed" */
00129   for (i = 0; i < SIU_MAX_CHANNELS; i++) {
00130     siuInst[i].ID                 = siuMakeID (SIU_MID_SIU, i+1);
00131     siuInst[i].exception          = siuContext.exception;
00132     siuInst[i].debug              = siuContext.debug;
00133     siuInst[i].cheap_used         = 0;
00134     siuInst[i].vheap_used         = 0;
00135     siuInst[i].companding_law     = cfg->companding_law;  /* default companding */
00136     siuInst[i].pcm_bits           = cfg->pcm_bits;
00137     siuInst[i].piuInst            = NULL;
00138     siuInst[i].ecuInst            = NULL;
00139   siuInst[i].slmInst            = NULL;
00140
00141     /* Tx Task Part */
00142     siuInst[i].TxInst.enabled               = FALSE;
00143     siuInst[i].TxInst.send_frame_length     = 0;
00144     siuInst[i].TxInst.recv_frame_length     = 0;
00145     siuInst[i].TxInst.send_frame_ptr        = NULL;
00146     siuInst[i].TxInst.recv_frame_ptr        = NULL;
00147     siuInst[i].TxInst.TxSendOut.fcn         = NULL;
00148     siuInst[i].TxInst.TxSendOut.targetInst  = NULL;
00149   }
00150   return(SIU_NOERR);
00151 } /* siuInit */
00152 /* nothing past this point */


ECU Test: siu.h File Reference

  • File List
  • Globals

siu.h File Reference

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

Include dependency graph for siu.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuConfig_t
struct | siuTxSendOut_t
struct | siuTxConfig_t

Enumerations

enum | { SIU_NOERR = 0, SIU_ERROR = -1 }

Functions

tint | siuInit (siuConfig_t *cfg)
void | siuTxOpen (void *siuInst, siuTxConfig_t *cfg)
void | siuTxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id)
void | siuPiuReport (void *siuInst, tint report_code)
void | siuPcmSampleTrace (tint chnum, tint pcm_size, void *pcm_in, tuint dir)
void | siuTxRxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id)
void | siuDebugInfoNew (tuint moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *messageData)

Enumeration Type Documentation

anonymous enum

Enumerator:
SIU_NOERR
SIU_ERROR

Definition at line 44 of file siu.h.

Function Documentation

tint siuInit ( siuConfig_t * cfg )

Definition at line 113 of file siu.c.

References siuContext_t::cheap, siuInst_t::cheap_used, siuContext_t::cheap_used, siuConfig_t::companding_law, siuInst_t::companding_law, siuConfig_t::core_heap, siuInst_t::debug, siuConfig_t::debug, siuContext_t::debug, siuInst_t::ecuInst, siuTxInst_t::enabled, siuInst_t::exception, siuConfig_t::exception, siuContext_t::exception, siuTxSendOut_t::fcn, siuConfig_t::ID, siuContext_t::ID, siuConfig_t::pcm_bits, siuInst_t::pcm_bits, siuInst_t::piuInst, siuTxInst_t::recv_frame_length, siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_length, siuTxInst_t::send_frame_ptr, SIU_MAX_CHANNELS, SIU_MID_SIU, SIU_NOERR, siuContext, siuInst, siuMakeID, siuInst_t::slmInst, siuTxSendOut_t::targetInst, siuInst_t::TxInst, siuTxInst_t::TxSendOut, siuContext_t::vheap, siuInst_t::vheap_used, siuContext_t::vheap_used, and siuConfig_t::voice_heap.

Referenced by main().

void siuTxOpen | ( | void * | siuInst,
 |  | siuTxConfig_t * | cfg
 | ) |  |

Definition at line 82 of file siutx.c.

References siuTxInst_t::enabled, siuTxInst_t::recv_frame_length, siuTxConfig_t::recv_frame_length, siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_length, siuTxConfig_t::send_frame_length, siuTxInst_t::send_frame_ptr, siuInst_t::TxInst, siuTxInst_t::TxSendOut, and siuTxConfig_t::TxSendOut.

Referenced by siu_open_tx().

void siuTxSendIn | ( | void * | siuInst,
 |  | void * | send_frame,
 |  | void * | recv_frame,
 |  | tint | queue_id
 | ) |  |

Definition at line 102 of file siutx.c.

References siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_ptr, siu_tx_wake_up(), and siuInst_t::TxInst.

Referenced by siu_new_piu().

Here is the call graph for this function:

void siuPiuReport | ( | void * | siuInst,
 |  | tint | report_code
 | ) |  |

Definition at line 958 of file ecusimfunc.c.

void siuPcmSampleTrace | ( | tint | chnum,
 |  | tint | pcm_size,
 |  | void * | pcm_in,
 |  | tuint | dir
 | ) |  |

Definition at line 969 of file ecusimfunc.c.

void siuTxRxSendIn | ( | void * | siuInst,
 |  | void * | send_frame,
 |  | void * | recv_frame,
 |  | tint | queue_id
 | ) |  |

Definition at line 981 of file ecusimfunc.c.

References siuInst_t::piuInst, and piuTxRxProc().

Here is the call graph for this function:

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

Definition at line 924 of file ecusimfunc.c.

References SIU_DEBUG_FATAL, siu_tuint_to_hex(), and siuException().

Here is the call graph for this function:


ECU Test: siu.h Source File

  • File List
  • Globals

siu.h

Go to the documentation of this file.
00001 #ifndef _SIU_H
00002 #define _SIU_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Software Integration Unit Definitions.
00005  ******************************************************************************
00006  * FILE NAME:   siu.h
00007  *
00008  * DESCRIPTION: Contains definitions for SIU.
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: siu.h 1.4.1.3 1997/07/14 15:30:11 BOGDANK Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: siu.h $
00017  * Revision 1.4.1.3  1997/07/14 15:30:11  BOGDANK
00018  *     - multiple heap manager used
00019  * Revision 1.4.1.2  1997/05/22 13:30:47  BOGDANK
00020  *     - new types added
00021  *    New types added.
00022  * Revision 1.4.1.1  1996/11/22 13:49:25  BOGDANK
00023  *     - ECU test bed created with hybrid and signal generators
00024  *    siuTxSendOut_t changed to map to ECU.
00025  *    This branch should not be followed.
00026  * Revision 1.4  1996/10/07 17:33:17  BOGDANK
00027  *     - Linear "companding" added
00028  *    Linear mode added.
00029  * Revision 1.3  1996/09/27 15:11:48  BOGDANK
00030  *     - PIU and VCU in loopback with generated saw-tooth.
00031  *    siuTxSendIn() API added.
00032  * Revision 1.2  1996/09/26 15:51:39  BOGDANK
00033  *     - PIU slowly getting in, SIU task added.
00034  *    SIU Tx task related parameters added.
00035  * Revision 1.1  1996/09/25 15:02:55  BOGDANK
00036  * Initial revision
00037  *
00038  * (C) Copyright 1996, 1997, TELOGY Networks, Inc.
00039  *****************************************************************************/
00040
00041 #include <ti/mas/types/types.h>
00042
00043 /* SIU Error codes */
00044 enum {
00045   SIU_NOERR = 0,
00046   SIU_ERROR = -1
00047 };
00048
00049 /******************************************************************************
00050  * DATA DEFINITION: SIU Configuration Structure.
00051  ******************************************************************************
00052  * DESCRIPTION: Used when configuring SIU module.
00053  *
00054  *****************************************************************************/
00055
00056 typedef struct {
00057   tuint ID;                                 /* Module ID with chnum = 0 */
00058   void  (*exception)(tuint id, char *str);  /* master exception function */
00059   void  (*debug)(tuint id, char *str);      /* master debug function */
00060   tint  companding_law;   /* Provides information on which type of companding
00061                            *  is used before linear samples are obtained. Valid
00062                            *  values are CONST_COMP_ALAW_8, CONST_COMP_MULAW_8,
00063                            *  CONST_COMP_LINEAR (no companding). Invalid value
00064                            *  indicates 8-bit transparent mode. */
00065   tint  pcm_bits;         /* # bits in a PCM sample (8 for u-law, A-law, and
00066                            *  transparent mode, [1,16] range for linear). */
00067   void  *core_heap;       /* Core heap handle */
00068   void  *voice_heap;      /* Voice heap handle */
00069 } siuConfig_t;
00070
00071 /******************************************************************************
00072  * DATA DEFINITION: SIU Tx Task Send Out Object.
00073  ******************************************************************************
00074  * DESCRIPTION: Transmit task send-out object description. Current
00075  *              implementation takes send-in and receive-in frame like in
00076  *              the case of ECU.
00077  *
00078  *****************************************************************************/
00079
00080 typedef struct {
00081   void (*fcn) (void *targetInst, void *send_frame, void *recv_frame,
00082                void *send_out_frame);
00083   void *targetInst;   /* instance of the target object which owns the fcn */
00084 } siuTxSendOut_t;
00085
00086 /******************************************************************************
00087  * DATA DEFINITION: SIU Tx Task Configuration Structure.
00088  ******************************************************************************
00089  * DESCRIPTION: Used when configuring SIU Tx Task with siuTxOpen().
00090  *
00091  *****************************************************************************/
00092
00093 typedef struct {
00094   tint            send_frame_length;    /* send frame length in samples */
00095   tint            recv_frame_length;    /* receive frame length in samples */
00096   siuTxSendOut_t  TxSendOut;            /* Tx Send-out object description */
00097 } siuTxConfig_t;
00098
00099 /* External function prototypes */
00100 /* siu.c */
00101 tint siuInit (siuConfig_t *cfg);
00102
00103 /* siutx.c */
00104 void siuTxOpen   (void *siuInst, siuTxConfig_t *cfg);
00105 void siuTxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id);
00106
00107 /* ecusim.c */
00108 void siuPiuReport     (void *siuInst, tint report_code);
00109 void siuPcmSampleTrace(tint chnum, tint pcm_size, void *pcm_in, tuint dir);
00110 void siuTxRxSendIn    (void *siuInst, void *send_frame, void *recv_frame, tint queue_id);
00111 void siuDebugInfoNew  (tuint moduleID, tuint msgType, tuint messageCode,
00112                        tuint msgLength, tuint *messageData);
00113 #endif /* _SIU_H */
00114 /* nothing past this point */


ECU Test: siuloc.h File Reference

  • File List
  • Globals

siuloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/mhm/mhm.h>
#include <ti/mas/ecu/test/src/siu.h>
#include <ti/mas/ecu/test/src/siuport.h>

Include dependency graph for siuloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuContext_t
struct | siuTxInst_t
struct | siuSlimInst_t
struct | siuInst_t

Defines

#define | siuMakeID(mid, chnum) ((tuint)(mid)<<8|(tuint)(chnum))
#define | _SIUSTR(x) __SIUSTR(x)
#define | __SIUSTR(x) #x
#define | siu_exc_assert(expr, inst)
#define | siu_dbg_out(inst, s) { (*(inst)->debug)((inst)->ID,(s)); }
#define | SIU_DEBUG_INFO 0
#define | SIU_DEBUG_WARNING 1
#define | SIU_DEBUG_FATAL 2

Functions

void | siuDebug (tuint id, char *s)
void | siuException (tuint id, char *s)
void | siuDebugInfo (tuint id, tuint type, tuint code, tuint len, tuint *data)
void | siu_new_piu (tint chnum, tint max_frame_length)
void | siu_open_piu (tint chnum, tint frame_size)
void | siu_open_tx (tint chnum, tint frame_size)
void | siu_spad_process (linSample *speech_samples, tint *thresh_idx_p, tint *sign_p, tint frame_length, const linSample *siu_spad_tbl)
static void * | siuCAlloc (tuint size)
static void * | siuVAlloc (tuint size)

Variables

siuContext_t siuContext
siuInst_t siuInst []

Define Documentation

#define siuMakeID | ( | mid,
 |  | chnum | ) | ((tuint)(mid)<<8|(tuint)(chnum))

Definition at line 21 of file siuloc.h.

Referenced by main(), siu_new_ecu(), siu_new_piu(), and siuInit().

#define _SIUSTR ( x ) __SIUSTR(x)

Definition at line 27 of file siuloc.h.

#define __SIUSTR ( x ) #x

Definition at line 28 of file siuloc.h.

#define siu_exc_assert | ( | expr,
 |  | inst | )

Value:

{                     \
  ((expr) ? ((void)0) :                             \
            (*(inst)->exception)((inst)->ID,        \
              __FILE__ "(" _SIUSTR(__LINE__) ")")); \
}

Definition at line 30 of file siuloc.h.

Referenced by main(), siu_new_ecu(), siu_new_piu(), and siu_open_ecu().

#define siu_dbg_out | ( | inst,
 |  | s | ) | { (*(inst)->debug)((inst)->ID,(s)); }

Definition at line 37 of file siuloc.h.

#define SIU_DEBUG_INFO 0

Definition at line 142 of file siuloc.h.

#define SIU_DEBUG_WARNING 1

Definition at line 143 of file siuloc.h.

#define SIU_DEBUG_FATAL 2

Definition at line 144 of file siuloc.h.

Referenced by siuDebugInfoNew().

Function Documentation

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

Definition at line 70 of file siu.c.

References siuDebugInternal().

Referenced by main(), and siuDebugInfo().

Here is the call graph for this function:

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

Definition at line 75 of file siu.c.

References loop, and siuDebugInternal().

Referenced by main(), siuDebugInfo(), and siuDebugInfoNew().

Here is the call graph for this function:

void siuDebugInfo | ( | tuint | id,
 |  | tuint | type,
 |  | tuint | code,
 |  | tuint | len,
 |  | tuint * | data
 | ) |  |

Definition at line 82 of file siu.c.

References siu_tuint_to_hex(), siuDebug(), and siuException().

Here is the call graph for this function:

void siu_new_piu | ( | tint | chnum,
 |  | tint | max_frame_length
 | ) |  |

Definition at line 46 of file siumgr.c.

References siuInst_t::cheap_used, piuNewConfig_t::context, piuContext_t::debugInfo, piuNewConfig_t::ID, piuContext_t::max_pcm_val, piuSizeConfig_t::max_samples_per_segment, piuContext_t::pcmSampleTrace, piu_NOERR, piuBufs, piuGetSizes(), siuInst_t::piuInst, piuNew(), piuContext_t::reportOutFcn, piuSizeConfig_t::rx_triple_buffering, piuContext_t::sendOutIsrFcn, piuContext_t::sendOutProcFcn, siu_exc_assert, SIU_MID_PIU, siuCAlloc(), siuDebugInfoNew(), siuInst, siuMakeID, siuPcmSampleTrace(), siuPiuReport(), siuTxRxSendIn(), siuTxSendIn(), and piuNewConfig_t::sizeCfg.

Referenced by main().

Here is the call graph for this function:

void siu_open_piu | ( | tint | chnum,
 |  | tint | frame_size
 | ) |  |

Definition at line 116 of file siumgr.c.

References piuConfig_t::companding, siuInst_t::companding_law, piuCompandingCfg_t::law, piuConfig_t::max_pcm_val, piuCompandingCfg_t::pcm_expand_table, piu_COMP_ALAW, piu_COMP_LINEAR, piu_COMP_ULAW, siuInst_t::piuInst, piuOpen(), piuConfig_t::reportOutTargetInst, piuConfig_t::rx_delay, piuConfig_t::segment_size, piuConfig_t::sendOutIsrTargetInst, piuConfig_t::sendOutProcTargetInst, siuInst, piuConfig_t::transp_mode, and piuConfig_t::use_recv_out_buf.

Referenced by main().

Here is the call graph for this function:

void siu_open_tx | ( | tint | chnum,
 |  | tint | frame_size
 | ) |  |

Definition at line 157 of file siumgr.c.

References siuInst_t::ecuInst, siuTxSendOut_t::fcn, siuTxConfig_t::recv_frame_length, siuTxConfig_t::send_frame_length, siuInst, siuTxOpen(), siuTxSendOut_t::targetInst, and siuTxConfig_t::TxSendOut.

Referenced by main().

Here is the call graph for this function:

void siu_spad_process | ( | linSample * | speech_samples,
 |  | tint * | thresh_idx_p,
 |  | tint * | sign_p,
 |  | tint | frame_length,
 |  | const linSample * | siu_spad_tbl
 | ) |  |

static void* siuCAlloc ( tuint size ) [inline, static]

Definition at line 160 of file siuloc.h.

References siuContext_t::cheap, and siuContext.

Referenced by main(), and siu_new_piu().

static void* siuVAlloc ( tuint size ) [inline, static]

Definition at line 177 of file siuloc.h.

References siuContext, and siuContext_t::vheap.

Referenced by siu_new_ecu().

Variable Documentation

siuContext_t siuContext

Definition at line 29 of file siu.c.

Referenced by siuCAlloc(), siuInit(), and siuVAlloc().

siuInst_t siuInst[]

Definition at line 30 of file siu.c.

Referenced by main(), siu_new_ecu(), siu_new_piu(), siu_open_ecu(), siu_open_piu(), siu_open_rxsgn(), siu_open_tx(), siu_open_txhyb(), siu_open_txsgn(), and siuInit().


ECU Test: siuloc.h Source File

  • File List
  • Globals

siuloc.h

Go to the documentation of this file.
00001 #ifndef _SIULOC_H
00002 #define _SIULOC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Local definitions and API for SIU.
00005  ******************************************************************************
00006  * FILE NAME:   siuloc.h
00007  *
00008  * DESCRIPTION: Contains local SIU definitions and API.
00009  *
00010  * TABS: NONE
00011  *
00012  * (C) Copyright 2008, Texas Instruments, Inc.
00013  *****************************************************************************/
00014
00015 #include <ti/mas/types/types.h>
00016 #include <ti/mas/mhm/mhm.h>          /* required for siuXAlloc() */
00017 #include <ti/mas/ecu/test/src/siu.h> /* required for siuTxSendOut_t */
00018 #include <ti/mas/ecu/test/src/siuport.h>    /* required for SIU_TEC_ENABLE */
00019
00020 /* Useful macros */
00021 #define siuMakeID(mid,chnum)    ((tuint)(mid)<<8|(tuint)(chnum))
00022
00023 /*----------------------------*/
00024 /* Exception and Debug Macros */
00025 /*----------------------------*/
00026
00027 #define _SIUSTR(x)   __SIUSTR(x)
00028 #define __SIUSTR(x)  #x
00029 /* Assert macro for the exceptions */
00030 #define siu_exc_assert(expr,inst) {                     \
00031   ((expr) ? ((void)0) :                             \
00032             (*(inst)->exception)((inst)->ID,        \
00033               __FILE__ "(" _SIUSTR(__LINE__) ")")); \
00034 }
00035
00036 /* Debug macro  */
00037 #define siu_dbg_out(inst,s) {  (*(inst)->debug)((inst)->ID,(s));  }
00038
00039 /******************************************************************************
00040  * DATA DEFINITION: SIU Global Context.
00041  ******************************************************************************
00042  * DESCRIPTION: Contains state information for SIU module.
00043  *
00044  *****************************************************************************/
00045
00046 typedef struct {
00047   tuint   ID;                                 /* SIU Module ID (initialized in
00048                                                *  siuInit() */
00049   void    (*exception)(tuint id, char *str);  /* master exception function
00050                                                *  (initialized in siuInit() */
00051   void    (*debug)(tuint id, char *str);      /* master debug function
00052                                                *  (initialized in siuInit() */
00053   tuint    cheap_used;   /* # words of core heap used outside siuInst_t */
00054   void    *cheap;       /* core heap handle */
00055   tuint    vheap_used;   /* # words of voice heap used outside siuInst_t */
00056   void    *vheap;       /* voice heap handle */
00057 } siuContext_t;
00058
00059 /******************************************************************************
00060  * DATA DEFINITION: SIU Tx Task Instance.
00061  ******************************************************************************
00062  * DESCRIPTION: Transmit task instance.
00063  *
00064  *****************************************************************************/
00065
00066 typedef struct {
00067   tbool           enabled;              /* TRUE: task works, FALSE: doesn't */
00068   tint            send_frame_length;    /* # samples in send frame */
00069   tint            recv_frame_length;    /* # samples in receive frame */
00070   linSample       *send_frame_ptr;      /* a pointer to send frame */
00071   linSample       *recv_frame_ptr;      /* a pointer to receive frame */
00072   siuTxSendOut_t  TxSendOut;            /* send-out object */
00073 } siuTxInst_t;
00074
00075 /******************************************************************************
00076  * DATA DEFINITION: SIU Signal Limiter Instance.
00077  ******************************************************************************
00078  * DESCRIPTION: Signal Limiter instance.
00079  *
00080  *****************************************************************************/
00081
00082 typedef struct {
00083   tint              mode;           /* SPAD operation mode, see siuspad.c */
00084   tint              thresh_idx;     /* current limiter threshold index */
00085   tint              sign;           /* the sign of limiter threshold */
00086 } siuSlimInst_t;
00087
00088 /******************************************************************************
00089  * DATA DEFINITION: SIU Instance.
00090  ******************************************************************************
00091  * DESCRIPTION: Contains state information for one SIU channel.
00092  *
00093  *****************************************************************************/
00094
00095 typedef struct {
00096   tuint ID;                                 /* instance ID (initialized in
00097                                              *  siuInit() */
00098   void  (*exception)(tuint id, char *str);  /* exception function (initialized
00099                                              *  in siuInit() */
00100   void  (*debug)(tuint id, char *str);      /* debug function (initialized
00101                                              *  in siuInit() */
00102   /* Channel information */
00103   siuTxInst_t   TxInst;   /* Tx Task Instance */
00104   void         *slmInst;  /* Signal limiter Instance */
00105   tuint  cheap_used;      /* # words allocated from core heap on this channel */
00106   tuint  vheap_used;      /* # words allocated from voice heap on this channel */
00107   tint  companding_law;   /* Provides information on which type of companding
00108                            *  is used before linear samples are obtained. Valid
00109                            *  values are CONST_COMP_ALAW_8, CONST_COMP_MULAW_8,
00110                            *  CONST_COMP_LINEAR (no companding, the number of
00111                            *  bits in a linear sample has to be provided
00112                            *  somewhere.) Refers to physical I/O used. */
00113   tint  pcm_bits;         /* # of bits in a PCM sample. (8 for u-law, A-law,
00114                            *  and transparent mode, [1,16] range for linear) */
00115   void  *piuInst;         /* a pointer to PIU instance */
00116 #if SIU_TEC_ENABLE
00117   void  *tecInst;         /* a pointer to the TEC instance */
00118 #else
00119   void  *ecuInst;         /* a pointer to the ECU instance */
00120 #endif
00121 } siuInst_t;
00122
00123 /* External references local to SIU */
00124 extern siuContext_t siuContext;         /* SIU Global Context (siu.c) */
00125 extern siuInst_t    siuInst[];          /* SIU instances (siu.c) */
00126
00127 /* External functions local to SIU (siu.c) */
00128 void siuDebug      (tuint id, char *s);
00129 void siuException  (tuint id, char *s);
00130 void siuDebugInfo  (tuint id, tuint type, tuint code, tuint len, tuint *data);
00131
00132 /* siumgr.c */
00133 void siu_new_piu  (tint chnum, tint max_frame_length);
00134 void siu_open_piu (tint chnum, tint frame_size);
00135 void siu_open_tx  (tint chnum, tint frame_size);
00136
00137 /* siuslimnum.c/.s */
00138 void siu_spad_process (linSample *speech_samples, tint *thresh_idx_p, tint *sign_p,
00139                        tint frame_length, const linSample *siu_spad_tbl);
00140
00141 /* Debug report levels */
00142 #define SIU_DEBUG_INFO         0    /* Passing debug information */
00143 #define SIU_DEBUG_WARNING      1    /* Warning message */
00144 #define SIU_DEBUG_FATAL        2    /* Fatal message. Report to MICRO and                                     * go to infinite loop. */
00145
00146 /* A few memory allocation static inline functions */
00147
00148 /******************************************************************************
00149  * FUNCTION PURPOSE: Allocate memory block from the core heap.
00150  ******************************************************************************
00151  * DESCRIPTION: Allocates a memory block from the core heap.
00152  *
00153  *    static inline void *siuCAlloc (
00154  *      tuint size)      - number of words to allocate
00155  *
00156  *    Return value: memory block base address of NULL upon error.
00157  *
00158  *****************************************************************************/
00159
00160 static inline void *siuCAlloc (tuint size)
00161 {
00162   return (mhmAlloc (siuContext.cheap, size));
00163 } /* siuCAlloc */
00164
00165 /******************************************************************************
00166  * FUNCTION PURPOSE: Allocate memory block from the voice heap.
00167  ******************************************************************************
00168  * DESCRIPTION: Allocates a memory block from the voice heap.
00169  *
00170  *    static inline void *siuVAlloc (
00171  *      tuint size)      - number of words to allocate
00172  *
00173  *    Return value: memory block base address of NULL upon error.
00174  *
00175  *****************************************************************************/
00176
00177 static inline void *siuVAlloc (tuint size)
00178 {
00179   return (mhmAlloc (siuContext.vheap, size));
00180 } /* siuVAlloc */
00181 #endif  /* _SIULOC_H */
00182 /* nothing past this point */


ECU Test: siumgr.c File Reference

  • File List
  • Globals

siumgr.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/mua.h>
#include <ti/mas/ecu/test/src/piu.h>
#include <ti/mas/ecu/test/src/siu.h>
#include <ti/mas/ecu/test/src/siuloc.h>
#include <ti/mas/ecu/test/src/siuport.h>
#include <ti/mas/ecu/ecu.h>

Include dependency graph for siumgr.c:

Go to the source code of this file.

Functions

void | siu_new_piu (tint chnum, tint max_frame_length)
void | siu_open_piu (tint chnum, tint frame_size)
void | siu_open_tx (tint chnum, tint frame_size)

Function Documentation

void siu_new_piu | ( | tint | chnum,
 |  | tint | max_frame_length
 | ) |  |

Definition at line 46 of file siumgr.c.

References siuInst_t::cheap_used, piuNewConfig_t::context, piuContext_t::debugInfo, piuNewConfig_t::ID, piuContext_t::max_pcm_val, piuSizeConfig_t::max_samples_per_segment, piuContext_t::pcmSampleTrace, piu_NOERR, piuBufs, piuGetSizes(), siuInst_t::piuInst, piuNew(), piuContext_t::reportOutFcn, piuSizeConfig_t::rx_triple_buffering, piuContext_t::sendOutIsrFcn, piuContext_t::sendOutProcFcn, siu_exc_assert, SIU_MID_PIU, siuCAlloc(), siuDebugInfoNew(), siuInst, siuMakeID, siuPcmSampleTrace(), siuPiuReport(), siuTxRxSendIn(), siuTxSendIn(), and piuNewConfig_t::sizeCfg.

Referenced by main().

Here is the call graph for this function:

void siu_open_piu | ( | tint | chnum,
 |  | tint | frame_size
 | ) |  |

Definition at line 116 of file siumgr.c.

References piuConfig_t::companding, siuInst_t::companding_law, piuCompandingCfg_t::law, piuConfig_t::max_pcm_val, piuCompandingCfg_t::pcm_expand_table, piu_COMP_ALAW, piu_COMP_LINEAR, piu_COMP_ULAW, siuInst_t::piuInst, piuOpen(), piuConfig_t::reportOutTargetInst, piuConfig_t::rx_delay, piuConfig_t::segment_size, piuConfig_t::sendOutIsrTargetInst, piuConfig_t::sendOutProcTargetInst, siuInst, piuConfig_t::transp_mode, and piuConfig_t::use_recv_out_buf.

Referenced by main().

Here is the call graph for this function:

void siu_open_tx | ( | tint | chnum,
 |  | tint | frame_size
 | ) |  |

Definition at line 157 of file siumgr.c.

References siuInst_t::ecuInst, siuTxSendOut_t::fcn, siuTxConfig_t::recv_frame_length, siuTxConfig_t::send_frame_length, siuInst, siuTxOpen(), siuTxSendOut_t::targetInst, and siuTxConfig_t::TxSendOut.

Referenced by main().

Here is the call graph for this function:


ECU Test: siumgr.c Source File

  • File List
  • Globals

siumgr.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: SIU Management Routines.
00003  ******************************************************************************
00004  * FILE NAME:   siumgr.c
00005  *
00006  * DESCRIPTION: Contains management routines that create and open various
00007  *              modules in a DSP system architecture.
00008  *
00009  * TABS: NONE
00010  *
00011  *
00012  * (C) Copyright 2008, Texas Instruments, Inc.
00013  *****************************************************************************/
00014
00015 #include <stdlib.h>
00016
00017 #include <ti/mas/types/types.h>
00018 #include <ti/mas/util/mua.h>
00019
00020 /* PIU related header files */
00021 #include <ti/mas/ecu/test/src/piu.h>
00022 /* SIU header files */
00023 #include <ti/mas/ecu/test/src/siu.h>
00024 #include <ti/mas/ecu/test/src/siuloc.h>
00025 #include <ti/mas/ecu/test/src/siuport.h>
00026 /* ECU files */
00027 #include <ti/mas/ecu/ecu.h>
00028
00029
00030 /******************************************************************************
00031  * FUNCTION PURPOSE: Create PIU module.
00032  ******************************************************************************
00033  * DESCRIPTION: Obtains info on PIU buffers, and creates one instance of PIU.
00034  *
00035  *              NOTE: Should save number of buffers and buffer descriptors
00036  *                    in order to make delete possible.
00037  *
00038  *  void siu_new_piu (
00039  *    tint chnum,             - channel number (1 to SIU_MAX_CHANNELS)
00040  *    tint max_frame_length)  - maximum # samples in the frame (must be
00041  *                              greater than or equal to maximum sub-segment
00042  *                              size)
00043  *
00044  *****************************************************************************/
00045
00046 void siu_new_piu (tint chnum, tint max_frame_length)
00047 {
00048   int i;
00049   tint stat, piuNbufs;
00050
00051   const ecomemBuffer_t *bufs;
00052   ecomemBuffer_t    *piuBufs;
00053   piuSizeConfig_t   piuCfgSize;
00054   piuNewConfig_t    piuCfgNew;
00055
00056   siuInst_t *inst = &siuInst[chnum-1];
00057
00058   piuCfgSize.max_samples_per_segment = max_frame_length;  /* x-ms at 8kHz */
00059
00060   /* Default to triple buffering (delay is not added - just prevention from PIU
00061    * overflow/underflow) */
00062   piuCfgSize.rx_triple_buffering     = TRUE;
00063
00064   /* PIU get sizes */
00065   stat = piuGetSizes (&piuNbufs, &bufs, &piuCfgSize);
00066   siu_exc_assert (stat == piu_NOERR, inst);
00067
00068   piuBufs = (ecomemBuffer_t*)siuCAlloc (piuNbufs*sizeof(ecomemBuffer_t));
00069   inst->cheap_used += piuNbufs*sizeof(ecomemBuffer_t);
00070   siu_exc_assert (piuBufs != NULL, inst);
00071
00072   /* assume all buffers are in external memory, no alignment requests */
00073   for (i = 0; i < piuNbufs; i++) {
00074     piuBufs[i]        = bufs[i];
00075     piuBufs[i].volat  = FALSE;
00076     piuBufs[i].base   = siuCAlloc (bufs[i].size);
00077     inst->cheap_used += bufs[i].size;
00078     siu_exc_assert (piuBufs[i].base != NULL, inst);
00079   }
00080   /* inst->piuBufs  =...
00081    * inst->piuNbufs =...  NOTE: needs it to delete VCU one day. */
00082
00083   /* piuNew */
00084   piuCfgNew.ID                      = siuMakeID (SIU_MID_PIU, chnum);
00085   piuCfgNew.context.max_pcm_val     = mua_TBL_MAX_PCM_VAL;
00086   piuCfgNew.context.debugInfo       = (dbgInfo_t)(siuDebugInfoNew);
00087   piuCfgNew.context.sendOutProcFcn  = siuTxSendIn;
00088   piuCfgNew.context.sendOutIsrFcn   = siuTxRxSendIn;
00089   piuCfgNew.context.reportOutFcn    = siuPiuReport;
00090   piuCfgNew.context.pcmSampleTrace  = siuPcmSampleTrace;
00091   piuCfgNew.sizeCfg                 = piuCfgSize;
00092   stat = piuNew (&inst->piuInst, piuNbufs, piuBufs, &piuCfgNew);
00093   siu_exc_assert (stat == piu_NOERR, inst);
00094 } /* siu_new_piu */
00095
00096 /******************************************************************************
00097  * FUNCTION PURPOSE: Open PIU module.
00098  ******************************************************************************
00099  * DESCRIPTION: Opens one instance of PIU module.
00100  *
00101  *              NOTE: Currently, the frame_size is constrained to be
00102  *                    a whole number of segments. However, this is not
00103  *                    checked here. We rely on PIU to check it.
00104  *
00105  *                    Receive-out buffer is part of ECU and related
00106  *                    parameters should be taken from there!!!
00107  *
00108  *  void siu_open_piu (
00109  *    tint chnum,                 - channel number (1 to SIU_MAX_CHANNELS)
00110  *    tint segment_size,          - # samples in one PIU sub-segment
00111  *    tint frame_size)            - # samples in the frame (must be
00112  *                                  greater than or equal to sub-segment size)
00113  *
00114  *****************************************************************************/
00115
00116 void siu_open_piu (tint chnum, tint frame_size)
00117 {
00118   piuConfig_t piuCfg;
00119   siuInst_t *inst = &siuInst[chnum-1];
00120
00121   piuCfg.transp_mode      = FALSE;
00122   piuCfg.use_recv_out_buf = TRUE;
00123
00124   piuCfg.rx_delay                 = 0;    /* removes jitter in piuReceiveIn() */
00125   piuCfg.segment_size             = frame_size;
00126   piuCfg.sendOutProcTargetInst    = inst;
00127   piuCfg.sendOutIsrTargetInst     = inst;
00128   piuCfg.reportOutTargetInst      = inst;
00129   piuCfg.max_pcm_val              = mua_TBL_MAX_PCM_VAL;
00130   if (inst->companding_law == const_COMP_MULAW_8) {
00131     piuCfg.companding.law   = piu_COMP_ULAW;
00132     piuCfg.companding.pcm_expand_table = muaTblUlaw;
00133   }
00134   else if (inst->companding_law == const_COMP_ALAW_8) {
00135     piuCfg.companding.law   = piu_COMP_ALAW;
00136     piuCfg.companding.pcm_expand_table = muaTblAlaw;
00137   }
00138   else if (inst->companding_law == const_COMP_LINEAR) {
00139     piuCfg.companding.law   = piu_COMP_LINEAR;
00140     piuCfg.companding.pcm_expand_table = NULL;
00141   }
00142
00143   piuOpen (inst->piuInst, &piuCfg);
00144 } /* siu_open_piu */
00145
00146 /******************************************************************************
00147  * FUNCTION PURPOSE: Open Transmit Task for a channel of SIU.
00148  ******************************************************************************
00149  * DESCRIPTION: Opens transmit task for a channel of SIU.
00150  *
00151  *  void siu_open_tx (
00152  *    tint chnum,                 - channel number (1 to SIU_MAX_CHANNELS)
00153  *    tint frame_size)            - # samples in the frame
00154  *
00155  *****************************************************************************/
00156
00157 void siu_open_tx (tint chnum, tint frame_size)
00158 {
00159   siuTxConfig_t siuTxCfg;
00160   siuInst_t *inst = &siuInst[chnum-1];
00161
00162   siuTxCfg.send_frame_length    = frame_size;
00163   siuTxCfg.recv_frame_length    = frame_size;       /* same size for now */
00164 #if SIU_TEC_ENABLE
00165   siuTxCfg.TxSendOut.fcn        = NULL;             /* Not used */
00166   siuTxCfg.TxSendOut.targetInst = NULL;
00167 #else
00168   siuTxCfg.TxSendOut.fcn        = ecuSendIn;        /* send samples to ECU */
00169   siuTxCfg.TxSendOut.targetInst = inst->ecuInst;
00170 #endif
00171   siuTxOpen (inst, &siuTxCfg);
00172 } /* siu_open_tx */
00173 /* nothing past this point */


ECU Test: siuport.h File Reference

  • File List
  • Globals

siuport.h File Reference

#include <ti/mas/types/const.h>
#include <ti/mas/types/types.h>
#include <ti/mas/ecu/test/src/ecusimport.h>

Include dependency graph for siuport.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | SIU_MAX_CHANNELS 1
#define | SIU_MID_SIU 0x01
#define | SIU_MID_VCU 0x02
#define | SIU_MID_VCA 0x03
#define | SIU_MID_PIU 0x04
#define | SIU_MID_ECU 0x05
#define | SIU_DBGMSG_SIZE 256
#define | SIU_ULAW_ZERO (0xFFFF)
#define | SIU_ALAW_ZERO (0x55D5)

Define Documentation

#define SIU_MAX_CHANNELS 1

Definition at line 19 of file siuport.h.

Referenced by siuInit().

#define SIU_MID_SIU 0x01

Definition at line 22 of file siuport.h.

Referenced by main(), and siuInit().

#define SIU_MID_VCU 0x02

Definition at line 23 of file siuport.h.

#define SIU_MID_VCA 0x03

Definition at line 24 of file siuport.h.

#define SIU_MID_PIU 0x04

Definition at line 25 of file siuport.h.

Referenced by siu_new_piu().

#define SIU_MID_ECU 0x05

Definition at line 26 of file siuport.h.

Referenced by siu_new_ecu().

#define SIU_DBGMSG_SIZE 256

Definition at line 28 of file siuport.h.

Referenced by siuDebugInternal().

#define SIU_ULAW_ZERO (0xFFFF)

Definition at line 30 of file siuport.h.

Referenced by siu_open_ecu().

#define SIU_ALAW_ZERO (0x55D5)

Definition at line 31 of file siuport.h.

Referenced by siu_open_ecu().


ECU Test: siuport.h Source File

  • File List
  • Globals

siuport.h

Go to the documentation of this file.
00001 #ifndef _SIUPORT_H
00002 #define _SIUPORT_H
00003 /******************************************************************************
00004  * FILE PURPOSE: SIU Portability Definitions (C54x version)
00005  ******************************************************************************
00006  * FILE NAME:   siuport.h
00007  *
00008  * DESCRIPTION: Contains SIU portability definitions.
00009  *
00010  * TABS: NONE
00011  *
00012  * (C) Copyright 2008, Texas Instruments, Inc.
00013  *****************************************************************************/
00014
00015 #include <ti/mas/types/const.h>
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/ecu/test/src/ecusimport.h>
00018
00019 #define SIU_MAX_CHANNELS      1         /* Maximum number of SIU channels */
00020
00021 /* Module ID's */
00022 #define SIU_MID_SIU     0x01      /* SIU module */
00023 #define SIU_MID_VCU     0x02      /* VCU module */
00024 #define SIU_MID_VCA     0x03      /* VCA modules */
00025 #define SIU_MID_PIU     0x04      /* PIU module */
00026 #define SIU_MID_ECU     0x05      /* ECU module */
00027
00028 #define SIU_DBGMSG_SIZE   256     /* Size of debug message buffer */
00029
00030 #define SIU_ULAW_ZERO   (0xFFFF)  /* Ulaw 0 */
00031 #define SIU_ALAW_ZERO   (0x55D5)  /* Alaw 0 (really -8, 8) */
00032
00033 #endif  /* _SIUPORT_H */
00034 /* nothing past this point */


ECU Test: siutx.c File Reference

  • File List
  • Globals

siutx.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/ecu/test/src/siu.h>
#include <ti/mas/ecu/test/src/siuloc.h>
#include <ti/mas/ecu/test/src/siuport.h>
#include <ti/mas/sdk/hyb.h>

Include dependency graph for siutx.c:

Go to the source code of this file.

Defines

#define | loop for(;;)

Functions

static void | siu_tx_execute (siuInst_t *inst)
static void | siu_tx_sleep (siuInst_t *inst)
static void | siu_tx_wake_up (siuInst_t *inst)
void | siuTxMain (void *siuInst)
void | siuTxOpen (void *siuInst, siuTxConfig_t *cfg)
void | siuTxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id)

Define Documentation

#define loop for(;;)

Definition at line 23 of file siutx.c.

Function Documentation

static void siu_tx_execute ( siuInst_t * inst ) [inline, static]

Definition at line 27 of file siutx.c.

References siuTxInst_t::enabled, siuTxInst_t::send_frame_length, siuTxInst_t::send_frame_ptr, siuOutStream, siuUpdateECUPowers(), and siuInst_t::TxInst.

Referenced by siu_tx_wake_up(), and siuTxMain().

Here is the call graph for this function:

static void siu_tx_sleep ( siuInst_t * inst ) [inline, static]

Definition at line 47 of file siutx.c.

Referenced by siuTxMain().

static void siu_tx_wake_up ( siuInst_t * inst ) [inline, static]

Definition at line 52 of file siutx.c.

References siu_tx_execute().

Referenced by siuTxSendIn().

Here is the call graph for this function:

void siuTxMain ( void * siuInst )

Definition at line 65 of file siutx.c.

References loop, siu_tx_execute(), and siu_tx_sleep().

Here is the call graph for this function:

void siuTxOpen | ( | void * | siuInst,
 |  | siuTxConfig_t * | cfg
 | ) |  |

Definition at line 82 of file siutx.c.

References siuTxInst_t::enabled, siuTxConfig_t::recv_frame_length, siuTxInst_t::recv_frame_length, siuTxInst_t::recv_frame_ptr, siuTxConfig_t::send_frame_length, siuTxInst_t::send_frame_length, siuTxInst_t::send_frame_ptr, siuInst_t::TxInst, siuTxConfig_t::TxSendOut, and siuTxInst_t::TxSendOut.

Referenced by siu_open_tx().

void siuTxSendIn | ( | void * | siuInst,
 |  | void * | send_frame,
 |  | void * | recv_frame,
 |  | tint | queue_id
 | ) |  |

Definition at line 102 of file siutx.c.

References siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_ptr, siu_tx_wake_up(), and siuInst_t::TxInst.

Referenced by siu_new_piu().

Here is the call graph for this function:


ECU Test: siutx.c Source File

  • File List
  • Globals

siutx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Software Integration Unit Transmit Task.
00003  ******************************************************************************
00004  * FILE NAME:   siutx.c
00005  *
00006  * DESCRIPTION: Contains routines that implement SIU Transmit Task.
00007  *
00008  * TABS: NONE
00009  *
00010  * (C) Copyright 2008, Texas Instruments, Inc.
00011  *****************************************************************************/
00012
00013 #include <stdlib.h>
00014
00015 #include <ti/mas/types/types.h>
00016
00017 /* SIU header files */
00018 #include <ti/mas/ecu/test/src/siu.h>
00019 #include <ti/mas/ecu/test/src/siuloc.h>
00020 #include <ti/mas/ecu/test/src/siuport.h>
00021
00022 /* Nice way for doing endless loop */
00023 #define loop      for(;;)
00024
00025 #include <ti/mas/sdk/hyb.h>
00026
00027 static inline void siu_tx_execute (siuInst_t *inst)
00028 {
00029   if (inst->TxInst.enabled) {
00030     int k;
00031     extern linSample  siuOutStream[];
00032     extern void siuUpdateECUPowers (siuInst_t *inst, linSample *send_in,
00033                                     linSample *recv_in);
00034
00035     /* For test purposes, call Hybrid here and copy out samples with
00036      *  added echo! */
00037     /* hybAddEcho (&hybTxInst, inst->TxInst.send_frame_ptr,
00038                             inst->TxInst.recv_frame_ptr); */
00039
00040     /* Create a shadow copy of send frame */
00041     for (k = 0; k < inst->TxInst.send_frame_length; k++) {
00042       siuOutStream[k] = inst->TxInst.send_frame_ptr[k];
00043     }
00044   }
00045 } /* siu_tx_execute */
00046
00047 static inline void siu_tx_sleep (siuInst_t *inst)
00048 {
00049   /* currently not used. will be used when ISR is done. */
00050 } /* siu_tx_sleep */
00051
00052 static inline void siu_tx_wake_up (siuInst_t *inst)
00053 {
00054   siu_tx_execute (inst);    /* currently we directly execute Tx task here */
00055 } /* siu_tx_wake_up */
00056
00057 /******************************************************************************
00058  * FUNCTION PURPOSE: Main Routine for SIU Transmit Task.
00059  ******************************************************************************
00060  * DESCRIPTION: Waits to be waken up by ISR (or another task) in order to
00061  *              process input samples.
00062  *
00063  *****************************************************************************/
00064
00065 void siuTxMain (void *siuInst)
00066 {
00067   siuInst_t *inst = (siuInst_t*)siuInst;
00068
00069   loop {
00070     siu_tx_sleep (inst);
00071     siu_tx_execute (inst);
00072   }
00073 } /* siuTxMain */
00074
00075 /******************************************************************************
00076  * FUNCTION PURPOSE: SIU Tx Task configuration.
00077  ******************************************************************************
00078  * DESCRIPTION: Configures and enables SIU Tx task.
00079  *
00080  *****************************************************************************/
00081
00082 void siuTxOpen (void *siuInst, siuTxConfig_t *cfg)
00083 {
00084   siuInst_t *inst = (siuInst_t *)siuInst;
00085
00086   inst->TxInst.send_frame_length  = cfg->send_frame_length;
00087   inst->TxInst.recv_frame_length  = cfg->recv_frame_length;
00088   inst->TxInst.send_frame_ptr     = NULL;
00089   inst->TxInst.recv_frame_ptr     = NULL;
00090   inst->TxInst.TxSendOut          = cfg->TxSendOut;
00091   inst->TxInst.enabled            = TRUE;
00092 } /* siuTxOpen */
00093
00094 /******************************************************************************
00095  * FUNCTION PURPOSE: Accept send and receive samples for Tx task.
00096  ******************************************************************************
00097  * DESCRIPTION: Accepts send and receive samples for Tx task. Starts Tx task
00098  *              if necessary.
00099  *
00100  *****************************************************************************/
00101
00102 void siuTxSendIn (void *siuInst, void *send_frame, void *recv_frame,
00103                   tint queue_id)
00104 {
00105   siuInst_t *inst = (siuInst_t*)siuInst;
00106
00107   /* NOTE: this may result in race condition if siuTxSendIn is called again
00108    *       before siu_tx_execute() completed. */
00109   inst->TxInst.send_frame_ptr = (linSample *) send_frame;
00110   inst->TxInst.recv_frame_ptr = (linSample *) recv_frame;     /* store frame pointers */
00111
00112   siu_tx_wake_up (inst);                    /* wake up Tx task */
00113 } /* siuTxSendIn */
00114 /* nothing past this point */


ECU Test: bidSilenceCtrl_t Struct Reference

  • Data Structures
  • Data Fields

bidSilenceCtrl_t Struct Reference

#include <piuloc.h>

Detailed Description

Definition at line 97 of file piuloc.h.

Data Fields

LFract | txSilDetEnergy
LFract | rxSilDetEnergy
LFract | threshold
tuint | cnt
tuint | initCnt

Field Documentation

LFract bidSilenceCtrl_t::txSilDetEnergy

Definition at line 98 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), and piuOpen().

LFract bidSilenceCtrl_t::rxSilDetEnergy

Definition at line 99 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

LFract bidSilenceCtrl_t::threshold

Definition at line 100 of file piuloc.h.

Referenced by piu_bid_silence_detect(), and piuBidSilenceDetect().

tuint bidSilenceCtrl_t::cnt

Definition at line 102 of file piuloc.h.

Referenced by piu_bid_silence_detect(), and piuBidSilenceDetect().

tuint bidSilenceCtrl_t::initCnt

Definition at line 104 of file piuloc.h.

Referenced by piu_bid_silence_detect(), and piuBidSilenceDetect().

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


ECU Test: bidSilenceDet_t Struct Reference

  • Data Structures
  • Data Fields

bidSilenceDet_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 169 of file piu.h.

Data Fields

tbool | enable
tint | threshold
tuint | hangover

Field Documentation

tbool bidSilenceDet_t::enable

Definition at line 170 of file piu.h.

Referenced by piuBidSilenceDetect().

tint bidSilenceDet_t::threshold

Definition at line 171 of file piu.h.

Referenced by piuBidSilenceDetect().

tuint bidSilenceDet_t::hangover

Definition at line 172 of file piu.h.

Referenced by piuBidSilenceDetect().

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


ECU Test: ecuAutoConfig_t Struct Reference

  • Data Structures
  • Data Fields

ecuAutoConfig_t Struct Reference

#include <ecuauto.h>

Detailed Description

Definition at line 189 of file ecuauto.h.

Data Fields

tbool | verbose_print
tbool | cache_enable
tbool | cache_flush
tbool | get_filter
tbool | dss_output
tbool | output_rin
tbool | output_sin
tbool | output_rout
tbool | output_sout
tuint | iteration
tlong | pcm_hold_sz
tlong | sample_cnt
tlong | second_cnt
tlong | sample_bp

Field Documentation

tbool ecuAutoConfig_t::verbose_print

Definition at line 191 of file ecuauto.h.

Referenced by ecu_auto_print(), and ecu_auto_set_defaults().

tbool ecuAutoConfig_t::cache_enable

Definition at line 192 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::cache_flush

Definition at line 193 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and ecuAuto_process_loop().

tbool ecuAutoConfig_t::get_filter

Definition at line 194 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

tbool ecuAutoConfig_t::dss_output

Definition at line 195 of file ecuauto.h.

Referenced by ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), ecu_auto_set_defaults(), and ecu_auto_write_pcm().

tbool ecuAutoConfig_t::output_rin

Definition at line 196 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::output_sin

Definition at line 197 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::output_rout

Definition at line 198 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::output_sout

Definition at line 199 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tuint ecuAutoConfig_t::iteration

Definition at line 201 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and ecuAuto_process_loop().

tlong ecuAutoConfig_t::pcm_hold_sz

Definition at line 202 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tlong ecuAutoConfig_t::sample_cnt

Definition at line 203 of file ecuauto.h.

Referenced by ecu_auto_sample_cnt(), and ecu_auto_set_defaults().

tlong ecuAutoConfig_t::second_cnt

Definition at line 204 of file ecuauto.h.

Referenced by ecu_auto_sample_cnt(), and ecu_auto_set_defaults().

tlong ecuAutoConfig_t::sample_bp

Definition at line 205 of file ecuauto.h.

Referenced by ecu_auto_sample_cnt(), and ecu_auto_set_defaults().

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


ECU Test: ecuAutoFout_t Struct Reference

  • Data Structures
  • Data Fields

ecuAutoFout_t Struct Reference

#include <ecuauto.h>

Detailed Description

Definition at line 145 of file ecuauto.h.

Data Fields

tbool | output_data
tbool | output_mark
tbool | output_flush
ecuPcm_e pcm_format
tint | file_type
FILE * | fptr
linSample * | buf
tword * | hold_buf
tlong | hold_buf_sz
tint | hold_count
char | fname [ecu_AUTO_MAX_STRING]
void(* | pcmout_fcn )(void *fout)

Field Documentation

tbool ecuAutoFout_t::output_data

Definition at line 146 of file ecuauto.h.

Referenced by ecu_auto_close_fout(), ecu_auto_output_alaw(), ecu_auto_output_ulaw(), ecuAuto_prep_fout(), ecucmd_output_handler(), and lec_auto_initialize().

tbool ecuAutoFout_t::output_mark

Definition at line 147 of file ecuauto.h.

Referenced by ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_pcm(), ecu_auto_output_ulaw(), and lec_auto_initialize().

tbool ecuAutoFout_t::output_flush

Definition at line 149 of file ecuauto.h.

Referenced by ecu_auto_output_pcm(), ecu_auto_write_pcm(), and lec_auto_initialize().

ecuPcm_e ecuAutoFout_t::pcm_format

Definition at line 150 of file ecuauto.h.

Referenced by ecu_auto_close_fout(), ecu_auto_set_defaults(), ecu_auto_write_pcm(), ecuAuto_prep_fout(), and ecucmd_output_handler().

tint ecuAutoFout_t::file_type

Definition at line 151 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and ecu_auto_write_pcm().

FILE* ecuAutoFout_t::fptr

Definition at line 152 of file ecuauto.h.

Referenced by ecu_auto_close_fout(), ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), and ecuAuto_prep_fout().

linSample* ecuAutoFout_t::buf

Definition at line 153 of file ecuauto.h.

Referenced by ecu_auto_output_alaw(), ecu_auto_output_lin(), ecu_auto_output_ulaw(), and lec_auto_initialize().

tword* ecuAutoFout_t::hold_buf

Definition at line 154 of file ecuauto.h.

Referenced by ecu_auto_write_pcm().

tlong ecuAutoFout_t::hold_buf_sz

Definition at line 155 of file ecuauto.h.

Referenced by ecu_auto_write_pcm(), and lec_auto_initialize().

tint ecuAutoFout_t::hold_count

Definition at line 156 of file ecuauto.h.

Referenced by ecu_auto_write_pcm(), and lec_auto_initialize().

char ecuAutoFout_t::fname[ecu_AUTO_MAX_STRING]

Definition at line 157 of file ecuauto.h.

Referenced by ecu_auto_close_fout(), and ecuAuto_prep_fout().

void(* ecuAutoFout_t::pcmout_fcn)(void *fout)

Referenced by ecu_auto_output_pcm(), ecuAuto_prep_fout(), and lec_auto_initialize().

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


ECU Test: ecuAutoLoopCfg_t Struct Reference

  • Data Structures
  • Data Fields

ecuAutoLoopCfg_t Struct Reference

#include <ecuauto.h>

Detailed Description

Definition at line 180 of file ecuauto.h.

Data Fields

tint | pcm_format
tint | chn_index
tint | marker
tlong | time_ms
tbool | enable_out

Field Documentation

tint ecuAutoLoopCfg_t::pcm_format

Definition at line 181 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tint ecuAutoLoopCfg_t::chn_index

Definition at line 182 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tint ecuAutoLoopCfg_t::marker

Definition at line 183 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tlong ecuAutoLoopCfg_t::time_ms

Definition at line 184 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tbool ecuAutoLoopCfg_t::enable_out

Definition at line 185 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

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


ECU Test: ecuChnConfig_t Struct Reference

  • Data Structures
  • Data Fields

ecuChnConfig_t Struct Reference

#include <ecuauto.h>

Detailed Description

Definition at line 163 of file ecuauto.h.

Data Fields

tuint | valid_bitfield
ecuNlp_e nlp_mode
ecuErl_e min_erl
tbool | bypass
tbool | hreg_hold
tbool | hreg_clear

Field Documentation

tuint ecuChnConfig_t::valid_bitfield

Definition at line 164 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

ecuNlp_e ecuChnConfig_t::nlp_mode

Definition at line 165 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

ecuErl_e ecuChnConfig_t::min_erl

Definition at line 166 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

tbool ecuChnConfig_t::bypass

Definition at line 167 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

tbool ecuChnConfig_t::hreg_hold

Definition at line 168 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

tbool ecuChnConfig_t::hreg_clear

Definition at line 169 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

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


ECU Test: ecuMemConfig_t Struct Reference

  • Data Structures
  • Data Fields

ecuMemConfig_t Struct Reference

#include <ecumem.h>

Detailed Description

Definition at line 16 of file ecumem.h.

Data Fields

tbool | pre_init_bufs
tword | init_pattern

Field Documentation

tbool ecuMemConfig_t::pre_init_bufs

Definition at line 17 of file ecumem.h.

Referenced by ecu_auto_create_hyb(), ecu_mem_alloc_eco(), and ecucmd_chnnew_handler().

tword ecuMemConfig_t::init_pattern

Definition at line 18 of file ecumem.h.

Referenced by ecu_auto_create_hyb(), ecu_mem_alloc_eco(), and ecucmd_chnnew_handler().

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


ECU Test: ecuMemHeap_t Struct Reference

  • Data Structures
  • Data Fields

ecuMemHeap_t Struct Reference

#include <ecumem.h>

Detailed Description

Definition at line 10 of file ecumem.h.

Data Fields

tword * | base
tulong | indx
tulong | size

Field Documentation

tword* ecuMemHeap_t::base

Definition at line 11 of file ecumem.h.

Referenced by ecu_mem_heap_alloc(), and ecu_mem_heap_init().

tulong ecuMemHeap_t::indx

Definition at line 12 of file ecumem.h.

Referenced by ecu_mem_heap_alloc(), and ecu_mem_heap_init().

tulong ecuMemHeap_t::size

Definition at line 13 of file ecumem.h.

Referenced by ecu_mem_heap_alloc(), and ecu_mem_heap_init().

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


ECU Test: ecuProfile_t Struct Reference

  • Data Structures
  • Data Fields

ecuProfile_t Struct Reference

#include <ecusim.h>

Detailed Description

Definition at line 205 of file ecusim.h.

Data Fields

FILE * | fptr
tbool | use_cache
tbool | enabled
tlong | overhead
tlong | start_cnt
tlong | cycles

Field Documentation

FILE* ecuProfile_t::fptr

Definition at line 206 of file ecusim.h.

Referenced by ecusim_profile_close(), ecusim_profile_init(), and ecusim_profile_print().

tbool ecuProfile_t::use_cache

Definition at line 207 of file ecusim.h.

Referenced by ecusim_profile_init(), and ecusim_profile_start().

tbool ecuProfile_t::enabled

Definition at line 208 of file ecusim.h.

Referenced by ecusim_profile_close(), ecusim_profile_init(), ecusim_profile_print(), and main().

tlong ecuProfile_t::overhead

Definition at line 209 of file ecusim.h.

Referenced by ecusim_profile_init(), and ecusim_profile_stop().

tlong ecuProfile_t::start_cnt

Definition at line 210 of file ecusim.h.

Referenced by ecusim_profile_start(), and ecusim_profile_stop().

tlong ecuProfile_t::cycles

Definition at line 211 of file ecusim.h.

Referenced by ecusim_profile_init(), ecusim_profile_print(), ecusim_profile_start(), and ecusim_profile_stop().

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


ECU Test: ecuSimFileIo_t Struct Reference

  • Data Structures
  • Data Fields

ecuSimFileIo_t Struct Reference

#include <ecusim.h>

Detailed Description

Definition at line 198 of file ecusim.h.

Data Fields

tbool | fio
tbool | eof
FILE * | fptr
char | fname [ecu_SIM_MAX_STRING]

Field Documentation

tbool ecuSimFileIo_t::fio

Definition at line 199 of file ecusim.h.

Referenced by ecu_sim_init().

tbool ecuSimFileIo_t::eof

Definition at line 200 of file ecusim.h.

Referenced by ecu_sim_init().

FILE* ecuSimFileIo_t::fptr

Definition at line 201 of file ecusim.h.

Referenced by ecu_sim_init().

char ecuSimFileIo_t::fname[ecu_SIM_MAX_STRING]

Definition at line 202 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

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


ECU Test: iramSeg_t Struct Reference

  • Data Structures
  • Data Fields

iramSeg_t Struct Reference

#include <ecuiram.h>

Detailed Description

Definition at line 67 of file ecuiram.h.

Data Fields

linSample * | piu_ecu_receive_ptr
Fract * | ecu_bg_work_ptr
linSample * | ecu_bg_e_ptr
Fract * | ecu_bg_filter_ptr
Fract * | ecu_fg_filter_ptr

Field Documentation

linSample* iramSeg_t::piu_ecu_receive_ptr

Definition at line 72 of file ecuiram.h.

Referenced by siu_new_ecu().

Fract* iramSeg_t::ecu_bg_work_ptr

Definition at line 77 of file ecuiram.h.

Referenced by siu_new_ecu().

linSample* iramSeg_t::ecu_bg_e_ptr

Definition at line 78 of file ecuiram.h.

Referenced by siu_new_ecu().

Fract* iramSeg_t::ecu_bg_filter_ptr

Definition at line 79 of file ecuiram.h.

Referenced by siu_new_ecu().

Fract* iramSeg_t::ecu_fg_filter_ptr

Definition at line 80 of file ecuiram.h.

Referenced by siu_new_ecu().

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


ECU Test: pcmPatternDet_t Struct Reference

  • Data Structures
  • Data Fields

pcmPatternDet_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 177 of file piu.h.

Data Fields

tbool | enable
tint | type
tint | time
tint | custom

Field Documentation

tbool pcmPatternDet_t::enable

Definition at line 178 of file piu.h.

Referenced by piuPatternDetect().

tint pcmPatternDet_t::type

Definition at line 179 of file piu.h.

Referenced by piuPatternDetect().

tint pcmPatternDet_t::time

Definition at line 180 of file piu.h.

Referenced by piuPatternDetect().

tint pcmPatternDet_t::custom

Definition at line 181 of file piu.h.

Referenced by piuPatternDetect().

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


ECU Test: pcmPatternGen_t Struct Reference

  • Data Structures
  • Data Fields

pcmPatternGen_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 184 of file piu.h.

Data Fields

tbool | enable
tuint | pattern

Field Documentation

tbool pcmPatternGen_t::enable

Definition at line 185 of file piu.h.

Referenced by piuPatternGeneration().

tuint pcmPatternGen_t::pattern

Definition at line 186 of file piu.h.

Referenced by piuPatternGeneration().

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


ECU Test: piuCompandingCfg_t Struct Reference

  • Data Structures
  • Data Fields

piuCompandingCfg_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 189 of file piu.h.

Data Fields

tint | law
const tint * | pcm_expand_table

Field Documentation

tint piuCompandingCfg_t::law

Definition at line 190 of file piu.h.

Referenced by piuSetCompanding(), and siu_open_piu().

const tint* piuCompandingCfg_t::pcm_expand_table

Definition at line 191 of file piu.h.

Referenced by piuSetCompanding(), and siu_open_piu().

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


ECU Test: piuConfig_t Struct Reference

  • Data Structures
  • Data Fields

piuConfig_t Struct Reference

#include <piu.h>

Collaboration diagram for piuConfig_t:

[legend]

Detailed Description

Definition at line 224 of file piu.h.

Data Fields

tbool | transp_mode
tint | segment_size
void * | sendOutProcTargetInst
void * | sendOutIsrTargetInst
void * | reportOutTargetInst
tint | max_pcm_val
tuint | rx_delay
tbool | use_recv_out_buf
piuCompandingCfg_t companding

Field Documentation

tbool piuConfig_t::transp_mode

Definition at line 225 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

tint piuConfig_t::segment_size

Definition at line 228 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

void* piuConfig_t::sendOutProcTargetInst

Definition at line 229 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

void* piuConfig_t::sendOutIsrTargetInst

Definition at line 232 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

void* piuConfig_t::reportOutTargetInst

Definition at line 235 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

tint piuConfig_t::max_pcm_val

Definition at line 236 of file piu.h.

Referenced by siu_open_piu().

tuint piuConfig_t::rx_delay

Definition at line 237 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

tbool piuConfig_t::use_recv_out_buf

Definition at line 238 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

piuCompandingCfg_t piuConfig_t::companding

Definition at line 239 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

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


ECU Test: piuContext_t Struct Reference

  • Data Structures
  • Data Fields

piuContext_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 139 of file piu.h.

Data Fields

tint | max_pcm_val
dbgInfo_t | debugInfo
void(* | reportOutFcn )(void *targetInst, tint report_code)
void(* | sendOutProcFcn )(void *targetInst, void *send_data, void *rcv_data, tint task_id)
void(* | sendOutIsrFcn )(void *targetInst, void *send_data, void *rcv_data, tint task_id)
void(* | pcmSampleTrace )(tint chnum, tint pcm_size, void *pcm_in, tuint dir)

Field Documentation

tint piuContext_t::max_pcm_val

Definition at line 140 of file piu.h.

Referenced by siu_new_piu().

dbgInfo_t piuContext_t::debugInfo

Definition at line 141 of file piu.h.

Referenced by piu_exception(), and siu_new_piu().

void(* piuContext_t::reportOutFcn)(void *targetInst, tint report_code)

Referenced by piu_bid_silence_detect(), piu_pcm_pattern_detect(), piuTxRxProc(), and siu_new_piu().

void(* piuContext_t::sendOutProcFcn)(void *targetInst, void *send_data, void *rcv_data, tint task_id)

Referenced by piuTxRxProc(), and siu_new_piu().

void(* piuContext_t::sendOutIsrFcn)(void *targetInst, void *send_data, void *rcv_data, tint task_id)

Referenced by piuReceiveOut(), and siu_new_piu().

void(* piuContext_t::pcmSampleTrace)(tint chnum, tint pcm_size, void *pcm_in, tuint dir)

Referenced by piuReceiveOut(), piuSendIn(), and siu_new_piu().

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


ECU Test: piuControl_t Struct Reference

  • Data Structures
  • Data Fields

piuControl_t Struct Reference

#include <piu.h>

Collaboration diagram for piuControl_t:

[legend]

Detailed Description

Definition at line 200 of file piu.h.

Data Fields

tint ctl_code
union {
tint loopback_select
tuint frame_size
setFrame_t set_frame
piuStats_t stats
bidSilenceDet_t bid_silence_detect
pcmPatternDet_t pattern_detect
pcmPatternGen_t pattern_generate
piuCompandingCfg_t companding
tint dc_offset_removal_select
} u

Field Documentation

tint piuControl_t::ctl_code

Definition at line 201 of file piu.h.

Referenced by ecu_sim_init(), main(), and piuControl().

tint piuControl_t::loopback_select

Definition at line 203 of file piu.h.

Referenced by piuControl().

tuint piuControl_t::frame_size

Definition at line 204 of file piu.h.

setFrame_t piuControl_t::set_frame

Definition at line 205 of file piu.h.

Referenced by main(), and piuControl().

piuStats_t piuControl_t::stats

Definition at line 206 of file piu.h.

Referenced by piuControl().

bidSilenceDet_t piuControl_t::bid_silence_detect

Definition at line 207 of file piu.h.

Referenced by piuControl().

pcmPatternDet_t piuControl_t::pattern_detect

Definition at line 208 of file piu.h.

Referenced by piuControl().

pcmPatternGen_t piuControl_t::pattern_generate

Definition at line 209 of file piu.h.

Referenced by piuControl().

piuCompandingCfg_t piuControl_t::companding

Definition at line 210 of file piu.h.

Referenced by piuControl().

tint piuControl_t::dc_offset_removal_select

Definition at line 211 of file piu.h.

Referenced by ecu_sim_init(), and piuControl().

union { ... } piuControl_t::u

Referenced by ecu_sim_init(), main(), and piuControl().

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


ECU Test: piuEnergyDCLevel_t Struct Reference

  • Data Structures
  • Data Fields

piuEnergyDCLevel_t Struct Reference

#include <piuloc.h>

Detailed Description

Definition at line 89 of file piuloc.h.

Data Fields

LFract | txEnergy
LFract | rxEnergy
LFract | txDClevel
LFract | rxDClevel

Field Documentation

LFract piuEnergyDCLevel_t::txEnergy

Definition at line 90 of file piuloc.h.

Referenced by piu_get_stats(), and piuOpen().

LFract piuEnergyDCLevel_t::rxEnergy

Definition at line 91 of file piuloc.h.

Referenced by piu_get_stats(), piuOpen(), and piuReceiveIn().

LFract piuEnergyDCLevel_t::txDClevel

Definition at line 92 of file piuloc.h.

Referenced by piu_get_stats(), piuBidSilenceDetect(), and piuOpen().

LFract piuEnergyDCLevel_t::rxDClevel

Definition at line 93 of file piuloc.h.

Referenced by piu_get_stats(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

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


ECU Test: piuInst_s Struct Reference

  • Data Structures
  • Data Fields

piuInst_s Struct Reference

#include <piuloc.h>

Collaboration diagram for piuInst_s:

[legend]

Detailed Description

Definition at line 124 of file piuloc.h.

Data Fields

tuint | ID
tint | state
tuint | mode_bitfield
const tint * | pcm_expand_table
tint | pcm_format
tint | segment_size
tuint | rx_delay
tuint | rx_underflow_cnt
tuint | rx_overflow_cnt
linSample * | receive_out_buf
linSample * | receive_out_buf_ptr
linSample * | send_out_buf
linSample * | send_out_buf_ptr
void * | reportOutTargetInst
void * | sendOutProcTargetInst
void * | sendOutIsrTargetInst
piuEnergyDCLevel_t energy_DClevel
tuint | generatePattern
receive_in_buf_t receive_in_buf
bidSilenceCtrl_t bidSilence
piuPcmPatternDetect_t pcmPattern
linSample | silence_pattern

Field Documentation

tuint piuInst_s::ID

Definition at line 125 of file piuloc.h.

Referenced by piuReceiveOut(), and piuSendIn().

tint piuInst_s::state

Definition at line 126 of file piuloc.h.

Referenced by piuClose(), piuControl(), piuDelete(), piuOpen(), piuReceiveIn(), piuReceiveOut(), piuSendIn(), and piuTxRxProc().

tuint piuInst_s::mode_bitfield

Definition at line 127 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piu_loopback_config(), piu_pcm_companding(), piu_pcm_compressing(), piu_pcm_pattern_detect(), piuBidSilenceDetect(), piuControl(), piuDcOffsetRemoval(), piuNew(), piuOpen(), piuPatternDetect(), piuPatternGeneration(), piuReceiveIn(), piuReceiveOut(), and piuTxRxProc().

const tint* piuInst_s::pcm_expand_table

Definition at line 128 of file piuloc.h.

Referenced by piu_pcm_companding(), and piuSetCompanding().

tint piuInst_s::pcm_format

Definition at line 129 of file piuloc.h.

Referenced by piu_pcm_compressing(), piu_pcm_pattern_generate(), and piuSetCompanding().

tint piuInst_s::segment_size

Definition at line 131 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piu_loopback_config(), piu_pcm_pattern_detect(), piu_pcm_pattern_generate(), piu_reset_receive_in_buf(), piu_update_buf_ptr(), piuControl(), piuOpen(), piuReceiveIn(), piuReceiveOut(), and piuSendIn().

tuint piuInst_s::rx_delay

Definition at line 132 of file piuloc.h.

Referenced by piuOpen().

tuint piuInst_s::rx_underflow_cnt

Definition at line 133 of file piuloc.h.

Referenced by piu_get_stats(), piuOpen(), and piuReceiveOut().

tuint piuInst_s::rx_overflow_cnt

Definition at line 134 of file piuloc.h.

Referenced by piuOpen(), and piuReceiveIn().

linSample* piuInst_s::receive_out_buf

Definition at line 135 of file piuloc.h.

Referenced by piuControl(), piuNew(), piuOpen(), and piuReceiveOut().

linSample* piuInst_s::receive_out_buf_ptr

Definition at line 136 of file piuloc.h.

Referenced by piuControl(), piuOpen(), and piuReceiveOut().

linSample* piuInst_s::send_out_buf

Definition at line 137 of file piuloc.h.

Referenced by piuControl(), piuNew(), piuOpen(), and piuSendIn().

linSample* piuInst_s::send_out_buf_ptr

Definition at line 138 of file piuloc.h.

Referenced by piuControl(), piuOpen(), piuReceiveOut(), and piuSendIn().

void* piuInst_s::reportOutTargetInst

Definition at line 140 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piu_pcm_pattern_detect(), and piuOpen().

void* piuInst_s::sendOutProcTargetInst

Definition at line 141 of file piuloc.h.

Referenced by piuOpen().

void* piuInst_s::sendOutIsrTargetInst

Definition at line 142 of file piuloc.h.

Referenced by piuOpen(), and piuReceiveOut().

piuEnergyDCLevel_t piuInst_s::energy_DClevel

Definition at line 144 of file piuloc.h.

Referenced by piu_get_stats(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

tuint piuInst_s::generatePattern

Definition at line 145 of file piuloc.h.

Referenced by piu_pcm_pattern_generate(), piuOpen(), and piuPatternGeneration().

receive_in_buf_t piuInst_s::receive_in_buf

Definition at line 146 of file piuloc.h.

Referenced by piu_loopback_config(), piu_pcm_pattern_generate(), piu_reset_receive_in_buf(), piu_update_buf_ptr(), piuControl(), piuNew(), piuReceiveIn(), and piuReceiveOut().

bidSilenceCtrl_t piuInst_s::bidSilence

Definition at line 147 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

piuPcmPatternDetect_t piuInst_s::pcmPattern

Definition at line 148 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

linSample piuInst_s::silence_pattern

Definition at line 149 of file piuloc.h.

Referenced by piuReceiveOut(), and piuSetCompanding().

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


ECU Test: piuNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

piuNewConfig_t Struct Reference

#include <piu.h>

Collaboration diagram for piuNewConfig_t:

[legend]

Detailed Description

Definition at line 157 of file piu.h.

Data Fields

tuint ID
piuContext_t context
piuSizeConfig_t sizeCfg

Field Documentation

tuint piuNewConfig_t::ID

Definition at line 158 of file piu.h.

Referenced by siu_new_piu().

piuContext_t piuNewConfig_t::context

Definition at line 159 of file piu.h.

Referenced by siu_new_piu().

piuSizeConfig_t piuNewConfig_t::sizeCfg

Definition at line 160 of file piu.h.

Referenced by piuNew(), and siu_new_piu().

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


ECU Test: piuPcmPatternDetect_t Struct Reference

  • Data Structures
  • Data Fields

piuPcmPatternDetect_t Struct Reference

#include <piuloc.h>

Detailed Description

Definition at line 81 of file piuloc.h.

Data Fields

tint | type
tint | custom
tlong | cnt
tint | initCnt

Field Documentation

tint piuPcmPatternDetect_t::type

Definition at line 82 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

tint piuPcmPatternDetect_t::custom

Definition at line 83 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

tlong piuPcmPatternDetect_t::cnt

Definition at line 84 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

tint piuPcmPatternDetect_t::initCnt

Definition at line 85 of file piuloc.h.

Referenced by piuPatternDetect().

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


ECU Test: piuSizeConfig_t Struct Reference

  • Data Structures
  • Data Fields

piuSizeConfig_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 128 of file piu.h.

Data Fields

tint | max_samples_per_segment
tbool | rx_triple_buffering

Field Documentation

tint piuSizeConfig_t::max_samples_per_segment

Definition at line 129 of file piu.h.

Referenced by piuGetSizes(), piuNew(), and siu_new_piu().

tbool piuSizeConfig_t::rx_triple_buffering

Definition at line 134 of file piu.h.

Referenced by piuGetSizes(), piuNew(), and siu_new_piu().

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


ECU Test: piuStats_t Struct Reference

  • Data Structures
  • Data Fields

piuStats_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 113 of file piu.h.

Data Fields

tint | send_out
tint | send_out_mean
tint | receive_out
tint | receive_out_mean
tuint | underrun

Field Documentation

tint piuStats_t::send_out

Definition at line 114 of file piu.h.

Referenced by piu_get_stats().

tint piuStats_t::send_out_mean

Definition at line 115 of file piu.h.

Referenced by piu_get_stats().

tint piuStats_t::receive_out

Definition at line 116 of file piu.h.

Referenced by piu_get_stats().

tint piuStats_t::receive_out_mean

Definition at line 117 of file piu.h.

Referenced by piu_get_stats().

tuint piuStats_t::underrun

Definition at line 118 of file piu.h.

Referenced by piu_get_stats().

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


ECU Test: receive_in_buf_t Struct Reference

  • Data Structures
  • Data Fields

receive_in_buf_t Struct Reference

#include <piuloc.h>

Detailed Description

Definition at line 108 of file piuloc.h.

Data Fields

linSample * | in_ptr
linSample * | out_ptr
linSample * | start_ptr
linSample * | end_ptr
linSample * | top_ptr
tint | segment_count

Field Documentation

linSample* receive_in_buf_t::in_ptr

Definition at line 109 of file piuloc.h.

Referenced by piu_loopback_config(), piu_pcm_pattern_generate(), piu_reset_receive_in_buf(), piuReceiveIn(), and piuReceiveOut().

linSample* receive_in_buf_t::out_ptr

Definition at line 110 of file piuloc.h.

Referenced by piu_loopback_config(), piu_reset_receive_in_buf(), and piuReceiveOut().

linSample* receive_in_buf_t::start_ptr

Definition at line 111 of file piuloc.h.

Referenced by piu_loopback_config(), piu_reset_receive_in_buf(), piu_update_buf_ptr(), piuControl(), and piuNew().

linSample* receive_in_buf_t::end_ptr

Definition at line 112 of file piuloc.h.

Referenced by piu_reset_receive_in_buf(), piu_update_buf_ptr(), and piuNew().

linSample* receive_in_buf_t::top_ptr

Definition at line 113 of file piuloc.h.

Referenced by piu_reset_receive_in_buf().

tint receive_in_buf_t::segment_count

Definition at line 114 of file piuloc.h.

Referenced by piu_loopback_config(), piu_reset_receive_in_buf(), piu_update_buf_ptr(), piuReceiveIn(), and piuReceiveOut().

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


ECU Test: setFrame_t Struct Reference

  • Data Structures
  • Data Fields

setFrame_t Struct Reference

#include <piu.h>

Detailed Description

Definition at line 194 of file piu.h.

Data Fields

tuint | frame_size
tuint * | send_out_buf
tuint * | receive_in_buf

Field Documentation

tuint setFrame_t::frame_size

Definition at line 195 of file piu.h.

Referenced by main(), and piuControl().

tuint* setFrame_t::send_out_buf

Definition at line 196 of file piu.h.

Referenced by main(), and piuControl().

tuint* setFrame_t::receive_in_buf

Definition at line 197 of file piu.h.

Referenced by main(), and piuControl().

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


ECU Test: siuConfig_t Struct Reference

  • Data Structures
  • Data Fields

siuConfig_t Struct Reference

#include <siu.h>

Detailed Description

Definition at line 56 of file siu.h.

Data Fields

tuint | ID
void(* | exception )(tuint id, char *str)
void(* | debug )(tuint id, char *str)
tint | companding_law
tint | pcm_bits
void * | core_heap
void * | voice_heap

Field Documentation

tuint siuConfig_t::ID

Definition at line 57 of file siu.h.

Referenced by main(), and siuInit().

void(* siuConfig_t::exception)(tuint id, char *str)

Referenced by main(), and siuInit().

void(* siuConfig_t::debug)(tuint id, char *str)

Referenced by main(), and siuInit().

tint siuConfig_t::companding_law

Definition at line 60 of file siu.h.

Referenced by main(), and siuInit().

tint siuConfig_t::pcm_bits

Definition at line 65 of file siu.h.

Referenced by main(), and siuInit().

void* siuConfig_t::core_heap

Definition at line 67 of file siu.h.

Referenced by main(), and siuInit().

void* siuConfig_t::voice_heap

Definition at line 68 of file siu.h.

Referenced by main(), and siuInit().

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


ECU Test: siuContext_t Struct Reference

  • Data Structures
  • Data Fields

siuContext_t Struct Reference

#include <siuloc.h>

Detailed Description

Definition at line 46 of file siuloc.h.

Data Fields

tuint | ID
void(* | exception )(tuint id, char *str)
void(* | debug )(tuint id, char *str)
tuint | cheap_used
void * | cheap
tuint | vheap_used
void * | vheap

Field Documentation

tuint siuContext_t::ID

Definition at line 47 of file siuloc.h.

Referenced by siuInit().

void(* siuContext_t::exception)(tuint id, char *str)

Referenced by siuInit().

void(* siuContext_t::debug)(tuint id, char *str)

Referenced by siuInit().

tuint siuContext_t::cheap_used

Definition at line 53 of file siuloc.h.

Referenced by siuInit().

void* siuContext_t::cheap

Definition at line 54 of file siuloc.h.

Referenced by siuCAlloc(), and siuInit().

tuint siuContext_t::vheap_used

Definition at line 55 of file siuloc.h.

Referenced by siuInit().

void* siuContext_t::vheap

Definition at line 56 of file siuloc.h.

Referenced by siuInit(), and siuVAlloc().

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


ECU Test: siuGetFlt_t Struct Reference

  • Data Structures
  • Data Fields

siuGetFlt_t Struct Reference

#include <ecusim.h>

Detailed Description

Definition at line 170 of file ecusim.h.

Data Fields

tint | select
tint | start
tint | ncoeff
tint | retstat

Field Documentation

tint siuGetFlt_t::select

Definition at line 171 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuGetFlt_t::start

Definition at line 172 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuGetFlt_t::ncoeff

Definition at line 173 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuGetFlt_t::retstat

Definition at line 174 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

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


ECU Test: siuInst_t Struct Reference

  • Data Structures
  • Data Fields

siuInst_t Struct Reference

#include <siuloc.h>

Collaboration diagram for siuInst_t:

[legend]

Detailed Description

Definition at line 95 of file siuloc.h.

Data Fields

tuint | ID
void(* | exception )(tuint id, char *str)
void(* | debug )(tuint id, char *str)
siuTxInst_t TxInst
void * | slmInst
tuint | cheap_used
tuint | vheap_used
tint | companding_law
tint | pcm_bits
void * | piuInst
void * | ecuInst

Field Documentation

tuint siuInst_t::ID

Definition at line 96 of file siuloc.h.

void(* siuInst_t::exception)(tuint id, char *str)

Referenced by siu_open_rxsgn(), siu_open_txhyb(), siu_open_txsgn(), and siuInit().

void(* siuInst_t::debug)(tuint id, char *str)

Referenced by siu_open_rxsgn(), siu_open_txsgn(), and siuInit().

siuTxInst_t siuInst_t::TxInst

Definition at line 103 of file siuloc.h.

Referenced by ecu_send_out(), main(), siu_tx_execute(), siuInit(), siuTxOpen(), and siuTxSendIn().

void* siuInst_t::slmInst

Definition at line 104 of file siuloc.h.

Referenced by main(), and siuInit().

tuint siuInst_t::cheap_used

Definition at line 105 of file siuloc.h.

Referenced by main(), siu_new_piu(), and siuInit().

tuint siuInst_t::vheap_used

Definition at line 106 of file siuloc.h.

Referenced by siu_new_ecu(), and siuInit().

tint siuInst_t::companding_law

Definition at line 107 of file siuloc.h.

Referenced by main(), siu_open_piu(), siu_open_rxsgn(), siu_open_txsgn(), and siuInit().

tint siuInst_t::pcm_bits

Definition at line 113 of file siuloc.h.

Referenced by siuInit().

void* siuInst_t::piuInst

Definition at line 115 of file siuloc.h.

Referenced by main(), siu_new_piu(), siu_open_piu(), siuInit(), and siuTxRxSendIn().

void* siuInst_t::ecuInst

Definition at line 119 of file siuloc.h.

Referenced by main(), siu_new_ecu(), siu_open_ecu(), siu_open_tx(), and siuInit().

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


ECU Test: siuSGNPars_t Struct Reference

  • Data Structures
  • Data Fields

siuSGNPars_t Struct Reference

#include <ecusim.h>

Detailed Description

Definition at line 150 of file ecusim.h.

Data Fields

tbool | state
tbool | reset
tint | delay
linSample | dcoffset
tint | wftype
tint | f1
tint | f2
linSample | amp1
linSample | amp2
tint | nlevel
tuint | nseed
tint | ntype
tint | pow_level
tuint | hoth_seed
tulong | sdram_addr
tulong | num_sample

Field Documentation

tbool siuSGNPars_t::state

Definition at line 151 of file ecusim.h.

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

tbool siuSGNPars_t::reset

Definition at line 152 of file ecusim.h.

Referenced by ecu_sim_init(), and siu_set_sgn().

tint siuSGNPars_t::delay

Definition at line 153 of file ecusim.h.

Referenced by ecu_sim_init(), main(), siu_open_rxsgn(), and siu_open_txsgn().

linSample siuSGNPars_t::dcoffset

Definition at line 154 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

tint siuSGNPars_t::wftype

Definition at line 155 of file ecusim.h.

Referenced by ecu_sim_init(), main(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

tint siuSGNPars_t::f1

Definition at line 156 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

tint siuSGNPars_t::f2

Definition at line 157 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

linSample siuSGNPars_t::amp1

Definition at line 158 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

linSample siuSGNPars_t::amp2

Definition at line 159 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

tint siuSGNPars_t::nlevel

Definition at line 160 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

tuint siuSGNPars_t::nseed

Definition at line 161 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), and siu_open_txsgn().

tint siuSGNPars_t::ntype

Definition at line 162 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), and siu_open_txsgn().

tint siuSGNPars_t::pow_level

Definition at line 163 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), siu_open_txsgn(), and siu_set_sgn().

tuint siuSGNPars_t::hoth_seed

Definition at line 164 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), and siu_open_txsgn().

tulong siuSGNPars_t::sdram_addr

Definition at line 165 of file ecusim.h.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

tulong siuSGNPars_t::num_sample

Definition at line 166 of file ecusim.h.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

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


ECU Test: siuSetup_s Struct Reference

  • Data Structures
  • Data Fields

siuSetup_s Struct Reference

#include <ecusim.h>

Collaboration diagram for siuSetup_s:

[legend]

Detailed Description

Definition at line 215 of file ecusim.h.

Data Fields

tbool | exec
tulong | sample_cnt
tuint | clock_mul
tint | pcm_format
tint | pcm_bits
tint | frame_size
tint | ecu_y2x_delay
tint | ecu_fltseg_length
tint | ecu_num_fltseg
tint | ecu_filter_length
tint | hyb_filter_length
tbool | toggle_ecu
ecuControl_t | ecuCtl
tbool | toggle_hyb
hybControl_t | hybCtl
tbool | toggle_tx_sg
siuSGNPars_t txSGN
tbool | toggle_rx_sg
siuSGNPars_t rxSGN
tbool | toggle_piu
piuControl_t piuCtl
tbool | toggle_getflt
siuGetFlt_t getflt
tbool | profile_enable
tbool | toggle_freerun
tuint | freerun_frame_cnt
tuint | Fs
tuint | error_id
tuint | sig_src
tbool | save_to_file
tuint | num_channel
tuint | output_chnum
ecuSimFileIo_t rin
ecuSimFileIo_t sin
ecuSimFileIo_t rout
ecuSimFileIo_t sout

Field Documentation

tbool siuSetup_s::exec

Definition at line 216 of file ecusim.h.

Referenced by ecu_sim_init(), main(), siu_open_rxsgn(), siu_open_txhyb(), and siu_open_txsgn().

tulong siuSetup_s::sample_cnt

Definition at line 217 of file ecusim.h.

Referenced by ecu_sim_init().

tuint siuSetup_s::clock_mul

Definition at line 218 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::pcm_format

Definition at line 219 of file ecusim.h.

Referenced by ecu_sim_fread(), ecu_sim_fwrite(), ecu_sim_init(), ecu_sim_input(), ecu_sim_output(), main(), and siu_open_ecu().

tint siuSetup_s::pcm_bits

Definition at line 221 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::frame_size

Definition at line 222 of file ecusim.h.

Referenced by ecu_sim_init(), ecu_sim_input(), ecu_sim_output(), generate_rx_tone_frame(), and main().

tint siuSetup_s::ecu_y2x_delay

Definition at line 223 of file ecusim.h.

Referenced by ecu_sim_init(), and siu_open_ecu().

tint siuSetup_s::ecu_fltseg_length

Definition at line 224 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::ecu_num_fltseg

Definition at line 225 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::ecu_filter_length

Definition at line 226 of file ecusim.h.

Referenced by ecu_sim_init(), and siu_open_ecu().

tint siuSetup_s::hyb_filter_length

Definition at line 227 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_ecu

Definition at line 228 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

ecuControl_t siuSetup_s::ecuCtl

Definition at line 229 of file ecusim.h.

Referenced by ecu_sim_init(), main(), and siu_open_ecu().

tbool siuSetup_s::toggle_hyb

Definition at line 230 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

hybControl_t siuSetup_s::hybCtl

Definition at line 231 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_tx_sg

Definition at line 232 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

siuSGNPars_t siuSetup_s::txSGN

Definition at line 233 of file ecusim.h.

Referenced by ecu_sim_init(), main(), and siu_open_txsgn().

tbool siuSetup_s::toggle_rx_sg

Definition at line 234 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

siuSGNPars_t siuSetup_s::rxSGN

Definition at line 235 of file ecusim.h.

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

tbool siuSetup_s::toggle_piu

Definition at line 236 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

piuControl_t siuSetup_s::piuCtl

Definition at line 237 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_getflt

Definition at line 238 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

siuGetFlt_t siuSetup_s::getflt

Definition at line 239 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::profile_enable

Definition at line 244 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_freerun

Definition at line 249 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tuint siuSetup_s::freerun_frame_cnt

Definition at line 250 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tuint siuSetup_s::Fs

Definition at line 251 of file ecusim.h.

Referenced by ecu_sim_init(), main(), siu_open_rxsgn(), and siu_open_txsgn().

tuint siuSetup_s::error_id

Definition at line 252 of file ecusim.h.

Referenced by ecu_sim_init(), main(), siu_open_rxsgn(), siu_open_txhyb(), and siu_open_txsgn().

tuint siuSetup_s::sig_src

Definition at line 253 of file ecusim.h.

Referenced by ecu_sim_init(), generate_rx_tone_frame(), and main().

tbool siuSetup_s::save_to_file

Definition at line 254 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tuint siuSetup_s::num_channel

Definition at line 255 of file ecusim.h.

Referenced by ecu_sim_init().

tuint siuSetup_s::output_chnum

Definition at line 256 of file ecusim.h.

Referenced by ecu_sim_init().

ecuSimFileIo_t siuSetup_s::rin

Definition at line 257 of file ecusim.h.

Referenced by ecu_sim_init(), generate_rx_tone_frame(), and main().

ecuSimFileIo_t siuSetup_s::sin

Definition at line 258 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

ecuSimFileIo_t siuSetup_s::rout

Definition at line 259 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

ecuSimFileIo_t siuSetup_s::sout

Definition at line 260 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

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


ECU Test: siuSlimInst_t Struct Reference

  • Data Structures
  • Data Fields

siuSlimInst_t Struct Reference

#include <siuloc.h>

Detailed Description

Definition at line 82 of file siuloc.h.

Data Fields

tint | mode
tint | thresh_idx
tint | sign

Field Documentation

tint siuSlimInst_t::mode

Definition at line 83 of file siuloc.h.

tint siuSlimInst_t::thresh_idx

Definition at line 84 of file siuloc.h.

tint siuSlimInst_t::sign

Definition at line 85 of file siuloc.h.

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


ECU Test: siuTxConfig_t Struct Reference

  • Data Structures
  • Data Fields

siuTxConfig_t Struct Reference

#include <siu.h>

Collaboration diagram for siuTxConfig_t:

[legend]

Detailed Description

Definition at line 93 of file siu.h.

Data Fields

tint | send_frame_length
tint | recv_frame_length
siuTxSendOut_t TxSendOut

Field Documentation

tint siuTxConfig_t::send_frame_length

Definition at line 94 of file siu.h.

Referenced by siu_open_tx(), and siuTxOpen().

tint siuTxConfig_t::recv_frame_length

Definition at line 95 of file siu.h.

Referenced by siu_open_tx(), and siuTxOpen().

siuTxSendOut_t siuTxConfig_t::TxSendOut

Definition at line 96 of file siu.h.

Referenced by siu_open_tx(), and siuTxOpen().

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


ECU Test: siuTxInst_t Struct Reference

  • Data Structures
  • Data Fields

siuTxInst_t Struct Reference

#include <siuloc.h>

Collaboration diagram for siuTxInst_t:

[legend]

Detailed Description

Definition at line 66 of file siuloc.h.

Data Fields

tbool | enabled
tint | send_frame_length
tint | recv_frame_length
linSample * | send_frame_ptr
linSample * | recv_frame_ptr
siuTxSendOut_t TxSendOut

Field Documentation

tbool siuTxInst_t::enabled

Definition at line 67 of file siuloc.h.

Referenced by siu_tx_execute(), siuInit(), and siuTxOpen().

tint siuTxInst_t::send_frame_length

Definition at line 68 of file siuloc.h.

Referenced by ecu_send_out(), main(), siu_tx_execute(), siuInit(), and siuTxOpen().

tint siuTxInst_t::recv_frame_length

Definition at line 69 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

linSample* siuTxInst_t::send_frame_ptr

Definition at line 70 of file siuloc.h.

Referenced by main(), siu_tx_execute(), siuInit(), siuTxOpen(), and siuTxSendIn().

linSample* siuTxInst_t::recv_frame_ptr

Definition at line 71 of file siuloc.h.

Referenced by main(), siuInit(), siuTxOpen(), and siuTxSendIn().

siuTxSendOut_t siuTxInst_t::TxSendOut

Definition at line 72 of file siuloc.h.

Referenced by main(), siuInit(), and siuTxOpen().

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


ECU Test: siuTxSendOut_t Struct Reference

  • Data Structures
  • Data Fields

siuTxSendOut_t Struct Reference

#include <siu.h>

Detailed Description

Definition at line 80 of file siu.h.

Data Fields

void(* | fcn )(void *targetInst, void *send_frame, void *recv_frame, void *send_out_frame)
void * | targetInst

Field Documentation

void(* siuTxSendOut_t::fcn)(void *targetInst, void *send_frame, void *recv_frame, void *send_out_frame)

Referenced by siu_open_tx(), and siuInit().

void* siuTxSendOut_t::targetInst

Definition at line 83 of file siu.h.

Referenced by main(), siu_open_tx(), and siuInit().

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


ECU Test: vctypes.h File Reference

  • File List
  • Globals

vctypes.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | EVCT_INVALID 0xFFu
#define | VCT_8BITS 0x00u
#define | VCT_1BITS 0x01u
#define | VCT_2BITS 0x02u
#define | VCT_3BITS 0x03u
#define | VCT_4BITS 0x04u
#define | VCT_5BITS 0x05u
#define | VCT_6BITS 0x06u
#define | VCT_7BITS 0x07u
#define | VCT_8APCM 0x08u
#define | VCT_8MUPCM 0x09u
#define | VCT_2ADPCM 0x0Au
#define | VCT_3ADPCM 0x0Bu
#define | VCT_4ADPCM 0x0Cu
#define | VCT_5ADPCM 0x0Du
#define | VCT_E4_2ADPCM 0x14u
#define | VCT_E5_2ADPCM 0x15u
#define | VCT_E8_6ADPCM 0x18u
#define | EVCT_LDCELP_16K 0x42u
#define | EVCT_G729 0x43u
#define | EVCT_CSACELP EVCT_G729
#define | EVCT_G729A 0x44u
#define | EVCT_G729AB 0x44u
#define | EVCT_G729E 0x45u
#define | EVCT_E2_2ADPCM 0x48u
#define | EVCT_E3_2ADPCM 0x49u
#define | EVCT_GSMEFR 0x4Au
#define | EVCT_GSMFR 0x4Bu
#define | EVCT_G723_53 0x50u
#define | EVCT_G723_63 0x51u
#define | EVCT_FAX 0x80u
#define | EVCT_DATA 0x90u
#define | EVCT_MRU 0xB2u
#define | EVCT_CSACELP_IS641 0xC1u

Define Documentation

#define EVCT_INVALID 0xFFu

Definition at line 56 of file vctypes.h.

#define VCT_8BITS 0x00u

Definition at line 57 of file vctypes.h.

#define VCT_1BITS 0x01u

Definition at line 58 of file vctypes.h.

#define VCT_2BITS 0x02u

Definition at line 59 of file vctypes.h.

#define VCT_3BITS 0x03u

Definition at line 60 of file vctypes.h.

#define VCT_4BITS 0x04u

Definition at line 61 of file vctypes.h.

#define VCT_5BITS 0x05u

Definition at line 62 of file vctypes.h.

#define VCT_6BITS 0x06u

Definition at line 63 of file vctypes.h.

#define VCT_7BITS 0x07u

Definition at line 64 of file vctypes.h.

#define VCT_8APCM 0x08u

Definition at line 66 of file vctypes.h.

#define VCT_8MUPCM 0x09u

Definition at line 67 of file vctypes.h.

#define VCT_2ADPCM 0x0Au

Definition at line 68 of file vctypes.h.

#define VCT_3ADPCM 0x0Bu

Definition at line 69 of file vctypes.h.

#define VCT_4ADPCM 0x0Cu

Definition at line 70 of file vctypes.h.

#define VCT_5ADPCM 0x0Du

Definition at line 71 of file vctypes.h.

#define VCT_E4_2ADPCM 0x14u

Definition at line 73 of file vctypes.h.

#define VCT_E5_2ADPCM 0x15u

Definition at line 74 of file vctypes.h.

#define VCT_E8_6ADPCM 0x18u

Definition at line 76 of file vctypes.h.

#define EVCT_LDCELP_16K 0x42u

Definition at line 83 of file vctypes.h.

#define EVCT_G729 0x43u

Definition at line 84 of file vctypes.h.

#define EVCT_CSACELP EVCT_G729

Definition at line 85 of file vctypes.h.

#define EVCT_G729A 0x44u

Definition at line 86 of file vctypes.h.

#define EVCT_G729AB 0x44u

Definition at line 87 of file vctypes.h.

#define EVCT_G729E 0x45u

Definition at line 88 of file vctypes.h.

#define EVCT_E2_2ADPCM 0x48u

Definition at line 89 of file vctypes.h.

#define EVCT_E3_2ADPCM 0x49u

Definition at line 90 of file vctypes.h.

#define EVCT_GSMEFR 0x4Au

Definition at line 91 of file vctypes.h.

#define EVCT_GSMFR 0x4Bu

Definition at line 92 of file vctypes.h.

#define EVCT_G723_53 0x50u

Definition at line 93 of file vctypes.h.

#define EVCT_G723_63 0x51u

Definition at line 94 of file vctypes.h.

#define EVCT_FAX 0x80u

Definition at line 97 of file vctypes.h.

#define EVCT_DATA 0x90u

Definition at line 100 of file vctypes.h.

#define EVCT_MRU 0xB2u

Definition at line 103 of file vctypes.h.

#define EVCT_CSACELP_IS641 0xC1u

Definition at line 109 of file vctypes.h.


ECU Test: vctypes.h Source File

  • File List
  • Globals

vctypes.h

Go to the documentation of this file.
00001 #ifndef _VCTYPES_H
00002 #define _VCTYPES_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Generic Voice Coding Types.
00005  ******************************************************************************
00006  * FILE NAME:   vctypes.h
00007  *
00008  * DESCRIPTION: Contains definitions for the generic voice coding types.
00009  *              Defines VCT_ and EVCT_ constants.
00010  *
00011  *              NOTE: This file may be used by both Micro and DSP software.
00012  *
00013  * TABS: NONE
00014  *
00015  * $Id: vctypes.h 1.11 1999/11/19 22:56:56 DThomas Exp $
00016  *
00017  * REVISION HISTORY:
00018  *
00019  * $Log: vctypes.h $
00020  * Revision 1.11  1999/11/19 22:56:56  DThomas
00021  *  - Added GSM EFR.
00022  * Revision 1.10  1999/08/08 16:23:27  DThomas
00023  *  - Added voice type for G.729E.
00024  * Revision 1.9  1998/12/07 23:41:46  gsisli
00025  *   EVCT_G729AB and EVCT_G729A are both 0x44.
00026  * Revision 1.8  1998/11/06 22:43:31  gsisli
00027  *   G729AB is added as a new EVCT.
00028  * Revision 1.7  1997/09/03 16:03:48  BONAL
00029  *     G723 numbers are increased to have more space in between
00030  *     definitions.
00031  *     Some comment bug corrected.
00032  * Revision 1.6  1997/08/19 13:58:06  BONAL
00033  *    G.723 types corrected.
00034  * Revision 1.5  1997/08/19 13:54:55  BONAL
00035  *    Voice coding type for G.723 is added.
00036  * Revision 1.4  1997/05/12 10:35:14  bogdank
00037  *     - CSACELP types changed to G729
00038  *    CSACELP types changed to G729.
00039  * Revision 1.3  1997/01/30 12:31:04  BOGDANK
00040  *     - adding more CS-ACELP coding types, specifying better data/modem types
00041  *    Adding additional coding types for G.729.
00042  * Revision 1.2  1996/09/12 13:56:58  BOGDANK
00043  *    Adding EVCT_DATA for transparent mode PCM (data).
00044  * Revision 1.1  1996/09/10 10:58:01  BOGDANK
00045  * Initial revision
00046  *    Obtained from vctypes.h (1.5) in cominc.pj.
00047  *
00048  * (C) Copyright 1995, 1996, TELOGY Networks, Inc.
00049  *****************************************************************************/
00050
00051 /*--------------------------------------------------*/
00052 /* Voice Coding Types (Figure 5/G.764) ('000nnnnn') */
00053 /*--------------------------------------------------*/
00054
00055 /* Codings that are not listed are reserved for future use. */
00056 #define EVCT_INVALID        0xFFu   /* Invalid Codec - used for initialization */
00057 #define VCT_8BITS           0x00u   /* 8 bits/sample */
00058 #define VCT_1BITS           0x01u   /* 1 bit/sample  */
00059 #define VCT_2BITS           0x02u   /* 2 bits/sample */
00060 #define VCT_3BITS           0x03u   /* 3 bits/sample */
00061 #define VCT_4BITS           0x04u   /* 4 bits/sample */
00062 #define VCT_5BITS           0x05u   /* 5 bits/sample */
00063 #define VCT_6BITS           0x06u   /* 6 bits/sample */
00064 #define VCT_7BITS           0x07u   /* 7 bits/sample */
00065
00066 #define VCT_8APCM           0x08u   /* 8 bit A-law PCM */
00067 #define VCT_8MUPCM          0x09u   /* 8 bit mu-law PCM */
00068 #define VCT_2ADPCM          0x0Au   /* 2 bits/sample ADPCM (G.726) */
00069 #define VCT_3ADPCM          0x0Bu   /* 3 bits/sample ADPCM (G.726) */
00070 #define VCT_4ADPCM          0x0Cu   /* 4 bits/sample ADPCM (G.726) */
00071 #define VCT_5ADPCM          0x0Du   /* 5 bits/sample ADPCM (G.726) */
00072
00073 #define VCT_E4_2ADPCM       0x14u   /* (4,2) embedded ADPCM (G.727) */
00074 #define VCT_E5_2ADPCM       0x15u   /* (5,2) embedded ADPCM (G.727) */
00075
00076 #define VCT_E8_6ADPCM       0x18u   /* (8,6) embedded ADPCM (G.722) */
00077
00078 /*---------------------------------------------------------------------*/
00079 /* Extended Voice Coding Types (Fax, Modem, Voice Coders not in G.764) */
00080 /*---------------------------------------------------------------------*/
00081
00082 /* Voice Types ('010nnnnn') */
00083 #define EVCT_LDCELP_16K     0x42u       /* LD-CELP 16K (G.728) */
00084 #define EVCT_G729           0x43u       /* CS-ACELP 8K (G.729) */
00085 #define EVCT_CSACELP        EVCT_G729   /* obsolete! do not use it! */
00086 #define EVCT_G729A          0x44u       /* CS_ACELP 8K (G.729A) */
00087 #define EVCT_G729AB         0x44u       /* CS_ACELP 8K with int. vad (G.729AB)*/
00088 #define EVCT_G729E          0x45u       /* CS_ACELP 11.8K (G.729E) */
00089 #define EVCT_E2_2ADPCM      0x48u       /* (2,2) embedded ADPCM (G.727) */
00090 #define EVCT_E3_2ADPCM      0x49u       /* (3,2) embedded ADPCM (G.727) */
00091 #define EVCT_GSMEFR         0x4Au       /* GSM EFR                      */
00092 #define EVCT_GSMFR          0x4Bu       /* GSM FR                       */
00093 #define EVCT_G723_53        0x50u       /* G.723 at 5.3 kbits/s */
00094 #define EVCT_G723_63        0x51u       /* G.723 at 6.3 kbits/s */
00095
00096 /* Fax Types ('1000nnnn') */
00097 #define EVCT_FAX            0x80u   /* Fax */
00098
00099 /* Data Types ('1001nnnn') */
00100 #define EVCT_DATA           0x90u   /* Data - transparent 8-bit PCM */
00101
00102 /* Modem Relay Types ('1011nnnn') */
00103 #define EVCT_MRU            0xB2u   /* Modem Relay Unit */
00104
00105 /* Modem Types ('1011nnnn') */
00106 /* currently none of EVCT_MDM_xxx */
00107
00108 /* Non ITU Types ('110nnnnn') */
00109 #define EVCT_CSACELP_IS641  0xC1u   /* CS-ACELP 8K (TIAEIA IS641) */
00110
00111 /* TELOGY Types ('111nnnnn') */
00112 /* currently none of EVCT_TNI_xxx */
00113 #endif /* _VCTYPES_H */
00114 /* nothing past this point */


ECU Test: vheap.c File Reference

  • File List
  • Globals

vheap.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/ecu/test/src/vheap.h>

Include dependency graph for vheap.c:

Go to the source code of this file.

Variables

tword siu_voice_heap [SIU_VOICE_HEAP_SIZE]

Variable Documentation

tword siu_voice_heap[SIU_VOICE_HEAP_SIZE]

Definition at line 24 of file vheap.c.

Referenced by main().


ECU Test: vheap.c Source File

  • File List
  • Globals

vheap.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Voice heap.
00003  ******************************************************************************
00004  * FILE NAME:   vheap.c
00005  *
00006  * DESCRIPTION: Contains voice heap.
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: vheap.c 1.1 1997/07/14 15:32:25 BOGDANK Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: vheap.c $
00015  * Revision 1.1  1997/07/14 15:32:25  BOGDANK
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/ecu/test/src/vheap.h>
00023
00024 tword siu_voice_heap[SIU_VOICE_HEAP_SIZE];
00025 /* nothing past this point */


ECU Test: vheap.h File Reference

  • File List
  • Globals

vheap.h File Reference

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

Include dependency graph for vheap.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | SIU_VOICE_HEAP_SIZE 2048

Variables

tword | siu_voice_heap []

Define Documentation

#define SIU_VOICE_HEAP_SIZE 2048

Definition at line 27 of file vheap.h.

Referenced by main().

Variable Documentation

tword siu_voice_heap[]

Definition at line 24 of file vheap.c.

Referenced by main().


ECU Test: vheap.h Source File

  • File List
  • Globals

vheap.h

Go to the documentation of this file.
00001 #ifndef _VHEAP_H
00002 #define _VHEAP_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Voice heap definitions.
00005  ******************************************************************************
00006  * FILE NAME:   vheap.h
00007  *
00008  * DESCRIPTION: Contains voice heap definitions.
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: vheap.h 1.2 1998/10/22 14:15:55 DLI Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: vheap.h $
00017  * Revision 1.2  1998/10/22 14:15:55  DLI
00018  *   - voice heap size was increased  to 2K because of delay-line
00019  * Revision 1.1  1997/07/14 15:32:25  BOGDANK
00020  * Initial revision
00021  *
00022  * (C) Copyright 1997, TELOGY Networks, Inc.
00023  *****************************************************************************/
00024
00025 #include <ti/mas/types/types.h>
00026
00027 #define SIU_VOICE_HEAP_SIZE  2048    /* 1024 */
00028 extern tword siu_voice_heap[];
00029
00030 #endif  /* _VHEAP_H */
00031 /* nothing past this point */


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 (5)
#define | ti_mas_nmu_Version_XVERTICAL (0)
#define | ti_mas_nmu_Version_PATCH (0)
#define | ti_mas_nmu_Version_BUILD (2)
#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 (5)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_nmu_Version_BUILD (2)

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 (5)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_nmu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_nmu_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_nmu_Version_BUILD (2)
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.5.0.2

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.

  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)
  5. ti.mas.iface.ifnmu (Generic interface)
  6. ti.xdais (xDAIS interface)

CID Required Packages
Package | File Name
ti.mas.nmu | ti_mas_nmu_<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
ti.mas.iface.ifnmu | ti_mas_iface_ifnmu_<fmt>_c<rtarg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


NMU: NMU Integration

NMU (Noise Matching Unit) Package

NMU Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
    • xDAIS Developers Kit
    • XDC Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the NMU root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the NMU makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.
  4. Ensure the path to xDAIS (XDAIS_INSTALL_DIR) within the NMU root makefile is set correctly (do one of the following):
    • Modify the xDAIS path within the NMU makefile.
    • Set the xDAIS path via the environment variable XDAIS_GEN_INSTALL_DIR.
  5. Ensure the path to the XDC Tools (XDC_INSTALL_DIR) within the NMU root makefile is set correctly (do one of the following):
    • Modify the XDC Tools path within the NMU makefile.
    • Set the XDC Tools path via the environment variable XDC_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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.

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\nmu\c<starg>\nmu_a.a<starg>
  4. ti\mas\nmu\c<starg>\nmu_c.a<starg>

Structures Requiring Initialization

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
  4. C66x Target
    • C66x NMU Data Memory Requirements
    • C66x 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 | 14.56 | 15.81 | Core NMU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C66x Target

C66x 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 | 498 | 490
data/bss | 328 | 160

C66x NMU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 14.88 | 16.22 | 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
  • C66x 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)

C55x NMU MCPS
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.

C64x/C64x+ NMU MCPS
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

C66x Targets

Profiling was performed on a TI C6678 EVM. For placement, refer to the individual .map files. Cycles information for every frame can be found in the file test\logs\cycles.txt generated by running the image.

C66x NMU MIPS
Image Name | NMUTX |  | NMURX
 | Peak (MCPS) | Average (MCPS) | Peak (MCPS) | Average (MCPS)
test_rel_C6678 | 1.12 | 0.36 | 0.35 | 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 Test: Data Structures

  • Data Structures
  • Data Fields

NMU 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 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 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 Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


NMU 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 Test: File Index

  • File List
  • Globals

NMU 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 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 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 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 -

  • nmu_SIM_INPUT_FNAME : test.c
  • nmu_SIM_LOGAZ_FNAME : test.c
  • nmu_SIM_LOGCYC_FNAME : test.c
  • nmu_SIM_LOGSID_FNAME : test.c
  • nmu_SIM_OUTPUT_FNAME : test.c
  • 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 Test: Data Fields

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

  • align : mem.c
  • MAX_FRAME_SIZE : test.c
  • nmu_SIM_INPUT_FNAME : test.c
  • nmu_SIM_LOGAZ_FNAME : test.c
  • nmu_SIM_LOGCYC_FNAME : test.c
  • nmu_SIM_LOGSID_FNAME : test.c
  • nmu_SIM_OUTPUT_FNAME : 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 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 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 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 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 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 | nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"
#define | nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"
#define | nmu_SIM_LOGAZ_FNAME "../../logs/Az.csv"
#define | nmu_SIM_LOGSID_FNAME "../../logs/SID.csv"
#define | nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"
#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 nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"

Definition at line 70 of file test.c.

Referenced by siu_open().

#define nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"

Definition at line 71 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGAZ_FNAME "../../logs/Az.csv"

Definition at line 72 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGSID_FNAME "../../logs/SID.csv"

Definition at line 73 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"

Definition at line 74 of file test.c.

Referenced by siu_open().

#define SIU_MAX_ERR_MSG_STRING_LENGTH 100

Definition at line 352 of file test.c.

#define NMUTX_ID 1

Definition at line 363 of file test.c.

Referenced by siu_new_open_config_modules().

#define NMURX_ID 2

Definition at line 364 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 196 of file test.c.

References siuInst_s::AzFilePtr, siuInst_s::cyclesOverhead, siuInst_s::inFrameFilePtr, siuInst_s::inFrameInitialSilenceFrames, nmu_SIM_INPUT_FNAME, nmu_SIM_LOGAZ_FNAME, nmu_SIM_LOGCYC_FNAME, nmu_SIM_LOGSID_FNAME, nmu_SIM_OUTPUT_FNAME, 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 265 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 281 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 307 of file test.c.

Referenced by siu_new_open_config_modules().

char* siuGetMsg | ( | msgTable_t * | tbl,
 |  | tuint | size,
 |  | tuint | msgCode
 | ) |  |

Definition at line 371 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 384 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 437 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 752 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 990 of file test.c.

References siuInst_s::inFrameFilePtr, and siuInst.

Referenced by main().

tint siu_write_outFrame | ( | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 1011 of file test.c.

References siuInst_s::outFrameFilePtr, and siuInst.

Referenced by main().

void hw_init ( void )

Definition at line 1022 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 1041 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 108 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 194 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 317 of file test.c.

msgTable_t nmuTxExceptions[]

Initial value:

 {
  nmutx_E1
}

Definition at line 330 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 334 of file test.c.

msgTable_t nmuRxExceptions[]

Initial value:

 {
  nmurx_E1
}

Definition at line 348 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 366 of file test.c.

Referenced by siu_debug_info().

linSample inFrame[MAX_FRAME_SIZE]

Definition at line 1039 of file test.c.

linSample outFrame[MAX_FRAME_SIZE]

Definition at line 1039 of file test.c.


NMU 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 into CCSV5 and build. All projects will reside in the nmu\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main NMU documentation.

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.X or above and may be used for those who haven't yet upgraded to CCS v4.X or above.

  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.X or above
  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 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 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 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 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 Test: Module Index

NMU Test Modules

Here is a list of all modules:
  • NMUVADTEST


NMU Test: Page Index

NMU Test Related Pages

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


NMU Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the nmu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_NMU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all NMU component Unit Test CCS projects in the nmu\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the nmu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_NMU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all NMU component Unit Test CCS projects in the nmu\test\ccsProjects directory such that they will load and build with CCS version 4.2


NMU Test: config_s Struct Reference

  • Data Structures
  • Data Fields

config_s Struct Reference
[NMUVADTEST]

Detailed Description

global test configuration structure definition

Definition at line 80 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 81 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 83 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 87 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 89 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 91 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 95 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 96 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 97 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 98 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 Test: cycles_s Struct Reference

  • Data Structures
  • Data Fields

cycles_s Struct Reference
[NMUVADTEST]

Detailed Description

for accumulation of cycle statistics

Definition at line 148 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

running maximum of cycles

Definition at line 149 of file test.c.

tlong cycles_s::avg

running average of cycles (using exponential averaging)

Definition at line 150 of file test.c.

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


NMU Test: msgTable_t Struct Reference

  • Data Structures
  • Data Fields

msgTable_t Struct Reference
[NMUVADTEST]

Detailed Description

Definition at line 312 of file test.c.

Data Fields

tuint | msgCode
char | msgString [200]

Field Documentation

tuint msgTable_t::msgCode

Definition at line 313 of file test.c.

char msgTable_t::msgString[200]

Definition at line 314 of file test.c.

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


NMU 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 354 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 355 of file test.c.

char msgTables_t::name[SIU_MAX_ERR_MSG_STRING_LENGTH]

Definition at line 356 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::warnTbl

Definition at line 357 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeWarnTbl

Definition at line 358 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::excTbl

Definition at line 359 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeExcTbl

Definition at line 360 of file test.c.

Referenced by siu_debug_info().

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


NMU 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 165 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 166 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 167 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 168 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 169 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 170 of file test.c.

Referenced by siu_new_open_config_modules().

IALG_Handle siuInst_s::nmurxXdaisInst

nmurx's XDAIS instance

Definition at line 171 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

tlong siuInst_s::frameCount

Definition at line 172 of file test.c.

Referenced by main(), and siu_process_txrx().

tlong siuInst_s::prevSIDframeCount

Definition at line 173 of file test.c.

Referenced by siu_process_txrx().

FILE* siuInst_s::inFrameFilePtr

Definition at line 174 of file test.c.

Referenced by siu_close(), siu_open(), and siu_read_inFrame().

FILE* siuInst_s::outFrameFilePtr

Definition at line 175 of file test.c.

Referenced by siu_close(), siu_open(), and siu_write_outFrame().

FILE* siuInst_s::AzFilePtr

Definition at line 179 of file test.c.

Referenced by siu_close(), and siu_open().

FILE* siuInst_s::SIDfilePtr

Definition at line 180 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process_txrx().

tint siuInst_s::inFrameInitialSilenceFrames

Definition at line 181 of file test.c.

Referenced by main(), and siu_open().

tlong siuInst_s::cyclesOverhead

to measure fixed overhead in cycle measurement

Definition at line 182 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesVau

Vau's cycle statistics

Definition at line 183 of file test.c.

Referenced by siu_process_txrx().

cycles_t siuInst_s::cyclesNmuTx

NMU Tx's cycles statistics

Definition at line 184 of file test.c.

Referenced by siu_process_txrx().

cycles_t siuInst_s::cyclesNmuRx

NMU Rx's cycles statistics

Definition at line 185 of file test.c.

tint siuInst_s::isVoice

set to 1 if voice frame post nmutx, else 0

Definition at line 186 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 187 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 188 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 189 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 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 Test: vauSim_s Struct Reference

  • Data Structures
  • Data Fields

vauSim_s Struct Reference
[NMUVADTEST]

Detailed Description

Definition at line 154 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 158 of file test.c.

Referenced by siu_process_txrx().

ISPHENC1_FrameType vauSim_s::state

SPEECH or NO_DATA

Definition at line 159 of file test.c.

Referenced by siu_open(), and siu_process_txrx().

tbool vauSim_s::vadAlertFlag

whether or not voice alert

Definition at line 160 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 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 | nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"
#define | nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"
#define | nmu_SIM_LOGAZ_FNAME "../../logs/Az.csv"
#define | nmu_SIM_LOGSID_FNAME "../../logs/SID.csv"
#define | nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"
#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 155 of file test.c.

Referenced by siu_process_txrx().

#define SIU_VAU_ALERT_IN_FRAMES 8

Definition at line 157 of file test.c.

Referenced by siu_process_txrx().


NMU 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
00062 /* Handle CCS Project paths */
00063 #ifdef  __CCS_PROJECT_REL_PATH
00064 #define nmu_SIM_INPUT_FNAME        "../../../vectors/inp/in.raw"
00065 #define nmu_SIM_OUTPUT_FNAME       "../../../vectors/out/out.raw"
00066 #define nmu_SIM_LOGAZ_FNAME        "../../../logs/Az.csv"
00067 #define nmu_SIM_LOGSID_FNAME       "../../../logs/SID.csv"
00068 #define nmu_SIM_LOGCYC_FNAME       "../../../logs/cycles.txt"
00069 #else
00070 #define nmu_SIM_INPUT_FNAME        "../../vectors/inp/in.raw"
00071 #define nmu_SIM_OUTPUT_FNAME       "../../vectors/out/out.raw"
00072 #define nmu_SIM_LOGAZ_FNAME        "../../logs/Az.csv"
00073 #define nmu_SIM_LOGSID_FNAME       "../../logs/SID.csv"
00074 #define nmu_SIM_LOGCYC_FNAME       "../../logs/cycles.txt"
00075 #endif
00076
00077
00080 typedef struct config_s {
00081   tbool     xdaisFlag;
00083   tbool     xdaisDefaultCfgFlag;
00087   tint      frameSize;
00089   tint      vauBypass;
00091   tint      allNoiseAfterFirstVoice2Noise;
00095   ifvauConfig_t vauConfig;
00096   ifvauControl_t vauControl;
00097   ifnmutxConfig_t nmutxConfig;
00098   ifnmurxConfig_t nmurxConfig;
00099 #ifdef USE_CACHE
00100   tint  doCacheFlush;
00101   tint  doCacheEnable;
00102 #endif
00103 } config_t;
00104
00108 config_t  config = {
00109   1,  /* xdaisFlag */
00110   0,  /* don't use default configuration for xdais */
00111   80,                           /* 10 ms default frame size */
00112   0,                            /* do not bypass VAU */
00113   0,                            /* no setting permanently to noise after first
00114                                    transition */
00115
00116   /* vauConfig */
00117   {
00118    ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
00119    ifvau_TYPE_ADAPTIVE,
00120    0,
00121    180},
00122
00123   /* vauControl */
00124   {
00125    ifvau_VALID_CONTROL,
00126    ifvau_ENABLE},
00127
00128   /* nmutxConfig */
00129   {
00130    ifnmutx_CONFIG_VALID_NOISE_MODE | ifnmutx_CONFIG_VALID_NOISE_LP_ORDER,
00131    ifnmutx_CONFIG_NOISE_MODE_G711A2,
00132    ifnmutx_CONFIG_MAX_LP_ORDER,
00133    },
00134
00135   /* nmurxConfig */
00136   {
00137    ifnmurx_CONFIG_VALID_NOISE_MODE | ifnmurx_CONFIG_VALID_NOISE_LP_ORDER,
00138    ifnmurx_CONFIG_NOISE_MODE_G711A2,
00139    ifnmurx_CONFIG_MAX_LP_ORDER,
00140    }
00141 #ifdef USE_CACHE
00142  ,1, /* doCacheFlush */
00143   1  /* doCacheEnable */
00144 #endif
00145 };
00146
00148 typedef struct cycles_s {
00149   tlong     max;
00150   tlong     avg;
00151 } cycles_t;
00152
00153
00154 typedef struct vauSim_s {
00155 #define SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES 15
00157 #define SIU_VAU_ALERT_IN_FRAMES 8
00158   tint      countOnOff;
00159   ISPHENC1_FrameType state;
00160   tbool     vadAlertFlag;
00161 } vauSim_t;
00162
00165 typedef struct siuInst_s {
00166   void     *vauInst;
00167   IALG_Handle vauXdaisInst;
00168   void     *nmutxInst;
00169   IALG_Handle nmutxXdaisInst;
00170   void     *nmurxInst;
00171   IALG_Handle nmurxXdaisInst;
00172   tlong     frameCount;
00173   tlong     prevSIDframeCount;
00174   FILE     *inFrameFilePtr;
00175   FILE     *outFrameFilePtr;
00176 #ifdef PROFILE_CYCLES
00177   FILE   *outCyclesFilePtr;
00178 #endif
00179   FILE     *AzFilePtr;
00180   FILE     *SIDfilePtr;
00181   tint      inFrameInitialSilenceFrames;
00182   tlong     cyclesOverhead;
00183   cycles_t  cyclesVau;
00184   cycles_t  cyclesNmuTx;
00185   cycles_t  cyclesNmuRx;
00186   tint      isVoice;
00187   tuint     numSIDs;
00188   vauSim_t  vauSim;
00189   tulong   xdaisBufsMallocFreeCounter;
00192 } siuInst_t;
00193
00194 siuInst_t siuInst;
00195
00196 void siu_open(void)
00197 {
00198 #ifdef PROFILE_CYCLES
00199   volatile tlong cycles;
00200 #endif
00201
00202   memset(&siuInst, 0, sizeof(siuInst_t));
00203
00204   siu_init_heaps();
00205
00206   if ((siuInst.inFrameFilePtr = fopen(nmu_SIM_INPUT_FNAME, "rb")) == NULL) {
00207     printf(" Error opening in.raw\n");
00208     exit(0);
00209   }
00210
00211   if ((siuInst.outFrameFilePtr = fopen(nmu_SIM_OUTPUT_FNAME, "wb")) == NULL) {
00212     printf(" Error opening out.raw\n");
00213     exit(0);
00214   }
00215
00216   if ((siuInst.AzFilePtr = fopen(nmu_SIM_LOGAZ_FNAME, "wt")) == NULL) {
00217     printf(" Error opening Az.csv\n");
00218     exit(0);
00219   }
00220
00221   if ((siuInst.SIDfilePtr = fopen(nmu_SIM_LOGSID_FNAME, "wt")) == NULL) {
00222     printf(" Error opening SID.csv\n");
00223     exit(0);
00224   }
00225
00226   siuInst.inFrameInitialSilenceFrames = SIU_INITIAL_SILENCE_FRAMES;
00227
00228   siuInst.vauSim.state = ISPHENC1_FTYPE_SPEECH;
00229   siuInst.vauSim.vadAlertFlag = FALSE;
00230
00231   /* measure measurement overhead of cycles */
00232
00233 #ifdef PROFILE_CYCLES
00234   if ((siuInst.outCyclesFilePtr = fopen (nmu_SIM_LOGCYC_FNAME, "wt")) == NULL) {
00235     printf (" Error opening cycles.txt\n");
00236     exit(0);
00237   }
00238   cycles = profile_getCPUcycleCount();
00239 #endif
00240
00241 #ifdef PROFILE_CYCLES
00242   cycles = (profile_getCPUcycleCount() - cycles);
00243   siuInst.cyclesOverhead = cycles;
00244 #endif
00245
00246 }
00247
00248 #ifdef PROFILE_CYCLES
00249 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00250                                          tlong overhead)
00251 {
00252   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00253          (long) cyclesPtr->max - (long) overhead,
00254          (long) cyclesPtr->avg - (long) overhead);
00255 }
00256
00257 void siu_print_cycles(void)
00258 {
00259   siu_print_cycles_util(&siuInst.cyclesVau, "Vau", siuInst.cyclesOverhead);
00260   siu_print_cycles_util(&siuInst.cyclesNmuTx, "Nmu Tx", siuInst.cyclesOverhead);
00261   siu_print_cycles_util(&siuInst.cyclesNmuRx, "Nmu Rx", siuInst.cyclesOverhead);
00262 }
00263 #endif
00264
00265 void siu_dealloc_ialg_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
00266 {
00267   Int nbufs;
00268   IALG_MemRec *xdaisBufsPtr;
00269
00270   nbufs = ialgFxnsPtr->algNumAlloc();
00271   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00272
00273   nbufs = ialgFxnsPtr->algFree(xdaisInstPtr, xdaisBufsPtr);
00274
00275   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00276
00277   free(xdaisBufsPtr);
00278 }
00279
00280
00281 void siu_close(void)
00282 {
00283   fclose(siuInst.inFrameFilePtr);
00284   fclose(siuInst.outFrameFilePtr);
00285   fclose(siuInst.AzFilePtr);
00286   fclose(siuInst.SIDfilePtr);
00287   printf(" Number of SIDs = %d\n", siuInst.numSIDs);
00288
00289 #ifdef PROFILE_CYCLES
00290   fclose(siuInst.outCyclesFilePtr);
00291   siu_print_cycles();
00292   profile_closeCycleProfiling();
00293 #endif
00294
00295   if (config.xdaisFlag) {
00296     siu_dealloc_ialg_mem (&nmurxXdaisCallTable.ialg, siuInst.nmurxXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00297     siu_dealloc_ialg_mem (&nmutxXdaisCallTable.ialg, siuInst.nmutxXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00298     siu_dealloc_ialg_mem (&vauXdaisCallTable.ialg, siuInst.vauXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00299     if (siuInst.xdaisBufsMallocFreeCounter) {
00300       printf(" Error: mismatched malloc-free\n");
00301     }
00302   }
00303
00304   memset(&siuInst, 0, sizeof(siuInst_t));
00305 }
00306
00307 tuint siu_pvp_control(tuint ID)
00308 {
00309   return (1);
00310 }
00311
00312 typedef struct {
00313  tuint msgCode;
00314  char  msgString[200];
00315 } msgTable_t;
00316
00317 msgTable_t nmuTxWarnings[] = {
00318   nmutx_W1,
00319   nmutx_W2,
00320   nmutx_W3,
00321   nmutx_W4,
00322   nmutx_W5,
00323   nmutx_W6,
00324   nmutx_W7,
00325   nmutx_W8,
00326   nmutx_W9,
00327   nmutx_W10
00328 };
00329
00330 msgTable_t nmuTxExceptions[] = {
00331   nmutx_E1
00332 };
00333
00334 msgTable_t nmuRxWarnings[] = {
00335   nmurx_W1,
00336   nmurx_W2,
00337   nmurx_W3,
00338   nmurx_W4,
00339   nmurx_W5,
00340   nmurx_W6,
00341   nmurx_W7,
00342   nmurx_W8,
00343   nmurx_W9,
00344   nmurx_W10,
00345   nmurx_W11
00346 };
00347
00348 msgTable_t nmuRxExceptions[] = {
00349   nmurx_E1
00350 };
00351
00352 #define SIU_MAX_ERR_MSG_STRING_LENGTH 100
00353
00354 typedef struct {
00355   tuint ID;
00356   char  name[SIU_MAX_ERR_MSG_STRING_LENGTH];
00357   msgTable_t *warnTbl;
00358   tuint sizeWarnTbl;
00359   msgTable_t *excTbl;
00360   tuint sizeExcTbl;
00361 } msgTables_t;
00362
00363 #define NMUTX_ID 1
00364 #define NMURX_ID 2
00365
00366 msgTables_t msgTables[] = {
00367   {NMUTX_ID, "nmuTx", nmuTxWarnings, sizeof(nmuTxWarnings)/sizeof(msgTable_t), nmuTxExceptions, sizeof(nmuTxExceptions)/sizeof(msgTable_t)},
00368   {NMURX_ID, "nmuRx", nmuRxWarnings, sizeof(nmuRxWarnings)/sizeof(msgTable_t), nmuRxExceptions, sizeof(nmuRxExceptions)/sizeof(msgTable_t)},
00369 };
00370
00371 char *siuGetMsg(msgTable_t *tbl, tuint size, tuint msgCode)
00372 {
00373   int i;
00374   for (i = 0; i < size; i++) {
00375     if (tbl[i].msgCode == msgCode) {
00376       return(tbl[i].msgString);
00377     }
00378   }
00379   printf(" Fatal: Table entry not found\n");
00380   exit(0);
00381   return(NULL);
00382 }
00383
00384 void siu_debug_info(void * inID, tuint msgType, tuint msgCode, tuint msgLength,
00385                     tuint * supportingData)
00386 {
00387   int i;
00388   int doExit = 0, found;
00389   msgTables_t *msgTblPtr;
00390   tuint ID = *((tuint *) inID);
00391
00392   for (i = 0, found = 0; i < sizeof(msgTables)/sizeof(msgTables_t); i++) {
00393     if (msgTables[i].ID == ID) {
00394       found = 1;
00395       msgTblPtr = &msgTables[i];
00396     }
00397   }
00398
00399   if (! found) {
00400      printf("Message from unknown module of ID %d received, quitting..\n", ID);
00401      exit(0);
00402   }
00403
00404   printf("%s :", msgTblPtr->name);
00405
00406   switch (msgType) {
00407     case  dbg_TRACE_INFO:
00408       printf("Trace Info: ");
00409     break;
00410     case dbg_WARNING:
00411       printf("Warning in ");
00412       printf("%s\n",siuGetMsg(msgTblPtr->warnTbl, msgTblPtr->sizeWarnTbl, msgCode));
00413     break;
00414     case dbg_EXCEPTION_FATAL:
00415       printf("Exception: ");
00416       printf("%s\n",siuGetMsg(msgTblPtr->excTbl, msgTblPtr->sizeExcTbl, msgCode));
00417       doExit = 1;
00418     break;
00419     default:
00420       printf(" Invalid diagnostic message, exiting..");
00421     break;
00422   }
00423
00424   if (msgLength) {
00425     printf("\nSupporting Data: ");
00426     for (i = 0; i < msgLength; i++) {
00427       printf("%d\n",supportingData[i]);
00428     }
00429   }
00430
00431   if (doExit) {
00432     printf("\n Exiting.. ");
00433     exit(0);
00434   }
00435 }
00436
00437 void siu_new_open_config_modules(config_t * config)
00438 {
00439   tint      nbufs, ret;
00440   const ecomemBuffer_t *sizeBufs;
00441   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00442   const IALG_Params *paramsPtr;
00443   IALG_MemRec *xdaisBufsPtr;
00444
00445   vauSizeConfig_t vauSizeCfg;
00446   vauOpenConfig_t vauOpenCfg;
00447
00448   vauXdaisInitParams_t vauXdaisInitParams;
00449
00450   nmutxSizeConfig_t nmutxSizeCfg;
00451   nmutxNewConfig_t nmutxNewCfg;
00452   nmutxOpenConfig_t nmutxOpenCfg;
00453
00454   nmutxXdaisAllocParams_t nmutxXdaisAllocParams;
00455   nmutxXdaisInitParams_t nmutxXdaisInitParams;
00456
00457   nmurxSizeConfig_t nmurxSizeCfg;
00458   nmurxNewConfig_t nmurxNewCfg;
00459   nmurxOpenConfig_t nmurxOpenCfg;
00460
00461   nmurxXdaisAllocParams_t nmurxXdaisAllocParams;
00462   nmurxXdaisInitParams_t nmurxXdaisInitParams;
00463
00464   vauXdaisInitParams.param.size = (Int) sizeof(vauXdaisInitParams_t);
00465
00466   nmutxXdaisAllocParams.param.size = (Int) sizeof(nmutxXdaisAllocParams_t);
00467   nmutxXdaisInitParams.param.size = (Int) sizeof(nmutxXdaisInitParams_t);
00468
00469   nmurxXdaisAllocParams.param.size = (Int) sizeof(nmurxXdaisAllocParams_t);
00470   nmurxXdaisInitParams.param.size = (Int) sizeof(nmurxXdaisInitParams_t);
00471
00472   printf("Querying VAU Memory Requirements\n");
00473
00474   vauSizeCfg.max_frame_size = config->frameSize;
00475   vauSizeCfg.max_sampling_rate_8k_multiple = vau_SAMP_RATE_8KHZ;
00476
00477   if (config->xdaisFlag) {
00478     nbufs = (tint) vauXdaisCallTable.ialg.algNumAlloc();
00479     if (nbufs == 0) {
00480       printf(" algNumAlloc error, exiting\n");
00481       exit(0);
00482     }
00483
00484     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00485     if (xdaisBufsPtr == NULL) {
00486       printf("Not enough heap for VAU memory records, exiting\n");
00487       exit(0);
00488     }
00489     if (config->xdaisDefaultCfgFlag) {
00490       paramsPtr = NULL;
00491     }
00492     else {
00493       /* currently no config supported in vau for alloc, but if introduce in
00494          future, refer to that configuration */
00495       paramsPtr = NULL;
00496     }
00497     vauXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00498   }
00499   else {
00500     if (vauGetSizes(&nbufs, &sizeBufs, &vauSizeCfg) != vau_NOERR) {
00501       printf(" Vau get sizes error, exiting \n");
00502       exit(0);
00503     }
00504   }
00505
00506   printf("Allocating VAU memory \n");
00507
00508   if (config->xdaisFlag) {
00509     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00510     siuInst.vauXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00511   }
00512   else {
00513     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00514   }
00515
00516   vauOpenCfg.frame_size = config->frameSize;
00517   vauOpenCfg.sampling_rate_8k_multiple = vau_SAMP_RATE_8KHZ;
00518   vauOpenCfg.config = config->vauConfig;
00519
00520   if (config->xdaisFlag) {
00521     if (config->xdaisDefaultCfgFlag) {
00522       paramsPtr = NULL;
00523     }
00524     else {
00525       vauXdaisInitParams.cfgOpen = vauOpenCfg;
00526       paramsPtr = (IALG_Params *) &vauXdaisInitParams;
00527     }
00528     ret = vauXdaisCallTable.ialg.algInit(siuInst.vauXdaisInst,
00529                                    xdaisBufsPtr, NULL, paramsPtr);
00530
00531     free(xdaisBufsPtr);
00532
00533     if (ret == IALG_EFAIL) {
00534       printf("algInit() failure, exiting\n");
00535       exit(0);
00536     }
00537   }
00538   else {
00539     if (vauNew(&(siuInst.vauInst), nbufs, ecoBufs) != vau_NOERR) {
00540       printf(" Vau New error, exiting \n");
00541       exit(0);
00542     }
00543     vauOpen(siuInst.vauInst, &vauOpenCfg);
00544   }
00545
00546   if (config->xdaisFlag) {
00547     vauXdaisCallTable.control (siuInst.vauXdaisInst, &(config->vauConfig), &(config->vauControl));
00548   }
00549   else {
00550     vauControl(siuInst.vauInst, &(config->vauConfig), &(config->vauControl));
00551   }
00552
00553   printf("Querying NMU Tx Memory Requirements\n");
00554
00555   /* nmu Tx */
00556   nmutxSizeCfg.config = config->nmutxConfig;
00557
00558   if (config->xdaisFlag) {
00559     nbufs = (tint) nmutxXdaisCallTable.ialg.algNumAlloc();
00560     if (nbufs == 0) {
00561       printf(" algNumAlloc error, exiting\n");
00562       exit(0);
00563     }
00564
00565     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00566     if (xdaisBufsPtr == NULL) {
00567       printf("Not enough heap for nmu tx memory records, exiting\n");
00568       exit(0);
00569     }
00570     if (config->xdaisDefaultCfgFlag) {
00571       paramsPtr = NULL;
00572     }
00573     else {
00574       nmutxXdaisAllocParams.cfg = nmutxSizeCfg;
00575       paramsPtr = (IALG_Params *) &nmutxXdaisAllocParams;
00576     }
00577     nmutxXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00578   }
00579   else {
00580     if (nmutxGetSizes(&nbufs, &sizeBufs, &nmutxSizeCfg) != nmutx_NOERR) {
00581       printf(" Nmu Tx get sizes error, exiting \n");
00582       exit(0);
00583     }
00584   }
00585
00586   printf("Allocating NMU Tx memory \n");
00587
00588   if (config->xdaisFlag) {
00589     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00590     siuInst.nmutxXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00591   }
00592   else {
00593     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00594   }
00595
00596   nmutxNewCfg.ID = NMUTX_ID;
00597   nmutxNewCfg.debugInfo = siu_debug_info;
00598   nmutxNewCfg.sizeCfg = nmutxSizeCfg;
00599   nmutxNewCfg.isSidAllowed = siu_pvp_control;
00600   nmutxNewCfg.g711a2TxProcessDecimateInterval =
00601       nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS;
00602   nmutxOpenCfg.level_format = nmutx_LEVEL_FORMAT_dBov;
00603   nmutxOpenCfg.frame_size = config->frameSize;
00604   nmutxOpenCfg.config = config->nmutxConfig;
00605
00606   if (config->xdaisFlag) {
00607     if (config->xdaisDefaultCfgFlag) {
00608       paramsPtr = NULL;
00609     }
00610     else {
00611       nmutxXdaisInitParams.cfgNew = nmutxNewCfg;
00612       nmutxXdaisInitParams.cfgOpen = nmutxOpenCfg;
00613       paramsPtr = (IALG_Params *) &nmutxXdaisInitParams;
00614     }
00615     ret = nmutxXdaisCallTable.ialg.algInit(siuInst.nmutxXdaisInst,
00616                                    xdaisBufsPtr, NULL, paramsPtr);
00617
00618     free(xdaisBufsPtr);
00619
00620     if (ret == IALG_EFAIL) {
00621       printf("algInit() failure, exiting\n");
00622       exit(0);
00623     }
00624   }
00625   else {
00626     if (nmutxNew(&siuInst.nmutxInst, nbufs, ecoBufs, &nmutxNewCfg) != nmutx_NOERR) {
00627       printf(" Nmu Tx New error, exiting \n");
00628       exit(0);
00629     }
00630
00631     nmutxOpen(siuInst.nmutxInst, &nmutxOpenCfg);
00632   }
00633
00634   /* although control is not necessary to exercise here, it is good to test to
00635      see if it does not produce side effects, real test is to issue
00636      control during frame processing */
00637   if (config->xdaisFlag) {
00638     nmutxXdaisCallTable.control (siuInst.nmutxXdaisInst, &(config->nmutxConfig));
00639   }
00640   else {
00641     nmutxControl(siuInst.nmutxInst, &(config->nmutxConfig));
00642   }
00643
00644   printf("Querying NMU Rx Memory Requirements\n");
00645
00646   nmurxSizeCfg.config = config->nmurxConfig;
00647
00648   if (config->xdaisFlag) {
00649     nbufs = (tint) nmurxXdaisCallTable.ialg.algNumAlloc();
00650     if (nbufs == 0) {
00651       printf(" algNumAlloc error, exiting\n");
00652       exit(0);
00653     }
00654
00655     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00656     if (xdaisBufsPtr == NULL) {
00657       printf("Not enough heap for nmu rx memory records, exiting\n");
00658       exit(0);
00659     }
00660     if (config->xdaisDefaultCfgFlag) {
00661       paramsPtr = NULL;
00662     }
00663     else {
00664       nmurxXdaisAllocParams.cfg = nmurxSizeCfg;
00665       paramsPtr = (IALG_Params *) &nmurxXdaisAllocParams;
00666     }
00667     nmurxXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00668   }
00669   else {
00670     /* nmu Rx */
00671     if (nmurxGetSizes(&nbufs, &sizeBufs, &nmurxSizeCfg) != nmurx_NOERR) {
00672       printf(" Nmu Rx get sizes error, exiting \n");
00673       exit(0);
00674     }
00675   }
00676
00677   printf("Allocating NMU Rx memory \n");
00678
00679   if (config->xdaisFlag) {
00680     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00681     siuInst.nmurxXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00682   }
00683   else {
00684     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00685   }
00686
00687   nmurxNewCfg.ID = NMURX_ID;
00688   nmurxNewCfg.debugInfo = siu_debug_info;
00689   nmurxNewCfg.sizeCfg = nmurxSizeCfg;
00690   nmurxOpenCfg.level_format = nmurx_LEVEL_FORMAT_dBov;
00691   nmurxOpenCfg.frame_size = config->frameSize;
00692   nmurxOpenCfg.config = config->nmurxConfig;
00693
00694   if (config->xdaisFlag) {
00695     if (config->xdaisDefaultCfgFlag) {
00696       paramsPtr = NULL;
00697     }
00698     else {
00699       nmurxXdaisInitParams.cfgNew = nmurxNewCfg;
00700       nmurxXdaisInitParams.cfgOpen = nmurxOpenCfg;
00701       paramsPtr = (IALG_Params *) &nmurxXdaisInitParams;
00702     }
00703     ret = nmurxXdaisCallTable.ialg.algInit(siuInst.nmurxXdaisInst,
00704                                    xdaisBufsPtr, NULL, paramsPtr);
00705
00706     free(xdaisBufsPtr);
00707
00708     if (ret == IALG_EFAIL) {
00709       printf("algInit() failure, exiting\n");
00710       exit(0);
00711     }
00712   }
00713   else {
00714     if (nmurxNew(&siuInst.nmurxInst, nbufs, ecoBufs, &nmurxNewCfg) != nmurx_NOERR) {
00715       printf(" Nmu Rx New error, exiting \n");
00716       exit(0);
00717     }
00718
00719     nmurxOpen(siuInst.nmurxInst, &nmurxOpenCfg);
00720   }
00721
00722   /* although control is not necessary to exercise here, it is good to test to
00723      see if it does not produce side effects, real test is to issue
00724      control during frame processing */
00725   if (config->xdaisFlag) {
00726     nmurxXdaisCallTable.control (siuInst.nmurxXdaisInst, &(config->nmurxConfig));
00727   }
00728   else {
00729     nmurxControl(siuInst.nmurxInst, &(config->nmurxConfig));
00730   }
00731 }
00732
00733 #ifdef PROFILE_CYCLES
00734 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00735 {
00736   if (cycles > cyclesPtr->max) {
00737     cyclesPtr->max = cycles;
00738   }
00739
00740   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00741 }
00742 #endif
00743
00744 #ifdef AZ_INFO_AVAILABLE
00745 extern tint glob_Az[];
00746 #endif
00747
00748 #if 0
00749 int       nmurxCount = 1;
00750 #endif
00751
00752 void siu_process_txrx(linSample * framePtr, linSample ** outFramePtr)
00753 {
00754   linSample *vauOutSamplesPtr = *outFramePtr;
00755   ISPHENC1_FrameType vauFrameType;
00756   tword *nmutxOutCwseg;
00757   tint  nmutxOutCwsegSize;
00758   ISPHDEC1_FrameType nmu_rx_frame_type;
00759   tint      i;
00760   tword    *cwseg;
00761   tbool     vadAlertFlag = FALSE;
00762
00763 #ifdef PROFILE_CYCLES
00764   volatile tlong cycles;
00765 #endif
00766 #ifdef AZ_INFO_AVAILABLE
00767   tint      sidDeclared;
00768 #endif
00769   tword     cwsegPackedMem[utlNbytes2NtwordsCeil(ifnmutx_CONFIG_MAX_LP_ORDER + 1)];
00770   tword     cwsegUnpacked[ifnmutx_CONFIG_MAX_LP_ORDER + 1];
00771   tint      numBytes;
00772
00773   nmutxOutCwseg = cwsegPackedMem;
00774
00775 #ifdef USE_CACHE
00776   if (config.doCacheFlush) {
00777     memarchcfg_cacheFlush();
00778   }
00779 #endif
00780
00781   if (config.vauBypass) {
00782     memcpy(vauOutSamplesPtr, framePtr, sizeof(linSample) * config.frameSize);
00783
00784     switch (siuInst.vauSim.state) {
00785       case ISPHENC1_FTYPE_SPEECH:
00786         if (siuInst.vauSim.countOnOff ==
00787             (SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES - SIU_VAU_ALERT_IN_FRAMES)) {
00788           siuInst.vauSim.vadAlertFlag = TRUE;
00789         }
00790         break;
00791       case ISPHENC1_FTYPE_NODATA:
00792         if ((!config.allNoiseAfterFirstVoice2Noise) &&
00793             (siuInst.vauSim.countOnOff == SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES)) {
00794           siuInst.vauSim.state = ISPHENC1_FTYPE_SPEECH;
00795           siuInst.vauSim.countOnOff = 0;
00796         }
00797         break;
00798       default:
00799         break;
00800     }
00801
00802     vadAlertFlag = siuInst.vauSim.vadAlertFlag;
00803
00804     if (siuInst.vauSim.vadAlertFlag) {
00805       if (siuInst.vauSim.countOnOff == SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES - 1) {
00806         siuInst.vauSim.state = ISPHENC1_FTYPE_NODATA;
00807         siuInst.vauSim.countOnOff = 0;
00808         siuInst.vauSim.vadAlertFlag = FALSE;
00809       }
00810     }
00811
00812     siuInst.vauSim.countOnOff++;
00813     vauFrameType = siuInst.vauSim.state;
00814   }
00815   else {
00816
00817 #ifdef PROFILE_CYCLES
00818     cycles = profile_getCPUcycleCount();
00819 #endif
00820
00821     if (config.xdaisFlag) {
00822       vadAlertFlag =
00823       vauXdaisCallTable.process(siuInst.vauXdaisInst, framePtr, &vauOutSamplesPtr,
00824                   &vauFrameType);
00825     }
00826     else {
00827       vadAlertFlag =
00828       vauProcess(siuInst.vauInst, framePtr, &vauOutSamplesPtr,
00829                 &vauFrameType);
00830     }
00831
00832 #if 0
00833     printf("c = %ld, f = %d a = %d\n", (long) siuInst.frameCount, vauFrameType,
00834            vadAlertFlag);
00835
00836     if (siuInst.frameCount > 279) {
00837       int       i, j, k;
00838
00839       printf("f = %d\n", (long) siuInst.frameCount);
00840       for (j = 0, k = 0; j < 8; j++) {
00841         for (i = 0; i < 10; i++) {
00842           printf("%7d ", (int) vauOutSamplesPtr[k++]);
00843         }
00844         printf("\n");
00845       }
00846     }
00847 #endif
00848
00849 #ifdef PROFILE_CYCLES
00850     cycles = (profile_getCPUcycleCount() - cycles);
00851     siu_process_cycles(cycles, &siuInst.cyclesVau);
00852 #endif
00853
00854   }
00855
00856 #ifdef USE_CACHE
00857   if (config.doCacheFlush) {
00858     memarchcfg_cacheFlush();
00859   }
00860 #endif
00861
00862 #ifdef PROFILE_CYCLES
00863   cycles = profile_getCPUcycleCount();
00864 #endif
00865
00866   /* vau above will classify as voice, noise (no-data) and generate alert flag,
00867      nmutx will classify as voice, sid or noise */
00868   if (config.xdaisFlag) {
00869     nmutxXdaisCallTable.process(siuInst.nmutxXdaisInst, &vauFrameType, vadAlertFlag,
00870                                 vauOutSamplesPtr, &nmutxOutCwsegSize, nmutxOutCwseg);
00871   }
00872   else {
00873     nmutxProcess(siuInst.nmutxInst, &vauFrameType, vadAlertFlag, vauOutSamplesPtr,
00874                  &nmutxOutCwsegSize, nmutxOutCwseg);
00875   }
00876
00877 #ifdef PROFILE_CYCLES
00878   cycles = (profile_getCPUcycleCount() - cycles);
00879   siu_process_cycles(cycles, &siuInst.cyclesNmuTx);
00880   fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00881 #endif
00882
00883   /* translate to appropriate frame types to be understood by rx nmu */
00884 #ifdef AZ_INFO_AVAILABLE
00885   sidDeclared = 0;
00886 #endif
00887   switch (vauFrameType) {
00888     case ISPHENC1_FTYPE_SIDFRAME:
00889       nmu_rx_frame_type = ISPHDEC1_FTYPE_SIDUPDATE;
00890       if (siuInst.isVoice) {
00891         printf(" SID tx ( first)");
00892       }
00893       else {
00894         printf(" SID tx (update)");
00895       }
00896       printf(" at frame %10ld, deltaTime = %5ld, SID = ", (long) siuInst.frameCount,
00897              (long) (siuInst.frameCount - siuInst.prevSIDframeCount));
00898       siuInst.prevSIDframeCount = siuInst.frameCount;
00899       cwseg = nmutxOutCwseg;
00900       numBytes = nmutxOutCwsegSize / 8;
00901
00902       /* unpacking only for printing/logging purpose */
00903       pktUnpackWordsIntoBytes(cwseg, cwsegUnpacked, numBytes, 0);
00904       for (i = 0; i < numBytes; i++) {
00905         printf("%d ", cwsegUnpacked[i]);
00906         fprintf(siuInst.SIDfilePtr, "%5d, ", cwsegUnpacked[i]);
00907       }
00908       printf("\n");
00909       fprintf(siuInst.SIDfilePtr, "\n");
00910
00911       siuInst.isVoice = 0;
00912
00913 #ifdef AZ_INFO_AVAILABLE
00914       sidDeclared = 1;
00915 #endif
00916
00917       siuInst.numSIDs++;
00918
00919       break;
00920
00921     case ISPHENC1_FTYPE_SPEECH:
00922       nmu_rx_frame_type = ISPHDEC1_FTYPE_SPEECHGOOD;
00923       siuInst.isVoice = 1;
00924       break;
00925
00926     case ISPHENC1_FTYPE_NODATA:
00927       nmu_rx_frame_type = ISPHDEC1_FTYPE_NODATA;
00928       siuInst.isVoice = 0;
00929       break;
00930
00931     default:
00932       printf(" Bad nmu Tx out frame type\n");
00933       exit(0);
00934       break;
00935   }
00936
00937 #ifdef USE_CACHE
00938   if (config.doCacheFlush) {
00939     memarchcfg_cacheFlush();
00940   }
00941 #endif
00942
00943 #ifdef PROFILE_CYCLES
00944   cycles = profile_getCPUcycleCount();
00945 #endif
00946
00947 #if 0
00948   {
00949     int       i;
00950
00951     printf("\nNmu Rx call %d\n", nmurxCount++);
00952     printf("frameType %d\n", nmu_rx_frame_type);
00953     // printf("cwseg_size %d\n",nmutxOutCwsegSize);
00954     if (nmu_rx_frame_type == ISPHDEC1_FTYPE_SPEECHGOOD) {
00955       for (i = 0; i < 80; i++) {
00956         printf("%d\n", (int) vauOutSamplesPtr[i]);
00957       }
00958     }
00959   }
00960 #endif
00961
00962   if (config.xdaisFlag) {
00963     nmurxXdaisCallTable.process(siuInst.nmurxXdaisInst, nmu_rx_frame_type,
00964                                 nmutxOutCwsegSize, cwseg, vauOutSamplesPtr);
00965   }
00966   else {
00967     nmurxProcess(siuInst.nmurxInst, nmu_rx_frame_type, nmutxOutCwsegSize, cwseg, vauOutSamplesPtr);
00968   }
00969
00970 #ifdef PROFILE_CYCLES
00971   cycles = (profile_getCPUcycleCount() - cycles);
00972   siu_process_cycles(cycles, &siuInst.cyclesNmuRx);
00973 #endif
00974
00975 #ifdef AZ_INFO_AVAILABLE
00976   if (sidDeclared) {
00977     int       i;
00978
00979     fprintf(siuInst.AzFilePtr, "%ld,", (long) siuInst.frameCount);
00980     for (i = 0; i <= 10; i++) {
00981       fprintf(siuInst.AzFilePtr, "%f,", (float) glob_Az[i] / 4096.0);
00982     }
00983     fprintf(siuInst.AzFilePtr, "\n");
00984   }
00985 #endif
00986
00987   *outFramePtr = vauOutSamplesPtr;
00988 }
00989
00990 tint siu_read_inFrame(linSample * inFramePtr, tint numSamples)
00991 {
00992   int       i;
00993
00994   for (i = 0; i < numSamples; i++) {
00995     int       lsb, msb;
00996
00997     lsb = fgetc(siuInst.inFrameFilePtr);
00998     msb = fgetc(siuInst.inFrameFilePtr);
00999     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
01000   }
01001
01002   if (feof(siuInst.inFrameFilePtr)) {
01003     /* silence the last frame as it could have garbage */
01004     memset(inFramePtr, 0, numSamples * sizeof(linSample));
01005     return (0);
01006   }
01007   else {
01008     return (1);
01009   }
01010 }
01011 tint siu_write_outFrame(linSample * outFramePtr, tint numSamples)
01012 {
01013   int       i;
01014
01015   for (i = 0; i < numSamples; i++) {
01016     fputc(outFramePtr[i] & 0xFF, siuInst.outFrameFilePtr);
01017     fputc(((outFramePtr[i] >> 8) & 0xFF), siuInst.outFrameFilePtr);
01018   }
01019   return (0);
01020 }
01021
01022 void hw_init(void)
01023 {
01024 #ifdef PROFILE_CYCLES
01025   if (!profile_initCycleProfiling()) {
01026     printf("Could not acquire profiling resources..Exiting\n");
01027     exit(0);
01028   }
01029 #endif
01030
01031 #ifdef USE_CACHE
01032   if (config.doCacheEnable) {
01033     memarchcfg_cacheEnable();
01034   }
01035 #endif
01036 }
01037
01038
01039 linSample inFrame[MAX_FRAME_SIZE], outFrame[MAX_FRAME_SIZE];
01040
01041 void main(void)
01042 {
01043   linSample *outFramePtr = outFrame;
01044
01045   printf("Version Information of modules tested:\n");
01046   printf("VAU %d.%d.%d.%d\n",
01047           ti_mas_vau_Version_MAJOR, ti_mas_vau_Version_MINOR,
01048           ti_mas_vau_Version_XVERTICAL, ti_mas_vau_Version_PATCH);
01049
01050   printf("NMU %d.%d.%d.%d\n\n",
01051           ti_mas_nmu_Version_MAJOR, ti_mas_nmu_Version_MINOR,
01052           ti_mas_nmu_Version_XVERTICAL, ti_mas_nmu_Version_PATCH);
01053
01054   if (config.xdaisFlag) {
01055     printf("Using XDAIS APIs\n");
01056   }
01057   else {
01058     printf("Using ECO APIs\n");
01059   }
01060
01061   hw_init();
01062
01063   siu_open();
01064
01065   siu_new_open_config_modules(&config);
01066
01067   printf("Processing Frames..\n");
01068
01069   /* send some initial silence, this is the assumed background in which files will
01070      be piped in */
01071   while (siuInst.inFrameInitialSilenceFrames) {
01072     memset(inFrame, 0, config.frameSize * sizeof(linSample));
01073     siuInst.inFrameInitialSilenceFrames--;
01074     siu_process_txrx(inFrame, &outFramePtr);
01075   }
01076
01077   while (siu_read_inFrame(inFrame, config.frameSize)) {
01078     siuInst.frameCount++;
01079
01080     siu_process_txrx(inFrame, &outFramePtr);
01081
01082     if (siu_write_outFrame(outFramePtr, config.frameSize)) {
01083       printf(" Error writing output frame, exiting \n");
01084       exit(0);
01085
01086     }
01087
01088   }
01089
01090   siu_close();
01091
01092 }
01093
01094
01095 /* @} */ /* ingroup */
01096
01097 /* 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 (3)
#define | ti_mas_plc_Version_XVERTICAL (0)
#define | ti_mas_plc_Version_PATCH (0)
#define | ti_mas_plc_Version_BUILD (2)
#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 (3)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_plc_Version_BUILD (2)

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 (3)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_plc_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_plc_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_plc_Version_BUILD (2)
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.3.0.2

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.

  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)
  5. ti.mas.iface.ifplc (Generic interface)
  6. ti.xdais (xDAIS interface)

PLC Required Packages
Package | File Name
ti.mas.plc | ti_mas_plc_<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
ti.mas.iface.ifplc | ti_mas_iface_ifplc_<fmt>_c<rtarg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


PLC: PLC Integration

PLC (Packet Loss Concealment) Package

PLC Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
    • xDAIS Developers Kit
    • XDC Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the PLC root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the PLC makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.
  4. Ensure the path to xDAIS (XDAIS_INSTALL_DIR) within the PLC root makefile is set correctly (do one of the following):
    • Modify the xDAIS path within the PLC makefile.
    • Set the xDAIS path via the environment variable XDAIS_GEN_INSTALL_DIR.
  5. Ensure the path to the XDC Tools (XDC_INSTALL_DIR) within the PLC root makefile is set correctly (do one of the following):
    • Modify the XDC Tools path within the PLC makefile.
    • Set the XDC Tools path via the environment variable XDC_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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.

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\plc\c<starg>\plc_a.a<starg>
  4. ti\mas\plc\c<starg>\plc_c.a<starg>

Structures Requiring Initialization

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
  4. C66x Target
    • C66x PLC Data Memory Requirements
    • C66x 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 | 148 | 144
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.31 | Core PLC code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C66x Target

C66x 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 | 148 | 144
data/bss | 200 | 124

C66x PLC Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 6.75 | 6.28 | 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
  • C66x 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)

C55x PLC MIPS
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.

C64x/C64x+ PLC MIPS
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_DM6446 | 3.08 | 0.66
test_rel_C6455 | 2.25 | 0.17
test_rel_C6416le | 2.00 | 0.15

C66x Targets

Profiling was performed on a TI C6678 EVM. For placement, refer to the individual .map files. Cycles information for every frame can be found in the file test\logs\cycles.txt generated by running the image.

C66x PLC MIPS
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_C6678 | 2.23 | 0.16

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
  • plc_SIM_INP_FNAME : test.c
  • plc_SIM_INPFE_FNAME : test.c
  • plc_SIM_LOGCYC_FNAME : test.c
  • plc_SIM_OUT_FNAME : test.c
  • plc_SIM_OUTPLC_FNAME : 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
  • plc_SIM_INP_FNAME : test.c
  • plc_SIM_INPFE_FNAME : test.c
  • plc_SIM_LOGCYC_FNAME : test.c
  • plc_SIM_OUT_FNAME : test.c
  • plc_SIM_OUTPLC_FNAME : 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 | plc_SIM_INP_FNAME "../../vectors/inp/in.raw"
#define | plc_SIM_INPFE_FNAME "../../vectors/inp/inFE.txt"
#define | plc_SIM_OUT_FNAME "../../vectors/out/outNoPLC.raw"
#define | plc_SIM_OUTPLC_FNAME "../../vectors/out/outPLC.raw"
#define | plc_SIM_LOGCYC_FNAME "../../logs/cycles.txt"
#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 plc_SIM_INP_FNAME "../../vectors/inp/in.raw"

Definition at line 58 of file test.c.

Referenced by siu_open().

#define plc_SIM_INPFE_FNAME "../../vectors/inp/inFE.txt"

Definition at line 59 of file test.c.

Referenced by siu_open().

#define plc_SIM_OUT_FNAME "../../vectors/out/outNoPLC.raw"

Definition at line 60 of file test.c.

Referenced by siu_open().

#define plc_SIM_OUTPLC_FNAME "../../vectors/out/outPLC.raw"

Definition at line 61 of file test.c.

Referenced by siu_open().

#define plc_SIM_LOGCYC_FNAME "../../logs/cycles.txt"

Definition at line 62 of file test.c.

Referenced by siu_open().

#define SIU_MAX_ERR_MSG_STRING_LENGTH 100

Definition at line 137 of file test.c.

#define PLC_ID 1

Definition at line 148 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 155 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 169 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 222 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 237 of file test.c.

References siuInst_s::cyclesOverhead, siuInst_s::eraseFilePtr, siuInst_s::frameToBeErased, siuInst_s::inFrameFilePtr, siuInst_s::outFrameFilePtrNoPLC, siuInst_s::outFrameFilePtrPLC, plc_SIM_INP_FNAME, plc_SIM_INPFE_FNAME, plc_SIM_LOGCYC_FNAME, plc_SIM_OUT_FNAME, plc_SIM_OUTPLC_FNAME, siu_init_heaps(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_close ( void )

Definition at line 305 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 328 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 435 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 490 of file test.c.

Referenced by main().

tint siu_write_outFrame | ( | FILE * | filePtr,
 |  | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 512 of file test.c.

Referenced by main().

void hw_init ( void )

Definition at line 529 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 548 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 84 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 121 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 128 of file test.c.

msgTable_t plcExceptions[]

Initial value:

 {
  plc_E1
}

Definition at line 133 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 150 of file test.c.

Referenced by siu_debug_info().

linSample inFrame[MAX_FRAME_LENGTH]

Definition at line 545 of file test.c.

linSample outFramePLC[MAX_FRAME_LENGTH]

Definition at line 545 of file test.c.

linSample outFrameNoPLC[MAX_FRAME_LENGTH]

Definition at line 545 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 into CCSV5 and build. All projects will reside in the plc\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main PLC documentation.

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.X or above and may be used for those who haven't yet upgraded to CCS version 4.X or above.

  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.X or above.

  1. Open CCS
  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
  • CCS Project Conversion
  • Disclaimer


PLC Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the plc\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_PLC_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all PLC component Unit Test CCS projects in the plc\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the plc\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_PLC_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all PLC component Unit Test CCS projects in the plc\test\ccsProjects directory such that they will load and build with CCS version 4.2


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 68 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 69 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 70 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 72 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 74 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 99 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

Definition at line 100 of file test.c.

tlong cycles_s::avg

Definition at line 101 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 123 of file test.c.

Data Fields

tuint | msgCode
char | msgString [200]

Field Documentation

tuint msgTable_t::msgCode

Definition at line 124 of file test.c.

char msgTable_t::msgString[200]

Definition at line 125 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 139 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 140 of file test.c.

char msgTables_t::name[SIU_MAX_ERR_MSG_STRING_LENGTH]

Definition at line 141 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::warnTbl

Definition at line 142 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeWarnTbl

Definition at line 143 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::excTbl

Definition at line 144 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeExcTbl

Definition at line 145 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 104 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 105 of file test.c.

Referenced by siu_new_open_config_modules(), and siu_process().

IALG_Handle siuInst_s::plcXdaisInst

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().

FILE* siuInst_s::inFrameFilePtr

Definition at line 108 of file test.c.

Referenced by main(), siu_close(), and siu_open().

FILE* siuInst_s::outFrameFilePtrNoPLC

Definition at line 109 of file test.c.

Referenced by main(), siu_close(), and siu_open().

FILE* siuInst_s::outFrameFilePtrPLC

Definition at line 110 of file test.c.

Referenced by main(), siu_close(), and siu_open().

tlong siuInst_s::cyclesOverhead

Definition at line 114 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesPlc

Definition at line 115 of file test.c.

Referenced by siu_process().

FILE* siuInst_s::eraseFilePtr

Definition at line 116 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process().

tuint siuInst_s::frameToBeErased

Definition at line 117 of file test.c.

Referenced by siu_open(), and siu_process().

tulong siuInst_s::xdaisBufsMallocFreeCounter

Definition at line 118 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 | plc_SIM_INP_FNAME "../../vectors/inp/in.raw"
#define | plc_SIM_INPFE_FNAME "../../vectors/inp/inFE.txt"
#define | plc_SIM_OUT_FNAME "../../vectors/out/outNoPLC.raw"
#define | plc_SIM_OUTPLC_FNAME "../../vectors/out/outPLC.raw"
#define | plc_SIM_LOGCYC_FNAME "../../logs/cycles.txt"
#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
00050 /* Handle CCS Project paths */
00051 #ifdef  __CCS_PROJECT_REL_PATH
00052 #define plc_SIM_INP_FNAME          "../../../vectors/inp/in.raw"
00053 #define plc_SIM_INPFE_FNAME        "../../../vectors/inp/inFE.txt"
00054 #define plc_SIM_OUT_FNAME          "../../../vectors/out/outNoPLC.raw"
00055 #define plc_SIM_OUTPLC_FNAME       "../../../vectors/out/outPLC.raw"
00056 #define plc_SIM_LOGCYC_FNAME       "../../../logs/cycles.txt"
00057 #else
00058 #define plc_SIM_INP_FNAME          "../../vectors/inp/in.raw"
00059 #define plc_SIM_INPFE_FNAME        "../../vectors/inp/inFE.txt"
00060 #define plc_SIM_OUT_FNAME          "../../vectors/out/outNoPLC.raw"
00061 #define plc_SIM_OUTPLC_FNAME       "../../vectors/out/outPLC.raw"
00062 #define plc_SIM_LOGCYC_FNAME       "../../logs/cycles.txt"
00063 #endif
00064
00065
00068 typedef struct config_s {
00069   tbool     xdaisFlag;
00070   tbool     xdaisDefaultCfgFlag;
00072   tint      frameLength;
00074   ifplcConfig_t plcConfig;
00075 #ifdef USE_CACHE
00076   tint  doCacheFlush;
00077   tint  doCacheEnable;
00078 #endif
00079 } config_t;
00080
00084 config_t  config = {
00085   1,  /* xdaisFlag */
00086   0,  /* don't use default configuration for xdais */
00087   80,                           /* 10 ms default frame size */
00088
00089   /* plcConfig */
00090   {
00091    ifplc_TYPE_G711A1
00092   }
00093 #ifdef USE_CACHE
00094  ,1, /* doCacheFlush */
00095   1  /* doCacheEnable */
00096 #endif
00097 };
00098
00099 typedef struct cycles_s {
00100   tlong     max;
00101   tlong     avg;
00102 } cycles_t;
00103
00104 typedef struct siuInst_s {
00105   void     *plcInst;
00106   IALG_Handle plcXdaisInst;
00107   tlong     frameCount;
00108   FILE     *inFrameFilePtr;
00109   FILE     *outFrameFilePtrNoPLC;
00110   FILE     *outFrameFilePtrPLC;
00111 #ifdef PROFILE_CYCLES
00112   FILE   *outCyclesFilePtr;
00113 #endif
00114   tlong     cyclesOverhead;
00115   cycles_t  cyclesPlc;
00116   FILE     *eraseFilePtr;
00117   tuint    frameToBeErased;
00118   tulong   xdaisBufsMallocFreeCounter;
00119 } siuInst_t;
00120
00121 siuInst_t siuInst;
00122
00123 typedef struct {
00124   tuint     msgCode;
00125   char      msgString[200];
00126 } msgTable_t;
00127
00128 msgTable_t plcWarnings[] = {
00129   plc_W1,
00130   plc_W2
00131 };
00132
00133 msgTable_t plcExceptions[] = {
00134   plc_E1
00135 };
00136
00137 #define SIU_MAX_ERR_MSG_STRING_LENGTH 100
00138
00139 typedef struct {
00140   tuint     ID;
00141   char      name[SIU_MAX_ERR_MSG_STRING_LENGTH];
00142   msgTable_t *warnTbl;
00143   tuint     sizeWarnTbl;
00144   msgTable_t *excTbl;
00145   tuint     sizeExcTbl;
00146 } msgTables_t;
00147
00148 #define PLC_ID 1
00149
00150 msgTables_t msgTables[] = {
00151   {PLC_ID, "plc", plcWarnings, sizeof(plcWarnings) / sizeof(msgTable_t),
00152    plcExceptions, sizeof(plcExceptions) / sizeof(msgTable_t)}
00153 };
00154
00155 char     *siuGetMsg(msgTable_t * tbl, tuint size, tuint msgCode)
00156 {
00157   int       i;
00158
00159   for (i = 0; i < size; i++) {
00160     if (tbl[i].msgCode == msgCode) {
00161       return (tbl[i].msgString);
00162     }
00163   }
00164   printf(" Fatal: Table entry not found\n");
00165   exit(0);
00166   return (NULL);
00167 }
00168
00169 void siu_debug_info(void *inID, tuint msgType, tuint msgCode, tuint msgLength,
00170                     tuint * supportingData)
00171 {
00172   int       i;
00173   int       doExit = 0, found;
00174   msgTables_t *msgTblPtr;
00175   tuint ID = *((tuint *) inID);
00176
00177   for (i = 0, found = 0; i < sizeof(msgTables) / sizeof(msgTables_t); i++) {
00178     if (msgTables[i].ID == ID) {
00179       found = 1;
00180       msgTblPtr = &msgTables[i];
00181     }
00182   }
00183
00184   if (!found) {
00185     printf("Message from unknown module of ID %d received, quitting..\n", ID);
00186     exit(0);
00187   }
00188
00189   printf("%s :", msgTblPtr->name);
00190
00191   switch (msgType) {
00192     case dbg_TRACE_INFO:
00193       printf("Trace Info: ");
00194       break;
00195     case dbg_WARNING:
00196       printf("Warning in ");
00197       printf("%s\n", siuGetMsg(msgTblPtr->warnTbl, msgTblPtr->sizeWarnTbl, msgCode));
00198       break;
00199     case dbg_EXCEPTION_FATAL:
00200       printf("Exception: ");
00201       printf("%s\n", siuGetMsg(msgTblPtr->excTbl, msgTblPtr->sizeExcTbl, msgCode));
00202       doExit = 1;
00203       break;
00204     default:
00205       printf(" Invalid diagnostic message, exiting..");
00206       break;
00207   }
00208
00209   if (msgLength) {
00210     printf("\nSupporting Data: ");
00211     for (i = 0; i < msgLength; i++) {
00212       printf("%d\n", supportingData[i]);
00213     }
00214   }
00215
00216   if (doExit) {
00217     printf("\n Exiting.. ");
00218     exit(0);
00219   }
00220 }
00221
00222 void siu_dealloc_plc_xdais_mem (IALG_Handle plcXdaisInstPtr, tulong *mallocedSizeCounter)
00223 {
00224   Int nbufs;
00225   IALG_MemRec *xdaisBufsPtr;
00226
00227   nbufs = plcXdaisCallTable.ialg.algNumAlloc();
00228   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00229
00230   nbufs = plcXdaisCallTable.ialg.algFree(plcXdaisInstPtr, xdaisBufsPtr);
00231
00232   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00233
00234   free(xdaisBufsPtr);
00235 }
00236
00237 void siu_open(void)
00238 {
00239 #ifdef PROFILE_CYCLES
00240   volatile tlong cycles;
00241 #endif
00242
00243   memset(&siuInst, 0, sizeof(siuInst_t));
00244
00245   siu_init_heaps();
00246
00247   if ((siuInst.inFrameFilePtr = fopen (plc_SIM_INP_FNAME, "rb")) == NULL) {
00248     printf(" Error opening in.raw\n");
00249     exit(0);
00250   }
00251
00252   if ((siuInst.eraseFilePtr = fopen (plc_SIM_INPFE_FNAME, "rt")) == NULL) {
00253     printf(" Error opening inFE.txt\n");
00254     exit(0);
00255   }
00256   else {
00257     if (!feof(siuInst.eraseFilePtr)) {
00258       int i;
00259       fscanf(siuInst.eraseFilePtr, "%d\n", &i);
00260       siuInst.frameToBeErased = (tuint) i;
00261     }
00262   }
00263
00264   if ((siuInst.outFrameFilePtrNoPLC = fopen (plc_SIM_OUT_FNAME, "wb")) == NULL) {
00265     printf(" Error opening outNoPLC.raw\n");
00266     exit(0);
00267   }
00268
00269   if ((siuInst.outFrameFilePtrPLC = fopen (plc_SIM_OUTPLC_FNAME, "wb")) == NULL) {
00270     printf(" Error opening outPLC.raw\n");
00271     exit(0);
00272   }
00273
00274   /* measure measurement overhead of cycles */
00275 #ifdef PROFILE_CYCLES
00276   if ((siuInst.outCyclesFilePtr = fopen (plc_SIM_LOGCYC_FNAME, "wt")) == NULL) {
00277     printf(" Error opening cycles.txt\n");
00278     exit(0);
00279   }
00280   cycles = profile_getCPUcycleCount();
00281 #endif
00282
00283 #ifdef PROFILE_CYCLES
00284   cycles = (profile_getCPUcycleCount() - cycles);
00285   siuInst.cyclesOverhead = cycles;
00286 #endif
00287
00288 }
00289
00290 #ifdef PROFILE_CYCLES
00291 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00292                                          tlong overhead)
00293 {
00294   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00295          (long) cyclesPtr->max - (long) overhead,
00296          (long) cyclesPtr->avg - (long) overhead);
00297 }
00298
00299 void siu_print_cycles(void)
00300 {
00301   siu_print_cycles_util(&siuInst.cyclesPlc, "Plc", siuInst.cyclesOverhead);
00302 }
00303 #endif
00304
00305 void siu_close(void)
00306 {
00307   fclose(siuInst.inFrameFilePtr);
00308   fclose(siuInst.outFrameFilePtrNoPLC);
00309   fclose(siuInst.outFrameFilePtrPLC);
00310   fclose(siuInst.eraseFilePtr);
00311
00312 #ifdef PROFILE_CYCLES
00313   fclose(siuInst.outCyclesFilePtr);
00314   siu_print_cycles();
00315   profile_closeCycleProfiling();
00316 #endif
00317
00318   if (config.xdaisFlag) {
00319     siu_dealloc_plc_xdais_mem (siuInst.plcXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00320     if (siuInst.xdaisBufsMallocFreeCounter) {
00321       printf(" Error: mismatched malloc-free\n");
00322     }
00323   }
00324
00325   memset(&siuInst, 0, sizeof(siuInst_t));
00326 }
00327
00328 void siu_new_open_config_modules(config_t * config)
00329 {
00330   tint      nbufs, ret;
00331   const ecomemBuffer_t *sizeBufs;
00332   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00333
00334   plcSizeConfig_t plcSizeCfg;
00335   plcOpenConfig_t plcOpenCfg;
00336   plcNewConfig_t plcNewCfg;
00337
00338   IALG_MemRec *xdaisBufsPtr;
00339   plcXdaisAllocParams_t plcXdaisAllocParams;
00340   plcXdaisInitParams_t plcXdaisInitParams;
00341   const IALG_Params *paramsPtr;
00342
00343   plcXdaisAllocParams.param.size = (Int) sizeof(plcXdaisAllocParams_t);
00344   plcXdaisInitParams.param.size = (Int) sizeof(plcXdaisInitParams_t);
00345
00346   printf(" Querying PLC Memory Requirements\n");
00347
00348   plcSizeCfg.config = config->plcConfig;
00349
00350   if (config->xdaisFlag) {
00351     nbufs = (tint) plcXdaisCallTable.ialg.algNumAlloc();
00352     if (nbufs == 0) {
00353       printf(" algNumAlloc error, exiting\n");
00354       exit(0);
00355     }
00356
00357     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00358     if (xdaisBufsPtr == NULL) {
00359       printf("Not enough heap for PLC memory records, exiting\n");
00360       exit(0);
00361     }
00362     if (config->xdaisDefaultCfgFlag) {
00363       paramsPtr = NULL;
00364     }
00365     else {
00366       plcXdaisAllocParams.cfg = plcSizeCfg;
00367       paramsPtr = (const IALG_Params *) &plcXdaisAllocParams;
00368     }
00369     plcXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00370   }
00371   else {
00372     if (plcGetSizes(&nbufs, &sizeBufs, &plcSizeCfg) != plc_NOERR) {
00373       printf(" PLC get sizes error, exiting \n");
00374       exit(0);
00375     }
00376   }
00377
00378   printf(" Allocating PLC memory \n");
00379   if (config->xdaisFlag) {
00380     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00381     siuInst.plcXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00382   }
00383   else {
00384     siu_alloc_eco_mem (nbufs, sizeBufs, ecoBufs);
00385   }
00386
00387   plcNewCfg.sizeCfg = plcSizeCfg;
00388   plcNewCfg.ID = PLC_ID;
00389   plcNewCfg.debugInfo = siu_debug_info;
00390   plcOpenCfg.frame_size = config->frameLength;
00391   plcOpenCfg.codingType = plc_CODING_TYPE_MULAW;        /* only meaningful for GMP
00392                                                            usage */
00393   plcOpenCfg.config = config->plcConfig;
00394
00395   if (config->xdaisFlag) {
00396     if (config->xdaisDefaultCfgFlag) {
00397       paramsPtr = NULL;
00398     }
00399     else {
00400       plcXdaisInitParams.cfgNew = plcNewCfg;
00401       plcXdaisInitParams.cfgOpen = plcOpenCfg;
00402       paramsPtr = (IALG_Params *) &plcXdaisInitParams;
00403     }
00404     ret = plcXdaisCallTable.ialg.algInit((IALG_Handle) siuInst.plcXdaisInst,
00405                                    xdaisBufsPtr, NULL, paramsPtr);
00406
00407     free(xdaisBufsPtr);
00408
00409     if (ret == IALG_EFAIL) {
00410       printf("algInit() failure, exiting\n");
00411       exit(0);
00412     }
00413
00414   }
00415   else {
00416     if (plcNew(&(siuInst.plcInst), nbufs, ecoBufs, &plcNewCfg) != plc_NOERR) {
00417       printf(" PLC New error, exiting \n");
00418       exit(0);
00419     }
00420     plcOpen(siuInst.plcInst, &plcOpenCfg);
00421   }
00422 }
00423
00424 #ifdef PROFILE_CYCLES
00425 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00426 {
00427   if (cycles > cyclesPtr->max) {
00428     cyclesPtr->max = cycles;
00429   }
00430
00431   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00432 }
00433 #endif
00434
00435 void siu_process(linSample * framePtr, linSample * outFramePtrPLC,
00436                  linSample * outFramePtrNoPLC)
00437 {
00438   ISPHDEC1_FrameType frameType;
00439
00440 #ifdef PROFILE_CYCLES
00441   volatile tlong cycles;
00442 #endif
00443
00444   frameType = ISPHDEC1_FTYPE_SPEECHGOOD;
00445   if (siuInst.frameToBeErased == siuInst.frameCount) {
00446
00447     /* read next one if there */
00448     if (!feof(siuInst.eraseFilePtr)) {
00449       int i;
00450       fscanf(siuInst.eraseFilePtr, "%d\n", &i);
00451       siuInst.frameToBeErased = (tuint) i;
00452     }
00453
00454     frameType = ISPHDEC1_FTYPE_SPEECHLOST;
00455     memset(outFramePtrNoPLC, 0, config.frameLength * sizeof(linSample));
00456     printf(" Erasure at frame %d\n", (int) siuInst.frameCount);
00457   }
00458
00459   if (frameType == ISPHDEC1_FTYPE_SPEECHGOOD) {
00460     memcpy(outFramePtrNoPLC, framePtr, config.frameLength * sizeof(linSample));
00461   }
00462
00463 #ifdef USE_CACHE
00464   if (config.doCacheFlush) {
00465     memarchcfg_cacheFlush();
00466   }
00467 #endif
00468
00469 #ifdef PROFILE_CYCLES
00470   cycles = profile_getCPUcycleCount();
00471 #endif
00472
00473   if (config.xdaisFlag) {
00474     plcXdaisCallTable.process (siuInst.plcXdaisInst, NULL, framePtr, frameType, 0);
00475   }
00476   else {
00477     plcProcess(siuInst.plcInst, NULL, framePtr, frameType, 0);
00478   }
00479
00480 #ifdef PROFILE_CYCLES
00481   cycles = (profile_getCPUcycleCount() - cycles);
00482   siu_process_cycles(cycles, &siuInst.cyclesPlc);
00483   fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00484 #endif
00485
00486   memcpy(outFramePtrPLC, framePtr, config.frameLength * sizeof(linSample));
00487
00488 }
00489
00490 tint siu_read_inFrame(FILE * filePtr, linSample * inFramePtr, tint numSamples)
00491 {
00492   int       i;
00493
00494   for (i = 0; i < numSamples; i++) {
00495     int       lsb, msb;
00496
00497     lsb = fgetc(filePtr);
00498     msb = fgetc(filePtr);
00499     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00500   }
00501
00502   if (feof(filePtr)) {
00503     /* silence the last frame as it could have garbage */
00504     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00505     return (0);
00506   }
00507   else {
00508     return (1);
00509   }
00510 }
00511
00512 tint siu_write_outFrame(FILE * filePtr, linSample * outFramePtr, tint numSamples)
00513 {
00514   int       i;
00515
00516   for (i = 0; i < numSamples; i++) {
00517     fputc(outFramePtr[i] & 0xFF, filePtr);
00518     fputc(((outFramePtr[i] >> 8) & 0xFF), filePtr);
00519   }
00520
00521   if (feof(filePtr)) {
00522     return (1);
00523   }
00524   else {
00525     return (0);
00526   }
00527 }
00528
00529 void hw_init(void)
00530 {
00531 #ifdef PROFILE_CYCLES
00532   if (!profile_initCycleProfiling()) {
00533     printf("Could not acquire profiling resources..Exiting\n");
00534     exit(0);
00535   }
00536 #endif
00537
00538 #ifdef USE_CACHE
00539   if (config.doCacheEnable) {
00540     memarchcfg_cacheEnable();
00541   }
00542 #endif
00543 }
00544
00545 linSample inFrame[MAX_FRAME_LENGTH], outFramePLC[MAX_FRAME_LENGTH],
00546     outFrameNoPLC[MAX_FRAME_LENGTH];
00547
00548 void main(void)
00549 {
00550   linSample *outFramePtrPLC = outFramePLC;
00551   linSample *outFramePtrNoPLC = outFrameNoPLC;
00552
00553   printf("Testing PLC version %d.%d.%d.%d\n",
00554           ti_mas_plc_Version_MAJOR, ti_mas_plc_Version_MINOR,
00555           ti_mas_plc_Version_PATCH, ti_mas_plc_Version_BUILD);
00556
00557   if (config.xdaisFlag) {
00558     printf("Using XDAIS APIs\n");
00559   }
00560   else {
00561     printf("Using ECO APIs\n");
00562   }
00563
00564   hw_init();
00565
00566   siu_open();
00567
00568   siu_new_open_config_modules(&config);
00569
00570   printf("Processing Frames..\n");
00571
00572   while (siu_read_inFrame(siuInst.inFrameFilePtr, inFrame, config.frameLength)) {
00573     siuInst.frameCount++;
00574     siu_process(inFrame, outFramePtrPLC, outFramePtrNoPLC);
00575     if (siu_write_outFrame
00576         (siuInst.outFrameFilePtrPLC, outFramePtrPLC, config.frameLength)) {
00577       printf(" Error writing output frame, exiting \n");
00578       exit(0);
00579     }
00580     if (siu_write_outFrame
00581         (siuInst.outFrameFilePtrNoPLC, outFramePtrNoPLC, config.frameLength)) {
00582       printf(" Error writing output frame, exiting \n");
00583       exit(0);
00584     }
00585   }
00586
00587   siu_close();
00588 }
00589
00590 /* @} */ /* ingroup */
00591
00592 /* 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 (4)
#define | ti_mas_tdu_Version_XVERTICAL (0)
#define | ti_mas_tdu_Version_PATCH (0)
#define | ti_mas_tdu_Version_BUILD (4)
#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 (4)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_tdu_Version_BUILD (4)

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 (4)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_tdu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_tdu_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_tdu_Version_BUILD (4)
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.4.0.4

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.

  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)

TDU Required Packages
Package | File Name
ti.mas.tdu | ti_mas_tdu_<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 | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


TDU: TDU Integration

TDU (Tone Detection Unit) Package

TDU Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization
  • Additional Information

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the TDU root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the TDU makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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/fract
               /swtools
               /tdu
               /types
               /util

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

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\tdu\c<starg>\tdu_a.a<starg>
  4. ti\mas\tdu\c<starg>\tdu_c.a<starg>

Structures Requiring Initialization

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
  5. C66x 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 | 104 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 4 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated
5 | 2 | 44 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 552
data/bss | 2402
tduContext | 144
tduDetContexts | 152
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 27.9 Kbyte | Internal | Core TDU code
.switch | 0 | Internal | Switch tables
Total | 27.9 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 | 104 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 2 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated
5 | 2 | 44 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 1284
data/bss | 2638
tduContext | 144
tduDetContexts | 152
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 39.2 Kbyte | Internal | Core TDU code
.controlProg | 7.0 Kbyte | External | TDU Control code
.initProg | 1.4 Kbyte | External | TDU initialzation code
.tdm2pktProg | 6.7 Kbyte | Grouped | TDU execution code TDM-to-PKT
.pkt2tdmProg | 2.1 Kbyte | Grouped | TDU execution code PKT-to-TDM
.tdm2pktpkt2tdmProg | 352 bytes | Grouped | Various routines
.switch | 176 bytes | Internal | Switch tables
Total | 56.9 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 | 104 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 2 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated
5 | 2 | 44 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 1284
data/bss | 2638
tduContext | 144
tduDetContexts | 152
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 33.1 Kbyte | Internal | Core TDU code
.controlProg | 6.2 Kbyte | External | TDU Control code
.initProg | 1.0 Kbyte | External | TDU initialization code
.tdm2pktProg | 6.0 Kbyte | Grouped | TDU execution code TDM-to-PKT
.pkt2tdmProg | 2.0 Kbyte | Grouped | TDU execution code PKT-to-TDM
.tdm2pktpkt2tdmProg | 288 bytes | Grouped | Various routines
.switch | 176 bytes | Internal | Switch tables
Total | 48.8 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.

C66x Target

Data Requirements

Per Instance Data Buffers
Buffer ID | Alignment (bytes) | Size (bytes) |  | Scratch/Dedicated
 |  | Full | Lite
0 | 2 | 104 | 36 | Dedicated
1 | 1024 | 1024 | 1024 | Scratch
2 | 2 | 324 | 24 | Dedicated
3 | 2 | 362 | 48 | Dedicated
4 | 2 | 106 | 0 | Dedicated
5 | 2 | 44 | 0 | Dedicated

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 1284
data/bss | 2724
tduContext | 144
tduDetContexts | 152
tduIntFwTable | 88

Program Requirements

Program Memory Requirements
Section | Size | Placement | Description
.text | 33.3 Kbyte | Internal | Core TDU code
.controlProg | 6.2 Kbyte | External | TDU Control code
.initProg | 1.1 Kbyte | External | TDU initialzation code
.tdm2pktProg | 6.1 Kbyte | Grouped | TDU execution code TDM-to-PKT
.pkt2tdmProg | 2.0 Kbyte | Grouped | TDU execution code PKT-to-TDM
.tdm2pktpkt2tdmProg | 288 bytes | Grouped | Various routines
.switch | 176 bytes | Internal | Switch tables
Total | 49.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
  • C66x 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.28 | 0.79 | 3.39
Secondary Direction | 0.07 | 0.23 | 1.31
Combined | 0.35 | 1.01 | 3.78

TDU MIPS - Tones Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.27 | 1.02 | 3.19
Secondary Direction | 0.07 | 0.25 | 1.37
Combined | 0.34 | 1.27 | 3.46

TDU MIPS - Silence Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.28 | 0.97 | 3.04
Secondary Direction | 0.07 | 0.23 | 1.19
Combined | 0.35 | 1.30 | 3.34

C64x Target

TDU MIPS - Speech Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.23 | 0.81 | 2.90
Secondary Direction | 0.11 | 0.32 | 1.25
Combined | 0.34 | 1.14 | 3.60

TDU MIPS - Tones Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.21 | 1.01 | 2.96
Secondary Direction | 0.11 | 0.36 | 1.45
Combined | 0.33 | 1.36 | 3.46

TDU MIPS - Silence Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.23 | 0.97 | 2.42
Secondary Direction | 0.11 | 0.32/td> | 0.53
Combined | 0.34 | 1.29 | 2.95

C64x+ Target

TDU MIPS - Speech Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.23 | 0.58 | 1.86
Secondary Direction | 0.14 | 0.28 | 0.99
Combined | 0.37 | 0.86 | 2.47

TDU MIPS - Tones Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.20 | 0.71 | 2.03
Secondary Direction | 0.14 | 0.31 | 1.18
Combined | 0.36 | 1.01 | 2.40

TDU MIPS - Silence Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.22 | 0.68 | 1.65
Secondary Direction | 0.14 | 0.28/td> | 0.42
Combined | 0.37 | 0.97 | 2.07

C66x Target

TDU MIPS - Speech Input
Processing | Minimum | Average | Maximum
Primary Direction | 0.20 | 0.51 | 1.64
Secondary Direction | 0.12 | 0.24 | 0.86
Combined | 0.32 | 0.74 | 2.16

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.20 | 0.59 | 1.41
Secondary Direction | 0.12 | 0.23 | 0.35
Combined | 0.32 | 0.82 | 1.70


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 -

  • cache : tduSim_t
  • 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 -

  • cache : tduSim_t
  • 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
  • i
  • 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
  • _TDUSIMPORT_C66 : tdusimport.h
  • _TDUSIMPORT_C66_BIG_ENDIAN : tdusimport.h
  • _TDUSIMPORT_ELF_C64P : tdusimport.h
  • _TDUSIMPORT_ELF_C64P_BIG_ENDIAN : tdusimport.h
  • _TDUSIMPORT_ELF_C66 : tdusimport.h
  • _TDUSIMPORT_ELF_C66_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

- i -

  • ignore_beg_cnt : tdusim.c
  • ignore_cnt : tdusim.c
  • ignore_end_cnt : tdusim.c
  • input_fpath : tdusim.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_INPUT_BASE_DIR : 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
  • _TDUSIMPORT_C66 : tdusimport.h
  • _TDUSIMPORT_C66_BIG_ENDIAN : tdusimport.h
  • _TDUSIMPORT_ELF_C64P : tdusimport.h
  • _TDUSIMPORT_ELF_C64P_BIG_ENDIAN : tdusimport.h
  • _TDUSIMPORT_ELF_C66 : tdusimport.h
  • _TDUSIMPORT_ELF_C66_BIG_ENDIAN : tdusimport.h

- l -

  • loop : tdusim.c

- t -

  • tdu_SIM_DBGMSG_SIZE : tdusim.c
  • tdu_SIM_INPUT_BASE_DIR : 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
  • i
  • 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

- i -

  • ignore_beg_cnt : tdusim.c
  • ignore_cnt : tdusim.c
  • ignore_end_cnt : tdusim.c
  • input_fpath : 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 -

  • 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 into CCSV5 and build. All projects will reside in the tdu\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main TDU documentation.

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
  • CCS Project Conversion
  • Disclaimer


TDU Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the tdu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_TDU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all TDU component Unit Test CCS projects in the tdu\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the tdu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_TDU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all TDU component Unit Test CCS projects in the tdu\test\ccsProjects directory such that they will load and build with CCS version 4.2


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.

a Matlab script is provided for those who have access to Matlab. This script is in the tdu\test\vectors directory and is named profile.m. The script may be executed by entering the tdu\test\vectors directory within the Matlab environment and issuing the command "profile". The script will output minimum, average and peak MIPS for primary, secondary and combined (primary + secondary) processing. These nine values will be displayed for the three profiling signal scenarios (speech, tone & silence). See below for example output:

      CAUTION: Assuming 40 sample frame size
               Check simulation to verify

     Speech           MIN MIPS   AVG MIPS   MAX MIPS
     ------------------------------------------------
     Primary (TX)       0.28       0.79       3.39
     Secondary (RX)     0.07       0.23       1.31
     Total (TX&RX)      0.35       1.01       3.78

     Tone             MIN MIPS   AVG MIPS   MAX MIPS
     ------------------------------------------------
     Primary (TX)       0.27       1.02       3.19
     Secondary (RX)     0.07       0.25       1.37
     Total (TX&RX)      0.34       1.27       3.46

     Silence          MIN MIPS   AVG MIPS   MAX MIPS
     ------------------------------------------------
     Primary (TX)       0.28       0.97       3.04
     Secondary (RX)     0.07       0.23       1.19
     Total (TX&RX)      0.35       1.20       3.34

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 328 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 329 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 330 of file tdusim.c.

Referenced by sys_set_sgn().

linSample sigGenPars_t::dc_offset

Definition at line 331 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::wf_type

Definition at line 332 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::f1

Definition at line 333 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::f2

Definition at line 334 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

linSample sigGenPars_t::t_amp1

Definition at line 335 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

linSample sigGenPars_t::t_amp2

Definition at line 336 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tbool sigGenPars_t::pr_enable

Definition at line 337 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::pr_period

Definition at line 338 of file tdusim.c.

Referenced by sftBasicDetection(), sftBasicRxDetection(), sys_open_sgn(), and sys_set_sgn().

tlong sigGenPars_t::fsk_duration

Definition at line 339 of file tdusim.c.

Referenced by sys_set_sgn().

tint* sigGenPars_t::fsk_dataptr

Definition at line 340 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::fsk_numword

Definition at line 341 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tint sigGenPars_t::noise_level

Definition at line 342 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tuint sigGenPars_t::noise_seed

Definition at line 343 of file tdusim.c.

Referenced by sys_open_sgn().

tint sigGenPars_t::noise_type

Definition at line 344 of file tdusim.c.

Referenced by sys_open_sgn().

tint sigGenPars_t::power_level

Definition at line 345 of file tdusim.c.

Referenced by sys_open_sgn(), and sys_set_sgn().

tulong sigGenPars_t::hoth_wng_seed

Definition at line 346 of file tdusim.c.

Referenced by sys_open_sgn().

tuint sigGenPars_t::frm_count

Definition at line 347 of file tdusim.c.

Referenced by generate_tone_frame(), sftAllDetectionFILE(), sysDebugInfo(), and sysToneDetect().

tbool sigGenPars_t::fileINPUT

Definition at line 348 of file tdusim.c.

Referenced by generate_tone_frame(), sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), and tduSimProfile().

tint sigGenPars_t::fileFORMAT

Definition at line 349 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), takeFileSamples(), and tduSimProfile().

tbool sigGenPars_t::fileCLOSE

Definition at line 350 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), takeFileSamples(), and tduSimProfile().

char* sigGenPars_t::fileNAME

Definition at line 351 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), takeFileSamples(), and tduSimProfile().

FILE* sigGenPars_t::filePtr

Definition at line 352 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 606 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 607 of file tdusim.c.

Referenced by system_CT_discrim_proc(), and system_CT_discrim_rpt().

tint sysCtDiscrim_t::state

Definition at line 608 of file tdusim.c.

Referenced by system_CT_discrim_proc(), and system_CT_discrim_rpt().

tint sysCtDiscrim_t::detect_cnt

Definition at line 609 of file tdusim.c.

Referenced by system_CT_discrim_rpt().

tint sysCtDiscrim_t::detect_req

Definition at line 610 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 458 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 459 of file tdusim.c.

Referenced by sysToneDetect().

tint sysTduResults_t::mf_on_off

Definition at line 460 of file tdusim.c.

Referenced by sysToneDetect().

tint sysTduResults_t::hangover_time

Definition at line 461 of file tdusim.c.

Referenced by sysToneDetect().

tint sysTduResults_t::mf_power

Definition at line 462 of file tdusim.c.

Referenced by sysToneDetect().

tduCptSmartRep_t sysTduResults_t::cpt_report

Definition at line 463 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 356 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 cache
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 357 of file tdusim.c.

Referenced by main().

tint tduSim_t::frame_size

Definition at line 358 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 359 of file tdusim.c.

Referenced by main().

tword tduSim_t::pattern

Definition at line 360 of file tdusim.c.

Referenced by overwriteScratchBuffers().

tbool tduSim_t::overwrite_scr

Definition at line 362 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), and sftBasicRxDetection().

tbool tduSim_t::tdu_lite

Definition at line 364 of file tdusim.c.

Referenced by main().

tbool tduSim_t::enable_sia

Definition at line 365 of file tdusim.c.

Referenced by sftAllDetectionFILE(), and sftBasicDetectionRxFILE_NW().

tbool tduSim_t::profile

Definition at line 366 of file tdusim.c.

Referenced by main(), sysDebugInfo(), and sysToneDetect().

tbool tduSim_t::cache

Definition at line 367 of file tdusim.c.

Referenced by tduSimProfile().

tbool tduSim_t::report

Definition at line 368 of file tdusim.c.

Referenced by main(), and sysToneDetect().

tbool tduSim_t::add_tag

Definition at line 369 of file tdusim.c.

Referenced by sysToneDetect().

tbool tduSim_t::toggle_tdu

Definition at line 370 of file tdusim.c.

tbool tduSim_t::toggle_rx_sgn

Definition at line 371 of file tdusim.c.

tbool tduSim_t::toggle_tx_sgn

Definition at line 372 of file tdusim.c.

struct { ... } tduSim_t::options

Referenced by main(), sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), sysDebugInfo(), sysToneDetect(), and tduSimProfile().

tduCfgCtl_t tduSim_t::cfgCtl

Definition at line 374 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 375 of file tdusim.c.

Referenced by main(), sftBasicDetection(), sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

sigGenPars_t tduSim_t::txSGN

Definition at line 376 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 | tdu_SIM_INPUT_BASE_DIR "../../vectors/inp/"
#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
volatile tlong | ignore_beg_cnt
volatile tlong | ignore_end_cnt
tlong | txprof_cnt
tlong | rxprof_cnt
tlong | ignore_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]
char | input_fpath [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 51 of file tdusim.c.

Referenced by tduSimProfile().

#define tdu_SIM_INPUT_BASE_DIR "../../vectors/inp/"

Definition at line 52 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), and sftBasicDetectionRxFILE_NW().

#define TDUSIM_REPORT_STRING_LENGTH 128

Definition at line 94 of file tdusim.c.

#define TDUSIM_STRING_LENGTH 32

Definition at line 95 of file tdusim.c.

#define TDUSIM_NUM_EVENT 4

Definition at line 96 of file tdusim.c.

#define TDUSIM_NUM_DIGIT 16

Definition at line 97 of file tdusim.c.

#define TDUSIM_NUM_DIRECTION 3

Definition at line 98 of file tdusim.c.

#define TDUSIM_NUM_CED_MINOR 2

Definition at line 99 of file tdusim.c.

#define TDUSIM_NUM_CEDPR_MINOR 2

Definition at line 100 of file tdusim.c.

#define TDUSIM_NUM_V18_MINOR 2

Definition at line 101 of file tdusim.c.

#define TDUSIM_NUM_SIA_MINOR 4

Definition at line 102 of file tdusim.c.

#define TDUSIM_NUM_BELL_MINOR 3

Definition at line 103 of file tdusim.c.

#define TDUSIM_NUM_V8BIS_MINOR 2

Definition at line 104 of file tdusim.c.

#define TDUSIM_NUM_V21MODEM_MINOR 3

Definition at line 105 of file tdusim.c.

#define TDUSIM_NUM_V23MODEM_MINOR 2

Definition at line 106 of file tdusim.c.

#define TDUSIM_NUM_V21CI_MINOR 3

Definition at line 107 of file tdusim.c.

#define TDUSIM_NUM_B202_MINOR 2

Definition at line 108 of file tdusim.c.

#define TDUSIM_NUM_VDISC_MINOR 3

Definition at line 109 of file tdusim.c.

#define TDUSIM_NUM_COIN_MINOR 2

Definition at line 110 of file tdusim.c.

#define TDUSIM_NUM_TONE (tdu_TID_LAST - tdu_TID_FIRST + 1)

Definition at line 111 of file tdusim.c.

#define tdu_SIM_TX_FILE_NAME " "

Definition at line 283 of file tdusim.c.

Referenced by takeFileSamples().

#define tdu_SIM_RX_FILE_NAME " "

Definition at line 284 of file tdusim.c.

#define TST_MAX_FRAME 40

Definition at line 286 of file tdusim.c.

Referenced by takeFileSamples().

#define TST_SAVE_BUFF 53

Definition at line 287 of file tdusim.c.

#define tdu_SIM_DBGMSG_SIZE 256

Definition at line 304 of file tdusim.c.

Referenced by sysDebugInternal().

#define loop for(;;)

Definition at line 316 of file tdusim.c.

Referenced by main(), and sysException().

#define TDU_SYS_CT1300_ENABLE_CNT ( 600 * 8)

Definition at line 595 of file tdusim.c.

Referenced by system_CT_discrim_proc().

#define TDU_SYS_CT1300_RESET_CNT (4000 * 8)

Definition at line 596 of file tdusim.c.

Referenced by system_CT_discrim_proc().

#define TDU_SYS_CT1300_DWINLO_CNT ((500 + 1500) * 8)

Definition at line 597 of file tdusim.c.

Referenced by system_CT_discrim_rpt().

#define TDU_SYS_CT1300_DWINHI_CNT ((700 + 2000) * 8)

Definition at line 598 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 295 of file tdusim.c.

anonymous enum

Enumerator:
CT_DISCRIM_STATE_RESET
CT_DISCRIM_STATE_V23RPT
CT_DISCRIM_STATE_V23ENA

Definition at line 600 of file tdusim.c.

Function Documentation

void sysDebugInfo | ( | void * | ID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 845 of file tdusim.c.

References freport, sigGenPars_t::frm_count, ignore_beg_cnt, ignore_cnt, ignore_end_cnt, tduSim_t::options, tduSim_t::profile, 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 718 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, ignore_beg_cnt, ignore_cnt, ignore_end_cnt, sysTduResults_t::mf_on_off, sysTduResults_t::mf_power, sysTduResults_t::mf_tid, tduSim_t::options, tduSim_t::profile, 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 623 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 675 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 888 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 903 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 908 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 916 of file tdusim.c.

Referenced by sys_open_sgn().

void takeFileSamples | ( | sigGenPars_t * | sgn_gen,
 |  | int | frame_size,
 |  | linSample * | frame
 | ) |  |

Definition at line 930 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 996 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 1010 of file tdusim.c.

References sigGenPars_t::inst.

Referenced by main().

void sys_open_sgn ( sigGenPars_t * sgn )

Definition at line 1021 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 1052 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 1109 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 1187 of file tdusim.c.

References tduSim_t::cfgCtl, tduInst, and tduSim.

Referenced by main().

void overwriteScratchBuffers ( void )

Definition at line 1221 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 1241 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 1304 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 1374 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(), input_fpath, tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), sys_open_sgn(), sys_set_sgn(), sysCtDiscrim, system_CT_discrim_proc(), tdu_SIM_FILEIO_MU_PCM, tdu_SIM_INPUT_BASE_DIR, 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 1425 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(), input_fpath, 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, tdu_SIM_INPUT_BASE_DIR, 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 1478 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(), input_fpath, 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, tdu_SIM_INPUT_BASE_DIR, 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 1554 of file tdusim.c.

References tduSim_t::cache, tduSim_t::cfgCtl, sigGenPars_t::fileCLOSE, sigGenPars_t::fileFORMAT, sigGenPars_t::fileINPUT, sigGenPars_t::fileNAME, tduSim_t::frame_size, generate_tone_frame(), ignore_cnt, tduSim_t::options, 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 1700 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 1714 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 1737 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(), input_fpath, tduSim_t::options, tduSim_t::overwrite_scr, overwriteScratchBuffers(), sys_open_sgn(), sys_set_sgn(), tdu_SIM_FILEIO_MU_PCM, tdu_SIM_INPUT_BASE_DIR, 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 1807 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 58 of file tdusim.c.

Referenced by overwriteScratchBuffers(), and sys_new_tdu().

tint tduNbufs [static]

Definition at line 59 of file tdusim.c.

Referenced by overwriteScratchBuffers(), and sys_new_tdu().

volatile int tx_frame_no = 0

Definition at line 64 of file tdusim.c.

Referenced by sftBasicDetectionFILE().

volatile int rx_frame_no = 0

Definition at line 65 of file tdusim.c.

Referenced by sftBasicDetectionRxFILE(), and sftBasicDetectionRxFILE_NW().

volatile tlong txprof_beg_cnt

Definition at line 70 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong txprof_end_cnt

Definition at line 71 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong rxprof_beg_cnt

Definition at line 72 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong rxprof_end_cnt

Definition at line 73 of file tdusim.c.

Referenced by tduSimProfile().

volatile tlong ignore_beg_cnt

Definition at line 74 of file tdusim.c.

Referenced by sysDebugInfo(), and sysToneDetect().

volatile tlong ignore_end_cnt

Definition at line 75 of file tdusim.c.

Referenced by sysDebugInfo(), and sysToneDetect().

tlong txprof_cnt

Definition at line 76 of file tdusim.c.

Referenced by tduSimProfile().

tlong rxprof_cnt

Definition at line 77 of file tdusim.c.

Referenced by tduSimProfile().

tlong ignore_cnt

Definition at line 78 of file tdusim.c.

Referenced by sysDebugInfo(), sysToneDetect(), and tduSimProfile().

tlong tdu_prof_nxt_sec

Definition at line 79 of file tdusim.c.

Referenced by tduSimProfile().

tlong tdu_prof_sample_cnt

Definition at line 80 of file tdusim.c.

Referenced by tduSimProfile().

tuint tdu_prof_sec_cnt

Definition at line 81 of file tdusim.c.

Referenced by tduSimProfile().

char txprof_fstr[256]

Definition at line 82 of file tdusim.c.

Referenced by tduSimProfile().

char rxprof_fstr[256]

Definition at line 83 of file tdusim.c.

Referenced by tduSimProfile().

char prof_output[256]

Definition at line 84 of file tdusim.c.

Referenced by tduSimProfile().

char input_fpath[256]

Definition at line 85 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetectionFILE(), sftBasicDetectionRxFILE(), and sftBasicDetectionRxFILE_NW().

FILE* profile_fptr

Definition at line 86 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 119 of file tdusim.c.

Referenced by sysToneDetect().

char tone_strings[TDUSIM_NUM_TONE][TDUSIM_STRING_LENGTH]

Definition at line 138 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 191 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 198 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 204 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 209 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 214 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 219 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 227 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 233 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 238 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 244 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 249 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 255 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 260 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 266 of file tdusim.c.

Referenced by sysToneDetect().

char tdu_null_minor[1][TDUSIM_STRING_LENGTH]

Initial value:

 {
  "\0",
}

Definition at line 271 of file tdusim.c.

Referenced by sysToneDetect().

char event_string[TDUSIM_REPORT_STRING_LENGTH]

Definition at line 275 of file tdusim.c.

Referenced by sysToneDetect().

linSample rx_in_frame[TST_MAX_FRAME]

Definition at line 289 of file tdusim.c.

Referenced by sftBasicDetectionRxFILE(), sftBasicDetectionRxFILE_NW(), sftBasicRxDetection(), and tduSimProfile().

linSample tx_in_frame[TST_MAX_FRAME]

Definition at line 290 of file tdusim.c.

Referenced by sftAllDetectionFILE(), sftBasicDetection(), sftBasicDetectionFILE(), and tduSimProfile().

tuint sys_dbg_id

Definition at line 305 of file tdusim.c.

Referenced by sysDebugInternal().

tuint sys_dbg_array[2]

Definition at line 306 of file tdusim.c.

Referenced by sysDebugInfo().

char sys_dbg_message[tdu_SIM_DBGMSG_SIZE]

Definition at line 307 of file tdusim.c.

Referenced by sysDebugInternal().

tduSim_t tduSim

Definition at line 380 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 465 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 473 of file tdusim.c.

const tduDetContext_t* tduDetContexts[]

Definition at line 500 of file tdusim.c.

const tduIntFwTable_t tduIntFwTable

Definition at line 552 of file tdusim.c.

sysCtDiscrim_t sysCtDiscrim

Initial value:

 {
  0,
  CT_DISCRIM_STATE_RESET,
  0,
  0
}

Definition at line 613 of file tdusim.c.

Referenced by main(), sftBasicDetectionFILE(), and sysToneDetect().

tuint tduIntFwTable_size = sizeof(tduIntFwTable)

Definition at line 1732 of file tdusim.c.

tuint tduContext_size = sizeof(tduContext)

Definition at line 1733 of file tdusim.c.

tuint tduDetContexts_size = sizeof(tduDetContexts)

Definition at line 1734 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 /* Handle CCS Project paths */
00047 #ifdef  __CCS_PROJECT_REL_PATH
00048 #define tdu_SIM_PROFILE_BASE_DIR    "../../../vectors/profile/"
00049 #define tdu_SIM_INPUT_BASE_DIR      "../../../vectors/inp/"
00050 #else
00051 #define tdu_SIM_PROFILE_BASE_DIR    "../../vectors/profile/"
00052 #define tdu_SIM_INPUT_BASE_DIR      "../../vectors/inp/"
00053 #endif
00054
00055 /***************************************************************************/
00056 /* Global variables for volatile buffer overwrite                          */
00057 /***************************************************************************/
00058 static ecomemBuffer_t *tduBufs;
00059 static tint tduNbufs;
00060
00061 /***************************************************************************/
00062 /* Global frame counts                                                     */
00063 /***************************************************************************/
00064 volatile int tx_frame_no = 0;
00065 volatile int rx_frame_no = 0;
00066
00067 /***************************************************************************/
00068 /* Profiling variables (START)                                             */
00069 /***************************************************************************/
00070 volatile tlong txprof_beg_cnt;
00071 volatile tlong txprof_end_cnt;
00072 volatile tlong rxprof_beg_cnt;
00073 volatile tlong rxprof_end_cnt;
00074 volatile tlong ignore_beg_cnt;
00075 volatile tlong ignore_end_cnt;
00076 tlong txprof_cnt;
00077 tlong rxprof_cnt;
00078 tlong ignore_cnt;
00079 tlong tdu_prof_nxt_sec;
00080 tlong tdu_prof_sample_cnt;
00081 tuint tdu_prof_sec_cnt;
00082 char  txprof_fstr[256];
00083 char  rxprof_fstr[256];
00084 char  prof_output[256];
00085 char  input_fpath[256];
00086 FILE  *profile_fptr;
00087 /***************************************************************************/
00088 /* Profiling variables (END)                                               */
00089 /***************************************************************************/
00090
00091 /***************************************************************************/
00092 /* Result reporting definitions (START)                                    */
00093 /***************************************************************************/
00094 #define TDUSIM_REPORT_STRING_LENGTH 128
00095 #define TDUSIM_STRING_LENGTH         32
00096 #define TDUSIM_NUM_EVENT              4
00097 #define TDUSIM_NUM_DIGIT             16
00098 #define TDUSIM_NUM_DIRECTION          3
00099 #define TDUSIM_NUM_CED_MINOR          2
00100 #define TDUSIM_NUM_CEDPR_MINOR        2
00101 #define TDUSIM_NUM_V18_MINOR          2
00102 #define TDUSIM_NUM_SIA_MINOR          4
00103 #define TDUSIM_NUM_BELL_MINOR         3
00104 #define TDUSIM_NUM_V8BIS_MINOR        2
00105 #define TDUSIM_NUM_V21MODEM_MINOR     3
00106 #define TDUSIM_NUM_V23MODEM_MINOR     2
00107 #define TDUSIM_NUM_V21CI_MINOR        3
00108 #define TDUSIM_NUM_B202_MINOR         2
00109 #define TDUSIM_NUM_VDISC_MINOR        3
00110 #define TDUSIM_NUM_COIN_MINOR         2
00111 #define TDUSIM_NUM_TONE             (tdu_TID_LAST - tdu_TID_FIRST + 1)
00112 /***************************************************************************/
00113 /* Result reporting definitions (END)                                      */
00114 /***************************************************************************/
00115
00116 /***************************************************************************/
00117 /* Result reporting strings (START)                                        */
00118 /***************************************************************************/
00119 char digit_strings[TDUSIM_NUM_DIGIT][TDUSIM_STRING_LENGTH] = {
00120   "  Digit: \"0\"\0",
00121   "  Digit: \"1\"\0",
00122   "  Digit: \"2\"\0",
00123   "  Digit: \"3\"\0",
00124   "  Digit: \"4\"\0",
00125   "  Digit: \"5\"\0",
00126   "  Digit: \"6\"\0",
00127   "  Digit: \"7\"\0",
00128   "  Digit: \"8\"\0",
00129   "  Digit: \"9\"\0",
00130   "  Digit: \"A\"\0",
00131   "  Digit: \"B\"\0",
00132   "  Digit: \"C\"\0",
00133   "  Digit: \"D\"\0",
00134   "  Digit: \"*\"\0",
00135   "  Digit: \"#\"\0",
00136 };
00137
00138 char tone_strings[TDUSIM_NUM_TONE][TDUSIM_STRING_LENGTH] = {
00139   "  Tone: V21 FLAGS\0",
00140   "  Tone: V25 (TX)\0",
00141   "  Tone: V25 PR (TX)\0",
00142   "  Tone: CPT\0",
00143   "  Tone: V18A\0",
00144   "  Tone: SS7 COT\0",
00145   "  Tone: SF\0",
00146   "  Tone: CNG\0",
00147   "  Tone: SS7 COR\0",
00148   "  Tone: TT 1KHz\0",
00149   "  Tone: CID CAS (TX)\0",
00150   "  Tone: CID CAS (RX)\0",
00151   "  Tone: INVALID\0",
00152   "  Tone: INVALID\0",
00153   "  Tone: INVALID\0",
00154   "  Tone: V25 (RX)\0",
00155   "  Tone: V25 PR (RX)\0",
00156   "  Tone: BELL\0",
00157   "  Tone: V8BIS\0",
00158   "  Tone: V21\0",
00159   "  Tone: V23\0",
00160   "  Tone: V21 CM FAX\0",
00161   "  Tone: V21 CI\0",
00162   "  Tone: BELL 202\0",
00163   "  Tone: INVALID\0",
00164   "  Tone: INVALID\0",
00165   "  Tone: INVALID\0",
00166   "  Tone: VOICE DISC\0",
00167   "  Tone: COIN\0",
00168   "  Tone: INVALID\0",
00169   "  Tone: V21 CM\0",
00170   "  Tone: ANSAM (TX)\0",
00171   "  Tone: ANSAM PR (TX)\0",
00172   "  Tone: V21 LOWER\0",
00173   "  Tone: CRE2\0",
00174   "  Tone: INVALID\0",
00175   "  Tone: INVALID\0",
00176   "  Tone: INVALID\0",
00177   "  Tone: INVALID\0",
00178   "  Tone: INVALID\0",
00179   "  Tone: INVALID\0",
00180   "  Tone: INVALID\0",
00181   "  Tone: INVALID\0",
00182   "  Tone: INVALID\0",
00183   "  Tone: INVALID\0",
00184   "  Tone: ANSAM (RX)\0",
00185   "  Tone: ANSAM PR (RX)\0",
00186   "  Tone: V25 EARLY ALERT\0",
00187   "  Tone: V25 EARLY FALSE\0",
00188   "  Tone: SIA\0"
00189 };
00190
00191 char tdu_event[TDUSIM_NUM_EVENT][TDUSIM_STRING_LENGTH] = {
00192   "Event: OFF\0",
00193   "Event:  ON\0",
00194   "Event: ALERT OFF\0",
00195   "Event: ALERT  ON\0"
00196 };
00197
00198 char tdu_direction[TDUSIM_NUM_DIRECTION][TDUSIM_STRING_LENGTH] = {
00199   "     \0",
00200   " (TX)\0",
00201   " (RX)\0",
00202 };
00203
00204 char tdu_ced_minor[TDUSIM_NUM_CED_MINOR][TDUSIM_STRING_LENGTH] = {
00205   "    (Confirmed)\0",
00206   " (Early Report)\0",
00207 };
00208
00209 char tdu_cedpr_minor[TDUSIM_NUM_CEDPR_MINOR][TDUSIM_STRING_LENGTH] = {
00210   " (Confirmed)\0",
00211   "  (V.32 Ext)\0",
00212 };
00213
00214 char tdu_v18_minor[TDUSIM_NUM_V18_MINOR][TDUSIM_STRING_LENGTH] = {
00215   "  (Continuous Marks)\0",
00216   " (Continuous Spaces)\0",
00217 };
00218
00219 char tdu_sia_minor[TDUSIM_NUM_SIA_MINOR][TDUSIM_STRING_LENGTH] = {
00220   "  DC02 PULSE \0",
00221   "  DC02 DTMF \0",
00222   "  DC03 \0",
00223   "  DC05 \0",
00224 };
00225
00226
00227 char tdu_bell_minor[TDUSIM_NUM_BELL_MINOR][TDUSIM_STRING_LENGTH] = {
00228   "  (Bell 103 Ans Marks)\0",
00229   "    (V.22 Unscr Marks)\0",
00230   " (Bell 103 Orig Marks)\0",
00231 };
00232
00233 char tdu_v8bis_minor[TDUSIM_NUM_V8BIS_MINOR][TDUSIM_STRING_LENGTH] = {
00234   " (Init)\0",
00235   " (Resp)\0",
00236 };
00237
00238 char tdu_v21modem_minor[TDUSIM_NUM_V21MODEM_MINOR][TDUSIM_STRING_LENGTH] = {
00239   "  (Low Marks)\0",
00240   "   (Hi Marks)\0",
00241   " (Low Spaces)\0",
00242 };
00243
00244 char tdu_v23modem_minor[TDUSIM_NUM_V23MODEM_MINOR][TDUSIM_STRING_LENGTH] = {
00245   "  (Forward Marks)\0",
00246   " (Backward Marks)\0",
00247 };
00248
00249 char tdu_v21ci_minor[TDUSIM_NUM_V21CI_MINOR][TDUSIM_STRING_LENGTH] = {
00250   " (Text)\0",
00251   "  (Fax)\0",
00252   " (Data)\0",
00253 };
00254
00255 char tdu_b202_minor[TDUSIM_NUM_B202_MINOR][TDUSIM_STRING_LENGTH] = {
00256   "  (Continuous Marks)\0",
00257   " (Continuous Spaces)\0",
00258 };
00259
00260 char tdu_vdisc_minor[TDUSIM_NUM_VDISC_MINOR][TDUSIM_STRING_LENGTH] = {
00261   "  (Silence)\0",
00262   "    (Modem)\0",
00263   "    (Voice)\0",
00264 };
00265
00266 char tdu_coin_minor[TDUSIM_NUM_COIN_MINOR][TDUSIM_STRING_LENGTH] = {
00267   " (1537 & 2200 Hz)\0",
00268   " (1700 & 2200 Hz\0",
00269 };
00270
00271 char tdu_null_minor[1][TDUSIM_STRING_LENGTH] = {
00272   "\0",
00273 };
00274
00275 char event_string[TDUSIM_REPORT_STRING_LENGTH];
00276 /***************************************************************************/
00277 /* Result reporting strings (END)                                          */
00278 /***************************************************************************/
00279
00280 /****************************************************************
00281  * Frame counters in Tx and Rx direction, for interactive tests.
00282  ****************************************************************/
00283 #define tdu_SIM_TX_FILE_NAME  " "
00284 #define tdu_SIM_RX_FILE_NAME  " "
00285
00286 #define TST_MAX_FRAME     40    /* max frame size is 5 ms */
00287 #define TST_SAVE_BUFF     53    /* equal to extra */
00288
00289 linSample rx_in_frame[TST_MAX_FRAME];
00290 linSample tx_in_frame[TST_MAX_FRAME];
00291
00292 /*********************************/
00293 /* Input File formats definition */
00294 /*********************************/
00295 enum {
00296   tdu_SIM_FILEIO_MU_PCM = 0,     /* 8 bit Mu-law samples */
00297   tdu_SIM_FILEIO_A_PCM  = 1,     /* 8 bit A-law samples */
00298   tdu_SIM_FILEIO_LIN    = 2,     /* 16 bit linear samples */
00299   tdu_SIM_FILEIO_LINWAV = 3      /* 16 bit linear samples from Microsoft
00300                                    .wav files, with 44 byte header */
00301 };
00302
00303 /* System debug messaging */
00304 #define tdu_SIM_DBGMSG_SIZE   256
00305 tuint sys_dbg_id;     /* debug ID used in debug and exception functions */
00306 tuint sys_dbg_array[2];
00307 char  sys_dbg_message[tdu_SIM_DBGMSG_SIZE];
00308
00309 /* Forward function prototypes */
00310 void            sysDebugInfo (void* ID, tuint msgType, tuint msgCode,
00311                               tuint msgLength, tuint * supportingData);
00312 void            sysToneDetect (tuint ID, tint tid, tint on, tint time,
00313                                tint power_MF, tduCptSmartRep_t * cpt_report);
00314
00315 /* Nice way for doing endless loop */
00316 #define loop for(;;)
00317
00318
00319 /******************************************************************************
00320  * DATA DEFINITION: Control information.
00321  ******************************************************************************
00322  * DESCRIPTION: Control information that may be set-up from the simulator
00323  *              to change operating parameters.
00324  *
00325  *****************************************************************************/
00326
00327 /* Signal Generator Parameters */
00328 typedef struct {
00329   void            *inst;          /* Signal generator instance pointer */
00330   tbool           state;          /* TRUE: generator is on. */
00331   linSample       dc_offset;      /* DC offset (Q0) */
00332   tint            wf_type;        /* Waveform type (SGN_WFT_XXX) */
00333   tint            f1;             /* Frequency #1 (Hz) */
00334   tint            f2;             /* Frequency #2 (Hz) */
00335   linSample       t_amp1;         /* Amplitude of freq #1 (Q0) */
00336   linSample       t_amp2;         /* Amplitude of freq #2 (Q0) */
00337   tbool           pr_enable;      /* TRUE: phase reversal enabled */
00338   tint            pr_period;      /* Samples between phase reversals */
00339   tlong           fsk_duration;   /* FSK duration in number of bits */
00340   tint           *fsk_dataptr;    /* FSK data pointer */
00341   tint            fsk_numword;    /* Number of FSK bytes */
00342   tint            noise_level;    /* idle noise level in dBm0 */
00343   tuint           noise_seed;     /* idle noise seed */
00344   tint            noise_type;     /* noise type SGN_NT_xxx */
00345   tint            power_level;    /* Hoth or CSS power level in dBm0 */
00346   tulong          hoth_wng_seed;  /* Hoth noise seed */
00347   tuint           frm_count;      /* Count of frames generated */
00348   tbool           fileINPUT;      /* TRUE, data taken from file */
00349   tint            fileFORMAT;     /* Uses tdu_SIM_FILEIO_XXX enum above */
00350   tbool           fileCLOSE;      /* File closed indicator */
00351   char           *fileNAME;       /* File name string */
00352   FILE           *filePtr;        /* Pointer to file object */
00353 } sigGenPars_t;
00354
00355
00356 typedef struct {
00357   tint         max_frame_length;  /* max # samples in frame */
00358   tint         frame_size;        /* # samples in frame */
00359   tint         mf_type;           /* type of mf used for testing */
00360   tword        pattern;           /* Scratch buffer overwrite pattern */
00361   struct {
00362     tbool      overwrite_scr;     /* TRUE: Overwrite scratch buffers
00363                                             between calls */
00364     tbool      tdu_lite;          /* TRUE: Create TDU Lite */
00365     tbool      enable_sia;        /* TRUE: Enable SIA detection */
00366     tbool      profile;           /* TRUE: profile TDU */
00367     tbool      cache;             /* TRUE: Flush cache */
00368     tbool      report;            /* TRUE: Report digits */
00369     tbool      add_tag;           /* TRUE: Add test case tag to report */
00370     tbool      toggle_tdu;        /* TRUE: Configure TDU when possible */
00371     tbool      toggle_rx_sgn;     /* TRUE: Configure TX SGN when possible */
00372     tbool      toggle_tx_sgn;     /* TRUE: Configure RX SGN when possible */
00373   } options;
00374   tduCfgCtl_t  cfgCtl;            /* Initialized in sys_open_tdu() */
00375   sigGenPars_t rxSGN;             /* Rx Signal Generator Parameters */
00376   sigGenPars_t txSGN;             /* Tx Signal Generator Parameters */
00377 } tduSim_t;
00378
00379
00380 tduSim_t tduSim =
00381 { /* Simulation defaults */
00382   TST_MAX_FRAME,            /* max # samples per frame */
00383   40,                       /* 40 samples default frame duration */
00384   tdu_DET_ID_R1,            /* use DTMF as the default test */
00385   0x55,                     /* Scratch buffer overwrite pattern */
00386   { /* Boolean options */
00387     FALSE,                  /* Do not overwrite scratch by default */
00388     FALSE,                  /* Create full TDU by default */
00389     TRUE,                   /* Enable SIA detection by default */
00390     FALSE,                  /* Do not profile by default */
00391     TRUE,                   /* Use cache by default */
00392     TRUE,                   /* Report digit events by default */
00393     FALSE,                  /* Don't add test case tag to report */
00394     TRUE,                   /* Toggle TDU configuration */
00395     TRUE,                   /* Toggle RX SGN configuration */
00396     TRUE                    /* Toggle TX SGN configuration */
00397   },
00398   { /* TDU  config structure */
00399     0,
00400   },
00401   {  /* RX SGN parameters */
00402     (void *) NULL,          /* Instance pointer */
00403     TRUE,                   /* default state is on */
00404     0,                      /* default dc-offset */
00405     sgn_WFT_COSINE,         /* default waveform */
00406     2100,                   /* default RX SGN freq #1 in Hz (Q0) */
00407     0,                      /* default RX SGN freq #2 in Hz (Q0) */
00408     3000,                   /* default amplitudes of freq #1 */
00409     0,                      /* default amplitudes of freq #2 */
00410     TRUE,                   /* phase reversal enabled */
00411     3600,                   /* PR interval (in samples) */
00412     3L * 300,               /* FSK duration (3s on 300bps rate) */
00413     &v21_flags,             /* V.21 flags */
00414     1,                      /* 1 word for V21 flags */
00415     -80,                    /* default noise generator level in dBm0 */
00416     0,                      /* initial noise generator seed */
00417     sgn_NT_GAUSS,           /* Gaussian white noise */
00418     -70,                    /* default HOTH/CSS power level in dBm0 */
00419     84771,                  /* initial HOTH generator seed */
00420     0,                      /* RX SGN frame count */
00421     FALSE,                  /* File input NOT active */
00422     tdu_SIM_FILEIO_MU_PCM,  /* Mu-law PCM format file input */
00423     TRUE,                   /* File is unavailable (closed) */
00424     NULL,                   /* No name specified */
00425     NULL                    /* No file object */
00426   },
00427   { /* TX SGN parameters */
00428     (void *) NULL,          /* Instance pointer */
00429     TRUE,                   /* default state is on */
00430     0,                      /* default dc-offset */
00431     sgn_WFT_COSINE,         /* default waveform */
00432     500,                    /* default RX SGN freq #1 (Hz, Q0) */
00433     0,                      /* default RX SGN freq #2 (Hz, Q0) */
00434     3000,                   /* default amplitudes of freq #1 */
00435     0,                      /* default amplitudes of freq #2 */
00436     FALSE,                  /* phase reversal enabled */
00437     0,                      /* PR interval (samples) */
00438     3L * 300,               /* FSK duration (3s on 300bps rate) */
00439     &v21_flags,             /* V.21 flags */
00440     1,                      /* 1 word for V21 flags */
00441     -80,                    /* default noise generator level in dBm0 */
00442     0,                      /* initial noise generator seed */
00443     sgn_NT_GAUSS,           /* Gaussian white noise */
00444     -70,                    /* default HOTH/CSS power level in dBm0 */
00445     84771,                  /* initial HOTH generator seed */
00446     0,                      /* TX SGN frame count */
00447     FALSE,                  /* File input not active */
00448     tdu_SIM_FILEIO_MU_PCM,  /* Mu-law PCM format file input */
00449     TRUE,                   /* File is unavailable (closed) */
00450     NULL,                   /* No name specified */
00451     NULL                    /* No file object */
00452   },
00453 };
00454
00455 /*********************************************************
00456  * Results reported to system by TDU.
00457  *********************************************************/
00458 typedef struct {
00459   tint mf_tid;
00460   tint mf_on_off;
00461   tint hangover_time;
00462   tint mf_power;
00463   tduCptSmartRep_t cpt_report;
00464 } sysTduResults_t;
00465 sysTduResults_t sys_tdu_results;
00466
00467
00468 /*********************************************************************
00469  * Initialization requirements
00470  *********************************************************************/
00471
00472 /* Context structure contains data common to all TDU instances */
00473 tduContext_t tduContext = {
00474   sysToneDetect,
00475 #ifdef GG_INCLUDE_BDTEW
00476   sysBdtEwDetect,
00477 #else
00478   NULL,
00479 #endif
00480   NULL,
00481   NULL,
00482   NULL,
00483   NULL,
00484   NULL,
00485   NULL,
00486   NULL,
00487   sysDebugInfo,
00488   /* Following data are initialized in tduNew() */
00489   0, 0, 0, 0,
00490   NULL,
00491   NULL,
00492   NULL,
00493   0, 0, 0, 0,
00494   0, 0, 0, 0,
00495   0, 0, 0, 0,
00496   0, 0, 0, 0
00497 }; /* tduContext */
00498
00499 /* TDU Internal Contexts */
00500 const tduDetContext_t *tduDetContexts[] = {
00501 /*** Put all th SFDF detectors together, one after another ***/
00502   &tduIncV23BW_MARKS_F,
00503   &tduIncV21LOW_MARKS_F,
00504   &tduIncTT1khz_F,
00505   &tduIncCNG_F,
00506   &tduIncV21LOW_SPACES_F,
00507   &tduIncB202_MARKS_F,
00508   &tduIncBELLTX2_F,
00509   &tduIncV23FW_MARKS_F,
00510   &tduIncV18A_F,
00511   &tduIncV21UPPER_MARKS_F,
00512   &tduIncSS7COR_F,
00513   &tduIncV18A_S_F,
00514   &tduIncSS7COT_F,
00515   &tduIncV25_F,
00516   &tduIncB202_SPACES_F,
00517   &tduIncBELLTX1_F,
00518   &tduIncSF_F,
00519   &tduIncSIA_F,
00520   &tduIncSIA_S_F,
00521 /*** Put all the SFDT detectors together, one after another ***/
00522   &tduIncV23FW_MARKS_T,
00523   &tduIncSS7COT_T,
00524   &tduIncV25_T_RX,
00525   &tduIncBELLRX1_T,
00526   &tduIncBELLRX2_T,
00527 //  NULL,/* tdu_SFDT_DET_V18A_RX */
00528 //  NULL,/* tdu_SFDT_DET_V18A_S_RX */
00529 //  NULL,/* tdu_SFDT_DET_V21LOW_MARKS_RX */
00530 //  NULL,/* tdu_SFDT_DET_V21LOW_S_RX */
00531 //  NULL,/* tdu_SFDT_DET_CIDCAS_RX,tdu_SFDT_DET_CASH_RX  */
00532 //  NULL, /* tdu_SFDT_DET_CASH_RX */
00533   &tduIncSIA_T_RX,
00534   &tduIncSIA_S_T_RX,
00535   &tduIncSFDT_DUMMY1_T,
00536   &tduIncSFDT_DUMMY2_T,
00537   &tduIncSFDT_DUMMY3_T,
00538 /*** Put all th MF detectors together, one after another ***/
00539   &tduIncDTMF,
00540   &tduIncR1,
00541   &tduIncR2FW,
00542   &tduIncR2BW,
00543   &tduIncV8BIS_FS_F,
00544   &tduIncCOIN_TONES,
00545 /*** ... the rest ***/
00546   &tduIncV21,
00547   &tduIncCPT,
00548   NULL
00549 };
00550
00551 /* Definition of internal TDU framework and hooks */
00552 const tduIntFwTable_t tduIntFwTable = {
00553   { tduSFDControl,
00554     tduSFDFProcess   },
00555   { tduSFDControl,
00556     tduSFDTProcess,  },
00557   { tduMFControl,
00558     tduMFProcess,    },
00559   { tduCPTControl,
00560     tduCPTProcess,   },
00561   { tduV21Control,
00562     tduV21Process,   },
00563   { tduBDTEWControl,
00564     tduBDTEWProcess, },
00565
00566   /* Functions required by CID CAS */
00567 #if (defined (tdu_SIM_USE_CIDCAS))
00568   tdu_mf_cidcas_ctl,
00569 #else
00570   NULL,
00571 #endif
00572
00573   /* Functions required by Modem Relay */
00574 #if (defined (TDU_SIM_USE_LLMR_VOICE))
00575   tdu_sfd_llmr_ANSam_reset,
00576   tdu_sfd_llmr_ANSam,
00577   tdu_sfd_llmr_ANSam_test,
00578 #else
00579   NULL,
00580   NULL,
00581   NULL,
00582 #endif
00583
00584   /* Functions required by CRe - V.8bis */
00585   tdu_mf_v8bis_fs_ctl,
00586   tdu_digit_filter,
00587   tduVoiceDiscProcess,
00588   tduVoiceDiscCtl,
00589   tduBellTid,
00590   tdu_mf_coin_tones_ctl,
00591 };
00592
00593
00594 /* All defines below based on 8K sampling */
00595 #define TDU_SYS_CT1300_ENABLE_CNT     ( 600 * 8)          // V.23 detector re-enable sample count
00596 #define TDU_SYS_CT1300_RESET_CNT      (4000 * 8)          // No CT confirmation - reset
00597 #define TDU_SYS_CT1300_DWINLO_CNT     ((500 + 1500) * 8)  // CT re-detect window - low
00598 #define TDU_SYS_CT1300_DWINHI_CNT     ((700 + 2000) * 8)  // CT re-detect window - high
00599
00600 enum {
00601   CT_DISCRIM_STATE_RESET,       /* Reset - waiting for first V.23 detection */
00602   CT_DISCRIM_STATE_V23RPT,      /* V.23 reported, waiting to re-enable detector */
00603   CT_DISCRIM_STATE_V23ENA       /* V.23 re-enabled, waiting for next detection */
00604 };
00605
00606 typedef struct {
00607   tuint timer_cnt;    /* Timer in milliseconds */
00608   tint  state;        /* Discrimination state */
00609   tint  detect_cnt;   /* Count of V.23 detections */
00610   tint  detect_req;   /* V.23 re-detections required to declare CT */
00611 } sysCtDiscrim_t;
00612
00613 sysCtDiscrim_t sysCtDiscrim = {
00614   0,
00615   CT_DISCRIM_STATE_RESET,
00616   0,
00617   0     // Set in main
00618 };
00619
00620 /******************************************************************************
00621  * FUNCTION PURPOSE: V.23 report action for discrimination
00622  ******************************************************************************/
00623 void system_CT_discrim_rpt (sysCtDiscrim_t *dsc)
00624 {
00625   /* Determine actions based solely on state */
00626   switch (dsc->state) {
00627
00628   /* Pre-detection */
00629   case CT_DISCRIM_STATE_RESET:
00630     dsc->detect_cnt = 0;
00631     dsc->timer_cnt  = 0;
00632     dsc->state      = CT_DISCRIM_STATE_V23RPT;
00633     break;
00634
00635   /* V.23 detected - waiting to re-enable (should never enter here) */
00636   case CT_DISCRIM_STATE_V23RPT:
00637     fprintf (stdout, "Error in 1300Hz CT discrimination: Bad State\n");
00638     dsc->state = CT_DISCRIM_STATE_RESET;
00639     break;
00640
00641   /* V.23 re-enabled - waiting for another detection */
00642   case CT_DISCRIM_STATE_V23ENA:
00643     /* Check if detection is within valid window */
00644     if (dsc->timer_cnt < TDU_SYS_CT1300_DWINLO_CNT) {
00645       fprintf (stdout,"\n    V.23 Period:  %dms - BAD (low)",dsc->timer_cnt>>3);
00646     }
00647     else if (dsc->timer_cnt > TDU_SYS_CT1300_DWINHI_CNT) {
00648       fprintf (stdout,"\n    V.23 Period:  %dms - BAD (high)",dsc->timer_cnt>>3);
00649     }
00650     else {
00651       fprintf (stdout,"\n    V.23 Period:  %dms - GOOD",dsc->timer_cnt>>3);
00652       dsc->detect_cnt++;
00653     }
00654     fflush (stdout);
00655
00656     /* Check if required detection count if met */
00657     if (dsc->detect_cnt >= dsc->detect_req) {
00658       /* Yes - report discrimination (and return to reset state) */
00659       fprintf (stdout,"\n    1300Hz CT Discriminated\n");
00660       fflush (stdout);
00661       dsc->state = CT_DISCRIM_STATE_RESET;
00662     }
00663     else {
00664       /* No - reset timer return to V.23 reported state */
00665       dsc->timer_cnt = 0;
00666       dsc->state     = CT_DISCRIM_STATE_V23RPT;
00667     }
00668     break;
00669   }
00670 }
00671
00672 /******************************************************************************
00673  * FUNCTION PURPOSE: Discriminate process (V.23 versus CT)
00674  ******************************************************************************/
00675 void system_CT_discrim_proc (sysCtDiscrim_t *dsc)
00676 {
00677   /* Actions based on state and timer value */
00678   switch (dsc->state) {
00679
00680   /* No V.23 detection yet */
00681   case CT_DISCRIM_STATE_RESET:
00682     return;
00683
00684   /* Single V.23 detection */
00685   case CT_DISCRIM_STATE_V23RPT:
00686     /* Update "timer" */
00687     dsc->timer_cnt += tduSim.frame_size;
00688
00689     /* Check for V.23 re-enable */
00690     if (dsc->timer_cnt >= TDU_SYS_CT1300_ENABLE_CNT) {
00691       /* Re-enable V.23 detection */
00692       memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
00693       tduControl (tduInst, tdu_CTL_V23_TONES_ON, &tduSim.cfgCtl);
00694       /* Change state */
00695       dsc->state = CT_DISCRIM_STATE_V23ENA;
00696     }
00697     break;
00698
00699   case CT_DISCRIM_STATE_V23ENA:
00700     /* Update "timer" */
00701     dsc->timer_cnt += tduSim.frame_size;
00702
00703     if (dsc->timer_cnt >= TDU_SYS_CT1300_RESET_CNT) {
00704       /* Discriminator timeout - reset state machine */
00705       dsc->state = CT_DISCRIM_STATE_RESET;
00706     }
00707     break;
00708   }
00709 }
00710
00711
00712 /******************************************************************************
00713  * FUNCTION PURPOSE: Receive TDU detected events
00714  ******************************************************************************
00715  * DESCRIPTION: Transfers data to global variables and maintains some basic
00716  *              statistics.
00717  ******************************************************************************/
00718 void sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF,
00719                     tduCptSmartRep_t *cpt_report)
00720 {
00721   tlong cycle_count;
00722   tint  tone_id;
00723   tint  tone_type;
00724   tint  tone_dir;
00725   tbool v23_found;
00726   char  *tdu_minor;
00727
00728   /* For profiling */
00729   if (tduSim.options.profile) {
00730     ignore_beg_cnt = profile_getCPUcycleCount ();
00731   }
00732
00733   tone_id   =   tid & tdu_TID_MASK_ID;
00734   tone_type = ((tid & tdu_TID_TYPE_MASK) >> 10);
00735   tone_dir  = ((tid & 0x0300) >> 8);
00736   v23_found = FALSE;
00737
00738   sys_tdu_results.mf_tid        = tid;
00739   sys_tdu_results.mf_on_off     = on;
00740   sys_tdu_results.hangover_time = time;
00741   sys_tdu_results.mf_power      = power_MF;
00742
00743   if (tduSim.options.report) {
00744     /* Get minor string pointer (if any) */
00745     switch (tone_id) {
00746       case tdu_TID_V25:
00747       case tdu_TID_V25_RX:
00748         tdu_minor = tdu_ced_minor[tone_type];
00749         break;
00750       case tdu_TID_V25_PR:
00751       case tdu_TID_V25_RX_PR:
00752         tdu_minor = tdu_cedpr_minor[tone_type];
00753         break;
00754       case tdu_TID_V18A:
00755         tdu_minor = tdu_v18_minor[tone_type];
00756         break;
00757       case tdu_TID_BELL:
00758         tdu_minor = tdu_bell_minor[tone_type];
00759         break;
00760       case tdu_TID_V8BIS_TONES:
00761         tdu_minor = tdu_v8bis_minor[tone_type];
00762         break;
00763       case tdu_TID_V21_TONES:
00764         tdu_minor = tdu_v21modem_minor[tone_type];
00765         break;
00766       case tdu_TID_V23_TONES:
00767         tdu_minor = tdu_v23modem_minor[tone_type];
00768         v23_found = TRUE;
00769         break;
00770       case tdu_TID_V21_CI:
00771         tdu_minor = tdu_v21ci_minor[tone_type];
00772         break;
00773       case tdu_TID_B202_TONES:
00774         tdu_minor = tdu_b202_minor[tone_type];
00775         break;
00776       case tdu_TID_VOICE_DISC:
00777         tdu_minor = tdu_vdisc_minor[tone_type];
00778         break;
00779       case tdu_TID_COIN_TONES:
00780         tdu_minor = tdu_coin_minor[tone_type];
00781         break;
00782       case tdu_TID_SIA:
00783         tdu_minor = tdu_sia_minor[tone_type];
00784         break;
00785       default:
00786         tdu_minor = tdu_null_minor[tone_type];
00787         break;
00788     }
00789
00790     /* Create tone event string */
00791     if (tone_id < tdu_TID_FIRST) {
00792       strcpy (event_string, digit_strings[tone_id]);
00793     }
00794     else {
00795       strcpy (event_string, tone_strings[tone_id-tdu_TID_FIRST]);
00796     }
00797     strcat(event_string, tdu_direction[tone_dir]);
00798     strcat(event_string, tdu_minor);
00799
00800     /* Print results to STDOUT and report file */
00801     if (tduSim.options.add_tag) {
00802       fprintf (stdout,  "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d,  %s",
00803                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count,
00804                tduTestCaseTag);
00805       fprintf (freport, "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d,  %s",
00806                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count,
00807                tduTestCaseTag);
00808     }
00809     else {
00810       fprintf (stdout,  "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d",
00811                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count);
00812       fprintf (freport, "\n%s:  %s,  Time: %4d ms,  Power: %3d dBm0,  Frame: %d",
00813                event_string, tdu_event[on], time, power_MF, tduSim.txSGN.frm_count);
00814     }
00815     fflush (stdout);
00816   }
00817
00818   /* 1300Hz CT discrimination */
00819   if (v23_found) {
00820     system_CT_discrim_rpt (&sysCtDiscrim);
00821   }
00822   /* Additional reporting for CPT */
00823   if (cpt_report != NULL) {
00824     sys_tdu_results.cpt_report = *cpt_report;
00825   }
00826
00827   /* For profiling */
00828   if (tduSim.options.profile) {
00829     ignore_end_cnt = profile_getCPUcycleCount ();
00830     cycle_count    = (ignore_end_cnt > ignore_beg_cnt);
00831     if (cycle_count < 0) {
00832       cycle_count += sdk_PROFILE_MAXCNT;
00833     }
00834     ignore_cnt += cycle_count;
00835   }
00836 }
00837
00838 /******************************************************************************
00839  * FUNCTION PURPOSE: Debug & exception functions.
00840  ******************************************************************************
00841  * DESCRIPTION: Debug & exception functions.
00842  *
00843  *****************************************************************************/
00844
00845 void sysDebugInfo (void *ID, tuint msgType, tuint msgCode, tuint msgLength,
00846                    tuint * supportingData)
00847 {
00848   tlong cycle_count;
00849   volatile tint exit_flag;
00850
00851   /* For profiling */
00852   if (tduSim.options.profile) {
00853     ignore_beg_cnt = profile_getCPUcycleCount ();
00854   }
00855
00856   exit_flag = 1;
00857
00858   switch (msgType) {
00859     /* Convert message code to a string -- call system exception handler */
00860     case dbg_EXCEPTION_FATAL:
00861       sys_dbg_array[0] = *((tuint *) ID);
00862       sys_dbg_array[1] = msgCode;
00863       while (exit_flag);
00864       break;
00865     /* Post debug trace to debug task */
00866     case dbg_TRACE_INFO:
00867       fprintf (freport, "\nFrames:%4d ID:%04x msgCode:%d [%04x][%04x]",
00868                tduSim.txSGN.frm_count, ID, msgCode, supportingData[0],
00869                supportingData[1]);
00870       break;
00871     /* Ignore invalid message types */
00872     default:
00873       break;
00874   }
00875
00876   /* For profiling */
00877   if (tduSim.options.profile) {
00878     ignore_end_cnt = profile_getCPUcycleCount ();
00879     cycle_count    = (ignore_end_cnt > ignore_beg_cnt);
00880     if (cycle_count < 0) {
00881       cycle_count += sdk_PROFILE_MAXCNT;
00882     }
00883     ignore_cnt += cycle_count;
00884   }
00885 }
00886
00887 /******************************************************************************/
00888 static inline void sysDebugInternal (tuint id, char *str)
00889 {
00890   tint  i;
00891   char *src;
00892   char *dst;
00893
00894   /* Copy id and message in a safe place */
00895   sys_dbg_id = id;
00896   src = str;
00897   dst = (char *) &sys_dbg_message[0];
00898   for (i=0; i<tdu_SIM_DBGMSG_SIZE; i++) {
00899     *dst++ = *src++;
00900   }
00901 }
00902
00903 void sysDebug (tuint id, char *s)
00904 {
00905   sysDebugInternal (id, s);
00906 }
00907
00908 void sysException (tuint id, char *s)
00909 {
00910   sysDebugInternal (id, s);
00911   /* loop forever */
00912   loop;
00913 }
00914
00915 /******************************************************************************/
00916 sgnFileIo_t *sys_input_file (sgnFileIo_t *dsc)
00917 {
00918 #ifndef _HWDSKT
00919   asm (" nop");
00920   asm (" nop");
00921   asm (" nop");
00922   asm (" nop");
00923   asm (" nop");
00924   asm (" nop");
00925 #endif
00926   return (dsc);
00927 }
00928
00929 /******************************************************************************/
00930 void takeFileSamples (sigGenPars_t *sgn_gen, int frame_size, linSample *frame)
00931 {
00932   unsigned char frame_pcm[TST_MAX_FRAME];
00933   tint i, j;
00934
00935   switch (sgn_gen->fileFORMAT) {
00936     case tdu_SIM_FILEIO_MU_PCM:
00937     case tdu_SIM_FILEIO_A_PCM:
00938       if (sgn_gen->fileCLOSE) {
00939         sgn_gen->fileCLOSE = FALSE;
00940         if ((sgn_gen->filePtr = fopen (sgn_gen->fileNAME, "rb")) == NULL)
00941           exit (0);
00942       }
00943       /* Read 8-bit PCM samples */
00944       if (fread (frame_pcm, 1, frame_size, sgn_gen->filePtr) != frame_size) {
00945         fclose (sgn_gen->filePtr);
00946         sgn_gen->fileCLOSE = TRUE;
00947       }
00948       /* Expand samples */
00949       if (sgn_gen->fileFORMAT == tdu_SIM_FILEIO_MU_PCM) {
00950         for (i=0; i<frame_size; i++) {
00951           frame[i] = muaTblUlaw[frame_pcm[i]];
00952         }
00953       }
00954       /* A law samples */
00955       else {
00956         for (i=0; i<frame_size; i++) {
00957           frame[i] = muaTblAlaw[frame_pcm[i]];
00958         }
00959       }
00960       break;
00961     case tdu_SIM_FILEIO_LIN:
00962     case tdu_SIM_FILEIO_LINWAV:
00963       if (sgn_gen->fileCLOSE) {
00964         sgn_gen->fileCLOSE = FALSE;
00965         if ((sgn_gen->filePtr = fopen (tdu_SIM_TX_FILE_NAME, "rb")) == NULL) {
00966           exit (0);
00967         }
00968         if (sgn_gen->fileFORMAT == tdu_SIM_FILEIO_LINWAV) {
00969           /* skip over .wav header */
00970           fseek (sgn_gen->filePtr, 44, SEEK_SET);
00971         }
00972       }
00973       /* Read first half of linear samples */
00974       if (fread (frame_pcm, sizeof (unsigned char), frame_size, sgn_gen->filePtr) != frame_size) {
00975         fclose (sgn_gen->filePtr);
00976         sgn_gen->fileCLOSE = TRUE;
00977         break;
00978       }
00979       for (i=0,j=0; i<frame_size; j++,i+=2) {
00980         *frame++ = (linSample) (((tuint) frame_pcm[i + 1] << 8) | (tuint) frame_pcm[i]);
00981       }
00982
00983       /* Read second half of linear samples */
00984       if (fread (frame_pcm, sizeof (unsigned char), frame_size, sgn_gen->filePtr) != frame_size) {
00985         fclose (sgn_gen->filePtr);
00986         sgn_gen->fileCLOSE = TRUE;
00987         break;
00988       }
00989       for (i=0,j=0; i<frame_size; j++, i+=2) {
00990         *frame++ = (linSample) (((tuint) frame_pcm[i + 1] << 8) | (tuint) frame_pcm[i]);
00991       }
00992   }
00993 }
00994
00995 /******************************************************************************/
00996 void generate_tone_frame (sigGenPars_t *sgn, tint frame_size, linSample *frame)
00997 {
00998   sgn->frm_count++;
00999
01000   if (sgn->fileINPUT) {
01001     takeFileSamples (sgn, frame_size, frame);
01002   }
01003   else {
01004     /* Generate one frame of samples */
01005     sgnGenerateFrame (sgn->inst, frame_size, frame);
01006   }
01007 }
01008
01009 /******************************************************************************/
01010 void sys_new_sgn (sigGenPars_t *sgn)
01011 {
01012   tint ret_code;
01013   tint inst_sz;
01014
01015   /* Get instance size and allocate memory */
01016   ret_code  = sgnGetSizes (&inst_sz);
01017   sgn->inst = (ret_code == sgn_NOERR) ? malloc (inst_sz) : NULL;
01018 }
01019
01020 /******************************************************************************/
01021 void sys_open_sgn (sigGenPars_t *sgn)
01022 {
01023   sgnConfig_t cfg;
01024
01025   cfg.dc_offset     = sgn->dc_offset;
01026   cfg.wf_type       = sgn->wf_type;
01027   cfg.f1            = sgn->f1;
01028   cfg.f2            = sgn->f2;
01029   cfg.t_amp1        = sgn->t_amp1;
01030   cfg.t_amp2        = sgn->t_amp2;
01031   cfg.pr_period     = sgn->pr_period;
01032   cfg.pr_enable     = sgn->pr_enable;
01033   cfg.fsk_dataptr   = sgn->fsk_dataptr;
01034   cfg.fsk_numword   = sgn->fsk_numword;
01035   cfg.noise_level   = sgn->noise_level;
01036   cfg.noise_seed    = sgn->noise_seed;
01037   cfg.noise_type    = sgn->noise_type;
01038   cfg.power_level   = sgn->power_level;
01039   cfg.hoth_wng_seed = sgn->hoth_wng_seed;
01040   cfg.file_io_fcn   = sys_input_file;
01041   cfg.Fs            = 8000;
01042   cfg.fsk_duration  = 90;
01043   cfg.exception     = sysException;
01044   cfg.debug         = sysDebug;
01045   cfg.delay         = 0;
01046
01047   /* Initialize Signal generator instance */
01048   sgnInit (sgn->inst, &cfg);
01049 }
01050
01051 /******************************************************************************/
01052 void sys_set_sgn (sigGenPars_t *sgn)
01053 {
01054   sgnControl_t ctl;
01055
01056   /* Set DC offset */
01057   ctl.code        = sgn_CTL_DCOFFSET;
01058   ctl.u.dc_offset = sgn->dc_offset;
01059   sgnControl (sgn->inst, &ctl);
01060
01061   if (sgn->wf_type == sgn_WFT_CSS || sgn->wf_type == sgn_WFT_CSS_DTK) {
01062     ctl.code = sgn_CTL_CSS_POW;
01063     ctl.u.power_level = (sgn->state) ? sgn->power_level : -80;
01064   }
01065   else if (sgn->wf_type == sgn_WFT_HOTH) {
01066     ctl.code = sgn_CTL_HOTH_POW;
01067     ctl.u.power_level = (sgn->state) ? sgn->power_level : -80;
01068   }
01069   else {
01070     ctl.code = sgn_CTL_TONE;
01071     ctl.u.t.f1 = sgn->f1;
01072     ctl.u.t.f2 = sgn->f2;
01073   ctl.Fs = 8000;
01074     ctl.u.t.amp1 = (sgn->state) ? sgn->t_amp1 : 0;
01075     ctl.u.t.amp2 = (sgn->state) ? sgn->t_amp2 : 0;
01076   }
01077   sgnControl (sgn->inst, &ctl);
01078
01079   ctl.code = sgn_CTL_FSK_300;
01080   ctl.u.fsk.duration = sgn->fsk_duration;
01081   ctl.u.fsk.dataptr  = sgn->fsk_dataptr;
01082   ctl.u.fsk.numword  = sgn->fsk_numword;
01083   sgnControl (sgn->inst, &ctl);
01084
01085   ctl.code = (sgn->pr_enable ? sgn_CTL_PRON : sgn_CTL_PROFF);
01086   ctl.u.pr_period = sgn->pr_period;
01087   sgnControl (sgn->inst, &ctl);
01088
01089   ctl.code = sgn_CTL_NOISE;
01090   ctl.u.noise_level = (sgn->state) ? sgn->noise_level : -80;
01091   sgnControl (sgn->inst, &ctl);
01092 }
01093
01094 /******************************************************************************
01095  * FUNCTION PURPOSE: Create TDU module.
01096  ******************************************************************************
01097  * DESCRIPTION: Obtains info on TDU buffers, and creates one instance of TDU.
01098  *
01099  *              NOTE: Should save number of buffers and buffer descriptors
01100  *                    in order to make delete possible.
01101  *
01102  *  void sys_new_tdu (
01103  *    tint chnum,                               - channel number (1 to SYS_MAX_CHANNELS)
01104  *
01105  *    tint max_frame_length,  - maximum # samples in the frame (must be
01106  *                              greater than or equal to maximum sub-segment
01107  *                              size)
01108  *****************************************************************************/
01109 void sys_new_tdu (tint chnum, tint max_frame_length, tint lite)
01110 {
01111   ecomemBuffer_t  *bufs;
01112   tduSizeConfig_t sizeCfg;
01113   tduNewConfig_t  tduCfgNew;
01114   tint            i, result;
01115   tuint           mId;
01116
01117   /* TDU get sizes */
01118   sizeCfg.maxSamplesPerFrame = max_frame_length;
01119   sizeCfg.lite = lite;          /* FULL or LITE TDU */
01120
01121   /* TDU get sizes */
01122   result = tduGetSizes (&tduNbufs, (const ecomemBuffer_t **) &bufs, &sizeCfg);
01123   if (!(result == tdu_NOERR)) {
01124     sysException (0xbaba, "invalid sizes");
01125   }
01126
01127   /* Allocate Buffers */
01128   tduBufs = (ecomemBuffer_t *) malloc (tduNbufs * sizeof (ecomemBuffer_t));
01129   if (tduBufs == NULL) {
01130     sysException (0xbaba, "no memory");
01131   }
01132
01133   /* */
01134   for (i=0; i<tduNbufs; i++) {
01135     tduBufs[i]           = bufs[i];
01136     tduBufs[i].mclass    = ecomem_CLASS_EXTERNAL;
01137     tduBufs[i].log2align = bufs[i].log2align;
01138     tduBufs[i].volat     = bufs[i].volat;
01139 #if (defined(ti_targets_C64) || defined(ti_targets_C64_big_endian) ||  defined(ti_targets_C64P) || defined(ti_targets_C64P_big_endian) )
01140     tduBufs[i].base      = (bufs[i].size) ? memalign((1 << bufs[i].log2align),bufs[i].size) : NULL;
01141 #else
01142     {
01143       tuint linAlign;
01144       linAlign = (tuint) 1 << bufs[i].log2align;
01145       tduBufs[i].base = (bufs[i].size) ? malloc(bufs[i].size + linAlign -1) : NULL;
01146       tduBufs[i].base = (void *)((((tulong)tduBufs[i].base)+(linAlign)-1)&(0xFFFFFFFFUL-(linAlign)+1));
01147    }
01148 #endif
01149   }
01150
01151   /* tduNew */
01152   mId = lite ? 0x11 : 0x22;
01153   tduCfgNew.ID = (mId << 8) | chnum;
01154   tduCfgNew.sizeCfg = sizeCfg;
01155   if (tduNew (&tduInst, tduNbufs, tduBufs, &tduCfgNew) != tdu_NOERR) {
01156     sysException (0xbaba, "tduNew");
01157   }
01158 }
01159
01160 /******************************************************************************
01161  * FUNCTION PURPOSE: Open TDU module.
01162  ******************************************************************************
01163  * DESCRIPTION: Opens one instance of TDU module.
01164  *
01165  *  void sys_open_tdu (
01166  *    int chnum,            - channel number (1 to SYS_MAX_CHANNELS)
01167  *    int tdu_mf_type,      - tdu_DTMF        (DTMF tones),
01168  *                            tdu_R2_FORWARD  (R2 forward signalling)
01169  *                            tdu_R2_BACKWARD (R2 backward signalling)
01170  *                            tdu_NO5         (No.5 signalling)
01171  *    int frame_size            - # samples in the frame (must be
01172  *                                greater than or equal to sub-segment size)
01173  *    tint freq_pow_thresh_low  - low power level threshold for each frequency
01174  *                                in dBm as integer
01175  *    tint freq_pow_thresh_high - high power level threshold for each frequency
01176  *                                in dBm as integer
01177  *    tint twist_negative       - tolerable difference in dB  of the
01178  *                                difference between the lower and the higher
01179  *                                group of frequencies
01180  *    tint twist_positive;      - tolerable difference in dB  of the
01181  *                                difference between the higher and the lower
01182  *                                group of frequencies
01183  *    tint break_thresh         - threshold for break detection in dBm. When signal
01184  *                                power falls below this threshold, break is detected
01185  *
01186  *****************************************************************************/
01187 void sys_open_tdu (int chnum, tint mf_type, int frame_size, tint freq_pow_thresh_low,
01188                    tint freq_pow_thresh_high, tint twist_negative, tint twist_positive,
01189                    tint break_thresh)
01190 {
01191   tduConfig_t tduCfg;
01192   tint        tduMode;
01193
01194   /* Prepare common configuration options */
01195   tduSim.cfgCtl.u.mf.freqPowThreshLow  = freq_pow_thresh_low;
01196   tduSim.cfgCtl.u.mf.freqPowThreshHigh = freq_pow_thresh_high;
01197   tduSim.cfgCtl.u.mf.twistPositive     = twist_positive;
01198   tduSim.cfgCtl.u.mf.twistNegative     = twist_negative;
01199   tduSim.cfgCtl.u.mf.breakThresh       = break_thresh;
01200
01201   tduCfg.frame_size = frame_size;
01202   tduMode = mf_type;
01203
01204   /* Open TDU instance */
01205   tduOpen (tduInst, &tduCfg);
01206
01207   /* start DTMF detector */
01208   tduControl (tduInst, tduMode, &tduSim.cfgCtl);
01209
01210   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01211                                             tdu_POSITION_SEC_ACBC_CHANGED |
01212                                             tdu_POSITION_TXRX_CHANGED;
01213   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
01214                                             tdu_POSITION_SEC_AC;
01215   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01216 }
01217
01218 /******************************************************************************
01219  * FUNCTION PURPOSE: Overwrite scratch buffers.
01220  ******************************************************************************/
01221 void overwriteScratchBuffers (void)
01222 {
01223   tint i;
01224
01225   for (i=0; i<tduNbufs; i++) {
01226     if (tduBufs[i].volat) {
01227       memset (tduBufs[i].base, tduSim.pattern, tduBufs[i].size);
01228     }
01229   }
01230 }
01231
01232 /*---------------------------------------------------------------------------**
01233 **                                                                           **
01234 **      API's for the Basic Detection Test                                   **
01235 **                                                                           **
01236 **---------------------------------------------------------------------------*/
01237
01238 /******************************************************************************
01239  * FUNCTION PURPOSE: Iterates tdu over numFrames frames - single tone detector
01240  *****************************************************************************/
01241 void sftBasicDetection (void *tduInst, tint control_code, tint numOnFrames,
01242                         tint numOffFrames, float tonePower, float freq)
01243 {
01244   tint            i;
01245
01246   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01247   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01248                                             tdu_POSITION_SEC_ACBC_CHANGED |
01249                                             tdu_POSITION_TXRX_CHANGED;
01250   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
01251                                             tdu_POSITION_SEC_AC;
01252   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01253
01254   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01255   tduControl (tduInst, control_code, &tduSim.cfgCtl);
01256
01257   fprintf (stdout, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms ON, %d ms OFF",
01258            freq, tonePower, (numOnFrames*tduSim.frame_size)/8,
01259            (numOffFrames*tduSim.frame_size)/8);
01260
01261   fprintf (freport, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms ON, %d ms OFF",
01262            freq, tonePower, (numOnFrames*tduSim.frame_size)/8,
01263            (numOffFrames*tduSim.frame_size)/8);
01264
01265   sprintf (tduTestCaseTag, "\nTONE %d pow=(%f) freq=(%f) frames=(%d %d)",
01266            control_code, tonePower, freq, numOnFrames, numOffFrames);
01267
01268   tduSim.txSGN.f1        = freq;
01269   tduSim.txSGN.f2        = 0;
01270   tduSim.txSGN.t_amp1    = (linSample) pow (10, (tonePower + 87.29869874256) / 20.0);
01271   tduSim.txSGN.t_amp2    = 0;
01272   tduSim.txSGN.pr_enable = 0;
01273   tduSim.txSGN.pr_period = 0;
01274   tduSim.txSGN.wf_type   = 1;
01275   tduSim.rxSGN.f1        = 0;
01276   tduSim.rxSGN.f2        = 0;
01277   tduSim.rxSGN.t_amp1    = 0;
01278   tduSim.rxSGN.t_amp2    = 0;
01279   tduSim.rxSGN.pr_enable = 0;
01280
01281   /* Initialize signal generator */
01282   sys_open_sgn (&tduSim.rxSGN);
01283   sys_open_sgn (&tduSim.txSGN);
01284
01285   for (i=0; i<(numOnFrames + numOffFrames); i++) {
01286     if (i == numOnFrames) {
01287       tduSim.txSGN.t_amp1 = 0;
01288       sys_set_sgn (&tduSim.txSGN);
01289     }
01290     /* Generate input frames */
01291     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01292
01293     /* Check for scratch buffer overwrite */
01294     if (tduSim.options.overwrite_scr) {
01295       overwriteScratchBuffers ();
01296     }
01297
01298     /* Call TDU - Tx path */
01299     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01300   }
01301 }
01302
01303 /*****************************************************************************/
01304 void sftBasicRxDetection (void *tduInst, tint control_code, tint position,
01305                           tint location, float tonePower, tint prFlag,
01306                           float FreqRx, tint numRxFramesStart, tint numRxFramesStop,
01307                           tint numFrames)
01308 {
01309   tint            i;
01310
01311   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01312   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01313                                             tdu_POSITION_SEC_ACBC_CHANGED |
01314                                             tdu_POSITION_TXRX_CHANGED;
01315   tduSim.cfgCtl.u.position.value_bitfield = position;
01316   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01317
01318   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01319   tduControl (tduInst, control_code, &tduSim.cfgCtl);
01320
01321   fprintf (stdout, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms OFF, %d ms ON, %d ms OFF",
01322            FreqRx, tonePower, ((numRxFramesStart)*tduSim.frame_size)/8,
01323            ((numRxFramesStop-numRxFramesStart)*tduSim.frame_size)/8,
01324            ((numFrames-numRxFramesStop)*tduSim.frame_size)/8);
01325
01326   fprintf (freport, "\nSignal: %5.1f Hz, %5.2f dBm0, %d ms OFF, %d ms ON, %d ms OFF",
01327            FreqRx, tonePower, ((numRxFramesStart)*tduSim.frame_size)/8,
01328            ((numRxFramesStop-numRxFramesStart)*tduSim.frame_size)/8,
01329            ((numFrames-numRxFramesStop)*tduSim.frame_size)/8);
01330
01331   tduSim.txSGN.f1        = 0;
01332   tduSim.txSGN.f2        = 0;
01333   tduSim.txSGN.t_amp1    = 0;
01334   tduSim.txSGN.t_amp2    = 0;
01335   tduSim.txSGN.pr_enable = 0;
01336   tduSim.txSGN.pr_period = 0;
01337   tduSim.txSGN.wf_type   = 1;
01338   tduSim.rxSGN.f1        = FreqRx;
01339   tduSim.rxSGN.f2        = 0;
01340   tduSim.rxSGN.t_amp1    = 0;
01341   tduSim.rxSGN.t_amp2    = 0;
01342   tduSim.rxSGN.pr_enable = prFlag;
01343   tduSim.rxSGN.pr_period = 2000;
01344
01345   /* Initialize signal generator */
01346   sys_open_sgn (&tduSim.rxSGN);
01347   sys_open_sgn (&tduSim.txSGN);
01348   sys_set_sgn  (&tduSim.rxSGN);
01349   sys_set_sgn  (&tduSim.txSGN);
01350
01351   for (i=0; i<numFrames; i++) {
01352     if (i == numRxFramesStart) {
01353       tduSim.rxSGN.t_amp1 = (linSample) pow (10, (tonePower + 87.29869874256) / 20.0);
01354       sys_set_sgn (&tduSim.rxSGN);
01355     }
01356     if (i == numRxFramesStop) {
01357       tduSim.rxSGN.t_amp1 = 0;
01358       sys_set_sgn (&tduSim.rxSGN);
01359     }
01360
01361     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01362
01363     /* Check for scratch buffer overwrite */
01364     if (tduSim.options.overwrite_scr) {
01365       overwriteScratchBuffers ();
01366     }
01367
01368     /* Call TDU - Rx path */
01369     tduReceiveIn (tduInst, rx_in_frame, (tduRxLocation_t) location);
01370   }
01371 }
01372
01373 /*****************************************************************************/
01374 void sftBasicDetectionFILE (void *tduInst, tint control_code, char *filename)
01375 {
01376   tint            i;
01377
01378   memset (tx_in_frame, 0, sizeof (tx_in_frame));
01379   for (i=0; i<10; i++) {
01380     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01381   }
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_PRI_AC           |
01386                                             tdu_POSITION_SEC_AC;
01387   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01388
01389   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01390   tduControl (tduInst, control_code,   &tduSim.cfgCtl);
01391
01392   fprintf (freport, "\n\nFile: %s", filename);
01393   fflush (stdout);
01394
01395   /* Concatenate full file path */
01396   strcpy (input_fpath, tdu_SIM_INPUT_BASE_DIR);
01397   strcat (input_fpath, filename);
01398
01399   tduSim.txSGN.fileINPUT  = TRUE;
01400   tduSim.txSGN.fileNAME   = input_fpath;
01401   tduSim.txSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01402
01403   /* Initialize signal generator */
01404   sys_open_sgn (&tduSim.txSGN);
01405   sys_set_sgn  (&tduSim.txSGN);
01406   tx_frame_no = 0;
01407   do {
01408     /* Generate input frames */
01409     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01410
01411     /* Check for scratch buffer overwrite */
01412     if (tduSim.options.overwrite_scr) {
01413       overwriteScratchBuffers ();
01414     }
01415
01416     /* Call TDU - Tx path */
01417     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01418     system_CT_discrim_proc (&sysCtDiscrim);
01419     tx_frame_no++;
01420   } while (!tduSim.txSGN.fileCLOSE);
01421   tduSim.txSGN.fileINPUT = FALSE;
01422 }
01423
01424 /*****************************************************************************/
01425 void sftBasicDetectionRxFILE (void *tduInst, tint control_code, char *filename)
01426 {
01427   tint   i;
01428
01429   memset (rx_in_frame, 0, sizeof (rx_in_frame));
01430   for (i=0; i<10; i++) {
01431     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01432   }
01433
01434   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01435   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01436                                             tdu_POSITION_SEC_ACBC_CHANGED |
01437                                             tdu_POSITION_TXRX_CHANGED;
01438   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_RX;
01439
01440
01441   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01442
01443   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01444   tduControl (tduInst, control_code, &tduSim.cfgCtl);
01445
01446   fprintf (freport, "\nFile: %s", filename);
01447   fflush (stdout);
01448
01449   /* Concatenate full file path */
01450   strcpy (input_fpath, tdu_SIM_INPUT_BASE_DIR);
01451   strcat (input_fpath, filename);
01452
01453   tduSim.rxSGN.fileINPUT = TRUE;
01454   tduSim.rxSGN.fileNAME = input_fpath;
01455   tduSim.rxSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01456
01457   /* Initialize signal generator */
01458   sys_open_sgn (&tduSim.rxSGN);
01459   sys_set_sgn  (&tduSim.rxSGN);
01460   rx_frame_no=0;
01461   do {
01462     /* Generate input frames */
01463     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01464
01465     /* Check for scratch buffer overwrite */
01466     if (tduSim.options.overwrite_scr) {
01467       overwriteScratchBuffers ();
01468     }
01469
01470     /* Call TDU - Rx path */
01471     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01472     rx_frame_no++;
01473   } while (!tduSim.rxSGN.fileCLOSE);
01474   tduSim.rxSGN.fileINPUT = FALSE;
01475 }
01476
01477 /************************** Invoking the TDU With Network detector ***************/
01478 void sftBasicDetectionRxFILE_NW (void *tduInst, tint control_code, char *filename)
01479 {
01480   tint   i;
01481
01482   memset (rx_in_frame, 0, sizeof (rx_in_frame));
01483   for (i=0; i<40; i++) {
01484     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01485   }
01486
01487   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01488
01489   /* To ensure the network detector */
01490   tduSim.cfgCtl.u.position.value_bitfield = 0;
01491
01492   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01493
01494   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01495
01496   tduControl (tduInst, tdu_CTL_V21_ON, &tduSim.cfgCtl);
01497   tduControl (tduInst, tdu_CTL_V25_ON, &tduSim.cfgCtl);
01498   tduControl (tduInst, tdu_CTL_CPT_ON, &tduSim.cfgCtl);
01499   tduControl (tduInst, tdu_CTL_V18A_ON, &tduSim.cfgCtl);
01500   tduControl (tduInst, tdu_CTL_SF_ON, &tduSim.cfgCtl);
01501   tduControl (tduInst, tdu_CTL_CNG_ON, &tduSim.cfgCtl);
01502   tduControl (tduInst, tdu_CTL_TT1khz_ON, &tduSim.cfgCtl);
01503   tduControl (tduInst, tdu_CTL_SFDT_CIDCAS_ON, &tduSim.cfgCtl);
01504   tduControl (tduInst, tdu_CTL_CIDCAS_ALL_ON, &tduSim.cfgCtl);
01505   tduControl (tduInst, tdu_CTL_CRE_ON, &tduSim.cfgCtl);
01506   tduControl (tduInst, tdu_CTL_CRE2_ON, &tduSim.cfgCtl);
01507   tduControl (tduInst, tdu_CTL_BELL_ON, &tduSim.cfgCtl);
01508   tduControl (tduInst, tdu_CTL_V8BIS_TONES_ON, &tduSim.cfgCtl);
01509   tduControl (tduInst, tdu_CTL_V21_TONES_ON, &tduSim.cfgCtl);
01510   tduControl (tduInst, tdu_CTL_V23_TONES_ON, &tduSim.cfgCtl);
01511   tduControl (tduInst, tdu_CTL_V21_CM_FAX_ON, &tduSim.cfgCtl);
01512   tduControl (tduInst, tdu_CTL_V21_V8DATA_ON, &tduSim.cfgCtl);
01513   tduControl (tduInst, tdu_CTL_B202_TONES_ON, &tduSim.cfgCtl);
01514   tduControl (tduInst, tdu_CTL_BDTEW_ON, &tduSim.cfgCtl);
01515
01516   if ((control_code == tdu_CTL_SIA_ON && tduSim.options.enable_sia) ||
01517        control_code != tdu_CTL_SIA_ON) {
01518     tduControl (tduInst, control_code, &tduSim.cfgCtl);
01519   }
01520
01521   fprintf (freport, "\nFile: %s", filename);
01522   fflush (stdout);
01523
01524   /* Concatenate full file path */
01525   strcpy (input_fpath, tdu_SIM_INPUT_BASE_DIR);
01526   strcat (input_fpath, filename);
01527
01528   tduSim.rxSGN.fileINPUT = TRUE;
01529   tduSim.rxSGN.fileNAME = input_fpath;
01530   tduSim.rxSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01531
01532   /* Initialize signal generator */
01533   sys_open_sgn (&tduSim.rxSGN);
01534   sys_set_sgn  (&tduSim.rxSGN);
01535   rx_frame_no=0;
01536   do {
01537     /* Generate input frames */
01538     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01539
01540     /* Check for scratch buffer overwrite */
01541     if (tduSim.options.overwrite_scr) {
01542       overwriteScratchBuffers ();
01543     }
01544
01545     /* Call TDU - Rx path */
01546     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01547     rx_frame_no++;
01548   } while (!tduSim.rxSGN.fileCLOSE);
01549   tduSim.rxSGN.fileINPUT = FALSE;
01550 }
01551
01552
01553 /*****************************************************************************/
01554 void tduSimProfile (void *tduInst, char *txfname, char *rxfname, char *outfile)
01555 {
01556   tint i;
01557
01558   /* Initialization */
01559   memset (tx_in_frame, 0, sizeof (tx_in_frame));
01560   memset (rx_in_frame, 0, sizeof (rx_in_frame));
01561   for (i=0; i<10; i++) {
01562     tduSendIn    (tduInst, tx_in_frame, tdu_TX_ONLY);
01563     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01564   }
01565   strcpy (txprof_fstr, tdu_SIM_PROFILE_BASE_DIR);
01566   strcpy (rxprof_fstr, tdu_SIM_PROFILE_BASE_DIR);
01567   strcpy (prof_output, tdu_SIM_PROFILE_BASE_DIR);
01568
01569   /* Prepare for TX file input */
01570   strcat (txprof_fstr, txfname);
01571   tduSim.txSGN.fileINPUT  = TRUE;
01572   tduSim.txSGN.fileNAME   = txprof_fstr;
01573   tduSim.txSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01574   sys_open_sgn (&tduSim.txSGN);
01575   sys_set_sgn  (&tduSim.txSGN);
01576
01577   /* Prepare for RX file input */
01578   strcat (rxprof_fstr, rxfname);
01579   tduSim.rxSGN.fileINPUT  = TRUE;
01580   tduSim.rxSGN.fileNAME   = rxprof_fstr;
01581   tduSim.rxSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01582   sys_open_sgn (&tduSim.rxSGN);
01583   sys_set_sgn  (&tduSim.rxSGN);
01584
01585   /* Enable DTMF detection */
01586   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01587   tduSim.cfgCtl.u.mf.freqPowThreshLow  = -30;
01588   tduSim.cfgCtl.u.mf.freqPowThreshHigh = 1;
01589   tduSim.cfgCtl.u.mf.twistPositive     = 5;
01590   tduSim.cfgCtl.u.mf.twistNegative     = 9;
01591   tduSim.cfgCtl.u.mf.breakThresh       = -32;
01592   tduControl (tduInst, tdu_CTL_MF_DTMF, &tduSim.cfgCtl);
01593
01594   /* Enable detectors for profiling */
01595   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01596   tduControl (tduInst, tdu_CTL_V21_ON,         &tduSim.cfgCtl);
01597   tduControl (tduInst, tdu_CTL_V25_ON,         &tduSim.cfgCtl);
01598   tduControl (tduInst, tdu_CTL_CPT_ON,         &tduSim.cfgCtl);
01599   tduControl (tduInst, tdu_CTL_V18A_ON,        &tduSim.cfgCtl);
01600   tduControl (tduInst, tdu_CTL_CNG_ON,         &tduSim.cfgCtl);
01601   tduControl (tduInst, tdu_CTL_TT1khz_ON,      &tduSim.cfgCtl);
01602   tduControl (tduInst, tdu_CTL_BELL_ON,        &tduSim.cfgCtl);
01603   tduControl (tduInst, tdu_CTL_V8BIS_TONES_ON, &tduSim.cfgCtl);
01604   tduControl (tduInst, tdu_CTL_V21_TONES_ON,   &tduSim.cfgCtl);
01605   tduControl (tduInst, tdu_CTL_V23_TONES_ON,   &tduSim.cfgCtl);
01606   tduControl (tduInst, tdu_CTL_V21_CM_FAX_ON,  &tduSim.cfgCtl);
01607   tduControl (tduInst, tdu_CTL_V21_V8DATA_ON,  &tduSim.cfgCtl);
01608   tduControl (tduInst, tdu_CTL_B202_TONES_ON,  &tduSim.cfgCtl);
01609
01610   /* Prepare cache and profiling */
01611   if (tduSim.options.cache) {
01612     memarchcfg_cacheEnable ();
01613   }
01614   profile_initCycleProfiling ();
01615
01616   /* Prepare profiling output file */
01617   strcat (prof_output, outfile);
01618   profile_fptr = fopen (prof_output, "w");
01619   if (profile_fptr == NULL) {
01620     fprintf (stdout, "Unable to open %s\n", prof_output);
01621     return;
01622   }
01623   else {
01624     fprintf (stdout, "\n\nProfiling TX: %s\n",txprof_fstr);
01625     fprintf (stdout, "          RX: %s\n",rxprof_fstr);
01626   }
01627   tdu_prof_sample_cnt = 0L;
01628   tdu_prof_nxt_sec    = 8000L;
01629   tdu_prof_sec_cnt    = 0;
01630
01631   /* Loop through file */
01632   do {
01633     /* Generate input frames */
01634     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01635     generate_tone_frame (&tduSim.rxSGN, tduSim.frame_size, rx_in_frame);
01636
01637     /* Flush cache */
01638     if (tduSim.options.cache) {
01639       memarchcfg_cacheFlush ();
01640     }
01641
01642     /* Set position for TX processing */
01643     tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01644                                               tdu_POSITION_SEC_ACBC_CHANGED |
01645                                               tdu_POSITION_TXRX_CHANGED;
01646     tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC;
01647     tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01648
01649     /* Perform TDU TX processing */
01650     ignore_cnt     = 0L;
01651     txprof_beg_cnt = profile_getCPUcycleCount ();
01652     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01653     txprof_end_cnt = profile_getCPUcycleCount ();
01654
01655     /* Check for counter wrap and adjust for "ignore" cycles */
01656     txprof_cnt = (txprof_end_cnt - txprof_beg_cnt);
01657     if (txprof_cnt < 0) {
01658       txprof_cnt += sdk_PROFILE_MAXCNT;
01659     }
01660     txprof_cnt -= ignore_cnt;
01661
01662     /* Flush cache */
01663     if (tduSim.options.cache) {
01664       memarchcfg_cacheFlush ();
01665     }
01666
01667     /* Perform TDU TX processing */
01668     ignore_cnt     = 0L;
01669     rxprof_beg_cnt = profile_getCPUcycleCount ();
01670     tduReceiveIn (tduInst, rx_in_frame, tdu_RX_ONLY);
01671     rxprof_end_cnt = profile_getCPUcycleCount ();
01672
01673     /* Check for counter wrap and adjust for "ignore" cycles */
01674     rxprof_cnt = (rxprof_end_cnt - rxprof_beg_cnt);
01675     if (rxprof_cnt < 0) {
01676       rxprof_cnt += sdk_PROFILE_MAXCNT;
01677     }
01678     rxprof_cnt -= ignore_cnt;
01679
01680     /* Output cycle data */
01681     fprintf (profile_fptr, TDU_SIM_PROFILE_FMT, txprof_cnt, rxprof_cnt);
01682
01683     /* Monitor progress */
01684     tdu_prof_sample_cnt += tduSim.frame_size;
01685     if (tdu_prof_sample_cnt >= tdu_prof_nxt_sec) {
01686       tdu_prof_nxt_sec += 8000;
01687       tdu_prof_sec_cnt++;
01688       fprintf (stdout, "Progress:  %d Seconds\n", tdu_prof_sec_cnt);
01689     }
01690   } while (!tduSim.txSGN.fileCLOSE | !tduSim.rxSGN.fileCLOSE);
01691
01692   /* Clean up */
01693   fclose (profile_fptr);
01694   profile_closeCycleProfiling ();
01695   tduSim.txSGN.fileINPUT = FALSE;
01696   tduSim.rxSGN.fileINPUT = FALSE;
01697 }
01698
01699 /*****************************************************************************/
01700 void sftVerifyRange (void *tduInst, tint ctl_code, tint min_frames, tint max_frames,
01701                      tint off_frames, tint step_frames, float freq)
01702 {
01703   float pow;
01704   tint  i;
01705
01706   for (pow=2.0; pow>=-46.0; pow-=2.0) {
01707     for (i=min_frames; i<max_frames; i+=step_frames) {
01708       sftBasicDetection (tduInst, ctl_code, i, off_frames, pow, freq);
01709     }
01710   }
01711 }
01712
01713 /*****************************************************************************/
01714 void sftVerifyRangeRx (void *tduInst, tint ctl_code, tint position, tint location,
01715                        tint prFlag, float freq, tint lead_frames, tint min_frames,
01716                        tint max_frames, tint trail_frames, tint step_frames,
01717                        tint start_pow, tint end_pow, tint step_pow)
01718 {
01719   float pow;
01720   int i;
01721
01722   for (pow=(float)start_pow; pow>=(float)end_pow; pow-=(float)step_pow) {
01723     for (i=min_frames; i<max_frames; i+=step_frames) {
01724        sftBasicRxDetection (tduInst, ctl_code, position, location, pow, prFlag, freq,
01725                             lead_frames, lead_frames+i, lead_frames+trail_frames+i);
01726     }
01727   }
01728 }
01729
01730
01731 /* Compile-time size determination */
01732 tuint tduIntFwTable_size  = sizeof(tduIntFwTable);
01733 tuint tduContext_size     = sizeof(tduContext);
01734 tuint tduDetContexts_size = sizeof(tduDetContexts);
01735
01736
01737 void sftAllDetectionFILE (void *tduInst, char *filename)
01738 {
01739   tint i;
01740
01741   tduSim.txSGN.frm_count = 0;
01742
01743   memset (tx_in_frame, 0, sizeof (tx_in_frame));
01744   for (i=0; i<10; i++) {
01745     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01746   }
01747
01748   tduSim.cfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
01749                                             tdu_POSITION_SEC_ACBC_CHANGED |
01750                                             tdu_POSITION_TXRX_CHANGED;
01751   tduSim.cfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC |
01752                                             tdu_POSITION_SEC_AC;
01753   tduControl (tduInst, tdu_CTL_POSITION, &tduSim.cfgCtl);
01754   memset (&tduSim.cfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
01755
01756   tduControl (tduInst, tdu_CTL_V21_ON, &tduSim.cfgCtl);
01757   tduControl (tduInst, tdu_CTL_V25_ON, &tduSim.cfgCtl);
01758   tduControl (tduInst, tdu_CTL_CPT_ON, &tduSim.cfgCtl);
01759   tduControl (tduInst, tdu_CTL_V18A_ON, &tduSim.cfgCtl);
01760   tduControl (tduInst, tdu_CTL_SF_ON, &tduSim.cfgCtl);
01761   tduControl (tduInst, tdu_CTL_CNG_ON, &tduSim.cfgCtl);
01762   tduControl (tduInst, tdu_CTL_TT1khz_ON, &tduSim.cfgCtl);
01763   tduControl (tduInst, tdu_CTL_SFDT_CIDCAS_ON, &tduSim.cfgCtl);
01764   tduControl (tduInst, tdu_CTL_CIDCAS_ALL_ON, &tduSim.cfgCtl);
01765   tduControl (tduInst, tdu_CTL_CRE_ON, &tduSim.cfgCtl);
01766   tduControl (tduInst, tdu_CTL_CRE2_ON, &tduSim.cfgCtl);
01767   tduControl (tduInst, tdu_CTL_BELL_ON, &tduSim.cfgCtl);
01768   tduControl (tduInst, tdu_CTL_V8BIS_TONES_ON, &tduSim.cfgCtl);
01769   tduControl (tduInst, tdu_CTL_V21_TONES_ON, &tduSim.cfgCtl);
01770   tduControl (tduInst, tdu_CTL_V23_TONES_ON, &tduSim.cfgCtl);
01771   tduControl (tduInst, tdu_CTL_V21_CM_FAX_ON, &tduSim.cfgCtl);
01772   tduControl (tduInst, tdu_CTL_V21_V8DATA_ON, &tduSim.cfgCtl);
01773   tduControl (tduInst, tdu_CTL_B202_TONES_ON, &tduSim.cfgCtl);
01774   tduControl (tduInst, tdu_CTL_BDTEW_ON, &tduSim.cfgCtl);
01775
01776   if (tduSim.options.enable_sia) {
01777     tduControl (tduInst, tdu_CTL_SIA_ON, &tduSim.cfgCtl);
01778   }
01779
01780   fprintf (freport, "\n\n===>Running file: %s", filename);
01781   fflush (stdout);
01782
01783   /* Concatenate full file path */
01784   strcpy (input_fpath, tdu_SIM_INPUT_BASE_DIR);
01785   strcat (input_fpath, filename);
01786
01787   tduSim.txSGN.fileINPUT  = TRUE;
01788   tduSim.txSGN.fileNAME   = input_fpath;
01789   tduSim.txSGN.fileFORMAT = tdu_SIM_FILEIO_MU_PCM;
01790
01791   /* Initialize signal generator */
01792   sys_open_sgn (&tduSim.txSGN);
01793   sys_set_sgn  (&tduSim.txSGN);
01794
01795   do {
01796     generate_tone_frame (&tduSim.txSGN, tduSim.frame_size, tx_in_frame);
01797     if (tduSim.options.overwrite_scr) {
01798       overwriteScratchBuffers ();
01799     }
01800     tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY);
01801   } while (!tduSim.txSGN.fileCLOSE);
01802
01803   tduSim.txSGN.fileINPUT = FALSE;
01804 }
01805
01806 /*****************************************************************************/
01807 void main (void)
01808 {
01809   freport = fopen ("testrep.txt", "wt");
01810   /* Initialize TDU module */
01811   tduInst = NULL;
01812   sys_new_tdu (1, tduSim.max_frame_length, tduSim.options.tdu_lite);
01813   memset (&sys_tdu_results, 0, sizeof (sys_tdu_results));
01814
01815   /* TEST */
01816   tduSim.mf_type = tdu_DET_ID_DTMF;
01817   sys_open_tdu (1, tdu_CTL_MF_DTMF, tduSim.frame_size, -30, 1, 9, 5, -32);
01818
01819   /* Create SGN Instances */
01820   sys_new_sgn (&tduSim.txSGN);
01821   sys_new_sgn (&tduSim.rxSGN);
01822
01823
01824   /* Perform TX Profiling */
01825   if (tduSim.options.profile) {
01826     tduSim.options.report = FALSE;
01827     tduSimProfile (tduInst, "tx_speech.ula",  "rx_speech.ula",  "speech_profiling.txt");
01828     tduSimProfile (tduInst, "tx_silence.ula", "rx_silence.ula", "silence_profiling.txt");
01829     tduSimProfile (tduInst, "tx_tone.ula",    "rx_tone.ula",    "tone_profiling.txt");
01830   }
01831
01832   /* Normal TDU testing */
01833   else {
01834
01835     /* Initialize signal generator */
01836     sys_open_sgn (&tduSim.rxSGN);
01837     sys_open_sgn (&tduSim.txSGN);
01838
01839
01840     /******************************/
01841     /* SIA-TX Verification      */
01842     /******************************/
01843     fprintf (stdout, "\n\n ************************* SIA TX Direction ******************************");
01844     fprintf (stdout, "\n Test for SIA DC02 PULSE:  1400Hz  530ms");
01845     sftAllDetectionFILE (tduInst, "sia_dc02_1400_530ms.pcm");
01846     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  200ms");
01847     sftAllDetectionFILE (tduInst,  "sia_dc02_2300_200ms.pcm");
01848     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  530ms");
01849     sftAllDetectionFILE (tduInst, "sia_dc02_2300_530ms.pcm");
01850     fprintf (stdout, "\n Test for SIA DC02 DTMF:   1400Hz / 2300Hz  100ms");
01851     sftAllDetectionFILE (tduInst, "sia_dc02_dtmf.pcm");
01852     fprintf (stdout, "\n Test for SIA DC05:        1400Hz / SIL / 2300Hz  100ms");
01853     sftAllDetectionFILE (tduInst,"sia_dc05.pcm");
01854
01855     /******************************/
01856     /* SIA-RX Verification        */
01857     /******************************/
01858     fprintf (stdout, "\n\n ************************* SIA RX Direction ******************************");
01859     fprintf (stdout, "\n Test for SIA DC02 PULSE:  1400Hz  200ms");
01860     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "sia_dc02_1400_200ms.pcm");
01861     fprintf (stdout, "\n Test for SIA DC02 PULSE:  1400Hz  530ms");
01862     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "sia_dc02_1400_530ms.pcm");
01863     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  200ms");
01864     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "sia_dc02_2300_200ms.pcm");
01865     fprintf (stdout, "\n Test for SIA DC02 PULSE:  2300Hz  530ms");
01866     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "sia_dc02_2300_530ms.pcm");
01867     fprintf (stdout, "\n Test for SIA DC02 DTMF:   1400Hz / 2300Hz  100ms");
01868     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "sia_dc02_dtmf.pcm");
01869     fprintf (stdout, "\n Test for SIA DC05:        1400Hz / SIL / 2300Hz  100ms");
01870     sftBasicDetectionRxFILE_NW (tduInst, tdu_CTL_SIA_ON, "sia_dc05.pcm");
01871
01872     /******************************/
01873     /* V.18a TTY Verification     */
01874     /******************************/
01875     fprintf (stdout, "\n\n Test for V.18a (TTY)");
01876     sftAllDetectionFILE (tduInst,"tone_event_tty.pcm");
01877
01878     /******************************/
01879     /* Coin Tones Verification    */
01880     /******************************/
01881     fprintf (stdout, "\n\n Test for Coin Tones:  1537Hz & 2200Hz");
01882     sftBasicDetectionFILE (tduInst, tdu_CTL_MF_COIN_TONES_ON, "cointones_1537_2200.pcm");
01883     fprintf (stdout, "\n Test for Coin Tones:  1700Hz & 2200Hz");
01884     sftBasicDetectionFILE (tduInst, tdu_CTL_MF_COIN_TONES_ON, "cointones_1700_2200.pcm");
01885
01886     /******************************/
01887     /* TX Range Verification      */
01888     /******************************/
01889     sftVerifyRange (tduInst,  tdu_CTL_SF_ON, 20, 150, 50, 2, 2600);
01890     sftVerifyRange (tduInst, tdu_CTL_V25_ON, 20, 150, 50, 2, 2100);
01891
01892     /***************************************/
01893     /* RX Range Verification (default)     */
01894     /***************************************/
01895     fprintf (stdout, "\n\nRX Range Verification: tdu_RX_ONLY\n");
01896     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 0, 2225, 20, 25, 200, 20, 25, 2, -40, 2);
01897     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 0, 2250, 20, 25, 200, 20, 25, 2, -40, 2);
01898     sftVerifyRangeRx (tduInst,    tdu_CTL_V25_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 1, 2100, 20, 25, 200, 20, 25, 2, -40, 2);
01899     sftVerifyRangeRx (tduInst, tdu_CTL_SS7COT_ON, tdu_POSITION_RX, (tint) tdu_RX_ONLY, 0, 2000, 20,  5,  50, 20, 5,  2, -40, 2);
01900
01901     /***************************************/
01902     /* RX Range Verification (pre-conf)    */
01903     /***************************************/
01904     fprintf (stdout, "\n\nRX Range Verification: tdu_RX_BEFORE_CONF\n");
01905     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, 0, (tint) tdu_RX_BEFORE_CONF, 0, 2225, 20, 25, 200, 20, 25, 2, -40, 2);
01906     sftVerifyRangeRx (tduInst,   tdu_CTL_BELL_ON, 0, (tint) tdu_RX_BEFORE_CONF, 0, 2250, 20, 25, 200, 20, 25, 2, -40, 2);
01907     sftVerifyRangeRx (tduInst,    tdu_CTL_V25_ON, 0, (tint) tdu_RX_BEFORE_CONF, 1, 2100, 20, 25, 200, 20, 25, 2, -40, 2);
01908     sftVerifyRangeRx (tduInst, tdu_CTL_SS7COT_ON, 0, (tint) tdu_RX_BEFORE_CONF, 0, 2000, 20,  5,  50, 20, 5,  2, -40, 2);
01909
01910     /******************************/
01911     /* TX Path PCM Examples       */
01912     /******************************/
01913     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "v21hdlc.pcm");
01914     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "bro_to_lex_c2.pcm");
01915     sftBasicDetectionFILE (tduInst, tdu_CTL_V25_ON, "modem.pcm");
01916     sftBasicDetectionFILE (tduInst, tdu_CTL_V25_ON, "modem_ansam.pcm");
01917
01918     /******************************/
01919     /* 1300Hz CT discrimination   */
01920     /******************************/
01921     sysCtDiscrim.detect_req = 1;
01922     sftBasicDetectionFILE (tduInst, tdu_CTL_V23_TONES_ON, "tone_event_ct_lin.pcm");
01923     sysCtDiscrim.detect_req = 2;
01924     sftBasicDetectionFILE (tduInst, tdu_CTL_V23_TONES_ON, "tone_event_ct_lin.pcm");
01925
01926     /******************************/
01927     /* RX Path PCM Examples       */
01928     /******************************/
01929     sftBasicDetectionRxFILE (tduInst, tdu_CTL_V21_CM_FAX_ON, "bro_to_lex_c2.pcm");
01930     sftBasicDetectionRxFILE (tduInst,        tdu_CTL_V25_ON, "modem.pcm");
01931     sftBasicDetectionRxFILE (tduInst,        tdu_CTL_V25_ON, "modem_ansam.pcm");
01932
01933     /******************************/
01934     /* Digit Detection            */
01935     /* Expected: 123a456b789c*0#d */
01936     /******************************/
01937     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "digits_plus_dailtone.pcm");
01938     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_echo_10dbERL_20msDelay.pcm");
01939     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_hits_59.5_on_50_off.pcm");
01940     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_hit_after10ms.pcm");
01941     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_hit_after20ms.pcm");
01942     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_hit_after30ms.pcm");
01943     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_hit_after40ms.pcm");
01944     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_sn17db.pcm");
01945     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_sn20db.pcm");
01946     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_sn23db.pcm");
01947     sftBasicDetectionFILE (tduInst, tdu_CTL_V21_ON, "dtmf_sn26db.pcm");
01948   }
01949
01950   /* Close report file */
01951   fclose (freport);
01952
01953   printf ("\nTesting DONE\n");
01954   loop;
01955 }                               /* main (tst TDU) */
01956
01957 /* 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_ELF_C64P 0
#define | _TDUSIMPORT_C64P_BIG_ENDIAN 0
#define | _TDUSIMPORT_ELF_C64P_BIG_ENDIAN 0
#define | _TDUSIMPORT_C66 0
#define | _TDUSIMPORT_ELF_C66 0
#define | _TDUSIMPORT_C66_BIG_ENDIAN 0
#define | _TDUSIMPORT_ELF_C66_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_ELF_C64P 0

Definition at line 40 of file tdusimport.h.

#define _TDUSIMPORT_C64P_BIG_ENDIAN 0

Definition at line 46 of file tdusimport.h.

#define _TDUSIMPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 52 of file tdusimport.h.

#define _TDUSIMPORT_C66 0

Definition at line 58 of file tdusimport.h.

#define _TDUSIMPORT_ELF_C66 0

Definition at line 64 of file tdusimport.h.

#define _TDUSIMPORT_C66_BIG_ENDIAN 0

Definition at line 70 of file tdusimport.h.

#define _TDUSIMPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 76 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_elf_C64P
00038 #define _TDUSIMPORT_ELF_C64P 1
00039 #else
00040 #define _TDUSIMPORT_ELF_C64P 0
00041 #endif
00042
00043 #ifdef ti_targets_C64P_big_endian
00044 #define _TDUSIMPORT_C64P_BIG_ENDIAN 1
00045 #else
00046 #define _TDUSIMPORT_C64P_BIG_ENDIAN 0
00047 #endif
00048
00049 #ifdef ti_targets_elf_C64P_big_endian
00050 #define _TDUSIMPORT_ELF_C64P_BIG_ENDIAN 1
00051 #else
00052 #define _TDUSIMPORT_ELF_C64P_BIG_ENDIAN 0
00053 #endif
00054
00055 #ifdef ti_targets_C66
00056 #define _TDUSIMPORT_C66 1
00057 #else
00058 #define _TDUSIMPORT_C66 0
00059 #endif
00060
00061 #ifdef ti_targets_elf_C66
00062 #define _TDUSIMPORT_ELF_C66 1
00063 #else
00064 #define _TDUSIMPORT_ELF_C66 0
00065 #endif
00066
00067 #ifdef ti_targets_C66_big_endian
00068 #define _TDUSIMPORT_C66_BIG_ENDIAN 1
00069 #else
00070 #define _TDUSIMPORT_C66_BIG_ENDIAN 0
00071 #endif
00072
00073 #ifdef ti_targets_elf_C66_big_endian
00074 #define _TDUSIMPORT_ELF_C66_BIG_ENDIAN 1
00075 #else
00076 #define _TDUSIMPORT_ELF_C66_BIG_ENDIAN 0
00077 #endif
00078
00079 #if   (_TDUSIMPORT_C55L)
00080 #include <ti/mas/tdu/test/src/c55/tdusimport.h>
00081 #elif (_TDUSIMPORT_C64       || _TDUSIMPORT_C64_BIG_ENDIAN      || \
00082        _TDUSIMPORT_C64P      || _TDUSIMPORT_C64P_BIG_ENDIAN     || \
00083        _TDUSIMPORT_ELF_C64P  || _TDUSIMPORT_ELF_C64P_BIG_ENDIAN || \
00084        _TDUSIMPORT_C66       || _TDUSIMPORT_C66_BIG_ENDIAN      || \
00085        _TDUSIMPORT_ELF_C66   || _TDUSIMPORT_ELF_C66_BIG_ENDIAN)
00086 #include <ti/mas/tdu/test/src/c64/tdusimport.h>
00087 #else
00088 #error invalid target
00089 #endif
00090
00091 #endif /* _TDUSIMPORT_H */
00092 /* 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 908 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.


TGE: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_tge_Version__top__
#define | __extern extern
#define | ti_mas_tge_Version___VERS 150
#define | ti_mas_tge_Version_MAJOR (1)
#define | ti_mas_tge_Version_MINOR (0)
#define | ti_mas_tge_Version_XVERTICAL (0)
#define | ti_mas_tge_Version_PATCH (0)
#define | ti_mas_tge_Version_BUILD (3)
#define | ti_mas_tge_Version_QUALITY (3)
#define | ti_mas_tge_Version_BTYPE (0)
#define | ti_mas_tge_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_tge_Version_MAJOR
#define | Version_MINOR ti_mas_tge_Version_MINOR
#define | Version_XVERTICAL ti_mas_tge_Version_XVERTICAL
#define | Version_PATCH ti_mas_tge_Version_PATCH
#define | Version_BUILD ti_mas_tge_Version_BUILD
#define | Version_QUALITY ti_mas_tge_Version_QUALITY
#define | Version_BTYPE ti_mas_tge_Version_BTYPE
#define | Version_WIDTH ti_mas_tge_Version_WIDTH

Define Documentation

#define ti_mas_tge_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_tge_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_tge_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_tge_Version_MINOR (0)

Definition at line 53 of file Version.h.

#define ti_mas_tge_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_tge_Version_PATCH (0)

Definition at line 59 of file Version.h.

#define ti_mas_tge_Version_BUILD (3)

Definition at line 62 of file Version.h.

#define ti_mas_tge_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_tge_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_tge_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_tge_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_tge_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_tge_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_tge_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_tge_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_tge_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_tge_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_tge_Version_WIDTH

Definition at line 97 of file Version.h.


TGE: 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_tge_Version__include
00023 #define ti_mas_tge_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_tge_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_tge_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_tge_Version_MAJOR (1)
00051
00052 /* MINOR */
00053 #define ti_mas_tge_Version_MINOR (0)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_tge_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_tge_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_tge_Version_BUILD (3)
00063
00064 /* QUALITY */
00065 #define ti_mas_tge_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_tge_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_tge_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_tge_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_tge_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_tge_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_tge_Version_MAJOR
00091 #define Version_MINOR      ti_mas_tge_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_tge_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_tge_Version_PATCH
00094 #define Version_BUILD      ti_mas_tge_Version_BUILD
00095 #define Version_QUALITY    ti_mas_tge_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_tge_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_tge_Version_WIDTH
00098 #endif


TGE: Data Structures

  • Data Structures
  • Data Fields

TGE Data Structures

Here are the data structures with brief descriptions:
tgeConfig_t | TGE configuration Structure
tgeControl_t | TGE control Structure


TGE: Detailed TGE Description

TGE (Tone Generation Engine) Package

Detailed TGE Description

Description

The Tone Generation Engine (TGE) component is a stand-alone software module that provides the capability to generate tones comprised of up to four different frequencies, each with independent levels. The TGE also supports phase reversals in the case of a single frequency tone as well as sinusoidal amplitude modulation. These capabilities allow the TGE to generate most every tone required for basic telephony and FAX/Modem identification.

The TGE follows the Embedded Communications Object (ECO) API standard Version 4.0 which supports the creation of ECO-lite components and modules. As such, the TGE provides a very simple API consisting of two routines for instance creation/initialization and one each for configuration and execution.

The TGE supports tone generation consisting of more than one frequency. As such, generation of dual tones – as are often used in telephony signaling – such as the Multi Frequency (MF) Region 1 and Region 2 are easily supported. Support for sinusoidal amplitude modulation and phase reversals allows generation of more complex tones such as Answering Tone signal with Amplitude Modulation (ANSAM) as well as other FAX/Modem detection tones.


TGE:

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 © 2011 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.


TGE: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


TGE: 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


TGE: TGE External API

TGE (Tone Generation Engine) Package

TGE External API

Page Contents

  1. Complete TGE API
  2. TGE Creation Functions
  3. TGE Configuration Functions
  4. TGE Execution Functions

Complete TGE API

  1. tgeGetSizes()
  2. tgeInit()
  3. tgeControl()
  4. tgeProcess()

TGE Creation Functions

TGE instance creation is a two step process. First, determine the TGE memory requirements via the tgeGetSizes() API function. Second, allocate the TGE instance memory as prescribed by tgeGetSizes(). The TGE instance may now be configured by passing a pointer to the allocated buffer to tgeInit().

  1. tgeGetSizes()

TGE Configuration Functions

The TGE component has two external API configuration routines; tgeConfig() and tgeControl(). Each routine serves a unique purpose. The tgeInit() routine is used to configure the TGE for tone(s) generation and the tgeControl() routine allows the TGE to toggle tone generation.

The tgeInit() API function provides the ability to configure the TGE. This routine must be called at least once to configure the TGE before it will generate any tone. The TGE may be reconfigured as needed through successive calls to this API routine to change the characteristics of the tone generation. Note that the reset_phase member of the tgeConfig_t structure allows control of phase continuity between successive calls.

The tgeControl() routine serves to simply toggle tone generation ON and OFF without reconfiguration. This allows tone generation to be stopped and recontinued later if needed (as in the case of tone cadence). When the TGE is turned OFF via the tgeControl API function, the TGE will generate frames of silence (linear zero) each time tgeProcess() is called.

Note that TGE operation is not defined if tgeControl() is called prior to tgeConfig().

  1. tgeInit()
  2. tgeControl()

TGE Execution Functions

The TGE execution API consists solely of the tgeProcess() API function. This routine generates the tonal output based on the TGE configuration. This routine should be called every processing frame during tone generation for proper operation.

  1. tgeProcess()

TGE Return Codes

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

  • TGE API return codes


TGE: File Index

  • File List
  • Globals

TGE File List

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


TGE: 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:

  • amp : tgeConfig_t
  • ampr : tgeConfig_t
  • config_code : tgeConfig_t
  • control_code : tgeControl_t
  • freq : tgeConfig_t
  • frq : tgeConfig_t
  • modulate_freq : tgeConfig_t
  • modulate_pct : tgeConfig_t
  • num_freq : tgeConfig_t
  • period_ms : tgeConfig_t
  • reset_phase : tgeConfig_t
  • sample_rate : tgeConfig_t
  • u : tgeConfig_t


TGE: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • amp : tgeConfig_t
  • ampr : tgeConfig_t
  • config_code : tgeConfig_t
  • control_code : tgeControl_t
  • freq : tgeConfig_t
  • frq : tgeConfig_t
  • modulate_freq : tgeConfig_t
  • modulate_pct : tgeConfig_t
  • num_freq : tgeConfig_t
  • period_ms : tgeConfig_t
  • reset_phase : tgeConfig_t
  • sample_rate : tgeConfig_t
  • u : tgeConfig_t


TGE: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Enumerator
  • 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 -

  • tge_BADPARAM : tge.h
  • tge_CONFIG_AMP_MOD : tge.h
  • tge_CONFIG_AMP_MOD_PR : tge.h
  • tge_CONFIG_FREQS : tge.h
  • tge_CONFIG_PHASE_REV : tge.h
  • tge_CTRL_TONE_OFF : tge.h
  • tge_CTRL_TONE_ON : tge.h
  • tge_ERROR : tge.h
  • tge_NOERR : tge.h
  • tge_SAMPLE_RATE_16K : tge.h
  • tge_SAMPLE_RATE_8K : tge.h
  • tgeControl() : tge.h
  • tgeGetSizes() : tge.h
  • tgeInit() : tge.h
  • tgeProcess() : tge.h
  • ti_mas_tge_Version___VERS : Version.h
  • ti_mas_tge_Version__top__ : Version.h
  • ti_mas_tge_Version_BTYPE : Version.h
  • ti_mas_tge_Version_BUILD : Version.h
  • ti_mas_tge_Version_MAJOR : Version.h
  • ti_mas_tge_Version_MINOR : Version.h
  • ti_mas_tge_Version_PATCH : Version.h
  • ti_mas_tge_Version_QUALITY : Version.h
  • ti_mas_tge_Version_WIDTH : Version.h
  • ti_mas_tge_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


TGE: Data Fields

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

  • __extern : Version.h
  • tge_CONFIG_AMP_MOD : tge.h
  • tge_CONFIG_AMP_MOD_PR : tge.h
  • tge_CONFIG_FREQS : tge.h
  • tge_CONFIG_PHASE_REV : tge.h
  • tge_CTRL_TONE_OFF : tge.h
  • tge_CTRL_TONE_ON : tge.h
  • ti_mas_tge_Version___VERS : Version.h
  • ti_mas_tge_Version__top__ : Version.h
  • ti_mas_tge_Version_BTYPE : Version.h
  • ti_mas_tge_Version_BUILD : Version.h
  • ti_mas_tge_Version_MAJOR : Version.h
  • ti_mas_tge_Version_MINOR : Version.h
  • ti_mas_tge_Version_PATCH : Version.h
  • ti_mas_tge_Version_QUALITY : Version.h
  • ti_mas_tge_Version_WIDTH : Version.h
  • ti_mas_tge_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


TGE: Data Fields

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

  • tge_BADPARAM : tge.h
  • tge_ERROR : tge.h
  • tge_NOERR : tge.h
  • tge_SAMPLE_RATE_16K : tge.h
  • tge_SAMPLE_RATE_8K : tge.h


TGE: Data Fields

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

  • tgeControl() : tge.h
  • tgeGetSizes() : tge.h
  • tgeInit() : tge.h
  • tgeProcess() : tge.h


TGE: Tone Generation Engine (TGE)

Tone Generation Engine (TGE)

Collaboration diagram for Tone Generation Engine (TGE):

Detailed Description

Simple component to generate basic tones used in telephony.

Modules

TGE API return codes
TGE Sample Rate Enums
TGE Configuration Codes
Constants used to specify TGE configuration operation.
TGE Control Codes
Constants used to control TGE operation.

Data Structures

struct | tgeConfig_t
TGE configuration Structure. More...
struct | tgeConfig_t
TGE configuration Structure. More...
struct | tgeControl_t
TGE control Structure. More...
struct | tgeControl_t
TGE control Structure. More...

External APIs for TGE

tint | tgeGetSizes (tint *instsize)
Function tgeGetSizes() get the size of a TGE instance.
tint | tgeInit (void *inst, tgeConfig_t *cfg)
Function tgeInit() initializes TGE.
tint | tgeControl (void *inst, tgeControl_t *ctl)
Function tgeControl() configure TGE tone generation.
tint | tgeProcess (void *inst, linSample *frame, tint frame_length)
This is the function that generates the tone signal.

Function Documentation

tint tgeGetSizes ( tint * instsize )

Function tgeGetSizes() get the size of a TGE instance.

Remarks:
Function tgeGetSizes() is the first function to be called.
Parameters:
[out] instsize Pointer to return size of the TGE instance.
Returns:
tge_NOERR
tge_ERROR

tint tgeInit | ( | void * | inst,
 |  | tgeConfig_t * | cfg
 | ) |  |

Function tgeInit() initializes TGE.

Remarks:
Function tgeInit() must be called after tgeGetSizes(). After the function call, TGE is disabled.
Parameters:
[in,out] | inst | Pointer to a TGE instance structure
[in] | cfg | Pointer to a TGE config structure (tgeConfig_t)
Returns:
tge_NOERR
tge_ERROR
tge_BADPARAM

tint tgeControl | ( | void * | inst,
 |  | tgeControl_t * | ctl
 | ) |  |

Function tgeControl() configure TGE tone generation.

Remarks:
The TGE will not generate any tone until tgeControl() is called (after tgeInit())
Parameters:
[in,out] | inst | Pointer to a TGE instance structure.
[in] | ctl | Pointer to a TGE control structure (tgeControl_t)
Returns:
tge_NOERR
tge_ERROR
tge_BADPARAM

tint tgeProcess | ( | void * | inst,
 |  | linSample * | frame,
 |  | tint | frame_length
 | ) |  |

This is the function that generates the tone signal.

Remarks:
This function can only be called after tgeInit() and tgeControl() to make TGE take effect and it needs to be called every frame.
Parameters:
[in] | inst | Pointer to a TGE instance structure.
[out] | frame | Pointer to the voice sample buffer
[in] | frame_length | Number of samples processed
Returns:
tge_NOERR
tge_ERROR


TGE: TGE API return codes

TGE API return codes
[Tone Generation Engine (TGE)]

Collaboration diagram for TGE API return codes:

Detailed Description

These are the return codes for the TGE module API functions.

TGE Function Return Value Definitions

enum { tge_NOERR = 0, tge_ERROR = 1, tge_BADPARAM = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
tge_NOERR | Function returned without error
tge_ERROR | Function returned with error
tge_BADPARAM | Function identified bad parameters

Definition at line 42 of file tge.h.


TGE: TGE Configuration Codes

TGE Configuration Codes
[Tone Generation Engine (TGE)]

Collaboration diagram for TGE Configuration Codes:

Detailed Description

Constants used to specify TGE configuration operation.

These constants specify the manners in which the TGE may be configured via the tgeInit API function. Each code corresponds to a specific configuration operation.

TGE Config Codes

#define | tge_CONFIG_FREQS 0
#define | tge_CONFIG_PHASE_REV 1
#define | tge_CONFIG_AMP_MOD 2
#define | tge_CONFIG_AMP_MOD_PR 3

Define Documentation

#define tge_CONFIG_FREQS 0

Configure the TGE to generate one to four frequencies at independent amplitudes

Definition at line 80 of file tge.h.

#define tge_CONFIG_PHASE_REV 1

Configure the TGE to generate a single frequency with periodic phase reversals

Definition at line 83 of file tge.h.

#define tge_CONFIG_AMP_MOD 2

Configure the TGE to generate an amplitude modulated sinudoid

Definition at line 86 of file tge.h.

#define tge_CONFIG_AMP_MOD_PR 3

Configure the TGE to generate an amplitude modulated sinudoid with periodic phase reversals

Definition at line 88 of file tge.h.


TGE: TGE Control Codes

TGE Control Codes
[Tone Generation Engine (TGE)]

Collaboration diagram for TGE Control Codes:

Detailed Description

Constants used to control TGE operation.

These constants specify the methods for controlling the TGE via the tgeControl API function. Each code corresponds to a specific control operation.

TGE Control Codes

#define | tge_CTRL_TONE_OFF 0
#define | tge_CTRL_TONE_ON 1

Define Documentation

#define tge_CTRL_TONE_OFF 0

Configure the TGE to stop tone generation, but preserve configuration.

Definition at line 176 of file tge.h.

#define tge_CTRL_TONE_ON 1

Configure the TGE to start tone generation.

Definition at line 179 of file tge.h.


TGE: TGE Sample Rate Enums

TGE Sample Rate Enums
[Tone Generation Engine (TGE)]

Collaboration diagram for TGE Sample Rate Enums:

Detailed Description

These are enumerations for valid TGE module sample rates.

TGE Sample Rates

enum { tge_SAMPLE_RATE_8K = 0, tge_SAMPLE_RATE_16K = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
tge_SAMPLE_RATE_8K | 8kHz sampling rate
tge_SAMPLE_RATE_16K | 16kHz sampling rate

Definition at line 59 of file tge.h.


TGE: TGE (Tone Generation Engine) Package

TGE (Tone Generation Engine) Package

Release 1.0.0.3

Page Contents

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

Description

The Tone Generation Engine (TGE) component is a stand-alone software module that provides the capability to generate tones comprised of up to four different frequencies, each with independent levels. The TGE also supports phase reversals in the case of a single frequency tone as well as sinusoidal amplitude modulation. These capabilities allow the TGE to generate most every tone required for basic telephony and FAX/Modem identification.

Additional links: Detailed TGE Description

Integration

The TGE 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 TGE 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: | TGE External API
 | TGE Integration

Default Configuration

The tgeConfig_t structure defines the required parameters to configure the TGE instance. Each TGE instance must be configured via the tgeInit() API funtion for it to generate any output.

The TGE supports configuration of the following characteristics:

  1. Frequency and linear amplitude for each of four independent frequencies
  2. Amplitude modulation
    • Carrier frequency
    • Carrier amplitude
    • Modulation frequency
    • Modulation percentage
  3. Phase reversal
    • Single frequency
    • Configurable amplitude
    • Phase reversal period (ms)

Performance

Performance measures for the TGE component are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

The TGE has the following limitations:

  • Four simultaneous frequencies
  • Phase reversal period limited to 4 sec for 8kHz and 2 sec for 16kHz
  • Phase reversal period must fall on a frame boundary to be precise
  • Cadence and tone duration are the responsibility of the system employing the TGE, and are achieved through successive calls to the tgeControl external API function.

Standards Compliance

The TGE does not explicitly follow any particular standard. Rather, it is capable of being configured to generate signals as they are defined in various standards; past, present and future.

Dependent Packages

The TGE 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)

TGE Required Packages
Package | File Name
ti.mas.tge | ti_mas_tge_<fmt>_c<starg>_<ver>.zip
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<starg>_<ver>.zip
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<starg>_<ver>.zip
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<starg>_<ver>.zip
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<starg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


TGE: TGE Integration

TGE (Tone Generation Engine) Package

TGE Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the TGE root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the TGE makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

The TGE 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
               /tge
               /types
               /util

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

Includes

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

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

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\tge\c<starg>\tge_c.a<starg>
  4. ti\mas\tge\c<starg>\tge_a.a<starg>

Structures Requiring Initialization

N/A


TGE: Memory Requirements

TGE (Tone Generation Engine) Package

Memory Requirements

Page Contents

  1. Data Memory Requirements
  2. TGE Program Memory Requirements
    • C55x Program Memory
    • C64x Program Memory
    • C64x+ Program Memory
    • C66x Program Memory

Data Memory Requirements

TGE Instance Buffers

Per Instance Data Buffers
Buffer | Size (bytes) | Alignment | Volatile | Purpose
0 | 32 | 8 | no | TGE instance

Additional TGE Data Memory

Additional Data Memory
Category/Structure | Requirement (bytes)
Tables | 16
data/bss | 0

TGE Program Memory Requirements

C55x Program Memory

C55x TGE Program Memory Requirements
Section | Size | Placement | Description
.text | 824 bytes | Internal | Core TGE code
.switch | 0 bytes | Internal | Switch tables
Total | 824 bytes | N/A | N/A

C64x Program Memory

C64x TGE Program Memory Requirements
Section | Size | Placement | Description
.text | 2.19 Kbyte | Internal | Core TGE code
.switch | 0 bytes | Internal | Switch tables
Total | 2.19 Kbyte | N/A | N/A

C64x+ Program Memory

C64x+ TGE Program Memory Requirements
Section | Size | Placement | Description
.text | 1.72 Kbyte | Internal | Core TGE code
.switch | 0 bytes | Internal | Switch tables
Total | 1.72 Kbyte | N/A | N/A

C66x Program Memory

C66x TGE Program Memory Requirements
Section | Size | Placement | Description
.text | 1.78 Kbyte | Internal | Core TGE code
.switch | 0 bytes | Internal | Switch tables
Total | 1.78 Kbyte | N/A | N/A

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


TGE: MIPS Requirements

TGE (Tone Generation Engine) Package

MIPS Requirements

Page Contents

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

Assumptions

The MIPS numbers are per execution of the unit test images using the memory mapping indicated in each respective .map file. Per frame cycle information is generated each time the test is executed with simCfg->profile_enable set (equal to 1). The following assumptions also apply:

  1. All tests are performed with 5ms frames
  2. The I-cache is flushed every frame prior to TGE generation
  3. MCPS are calculated for the following five generation scenarios
    • Single tone generation (tone1_profile.txt )
    • Dual tone generation (tone2_profile.txt )
    • Tri tone generation (tone3_profile.txt )
    • Quad tone generation (tone4_profile.txt )
    • Amplitude modulation with phase reversals (ampr_profile.txt )

Notes:
  1. In the MIPS tables we use the terminology Mega-Cycles Per Second (MCPS) since several instructions can occur in parallel per cycle.
  2. The files listed above reside in the tge\test\vectors\profile directory.

C55x Target

Profiling was performed using an SD 5510 EVM. The I-cache is flushed every processing frame prior to TGE generation. See the .map file for details on code and data placement.

C55x TGE MCPS
Configuration | Average | Peak
Single Frequency | 0.24 | 0.24
Dual Frequency | 0.45 | 0.78
Tri Frequency | 0.66 | 0.67
Quad Frequency | 0.87 | 0.87
Dual Frequency (Amplitude Modulation & Phase Reversal) | 0.73 | 1.07

C64x Target

Profiling was performed using an SD 6416 EVM. The I-cache is flushed every processing frame prior to TGE generation. See the .map file for details on code and data placement.

C64x TGE MCPS
Configuration | Average | Peak
Single Frequency | 0.20 | 0.20
Dual Frequency | 0.20 | 0.20
Tri Frequency | 0.35 | 0.35
Quad Frequency | 0.35 | 0.35
Dual Frequency (Amplitude Modulation & Phase Reversal) | 0.42 | 0.42

C64x+ Target

Profiling was performed using a TI 6472 EVM. The I-cache is flushed every processing frame prior to TGE generation. See the .map file for details on code and data placement.

C64x+ TGE MCPS
Configuration | Average | Peak
Single Frequency | 0.20 | 0.20
Dual Frequency | 0.20 | 0.20
Tri Frequency | 0.35 | 0.35
Quad Frequency | 0.35 | 0.35
Dual Frequency (Amplitude Modulation & Phase Reversal) | 0.40 | 0.40

C66x Target

Profiling was performed using a TI 6678 EVM. The I-cache is flushed every processing frame prior to TGE generation. See the .map file for details on code and data placement.

C66x TGE MCPS
Configuration | Average | Peak
Single Frequency | 0.19 | 0.19
Dual Frequency | 0.19 | 0.19
Tri Frequency | 0.34 | 0.34
Quad Frequency | 0.34 | 0.34
Dual Frequency (Amplitude Modulation & Phase Reversal) | 0.38 | 0.38


TGE: Module Index

TGE Modules

Here is a list of all modules:
  • Tone Generation Engine (TGE)
    • TGE API return codes
    • TGE Sample Rate Enums
    • TGE Configuration Codes
    • TGE Control Codes


TGE: Page Index

TGE Related Pages

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


TGE: tgeConfig_t Struct Reference

  • Data Structures
  • Data Fields

tgeConfig_t Struct Reference
[Tone Generation Engine (TGE), Tone Generation Engine (TGE)]

#include <tge.h>

Detailed Description

TGE configuration Structure.

Contains parameters that can be configured when initializing the TGE.

Definition at line 102 of file tge.h.

Data Fields

tint | sample_rate
tbool | reset_phase
tint | config_code
union {
struct {
tint num_freq
tint freq [4]
linSample amp [4]
} frq
struct {
tint freq
linSample amp
tint modulate_freq
Fract modulate_pct
tint period_ms
} ampr
} u

Field Documentation

tint tgeConfig_t::sample_rate

Sampling rate as enumerated by TGE Sample Rate Enums

Definition at line 103 of file tge.h.

tbool tgeConfig_t::reset_phase

TRUE: Reset all frequency phases to zero FALSE: Preserve previous phase Note that if this is not TRUE for the first call to tgeInit, the phase may be random. This can be FALSE between calls to tgeInit to achieve phase continuity. This does not apply to amplitude modulation or phase reversals, they always reset the phase.

Definition at line 105 of file tge.h.

tint tgeConfig_t::config_code

Code indicating TGE configuration mode. This identifies which union structure will be used in configuration. See TGE Configuration Codes for a list of valid codes.

Definition at line 113 of file tge.h.

tint tgeConfig_t::num_freq

< Struct for tge_CONFIG_FREQS configuration code. Number of frequencies to be combined (4 maximum)

Definition at line 121 of file tge.h.

tint tgeConfig_t::freq

List of frequencies (4 maximum)

Definition at line 123 of file tge.h.

linSample tgeConfig_t::amp

List of associated linear amplitudes (4 maximum). The maximum amplitude (32767) translates to +3 dBm0.

Definition at line 124 of file tge.h.

struct { ... } tgeConfig_t::frq

tint tgeConfig_t::modulate_freq

Modulating frequency. This field is only valid for the following codes: tge_CONFIG_AMP_MOD, tge_CONFIG_AMP_MOD_PR

Definition at line 138 of file tge.h.

Fract tgeConfig_t::modulate_pct

Modulation percentage as a fraction from 0 (0 percent) to 1 (100 percent) in Q14. Values outside this range are limited to 0 and 1 (Q14). This field is only valid for the following codes: tge_CONFIG_AMP_MOD, tge_CONFIG_AMP_MOD_PR

Definition at line 142 of file tge.h.

tint tgeConfig_t::period_ms

Phase reversal repeat period (ms). This field is only valid for the following codes: tge_CONFIG_PHASE REV, tge_CONFIG_AMP_MOD_PR. Note that for amplitude modulation with phase reversals, only the carrier frequency is phase reversed

Definition at line 149 of file tge.h.

struct { ... } tgeConfig_t::ampr

union { ... } tgeConfig_t::u

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


TGE: tgeControl_t Struct Reference

  • Data Structures
  • Data Fields

tgeControl_t Struct Reference
[Tone Generation Engine (TGE), Tone Generation Engine (TGE)]

#include <tge.h>

Detailed Description

TGE control Structure.

Contains TGE parameters that can be dynamically configured.

Definition at line 192 of file tge.h.

Data Fields

tint control_code

Field Documentation

tint tgeControl_t::control_code

Code for TGE control operation

Definition at line 193 of file tge.h.

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


TGE: tge.h File Reference

  • File List
  • Globals

tge.h File Reference

Detailed Description

Contains external APIs for the tge module.

(C) Copyright 2008, Texas Instruments, Inc.

Definition in file tge.h.

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

Include dependency graph for tge.h:

Go to the source code of this file.

Data Structures

struct | tgeConfig_t
TGE configuration Structure. More...
struct | tgeControl_t
TGE control Structure. More...

Defines

TGE Config Codes
#define | tge_CONFIG_FREQS 0
#define | tge_CONFIG_PHASE_REV 1
#define | tge_CONFIG_AMP_MOD 2
#define | tge_CONFIG_AMP_MOD_PR 3
TGE Control Codes
#define | tge_CTRL_TONE_OFF 0
#define | tge_CTRL_TONE_ON 1

Enumerations

TGE Function Return Value Definitions
enum | { tge_NOERR = 0, tge_ERROR = 1, tge_BADPARAM = 2 }
TGE Sample Rates
enum | { tge_SAMPLE_RATE_8K = 0, tge_SAMPLE_RATE_16K = 1 }

Functions

External APIs for TGE
tint | tgeGetSizes (tint *instsize)
Function tgeGetSizes() get the size of a TGE instance.
tint | tgeInit (void *inst, tgeConfig_t *cfg)
Function tgeInit() initializes TGE.
tint | tgeControl (void *inst, tgeControl_t *ctl)
Function tgeControl() configure TGE tone generation.
tint | tgeProcess (void *inst, linSample *frame, tint frame_length)
This is the function that generates the tone signal.


TGE: tge.h Source File

  • File List
  • Globals

tge.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: External API header file for TGE (Tone Generation Engine)
00003  ******************************************************************************
00004  * FILE NAME:   tge.h
00005  *
00006  * DESCRIPTION: Contains external definitions and function prototypes for
00007  *              the Tone Generation Engine.
00008  *
00009  * (C) Copyright 2011, Texas Instruments, Inc.
00010  *****************************************************************************/
00011 #ifndef _TGE_H
00012 #define _TGE_H
00013
00021 /* System level header files */
00022 #include <ti/mas/types/types.h>            /* DSP types */
00023
00024
00031 /* @{ */
00032
00033
00041 /* @{ */
00042 enum {
00043   tge_NOERR    = 0,
00044   tge_ERROR    = 1,
00045   tge_BADPARAM = 2
00046 };
00047 /*  @} */
00058 /* @{ */
00059 enum {
00060   tge_SAMPLE_RATE_8K  = 0,
00061   tge_SAMPLE_RATE_16K = 1
00062 };
00063 /*  @} */
00079 /* @{ */
00080 #define tge_CONFIG_FREQS        0
00083 #define tge_CONFIG_PHASE_REV    1
00086 #define tge_CONFIG_AMP_MOD      2
00088 #define tge_CONFIG_AMP_MOD_PR   3
00091 /*  @} */
00092
00101 /* @{ */
00102 typedef struct{
00103   tint      sample_rate;
00105   tbool     reset_phase;
00113   tint      config_code;
00118   union {
00119     struct {
00121       tint      num_freq;
00123       tint      freq[4];
00124       linSample amp[4];
00127     } frq;
00128     struct {
00132       tint      freq;
00135       linSample amp;
00138       tint      modulate_freq;
00142       Fract     modulate_pct;
00149       tint      period_ms;
00157     } ampr;
00158   } u;
00159 } tgeConfig_t;
00160 /* @} */
00161
00162
00175 /* @{ */
00176 #define tge_CTRL_TONE_OFF       0
00179 #define tge_CTRL_TONE_ON        1
00181 /*  @} */
00182
00191 /* @{ */
00192 typedef struct{
00193   tint  control_code;
00194 } tgeControl_t;
00195 /* @} */
00196
00197
00202 /* @{ */
00203
00214 tint tgeGetSizes (tint *instsize);
00215
00230 tint tgeInit (void *inst, tgeConfig_t *cfg);
00231
00246 tint tgeControl (void *inst, tgeControl_t *ctl);
00247
00262 tint tgeProcess (void *inst, linSample *frame, tint frame_length);
00263
00264 /* @} */
00265 /* @} */ /* ingroup TGE */
00266
00267 #endif  /* _TGE_H */
00268
00269 /* end of tge.h */
00270


TGE Test: Data Structures

  • Data Structures
  • Data Fields

TGE Test Data Structures

Here are the data structures with brief descriptions:
simConfig_t


TGE Test: Unit Test Configuration and Execution

Unit Test Configuration and Execution

Unit Test Configuration and Execution

All simulation configuration parameters are in the simCfg structure. This structure may 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. The (wideband) 16 kHz sampling rate is not yet supported since the TDU doesn't support 16 kHz operation.

The following may be configured for test:

  • frame_length
    • Number of samples generated per call to tgeProcess()
    • Must be a multiple of 40 (for unit test only)
  • profile_enable
    • TRUE: Enables profiling
  • cache_enable
    • TRUE: Enables cache operation and flushing
  • companding
    • This represents the PCM companding operation for the sample frame between TGE generation and TDU detection.
    • Must be a tgePcm_e type
    • When set to u-law or a-law, the samples for each example will be output to the tge\test\vectors\out directory.

Unit Test Execution

  1. Set configuration as described in Unit Test Configuration and Execution
  2. Run to completion
  3. Each individual test will display tone generation and detection results to the console. Ensure that each tone is detected by the TDU.
  4. As described above in Unit Test Configuration and Execution , the PCM samples for each individual test will be output to the tge\test\vectors\out directory (provided that the companding is either ulaw or a-law).


TGE 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 © 2011 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.


TGE Test: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


TGE 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


TGE Test: File Index

  • File List
  • Globals

TGE Test File List

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


TGE 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:

  • cache_enable : simConfig_t
  • companding : simConfig_t
  • frame_length : simConfig_t
  • profile_enable : simConfig_t


TGE Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • cache_enable : simConfig_t
  • companding : simConfig_t
  • frame_length : simConfig_t
  • profile_enable : simConfig_t


TGE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • c
  • d
  • e
  • f
  • m
  • s
  • t

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

- c -

  • compandBuffer : tgesim.c

- d -

  • digit_strings : tduapi.c

- e -

  • event_string : tduapi.c

- f -

  • frameMult : tgesim.c

- m -

  • main() : tgesim.c

- s -

  • sampleBuffer : tgesim.c
  • simCfg : tgesim.h , tgesim.c
  • simConfig : tgesim.c
  • sysDebugInfo() : tduapi.c , tduapi.h
  • sysToneDetect() : tduapi.h , tduapi.c

- t -

  • tdu_ced_minor : tduapi.c
  • tdu_cedpr_minor : tduapi.c
  • tdu_event : tduapi.c
  • tdu_null_minor : tduapi.c
  • tduapi_BREAK_THRESH : tduapi.h
  • tduapi_FRAME_SIZE : tduapi.h
  • tduapi_FREQ_POW_THRESH_HIGH : tduapi.h
  • tduapi_FREQ_POW_THRESH_LOW : tduapi.h
  • tduapi_NUM_CED_MINOR : tduapi.h
  • tduapi_NUM_CEDPR_MINOR : tduapi.h
  • tduapi_NUM_DIGIT : tduapi.h
  • tduapi_NUM_EVENT : tduapi.h
  • tduapi_NUM_TONE : tduapi.h
  • tduapi_REPORT_STRING_LENGTH : tduapi.h
  • tduapi_STRING_LENGTH : tduapi.h
  • tduapi_TDU_MODULE_ID : tduapi.h
  • tduapi_TWIST_NEGATIVE : tduapi.h
  • tduapi_TWIST_POSITIVE : tduapi.h
  • tduContext : tduapi.c
  • tduDetContexts : tduapi.c
  • tduIntFwTable : tduapi.c
  • tduSimInst : tduapi.c , tduapi.h
  • tge_ProfCycleCount : tgeprof.c
  • tge_ProfFptr : tgeprof.c , tgeprof.h
  • tge_ProfOverhead : tgeprof.c , tgeprof.h
  • tge_ProfStartCount : tgeprof.c , tgeprof.h
  • tge_ProfStopCount : tgeprof.h
  • tge_sim_banner_print() : tgesim.h
  • tge_sim_compand() : tgesim.c , tgesim.h
  • tge_sim_config_tdu() : tduapi.c , tduapi.h
  • tge_sim_convert_ms_to_frames() : tgesim.h
  • tge_sim_convert_pct_to_q14() : tgesim.h
  • tge_sim_convert_pwr_to_amp() : tgesim.h
  • tge_sim_create_inst() : tgesim.h , tgesim.c
  • tge_sim_disp_version() : tgesim.h
  • tge_SIM_DTMF_HI_1 : tgesim.h
  • tge_SIM_DTMF_HI_2 : tgesim.h
  • tge_SIM_DTMF_HI_3 : tgesim.h
  • tge_SIM_DTMF_HI_4 : tgesim.h
  • tge_SIM_DTMF_LO_1 : tgesim.h
  • tge_SIM_DTMF_LO_2 : tgesim.h
  • tge_SIM_DTMF_LO_3 : tgesim.h
  • tge_SIM_DTMF_LO_4 : tgesim.h
  • tge_SIM_ERR_BADMULT : tgesim.h
  • tge_SIM_ERR_HEAPSZ : tgesim.h
  • tge_SIM_ERR_INITPROF : tgesim.h
  • tge_SIM_ERR_NONE : tgesim.h
  • tge_SIM_ERR_OUTFILE : tgesim.h
  • tge_SIM_ERR_SIMCFG : tgesim.h
  • tge_SIM_ERR_TDUALLOC : tgesim.h
  • tge_SIM_ERR_TDUGETSZ : tgesim.h
  • tge_SIM_ERR_TDUNEW : tgesim.h
  • tge_SIM_ERR_TDUSENDIN : tgesim.h
  • tge_SIM_ERR_TGECTRL : tgesim.h
  • tge_SIM_ERR_TGEGETSZ : tgesim.h
  • tge_SIM_ERR_TGEINIT : tgesim.h
  • tge_SIM_ERR_TGEPROC : tgesim.h
  • tge_SIM_FILE_OUTDIR : tgesim.h
  • tge_sim_fstring : tgesim.c
  • tge_sim_halt() : tgesim.c
  • tge_SIM_HEAP_SIZE : tgesim.h
  • tge_sim_initialize() : tgesim.c , tgesim.h
  • tge_SIM_MAX_FRAME : tgesim.h
  • tge_SIM_MAX_FREQ : tgesim.h
  • tge_SIM_MAX_STRING : tgesim.h
  • tge_sim_new_tdu() : tduapi.c , tduapi.h
  • tge_sim_open_tdu() : tduapi.c , tduapi.h
  • tge_SIM_PCM_ALAW : tgesim.h
  • tge_SIM_PCM_LIN : tgesim.h
  • tge_SIM_PCM_ULAW : tgesim.h
  • tge_sim_process_frames() : tgesim.h , tgesim.c
  • tge_SIM_PROF_1TONE_FILE : tgeprof.h
  • tge_SIM_PROF_2TONE_FILE : tgeprof.h
  • tge_SIM_PROF_3TONE_FILE : tgeprof.h
  • tge_SIM_PROF_4TONE_FILE : tgeprof.h
  • tge_SIM_PROF_AMPR_FILE : tgeprof.h
  • tge_sim_profile_close() : tgeprof.h , tgeprof.c
  • tge_sim_profile_init() : tgeprof.h , tgeprof.c
  • tge_sim_profile_print() : tgeprof.h , tgeprof.c
  • tge_sim_profile_start() : tgeprof.c , tgeprof.h
  • tge_sim_profile_stop() : tgeprof.c , tgeprof.h
  • tge_SIM_SAMPLE_PER_MS : tgesim.h
  • tge_sim_test() : tgesim.h , tgesim.c
  • tge_sim_test_ampr() : tgesim.c , tgesim.h
  • tge_sim_test_tones() : tgesim.c , tgesim.h
  • tgeHeap : tgesim.c
  • tgePcm_e : tgesim.h
  • tgeSim_check_rc() : tgesim.h , tgesim.c
  • tgeSimErr_e : tgesim.h
  • tgeSimErrorId : tgesim.c
  • tgeSimFptr : tgesim.c
  • tgeSimInst : tgesim.c
  • tone_strings : tduapi.c


TGE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • t

- t -

  • tduapi_BREAK_THRESH : tduapi.h
  • tduapi_FRAME_SIZE : tduapi.h
  • tduapi_FREQ_POW_THRESH_HIGH : tduapi.h
  • tduapi_FREQ_POW_THRESH_LOW : tduapi.h
  • tduapi_NUM_CED_MINOR : tduapi.h
  • tduapi_NUM_CEDPR_MINOR : tduapi.h
  • tduapi_NUM_DIGIT : tduapi.h
  • tduapi_NUM_EVENT : tduapi.h
  • tduapi_NUM_TONE : tduapi.h
  • tduapi_REPORT_STRING_LENGTH : tduapi.h
  • tduapi_STRING_LENGTH : tduapi.h
  • tduapi_TDU_MODULE_ID : tduapi.h
  • tduapi_TWIST_NEGATIVE : tduapi.h
  • tduapi_TWIST_POSITIVE : tduapi.h
  • tge_SIM_DTMF_HI_1 : tgesim.h
  • tge_SIM_DTMF_HI_2 : tgesim.h
  • tge_SIM_DTMF_HI_3 : tgesim.h
  • tge_SIM_DTMF_HI_4 : tgesim.h
  • tge_SIM_DTMF_LO_1 : tgesim.h
  • tge_SIM_DTMF_LO_2 : tgesim.h
  • tge_SIM_DTMF_LO_3 : tgesim.h
  • tge_SIM_DTMF_LO_4 : tgesim.h
  • tge_SIM_FILE_OUTDIR : tgesim.h
  • tge_SIM_HEAP_SIZE : tgesim.h
  • tge_SIM_MAX_FRAME : tgesim.h
  • tge_SIM_MAX_FREQ : tgesim.h
  • tge_SIM_MAX_STRING : tgesim.h
  • tge_SIM_PROF_1TONE_FILE : tgeprof.h
  • tge_SIM_PROF_2TONE_FILE : tgeprof.h
  • tge_SIM_PROF_3TONE_FILE : tgeprof.h
  • tge_SIM_PROF_4TONE_FILE : tgeprof.h
  • tge_SIM_PROF_AMPR_FILE : tgeprof.h
  • tge_SIM_SAMPLE_PER_MS : tgesim.h


TGE Test: Data Fields

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

  • tgePcm_e : tgesim.h
  • tgeSimErr_e : tgesim.h


TGE Test: Data Fields

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

  • tge_SIM_ERR_BADMULT : tgesim.h
  • tge_SIM_ERR_HEAPSZ : tgesim.h
  • tge_SIM_ERR_INITPROF : tgesim.h
  • tge_SIM_ERR_NONE : tgesim.h
  • tge_SIM_ERR_OUTFILE : tgesim.h
  • tge_SIM_ERR_SIMCFG : tgesim.h
  • tge_SIM_ERR_TDUALLOC : tgesim.h
  • tge_SIM_ERR_TDUGETSZ : tgesim.h
  • tge_SIM_ERR_TDUNEW : tgesim.h
  • tge_SIM_ERR_TDUSENDIN : tgesim.h
  • tge_SIM_ERR_TGECTRL : tgesim.h
  • tge_SIM_ERR_TGEGETSZ : tgesim.h
  • tge_SIM_ERR_TGEINIT : tgesim.h
  • tge_SIM_ERR_TGEPROC : tgesim.h
  • tge_SIM_PCM_ALAW : tgesim.h
  • tge_SIM_PCM_LIN : tgesim.h
  • tge_SIM_PCM_ULAW : tgesim.h


TGE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • m
  • s
  • t

- m -

  • main() : tgesim.c

- s -

  • sysDebugInfo() : tduapi.c , tduapi.h
  • sysToneDetect() : tduapi.h , tduapi.c

- t -

  • tge_sim_banner_print() : tgesim.h
  • tge_sim_compand() : tgesim.c , tgesim.h
  • tge_sim_config_tdu() : tduapi.c , tduapi.h
  • tge_sim_convert_ms_to_frames() : tgesim.h
  • tge_sim_convert_pct_to_q14() : tgesim.h
  • tge_sim_convert_pwr_to_amp() : tgesim.h
  • tge_sim_create_inst() : tgesim.c , tgesim.h
  • tge_sim_disp_version() : tgesim.h
  • tge_sim_halt() : tgesim.c
  • tge_sim_initialize() : tgesim.c , tgesim.h
  • tge_sim_new_tdu() : tduapi.h , tduapi.c
  • tge_sim_open_tdu() : tduapi.c , tduapi.h
  • tge_sim_process_frames() : tgesim.c , tgesim.h
  • tge_sim_profile_close() : tgeprof.c , tgeprof.h
  • tge_sim_profile_init() : tgeprof.h , tgeprof.c
  • tge_sim_profile_print() : tgeprof.c , tgeprof.h
  • tge_sim_profile_start() : tgeprof.c , tgeprof.h
  • tge_sim_profile_stop() : tgeprof.c , tgeprof.h
  • tge_sim_test() : tgesim.c , tgesim.h
  • tge_sim_test_ampr() : tgesim.c , tgesim.h
  • tge_sim_test_tones() : tgesim.h , tgesim.c
  • tgeSim_check_rc() : tgesim.c , tgesim.h


TGE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • c
  • d
  • e
  • f
  • s
  • t

- c -

  • compandBuffer : tgesim.c

- d -

  • digit_strings : tduapi.c

- e -

  • event_string : tduapi.c

- f -

  • frameMult : tgesim.c

- s -

  • sampleBuffer : tgesim.c
  • simCfg : tgesim.h , tgesim.c
  • simConfig : tgesim.c

- t -

  • tdu_ced_minor : tduapi.c
  • tdu_cedpr_minor : tduapi.c
  • tdu_event : tduapi.c
  • tdu_null_minor : tduapi.c
  • tduContext : tduapi.c
  • tduDetContexts : tduapi.c
  • tduIntFwTable : tduapi.c
  • tduSimInst : tduapi.c , tduapi.h
  • tge_ProfCycleCount : tgeprof.c
  • tge_ProfFptr : tgeprof.c , tgeprof.h
  • tge_ProfOverhead : tgeprof.h , tgeprof.c
  • tge_ProfStartCount : tgeprof.h , tgeprof.c
  • tge_ProfStopCount : tgeprof.h
  • tge_sim_fstring : tgesim.c
  • tgeHeap : tgesim.c
  • tgeSimErrorId : tgesim.c
  • tgeSimFptr : tgesim.c
  • tgeSimInst : tgesim.c
  • tone_strings : tduapi.c


TGE Test: TGE Unit Test

TGE Unit Test

Page Contents

  1. Description
  2. Building Unit Test
  3. Unit Test Procedures
  4. TGE MIPS Profiling
  5. Dependent Packages

Description

This package contains a basic test for the TGE. This is not a regression test, its purpose is to show how the TGE 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 TGE Unit Test package can be compiled in the following manners:

  1. Apply the GNU Makefile build procedure to the test package.
  2. Load the TGE Unit Test project into CCSV5 and build. All projects will reside in the tge\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main TGE documentation.

Unit Test Procedures

The TGE 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.X or above and may be used for those who haven't yet upgraded to CCS version 4.X or above.

  1. Open CCS
  2. Load the TGE Unit Test image for the target of interest
    • Will reside in the tge\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.X or above.

  1. Open CCS
  2. Load the TGE project for the target of interest
    • Will be a subdirectory off the tge\test\ directory
    • Can be identified using the CCS menu options "Project"-->"Import Existing CCS/CCE Eclipse Project" and browsing the tge\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.tdu (Tone detection for verification)
  • ti.mas.vpe (PCM companding)


TGE Test: Page Index

TGE Test Related Pages

Here is a list of all related documentation pages:
  • Unit Test Configuration and Execution
  • TGE MIPS Profiling
  • CCS Project Conversion
  • Disclaimer


TGE Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the tge\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_TGE_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all TGE component Unit Test CCS projects in the tge\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the tge\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_TGE_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all TGE component Unit Test CCS projects in the tge\test\ccsProjects directory such that they will load and build with CCS version 4.2


TGE Test: TGE MIPS Profiling

TGE MIPS Profiling

The TGE unit test allows frame-by-frame cycle data can be captured to file. This allows TGE resource requirements to be estimated for various memory scenarios and operatoinal configurations prior to integration into a larger system with a known MIPS budget.

Profiling may be performed via the following procedure:

  1. Build the target TGE following the procedure in Building Unit Test
  2. Load the TGE image into CCS and follow the unit test procedure as outlined in Unit Test Procedures
    • Ensure the simCfg->profile_enable flag is set to TRUE (1)
  3. Per-frame cycle information will be output to five files in the tge\test\vectors\profile directory:
    • ampr_profile.txt
    • tone1_profile.txt
    • tone2_profile.txt
    • tone3_profile.txt
    • tone4_profile.txt
  4. The decimal value on each line of these files (line "N" for example) represents the cycles for execution of the TGE function tgeProcess() for the Nth frame of data.
  5. Open Matlab and change the Matlab directory to tge\test\vectors\ and run the Matlab script profile.m (provided).


TGE Test: simConfig_t Struct Reference

  • Data Structures
  • Data Fields

simConfig_t Struct Reference

#include <tgesim.h>

Detailed Description

Definition at line 72 of file tgesim.h.

Data Fields

tbool | profile_enable
tbool | cache_enable
tgePcm_e companding
tuint | frame_length

Field Documentation

tbool simConfig_t::profile_enable

Definition at line 74 of file tgesim.h.

Referenced by main().

tbool simConfig_t::cache_enable

Definition at line 75 of file tgesim.h.

Referenced by tge_sim_profile_init(), and tge_sim_profile_start().

tgePcm_e simConfig_t::companding

Definition at line 76 of file tgesim.h.

Referenced by tge_sim_process_frames().

tuint simConfig_t::frame_length

Definition at line 77 of file tgesim.h.

Referenced by tge_sim_convert_ms_to_frames(), tge_sim_initialize(), and tge_sim_process_frames().

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


TGE Test: tduapi.c File Reference

  • File List
  • Globals

tduapi.c File Reference

#include <ti\mas\tge\test\src\tduapi.h>
#include <ti\mas\tge\test\src\tgesim.h>

Include dependency graph for tduapi.c:

Go to the source code of this file.

Functions

void | sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF, tduCptSmartRep_t *cpt_report)
void | sysDebugInfo (void *ID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | tge_sim_new_tdu (void)
void | tge_sim_open_tdu (tint mf_type)
void | tge_sim_config_tdu (tint control_code)

Variables

void * | tduSimInst
tduContext_t | tduContext
const tduDetContext_t * | tduDetContexts []
const tduIntFwTable_t | tduIntFwTable
char | digit_strings [tduapi_NUM_DIGIT][tduapi_STRING_LENGTH]
char | tone_strings [tduapi_NUM_TONE][tduapi_STRING_LENGTH]
char | tdu_event [tduapi_NUM_EVENT][tduapi_STRING_LENGTH]
char | tdu_ced_minor [tduapi_NUM_CED_MINOR][tduapi_STRING_LENGTH]
char | tdu_cedpr_minor [tduapi_NUM_CEDPR_MINOR][tduapi_STRING_LENGTH]
char | tdu_null_minor [1][tduapi_STRING_LENGTH]
char | event_string [tduapi_REPORT_STRING_LENGTH]

Function Documentation

void sysToneDetect | ( | tuint | ID,
 |  | tint | tid,
 |  | tint | on,
 |  | tint | time,
 |  | tint | power_MF,
 |  | tduCptSmartRep_t * | cpt_report
 | ) |  |

Definition at line 230 of file tduapi.c.

References digit_strings, event_string, tdu_ced_minor, tdu_cedpr_minor, tdu_event, tdu_null_minor, and tone_strings.

void sysDebugInfo | ( | void * | ID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 277 of file tduapi.c.

void tge_sim_new_tdu ( void )

Definition at line 295 of file tduapi.c.

References tduapi_FRAME_SIZE, tduapi_TDU_MODULE_ID, tduSimInst, tge_SIM_ERR_TDUALLOC, tge_SIM_ERR_TDUGETSZ, tge_SIM_ERR_TDUNEW, and tgeSim_check_rc().

Referenced by main().

Here is the call graph for this function:

void tge_sim_open_tdu ( tint mf_type )

Definition at line 361 of file tduapi.c.

References tduapi_BREAK_THRESH, tduapi_FRAME_SIZE, tduapi_FREQ_POW_THRESH_HIGH, tduapi_FREQ_POW_THRESH_LOW, tduapi_TWIST_NEGATIVE, tduapi_TWIST_POSITIVE, and tduSimInst.

Referenced by main().

void tge_sim_config_tdu ( tint control_code )

Definition at line 400 of file tduapi.c.

References tduSimInst.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

Variable Documentation

void* tduSimInst

Definition at line 14 of file tduapi.c.

Referenced by tge_sim_config_tdu(), tge_sim_initialize(), tge_sim_new_tdu(), tge_sim_open_tdu(), and tge_sim_process_frames().

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 20 of file tduapi.c.

const tduDetContext_t* tduDetContexts[]

Definition at line 43 of file tduapi.c.

const tduIntFwTable_t tduIntFwTable

Definition at line 89 of file tduapi.c.

char digit_strings[tduapi_NUM_DIGIT][tduapi_STRING_LENGTH]

Initial value:

 {
  "  Detection:  DTMF Digit \"0\"\0",
  "  Detection:  DTMF Digit \"1\"\0",
  "  Detection:  DTMF Digit \"2\"\0",
  "  Detection:  DTMF Digit \"3\"\0",
  "  Detection:  DTMF Digit \"4\"\0",
  "  Detection:  DTMF Digit \"5\"\0",
  "  Detection:  DTMF Digit \"6\"\0",
  "  Detection:  DTMF Digit \"7\"\0",
  "  Detection:  DTMF Digit \"8\"\0",
  "  Detection:  DTMF Digit \"9\"\0",
  "  Detection:  DTMF Digit \"A\"\0",
  "  Detection:  DTMF Digit \"B\"\0",
  "  Detection:  DTMF Digit \"C\"\0",
  "  Detection:  DTMF Digit \"D\"\0",
  "  Detection:  DTMF Digit \"*\"\0",
  "  Detection:  DTMF Digit \"#\"\0",
}

Definition at line 130 of file tduapi.c.

Referenced by sysToneDetect().

char tone_strings[tduapi_NUM_TONE][tduapi_STRING_LENGTH]

Definition at line 149 of file tduapi.c.

Referenced by sysToneDetect().

char tdu_event[tduapi_NUM_EVENT][tduapi_STRING_LENGTH]

Initial value:

 {
  "OFF  \0",
  "ON   \0",
  "     \0",
  "ALERT\0"
}

Definition at line 202 of file tduapi.c.

Referenced by sysToneDetect().

char tdu_ced_minor[tduapi_NUM_CED_MINOR][tduapi_STRING_LENGTH]

Initial value:

 {
  " (Confirm) \0",
  " (Early)   \0",
}

Definition at line 209 of file tduapi.c.

Referenced by sysToneDetect().

char tdu_cedpr_minor[tduapi_NUM_CEDPR_MINOR][tduapi_STRING_LENGTH]

Initial value:

 {
  " (Confirm) \0",
  " (V.32 Ext)\0",
}

Definition at line 214 of file tduapi.c.

Referenced by sysToneDetect().

char tdu_null_minor[1][tduapi_STRING_LENGTH]

Initial value:

 {
  "           \0",
}

Definition at line 219 of file tduapi.c.

Referenced by sysToneDetect().

char event_string[tduapi_REPORT_STRING_LENGTH]

Definition at line 223 of file tduapi.c.

Referenced by sysToneDetect().


TGE Test: tduapi.c Source File

  • File List
  • Globals

tduapi.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Provide TDU accessibility in other unit test.
00003  ******************************************************************************
00004  * FILE NAME:   tduapi.c
00005  *
00006  *****************************************************************************/
00007
00008 /* Associated simulation headers */
00009 #include <ti\mas\tge\test\src\tduapi.h>
00010 #include <ti\mas\tge\test\src\tgesim.h>
00011
00012
00013 /* Global TDU instance */
00014 void *tduSimInst;
00015
00016
00017 /*********************************************************************
00018  * Initialization requirements
00019  *********************************************************************/
00020 tduContext_t tduContext = {
00021   sysToneDetect,
00022   NULL,
00023   NULL,
00024   NULL,
00025   NULL,
00026   NULL,
00027   NULL,
00028   NULL,
00029   NULL,
00030   sysDebugInfo,
00031   /* Following items are initialized in tduNew() */
00032   0, 0, 0, 0,
00033   NULL,
00034   NULL,
00035   NULL,
00036   0, 0, 0, 0,
00037   0, 0, 0, 0,
00038   0, 0, 0, 0,
00039   0, 0, 0, 0
00040 }; /* tduContext */
00041
00042 /* TDU Internal Contexts */
00043 const tduDetContext_t *tduDetContexts[] = {
00044   /* Place all SFDF detectors together in succesion */
00045   &tduIncV23BW_MARKS_F,
00046   &tduIncV21LOW_MARKS_F,
00047   &tduIncTT1khz_F,
00048   &tduIncCNG_F,
00049   &tduIncV21LOW_SPACES_F,
00050   &tduIncB202_MARKS_F,
00051   &tduIncBELLTX2_F,
00052   &tduIncV23FW_MARKS_F,
00053   &tduIncV18A_F,
00054   &tduIncV21UPPER_MARKS_F,
00055   &tduIncSS7COR_F,
00056   &tduIncV18A_S_F,
00057   &tduIncSS7COT_F,
00058   &tduIncV25_F,
00059   &tduIncB202_SPACES_F,
00060   &tduIncBELLTX1_F,
00061   &tduIncSF_F,
00062   &tduIncSIA_F,
00063   &tduIncSIA_S_F,
00064   /* Place all SFDT detectors together in succesion */
00065   &tduIncV23FW_MARKS_T,
00066   &tduIncSS7COT_T,
00067   &tduIncV25_T_RX,
00068   &tduIncBELLRX1_T,
00069   &tduIncBELLRX2_T,
00070   &tduIncSIA_T_RX,
00071   &tduIncSIA_S_T_RX,
00072   &tduIncSFDT_DUMMY1_T,
00073   &tduIncSFDT_DUMMY2_T,
00074   &tduIncSFDT_DUMMY3_T,
00075   /*** place all MF detectors together in succesion */
00076   &tduIncDTMF,
00077   &tduIncR1,
00078   &tduIncR2FW,
00079   &tduIncR2BW,
00080   &tduIncV8BIS_FS_F,
00081   &tduIncCOIN_TONES,
00082   /* ... The rest */
00083   &tduIncV21,
00084   &tduIncCPT,
00085   NULL
00086 };
00087
00088 /* Definition of internal TDU framework and hooks */
00089 const tduIntFwTable_t tduIntFwTable = {
00090   {
00091     tduSFDControl,
00092     tduSFDFProcess
00093   },
00094   {
00095     tduSFDControl,
00096     tduSFDTProcess,
00097   },
00098   {
00099     tduMFControl,
00100     tduMFProcess,
00101   },
00102   {
00103     tduCPTControl,
00104     tduCPTProcess,
00105   },
00106   {
00107     tduV21Control,
00108     tduV21Process,
00109   },
00110   {
00111     tduBDTEWControl,
00112     tduBDTEWProcess,
00113   },
00114   NULL,
00115   tdu_sfd_llmr_ANSam_reset,
00116   tdu_sfd_llmr_ANSam,
00117   tdu_sfd_llmr_ANSam_test,
00118   tdu_mf_v8bis_fs_ctl,
00119   tdu_digit_filter,
00120   tduVoiceDiscProcess,
00121   tduVoiceDiscCtl,
00122   tduBellTid,
00123   tdu_mf_coin_tones_ctl,
00124 };
00125
00126
00127 /***************************************************************************/
00128 /* Result reporting strings (START)                                        */
00129 /***************************************************************************/
00130 char digit_strings[tduapi_NUM_DIGIT][tduapi_STRING_LENGTH] = {
00131   "  Detection:  DTMF Digit \"0\"\0",
00132   "  Detection:  DTMF Digit \"1\"\0",
00133   "  Detection:  DTMF Digit \"2\"\0",
00134   "  Detection:  DTMF Digit \"3\"\0",
00135   "  Detection:  DTMF Digit \"4\"\0",
00136   "  Detection:  DTMF Digit \"5\"\0",
00137   "  Detection:  DTMF Digit \"6\"\0",
00138   "  Detection:  DTMF Digit \"7\"\0",
00139   "  Detection:  DTMF Digit \"8\"\0",
00140   "  Detection:  DTMF Digit \"9\"\0",
00141   "  Detection:  DTMF Digit \"A\"\0",
00142   "  Detection:  DTMF Digit \"B\"\0",
00143   "  Detection:  DTMF Digit \"C\"\0",
00144   "  Detection:  DTMF Digit \"D\"\0",
00145   "  Detection:  DTMF Digit \"*\"\0",
00146   "  Detection:  DTMF Digit \"#\"\0",
00147 };
00148
00149 char tone_strings[tduapi_NUM_TONE][tduapi_STRING_LENGTH] = {
00150   "  Detection:  INVALID \0",
00151   "  Detection:  CED     \0",
00152   "  Detection:  CED PR  \0",
00153   "  Detection:  INVALID \0",
00154   "  Detection:  INVALID \0",
00155   "  Detection:  SS7 COT \0",
00156   "  Detection:  SF      \0",
00157   "  Detection:  CNG     \0",
00158   "  Detection:  SS7 COR \0",
00159   "  Detection:  TT 1KHz \0",
00160   "  Detection:  INVALID \0",
00161   "  Detection:  INVALID \0",
00162   "  Detection:  INVALID \0",
00163   "  Detection:  INVALID \0",
00164   "  Detection:  INVALID \0",
00165   "  Detection:  INVALID \0",
00166   "  Detection:  INVALID \0",
00167   "  Detection:  BELL    \0",
00168   "  Detection:  INVALID \0",
00169   "  Detection:  INVALID \0",
00170   "  Detection:  INVALID \0",
00171   "  Detection:  INVALID \0",
00172   "  Detection:  INVALID \0",
00173   "  Detection:  INVALID \0",
00174   "  Detection:  INVALID \0",
00175   "  Detection:  INVALID \0",
00176   "  Detection:  INVALID \0",
00177   "  Detection:  INVALID \0",
00178   "  Detection:  INVALID \0",
00179   "  Detection:  INVALID \0",
00180   "  Detection:  INVALID \0",
00181   "  Detection:  ANSAM   \0",
00182   "  Detection:  ANSAM PR\0",
00183   "  Detection:  INVALID \0",
00184   "  Detection:  INVALID \0",
00185   "  Detection:  INVALID \0",
00186   "  Detection:  INVALID \0",
00187   "  Detection:  INVALID \0",
00188   "  Detection:  INVALID \0",
00189   "  Detection:  INVALID \0",
00190   "  Detection:  INVALID \0",
00191   "  Detection:  INVALID \0",
00192   "  Detection:  INVALID \0",
00193   "  Detection:  INVALID \0",
00194   "  Detection:  INVALID \0",
00195   "  Detection:  INVALID \0",
00196   "  Detection:  INVALID \0",
00197   "  Detection:  V25 EARLY ALERT\0",
00198   "  Detection:  V25 EARLY FALSE\0",
00199   "  Detection:  INVALID \0",
00200 };
00201
00202 char tdu_event[tduapi_NUM_EVENT][tduapi_STRING_LENGTH] = {
00203   "OFF  \0",
00204   "ON   \0",
00205   "     \0",
00206   "ALERT\0"
00207 };
00208
00209 char tdu_ced_minor[tduapi_NUM_CED_MINOR][tduapi_STRING_LENGTH] = {
00210   " (Confirm) \0",
00211   " (Early)   \0",
00212 };
00213
00214 char tdu_cedpr_minor[tduapi_NUM_CEDPR_MINOR][tduapi_STRING_LENGTH] = {
00215   " (Confirm) \0",
00216   " (V.32 Ext)\0",
00217 };
00218
00219 char tdu_null_minor[1][tduapi_STRING_LENGTH] = {
00220   "           \0",
00221 };
00222
00223 char event_string[tduapi_REPORT_STRING_LENGTH];
00224
00225
00226
00227 /******************************************************************************
00228  * FUNCTION PURPOSE: Receive TDU detected events
00229  ******************************************************************************/
00230 void sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF,
00231                     tduCptSmartRep_t *cpt_report)
00232 {
00233   tint  tone_id;
00234   tint  tone_type;
00235   char  *tdu_minor;
00236
00237   tone_id   =   tid & tdu_TID_MASK_ID;
00238   tone_type = ((tid & tdu_TID_TYPE_MASK) >> 10);
00239
00240   /* Create tone event string */
00241   if (tone_id < tdu_TID_FIRST) {
00242     strcpy (event_string, digit_strings[tone_id]);
00243   }
00244   else {
00245     strcpy (event_string, tone_strings[tone_id-tdu_TID_FIRST]);
00246   }
00247
00248   /* Get minor string pointer (if any) */
00249   switch (tone_id) {
00250     case tdu_TID_V25:
00251     case tdu_TID_V25_RX:
00252       tdu_minor = tdu_ced_minor[tone_type];
00253       break;
00254     case tdu_TID_V25_PR:
00255     case tdu_TID_V25_RX_PR:
00256       tdu_minor = tdu_cedpr_minor[tone_type];
00257       break;
00258     default:
00259       tdu_minor = tdu_null_minor[tone_type];
00260       break;
00261   }
00262   strcat (event_string, tdu_minor);
00263
00264   /* Print results to STDOUT */
00265   if (on) {
00266     fprintf (stdout,  "%s  %s    Power: %3d dBm0\n", event_string,
00267              tdu_event[on], power_MF);
00268   }
00269   else {
00270     fprintf (stdout,  "%s  %s\n", event_string, tdu_event[on]);
00271   }
00272 }
00273
00274 /******************************************************************************
00275  * FUNCTION PURPOSE: Debug & exception functions.
00276  ******************************************************************************/
00277 void sysDebugInfo (void *ID, tuint msgType, tuint msgCode, tuint msgLength,
00278                    tuint *supportingData)
00279 {
00280   /* Do nothing for now */
00281 }
00282
00283
00284 /******************************************************************************
00285  * FUNCTION PURPOSE: Create TDU module.
00286  ******************************************************************************
00287  * DESCRIPTION: Creates a TDU component instance
00288  *
00289  *  void tge_sim_new_tdu
00290  *                      (
00291  *                       void
00292  *                      )
00293  *
00294  *****************************************************************************/
00295 void tge_sim_new_tdu (void)
00296 {
00297   ecomemBuffer_t  *tduBufs;
00298   ecomemBuffer_t  *bufs;
00299   tduSizeConfig_t  sizeCfg;
00300   tduNewConfig_t   tduCfgNew;
00301   tint  nbufs;
00302   tint  ret_code;
00303   tint  i;
00304
00305   /* TDU get sizes initialization */
00306   sizeCfg.maxSamplesPerFrame = tduapi_FRAME_SIZE;
00307   sizeCfg.lite               = FALSE;
00308
00309   /* TDU get sizes */
00310   ret_code = tduGetSizes (&nbufs, (const ecomemBuffer_t **) &bufs, &sizeCfg);
00311   tgeSim_check_rc (tge_SIM_ERR_TDUGETSZ, ret_code, tdu_NOERR);
00312
00313   /* Allocate memory */
00314   tduBufs = (ecomemBuffer_t *) malloc (nbufs * sizeof (ecomemBuffer_t));
00315   tgeSim_check_rc (tge_SIM_ERR_TDUALLOC, (tduBufs == NULL), FALSE);
00316
00317   /* Allocate buffers */
00318   for (i=0; i<nbufs; i++) {
00319     tduBufs[i]           = bufs[i];
00320     tduBufs[i].mclass    = ecomem_CLASS_EXTERNAL;
00321     tduBufs[i].log2align = bufs[i].log2align;
00322     tduBufs[i].volat     = bufs[i].volat;
00323 #if (defined(ti_targets_C64)      || defined(ti_targets_C64_big_endian)       || \
00324      defined(ti_targets_C64P)     || defined(ti_targets_C64P_big_endian)      || \
00325      defined(ti_targets_elf_C64P) || defined(ti_targets_elf_C64P_big_endian)  || \
00326      defined(ti_targets_C66)      || defined(ti_targets_C66_big_endian)       || \
00327      defined(ti_targets_elf_C66)  || defined(ti_targets_elf_C66_big_endian))
00328     tduBufs[i].base      = (bufs[i].size) ? memalign((1 << bufs[i].log2align),bufs[i].size) : NULL;
00329 #else
00330     {
00331       tuint linAlign  = (tuint) 1 << bufs[i].log2align;
00332       tduBufs[i].base = (bufs[i].size) ? malloc (bufs[i].size + linAlign - 1) :
00333                          NULL;
00334       tduBufs[i].base = (void *) ((((tulong) tduBufs[i].base) + linAlign - 1) &
00335                                  (0xFFFFFFFFUL - linAlign + 1));
00336     }
00337 #endif
00338   }
00339
00340   /* TDE new */
00341   tduCfgNew.ID      = tduapi_TDU_MODULE_ID;
00342   tduCfgNew.sizeCfg = sizeCfg;
00343   ret_code = tduNew (&tduSimInst, nbufs, tduBufs, &tduCfgNew);
00344   tgeSim_check_rc (tge_SIM_ERR_TDUNEW, ret_code, tdu_NOERR);
00345 }
00346
00347
00348 /******************************************************************************
00349  * FUNCTION PURPOSE: Open TDU module.
00350  ******************************************************************************
00351  * DESCRIPTION: Opens a TDU component instance
00352  *
00353  *  void tge_sim_open_tdu (
00354  *                         int tdu_mf_type, - tdu_CTL_MF_DTMF (DTMF tones)
00355  *                                            tdu_CTL_MF_R1   (R1 sig)
00356  *                                            tdu_CTL_MF_R2FW (R2 fwd sig)
00357  *                                            tdu_CTL_MF_R2BW (R2 bkwd sig)
00358  *                        )
00359  *
00360  *****************************************************************************/
00361 void tge_sim_open_tdu (tint mf_type)
00362 {
00363   tduConfig_t tduCfg;
00364   tduCfgCtl_t tduCfgCtl;
00365
00366   /* Open TDU instance */
00367   tduCfg.frame_size = tduapi_FRAME_SIZE;
00368   tduOpen (tduSimInst, &tduCfg);
00369
00370   /* Prepare common configuration options */
00371   tduCfgCtl.u.mf.freqPowThreshLow  = tduapi_FREQ_POW_THRESH_LOW;
00372   tduCfgCtl.u.mf.freqPowThreshHigh = tduapi_FREQ_POW_THRESH_HIGH;
00373   tduCfgCtl.u.mf.twistPositive     = tduapi_TWIST_POSITIVE;
00374   tduCfgCtl.u.mf.twistNegative     = tduapi_TWIST_NEGATIVE;
00375   tduCfgCtl.u.mf.breakThresh       = tduapi_BREAK_THRESH;
00376
00377   /* start DTMF detector */
00378   tduControl (tduSimInst, mf_type, &tduCfgCtl);
00379
00380   /* Set the TDU system position */
00381   tduCfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
00382                                         tdu_POSITION_SEC_ACBC_CHANGED |
00383                                         tdu_POSITION_TXRX_CHANGED;
00384   tduCfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
00385                                         tdu_POSITION_SEC_AC;
00386   tduControl (tduSimInst, tdu_CTL_POSITION, &tduCfgCtl);
00387 }
00388
00389
00390 /******************************************************************************
00391  * FUNCTION PURPOSE: Configure TDU module.
00392  ******************************************************************************
00393  * DESCRIPTION: Configures a TDU component for detection
00394  *
00395  *  void tge_sim_config_tdu (
00396  *                           tint control_code  - TDU control code (see tdu.h)
00397  *                          )
00398  *
00399  *****************************************************************************/
00400 void tge_sim_config_tdu (tint control_code)
00401 {
00402   tduCfgCtl_t tduCfgCtl;
00403
00404   /* Explicitly set the position */
00405   memset (&tduCfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
00406   tduCfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
00407                                         tdu_POSITION_SEC_ACBC_CHANGED |
00408                                         tdu_POSITION_TXRX_CHANGED;
00409   tduCfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
00410                                         tdu_POSITION_SEC_AC;
00411   tduControl (tduSimInst, tdu_CTL_POSITION, &tduCfgCtl);
00412
00413   /* Set the detection */
00414   memset (&tduCfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
00415   tduControl (tduSimInst, control_code, &tduCfgCtl);
00416 }
00417
00418 /* nothing past this point */


TGE Test: tduapi.h File Reference

  • File List
  • Globals

tduapi.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/tdu/tdu.h>

Include dependency graph for tduapi.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | tduapi_REPORT_STRING_LENGTH 128
#define | tduapi_STRING_LENGTH 32
#define | tduapi_NUM_CED_MINOR 2
#define | tduapi_NUM_CEDPR_MINOR 2
#define | tduapi_NUM_EVENT 4
#define | tduapi_NUM_DIGIT 16
#define | tduapi_NUM_TONE (tdu_TID_LAST - tdu_TID_FIRST + 1)
#define | tduapi_FREQ_POW_THRESH_LOW (-30)
#define | tduapi_FREQ_POW_THRESH_HIGH 1
#define | tduapi_TWIST_NEGATIVE 9
#define | tduapi_TWIST_POSITIVE 5
#define | tduapi_BREAK_THRESH (-32)
#define | tduapi_TDU_MODULE_ID 0x000A
#define | tduapi_FRAME_SIZE 40

Functions

void | tge_sim_new_tdu (void)
void | tge_sim_open_tdu (tint mf_type)
void | tge_sim_config_tdu (tint control_code)
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)

Variables

void * | tduSimInst

Define Documentation

#define tduapi_REPORT_STRING_LENGTH 128

Definition at line 26 of file tduapi.h.

#define tduapi_STRING_LENGTH 32

Definition at line 27 of file tduapi.h.

#define tduapi_NUM_CED_MINOR 2

Definition at line 28 of file tduapi.h.

#define tduapi_NUM_CEDPR_MINOR 2

Definition at line 29 of file tduapi.h.

#define tduapi_NUM_EVENT 4

Definition at line 30 of file tduapi.h.

#define tduapi_NUM_DIGIT 16

Definition at line 31 of file tduapi.h.

#define tduapi_NUM_TONE (tdu_TID_LAST - tdu_TID_FIRST + 1)

Definition at line 32 of file tduapi.h.

#define tduapi_FREQ_POW_THRESH_LOW (-30)

Definition at line 35 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_FREQ_POW_THRESH_HIGH 1

Definition at line 36 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_TWIST_NEGATIVE 9

Definition at line 37 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_TWIST_POSITIVE 5

Definition at line 38 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_BREAK_THRESH (-32)

Definition at line 39 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_TDU_MODULE_ID 0x000A

Definition at line 42 of file tduapi.h.

Referenced by tge_sim_new_tdu().

#define tduapi_FRAME_SIZE 40

Definition at line 43 of file tduapi.h.

Referenced by tge_sim_initialize(), tge_sim_new_tdu(), tge_sim_open_tdu(), and tge_sim_process_frames().

Function Documentation

void tge_sim_new_tdu ( void )

Definition at line 295 of file tduapi.c.

References tduapi_FRAME_SIZE, tduapi_TDU_MODULE_ID, tduSimInst, tge_SIM_ERR_TDUALLOC, tge_SIM_ERR_TDUGETSZ, tge_SIM_ERR_TDUNEW, and tgeSim_check_rc().

Referenced by main().

Here is the call graph for this function:

void tge_sim_open_tdu ( tint mf_type )

Definition at line 361 of file tduapi.c.

References tduapi_BREAK_THRESH, tduapi_FRAME_SIZE, tduapi_FREQ_POW_THRESH_HIGH, tduapi_FREQ_POW_THRESH_LOW, tduapi_TWIST_NEGATIVE, tduapi_TWIST_POSITIVE, and tduSimInst.

Referenced by main().

void tge_sim_config_tdu ( tint control_code )

Definition at line 400 of file tduapi.c.

References tduSimInst.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

void sysDebugInfo | ( | void * | ID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 277 of file tduapi.c.

void sysToneDetect | ( | tuint | ID,
 |  | tint | tid,
 |  | tint | on,
 |  | tint | time,
 |  | tint | power_MF,
 |  | tduCptSmartRep_t * | cpt_report
 | ) |  |

Definition at line 230 of file tduapi.c.

References digit_strings, event_string, tdu_ced_minor, tdu_cedpr_minor, tdu_event, tdu_null_minor, and tone_strings.

Variable Documentation

void* tduSimInst

Definition at line 14 of file tduapi.c.

Referenced by tge_sim_config_tdu(), tge_sim_initialize(), tge_sim_new_tdu(), tge_sim_open_tdu(), and tge_sim_process_frames().


TGE Test: tduapi.h Source File

  • File List
  • Globals

tduapi.h

Go to the documentation of this file.
00001 #ifndef _TDUAPI_H
00002 #define _TDUAPI_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Provide TDU accessibility in other unit test.
00005  ******************************************************************************
00006  * FILE NAME:   tduapi.h
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
00017 /* Component headers */
00018 #include <ti/mas/tdu/tdu.h>
00019
00020
00021 /* Global TDU instance */
00022 extern void *tduSimInst;
00023
00024
00025 /* Result reporting definitions */
00026 #define tduapi_REPORT_STRING_LENGTH     128
00027 #define tduapi_STRING_LENGTH             32
00028 #define tduapi_NUM_CED_MINOR              2
00029 #define tduapi_NUM_CEDPR_MINOR            2
00030 #define tduapi_NUM_EVENT                  4
00031 #define tduapi_NUM_DIGIT                 16
00032 #define tduapi_NUM_TONE                 (tdu_TID_LAST - tdu_TID_FIRST + 1)
00033
00034 /* Result reporting definitions */
00035 #define tduapi_FREQ_POW_THRESH_LOW     (-30)
00036 #define tduapi_FREQ_POW_THRESH_HIGH       1
00037 #define tduapi_TWIST_NEGATIVE             9
00038 #define tduapi_TWIST_POSITIVE             5
00039 #define tduapi_BREAK_THRESH            (-32)
00040
00041 /* TDU API definitions */
00042 #define tduapi_TDU_MODULE_ID         0x000A
00043 #define tduapi_FRAME_SIZE                40
00044
00045
00046 /* External function prototypes */
00047 void tge_sim_new_tdu    (void);
00048 void tge_sim_open_tdu   (tint mf_type);
00049 void tge_sim_config_tdu (tint control_code);
00050
00051
00052 /* Internal function prototypes */
00053 void sysDebugInfo  (void *ID, tuint msgType, tuint msgCode, tuint msgLength,
00054                     tuint *supportingData);
00055 void sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF,
00056                     tduCptSmartRep_t *cpt_report);
00057
00058
00059 #endif  /* _TDUAPI_H */
00060
00061 /* nothing past this point */


TGE Test: tgeprof.c File Reference

  • File List
  • Globals

tgeprof.c File Reference

#include <stdio.h>
#include <ti/mas/sdk/profile.h>
#include <ti/mas/sdk/memArchCfg.h>
#include <ti/mas/tge/test/src/tgesim.h>

Include dependency graph for tgeprof.c:

Go to the source code of this file.

Functions

void | tge_sim_profile_start (void)
void | tge_sim_profile_stop (void)
void | tge_sim_profile_init (char *filename)
void | tge_sim_profile_close (char *filename)
void | tge_sim_profile_print (void)

Variables

FILE * | tge_ProfFptr = (FILE *) NULL
tlong | tge_ProfOverhead = 0L
tlong | tge_ProfStartCount = 0L
tlong | tge_ProfCycleCount = 0L

Function Documentation

void tge_sim_profile_start ( void )

Definition at line 32 of file tgeprof.c.

References simConfig_t::cache_enable, simCfg, tge_ProfCycleCount, and tge_ProfStartCount.

Referenced by tge_sim_process_frames(), and tge_sim_profile_init().

void tge_sim_profile_stop ( void )

Definition at line 45 of file tgeprof.c.

References tge_ProfCycleCount, tge_ProfOverhead, and tge_ProfStartCount.

Referenced by tge_sim_process_frames(), and tge_sim_profile_init().

void tge_sim_profile_init ( char * filename )

Definition at line 61 of file tgeprof.c.

References simConfig_t::cache_enable, simCfg, tge_ProfCycleCount, tge_ProfFptr, tge_ProfOverhead, tge_sim_profile_start(), and tge_sim_profile_stop().

Referenced by main().

Here is the call graph for this function:

void tge_sim_profile_close ( char * filename )

Definition at line 84 of file tgeprof.c.

References tge_ProfFptr.

Referenced by main().

void tge_sim_profile_print ( void )

Definition at line 97 of file tgeprof.c.

References tge_ProfCycleCount, and tge_ProfFptr.

Referenced by tge_sim_process_frames().

Variable Documentation

FILE* tge_ProfFptr = (FILE *) NULL

Definition at line 21 of file tgeprof.c.

Referenced by tge_sim_profile_close(), tge_sim_profile_init(), and tge_sim_profile_print().

tlong tge_ProfOverhead = 0L

Definition at line 22 of file tgeprof.c.

Referenced by tge_sim_profile_init(), and tge_sim_profile_stop().

tlong tge_ProfStartCount = 0L

Definition at line 23 of file tgeprof.c.

Referenced by tge_sim_profile_start(), and tge_sim_profile_stop().

tlong tge_ProfCycleCount = 0L

Definition at line 24 of file tgeprof.c.

Referenced by tge_sim_profile_init(), tge_sim_profile_print(), tge_sim_profile_start(), and tge_sim_profile_stop().


TGE Test: tgeprof.c Source File

  • File List
  • Globals

tgeprof.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: TGE profiling commands.
00003  ******************************************************************************
00004  * FILE NAME:   tgeprof.c
00005  *
00006  * DESCRIPTION: Defines profiling routines used in the TGE simulation
00007  *
00008  * (C) Copyright 2011, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #include <stdio.h>
00012
00013 #include <ti/mas/sdk/profile.h>
00014 #include <ti/mas/sdk/memArchCfg.h>
00015 #include <ti/mas/tge/test/src/tgesim.h>
00016
00017
00018 /***********************************************************************
00019  * Profiling globals
00020  ***********************************************************************/
00021 FILE *tge_ProfFptr        = (FILE *) NULL;
00022 tlong tge_ProfOverhead    = 0L;
00023 tlong tge_ProfStartCount  = 0L;
00024 tlong tge_ProfCycleCount  = 0L;
00025
00026
00027 /***********************************************************************
00028  * Profiling routines
00029  ***********************************************************************/
00030
00031  /* ============ tge_sim_profile_start () ========== */
00032 void tge_sim_profile_start (void)
00033 {
00034   /* Flush the cache */
00035   if (simCfg->cache_enable) {
00036     memarchcfg_cacheFlush ();
00037   }
00038
00039   /* Clear the total cycles and get the start count */
00040   tge_ProfCycleCount = 0L;
00041   tge_ProfStartCount = profile_getCPUcycleCount ();
00042 }
00043
00044 /* ============ tge_sim_profile_stop () ========== */
00045 void tge_sim_profile_stop (void)
00046 {
00047   /* Get end cycles */
00048   tlong count = profile_getCPUcycleCount();
00049
00050   /* Calculate total cycles (correct for timer wrap) */
00051   count -= tge_ProfStartCount;
00052   if (count < 0) {
00053     count += sdk_PROFILE_MAXCNT;
00054   }
00055
00056   /* Store adjusted total cycles */
00057   tge_ProfCycleCount = count - tge_ProfOverhead;
00058 }
00059
00060 /* ============ tge_sim_profile_init () ========== */
00061 void tge_sim_profile_init (char *filename)
00062 {
00063   /* Initialize SDK profiling and cache */
00064   profile_initCycleProfiling ();
00065   if (simCfg->cache_enable) {
00066     memarchcfg_cacheEnable ();
00067   }
00068
00069   /* Get estimate of profile cycle call overhead */
00070   tge_ProfOverhead = 0L;
00071   tge_sim_profile_start ();
00072   tge_sim_profile_stop  ();
00073   tge_ProfOverhead = tge_ProfCycleCount;
00074
00075   /* Open profiling data file */
00076   tge_ProfFptr = fopen (filename, "w");
00077   if (tge_ProfFptr == (FILE *) NULL) {
00078     fprintf (stderr, "Unable to open: %s\n", filename);
00079   }
00080 } /* tge_sim_profile_init */
00081
00082
00083 /* ============ tge_sim_profile_close () ========== */
00084 void tge_sim_profile_close (char *filename)
00085 {
00086   /* Close SDK profiler */
00087   profile_closeCycleProfiling ();
00088
00089   /* Close profiling data file */
00090   if (tge_ProfFptr != NULL) {
00091     fclose (tge_ProfFptr);
00092   }
00093 } /* tge_sim_profile_close */
00094
00095
00096 /* ============ tge_sim_profile_print () ========== */
00097 void tge_sim_profile_print (void)
00098 {
00099   /* Only report if file is valid */
00100   if (tge_ProfFptr != NULL) {
00101     fprintf (tge_ProfFptr, "%8d\n", (tint) tge_ProfCycleCount);
00102     fflush  (tge_ProfFptr);
00103   }
00104 } /* tge_sim_profile_print */
00105
00106 /* nothing past this point */


TGE Test: tgeprof.h File Reference

  • File List
  • Globals

tgeprof.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | tge_SIM_PROF_1TONE_FILE "../../vectors/profile/tone1_profile.txt"
#define | tge_SIM_PROF_2TONE_FILE "../../vectors/profile/tone2_profile.txt"
#define | tge_SIM_PROF_3TONE_FILE "../../vectors/profile/tone3_profile.txt"
#define | tge_SIM_PROF_4TONE_FILE "../../vectors/profile/tone4_profile.txt"
#define | tge_SIM_PROF_AMPR_FILE "../../vectors/profile/ampr_profile.txt"

Functions

void | tge_sim_profile_start (void)
void | tge_sim_profile_stop (void)
void | tge_sim_profile_print (void)
void | tge_sim_profile_init (char *filename)
void | tge_sim_profile_close (char *filename)

Variables

FILE * | tge_ProfFptr
tlong | tge_ProfOverhead
tlong | tge_ProfStartCount
tlong | tge_ProfStopCount

Define Documentation

#define tge_SIM_PROF_1TONE_FILE "../../vectors/profile/tone1_profile.txt"

Definition at line 35 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_2TONE_FILE "../../vectors/profile/tone2_profile.txt"

Definition at line 36 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_3TONE_FILE "../../vectors/profile/tone3_profile.txt"

Definition at line 37 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_4TONE_FILE "../../vectors/profile/tone4_profile.txt"

Definition at line 38 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_AMPR_FILE "../../vectors/profile/ampr_profile.txt"

Definition at line 39 of file tgeprof.h.

Referenced by main().

Function Documentation

void tge_sim_profile_start ( void )

Definition at line 32 of file tgeprof.c.

References simConfig_t::cache_enable, simCfg, tge_ProfCycleCount, and tge_ProfStartCount.

Referenced by tge_sim_process_frames(), and tge_sim_profile_init().

void tge_sim_profile_stop ( void )

Definition at line 45 of file tgeprof.c.

References tge_ProfCycleCount, tge_ProfOverhead, and tge_ProfStartCount.

Referenced by tge_sim_process_frames(), and tge_sim_profile_init().

void tge_sim_profile_print ( void )

Definition at line 97 of file tgeprof.c.

References tge_ProfCycleCount, and tge_ProfFptr.

Referenced by tge_sim_process_frames().

void tge_sim_profile_init ( char * filename )

Definition at line 61 of file tgeprof.c.

References simConfig_t::cache_enable, simCfg, tge_ProfCycleCount, tge_ProfFptr, tge_ProfOverhead, tge_sim_profile_start(), and tge_sim_profile_stop().

Referenced by main().

Here is the call graph for this function:

void tge_sim_profile_close ( char * filename )

Definition at line 84 of file tgeprof.c.

References tge_ProfFptr.

Referenced by main().

Variable Documentation

FILE* tge_ProfFptr

Definition at line 21 of file tgeprof.c.

Referenced by tge_sim_profile_close(), tge_sim_profile_init(), and tge_sim_profile_print().

tlong tge_ProfOverhead

Definition at line 22 of file tgeprof.c.

Referenced by tge_sim_profile_init(), and tge_sim_profile_stop().

tlong tge_ProfStartCount

Definition at line 23 of file tgeprof.c.

Referenced by tge_sim_profile_start(), and tge_sim_profile_stop().

tlong tge_ProfStopCount


TGE Test: tgeprof.h Source File

  • File List
  • Globals

tgeprof.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: TGE profiling commands.
00003  ******************************************************************************
00004  * FILE NAME:   tgeprof.h
00005  *
00006  * DESCRIPTION: Defines profiling routines used in the TGE simulation
00007  *
00008  * (C) Copyright 2011, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #ifndef _TGEPROF_H
00012 #define _TGEPROF_H
00013
00014
00015 /***********************************************************************
00016  * Externs
00017  ***********************************************************************/
00018 extern  FILE  *tge_ProfFptr;
00019 extern  tlong  tge_ProfOverhead;
00020 extern  tlong  tge_ProfStartCount;
00021 extern  tlong  tge_ProfStopCount;
00022
00023
00024 /***********************************************************************
00025  * Profiling file names
00026  ***********************************************************************/
00027 /* Handle CCS Project paths */
00028 #ifdef  __CCS_PROJECT_REL_PATH
00029 #define tge_SIM_PROF_1TONE_FILE   "../../../vectors/profile/tone1_profile.txt"
00030 #define tge_SIM_PROF_2TONE_FILE   "../../../vectors/profile/tone2_profile.txt"
00031 #define tge_SIM_PROF_3TONE_FILE   "../../../vectors/profile/tone3_profile.txt"
00032 #define tge_SIM_PROF_4TONE_FILE   "../../../vectors/profile/tone4_profile.txt"
00033 #define tge_SIM_PROF_AMPR_FILE    "../../../vectors/profile/ampr_profile.txt"
00034 #else
00035 #define tge_SIM_PROF_1TONE_FILE   "../../vectors/profile/tone1_profile.txt"
00036 #define tge_SIM_PROF_2TONE_FILE   "../../vectors/profile/tone2_profile.txt"
00037 #define tge_SIM_PROF_3TONE_FILE   "../../vectors/profile/tone3_profile.txt"
00038 #define tge_SIM_PROF_4TONE_FILE   "../../vectors/profile/tone4_profile.txt"
00039 #define tge_SIM_PROF_AMPR_FILE    "../../vectors/profile/ampr_profile.txt"
00040 #endif
00041
00042
00043 /***********************************************************************
00044  * Function prototypes
00045  ***********************************************************************/
00046 void tge_sim_profile_start (void);
00047 void tge_sim_profile_stop  (void);
00048 void tge_sim_profile_print (void);
00049 void tge_sim_profile_init  (char *filename);
00050 void tge_sim_profile_close (char *filename);
00051
00052
00053 #endif /* _TGEPROF_H */
00054
00055 /* nothing past this point */


TGE Test: tgesim.c File Reference

  • File List
  • Globals

tgesim.c File Reference

#include <ti/mas/tge/tge.h>
#include <ti/mas/tge/Version.h>
#include <ti/mas/tge/test/src/tgesim.h>
#include <ti/mas/tge/test/src/tduapi.h>
#include <ti/mas/tge/test/src/tgeprof.h>
#include <ti/mas/vpe/pcm.h>

Include dependency graph for tgesim.c:

Go to the source code of this file.

Functions

void | tge_sim_halt (void)
void | main ()
void | tge_sim_test_tones (tint nfrq, tint f1, tint f2, tint f3, tint f4, float p1, float p2, float p3, float p4, tint duration, tint silence, tint tdu_code, char *fname)
void | tge_sim_test_ampr (tint freq, float power, tint mfreq, tint mpct, tint period, tint duration, tint silence, tint tge_code, tint tdu_code, char *fname)
void | tge_sim_test (tint gen_frames, tint sil_frames, char *fname)
void | tge_sim_process_frames (tint num_frames)
void | tge_sim_compand (tint pcm_format, linSample *buf, tint length)
void | tge_sim_create_inst (void)
void | tge_sim_initialize (void)
void | tgeSim_check_rc (tgeSimErr_e id, tuint rc, tuint pass_code)

Variables

linSample | sampleBuffer [tge_SIM_MAX_FRAME]
tword | compandBuffer [tge_SIM_MAX_FRAME]
tgeSimErr_e tgeSimErrorId
tint | frameMult
FILE * | tgeSimFptr
char | tge_sim_fstring [128]
void * | tgeSimInst
simConfig_t simConfig
simConfig_t * simCfg = &simConfig
unsigned char | tgeHeap [tge_SIM_HEAP_SIZE]

Function Documentation

void tge_sim_halt ( void )

Definition at line 62 of file tgesim.c.

Referenced by tgeSim_check_rc().

void main ( )

Definition at line 80 of file tgesim.c.

References simConfig_t::profile_enable, simCfg, tge_sim_banner_print(), tge_sim_create_inst(), tge_SIM_DTMF_HI_1, tge_SIM_DTMF_HI_2, tge_SIM_DTMF_HI_3, tge_SIM_DTMF_HI_4, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_LO_4, tge_sim_initialize(), tge_sim_new_tdu(), tge_sim_open_tdu(), tge_SIM_PROF_1TONE_FILE, tge_SIM_PROF_2TONE_FILE, tge_SIM_PROF_3TONE_FILE, tge_SIM_PROF_4TONE_FILE, tge_SIM_PROF_AMPR_FILE, tge_sim_profile_close(), tge_sim_profile_init(), tge_sim_test_ampr(), and tge_sim_test_tones().

Here is the call graph for this function:

void tge_sim_test_tones | ( | tint | nfrq,
 |  | tint | f1,
 |  | tint | f2,
 |  | tint | f3,
 |  | tint | f4,
 |  | float | p1,
 |  | float | p2,
 |  | float | p3,
 |  | float | p4,
 |  | tint | duration,
 |  | tint | silence,
 |  | tint | tdu_code,
 |  | char * | fname
 | ) |  |

Definition at line 218 of file tgesim.c.

References tge_sim_config_tdu(), tge_sim_convert_ms_to_frames(), tge_sim_convert_pwr_to_amp(), tge_SIM_ERR_TGEINIT, tge_sim_test(), tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tge_sim_test_ampr | ( | tint | freq,
 |  | float | power,
 |  | tint | mfreq,
 |  | tint | mpct,
 |  | tint | period,
 |  | tint | duration,
 |  | tint | silence,
 |  | tint | tge_code,
 |  | tint | tdu_code,
 |  | char * | fname
 | ) |  |

Definition at line 276 of file tgesim.c.

References tge_sim_config_tdu(), tge_sim_convert_ms_to_frames(), tge_sim_convert_pct_to_q14(), tge_sim_convert_pwr_to_amp(), tge_SIM_ERR_TGEINIT, tge_sim_test(), tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tge_sim_test | ( | tint | gen_frames,
 |  | tint | sil_frames,
 |  | char * | fname
 | ) |  |

Definition at line 351 of file tgesim.c.

References tge_SIM_ERR_OUTFILE, tge_SIM_ERR_TGECTRL, tge_SIM_FILE_OUTDIR, tge_sim_fstring, tge_sim_process_frames(), tgeSim_check_rc(), tgeSimFptr, and tgeSimInst.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

Here is the call graph for this function:

void tge_sim_process_frames ( tint num_frames )

Definition at line 393 of file tgesim.c.

References simConfig_t::companding, simConfig_t::frame_length, frameMult, sampleBuffer, simCfg, tduapi_FRAME_SIZE, tduSimInst, tge_sim_compand(), tge_SIM_ERR_TDUSENDIN, tge_SIM_ERR_TGEPROC, tge_sim_profile_print(), tge_sim_profile_start(), tge_sim_profile_stop(), tgeSim_check_rc(), and tgeSimInst.

Referenced by tge_sim_test().

Here is the call graph for this function:

void tge_sim_compand | ( | tint | pcm_format,
 |  | linSample * | buf,
 |  | tint | length
 | ) |  |

Definition at line 425 of file tgesim.c.

References compandBuffer, tge_SIM_PCM_ALAW, tge_SIM_PCM_LIN, tge_SIM_PCM_ULAW, and tgeSimFptr.

Referenced by tge_sim_process_frames().

void tge_sim_create_inst ( void )

Definition at line 457 of file tgesim.c.

References tge_SIM_ERR_HEAPSZ, tge_SIM_ERR_TGECTRL, tge_SIM_ERR_TGEGETSZ, tge_SIM_HEAP_SIZE, tgeHeap, tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tge_sim_initialize ( void )

Definition at line 494 of file tgesim.c.

References simConfig_t::frame_length, frameMult, simCfg, tduapi_FRAME_SIZE, tduSimInst, tge_SIM_ERR_BADMULT, tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tgeSim_check_rc | ( | tgeSimErr_e | id,
 |  | tuint | rc,
 |  | tuint | pass_code
 | ) |  |

Definition at line 519 of file tgesim.c.

References tge_sim_halt(), and tgeSimErrorId.

Referenced by tge_sim_create_inst(), tge_sim_initialize(), tge_sim_new_tdu(), tge_sim_process_frames(), tge_sim_test(), tge_sim_test_ampr(), and tge_sim_test_tones().

Here is the call graph for this function:

Variable Documentation

linSample sampleBuffer[tge_SIM_MAX_FRAME]

Definition at line 25 of file tgesim.c.

Referenced by tge_sim_process_frames().

tword compandBuffer[tge_SIM_MAX_FRAME]

Definition at line 26 of file tgesim.c.

Referenced by tge_sim_compand().

tgeSimErr_e tgeSimErrorId

Definition at line 29 of file tgesim.c.

Referenced by tgeSim_check_rc().

tint frameMult

Definition at line 32 of file tgesim.c.

Referenced by tge_sim_initialize(), and tge_sim_process_frames().

FILE* tgeSimFptr

Definition at line 35 of file tgesim.c.

Referenced by tge_sim_compand(), and tge_sim_test().

char tge_sim_fstring[128]

Definition at line 38 of file tgesim.c.

Referenced by tge_sim_test().

void* tgeSimInst

Definition at line 41 of file tgesim.c.

Referenced by tge_sim_create_inst(), tge_sim_initialize(), tge_sim_process_frames(), tge_sim_test(), tge_sim_test_ampr(), and tge_sim_test_tones().

simConfig_t simConfig

Initial value:

 {
  FALSE,
  TRUE,
  tge_SIM_PCM_ULAW,
  40,
}

Definition at line 44 of file tgesim.c.

simConfig_t* simCfg = &simConfig

Definition at line 50 of file tgesim.c.

Referenced by main(), tge_sim_convert_ms_to_frames(), tge_sim_initialize(), tge_sim_process_frames(), tge_sim_profile_init(), and tge_sim_profile_start().

unsigned char tgeHeap[tge_SIM_HEAP_SIZE]

Definition at line 54 of file tgesim.c.

Referenced by tge_sim_create_inst().


TGE Test: tgesim.c Source File

  • File List
  • Globals

tgesim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: TGE Unit Test.
00003  ******************************************************************************
00004  * FILE NAME:   tgesim.c
00005  *
00006  * DESCRIPTION: Contains TGE Unit Test Code
00007  *
00008  * (C) Copyright 2011 Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 /* TGE component and simulation headers */
00012 #include <ti/mas/tge/tge.h>
00013 #include <ti/mas/tge/Version.h>
00014
00015 /* Simulation headers */
00016 #include <ti/mas/tge/test/src/tgesim.h>
00017 #include <ti/mas/tge/test/src/tduapi.h>
00018 #include <ti/mas/tge/test/src/tgeprof.h>
00019
00020 /* VPE headers */
00021 #include <ti/mas/vpe/pcm.h>
00022
00023
00024 /* Primary IO buffers for simulation */
00025 linSample sampleBuffer[tge_SIM_MAX_FRAME];
00026 tword     compandBuffer[tge_SIM_MAX_FRAME];
00027
00028 /* Global eror code */
00029 tgeSimErr_e tgeSimErrorId;
00030
00031 /* Frame multiple TGE/TDU */
00032 tint frameMult;
00033
00034 /* TGE output file pointer */
00035 FILE *tgeSimFptr;
00036
00037 /* TGE file name concatenation string */
00038 char tge_sim_fstring[128];
00039
00040 /* TGE instance pointer */
00041 void *tgeSimInst;
00042
00043 /* Simulation configuration structure & pointer */
00044 simConfig_t simConfig = {
00045   FALSE,                      /* Don't profile by default */
00046   TRUE,                       /* Enable cache by default */
00047   tge_SIM_PCM_ULAW,           /* Default companding (Ulaw) */
00048   40,                         /* Default frame length (40 samples) */
00049 };
00050 simConfig_t *simCfg = &simConfig;
00051
00052 /* TGE instance heap */
00053 #pragma DATA_ALIGN (tgeHeap, 8);
00054 unsigned char tgeHeap[tge_SIM_HEAP_SIZE];
00055
00056
00057 /*-----------------------------------------------------------------
00058  * Function:  tge_sim_halt
00059  *
00060  * Description: Utility to provide simulation breakpoint.
00061  *-----------------------------------------------------------------*/
00062 void tge_sim_halt (void)
00063 {
00064   /* Wait patiently */
00065   while (1) {
00066     asm ("  NOP");
00067     asm ("  NOP");
00068     asm ("Set_BP_Here:  ");
00069     asm ("  NOP");
00070     asm ("  NOP");
00071   }
00072 }
00073
00074
00075 /*-----------------------------------------------------------------
00076  * Filename:  main
00077  *
00078  * Description: Test TGE tone generation
00079  *-----------------------------------------------------------------*/
00080 void main ()
00081 {
00082   /* Simulation initialization */
00083   tge_sim_initialize ();
00084
00085   /* Progress */
00086   tge_sim_banner_print ("Simulation:  BEGIN\n");
00087
00088   /* TDU instance creation */
00089   tge_sim_new_tdu  ();
00090
00091   /* TDU instance open/config */
00092   tge_sim_open_tdu (tdu_CTL_MF_DTMF);
00093
00094   /* TGE instance creation/init */
00095   tge_sim_create_inst ();
00096
00097   /*************************************************************************/
00098   /* Profiling                                                             */
00099   /*************************************************************************/
00100   if (simCfg->profile_enable) {
00101     tge_sim_banner_print ("Profiling:  BEGIN\n");
00102
00103     /* One frequency tone */
00104     tge_sim_profile_init  (tge_SIM_PROF_1TONE_FILE);
00105     tge_sim_test_tones    (1, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00106                            tdu_CTL_NONE, "tone1_profile.pcm");
00107     tge_sim_profile_close (tge_SIM_PROF_1TONE_FILE);
00108
00109     /* Two frequency tone */
00110     tge_sim_profile_init  (tge_SIM_PROF_2TONE_FILE);
00111     tge_sim_test_tones    (2, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00112                            tdu_CTL_NONE, "tone2_profile.pcm");
00113     tge_sim_profile_close (tge_SIM_PROF_2TONE_FILE);
00114
00115     /* Three frequency tone */
00116     tge_sim_profile_init  (tge_SIM_PROF_3TONE_FILE);
00117     tge_sim_test_tones    (3, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00118                            tdu_CTL_NONE, "tone3_profile.pcm");
00119     tge_sim_profile_close (tge_SIM_PROF_3TONE_FILE);
00120
00121     /* Four frequency tone */
00122     tge_sim_profile_init  (tge_SIM_PROF_4TONE_FILE);
00123     tge_sim_test_tones    (4, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00124                            tdu_CTL_NONE, "tone4_profile.pcm");
00125     tge_sim_profile_close (tge_SIM_PROF_4TONE_FILE);
00126
00127     /* Amplitude modulation and PR */
00128     tge_sim_profile_init  (tge_SIM_PROF_AMPR_FILE);
00129     tge_sim_test_ampr     (2100, -13, 15, 20, 450, 1000, 0, tge_CONFIG_AMP_MOD_PR,
00130                            tdu_CTL_NONE, "ampr_profile.pcm");
00131     tge_sim_profile_close (tge_SIM_PROF_AMPR_FILE);
00132
00133     tge_sim_banner_print ("Profiling:  END\n");
00134   }
00135
00136
00137   /*************************************************************************/
00138   /* Functional testing                                                    */
00139   /*************************************************************************/
00140   else {
00141     /***********************************************************************/
00142     /* TGE TONE Tests                                                      */
00143     /***********************************************************************/
00144     printf ("\n\n");
00145     tge_sim_banner_print ("TGE Tone Testing\n");
00146     tge_sim_test_tones (1, 1100, 0,0,0, -13, 0,0,0, 2000, 250, tdu_CTL_CNG_ON,
00147                         "cng.pcm");
00148     tge_sim_test_tones (1, 2100, 0,0,0, -13, 0,0,0, 2000, 250, tdu_CTL_V25_ON,
00149                         "ced.pcm");
00150     tge_sim_test_tones (1, 2000, 0,0,0, -15, 0,0,0, 1000, 250, tdu_CTL_SS7COT_ON,
00151                         "ss7cot.pcm");
00152     tge_sim_test_tones (1, 2600, 0,0,0, -20, 0,0,0,  400, 250, tdu_CTL_SF_ON,
00153                         "sf.pcm");
00154
00155     /***********************************************************************/
00156     /* TGE DTMF Tests                                                      */
00157     /***********************************************************************/
00158     printf ("\n\n");
00159     tge_sim_banner_print ("TGE DTMF Testing\n");
00160     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00161                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_1.pcm");
00162     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00163                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_2.pcm");
00164     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00165                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_3.pcm");
00166     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00167                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_A.pcm");
00168     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00169                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_4.pcm");
00170     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00171                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_5.pcm");
00172     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00173                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_6.pcm");
00174     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00175                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_B.pcm");
00176     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00177                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_7.pcm");
00178     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00179                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_8.pcm");
00180     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00181                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_9.pcm");
00182     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00183                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_C.pcm");
00184     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00185                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_AST.pcm");
00186     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00187                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_0.pcm");
00188     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00189                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_HASH.pcm");
00190     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00191                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_D.pcm");
00192
00193
00194     /***********************************************************************/
00195     /* TGE Amplitude Modulation & Phase Reversal Tests                     */
00196     /***********************************************************************/
00197     printf ("\n\n");
00198     tge_sim_banner_print ("TGE AM/PR Testing\n");
00199     tge_sim_test_ampr (2100, -13,  0,  0, 450, 2400, 250, tge_CONFIG_PHASE_REV,
00200                        tdu_CTL_V25_ON, "ced_pr.pcm");
00201     tge_sim_test_ampr (2100, -13, 15, 20,   0, 2400, 250, tge_CONFIG_AMP_MOD,
00202                        tdu_CTL_V25_ON, "ansam.pcm");
00203     tge_sim_test_ampr (2100, -13, 15, 20, 450, 2400, 250, tge_CONFIG_AMP_MOD_PR,
00204                        tdu_CTL_V25_ON, "ansam_pr.pcm");
00205   }
00206
00207   /* Progress */
00208   printf ("\n\n");
00209   tge_sim_banner_print ("Simulation:  END\n");
00210 }
00211
00212
00213 /*-----------------------------------------------------------------
00214  * Function:  tge_sim_test_tones
00215  *
00216  * Description: TGE test of 1-4 frequency tone generation
00217  *-----------------------------------------------------------------*/
00218 void tge_sim_test_tones (tint nfrq, tint f1, tint f2, tint f3, tint f4,
00219                          float p1, float p2, float p3, float p4, tint duration,
00220                          tint silence, tint tdu_code, char *fname)
00221 {
00222   tgeConfig_t cfg;
00223   tint gen_frames;
00224   tint sil_frames;
00225   tint ret_code;
00226
00227   /* TGE Configuration for multi-tone generation */
00228   cfg.sample_rate    = tge_SAMPLE_RATE_8K;
00229   cfg.reset_phase    = TRUE;
00230   cfg.config_code    = tge_CONFIG_FREQS;
00231   cfg.u.frq.num_freq = nfrq;
00232   cfg.u.frq.freq[0]  = f1;
00233   cfg.u.frq.freq[1]  = f2;
00234   cfg.u.frq.freq[2]  = f3;
00235   cfg.u.frq.freq[3]  = f4;
00236   cfg.u.frq.amp[0]   = tge_sim_convert_pwr_to_amp (p1);
00237   cfg.u.frq.amp[1]   = tge_sim_convert_pwr_to_amp (p2);
00238   cfg.u.frq.amp[2]   = tge_sim_convert_pwr_to_amp (p3);
00239   cfg.u.frq.amp[3]   = tge_sim_convert_pwr_to_amp (p4);
00240
00241   /* TGE Init with FREQ configuration */
00242   ret_code = tgeInit (tgeSimInst, &cfg);
00243   tgeSim_check_rc (tge_SIM_ERR_TGEINIT, ret_code, tge_NOERR);
00244
00245   /* Enable required TDU detection */
00246   tge_sim_config_tdu (tdu_code);
00247
00248   /* Determine number of frames to generate OFF/ON/OFF */
00249   gen_frames = tge_sim_convert_ms_to_frames (duration);
00250   sil_frames = tge_sim_convert_ms_to_frames (silence);
00251
00252   /* Provide information regarding the test */
00253   printf ("\nTONE:   %4d Hz   %2.1f dBm0\n", f1, p1);
00254   if (nfrq > 1) {
00255     printf ("        %4d Hz   %2.1f dBm0\n", f2, p2);
00256   }
00257   if (nfrq > 2) {
00258     printf ("        %4d Hz   %2.1f dBm0\n", f3, p3);
00259   }
00260   if (nfrq > 3) {
00261     printf ("        %4d Hz   %2.1f dBm0\n", f4, p4);
00262   }
00263   printf ("---------------------------------------------------------------------\n");
00264
00265   /* Execute test */
00266   tge_sim_test (gen_frames, sil_frames, fname);
00267 }
00268
00269
00270 /*-----------------------------------------------------------------
00271  * Function:  tge_sim_test_ampr
00272  *
00273  * Description: TGE test of amplitude modulation and phase
00274  *              reversal generation
00275  *-----------------------------------------------------------------*/
00276 void tge_sim_test_ampr (tint freq, float power, tint mfreq, tint mpct,
00277                         tint period, tint duration, tint silence,
00278                         tint tge_code, tint tdu_code, char *fname)
00279 {
00280   tgeConfig_t cfg;
00281   tint gen_frames;
00282   tint sil_frames;
00283   tint ret_code;
00284
00285   /* Configuration always provided */
00286   cfg.sample_rate = tge_SAMPLE_RATE_8K;
00287   cfg.reset_phase = TRUE;
00288   cfg.config_code = tge_code;
00289   cfg.u.ampr.freq = freq;
00290   cfg.u.ampr.amp  = tge_sim_convert_pwr_to_amp (power);
00291
00292   /* Provide information regarding the test */
00293   printf ("\nTONE:   %4d Hz   %2.1f dBm0\n", freq, power);
00294
00295   /* Configuration base input */
00296   switch (tge_code) {
00297     /* Phase reversals only */
00298     case tge_CONFIG_PHASE_REV:
00299       cfg.u.ampr.period_ms = period;
00300       printf ("  PR:   %4d ms period\n", period);
00301       break;
00302
00303     /* Phase reversals only */
00304     case tge_CONFIG_AMP_MOD:
00305       cfg.u.ampr.modulate_freq = mfreq;
00306       cfg.u.ampr.modulate_pct  = tge_sim_convert_pct_to_q14 (mpct);
00307       printf (" MOD:   %4d Hz   %3d Percent\n", mfreq, mpct);
00308       break;
00309
00310     /* Phase reversals only */
00311     case tge_CONFIG_AMP_MOD_PR:
00312       cfg.u.ampr.period_ms     = period;
00313       cfg.u.ampr.modulate_freq = mfreq;
00314       cfg.u.ampr.modulate_pct  = tge_sim_convert_pct_to_q14 (mpct);
00315       printf (" MOD:   %4d Hz   %3d Percent\n", mfreq, mpct);
00316       printf ("  PR:   %4d ms\n", period);
00317       break;
00318
00319     default:
00320       break;
00321   }
00322   printf ("---------------------------------------------------------------------\n");
00323
00324   /* TGE Init with phase reversal configuration */
00325   ret_code = tgeInit (tgeSimInst, &cfg);
00326   tgeSim_check_rc (tge_SIM_ERR_TGEINIT, ret_code, tge_NOERR);
00327
00328   /* Enable required TDU detection */
00329   tge_sim_config_tdu (tdu_code);
00330
00331   /* Determine number of frames to generate OFF/ON/OFF */
00332   gen_frames = tge_sim_convert_ms_to_frames (duration);
00333   sil_frames = tge_sim_convert_ms_to_frames (silence);
00334
00335   /* Execute test */
00336   tge_sim_test (gen_frames, sil_frames, fname);
00337 }
00338
00339
00340 /*-----------------------------------------------------------------
00341  * Function:  tge_sim_test
00342  *
00343  * Description: TGE basic test routine.  Generates
00344  *              silence-tone-silence sequence as follows:
00345  *
00346  *              silence:    "sil_frames" frames
00347  *                 tone:    "gen_frames"  frames
00348  *              silence:    "sil_frames" frames
00349  *
00350  *-----------------------------------------------------------------*/
00351 void tge_sim_test (tint gen_frames, tint sil_frames, char *fname)
00352 {
00353   tgeControl_t ctl;
00354   tint ret_code;
00355
00356   /* Open and prepare output file */
00357   strcpy (tge_sim_fstring, tge_SIM_FILE_OUTDIR);
00358   strcat (tge_sim_fstring, fname);
00359   tgeSimFptr = fopen (tge_sim_fstring, "w");
00360   tgeSim_check_rc (tge_SIM_ERR_OUTFILE, (tgeSimFptr == NULL), FALSE);
00361
00362   /* Pre-silence frames */
00363   ctl.control_code = tge_CTRL_TONE_OFF;
00364   ret_code = tgeControl (tgeSimInst, &ctl);
00365   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00366   tge_sim_process_frames (sil_frames);
00367
00368   /* Tone generation frames */
00369   ctl.control_code = tge_CTRL_TONE_ON;
00370   ret_code = tgeControl (tgeSimInst, &ctl);
00371   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00372   tge_sim_process_frames (gen_frames);
00373
00374   /* Post-silence frames */
00375   ctl.control_code = tge_CTRL_TONE_OFF;
00376   ret_code = tgeControl (tgeSimInst, &ctl);
00377   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00378   tge_sim_process_frames (sil_frames);
00379
00380   /* Close output file */
00381   fclose (tgeSimFptr);
00382 }
00383
00384
00385 /*-----------------------------------------------------------------
00386  * Function:  tge_sim_process_frames
00387  *
00388  * Description: Lowest level TGE test routine.  Generates
00389  *              a "num" TGE tone frames, compands (when configured)
00390  *              and passes the frames to the TDU for detection.
00391  *
00392  *-----------------------------------------------------------------*/
00393 void tge_sim_process_frames (tint num_frames)
00394 {
00395   tint ret_code;
00396   tint offset;
00397   tint mult;
00398   tint i;
00399
00400   for (i=0; i<num_frames; i++) {
00401     /* Generate a TGE tone frame of samples */
00402     tge_sim_profile_start ();
00403     ret_code = tgeProcess (tgeSimInst, sampleBuffer, simCfg->frame_length);
00404     tge_sim_profile_stop ();
00405     tge_sim_profile_print ();
00406     tgeSim_check_rc (tge_SIM_ERR_TGEPROC, ret_code, tge_NOERR);
00407
00408     /* Compand the samples as specified */
00409     tge_sim_compand (simCfg->companding, sampleBuffer, simCfg->frame_length);
00410
00411     /* Pass the (companded) frame(s) of samples to the TDU */
00412     for (mult=0, offset=0; mult<frameMult; mult++, offset+=tduapi_FRAME_SIZE) {
00413       ret_code = tduSendIn (tduSimInst, &sampleBuffer[offset], tdu_TX_ONLY);
00414       tgeSim_check_rc (tge_SIM_ERR_TDUSENDIN, ret_code, TRUE);
00415     }
00416   }
00417 }
00418
00419
00420 /*-----------------------------------------------------------------
00421  * Function:  tge_sim_compand
00422  *
00423  * Description: Perform PCM companding in-place on frame of samples
00424  *-----------------------------------------------------------------*/
00425 void tge_sim_compand (tint pcm_format, linSample *buf, tint length)
00426 {
00427   /* Compress based on PCM format and output to file */
00428   switch (pcm_format) {
00429
00430     /* U-law 8-bit PCM  encode/decode */
00431     case tge_SIM_PCM_ULAW:
00432       pcmUlawEncoder (buf, compandBuffer, length);
00433       fwrite ((void *) compandBuffer, 1, length, tgeSimFptr);
00434       pcmUlawDecoder (compandBuffer, buf, length);
00435       break;
00436
00437     /* A-law 8-bit PCM  encode/decode */
00438     case tge_SIM_PCM_ALAW:
00439       pcmAlawEncoder (buf, compandBuffer, length);
00440       fwrite ((void *) compandBuffer, 1, length, tgeSimFptr);
00441       pcmAlawDecoder (compandBuffer, buf, length);
00442       break;
00443
00444     /* Linear 16-bit PCM */
00445     case tge_SIM_PCM_LIN:
00446     default:
00447       break;
00448   }
00449 }
00450
00451
00452 /*-----------------------------------------------------------------
00453  * Function:  tge_sim_create_inst
00454  *
00455  * Description: TGE Channel instantiation.
00456  *-----------------------------------------------------------------*/
00457 void tge_sim_create_inst (void)
00458 {
00459   tgeControl_t ctl;
00460   tint instsize;
00461   tint ret_code;
00462
00463   /* Get TGE instance size */
00464   ret_code = tgeGetSizes (&instsize);
00465   tgeSim_check_rc (tge_SIM_ERR_TGEGETSZ, ret_code, tge_NOERR);
00466
00467   /* "Allocate" TGE instance */
00468   tgeSim_check_rc (tge_SIM_ERR_HEAPSZ, (instsize > tge_SIM_HEAP_SIZE), FALSE);
00469   tgeSimInst = (void *) &tgeHeap[0];
00470
00471   /* Disable TGE instance */
00472   ctl.control_code = tge_CTRL_TONE_OFF;
00473   ret_code = tgeControl (tgeSimInst, &ctl);
00474   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00475
00476   /* Display TGE version information */
00477   printf ("\n-----------------------------------\n");
00478   printf ("TGE Version:  ");
00479   printf ("%d.", ti_mas_tge_Version_MAJOR);
00480   printf ("%d.", ti_mas_tge_Version_MINOR);
00481   printf ("%d.", ti_mas_tge_Version_XVERTICAL);
00482   printf ("%d ", ti_mas_tge_Version_PATCH);
00483   printf ("\n-----------------------------------\n");
00484   printf ("Instance Size:  %d bytes", instsize);
00485   printf ("\n-----------------------------------\n\n");
00486 }
00487
00488
00489 /*-----------------------------------------------------------------
00490  * Function:  tge_sim_initialize
00491  *
00492  * Description: TGE simulation default initialization.
00493  *-----------------------------------------------------------------*/
00494 void tge_sim_initialize (void)
00495 {
00496   tint frame_size;
00497
00498   /* Initialize TGE instance pointer */
00499   tgeSimInst = (void *) NULL;
00500   tduSimInst = (void *) NULL;
00501
00502   /* Check that the TGE and TDU frame sizes are compatible */
00503   frame_size = simCfg->frame_length;
00504   frameMult  = 0;
00505   do {
00506     frame_size -= tduapi_FRAME_SIZE;
00507     frameMult++;
00508   } while (frame_size > 0);
00509
00510   tgeSim_check_rc (tge_SIM_ERR_BADMULT, (frame_size == 0), TRUE);
00511 }
00512
00513
00514 /*-----------------------------------------------------------------
00515  * Function:  tgeSim_check_rc
00516  *
00517  * Description: Check return code for failure.
00518  *-----------------------------------------------------------------*/
00519 void tgeSim_check_rc (tgeSimErr_e id, tuint rc, tuint pass_code)
00520 {
00521   /* Wait forever */
00522   if (rc != pass_code) {
00523     /* Set ID for quick identifcation */
00524     tgeSimErrorId = id;
00525     printf ("\nERROR Bad Return Code: 0x%04x\n\n", (tlong) id);
00526     tge_sim_halt ();
00527   }
00528 }
00529
00530 /* Nothing past this point */
00531


TGE Test: tgesim.h File Reference

  • File List
  • Globals

tgesim.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <ti/mas/types/types.h>
#include <ti/mas/types/const.h>

Include dependency graph for tgesim.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | simConfig_t

Defines

#define | tge_SIM_MAX_FRAME 80
#define | tge_SIM_MAX_STRING 256
#define | tge_SIM_MAX_FREQ 4
#define | tge_SIM_HEAP_SIZE 512
#define | tge_SIM_SAMPLE_PER_MS 8
#define | tge_SIM_DTMF_LO_1 697
#define | tge_SIM_DTMF_LO_2 770
#define | tge_SIM_DTMF_LO_3 852
#define | tge_SIM_DTMF_LO_4 941
#define | tge_SIM_DTMF_HI_1 1209
#define | tge_SIM_DTMF_HI_2 1336
#define | tge_SIM_DTMF_HI_3 1477
#define | tge_SIM_DTMF_HI_4 1633
#define | tge_SIM_FILE_OUTDIR "../../vectors/out/"

Enumerations

enum tgeSimErr_e {
tge_SIM_ERR_NONE = 0x0000, tge_SIM_ERR_INITPROF, tge_SIM_ERR_SIMCFG, tge_SIM_ERR_HEAPSZ,
tge_SIM_ERR_BADMULT, tge_SIM_ERR_OUTFILE, tge_SIM_ERR_TGEGETSZ = 0x1000, tge_SIM_ERR_TGEINIT,
tge_SIM_ERR_TGECTRL, tge_SIM_ERR_TGEPROC, tge_SIM_ERR_TDUGETSZ = 0x2000, tge_SIM_ERR_TDUALLOC,
tge_SIM_ERR_TDUNEW, tge_SIM_ERR_TDUSENDIN
}
enum | tgePcm_e { tge_SIM_PCM_ALAW = const_COMP_ALAW_8, tge_SIM_PCM_ULAW = const_COMP_MULAW_8, tge_SIM_PCM_LIN = const_COMP_LINEAR }

Functions

void | tge_sim_initialize (void)
void | tge_sim_disp_version (void)
void | tge_sim_create_inst (void)
void | tge_sim_process_frames (tint num_frames)
void | tge_sim_compand (tint pcm_format, linSample *buf, tint length)
void | tge_sim_test (tint frames_on, tint frames_off, char *fname)
void | tge_sim_test_tones (tint nfrq, tint f1, tint f2, tint f3, tint f4, float p1, float p2, float p3, float p4, tint duration, tint silence, tint tdu_code, char *fname)
void | tge_sim_test_ampr (tint freq, float power, tint mfreq, tint mpct, tint period, tint duration, tint silence, tint tge_code, tint tdu_code, char *fname)
void | tgeSim_check_rc (tgeSimErr_e id, tuint rc, tuint pass_code)
static void | tge_sim_banner_print (char *str)
static linSample | tge_sim_convert_pwr_to_amp (float power)
static Fract | tge_sim_convert_pct_to_q14 (tint percent)
static tint | tge_sim_convert_ms_to_frames (tint ms)

Variables

simConfig_t * simCfg

Define Documentation

#define tge_SIM_MAX_FRAME 80

Definition at line 26 of file tgesim.h.

#define tge_SIM_MAX_STRING 256

Definition at line 27 of file tgesim.h.

#define tge_SIM_MAX_FREQ 4

Definition at line 28 of file tgesim.h.

#define tge_SIM_HEAP_SIZE 512

Definition at line 29 of file tgesim.h.

Referenced by tge_sim_create_inst().

#define tge_SIM_SAMPLE_PER_MS 8

Definition at line 30 of file tgesim.h.

Referenced by tge_sim_convert_ms_to_frames().

#define tge_SIM_DTMF_LO_1 697

Definition at line 34 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_LO_2 770

Definition at line 35 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_LO_3 852

Definition at line 36 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_LO_4 941

Definition at line 37 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_1 1209

Definition at line 38 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_2 1336

Definition at line 39 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_3 1477

Definition at line 40 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_4 1633

Definition at line 41 of file tgesim.h.

Referenced by main().

#define tge_SIM_FILE_OUTDIR "../../vectors/out/"

Definition at line 85 of file tgesim.h.

Referenced by tge_sim_test().

Enumeration Type Documentation

enum tgeSimErr_e

Enumerator:
tge_SIM_ERR_NONE
tge_SIM_ERR_INITPROF
tge_SIM_ERR_SIMCFG
tge_SIM_ERR_HEAPSZ
tge_SIM_ERR_BADMULT
tge_SIM_ERR_OUTFILE
tge_SIM_ERR_TGEGETSZ
tge_SIM_ERR_TGEINIT
tge_SIM_ERR_TGECTRL
tge_SIM_ERR_TGEPROC
tge_SIM_ERR_TDUGETSZ
tge_SIM_ERR_TDUALLOC
tge_SIM_ERR_TDUNEW
tge_SIM_ERR_TDUSENDIN

Definition at line 45 of file tgesim.h.

enum tgePcm_e

Enumerator:
tge_SIM_PCM_ALAW
tge_SIM_PCM_ULAW
tge_SIM_PCM_LIN

Definition at line 64 of file tgesim.h.

Function Documentation

void tge_sim_initialize ( void )

Definition at line 494 of file tgesim.c.

References simConfig_t::frame_length, frameMult, simCfg, tduapi_FRAME_SIZE, tduSimInst, tge_SIM_ERR_BADMULT, tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tge_sim_disp_version ( void )

void tge_sim_create_inst ( void )

Definition at line 457 of file tgesim.c.

References tge_SIM_ERR_HEAPSZ, tge_SIM_ERR_TGECTRL, tge_SIM_ERR_TGEGETSZ, tge_SIM_HEAP_SIZE, tgeHeap, tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tge_sim_process_frames ( tint num_frames )

Definition at line 393 of file tgesim.c.

References simConfig_t::companding, simConfig_t::frame_length, frameMult, sampleBuffer, simCfg, tduapi_FRAME_SIZE, tduSimInst, tge_sim_compand(), tge_SIM_ERR_TDUSENDIN, tge_SIM_ERR_TGEPROC, tge_sim_profile_print(), tge_sim_profile_start(), tge_sim_profile_stop(), tgeSim_check_rc(), and tgeSimInst.

Referenced by tge_sim_test().

Here is the call graph for this function:

void tge_sim_compand | ( | tint | pcm_format,
 |  | linSample * | buf,
 |  | tint | length
 | ) |  |

Definition at line 425 of file tgesim.c.

References compandBuffer, tge_SIM_PCM_ALAW, tge_SIM_PCM_LIN, tge_SIM_PCM_ULAW, and tgeSimFptr.

Referenced by tge_sim_process_frames().

void tge_sim_test | ( | tint | frames_on,
 |  | tint | frames_off,
 |  | char * | fname
 | ) |  |

Definition at line 351 of file tgesim.c.

References tge_SIM_ERR_OUTFILE, tge_SIM_ERR_TGECTRL, tge_SIM_FILE_OUTDIR, tge_sim_fstring, tge_sim_process_frames(), tgeSim_check_rc(), tgeSimFptr, and tgeSimInst.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

Here is the call graph for this function:

void tge_sim_test_tones | ( | tint | nfrq,
 |  | tint | f1,
 |  | tint | f2,
 |  | tint | f3,
 |  | tint | f4,
 |  | float | p1,
 |  | float | p2,
 |  | float | p3,
 |  | float | p4,
 |  | tint | duration,
 |  | tint | silence,
 |  | tint | tdu_code,
 |  | char * | fname
 | ) |  |

Definition at line 218 of file tgesim.c.

References tge_sim_config_tdu(), tge_sim_convert_ms_to_frames(), tge_sim_convert_pwr_to_amp(), tge_SIM_ERR_TGEINIT, tge_sim_test(), tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tge_sim_test_ampr | ( | tint | freq,
 |  | float | power,
 |  | tint | mfreq,
 |  | tint | mpct,
 |  | tint | period,
 |  | tint | duration,
 |  | tint | silence,
 |  | tint | tge_code,
 |  | tint | tdu_code,
 |  | char * | fname
 | ) |  |

Definition at line 276 of file tgesim.c.

References tge_sim_config_tdu(), tge_sim_convert_ms_to_frames(), tge_sim_convert_pct_to_q14(), tge_sim_convert_pwr_to_amp(), tge_SIM_ERR_TGEINIT, tge_sim_test(), tgeSim_check_rc(), and tgeSimInst.

Referenced by main().

Here is the call graph for this function:

void tgeSim_check_rc | ( | tgeSimErr_e | id,
 |  | tuint | rc,
 |  | tuint | pass_code
 | ) |  |

Definition at line 519 of file tgesim.c.

References tge_sim_halt(), and tgeSimErrorId.

Referenced by tge_sim_create_inst(), tge_sim_initialize(), tge_sim_new_tdu(), tge_sim_process_frames(), tge_sim_test(), tge_sim_test_ampr(), and tge_sim_test_tones().

Here is the call graph for this function:

static void tge_sim_banner_print ( char * str ) [inline, static]

Definition at line 118 of file tgesim.h.

Referenced by main().

static linSample tge_sim_convert_pwr_to_amp ( float power ) [inline, static]

Definition at line 135 of file tgesim.h.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

static Fract tge_sim_convert_pct_to_q14 ( tint percent ) [inline, static]

Definition at line 150 of file tgesim.h.

Referenced by tge_sim_test_ampr().

static tint tge_sim_convert_ms_to_frames ( tint ms ) [inline, static]

Definition at line 162 of file tgesim.h.

References simConfig_t::frame_length, simCfg, and tge_SIM_SAMPLE_PER_MS.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

Variable Documentation

simConfig_t* simCfg

Definition at line 50 of file tgesim.c.

Referenced by main(), tge_sim_convert_ms_to_frames(), tge_sim_initialize(), tge_sim_process_frames(), tge_sim_profile_init(), and tge_sim_profile_start().


TGE Test: tgesim.h Source File

  • File List
  • Globals

tgesim.h

Go to the documentation of this file.
00001 #ifndef _TGESIM_H
00002 #define _TGESIM_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Definitions and prototypes for TGE Unit Test.
00005  ******************************************************************************
00006  * FILE NAME:   tgesim.h
00007  *
00008  * DESCRIPTION: Contains definitions and function prototypes for TGE
00009  *              Unit Test.
00010  *
00011  * (C) Copyright 2011 Texas Instruments, Inc.
00012  *****************************************************************************/
00013
00014 /* ANSI C headers */
00015 #include <stdlib.h>
00016 #include <stdio.h>
00017 #include <string.h>
00018 #include <math.h>
00019
00020 /* RTSC headers */
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/types/const.h>
00023
00024
00025 /* Simulation constraints */
00026 #define tge_SIM_MAX_FRAME        80       /* Maximum frame_size (samples)     */
00027 #define tge_SIM_MAX_STRING      256       /* Maximum string size              */
00028 #define tge_SIM_MAX_FREQ          4       /* Maximum number of freqs          */
00029 #define tge_SIM_HEAP_SIZE       512       /* Pseudo-heap for TGE instance     */
00030 #define tge_SIM_SAMPLE_PER_MS     8       /* Only support 8K at this point    */
00031
00032
00033 /* DTMF digit information */
00034 #define tge_SIM_DTMF_LO_1       697
00035 #define tge_SIM_DTMF_LO_2       770
00036 #define tge_SIM_DTMF_LO_3       852
00037 #define tge_SIM_DTMF_LO_4       941
00038 #define tge_SIM_DTMF_HI_1      1209
00039 #define tge_SIM_DTMF_HI_2      1336
00040 #define tge_SIM_DTMF_HI_3      1477
00041 #define tge_SIM_DTMF_HI_4      1633
00042
00043
00044 /* Error identifier enumerations */
00045 typedef enum {
00046   tge_SIM_ERR_NONE        = 0x0000,       /* TGE NO ERROR                     */
00047   tge_SIM_ERR_INITPROF,                   /* profile_initCycleProfiling()     */
00048   tge_SIM_ERR_SIMCFG,                     /* Error in tge_sim_config_inst     */
00049   tge_SIM_ERR_HEAPSZ,                     /* Heap too small                   */
00050   tge_SIM_ERR_BADMULT,                    /* TGE/TDU frame size mismatch      */
00051   tge_SIM_ERR_OUTFILE,                    /* TGE output file pointer error    */
00052   tge_SIM_ERR_TGEGETSZ    = 0x1000,       /* Error in tgeGetSizes()           */
00053   tge_SIM_ERR_TGEINIT,                    /* Error in tgeInit()               */
00054   tge_SIM_ERR_TGECTRL,                    /* Error in tgeControl()            */
00055   tge_SIM_ERR_TGEPROC,                    /* Error in tgeProcess()            */
00056   tge_SIM_ERR_TDUGETSZ    = 0x2000,       /* Error in tduGetSizes()           */
00057   tge_SIM_ERR_TDUALLOC,                   /* Error in tdu memory alloc        */
00058   tge_SIM_ERR_TDUNEW,                     /* Error in tduNew()                */
00059   tge_SIM_ERR_TDUSENDIN                   /* Error in tduSendIn()             */
00060 } tgeSimErr_e;
00061
00062
00063 /* Simulation PCM format enumeration */
00064 typedef enum {
00065   tge_SIM_PCM_ALAW  = const_COMP_ALAW_8,  /* 8-bit ulaw PCM                   */
00066   tge_SIM_PCM_ULAW  = const_COMP_MULAW_8, /* 8-bit alaw PCM                   */
00067   tge_SIM_PCM_LIN   = const_COMP_LINEAR   /* Linear PCM (Platform-Endian)     */
00068 } tgePcm_e;
00069
00070
00071 /* Simulation configuration structure */
00072 typedef struct {
00073   /* TGE simulation parameters */
00074   tbool    profile_enable;                /* Enable TGE profiling             */
00075   tbool    cache_enable;                  /* Enable cache                     */
00076   tgePcm_e companding;                    /* Compress/expand samples          */
00077   tuint    frame_length;                  /* TGE sample buffer frame length   */
00078 } simConfig_t;
00079
00080
00081 /* Handle CCS Project paths */
00082 #ifdef  __CCS_PROJECT_REL_PATH
00083 #define tge_SIM_FILE_OUTDIR   "../../../vectors/out/"
00084 #else
00085 #define tge_SIM_FILE_OUTDIR   "../../vectors/out/"
00086 #endif
00087
00088
00089 /* Externals */
00090 extern simConfig_t *simCfg;
00091
00092
00093 /* TGE Simulation internal API functions ("tge_sim_") */
00094 void tge_sim_initialize     (void);
00095 void tge_sim_disp_version   (void);
00096 void tge_sim_create_inst    (void);
00097 void tge_sim_process_frames (tint num_frames);
00098 void tge_sim_compand        (tint pcm_format, linSample *buf, tint length);
00099 void tge_sim_test           (tint frames_on, tint frames_off, char *fname);
00100 void tge_sim_test_tones     (tint nfrq, tint f1, tint f2, tint f3, tint f4,
00101                              float p1, float p2, float p3, float p4,
00102                              tint duration, tint silence, tint tdu_code,
00103                              char *fname);
00104 void tge_sim_test_ampr      (tint freq, float power, tint mfreq, tint mpct,
00105                              tint period, tint duration, tint silence,
00106                              tint tge_code, tint tdu_code, char *fname);
00107
00108
00109 /* TGE Simulation external API functions ("tgeSim_") */
00110 void tgeSim_check_rc      (tgeSimErr_e id, tuint rc, tuint pass_code);
00111
00112
00113 /*-----------------------------------------------------------------
00114  * Function:  tge_sim_banner_print
00115  *
00116  * Description: Utility to provide major progress information.
00117  *-----------------------------------------------------------------*/
00118 static inline void tge_sim_banner_print (char *str)
00119 {
00120   printf ("----------------------------------------\n");
00121   printf (str);
00122   printf ("----------------------------------------\n");
00123 }
00124
00125
00126 /*-----------------------------------------------------------------
00127  * Function:  tge_sim_convert_pwr_to_amp
00128  *
00129  * Description: Convert sinusoidal power in dBm0 to linear amplitude
00130  *              following the formula:
00131  *
00132  *                A = 2^15 * 10^((P - 3)/20)
00133  *
00134  *-----------------------------------------------------------------*/
00135 static inline linSample tge_sim_convert_pwr_to_amp (float power)
00136 {
00137   return ((linSample) ((double) 32768 * pow ((double) 10.0,
00138                        (double) ((power - 3.0) / 20.0))));
00139 }
00140
00141
00142 /*-----------------------------------------------------------------
00143  * Function:  tge_sim_convert_pct_to_q14
00144  *
00145  * Description: Convert decimal percentage to Q14 format :
00146  *
00147  *                Pq14 = round ((P / 100) * 2^14)
00148  *
00149  *-----------------------------------------------------------------*/
00150 static inline Fract tge_sim_convert_pct_to_q14 (tint percent)
00151 {
00152   return ((Fract) ((float) percent / 100.0 * pow ((double) 2.0, 14) + 0.5));
00153 }
00154
00155
00156 /*-----------------------------------------------------------------
00157  * Function:  tge_sim_convert_ms_to_frames
00158  *
00159  * Description: Convert duration in ms to # of frames (round up)
00160  *
00161  *-----------------------------------------------------------------*/
00162 static inline tint tge_sim_convert_ms_to_frames (tint ms)
00163 {
00164   return ((tint) ((float) tge_SIM_SAMPLE_PER_MS * ms / simCfg->frame_length + 0.5));
00165 }
00166
00167 #endif /* _TGESIM_H */
00168
00169 /* Nothing past this point */


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 (3)
#define | ti_mas_vau_Version_XVERTICAL (0)
#define | ti_mas_vau_Version_PATCH (0)
#define | ti_mas_vau_Version_BUILD (3)
#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 (3)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_vau_Version_BUILD (3)

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 (3)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_vau_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_vau_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_vau_Version_BUILD (3)
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.3.0.3

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)
  5. ti.mas.iface.ifvau (Generic interface)
  6. ti.xdais (xDAIS interface)

CID Required Packages
Package | File Name
ti.mas.vau | ti_mas_vau_<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
ti.mas.iface.ifvau | ti_mas_iface_ifvau_<fmt>_c<rtarg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


VAU: VAU Integration

VAU (Voice Activity Detection Unit) Package

VAU Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
    • xDAIS Developers Kit
    • XDC Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the VAU root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the VAU makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.
  4. Ensure the path to xDAIS (XDAIS_INSTALL_DIR) within the VAU root makefile is set correctly (do one of the following):
    • Modify the xDAIS path within the VAU makefile.
    • Set the xDAIS path via the environment variable XDAIS_GEN_INSTALL_DIR.
  5. Ensure the path to the XDC Tools (XDC_INSTALL_DIR) within the VAU root makefile is set correctly (do one of the following):
    • Modify the XDC Tools path within the VAU makefile.
    • Set the XDC Tools path via the environment variable XDC_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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.

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\vau\c<starg>\vau_c.a<starg>

Structures Requiring Initialization

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
  4. C66x Target
    • C66x VAU Data Memory Requirements
    • C66x 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 | 28 | 12
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.78 | 6.53 | Core VAU code

Notes:
  1. Kbyte above represents 1024 bytes.
  2. There could be up to plus or minus 2% variation.

C66x Target

C66x 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 | 28 | 12
data/bss | 64 | 36

C66x VAU Program Memory Requirements

Program Memory Requirements
Section | Size (KBytes) |  | Description
 | XDAIS | ECO
.text | 6.84 | 6.59 | 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
  • C66x Target

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)

C55x VAU MIPS
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.

C64x/C64x+ VAU MIPS
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_DM6446 | 0.98 | 0.71
test_rel_C6455 | 0.31 | 0.25
test_rel_C6472 | 0.31 | 0.25
test_rel_C6416le | 0.34 | 0.28

C66x Target

Profiling was performed on a TI C6678 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.

C66x VAU MIPS
Image Name | Peak (MCPS) | Average (MCPS)
test_rel_C6678 | 0.29 | 0.24


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
  • n
  • 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

- n -

  • nmu_SIM_INPUT_FNAME : test.c
  • nmu_SIM_LOG_FNAME : test.c
  • nmu_SIM_LOGCYC_FNAME : test.c
  • nmu_SIM_OUTDEC_FNAME : test.c
  • nmu_SIM_OUTPUT_FNAME : 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
  • nmu_SIM_INPUT_FNAME : test.c
  • nmu_SIM_LOG_FNAME : test.c
  • nmu_SIM_LOGCYC_FNAME : test.c
  • nmu_SIM_OUTDEC_FNAME : test.c
  • nmu_SIM_OUTPUT_FNAME : 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
#define | nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"
#define | nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"
#define | nmu_SIM_OUTDEC_FNAME "../../vectors/out/outVauDecisions.txt"
#define | nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"
#define | nmu_SIM_LOG_FNAME "../../logs/log.txt"

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.

#define nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"

Definition at line 57 of file test.c.

Referenced by siu_open().

#define nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"

Definition at line 58 of file test.c.

Referenced by siu_open().

#define nmu_SIM_OUTDEC_FNAME "../../vectors/out/outVauDecisions.txt"

Definition at line 59 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"

Definition at line 60 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOG_FNAME "../../logs/log.txt"

Definition at line 61 of file test.c.

Referenced by siu_open().

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 147 of file test.c.

References siuInst_s::cyclesOverhead, siuInst_s::inFrameFilePtr, nmu_SIM_INPUT_FNAME, nmu_SIM_LOG_FNAME, nmu_SIM_LOGCYC_FNAME, nmu_SIM_OUTDEC_FNAME, nmu_SIM_OUTPUT_FNAME, 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 218 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 234 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 262 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 374 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 451 of file test.c.

References siuInst_s::inFrameFilePtr, and siuInst.

Referenced by main().

tint siu_write_outFrame | ( | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 473 of file test.c.

References siuInst_s::outFrameFilePtr, and siuInst.

Referenced by main().

void hw_init ( void )

Definition at line 490 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 508 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 89 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 145 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 506 of file test.c.

linSample outFrame[MAX_FRAME_SIZE]

Definition at line 506 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 into CCSV5 and build. All projects will reside in the vau\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main VAU documentation.

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.X or above and may be used for those who haven't yet upgraded to CCS version 4.X or above.

  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.X or above.

  1. Open CCS
  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
  • CCS Project Conversion
  • Disclaimer


VAU Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the vau\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_VAU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all VAU component Unit Test CCS projects in the vau\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the vau\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_VAU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all VAU component Unit Test CCS projects in the vau\test\ccsProjects directory such that they will load and build with CCS version 4.2


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 67 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 68 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 70 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 74 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 76 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 78 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 79 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 114 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

running maximum of cycles

Definition at line 115 of file test.c.

tlong cycles_s::avg

running average of cycles (using exponential averaging)

Definition at line 116 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 121 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 122 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 123 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process().

tlong siuInst_s::frameCount

Definition at line 124 of file test.c.

Referenced by main(), and siu_process().

ISPHENC1_FrameType siuInst_s::vauFrameTypePrev

Definition at line 125 of file test.c.

Referenced by siu_process().

tbool siuInst_s::vauAlertFlagPrev

Definition at line 126 of file test.c.

Referenced by siu_process().

FILE* siuInst_s::inFrameFilePtr

Definition at line 127 of file test.c.

Referenced by siu_close(), siu_open(), and siu_read_inFrame().

FILE* siuInst_s::outFrameFilePtr

Definition at line 128 of file test.c.

Referenced by siu_close(), siu_open(), and siu_write_outFrame().

FILE* siuInst_s::outVauDecisionFilePtr

Definition at line 129 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 138 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesVau

Vau's cycle statistics

Definition at line 139 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 140 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
#define | nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"
#define | nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"
#define | nmu_SIM_OUTDEC_FNAME "../../vectors/out/outVauDecisions.txt"
#define | nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"
#define | nmu_SIM_LOG_FNAME "../../logs/log.txt"

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
00049 /* Handle CCS Project paths */
00050 #ifdef  __CCS_PROJECT_REL_PATH
00051 #define nmu_SIM_INPUT_FNAME        "../../../vectors/inp/in.raw"
00052 #define nmu_SIM_OUTPUT_FNAME       "../../../vectors/out/out.raw"
00053 #define nmu_SIM_OUTDEC_FNAME       "../../../vectors/out/outVauDecisions.txt"
00054 #define nmu_SIM_LOGCYC_FNAME       "../../../logs/cycles.txt"
00055 #define nmu_SIM_LOG_FNAME          "../../../logs/log.txt"
00056 #else
00057 #define nmu_SIM_INPUT_FNAME        "../../vectors/inp/in.raw"
00058 #define nmu_SIM_OUTPUT_FNAME       "../../vectors/out/out.raw"
00059 #define nmu_SIM_OUTDEC_FNAME       "../../vectors/out/outVauDecisions.txt"
00060 #define nmu_SIM_LOGCYC_FNAME       "../../logs/cycles.txt"
00061 #define nmu_SIM_LOG_FNAME          "../../logs/log.txt"
00062 #endif
00063
00064
00067 typedef struct config_s {
00068   tbool     xdaisFlag;
00070   tbool     xdaisDefaultCfgFlag;
00074   tint      frameSize;
00076   tint      samp_rate_8k_multiple;
00078   ifvauConfig_t vauConfig;
00079   ifvauControl_t vauControl;
00080 #ifdef USE_CACHE
00081   tint  doCacheFlush;
00082   tint  doCacheEnable;
00083 #endif
00084 } config_t;
00085
00089 config_t  config = {
00090   1,  /* xdaisFlag */
00091   0,  /* don't use default configuration for xdais */
00092   80, /* 10 ms default frame size at 8 KHz */
00093   1,  /* 8 KHz */
00094
00095   /* vauConfig */
00096   {
00097    ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
00098    ifvau_TYPE_ADAPTIVE,
00099    0,
00100    180},
00101
00102   /* vauControl */
00103   {
00104    ifvau_VALID_CONTROL,
00105    ifvau_ENABLE
00106   }
00107 #ifdef USE_CACHE
00108  ,1, /* doCacheFlush */
00109   1  /* doCacheEnable */
00110 #endif
00111 };
00112
00114 typedef struct cycles_s {
00115   tlong     max;
00116   tlong     avg;
00117 } cycles_t;
00118
00121 typedef struct siuInst_s {
00122   void     *vauInst;
00123   IALG_Handle vauXdaisInst;
00124   tlong     frameCount;
00125   ISPHENC1_FrameType vauFrameTypePrev;
00126   tbool    vauAlertFlagPrev;
00127   FILE     *inFrameFilePtr;
00128   FILE     *outFrameFilePtr;
00129   FILE     *outVauDecisionFilePtr;
00130
00131 #ifdef PROFILE_CYCLES
00132   FILE   *outCyclesFilePtr;
00133 #endif
00134
00135 #ifdef DBG
00136   FILE     *vauDbgLogFilePtr;
00137 #endif
00138   tlong     cyclesOverhead;
00139   cycles_t  cyclesVau;
00140   tulong   xdaisBufsMallocFreeCounter;
00143 } siuInst_t;
00144
00145 siuInst_t siuInst;
00146
00147 void siu_open(void)
00148 {
00149 #ifdef PROFILE_CYCLES
00150   volatile tlong cycles;
00151 #endif
00152
00153   memset(&siuInst, 0, sizeof(siuInst_t));
00154
00155   siu_init_heaps();
00156
00157   if ((siuInst.inFrameFilePtr = fopen(nmu_SIM_INPUT_FNAME, "rb")) == NULL) {
00158     printf(" Error opening in.raw\n");
00159     exit(0);
00160   }
00161
00162   if ((siuInst.outFrameFilePtr =
00163     fopen(nmu_SIM_OUTPUT_FNAME, "wb")) == NULL) {
00164     printf(" Error opening out.raw\n");
00165     exit(0);
00166   }
00167
00168   if ((siuInst.outVauDecisionFilePtr =
00169     fopen(nmu_SIM_OUTDEC_FNAME, "wt")) == NULL) {
00170     printf(" Error opening out.raw\n");
00171     exit(0);
00172   }
00173
00174 #ifdef PROFILE_CYCLES
00175   if ((siuInst.outCyclesFilePtr =
00176     fopen(nmu_SIM_LOGCYC_FNAME, "wt")) == NULL) {
00177     printf(" Error opening cycles.txt\n");
00178     exit(0);
00179   }
00180 #endif
00181
00182 #ifdef DBG
00183   if ((siuInst.vauDbgLogFilePtr =
00184     fopen(nmu_SIM_LOG_FNAME, "wt")) == NULL) {
00185     printf(" Error opening log.txt\n");
00186     exit(0);
00187   }
00188 #endif
00189
00190   /* measure measurement overhead of cycles */
00191
00192 #ifdef PROFILE_CYCLES
00193   cycles = profile_getCPUcycleCount();
00194 #endif
00195
00196 #ifdef PROFILE_CYCLES
00197   cycles = (profile_getCPUcycleCount() - cycles);
00198   siuInst.cyclesOverhead = cycles;
00199 #endif
00200
00201 }
00202
00203 #ifdef PROFILE_CYCLES
00204 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00205                                          tlong overhead)
00206 {
00207   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00208          (long) cyclesPtr->max - (long) overhead,
00209          (long) cyclesPtr->avg - (long) overhead);
00210 }
00211
00212 void siu_print_cycles(void)
00213 {
00214   siu_print_cycles_util(&siuInst.cyclesVau, "Vau", siuInst.cyclesOverhead);
00215 }
00216 #endif
00217
00218 void siu_dealloc_vau_xdais_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr,
00219                                 tulong *mallocedSizeCounter)
00220 {
00221   Int nbufs;
00222   IALG_MemRec *xdaisBufsPtr;
00223
00224   nbufs = ialgFxnsPtr->algNumAlloc();
00225   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00226
00227   nbufs = ialgFxnsPtr->algFree(xdaisInstPtr, xdaisBufsPtr);
00228
00229   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00230
00231   free(xdaisBufsPtr);
00232 }
00233
00234 void siu_close(void)
00235 {
00236   fclose(siuInst.inFrameFilePtr);
00237   fclose(siuInst.outFrameFilePtr);
00238   fclose(siuInst.outVauDecisionFilePtr);
00239
00240
00241 #ifdef DBG
00242   fclose(siuInst.vauDbgLogFilePtr);
00243 #endif
00244
00245 #ifdef PROFILE_CYCLES
00246   fclose(siuInst.outCyclesFilePtr);
00247   siu_print_cycles();
00248   profile_closeCycleProfiling();
00249 #endif
00250
00251   if (config.xdaisFlag) {
00252     siu_dealloc_vau_xdais_mem (&vauXdaisCallTable.ialg, siuInst.vauXdaisInst,
00253                            &siuInst.xdaisBufsMallocFreeCounter);
00254     if (siuInst.xdaisBufsMallocFreeCounter) {
00255       printf(" Error: mismatched malloc-free\n");
00256     }
00257   }
00258
00259   memset(&siuInst, 0, sizeof(siuInst_t));
00260 }
00261
00262 void siu_new_open_config_modules(config_t * config)
00263 {
00264   tint      nbufs, ret;
00265   const ecomemBuffer_t *sizeBufs;
00266   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00267   const IALG_Params *paramsPtr;
00268   IALG_MemRec *xdaisBufsPtr;
00269
00270   vauSizeConfig_t vauSizeCfg;
00271   vauOpenConfig_t vauOpenCfg;
00272
00273   vauXdaisInitParams_t vauXdaisInitParams;
00274
00275   vauXdaisInitParams.param.size = (Int) sizeof(vauXdaisInitParams_t);
00276
00277   printf("Querying VAU Memory Requirements\n");
00278
00279   vauSizeCfg.max_frame_size = config->frameSize;
00280   vauSizeCfg.max_sampling_rate_8k_multiple = config->samp_rate_8k_multiple;
00281
00282   if (config->xdaisFlag) {
00283     nbufs = (tint) vauXdaisCallTable.ialg.algNumAlloc();
00284     if (nbufs == 0) {
00285       printf(" algNumAlloc error, exiting\n");
00286       exit(0);
00287     }
00288
00289     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00290     if (xdaisBufsPtr == NULL) {
00291       printf("Not enough heap for VAU memory records, exiting\n");
00292       exit(0);
00293     }
00294     if (config->xdaisDefaultCfgFlag) {
00295       paramsPtr = NULL;
00296     }
00297     else {
00298       /* currently no config supported in vau for alloc, but if introduce in
00299          future, refer to that configuration */
00300       paramsPtr = NULL;
00301     }
00302     vauXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00303   }
00304   else {
00305     if (vauGetSizes(&nbufs, &sizeBufs, &vauSizeCfg) != vau_NOERR) {
00306       printf(" Vau get sizes error, exiting \n");
00307       exit(0);
00308     }
00309   }
00310
00311   printf("Allocating VAU memory..\n");
00312
00313   if (config->xdaisFlag) {
00314     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00315     siuInst.vauXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00316   }
00317   else {
00318     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00319   }
00320
00321   vauOpenCfg.frame_size = config->frameSize;
00322   vauOpenCfg.sampling_rate_8k_multiple = config->samp_rate_8k_multiple;
00323   vauOpenCfg.config = config->vauConfig;
00324
00325   if (config->xdaisFlag) {
00326     if (config->xdaisDefaultCfgFlag) {
00327       paramsPtr = NULL;
00328     }
00329     else {
00330       vauXdaisInitParams.cfgOpen = vauOpenCfg;
00331       paramsPtr = (IALG_Params *) &vauXdaisInitParams;
00332     }
00333     ret = vauXdaisCallTable.ialg.algInit(siuInst.vauXdaisInst,
00334                                    xdaisBufsPtr, NULL, paramsPtr);
00335
00336     free(xdaisBufsPtr);
00337
00338     if (ret == IALG_EFAIL) {
00339       printf("algInit() failure, exiting\n");
00340       exit(0);
00341     }
00342   }
00343   else {
00344     if (vauNew(&(siuInst.vauInst), nbufs, ecoBufs) != vau_NOERR) {
00345       printf(" Vau New error, exiting \n");
00346       exit(0);
00347     }
00348     vauOpen(siuInst.vauInst, &vauOpenCfg);
00349   }
00350
00351   if (config->xdaisFlag) {
00352     vauXdaisCallTable.control (siuInst.vauXdaisInst, &(config->vauConfig), &(config->vauControl));
00353   }
00354   else {
00355     vauControl(siuInst.vauInst, &(config->vauConfig), &(config->vauControl));
00356   }
00357 }
00358
00359 #ifdef PROFILE_CYCLES
00360 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00361 {
00362   if (cycles > cyclesPtr->max) {
00363     cyclesPtr->max = cycles;
00364   }
00365
00366   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00367 }
00368 #endif
00369
00370 #ifdef AZ_INFO_AVAILABLE
00371 extern tint glob_Az[];
00372 #endif
00373
00374 void siu_process(linSample * framePtr, linSample ** outFramePtr)
00375 {
00376   linSample *vauOutSamplesPtr = *outFramePtr;
00377   ISPHENC1_FrameType vauFrameType;
00378   tbool     vauAlertFlag = FALSE;
00379
00380 #ifdef PROFILE_CYCLES
00381   volatile tlong cycles;
00382 #endif
00383
00384 #ifdef USE_CACHE
00385   if (config.doCacheFlush) {
00386     memarchcfg_cacheFlush();
00387   }
00388 #endif
00389
00390 #ifdef PROFILE_CYCLES
00391     cycles = profile_getCPUcycleCount();
00392 #endif
00393
00394   if (config.xdaisFlag) {
00395     vauAlertFlag =
00396     vauXdaisCallTable.process(siuInst.vauXdaisInst, framePtr, &vauOutSamplesPtr,
00397                 &vauFrameType);
00398   }
00399   else {
00400     vauAlertFlag =
00401     vauProcess(siuInst.vauInst, framePtr, &vauOutSamplesPtr,
00402               &vauFrameType);
00403   }
00404
00405 #ifdef PROFILE_CYCLES
00406     cycles = (profile_getCPUcycleCount() - cycles);
00407     siu_process_cycles(cycles, &siuInst.cyclesVau);
00408     fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00409 #endif
00410
00411   /* output when something changes and on first occurrence */
00412   if ( (siuInst.frameCount == 1) || (vauFrameType != siuInst.vauFrameTypePrev) ||
00413        (vauAlertFlag != siuInst.vauAlertFlagPrev)) {
00414
00415     fprintf(siuInst.outVauDecisionFilePtr, "%ld, %d, %d\n", (long) siuInst.frameCount,
00416             vauFrameType, vauAlertFlag);
00417
00418     switch (vauFrameType) {
00419       case ISPHENC1_FTYPE_SPEECH:
00420         printf(" At frame %ld, %s, %s\n", (long) siuInst.frameCount, "SPEECH",
00421                              (vauAlertFlag == TRUE)? "ALERT ON": "ALERT OFF");
00422       break;
00423
00424       case ISPHENC1_FTYPE_NODATA:
00425         if ((siuInst.frameCount > 1) && (siuInst.vauAlertFlagPrev == FALSE)) {
00426           printf(" Noise frame arrived without a previous alert flag on SPEECH, exiting");
00427           exit(0);
00428         }
00429         else {
00430           printf(" At frame %ld, %s\n", (long) siuInst.frameCount, "NOISE");
00431         }
00432       break;
00433
00434       default:
00435         printf(" Invalid Frame Type %d\n detected, exiting", vauFrameType);
00436         exit(0);
00437       break;
00438     }
00439
00440     siuInst.vauFrameTypePrev = vauFrameType;
00441     siuInst.vauAlertFlagPrev = vauAlertFlag;
00442   }
00443
00444 #ifdef DBG
00445   fprintf(siuInst.vauDbgLogFilePtr, "%ld %ld\n", (long) gVauEnergy, (long) gVauThreshold);
00446 #endif
00447
00448   *outFramePtr = vauOutSamplesPtr;
00449 }
00450
00451 tint siu_read_inFrame(linSample * inFramePtr, tint numSamples)
00452 {
00453   int       i;
00454
00455   for (i = 0; i < numSamples; i++) {
00456     int       lsb, msb;
00457
00458     lsb = fgetc(siuInst.inFrameFilePtr);
00459     msb = fgetc(siuInst.inFrameFilePtr);
00460     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00461   }
00462
00463   if (feof(siuInst.inFrameFilePtr)) {
00464     /* silence the last frame as it could have garbage */
00465     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00466     return (0);
00467   }
00468   else {
00469     return (1);
00470   }
00471 }
00472
00473 tint siu_write_outFrame(linSample * outFramePtr, tint numSamples)
00474 {
00475   int       i;
00476
00477   for (i = 0; i < numSamples; i++) {
00478     fputc(outFramePtr[i] & 0xFF, siuInst.outFrameFilePtr);
00479     fputc(((outFramePtr[i] >> 8) & 0xFF), siuInst.outFrameFilePtr);
00480   }
00481
00482   if (feof(siuInst.outFrameFilePtr)) {
00483     return (1);
00484   }
00485   else {
00486     return (0);
00487   }
00488 }
00489
00490 void hw_init(void)
00491 {
00492 #ifdef PROFILE_CYCLES
00493   if (!profile_initCycleProfiling()) {
00494     printf("Could not acquire profiling resources..Exiting\n");
00495     exit(0);
00496   }
00497 #endif
00498
00499 #ifdef USE_CACHE
00500   if (config.doCacheEnable) {
00501     memarchcfg_cacheEnable();
00502   }
00503 #endif
00504 }
00505
00506 linSample inFrame[MAX_FRAME_SIZE], outFrame[MAX_FRAME_SIZE];
00507
00508 void main(void)
00509 {
00510   linSample *outFramePtr = outFrame;
00511
00512   printf("Version Information of modules tested:\n");
00513   printf("VAU %d.%d.%d.%d\n",
00514           ti_mas_vau_Version_MAJOR, ti_mas_vau_Version_MINOR,
00515           ti_mas_vau_Version_XVERTICAL, ti_mas_vau_Version_PATCH);
00516
00517   if (config.xdaisFlag) {
00518     printf("Using XDAIS APIs\n");
00519   }
00520   else {
00521     printf("Using ECO APIs\n");
00522   }
00523
00524   hw_init();
00525
00526   siu_open();
00527
00528   siu_new_open_config_modules(&config);
00529
00530   printf("Processing Frames..\n");
00531
00532   while (siu_read_inFrame(inFrame, config.frameSize)) {
00533     siuInst.frameCount++;
00534     siu_process(inFrame, &outFramePtr);
00535     if (siu_write_outFrame(outFramePtr, config.frameSize)) {
00536       printf(" Error writing output frame, exiting \n");
00537       exit(0);
00538     }
00539   }
00540
00541   siu_close();
00542 }
00543 /* @} */ /* ingroup */
00544
00545 /* 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 (4)
#define | ti_mas_veu_Version_XVERTICAL (0)
#define | ti_mas_veu_Version_PATCH (0)
#define | ti_mas_veu_Version_BUILD (3)
#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 (4)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_veu_Version_BUILD (3)

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 (4)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_veu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_veu_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_veu_Version_BUILD (3)
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 © 2011 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.4.0.3

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
ti.mas.veu | ti_mas_veu_<fmt>_c<starg>_<ver>.zip
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<starg>_<ver>.zip
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<starg>_<ver>.zip
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<starg>_<ver>.zip
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<starg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


VEU: VEU Integration

VEU (Voice Enhancement Unit) Package

VEU Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the VEU root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the VEU makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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.

Includes

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>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\veu\c<starg>\veu_c.a<starg>

Structures Requiring Initialization

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+/C66x VEU Data Memory Requirements
    • C64x VEU Program Memory Requirements
    • C64x+ VEU Program Memory Requirements
    • C66x 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 | 184 | Dedicated
1 | 1 | 320 | Dedicated

Additional Data Memory
Category/Structure | Requirement (Bytes)
Tables | 182
data/bss | 26
veuContext | 8

C55x VEU Program Memory Requirements

C55x VEU Program Memory Requirements
Section | Size | Placement | Description
.text | 6.8 Kbyte | Internal | Core VEU code
.switch | 16 Byte | Internal | Switch tables
Total | 6.8 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+/C66x 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.

C66x VEU Program Memory Requirements

C66x VEU Program Memory Requirements
Section | Size | Placement | Description
.text | 11.4 Kbyte | Internal | Core VEU code
.switch | 132 Byte | Internal | Switch tables
Total | 11.6 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
  • C66x Target

Assumptions

We profiled the MIPS for both send and receive direction processing ender the conditions outlined below:

  1. All tests are performed with 10ms frames.
  2. Program memory, stack and I/O buffers all in internal memory.
  3. L1 and L2 cache invalidated after every 10ms frame.

C55x Target

C55x VEU MCPS
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | 0.73 | 0.66
veuReceiveIn() | 0.29 | 0.26

C64x Target

C64x VEU MCPS
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | 0.59 | 0.52
veuReceiveIn() | 0.18 | 0.21

C64x+ Target

C64x+ VEU MCPS
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | 0.51 | 0.44
veuReceiveIn() | 0.18 | 0.21

C66x Target

C66x VEU MCPS
Processing | Performance (Mega-Cycles Per Second)
 | Average | Peak
veuSendIn() | 0.51 | 0.44
veuReceiveIn() | 0.18 | 0.21


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:

- _ -

  • _VEUSIMPORT_C55L : veusimport.h
  • _VEUSIMPORT_C64 : veusimport.h
  • _VEUSIMPORT_C64_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_C64P : veusimport.h
  • _VEUSIMPORT_C64P_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_C66 : veusimport.h
  • _VEUSIMPORT_C66_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_ELF_C64P : veusimport.h
  • _VEUSIMPORT_ELF_C64P_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_ELF_C66 : veusimport.h
  • _VEUSIMPORT_ELF_C66_BIG_ENDIAN : veusimport.h

- f -

  • FRAME_SIZE : veusim.c

- h -

  • heapBuf : veusim.c
  • hw_init() : veusim.c

- i -

  • INPUT_FILE_BASE : veusim.c
  • INPUT_TX_LIST_BASE : veusim.c
  • 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
  • iofile_path : veusim.c

- l -

  • loop : veusim.c

- m -

  • main() : veusim.c
  • MAX_NUM_SAMPLES_PER_FRAME : veusim.c

- n -

  • NUMBER_OF_FRAMES : veusim.h

- o -

  • OUTPUT_FILE_BASE : veusim.c
  • 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_concat_filepath() : veusim.c
  • veusim_control_veu() : veusim.c , veusim.h
  • veusim_get_file() : veusim.c
  • veusim_get_frame_size() : veusim.c
  • VEUSIM_HEAP_SIZE : veusim.h
  • veusim_init_testvector() : veusim.h , veusim.c
  • veusim_new_veu() : veusim.h , veusim.c
  • veusim_open_filelist() : veusim.c
  • veusim_open_veu() : veusim.c , veusim.h
  • 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

  • _VEUSIMPORT_C55L : veusimport.h
  • _VEUSIMPORT_C64 : veusimport.h
  • _VEUSIMPORT_C64_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_C64P : veusimport.h
  • _VEUSIMPORT_C64P_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_C66 : veusimport.h
  • _VEUSIMPORT_C66_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_ELF_C64P : veusimport.h
  • _VEUSIMPORT_ELF_C64P_BIG_ENDIAN : veusimport.h
  • _VEUSIMPORT_ELF_C66 : veusimport.h
  • _VEUSIMPORT_ELF_C66_BIG_ENDIAN : veusimport.h
  • FRAME_SIZE : veusim.c
  • INPUT_FILE_BASE : veusim.c
  • INPUT_TX_LIST_BASE : veusim.c
  • INPUT_TX_LIST_FILE : veusim.c
  • loop : veusim.c
  • MAX_NUM_SAMPLES_PER_FRAME : veusim.c
  • NUMBER_OF_FRAMES : veusim.h
  • OUTPUT_FILE_BASE : veusim.c
  • 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_concat_filepath() : veusim.c
  • veusim_control_veu() : veusim.c , veusim.h
  • veusim_get_file() : veusim.c
  • veusim_get_frame_size() : veusim.c
  • veusim_init_testvector() : veusim.c , veusim.h
  • veusim_new_veu() : veusim.h , veusim.c
  • veusim_open_filelist() : veusim.c
  • veusim_open_veu() : veusim.c , veusim.h
  • veusim_param_veu() : veusim.h
  • veusim_read_frame() : veusim.c , veusim.h
  • veusim_release_testvector() : veusim.h , veusim.c
  • 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
  • iofile_path : 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_BASE "../../"
#define | INPUT_FILE_BASE "../../vectors/inp/"
#define | OUTPUT_FILE_BASE "../../vectors/out/"
#define | INPUT_TX_LIST_FILE "inp_list_file_8k.txt"
#define | VEU_SIM_SAMPLES_PER_SECOND 8000

Functions

char * | veusim_concat_filepath (char *base, char *fname)
: Concatenate a filename and path
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]
char | iofile_path [256]
tlong | sample_cnt
tuint | second_cnt
void * | veuInst
veuControl_t | veuCtrl
veuContext_t | veuContext

Define Documentation

#define loop for(;;)

Definition at line 35 of file veusim.c.

Referenced by main().

#define FRAME_SIZE 80

Definition at line 61 of file veusim.c.

Referenced by main().

#define MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)

Definition at line 64 of file veusim.c.

Referenced by main(), veusim_new_veu(), and veusim_write_frame().

#define INPUT_TX_LIST_BASE "../../"

Definition at line 72 of file veusim.c.

Referenced by veusim_open_filelist().

#define INPUT_FILE_BASE "../../vectors/inp/"

Definition at line 73 of file veusim.c.

Referenced by veusim_init_testvector().

#define OUTPUT_FILE_BASE "../../vectors/out/"

Definition at line 74 of file veusim.c.

Referenced by veusim_init_testvector().

#define INPUT_TX_LIST_FILE "inp_list_file_8k.txt"

Definition at line 81 of file veusim.c.

Referenced by veusim_open_filelist().

#define VEU_SIM_SAMPLES_PER_SECOND 8000

Definition at line 100 of file veusim.c.

Referenced by veu_sim_progress().

Function Documentation

char* veusim_concat_filepath | ( | char * | base,
 |  | char * | fname
 | ) |  |

: Concatenate a filename and path

Definition at line 114 of file veusim.c.

References iofile_path.

Referenced by veusim_init_testvector(), and veusim_open_filelist().

void veusim_open_filelist ( )

: Open the file which contains list of files to be processed

Definition at line 125 of file veusim.c.

References INPUT_TX_LIST_BASE, INPUT_TX_LIST_FILE, inputTxlistFile, and veusim_concat_filepath().

Referenced by main().

Here is the call graph for this function:

void veusim_get_file ( )

: Get a set of file-names to be processed

Definition at line 137 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 153 of file veusim.c.

References INPUT_FILE_BASE, inputFile, inputFile_Rx, inputFileName_Rx, inputFileName_Tx, inputVEUFile, inputVEUsetting, OUTPUT_FILE_BASE, outputFile, outputFile_Rx, outputFileName_Rx, outputFileName_Tx, and veusim_concat_filepath().

Referenced by main().

Here is the call graph for this function:

void veusim_release_testvector ( )

: release test vectors / close file handles

Definition at line 218 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 238 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 266 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 289 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 316 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 377 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 411 of file veusim.c.

References inputVEUFile, and inputVEUsetting.

Referenced by main().

void hw_init ( void )

Definition at line 508 of file veusim.c.

Referenced by main().

void veu_sim_progress ( tint frame_size )

Definition at line 560 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 575 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 85 of file veusim.c.

FILE* inputFile

Definition at line 88 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputFile_Rx

Definition at line 89 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* outputFile

Definition at line 90 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* outputFile_Rx

Definition at line 91 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputVEUFile

Definition at line 92 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 93 of file veusim.c.

Referenced by main(), veusim_get_file(), and veusim_open_filelist().

FILE * inputRxlistFile

Definition at line 93 of file veusim.c.

FILE * outputTxlistFile

Definition at line 93 of file veusim.c.

FILE* outputRxlistFile

Definition at line 94 of file veusim.c.

FILE * inputVEUlistFile

Definition at line 94 of file veusim.c.

char inputFileName_Tx[100]

Definition at line 95 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char inputFileName_Rx[100]

Definition at line 95 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char outputFileName_Tx[100]

Definition at line 95 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char outputFileName_Rx[100]

Definition at line 96 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char inputVEUsetting[100]

Definition at line 96 of file veusim.c.

Referenced by veusim_control_veu(), veusim_get_file(), and veusim_init_testvector().

char iofile_path[256]

Definition at line 97 of file veusim.c.

Referenced by veusim_concat_filepath().

tlong sample_cnt

Definition at line 101 of file veusim.c.

Referenced by main(), and veu_sim_progress().

tuint second_cnt

Definition at line 102 of file veusim.c.

Referenced by main(), and veu_sim_progress().

void* veuInst

Definition at line 105 of file veusim.c.

Referenced by main(), veusim_new_veu(), and veusim_open_veu().

veuControl_t veuCtrl

Definition at line 107 of file veusim.c.

Referenced by main().

veuContext_t veuContext

Definition at line 552 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 into CCSV5 and build. All projects will reside in the veu\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main VEU documentation.

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
  • CCS Project Conversion
  • Disclaimer


VEU Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the veu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_VEU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all VEU component Unit Test CCS projects in the veu\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the veu\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_VEU_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all VEU component Unit Test CCS projects in the veu\test\ccsProjects directory such that they will load and build with CCS version 4.2


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/test/src/veusimport.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_BASE "../../"
#define | INPUT_FILE_BASE "../../vectors/inp/"
#define | OUTPUT_FILE_BASE "../../vectors/out/"
#define | INPUT_TX_LIST_FILE "inp_list_file_8k.txt"
#define | VEU_SIM_SAMPLES_PER_SECOND 8000

Functions

char * | veusim_concat_filepath (char *base, char *fname)
: Concatenate a filename and path
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]
char | iofile_path [256]
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 VEU
00003  ******************************************************************************
00004  *
00005  * (C) Copyright 2012, 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 #include <ti/mas/veu/test/src/veusimport.h>
00032
00033 #include <ti/mas/veu/Version.h>
00034
00035 #define loop for(;;)
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 tlong     cyclesOverhead;
00045 typedef struct cycles_s {
00046   tlong     max;
00047   tlong     avg;
00048 } cycles_t;
00049
00050 cycles_t  cyclesVeuSendIn;
00051 cycles_t  cyclesVeuReceiveIn;
00052 #endif
00053
00054
00055
00056 /* the FRAME_SIZE is always set for the frame size used for narrowband(Fs=8KHz)
00057     signals. For example, the bit_values 80 means 10ms for narrowband input. Once
00058     wideband operation is specified, it will be automatically adjusted to
00059     160-sample (same 10ms in wideband) by either veuOpen() or veuControl();
00060     Please see function veusim_open_veu() in this wrapper as an example.*/
00061 #define FRAME_SIZE              80
00062
00063 /* allocate enough memory for wideband operation */
00064 #define MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)
00065
00066 /* Handle CCS Project paths */
00067 #ifdef __CCS_PROJECT_REL_PATH
00068 #define INPUT_TX_LIST_BASE    "../../../"
00069 #define INPUT_FILE_BASE       "../../../vectors/inp/"
00070 #define OUTPUT_FILE_BASE      "../../../vectors/out/"
00071 #else
00072 #define INPUT_TX_LIST_BASE    "../../"
00073 #define INPUT_FILE_BASE       "../../vectors/inp/"
00074 #define OUTPUT_FILE_BASE      "../../vectors/out/"
00075 #endif
00076
00077 /* Define name of the file which contains list of files to be processed */
00078 #ifdef veu_WB_COMPILER
00079 #define INPUT_TX_LIST_FILE "inp_list_file_16k.txt"
00080 #else
00081 #define INPUT_TX_LIST_FILE "inp_list_file_8k.txt"
00082 #endif
00083
00084
00085 tword heapBuf[VEUSIM_HEAP_SIZE];
00086
00087 /* Input & output files */
00088 FILE *inputFile;
00089 FILE *inputFile_Rx;
00090 FILE *outputFile;
00091 FILE *outputFile_Rx;
00092 FILE *inputVEUFile;
00093 FILE *inputTxlistFile, *inputRxlistFile, *outputTxlistFile;
00094 FILE *outputRxlistFile, *inputVEUlistFile;
00095 char inputFileName_Tx[100], inputFileName_Rx[100], outputFileName_Tx[100];
00096 char outputFileName_Rx[100], inputVEUsetting[100];
00097 char iofile_path[256];
00098
00099 /* Progress reporting */
00100 #define VEU_SIM_SAMPLES_PER_SECOND  8000
00101 tlong sample_cnt;
00102 tuint second_cnt;
00103
00104 /* veu related parameters */
00105 void *veuInst;
00106
00107 veuControl_t veuCtrl;
00108
00109 /* File reading parameters */
00114 char *veusim_concat_filepath (char *base, char *fname)
00115 {
00116   strcpy (iofile_path, base);
00117   strcat (iofile_path, fname);
00118   return (iofile_path);
00119 }
00120
00125 void veusim_open_filelist ()
00126 {
00127   char *list_fptr;
00128
00129   list_fptr = veusim_concat_filepath (INPUT_TX_LIST_BASE, INPUT_TX_LIST_FILE);
00130   inputTxlistFile = fopen (list_fptr, "r");
00131 }
00132
00137 void veusim_get_file ()
00138 {
00139   fscanf (inputTxlistFile, "%s", inputFileName_Tx);
00140   fscanf (inputTxlistFile, "%s", inputFileName_Rx);
00141   fscanf (inputTxlistFile, "%s", outputFileName_Tx);
00142   fscanf (inputTxlistFile, "%s", outputFileName_Rx);
00143   fscanf (inputTxlistFile, "%s", inputVEUsetting);
00144 }
00145
00153 void veusim_init_testvector ()
00154 {
00155   char *fpath_ptr;
00156
00157   /* open Tx(Sin) input files */
00158   fpath_ptr = veusim_concat_filepath (INPUT_FILE_BASE, inputFileName_Tx);
00159   inputFile = fopen (fpath_ptr, "rb");
00160   if (inputFile != NULL) {
00161     printf ("input file %s is opened!\n", inputFileName_Tx);
00162   }
00163   else {
00164     printf ("File Open Error %s\n",inputFileName_Tx);
00165     exit (1);
00166   }
00167
00168   /* open Rx(Rin) input files */
00169   fpath_ptr = veusim_concat_filepath (INPUT_FILE_BASE, inputFileName_Rx);
00170   inputFile_Rx = fopen (fpath_ptr, "rb");
00171   if (inputFile_Rx != NULL) {
00172     printf ("input file %s is opened!\n", inputFileName_Rx);
00173   }
00174   else {
00175     printf ("File Open Error %s\n",inputFileName_Rx);
00176     exit (1);
00177   }
00178
00179   /* open Tx(Sout) output files */
00180   fpath_ptr = veusim_concat_filepath (OUTPUT_FILE_BASE, outputFileName_Tx);
00181   outputFile = fopen (fpath_ptr,"wb");
00182   if (outputFile!= NULL) {
00183     printf ("output file %s is opened!\n", outputFileName_Tx);
00184   }
00185   else {
00186     printf ("File Open Error %s\n",outputFileName_Tx);
00187     exit (1);
00188   }
00189
00190   /* open Rx(Rout) output files */
00191   fpath_ptr = veusim_concat_filepath (OUTPUT_FILE_BASE, outputFileName_Rx);
00192   outputFile_Rx = fopen (fpath_ptr,"wb");
00193   if (outputFile_Rx!= NULL) {
00194     printf ("output file %s is opened!\n", outputFileName_Rx);
00195   }
00196   else {
00197     printf ("File Open Error %s\n",outputFileName_Rx);
00198     exit (1);
00199   }
00200
00201   /* open veu setting file */
00202   fpath_ptr = veusim_concat_filepath (INPUT_FILE_BASE, inputVEUsetting);
00203   inputVEUFile = fopen (fpath_ptr, "rb");
00204   if (inputVEUFile!= NULL) {
00205     printf ("veu setting file %s is opened!\n", inputVEUsetting);
00206   }
00207   else {
00208     printf ("File Open Error %s\n",inputVEUsetting);
00209     exit (1);
00210   }
00211 } /* veusim_init_testvector */
00212
00213
00218 void veusim_release_testvector ()
00219 {
00220   fclose (inputFile);
00221   fclose (inputFile_Rx);
00222   fclose (outputFile);
00223   fclose (outputFile_Rx);
00224   fclose (inputVEUFile);
00225 } /* veusim_release_testvector */
00226
00227
00238 tint veusim_read_frame (linSample *inBuf, FILE *inFile, tint frmSize)
00239 {
00240   int i;
00241
00242   if (inFile) {
00243     for (i = 0; i < frmSize; i++) {
00244       int lsb, msb;
00245       lsb = fgetc(inFile);
00246       msb = fgetc(inFile);
00247       inBuf[i] = (linSample)((msb << 8) | lsb);
00248     }
00249
00250     if (feof(inFile)) return (0);
00251   }
00252   return (1);
00253 }
00254
00255
00266 tint veusim_write_frame (tint *outBuf, FILE *outFile, tint frmSize)
00267 {
00268   int k;
00269   tword buf[2*MAX_NUM_SAMPLES_PER_FRAME];
00270
00271   if (outFile) {
00272     for (k = 0; k < frmSize; k++) {
00273       buf[2*k+0] = (outBuf[k] >> 0) & 0xff;
00274       buf[2*k+1] = (outBuf[k] >> 8) & 0xff;
00275     }
00276
00277     fwrite (buf, sizeof(tword), 2*frmSize, outFile);
00278   }
00279
00280   return (1);
00281 }
00282
00283
00289 void veusim_get_frame_size(tint *frmSize)
00290 {
00291   /* for frame size setting at sample unit (sampled at 8KHz) */
00292   veu_fileio_read_int (inputVEUFile, "%d\n", frmSize);
00293   if ((*frmSize<veu_INFRAME_MINLENGTH) || (*frmSize>veu_INFRAME_MAXLENGTH)) {
00294     printf ("Frame Size Error: frame size should be between 5 to 30ms");
00295     exit (1);
00296   }
00297
00298   /* for frame size setting at ms unit */
00299   /*
00300   fscanf(inputVEUFile, "%d", frmSize);
00301   if ((*frmSize<5) || (*frmSize>30)) {
00302     printf ("Frame Size Error: frame size should be between 5 to 30ms");
00303     exit (1);
00304   }
00305
00306   *frmSize *= 8; // default sample rate is 8KHz
00307   */
00308 }
00309
00316 void veusim_new_veu ()
00317 {
00318   int i;
00319   tint stat, veuNbufs;
00320
00321   ecomemBuffer_t *bufs;
00322   ecomemBuffer_t *veuBufs;
00323   veuSizeConfig_t veuCfgSize;
00324   veuNewConfig_t  veuCfgNew;
00325
00326   /* VEU get sizes */
00327   veuCfgSize.max_frame_size = MAX_NUM_SAMPLES_PER_FRAME;
00328   stat = veuGetSizes (&veuNbufs, &bufs, &veuCfgSize);
00329   if (stat != veu_NOERR) {
00330     printf ("Error in veuGetSizes !");
00331     exit (1);
00332   }
00333
00334   /* Allocate veu memory buffer descriptors & increment auxiliary heap size */
00335   veuBufs = (ecomemBuffer_t*) malloc (veuNbufs * sizeof(ecomemBuffer_t));
00336
00337   /* Allocate veu memory buffers & increment veu heap size. Data from the (global)
00338      variable veuBufs is copied into the (local) variable veuLocalBufs in order to
00339      correctly set veuLocalBufs' size parameter */
00340
00341   /* assume all buffers are in external memory, no alignment requests */
00342   /* NOTE: This is not true for target platform!!! */
00343   printf ("VEU memory buffers:\n");
00344   printf ("    Buffer    Size(twords)    Alignment    Volatile\n");
00345   for (i = 0; i < veuNbufs; i++) {
00346     veuBufs[i]             = bufs[i];
00347     veuBufs[i].mclass      = ecomem_CLASS_EXTERNAL;
00348     veuBufs[i].log2align   = 0;
00349     veuBufs[i].volat       = FALSE;
00350     veuBufs[i].base        = (bufs[i].size)? malloc(bufs[i].size): NULL ;
00351
00352     printf ("     %3d       %7d         %4d       ",
00353                  i, (int)bufs[i].size, (int)bufs[i].log2align);
00354     if(bufs[i].volat)
00355       printf ("    yes\n");
00356     else
00357       printf ("    no\n");
00358   }
00359
00360   veuCfgNew.handle = NULL;
00361   veuInst = NULL;
00362   stat = veuNew ((void **)&veuInst, veuNbufs, veuBufs, &veuCfgNew);
00363   if (stat != veu_NOERR) {
00364     printf ("Error in veuNew %d !", stat);
00365     exit (1);
00366   }
00367
00368   printf ("veu instance is created successfully\n");
00369 } /* veusim_new_veu */
00370
00377 void veusim_open_veu (tint frame_size)
00378 {
00379   veuConfig_t veuConfig;
00380   tint veu_ret; /* for veu return value */
00381
00382   /* Initialize config params */
00383
00384   veuConfig.frame_size      = frame_size;
00385   veuConfig.config_bitfield = veu_CTLM_VEU;
00386   veuConfig.anr_level       = 12;   /* set ANR max attenuation to 12dB */
00387   veuConfig.alc_send_level  = -15;  /* set ALC target level to -15dBm0 in Send path*/
00388   veuConfig.alc_recv_level  = -15;  /* set ALC target level to -15dBm0 in Recv path*/
00389   veuConfig.bulk_delay      = 162;  /* set bulk delay to 162ms */
00390   veuConfig.waepl           = 36;   /* set WAEPL to 36dB */
00391   veuConfig.fgc_send_gain   = 0;    /* set FGC gain to 0dB in Send path */
00392   veuConfig.fgc_recv_gain   = 0;    /* set FGC gain to 0dB in Recv path */
00393
00394   /* Open VEU Instance */
00395   veu_ret = veuOpen(veuInst, &veuConfig);
00396
00397   /* In veu simulation, */
00398   if (veu_ret == veu_ERR_BAD_INST) {
00399     printf ("Error in open a VEU instance !\n");
00400     exit (1);
00401   }
00402 } /* veusim_open_veu */
00403
00404
00411 void veusim_control_veu (void *veuInst, veuControl_t *ctl, tint *frmSize_send,
00412                          tint *frmSize_recv)
00413 {
00414   tint ctrl_code, u_value, mode_mask, mode_value, num_read;
00415   tint veu_ret; /* for veu return value */
00416
00417   while (!feof(inputVEUFile)) {
00418     num_read = veu_fileio_read_int (inputVEUFile, "%d\n", &ctrl_code);
00419     if (num_read > 0) {
00420       ctl->ctl_code = ctrl_code;
00421       if (ctrl_code == veu_CTL_MODE) {
00422         num_read  = veu_fileio_read_int (inputVEUFile, "%x\n", &mode_mask);
00423         num_read += veu_fileio_read_int (inputVEUFile, "%x\n", &mode_value);
00424         if (num_read > 0) {
00425           ctl->u.mode_ctl.bit_masks = mode_mask;
00426           ctl->u.mode_ctl.bit_values = mode_value;
00427           veu_ret = veuControl(veuInst, ctl);
00428           if (veu_ret == veu_ERR_BAD_INST) {
00429             printf ("Error: The VEU instance is not open!\n");
00430             exit (1);
00431           }
00432           else if (veu_ret == veu_ERR_BAD_PARAM) {
00433             printf ("Warning: Invalid VEU configuration parameters!\n");
00434           }
00435           else if (veu_ret == veu_ERR_BAD_BUILD) {
00436             printf ("Error: Incompatible build! ");
00437             printf ("Can't run wideband operation in narrowband build.\n");
00438             exit (1);
00439           }
00440           /* adjust frame_size in Send and Recv Path, the code is for
00441               simulation only. The codes need to modify is this
00442               function is called during a test-vector is running */
00443           if ((mode_mask&veu_CTLM_WB_SEND) && (mode_value&veu_CTLM_WB_SEND)) {
00444             (*frmSize_send) <<= 1;
00445           }
00446           if ((mode_mask&veu_CTLM_WB_RECV) && (mode_value&veu_CTLM_WB_RECV)) {
00447             (*frmSize_recv) <<= 1;
00448           }
00449         }
00450         else {
00451           printf ("Error in veu setting file: %s", inputVEUsetting);
00452           exit (1);
00453         }
00454       }
00455       else {
00456         num_read = veu_fileio_read_int (inputVEUFile, "%d\n", &u_value);
00457         if (num_read > 0) {
00458           switch (ctl->ctl_code) {
00459             case veu_CTL_ANR_LEVEL:
00460                 ctl->u.anr_level = u_value;
00461                 break;
00462             case veu_CTL_ALC_SEND_LEVEL:
00463                 ctl->u.alc_level = u_value;
00464                 break;
00465             case veu_CTL_ALC_RECV_LEVEL:
00466                 ctl->u.alc_level = u_value;
00467                 break;
00468             case veu_CTL_WAEPL:
00469                 ctl->u.waepl = u_value;
00470                 break;
00471             case veu_CTL_BULK_DELAY:
00472                 ctl->u.bulk_delay = u_value;
00473                 break;
00474             case veu_CTL_FGC_SEND_GAIN:
00475                 ctl->u.fgc_gain = u_value;
00476                 break;
00477             case veu_CTL_FGC_RECV_GAIN:
00478                 ctl->u.fgc_gain = u_value;
00479                 break;
00480             default:
00481                 printf ("Error in veu setting file: %s", inputVEUsetting);
00482                 exit (1);
00483                 break;
00484           }
00485           veu_ret = veuControl(veuInst, ctl);
00486           if (veu_ret == veu_ERR_BAD_INST) {
00487             printf ("Error: The VEU instance is not open!\n");
00488             exit (1);
00489           }
00490           else if (veu_ret == veu_ERR_BAD_PARAM) {
00491             printf ("Warning: Invalid VEU configuration parameters!\n");
00492           }
00493         }
00494         else {
00495           printf ("Error in veu setting file: %s", inputVEUsetting);
00496           exit (1);
00497         }
00498       }
00499     }
00500     else {
00501       printf ("Error in veu setting file: %s", inputVEUsetting);
00502       exit (1);
00503     }
00504   }
00505 } /* veusim_control_veu */
00506
00507
00508 void hw_init(void)
00509 {
00510  #ifdef PROFILE_CYCLES
00511   if (!profile_initCycleProfiling()) {
00512     printf ("Could not acquire profiling resources..Exiting\n");
00513     exit (0);
00514   }
00515   /* Initialize the Stats */
00516   cyclesVeuSendIn.avg    = 0;
00517   cyclesVeuSendIn.max    = 0;
00518   cyclesVeuReceiveIn.avg = 0;
00519   cyclesVeuReceiveIn.max = 0;
00520  #endif
00521
00522  #ifdef USE_CACHE
00523    memarchcfg_cacheEnable ();
00524  #endif
00525 }
00526
00527 #ifdef PROFILE_CYCLES
00528 static inline void siu_print_cycles_util (cycles_t * cyclesPtr, char *name,
00529                                          tlong overhead)
00530 {
00531   printf ("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00532          (long) cyclesPtr->max - (long) overhead,
00533          (long) cyclesPtr->avg - (long) overhead);
00534 }
00535
00536 void siu_print_cycles (void)
00537 {
00538   siu_print_cycles_util (&cyclesVeuSendIn, "VEU Send IN", cyclesOverhead);
00539   siu_print_cycles_util (&cyclesVeuReceiveIn, "VEU Receive In", cyclesOverhead);
00540 }
00541
00542 static inline void siu_process_cycles (tlong cycles, cycles_t * cyclesPtr)
00543 {
00544   if (cycles > cyclesPtr->max) {
00545     cyclesPtr->max = cycles;
00546   }
00547
00548   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00549 }
00550 #endif
00551
00552 veuContext_t veuContext;
00553
00554
00555 /*-----------------------------------------------------------------
00556  * Function:  veu_sim_progress
00557  *
00558  * Description: Update sample counters
00559  *-----------------------------------------------------------------*/
00560 void veu_sim_progress (tint frame_size)
00561 {
00562   /* Update sample counter */
00563   sample_cnt += frame_size;
00564   if (sample_cnt >= (second_cnt + 1) * VEU_SIM_SAMPLES_PER_SECOND) {
00565     second_cnt++;
00566     fprintf (stdout, " - Progress: %d seconds\n", second_cnt);
00567   }
00568 }
00569
00570
00575 void main (void)
00576 {
00577   tint read_flag_Tx, read_flag_Rx;
00578   tint inBufRx[MAX_NUM_SAMPLES_PER_FRAME];
00579   tint inBufTx[MAX_NUM_SAMPLES_PER_FRAME];
00580   tint outBufTx[MAX_NUM_SAMPLES_PER_FRAME];
00581   tint frmSize = FRAME_SIZE;
00582   tint frmSize_send, frmSize_recv;
00583   tint frame_counter = 0;
00584   #ifdef PROFILE_CYCLES
00585   volatile tlong cycles;
00586   #endif
00587   veuInst = NULL;
00588
00589   printf ("Version Information of modules tested:\n");
00590   printf ("VEU %d.%d.%d.%d\n",
00591         ti_mas_veu_Version_MAJOR, ti_mas_veu_Version_MINOR,
00592         ti_mas_veu_Version_PATCH, ti_mas_veu_Version_BUILD);
00593
00594   hw_init ();
00595
00596   #ifdef PROFILE_CYCLES
00597   cycles = profile_getCPUcycleCount ();
00598
00599   cycles = (profile_getCPUcycleCount () - cycles);
00600   cyclesOverhead = cycles;
00601   #endif
00602
00603   /* create a new veu instance */
00604   veusim_new_veu ();
00605
00606   veuContext.max_frame_size = 160;
00607
00608   veusim_open_filelist ();
00609
00610   while (!feof(inputTxlistFile)) {
00611     /* get input file list */
00612     veusim_get_file ();
00613
00614     /* open test-vectors and veu setting file */
00615     veusim_init_testvector ();
00616
00617     /* read frame size */
00618     veusim_get_frame_size (&frmSize);
00619
00620     /* set veu instance to be ready */
00621     veusim_open_veu (frmSize);
00622
00623     /* setup parameters for veu instance */
00624     frmSize_send = frmSize;
00625     frmSize_recv = frmSize;
00626     veusim_control_veu (veuInst, &veuCtrl, &frmSize_send, &frmSize_recv);
00627
00628     /* Reset progress reporting */
00629     sample_cnt = 0L;
00630     second_cnt = 0;
00631
00632     /* process the test-vectors */
00633     while (!feof(inputFile)) {
00634       /* write singals from files */
00635       read_flag_Tx = veusim_read_frame (inBufTx, inputFile,    frmSize_send);
00636       read_flag_Rx = veusim_read_frame (inBufRx, inputFile_Rx, frmSize_recv);
00637
00638       if (read_flag_Tx && read_flag_Rx) {
00639         frame_counter++;
00640         #ifdef USE_CACHE
00641         memarchcfg_cacheFlush ();
00642         #endif
00643         #ifdef PROFILE_CYCLES
00644         cycles = profile_getCPUcycleCount ();
00645         #endif
00646         #ifdef USE_CACHE
00647         memarchcfg_cacheFlush ();
00648         #endif
00649         #ifdef PROFILE_CYCLES
00650         cycles = profile_getCPUcycleCount ();
00651         #endif
00652
00653         /* process sin signals */
00654         veuSendIn (veuInst, inBufTx, inBufRx, outBufTx, NULL);
00655
00656         #ifdef PROFILE_CYCLES
00657         cycles = (profile_getCPUcycleCount () - cycles);
00658         siu_process_cycles (cycles, &cyclesVeuSendIn);
00659         #endif
00660
00661         #ifdef USE_CACHE
00662         memarchcfg_cacheFlush ();
00663         #endif
00664
00665         #ifdef PROFILE_CYCLES
00666         cycles = profile_getCPUcycleCount ();
00667         #endif
00668
00669         /* process rin signals */
00670         veuReceiveIn (veuInst, inBufRx);
00671
00672         #ifdef PROFILE_CYCLES
00673         cycles = (profile_getCPUcycleCount () - cycles);
00674         siu_process_cycles (cycles, &cyclesVeuReceiveIn);
00675         #endif
00676
00677         /* write outputs to files */
00678         veusim_write_frame (outBufTx, outputFile, frmSize_send);
00679         veusim_write_frame (inBufRx, outputFile_Rx, frmSize_recv);
00680
00681         /* Sample count and Breakpoint check */
00682         veu_sim_progress (frmSize);
00683       } /* if */
00684     } /* while */
00685
00686     /* close veu instance */
00687     veuClose (veuInst);
00688
00689     /* close test-vectors */
00690     veusim_release_testvector ();
00691     #ifdef PROFILE_CYCLES
00692     siu_print_cycles ();
00693     profile_closeCycleProfiling ();
00694     #endif
00695
00696     #ifdef PROFILE_CYCLES
00697     siu_print_cycles ();
00698     profile_closeCycleProfiling ();
00699     #endif
00700   }
00701
00702   /* Loop */
00703   printf ("\n\nSimulation Complete\n\n");
00704   loop;
00705
00706 } /* main */
00707 /* @} */ /* ingroup */
00708 /* 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 */


VEU Test: veusimport.h File Reference

  • File List
  • Globals

veusimport.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | _VEUSIMPORT_C55L 0
#define | _VEUSIMPORT_C64 0
#define | _VEUSIMPORT_C64_BIG_ENDIAN 0
#define | _VEUSIMPORT_C64P 0
#define | _VEUSIMPORT_C64P_BIG_ENDIAN 0
#define | _VEUSIMPORT_ELF_C64P 0
#define | _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 0
#define | _VEUSIMPORT_C66 0
#define | _VEUSIMPORT_ELF_C66 0
#define | _VEUSIMPORT_C66_BIG_ENDIAN 0
#define | _VEUSIMPORT_ELF_C66_BIG_ENDIAN 0

Define Documentation

#define _VEUSIMPORT_C55L 0

Definition at line 17 of file veusimport.h.

#define _VEUSIMPORT_C64 0

Definition at line 23 of file veusimport.h.

#define _VEUSIMPORT_C64_BIG_ENDIAN 0

Definition at line 29 of file veusimport.h.

#define _VEUSIMPORT_C64P 0

Definition at line 35 of file veusimport.h.

#define _VEUSIMPORT_C64P_BIG_ENDIAN 0

Definition at line 41 of file veusimport.h.

#define _VEUSIMPORT_ELF_C64P 0

Definition at line 47 of file veusimport.h.

#define _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 53 of file veusimport.h.

#define _VEUSIMPORT_C66 0

Definition at line 59 of file veusimport.h.

#define _VEUSIMPORT_ELF_C66 0

Definition at line 65 of file veusimport.h.

#define _VEUSIMPORT_C66_BIG_ENDIAN 0

Definition at line 71 of file veusimport.h.

#define _VEUSIMPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 77 of file veusimport.h.


VEU Test: veusimport.h Source File

  • File List
  • Globals

veusimport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: VEU simulation prot file.
00003  ******************************************************************************
00004  * FILE NAME:   veusimport.h
00005  *
00006  * TABS: NONE
00007  *
00008  * (C) Copyright 2012, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #ifndef _VEUSIMPORT_H
00011 #define _VEUSIMPORT_H
00012
00013
00014 #ifdef ti_targets_C55_large
00015 #define _VEUSIMPORT_C55L 1
00016 #else
00017 #define _VEUSIMPORT_C55L 0
00018 #endif
00019
00020 #ifdef ti_targets_C64
00021 #define _VEUSIMPORT_C64 1
00022 #else
00023 #define _VEUSIMPORT_C64 0
00024 #endif
00025
00026 #ifdef ti_targets_C64_big_endian
00027 #define _VEUSIMPORT_C64_BIG_ENDIAN 1
00028 #else
00029 #define _VEUSIMPORT_C64_BIG_ENDIAN 0
00030 #endif
00031
00032 #ifdef ti_targets_C64P
00033 #define _VEUSIMPORT_C64P 1
00034 #else
00035 #define _VEUSIMPORT_C64P 0
00036 #endif
00037
00038 #ifdef ti_targets_C64P_big_endian
00039 #define _VEUSIMPORT_C64P_BIG_ENDIAN 1
00040 #else
00041 #define _VEUSIMPORT_C64P_BIG_ENDIAN 0
00042 #endif
00043
00044 #ifdef ti_targets_elf_C64P
00045 #define _VEUSIMPORT_ELF_C64P 1
00046 #else
00047 #define _VEUSIMPORT_ELF_C64P 0
00048 #endif
00049
00050 #ifdef ti_targets_elf_C64P_big_endian
00051 #define _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 1
00052 #else
00053 #define _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 0
00054 #endif
00055
00056 #ifdef ti_targets_C66
00057 #define _VEUSIMPORT_C66 1
00058 #else
00059 #define _VEUSIMPORT_C66 0
00060 #endif
00061
00062 #ifdef ti_targets_elf_C66
00063 #define _VEUSIMPORT_ELF_C66 1
00064 #else
00065 #define _VEUSIMPORT_ELF_C66 0
00066 #endif
00067
00068 #ifdef ti_targets_C66_big_endian
00069 #define _VEUSIMPORT_C66_BIG_ENDIAN 1
00070 #else
00071 #define _VEUSIMPORT_C66_BIG_ENDIAN 0
00072 #endif
00073
00074 #ifdef ti_targets_elf_C66_big_endian
00075 #define _VEUSIMPORT_ELF_C66_BIG_ENDIAN 1
00076 #else
00077 #define _VEUSIMPORT_ELF_C66_BIG_ENDIAN 0
00078 #endif
00079
00080
00081 #if   (_VEUSIMPORT_C55L)
00082 /* C55x definitions and macros */
00083
00084 static inline tint veu_fileio_read_int (FILE *fp, char *fmt, tint *value)
00085 {
00086   tint num_read;
00087   num_read = fscanf (fp, fmt, value);
00088   return (num_read);
00089 }
00090
00091 #elif (_VEUSIMPORT_C64       || _VEUSIMPORT_C64_BIG_ENDIAN      || \
00092        _VEUSIMPORT_C64P      || _VEUSIMPORT_C64P_BIG_ENDIAN     || \
00093        _VEUSIMPORT_ELF_C64P  || _VEUSIMPORT_ELF_C64P_BIG_ENDIAN || \
00094        _VEUSIMPORT_C66       || _VEUSIMPORT_C66_BIG_ENDIAN      || \
00095        _VEUSIMPORT_ELF_C66   || _VEUSIMPORT_ELF_C66_BIG_ENDIAN)
00096 /* C64x/C64x+/C66x definitions and macros */
00097
00098 static inline tint veu_fileio_read_int (FILE *fp, char *fmt, tint *value)
00099 {
00100   tlong read_value;
00101   tint num_read;
00102   num_read = fscanf (fp, fmt, &read_value);
00103   *value = (tint) read_value;
00104   return (num_read);
00105 }
00106
00107 #else
00108 #error invalid target
00109 #endif
00110
00111 #endif /* _VEUSIMPORT_H */
00112
00113 /* 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 (5)
#define | ti_mas_vpe_Version_XVERTICAL (0)
#define | ti_mas_vpe_Version_PATCH (0)
#define | ti_mas_vpe_Version_BUILD (2)
#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 (5)

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 (0)

Definition at line 59 of file Version.h.

#define ti_mas_vpe_Version_BUILD (2)

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 (5)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_vpe_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_vpe_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_vpe_Version_BUILD (2)
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. PCM Encoder/Decoder (PCM): G.711 Pulse Code Modulation encoder and decoder.
  3. Sample Frequency Converter (SFC): Decimation by 2 and interpolation by 2.
  4. Signal Limiter (SLM): A soft limiter that attenuates the signal without any delay to prevent signal saturation.
  5. Signal Noise Level estimator (SNL): Estimate the voice and noise levels within the signal path.
  6. 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.

PCM Encoder/Decoder (PCM)

PCM module has G.711 Pulse Code Modulation encoder (compressor) and decoder (expander).

Sample Frequency Converter (SFC)

SFC module has a decimator and an interpolator. The decimator decimates the input signal by 2 and the interpolator interpolates the signal by 2. The anti-aliasing filter can be defined and provided by the user. If it is not provided, a default filter provided by SFC will be used.

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 © 2011 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. PCM Module API
  3. SFC Module API
  4. SLM Module API
  5. SNL Module API
  6. 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.

PCM Module API

The PCM module contains only processing functions. It does not need to be instantiated or initialized.

  1. pcmUlawEncoder()
  2. pcmAlawEncoder()
  3. pcmUlawDecoder()
  4. pcmAlawDecoder()
  5. pcmUlawEncoderP()
  6. pcmAlawEncoderP()
  7. pcmUlawDecoderP()
  8. pcmAlawDecoderP()

SFC Module API

The SFC module contains only processing functions. It does not need to be instantiated or initialized.

  1. sfcDecimationBy2()
  2. sfcInterpolationBy2()

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
pcm.h [code] | Contains external API for PCM (G.711) encoder/decoder module
sfc.h [code] | Contains external API for the Sample Frequency Converter (SFC) 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
  • Variables
  • Enumerator
  • Defines
  • _
  • h
  • p
  • 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

- p -

  • pcmAlawDecoder() : pcm.h
  • pcmAlawDecoderP() : pcm.h
  • pcmAlawEncoder() : pcm.h
  • pcmAlawEncoderP() : pcm.h
  • pcmUlawDecoder() : pcm.h
  • pcmUlawDecoderP() : pcm.h
  • pcmUlawEncoder() : pcm.h
  • pcmUlawEncoderP() : pcm.h

- s -

  • sfc_def_decim_interp_filt : sfc.h
  • sfc_DEF_FILT_LEN : sfc.h
  • sfc_NUM_DEF_COEFS : sfc.h
  • sfcDecimationBy2() : sfc.h
  • sfcInterpolationBy2() : sfc.h
  • 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
  • Variables
  • Enumerator
  • Defines

  • __extern : Version.h
  • sfc_DEF_FILT_LEN : sfc.h
  • sfc_NUM_DEF_COEFS : sfc.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
  • Variables
  • 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
  • Variables
  • Enumerator
  • Defines

  • hlcControl() : hlc.h
  • hlcGetSizes() : hlc.h
  • hlcInit() : hlc.h
  • hlcProcess() : hlc.h
  • pcmAlawDecoder() : pcm.h
  • pcmAlawDecoderP() : pcm.h
  • pcmAlawEncoder() : pcm.h
  • pcmAlawEncoderP() : pcm.h
  • pcmUlawDecoder() : pcm.h
  • pcmUlawDecoderP() : pcm.h
  • pcmUlawEncoder() : pcm.h
  • pcmUlawEncoderP() : pcm.h
  • sfcDecimationBy2() : sfc.h
  • sfcInterpolationBy2() : sfc.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: Data Fields

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

  • sfc_def_decim_interp_filt : sfc.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: Source Frequency Converter (SFC)

Source Frequency Converter (SFC)

Collaboration diagram for Source Frequency Converter (SFC):

Modules

SFC Default Filter
Default decimation/interpolation filter coefficients. This filter will be used if the user doesn't provide coefficients for decimation/interpolation.

External APIs for SFC

void | sfcDecimationBy2 (linSample *delay_line, linSample *sig_out, const Fract *coeffs, tint filt_len, tint frame_len_in)
Sample frequency converter sfcDecimationBy2 performs decimation by 2.
void | sfcInterpolationBy2 (linSample *delay_line, linSample *sig_out, const Fract *coeffs, tint filt_len, tint frame_len_in)
Sample frequency converter sfcInterpolationBy2 performs interpolation by 2.

Function Documentation

void sfcDecimationBy2 | ( | linSample * | delay_line,
 |  | linSample * | sig_out,
 |  | const Fract * | coeffs,
 |  | tint | filt_len,
 |  | tint | frame_len_in
 | ) |  |

Sample frequency converter sfcDecimationBy2 performs decimation by 2.

Parameters:
[in] | filt_len | Length of the decimation filter. It MUST be integer multiple of 4 plus 1, ie., 4*k+1. This parameter is ignored if parameter coeffs is NULL.
[in] | frame_len_in | Length of the data frame to be processed.
[in] delay_line Filter delay line. It must have filt_len-1 samples from previous frames and frame_len_in samples from current frame. The samples in this buffer must be packed as illustrated below:
        |   previous frames   |   current frame   |
        x(n-N+1), ..., x(n-M),  x(n-M+1), ..., x(n)
        where N=M+L-1, M is input frame length, L is filter length.
[in] | coeffs | Left half of the decimation filter coefficients including the center. Total number of coefficients provided by user must be (filt_len+1)/2. The decimation filter must be a symetric FIR filter with length filt_len. The gain of the filter must be less than or equal to 0dB. If this pointer is NULL, the SFC Default Filter will be used.
[out] | sig_out | Output signal after decimation. Number of output samples is frame_len_in/2.

void sfcInterpolationBy2 | ( | linSample * | delay_line,
 |  | linSample * | sig_out,
 |  | const Fract * | coeffs,
 |  | tint | filt_len,
 |  | tint | frame_len_in
 | ) |  |

Sample frequency converter sfcInterpolationBy2 performs interpolation by 2.

Parameters:
[in] | filt_len | Length of the interpolation filter. It MUST be integer multiple of 4 plus 1, ie., 4*k+1. This parameter is ignored if parameter coeffs is NULL.
[in] | frame_len_in | Length of the data frame to be processed.
[in] delay_line Filter delay line. It must have (filt_len-1)/2 samples from previous frames and frame_len_in samples from current frame. The samples in this buffer must be packed as illustrated below:
        |   previous frames   |   current frame   |
        x(n-N+1), ..., x(n-M),  x(n-M+1), ..., x(n)
        where N=M+(L-1)/2, M is input frame length, L is filter length.
[in] | coeffs | Left half of the interpolation filter coefficients including the center. Total number of coefficients provided by user must be (filt_len+1)/2. The interpolation filter must be a symetric FIR filter with length filt_len. The gain of the filter must be less than or equal to 0dB. If this pointer is NULL, the SFC Default Filter will be used.
[out] | sig_out | Output signal after interpolation. Number of output samples is frame_len_in*2.


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: SFC Default Filter

SFC Default Filter
[Source Frequency Converter (SFC)]

Collaboration diagram for SFC Default Filter:

Detailed Description

Default decimation/interpolation filter coefficients. This filter will be used if the user doesn't provide coefficients for decimation/interpolation.

This filter has cutoff frequency at 0.426 PI, or 3.4kHz for 16kHz sampling frequency. It has 59dB out-of-band rejection above 0.548 PI, or 4.34kHz for 16kHz sampling frequency.

    Fract sfc_decim_interp_filt[sfc_NUM_DEF_COEFS] = {
           9,
         105,
         108,
        -105,
        -251,
          74,
         479,
          85,
        -766,
        -463,
        1075,
        1224,
       -1354,
       -2891,
        1548,
       10171,
       14672  -> center coefficient

Defines

#define | sfc_DEF_FILT_LEN 33
#define | sfc_NUM_DEF_COEFS (sfc_DEF_FILT_LEN+1)/2

Variables

const Fract | sfc_def_decim_interp_filt [sfc_NUM_DEF_COEFS]

Define Documentation

#define sfc_DEF_FILT_LEN 33

Definition at line 118 of file sfc.h.

#define sfc_NUM_DEF_COEFS (sfc_DEF_FILT_LEN+1)/2

Definition at line 119 of file sfc.h.

Variable Documentation

const Fract sfc_def_decim_interp_filt[sfc_NUM_DEF_COEFS]


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.5.0.2

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. PCM Encoder/Decoder (PCM): G.711 Pulse Code Modulation encoder and decoder.
  3. Sample Frequency Converter (SFC): Decimation by 2 and interpolation by 2.
  4. Signal Limiter (SLM): A soft limiter that attenuates the signal without any delay to prevent signal saturation.
  5. Signal Noise Level estimator (SNL): Estimate the voice and noise levels within the signal path.
  6. 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
 | PCM Configuration
 | SFC 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.

PCM Encoder/Decoder (PCM)

  1. The frame size must be an integer multiple of 4 samples.

Sample Frequency Converter (SFC)

  1. The frame size must be an integer multiple of 2 samples.
  2. The filter length must be an integer multiple of 4 plus 1.

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
ti.mas.vpe | ti_mas_vpe_<fmt>_c<starg>_<ver>.zip
ti.mas.types (dependent) | ti_mas_types_<fmt>_c<starg>_<ver>.zip
ti.mas.fract (dependent) | ti_mas_fract_<fmt>_c<starg>_<ver>.zip
ti.mas.util (dependent) | ti_mas_util_<fmt>_c<starg>_<ver>.zip
ti.mas.swtools (build dependent) | ti_mas_swtools_<fmt>_c<starg>_<ver>.zip

Target Naming Conventions
Target | Short Format (starg) | Long Format (ltarg)
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
C64x+ Little Endian ELF | e64Ple | C64P_elf
C64x+ Big Endian ELF | e64Pbe | C64P_big_endian_elf
C66 Little Endian | 66le | C66
C66 Big Endian | 66be | C66_big_endian
C66 Little Endian ELF | e66le | C66_elf
C66 Big Endian ELF | e66be | C66_big_endian_elf

Notes:
  1. <fmt> above represents the delivery format and will be either src or obj.
  2. <ver> above represents the release version and will have the form M_m_p_b where:
    • M refers to the "Major" release specifier
    • m refers to the "minor" release specifier
    • p refers to the "patch" release specifier
    • b refers to the "build" release specifier
  3. Any build package (zipfile) may have the extension: "pre-alpha", "alpha" or "beta" to the version. This will depend on the delivery. A version string that ends with the version number alone, implies a final release delivery


VPE: VPE Integration

VPE (Voice Processing Elements) Package

VPE Integration

Page Contents

  • Building
  • Linking
  • Structures Requiring Initialization

Building

Required Tools:

  1. Texas Instruments
    • Codegen Tools
  2. Other
    • Cygwin (Windows only - verified with version 1.7.9-1)

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

Procedure:

  1. Download and install all required tools
  2. Add the path to the Cygwin bin directory (i.e., c:/cygwin/bin) to the PATH environment variable (Windows only)
  3. Ensure the path to the TI Codegen Tools (<TGT>_GEN_INSTALL_DIR) within the VPE root makefile is set correctly (do one of the following):
    • Modify the Codegen target tool path within the VPE makefile.
    • Set the Codegen target tool path via the environment variable <TGT>_GEN_INSTALL_DIR.

Notes:
  1. Correct the Codegen Tools path for the target library you are building only. You can safely ignore other target tool paths.
  2. All paths should use the Unix-style path separator "/".
  3. Paths may have spaces (i.e., c:/Program Files/Texas Instruments) .

Build targets supported by the makefile are:

   all:        Build all library and executable artifacts.  For executable it recursively
               builds all the dependent components as well.

   clean:      Clean all generated object files and artifacts

   cleanall:   Cleans all generated artifacts of the components as well its dependent component.

Linking

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.

Includes

The following header files may be required in source files that reference the VPE API. Note that requirements are based on which module is referenced:

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/vpe/hlc.h>
  3. #include <ti/mas/vpe/pcm.h>
  4. #include <ti/mas/vpe/sfc.h>
  5. #include <ti/mas/vpe/slm.h>
  6. #include <ti/mas/vpe/snl.h>
  7. #include <ti/mas/vpe/svd.h>

Note that the options below are required at compile-time. This places the <WORK> directory (path to the working directory) in the compiler's include path and defines the target for proper "types" selection.

  1. -i <WORK>
  2. -Dti_targets_<ltarg>

Note:
  1. <ltarg> represents the long format target naming convention as in defined in the Target Naming Convention table. (Target-Naming).

Libraries

The following libraries must be included in the final link:

  1. ti\mas\util\c<starg>\util_a.a<starg>
  2. ti\mas\util\c<starg>\util_c.a<starg>
  3. ti\mas\vpe\c<starg>\vpe_c.a<starg>
  4. ti\mas\vpe\c<starg>\vpe_a.a<starg> (C55x target only)

Structures Requiring Initialization

N/A


VPE: Memory Requirements

VPE (Voice Processing Elements) Package

Memory Requirements

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target
  • C66x 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

C55x VPE Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 940 (bytes) | 12 (words) | 16 (words)
PCM | 1243 (bytes) | 24 (words) | 0 (words)
SFC | 234 (bytes) | 17 (words) | 0 (words)
SLM | 344 (bytes) | 95 (words) | 1 (words)
SNL | 1007 (bytes) | 0 (words) | 10 (words)
SVD | 269 (bytes) | 0 (words) | 14 (words)

C64x Target

C64x VPE Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 2688 (bytes) | 24 (bytes) | 32 (bytes)
PCM | 4704 (bytes) | 48 (bytes) | 0 (bytes)
SFC | 864 (bytes) | 36 (bytes) | 0 (bytes)
SLM | 896 (bytes) | 190 (bytes) | 2 (bytes)
SNL | 1504 (bytes) | 0 (bytes) | 20 (bytes)
SVD | 544 (bytes) | 0 (bytes) | 28 (bytes)

C64x+ Target

C64x+ VPE Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 2016 (bytes) | 24 (bytes) | 32 (bytes)
PCM | 2944 (bytes) | 48 (bytes) | 0 (bytes)
SFC | 640 (bytes) | 36 (bytes) | 0 (bytes)
SLM | 704 (bytes) | 190 (bytes) | 2 (bytes)
SNL | 1408 (bytes) | 0 (bytes) | 20 (bytes)
SVD | 416 (bytes) | 0 (bytes) | 28 (bytes)

C66x Target

C66x VPE Memory by Module
Module | Memory Class
 | Program | Tables | Instance
HLC | 2048 (bytes) | 24 (bytes) | 32 (bytes)
PCM | 2944 (bytes) | 48 (bytes) | 0 (bytes)
SFC | 640 (bytes) | 36 (bytes) | 0 (bytes)
SLM | 704 (bytes) | 190 (bytes) | 2 (bytes)
SNL | 1408 (bytes) | 0 (bytes) | 20 (bytes)
SVD | 448 (bytes) | 0 (bytes) | 28 (bytes)


VPE: MIPS Requirements

VPE (Voice Processing Elements) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x Target
  • C64x Target
  • C64x+ Target
  • C66x 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.

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 specifics:

  • C55xx Rev3.0 CPU Cycle Accurate Simulator used
  • All code and data placed in RAM

C55x VPE MCPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.20 | 0.38 | 0.19 | 0.32
PCM Encoder (A-law) | 2.54 | 5.08 | 2.29 | 4.58
PCM Encoder (u-law) | 2.32 | 4.64 | 2.09 | 4.18
PCM Decoder (A-law) | 0.66 | 1.32 | 0.66 | 1.32
PCM Decoder (u-law) | 0.37 | 0.74 | 0.37 | 0.74
SFC | 0.35 (interp) | 0.66 (decim) | 0.35 (interp) | 0.66 (decim)
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

C64x VPE MCPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.17 | 0.25 | 0.13 | 0.17
PCM Encoder (A-law) | 0.83 | 1.66 | 0.75 | 1.50
PCM Encoder (u-law) | 0.78 | 1.56 | 0.71 | 1.43
PCM Decoder (A-law) | 0.16 | 0.32 | 0.16 | 0.32
PCM Decoder (u-law) | 0.08 | 0.16 | 0.08 | 0.16
SFC | 0.64 (interp) | 0.63 (decim) | 0.64 (interp) | 0.63 (decim)
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

C64x+ VPE MCPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.15 | 0.23 | 0.11 | 0.15
PCM Encoder (A-law) | 0.83 | 1.66 | 0.75 | 1.50
PCM Encoder (u-law) | 0.78 | 1.56 | 0.71 | 1.43
PCM Decoder (A-law) | 0.16 | 0.32 | 0.16 | 0.32
PCM Decoder (u-law) | 0.08 | 0.16 | 0.08 | 0.16
SFC | 0.51 (interp) | 0.55 (decim) | 0.51 (interp) | 0.55 (decim)
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

C66x Target

Profiling specifics:

  • C6670 Device Cycle Approximate Simulator, Little Endian
  • L1 cache enabled
  • L2 configured as SRAM

C66x VPE MCPS by Module
Module | Peak MIPS |  | Average MIPS
 | 8 KHz | 16 KHz | 8 KHz | 16 KHz
HLC | 0.19 | 0.37 | 0.14 | 0.26
PCM Encoder (A-law) | 0.82 | 1.64 | 0.75 | 1.50
PCM Encoder (u-law) | 0.77 | 1.54 | 0.70 | 1.40
PCM Decoder (A-law) | 0.12 | 0.24 | 0.11 | 0.22
PCM Decoder (u-law) | 0.08 | 0.16 | 0.06 | 0.12
SFC | 0.43 (interp) | 0.44 (decim) | 0.43 (interp) | 0.42 (decim)
SLM | 0.17 | 0.34 | 0.17 | 0.34
SNL | 0.10 | 0.19 | 0.07 | 0.12
SVD | 0.16 | 0.31 | 0.14 | 0.27


VPE: Module Index

VPE Modules

Here is a list of all modules:
  • High Level Compensation (HLC)
    • HLC API return codes
  • Source Frequency Converter (SFC)
    • SFC Default Filter
  • 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: pcm.h File Reference

  • File List
  • Globals

pcm.h File Reference

Detailed Description

Contains external API for PCM (G.711) encoder/decoder module.

(C) Copyright 2011, Texas Instruments, Inc.

Definition in file pcm.h.

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

Include dependency graph for pcm.h:

Go to the source code of this file.

Functions

void | pcmUlawEncoder (linSample *lin_in, tword *ulaw_out, tint frame_len)
PCM mu-law encoder.
void | pcmAlawEncoder (linSample *lin_in, tword *alaw_out, tint frame_len)
PCM A-law encoder.
void | pcmUlawDecoder (tword *ulaw_in, linSample *lin_out, tint frame_len)
PCM mu-law decoder.
void | pcmAlawDecoder (tword *alaw_in, linSample *lin_out, tint frame_len)
PCM A-law decoder.
void | pcmUlawEncoderP (linSample *lin_in, tuint *ulaw_out, tint frame_len)
PCM mu-law encoder with packed output codewords.
void | pcmAlawEncoderP (linSample *lin_in, tuint *alaw_out, tint frame_len)
PCM A-law encoder with packed output codewords.
void | pcmUlawDecoderP (tuint *ulaw_in, linSample *lin_out, tint frame_len)
PCM mu-law decoder with packed input codewords.
void | pcmAlawDecoderP (tuint *alaw_in, linSample *lin_out, tint frame_len)
PCM A-law decoder with packed input codewords.

Function Documentation

void pcmUlawEncoder | ( | linSample * | lin_in,
 |  | tword * | ulaw_out,
 |  | tint | frame_len
 | ) |  |

PCM mu-law encoder.

Parameters:
[in] | lin_in | Input frame of 16-bit linear samples. For each linear sample, the 14 MSBs are taken to generate the mu-law codeword according to ITU-T G.711. The 2 LSBs are ignored.
[in] | frame_len | Length of the input frame. It MUST be an integer multiple of 4.
[out] ulaw_out Output frame of G.711 mu-law codewords. The codewords will be stored in an array of type "tword". The total number of elements in this array is frame_len. For CPUs with 16-bit machine word, each codeword will occupy the lower byte, as illustrated below (L = frame_len):
 *                           output buffer  upper byte      lower byte
 *                            ulaw_out[0]:      0         ulaw(lin_in[0])
 *                            ulaw_out[1]:      0         ulaw(lin_in[1])
 *                            ulaw_out[2]:      0         ulaw(lin_in[2])
 *                            ulaw_out[L-1]:    0         ulaw(lin_in[L-1])
 *
For CPUs with 8-bit machine word, each codeword occupies one byte, as illustrated below:
 *                            ulaw_out[0]:     ulaw(lin_in[0])
 *                            ulaw_out[1]:     ulaw(lin_in[1])
 *                            ulaw_out[2]:     ulaw(lin_in[2])
 *                            ulaw_out[L-1]:   ulaw(lin_in[L-1])
 *

void pcmAlawEncoder | ( | linSample * | lin_in,
 |  | tword * | alaw_out,
 |  | tint | frame_len
 | ) |  |

PCM A-law encoder.

Parameters:
[in] | lin_in | Input frame of 16-bit linear samples. For each linear sample, the 13 MSBs are taken to generate the A-law codeword according to ITU-T G.711. The 3 LSBs are ignored.
[in] | frame_len | Length of the input frame. It MUST be an integer multiple of 4.
[out] | alaw_out | Output frame of G.711 A-law codewords. Refer to pcmUlawEncoder() for output format.

void pcmUlawDecoder | ( | tword * | ulaw_in,
 |  | linSample * | lin_out,
 |  | tint | frame_len
 | ) |  |

PCM mu-law decoder.

Parameters:
[in] | frame_len | Length of the input frame. It MUST be an integer multiple of 4.
[in] ulaw_in Input frame of G.711 mu-law codewords. The codewords must be provided in an array of type "tword". The total number of elements in this array is frame_len. For CPUs with 16-bit machine word, each codeword occupies the lower byte, as illustrated below (L = frame_len):
 *                            input buffer  upper byte      lower byte
 *                            ulaw_in[0]:      0         ulaw codeword 0
 *                            ulaw_in[1]:      0         ulaw codeword 1
 *                            ulaw_in[2]:      0         ulaw codeword 2
 *                            ulaw_in[L-1]:    0         ulaw codeword L-1
 *
For CPUs with 8-bit machine word, each codeword occupies one byte, as illustrated below:
 *                            ulaw_in[0]:      ulaw codeword 0
 *                            ulaw_in[1]:      ulaw codeword 1
 *                            ulaw_in[2]:      ulaw codeword 2
 *                            ulaw_in[L-1]:    ulaw codeword L-1
 *
[out] | lin_out | Output frame of 16-bit linear samples. Each u-law codeword will be decoded according to ITU-T G.711 and the decoded value will be placed into the 14 MSBs of each linear sample. The 2 LSBs will be filled with 0's.

void pcmAlawDecoder | ( | tword * | alaw_in,
 |  | linSample * | lin_out,
 |  | tint | frame_len
 | ) |  |

PCM A-law decoder.

Parameters:
[in] | frame_len | Length of the input frame. It MUST be an integer multiple of 4.
[in] | alaw_in | Input frame of G.711 A-law codewords. The codewords must be provided in an array of type "tword". The total number of elements in this array is frame_len. For input format, refer to pcmUlawDecoder().
[out] | lin_out | Output frame of 16-bit linear samples. Each A-law codeword will be decoded according to ITU-T G.711 and the decoded value will be placed into the 13 MSBs of each linear sample. The 3 LSBs will be filled with 0's.

void pcmUlawEncoderP | ( | linSample * | lin_in,
 |  | tuint * | ulaw_out,
 |  | tint | frame_len
 | ) |  |

PCM mu-law encoder with packed output codewords.

Parameters:
[in] | frame_len | Length of the input frame. It MUST be an integer multiple of 4.
[in] | lin_in | Input frame of 16-bit linear samples. Refer to pcmUlawEncoder() for input format.
[out] ulaw_out Output frame of G.711 mu-law codewords. The codewords will be packed and stored in an array of type "tuint" in big endian format, as illustrated below (L = frame_len):
 *                  output buffer         upper byte           lower byte
 *                   ulaw_out[0]:       ulaw(lin_in[0])      ulaw(lin_in[1])
 *                   ulaw_out[1]:       ulaw(lin_in[2])      ulaw(lin_in[3])
 *                   ulaw_out[2]:       ulaw(lin_in[4])      ulaw(lin_in[5])
 *                   ulaw_out[L/2-1]:   ulaw(lin_in[L-2])    ulaw(lin_in[L-1])
 *

void pcmAlawEncoderP | ( | linSample * | lin_in,
 |  | tuint * | alaw_out,
 |  | tint | frame_len
 | ) |  |

PCM A-law encoder with packed output codewords.

Parameters:
[in] | frame_len | Length of the input frame. It MUST be an integer multiple of 4.
[in] | lin_in | Input frame of 16-bit linear samples. Refer to pcmAlawEncoder() for input format.
[out] | alaw_out | Output frame of G.711 A-law codewords. Refer to pcmUlawEncoderP() for output format.

void pcmUlawDecoderP | ( | tuint * | ulaw_in,
 |  | linSample * | lin_out,
 |  | tint | frame_len
 | ) |  |

PCM mu-law decoder with packed input codewords.

Parameters:
[in] | frame_len | Length of the input frame, ie. the number of mu-law codewords to be decoded. It MUST be an integer multiple of 4.
[in] ulaw_in Input frame of G.711 mu-law codewords. The codewords must be packed and stored in an array of type "tuint" in big endian format, as illustrated below (L = frame_len):
 *                  input buffer        upper byte           lower byte
 *                   ulaw_in[0]:      ulaw codeword 0      ulaw codeword 1
 *                   ulaw_in[1]:      ulaw codeword 2      ulaw codeword 3
 *                   ulaw_in[2]:      ulaw codeword 4      ulaw codeword 5
 *                   ulaw_in[L/2-1]:  ulaw codeword L-2    ulaw codeword L-1
 *
[out] | lin_out | Output frame of 16-bit linear samples. Refer to pcmUlawDecoder() for output format.

void pcmAlawDecoderP | ( | tuint * | alaw_in,
 |  | linSample * | lin_out,
 |  | tint | frame_len
 | ) |  |

PCM A-law decoder with packed input codewords.

Parameters:
[in] | frame_len | Length of the input frame, ie. the number of A-law codewords to be decoded. It MUST be an integer multiple of 4.
[in] | alaw_in | Input frame of G.711 A-law codewords. The codewords must be packed and stored in an array of type "tuint" in big endian format. Refer to pcmUlawDecoderP() for format.
[out] | lin_out | Output frame of 16-bit linear samples. Linear sample value of 32767 corresponds to load capacity of 3.17dBm0 according to ITU-T G.711.


VPE: pcm.h Source File

  • File List
  • Globals

pcm.h

Go to the documentation of this file.
00001 #ifndef _PCM_H
00002 #define _PCM_H
00003
00011 #include <ti/mas/types/types.h>               /* DSP types                   */
00012
00044 void pcmUlawEncoder(linSample *lin_in, tword *ulaw_out, tint frame_len);
00045
00057 void pcmAlawEncoder(linSample *lin_in, tword *alaw_out, tint frame_len);
00058
00059
00092 void pcmUlawDecoder(tword *ulaw_in, linSample *lin_out, tint frame_len);
00093
00110 void pcmAlawDecoder(tword *alaw_in, linSample *lin_out, tint frame_len);
00111
00131 void pcmUlawEncoderP(linSample *lin_in, tuint *ulaw_out, tint frame_len);
00132
00143 void pcmAlawEncoderP(linSample *lin_in, tuint *alaw_out, tint frame_len);
00144
00165 void pcmUlawDecoderP(tuint *ulaw_in, linSample *lin_out, tint frame_len);
00166
00181 void pcmAlawDecoderP(tuint *alaw_in, linSample *lin_out, tint frame_len);
00182
00183 #endif
00184 /* Nothing past this point */


VPE: PCM Configuration

VPE (Voice Processing Elements) Package

PCM Configuration

PCM Initialization

PCM module does not need initialization.

PCM Configuration

PCM module does not have run time configuration.


VPE: sfc.h File Reference

  • File List
  • Globals

sfc.h File Reference

Detailed Description

Contains external API for the Sample Frequency Converter (SFC) module.

(C) Copyright 2011, Texas Instruments, Inc.

Definition in file sfc.h.

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

Include dependency graph for sfc.h:

Go to the source code of this file.

Defines

#define | sfc_DEF_FILT_LEN 33
#define | sfc_NUM_DEF_COEFS (sfc_DEF_FILT_LEN+1)/2

Functions

External APIs for SFC
void | sfcDecimationBy2 (linSample *delay_line, linSample *sig_out, const Fract *coeffs, tint filt_len, tint frame_len_in)
Sample frequency converter sfcDecimationBy2 performs decimation by 2.
void | sfcInterpolationBy2 (linSample *delay_line, linSample *sig_out, const Fract *coeffs, tint filt_len, tint frame_len_in)
Sample frequency converter sfcInterpolationBy2 performs interpolation by 2.

Variables

const Fract | sfc_def_decim_interp_filt [sfc_NUM_DEF_COEFS]


VPE: sfc.h Source File

  • File List
  • Globals

sfc.h

Go to the documentation of this file.
00001 #ifndef _SFC_H
00002 #define _SFC_H
00003
00011  #include <ti/mas/types/types.h>               /* DSP types                   */
00012
00019 /* @{ */
00020
00025 /* @{ */
00052 void sfcDecimationBy2(linSample *delay_line, linSample *sig_out,
00053                       const Fract *coeffs, tint filt_len, tint frame_len_in);
00054
00082 void sfcInterpolationBy2(linSample *delay_line, linSample *sig_out,
00083                          const Fract *coeffs, tint filt_len, tint frame_len_in);
00084 /* @} */
00085
00117 /* @{ */
00118 #define sfc_DEF_FILT_LEN 33
00119 #define sfc_NUM_DEF_COEFS (sfc_DEF_FILT_LEN+1)/2
00120 extern const Fract sfc_def_decim_interp_filt[sfc_NUM_DEF_COEFS];
00121 /* @} */
00122
00123 /* @} */ /* ingroup SFC */
00124 #endif
00125 /* Nothing past this point */


VPE: SFC Configuration

VPE (Voice Processing Elements) Package

SFC Configuration

SFC Initialization

SFC module does not need initialization.

SFC Configuration

SFC module does not have run time configuration.


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
  • i
  • n
  • p
  • s
  • u
  • w

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

- a -

  • alaw_dec_on : vpeSimConfig_t
  • alaw_enc_on : vpeSimConfig_t
  • 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
  • decim_on : vpeSimConfig_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_in : vpeSimConfig_t
  • frame_size_out : vpeSimConfig_t
  • Fs : vpeSimConfig_t

- h -

  • hlc_ctrl : vpeSimConfig_t
  • hlc_on : vpeSimConfig_t
  • hoth_seed : vpeSGNPars_t

- i -

  • interp_on : vpeSimConfig_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

- u -

  • ulaw_dec_on : vpeSimConfig_t
  • ulaw_enc_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
  • i
  • n
  • p
  • s
  • u
  • w

- a -

  • alaw_dec_on : vpeSimConfig_t
  • alaw_enc_on : vpeSimConfig_t
  • 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
  • decim_on : vpeSimConfig_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_in : vpeSimConfig_t
  • frame_size_out : vpeSimConfig_t
  • Fs : vpeSimConfig_t

- h -

  • hlc_ctrl : vpeSimConfig_t
  • hlc_on : vpeSimConfig_t
  • hoth_seed : vpeSGNPars_t

- i -

  • interp_on : vpeSimConfig_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

- u -

  • ulaw_dec_on : vpeSimConfig_t
  • ulaw_enc_on : vpeSimConfig_t

- w -

  • wftype : vpeSGNPars_t


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • d
  • 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
  • _VPESIM_C66 : vpesim.h
  • _VPESIM_C66_BIG_ENDIAN : vpesim.h

- d -

  • decimDelayLine : vpesim.c

- h -

  • hctrlInst : vpesim.c
  • hctrlInst_ptr : vpesim.c
  • hlcInst_ptr : vpesim.c

- i -

  • inCnt : vpesim.c
  • inFrame : vpesim.c
  • interpDelayLine : 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_DECIM_FLAG : 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_DECIM_DELAY_LEN : vpesim.c
  • VPE_SIM_DECIM_FILT_DEL : 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_INTERP_DELAY_LEN : vpesim.c
  • VPE_SIM_INTERP_FILT_DEL : 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
  • _VPESIM_C66 : vpesim.h
  • _VPESIM_C66_BIG_ENDIAN : vpesim.h

- v -

  • vpe_DECIM_FLAG : 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_DECIM_DELAY_LEN : vpesim.c
  • VPE_SIM_DECIM_FILT_DEL : 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_INTERP_DELAY_LEN : vpesim.c
  • VPE_SIM_INTERP_FILT_DEL : 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

  • decimDelayLine : vpesim.c
  • hctrlInst : vpesim.c
  • hctrlInst_ptr : vpesim.c
  • hlcInst_ptr : vpesim.c
  • inCnt : vpesim.c
  • inFrame : vpesim.c
  • interpDelayLine : 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 into CCSV5 and build. All projects will reside in the vpe\test\ccsProjects directory.

Notes:
  1. If you are using an Eclipse-based version of CCS other than CCSV5, and are experiencing difficulty loading and building the Unit Test Project, please reference the CCS Project Conversion
  2. The GNU Makefile build procedure is described in detail in the main VPE documentation.

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
  • CCS Project Conversion
  • Disclaimer


VPE Test: CCS Project Conversion

CCS Project Conversion

A problem has been identified regarding Code Composer Studio (CCS) project compatibility across the various Eclipse-based versions of CCS. This issue can result in difficulty opening and building a CCS project using a CCS version other than that in which the project was initially created. TI is aware of this issue and currently working to avoid similar problems in the future.

In the meantime we've provided a workaround for this issue that allows users to convert the CCS project provided with the component's Unit Test between the two currently supported CCS versions; CCS V5 and CCS V4.2.

The two procedures are described in detail below.

  • Converting CCS V4.2 Projects for use in CCS V5.x
  • Converting CCS V5.x Projects for use in CCS V4.2

Converting CCS V4.2 Projects for use in CCS V5.x

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 4.2 Unit Test component project, yet requires a CCS version 5.x project.

  1. Open CCS version 5.x .
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the vpe\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_VPE_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 1 below.

    Figure 1. Eclipse CCS V5.X Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog. Click the "Show Advanced Settings" hyperlink in the lower left corner of the dialog if it is visible.

  6. Select "C/C++ Build" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV5 . The dialog should appear as in Figure 2 below.

    Figure 2. CCS V5.X Build Command Changes

  7. Build the project.
  8. The above step converts all VPE component Unit Test CCS projects in the vpe\test\ccsProjects directory such that they will load and build with CCS version 5.x

Converting CCS V5.x Projects for use in CCS V4.2

The procedure described here serves as a guide for anyone who has received a package containing a CCS version 5.x Unit Test component project, yet requires a CCS version 4.2 project.

  1. Open CCS version 4.2.
  2. Open the "Import Existing CCS/CCE Eclipse Project" Dialog under the "Projects" menu.
  3. Browse to the vpe\test\ directory.
  4. Load the conversion project into CCS. The conversion project will be named TI_MAS_VPE_TEST_PROJECT_CONVERT . The dialog should appear as in Figure 3 below.

    Figure 3. Eclipse CCS V4.2 Project Import Dialog

  5. Right-click the project name in the Project Explorer pane and select "properties". This will open the Project Properties dialog.

  6. Select "C/C++ Make Project" in the left-hand pane and click on the "Builder Settings" tab. Change CCSVERSION in the "Build Command" text box to read CCSVERSION=CCSV4.2 . The dialog should appear as in Figure 4 below.

    Figure 4. CCS V4.2 Build Command Changes

  7. Build the project.
  8. The above step converts all VPE component Unit Test CCS projects in the vpe\test\ccsProjects directory such that they will load and build with CCS version 4.2


VPE Test: vpeSGNPars_t Struct Reference

  • Data Structures
  • Data Fields

vpeSGNPars_t Struct Reference

Detailed Description

Definition at line 135 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 136 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::dcoffset

Definition at line 137 of file vpesim.c.

Referenced by vpe_init().

tint vpeSGNPars_t::wftype

Definition at line 138 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::f1

Definition at line 139 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::f2

Definition at line 140 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::amp1

Definition at line 141 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::amp2

Definition at line 142 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::nlevel

Definition at line 143 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tulong vpeSGNPars_t::nseed

Definition at line 144 of file vpesim.c.

Referenced by vpe_init().

tint vpeSGNPars_t::ntype

Definition at line 145 of file vpesim.c.

Referenced by vpe_init().

tint vpeSGNPars_t::pow_level

Definition at line 146 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tulong vpeSGNPars_t::hoth_seed

Definition at line 147 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 152 of file vpesim.c.

Data Fields

tbool | exec
tbool | hlc_on
tbool | slm_on
tbool | snl_on
tbool | svd_on
tbool | decim_on
tbool | interp_on
tbool | ulaw_enc_on
tbool | ulaw_dec_on
tbool | alaw_enc_on
tbool | alaw_dec_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_in
tuint | frame_size_out
char | baseDir [vpe_SIM_MAX_STRING]

Field Documentation

tbool vpeSimConfig_t::exec

Definition at line 153 of file vpesim.c.

Referenced by main(), vpe_init(), vpe_print(), and vpe_sim_init().

tbool vpeSimConfig_t::hlc_on

Definition at line 154 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::slm_on

Definition at line 155 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::snl_on

Definition at line 156 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::svd_on

Definition at line 157 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::decim_on

Definition at line 158 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::interp_on

Definition at line 159 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::ulaw_enc_on

Definition at line 160 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::ulaw_dec_on

Definition at line 161 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::alaw_enc_on

Definition at line 162 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::alaw_dec_on

Definition at line 163 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tlong vpeSimConfig_t::sample_cnt

Definition at line 164 of file vpesim.c.

Referenced by vpe_sim_init().

tulong vpeSimConfig_t::sample_bp

Definition at line 165 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::sgn

Definition at line 166 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_sgn

Definition at line 167 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_hlc

Definition at line 168 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::cfg_slm

Definition at line 169 of file vpesim.c.

Referenced by vpe_sim_init().

tint vpeSimConfig_t::slm_mod

Definition at line 170 of file vpesim.c.

Referenced by vpe_sim_init().

tint vpeSimConfig_t::Fs

Definition at line 171 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 172 of file vpesim.c.

vpeSGNPars_t vpeSimConfig_t::sgnParam

Definition at line 173 of file vpesim.c.

Referenced by main(), and vpe_init().

vpeSimFileIo_t vpeSimConfig_t::sigIn

Definition at line 174 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

vpeSimFileIo_t vpeSimConfig_t::sigOut

Definition at line 175 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

vpeSimPcm_e vpeSimConfig_t::pcmin_format

Definition at line 176 of file vpesim.c.

Referenced by vpe_sim_init().

vpeSimPcm_e vpeSimConfig_t::pcmout_format

Definition at line 177 of file vpesim.c.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::data

Definition at line 178 of file vpesim.c.

Referenced by main().

tuint vpeSimConfig_t::error_id

Definition at line 179 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_init().

tuint vpeSimConfig_t::frame_size_in

Definition at line 180 of file vpesim.c.

Referenced by main(), and vpe_sim_init().

tuint vpeSimConfig_t::frame_size_out

Definition at line 181 of file vpesim.c.

Referenced by main(), vpe_init(), and vpe_sim_init().

char vpeSimConfig_t::baseDir[vpe_SIM_MAX_STRING]

Definition at line 182 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 127 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 128 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 129 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 130 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 131 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/sdk/sgn.h>
#include <ti/mas/vpe/test/src/vpesim.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/sfc.h>
#include <ti/mas/vpe/pcm.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_DECIM_FLAG 0
#define | vpe_SIM_SAMPLE_FREQ_16000 16000
#define | vpe_SIM_SAMPLE_FREQ_8000 8000
#define | vpe_SIM_SAMPLES_PER_SECOND vpe_SIM_SAMPLE_FREQ_8000
#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 "sigIn8K.pcm"
#define | vpe_SIM_DEF_SIGOUT_FNAME "sigOut16K.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 | VPE_SIM_DECIM_FILT_DEL (sfc_DEF_FILT_LEN-1)
#define | VPE_SIM_DECIM_DELAY_LEN (VPE_SIM_DECIM_FILT_DEL + vpe_SIM_DEF_FRAME_SZ)
#define | VPE_SIM_INTERP_FILT_DEL ((sfc_DEF_FILT_LEN-1)/2)
#define | VPE_SIM_INTERP_DELAY_LEN (VPE_SIM_INTERP_FILT_DEL + vpe_SIM_DEF_FRAME_SZ)
#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)]
linSample | decimDelayLine [VPE_SIM_DECIM_DELAY_LEN]
linSample | interpDelayLine [VPE_SIM_INTERP_DELAY_LEN]
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 44 of file vpesim.c.

#define vpe_SIM_ERR_2 ( 2)

Definition at line 45 of file vpesim.c.

#define vpe_SIM_ERR_3 ( 4)

Definition at line 46 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_4 ( 5)

Definition at line 47 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_5 ( 6)

Definition at line 48 of file vpesim.c.

#define vpe_SIM_ERR_6 ( 7)

Definition at line 49 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_7 ( 8)

Definition at line 50 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_8 ( 9)

Definition at line 51 of file vpesim.c.

#define vpe_SIM_ERR_9 (10)

Definition at line 52 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_10 (11)

Definition at line 53 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_11 (12)

Definition at line 54 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_12 (13)

Definition at line 55 of file vpesim.c.

#define vpe_SIM_ERR_13 (14)

Definition at line 56 of file vpesim.c.

#define vpe_SIM_ERR_14 (15)

Definition at line 57 of file vpesim.c.

#define vpe_SIM_ERR_15 (16)

Definition at line 58 of file vpesim.c.

#define vpe_SIM_ERR_16 (17)

Definition at line 59 of file vpesim.c.

#define vpe_SIM_ERR_17 (18)

Definition at line 60 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_ERR_18 (19)

Definition at line 61 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_MAX_SAMPLES 320

Definition at line 64 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_MAX_ECOBUFS 12

Definition at line 65 of file vpesim.c.

#define vpe_SIM_MAX_STRING 256

Definition at line 66 of file vpesim.c.

#define vpe_SIM_FILEIO_READ ( 0)

Definition at line 69 of file vpesim.c.

Referenced by main(), and vpe_sim_fileio_init().

#define vpe_SIM_FILEIO_WRITE ( 1)

Definition at line 70 of file vpesim.c.

Referenced by main(), and vpe_sim_fileio_init().

#define vpe_DECIM_FLAG 0

Definition at line 72 of file vpesim.c.

#define vpe_SIM_SAMPLE_FREQ_16000 16000

Definition at line 74 of file vpesim.c.

#define vpe_SIM_SAMPLE_FREQ_8000 8000

Definition at line 75 of file vpesim.c.

Referenced by vpe_init().

#define vpe_SIM_SAMPLES_PER_SECOND vpe_SIM_SAMPLE_FREQ_8000

Definition at line 81 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_FRAME_SZ (vpe_SIM_SAMPLES_PER_SECOND/200)

Definition at line 83 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_PCM_FORMAT (const_COMP_MULAW_8)

Definition at line 86 of file vpesim.c.

#define vpe_SIM_DEF_BASE_DIR "../../vectors/"

Definition at line 92 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_SIGIN_FNAME "sigIn8K.pcm"

Definition at line 99 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_SIGOUT_FNAME "sigOut16K.pcm"

Definition at line 100 of file vpesim.c.

Referenced by vpe_sim_init().

#define vpe_SGN_DEF_DC_OFFSET 0

Definition at line 104 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_WF_TYPE 1

Definition at line 105 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_F1 1000

Definition at line 106 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_F2 400

Definition at line 107 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_T_AMP1 0x1400

Definition at line 108 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_T_AMP2 0x3700

Definition at line 109 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_PR_PERIOD 1000

Definition at line 110 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_PR_ENABLE FALSE

Definition at line 111 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_LEVEL (-100)

Definition at line 112 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_SEED 40

Definition at line 113 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 114 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_FSK_DURATION 90

Definition at line 115 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_FSK_DATA_LEN 1

Definition at line 116 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_POWER_LEVEL (-10)

Definition at line 117 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_HOTH_WNG_SEED 20

Definition at line 118 of file vpesim.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define VPE_SIM_DECIM_FILT_DEL (sfc_DEF_FILT_LEN-1)

Definition at line 197 of file vpesim.c.

Referenced by main(), and vpe_init().

#define VPE_SIM_DECIM_DELAY_LEN (VPE_SIM_DECIM_FILT_DEL + vpe_SIM_DEF_FRAME_SZ)

Definition at line 198 of file vpesim.c.

#define VPE_SIM_INTERP_FILT_DEL ((sfc_DEF_FILT_LEN-1)/2)

Definition at line 201 of file vpesim.c.

Referenced by vpe_init().

#define VPE_SIM_INTERP_DELAY_LEN (VPE_SIM_INTERP_FILT_DEL + vpe_SIM_DEF_FRAME_SZ)

Definition at line 202 of file vpesim.c.

#define VPESIM_NUM_BYTES_LINSAMP 2

Definition at line 671 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 121 of file vpesim.c.

Function Documentation

void vpe_sim_fileio_init | ( | vpeSimFileIo_t * | fioptr,
 |  | tuint | code
 | ) |  |

Definition at line 601 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 644 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 729 of file vpesim.c.

References vpeSimConfig_t::alaw_dec_on, vpeSimConfig_t::alaw_enc_on, vpeSimConfig_t::baseDir, vpeSimConfig_t::cfg_hlc, vpeSimConfig_t::cfg_sgn, vpeSimConfig_t::cfg_slm, vpeSimConfig_t::decim_on, vpeSimConfig_t::error_id, vpeSimConfig_t::exec, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpeSimConfig_t::frame_size_in, vpeSimConfig_t::frame_size_out, vpeSimConfig_t::Fs, vpeSimConfig_t::hlc_on, vpeSimConfig_t::interp_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, vpeSimConfig_t::ulaw_dec_on, vpeSimConfig_t::ulaw_enc_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 779 of file vpesim.c.

References vpeSGNPars_t::amp1, vpeSGNPars_t::amp2, vpeSGNPars_t::dcoffset, vpeSimConfig_t::decim_on, decimDelayLine, 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_out, vpeSimConfig_t::Fs, hctrlInst_ptr, vpeSimConfig_t::hlc_on, hlcInst_ptr, vpeSGNPars_t::hoth_seed, vpeSimConfig_t::interp_on, interpDelayLine, 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_DECIM_FILT_DEL, 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_INTERP_FILT_DEL, 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 674 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 706 of file vpesim.c.

References vpeSimFileIo_t::fptr, and VPESIM_NUM_BYTES_LINSAMP.

void vpe_sim_input_mux ( void )

void vpe_sim_output_mux ( void )

void vpe_print ( char * str )

Definition at line 565 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 578 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 590 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 985 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 1017 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 1074 of file vpesim.c.

Referenced by main().

sgnFileIo_t * vpe_sim_in_file ( sgnFileIo_t * dsc )

Definition at line 1085 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

static void vpe_banner_print ( char * str ) [inline, static]

Definition at line 238 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 252 of file vpesim.c.

Referenced by main(), and vpe_init().

void main ( void )

Definition at line 291 of file vpesim.c.

References vpeSimConfig_t::alaw_dec_on, vpeSimConfig_t::cfg_sgn, vpeSimConfig_t::data, vpeSimConfig_t::decim_on, decimDelayLine, vpeSimConfig_t::exec, vpeSimConfig_t::frame_size_in, vpeSimConfig_t::frame_size_out, vpeSimConfig_t::Fs, vpeSimConfig_t::sgn, sgnInst_ptr, vpeSimConfig_t::sgnParam, vpeSimConfig_t::sigIn, sigInBuffer, vpeSimConfig_t::sigOut, sigOutBuffer, vpeSimConfig_t::snl_on, snlLevOut, vpeSimConfig_t::svd_on, svdOut, vpeSimConfig_t::ulaw_dec_on, vpe_banner_print(), vpe_halt(), vpe_init(), VPE_SIM_DECIM_FILT_DEL, vpe_sim_fileio_init(), vpe_SIM_FILEIO_READ, vpe_SIM_FILEIO_WRITE, vpe_sim_fread(), 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 1095 of file vpesim.c.

Variable Documentation

linSample vpeIOBufs[vpe_SIM_MAX_SAMPLES]

Definition at line 186 of file vpesim.c.

Referenced by main().

vpeSimConfig_t vpeSimC

Definition at line 187 of file vpesim.c.

vpeSimConfig_t* vpeSim = &vpeSimC

Definition at line 188 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 189 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 190 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 193 of file vpesim.c.

Referenced by main().

linSample sigOutBuffer[2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]

Definition at line 194 of file vpesim.c.

Referenced by main().

linSample decimDelayLine[VPE_SIM_DECIM_DELAY_LEN]

Definition at line 199 of file vpesim.c.

Referenced by main(), and vpe_init().

linSample interpDelayLine[VPE_SIM_INTERP_DELAY_LEN]

Definition at line 203 of file vpesim.c.

Referenced by vpe_init().

tint vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e}

Definition at line 231 of file vpesim.c.

Referenced by vpe_sim_open_sgn().

void* slmInst_ptr = NULL

Definition at line 264 of file vpesim.c.

Referenced by vpe_init().

void* hlcInst_ptr = NULL

Definition at line 267 of file vpesim.c.

Referenced by vpe_init().

hlcControl_t hctrlInst

Definition at line 268 of file vpesim.c.

hlcControl_t * hctrlInst_ptr = &hctrlInst

Definition at line 268 of file vpesim.c.

Referenced by vpe_init().

void* snlInst_ptr = NULL

Definition at line 271 of file vpesim.c.

Referenced by vpe_init().

Fract spchLevdB = frct_MAX

Definition at line 273 of file vpesim.c.

Fract noiseLevdB = frct_MAX

Definition at line 273 of file vpesim.c.

UFract Nthresh = frct_MAX

Definition at line 274 of file vpesim.c.

vpeSimFileIo_t snlLevOut

Definition at line 276 of file vpesim.c.

Referenced by main(), and vpe_init().

void* svdInst_ptr = NULL

Definition at line 279 of file vpesim.c.

Referenced by vpe_init().

vpeSimFileIo_t svdOut

Definition at line 281 of file vpesim.c.

Referenced by main(), and vpe_init().

void* sgnInst_ptr = NULL

Definition at line 284 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 672 of file vpesim.c.

linSample* inFrame

Definition at line 1082 of file vpesim.c.

linSample * outFrame

Definition at line 1082 of file vpesim.c.

tint inCnt

Definition at line 1083 of file vpesim.c.

tint outCnt

Definition at line 1083 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
00020 /* for signal generator */
00021 #include <ti/mas/sdk/sgn.h>
00022
00023 /* unit test includes */
00024 #include <ti/mas/vpe/test/src/vpesim.h>
00025
00026 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN |_VPESIM_C66||_VPESIM_C66_BIG_ENDIAN
00027 #define VPE_FLUSH_CACHE
00028 #endif
00029
00030 /* for cache managements, valid only for C64x, C64x+, and C66x */
00031 #ifdef VPE_FLUSH_CACHE
00032 #include <ti/mas/sdk/memArchCfg.h>
00033 #endif
00034
00035 /* VPE component and simulation headers */
00036 #include <ti/mas/vpe/hlc.h>
00037 #include <ti/mas/vpe/slm.h>
00038 #include <ti/mas/vpe/snl.h>
00039 #include <ti/mas/vpe/svd.h>
00040 #include <ti/mas/vpe/sfc.h>
00041 #include <ti/mas/vpe/pcm.h>
00042
00043 /* Simulation error identifiers */
00044 #define vpe_SIM_ERR_1       ( 1)    //
00045 #define vpe_SIM_ERR_2       ( 2)    //
00046 #define vpe_SIM_ERR_3       ( 4)    //
00047 #define vpe_SIM_ERR_4       ( 5)    //
00048 #define vpe_SIM_ERR_5       ( 6)    //
00049 #define vpe_SIM_ERR_6       ( 7)    //
00050 #define vpe_SIM_ERR_7       ( 8)    //
00051 #define vpe_SIM_ERR_8       ( 9)    //
00052 #define vpe_SIM_ERR_9       (10)    //
00053 #define vpe_SIM_ERR_10      (11)    //
00054 #define vpe_SIM_ERR_11      (12)    //
00055 #define vpe_SIM_ERR_12      (13)    //
00056 #define vpe_SIM_ERR_13      (14)    //
00057 #define vpe_SIM_ERR_14      (15)    //
00058 #define vpe_SIM_ERR_15      (16)    //
00059 #define vpe_SIM_ERR_16      (17)    //
00060 #define vpe_SIM_ERR_17      (18)    //
00061 #define vpe_SIM_ERR_18      (19)    //
00062
00063 /* Simulation constraints */
00064 #define vpe_SIM_MAX_SAMPLES          320    // Maximum frame_size
00065 #define vpe_SIM_MAX_ECOBUFS          12     // Maximum module buffers
00066 #define vpe_SIM_MAX_STRING          256     // Maximum string size
00067
00068 /* Simulation file open actions */
00069 #define vpe_SIM_FILEIO_READ         ( 0)    // Open file for read (binary)
00070 #define vpe_SIM_FILEIO_WRITE        ( 1)    // Open file for write (binary)
00071
00072 #define vpe_DECIM_FLAG 0
00073
00074 #define vpe_SIM_SAMPLE_FREQ_16000 16000    // Sampling frequency
00075 #define vpe_SIM_SAMPLE_FREQ_8000  8000    // Sampling frequency
00076
00077 /* Simulation defaults */
00078 #if vpe_DECIM_FLAG
00079 #define vpe_SIM_SAMPLES_PER_SECOND  vpe_SIM_SAMPLE_FREQ_16000  // Sampling frequency
00080 #else
00081 #define vpe_SIM_SAMPLES_PER_SECOND  vpe_SIM_SAMPLE_FREQ_8000  // Sampling frequency
00082 #endif
00083 #define vpe_SIM_DEF_FRAME_SZ (vpe_SIM_SAMPLES_PER_SECOND/200) // Default frame
00084                                                               // size: 5 msec
00085
00086 #define vpe_SIM_DEF_PCM_FORMAT          (const_COMP_MULAW_8)
00087
00088 /* Handle CCS Project paths */
00089 #ifdef  __CCS_PROJECT_REL_PATH
00090 #define vpe_SIM_DEF_BASE_DIR       "../../../vectors/"
00091 #else
00092 #define vpe_SIM_DEF_BASE_DIR       "../../vectors/"
00093 #endif
00094
00095 #if vpe_DECIM_FLAG
00096 #define vpe_SIM_DEF_SIGIN_FNAME         "sigIn.pcm"
00097 #define vpe_SIM_DEF_SIGOUT_FNAME        "sigOut8K.pcm"
00098 #else
00099 #define vpe_SIM_DEF_SIGIN_FNAME         "sigIn8K.pcm"
00100 #define vpe_SIM_DEF_SIGOUT_FNAME        "sigOut16K.pcm"
00101 #endif
00102 /* sgn defaults */
00103
00104 #define  vpe_SGN_DEF_DC_OFFSET        0
00105 #define  vpe_SGN_DEF_WF_TYPE          1
00106 #define  vpe_SGN_DEF_F1               1000
00107 #define  vpe_SGN_DEF_F2               400
00108 #define  vpe_SGN_DEF_T_AMP1           0x1400
00109 #define  vpe_SGN_DEF_T_AMP2           0x3700
00110 #define  vpe_SGN_DEF_PR_PERIOD        1000
00111 #define  vpe_SGN_DEF_PR_ENABLE        FALSE
00112 #define  vpe_SGN_DEF_NOISE_LEVEL      (-100)
00113 #define  vpe_SGN_DEF_NOISE_SEED       40
00114 #define  vpe_SGN_DEF_NOISE_TYPE       sgn_NT_GAUSS
00115 #define  vpe_SGN_DEF_FSK_DURATION     90
00116 #define  vpe_SGN_DEF_FSK_DATA_LEN     1
00117 #define  vpe_SGN_DEF_POWER_LEVEL      (-10)
00118 #define  vpe_SGN_DEF_HOTH_WNG_SEED    20
00119
00120 /* Simulation PCM format enumeration */
00121 typedef enum {
00122   vpe_SIM_PCM_ALAW = const_COMP_ALAW_8,  // 8-bit ulaw PCM
00123   vpe_SIM_PCM_ULAW = const_COMP_MULAW_8, // 8-bit alaw PCM
00124   vpe_SIM_PCM_LIN  = const_COMP_LINEAR   // Linear PCM
00125 } vpeSimPcm_e;
00126
00127 typedef struct {
00128   tbool fio;                            // TRUE: Get/put samples from/to file
00129   tbool eof;                            // TRUE: End of file reached
00130   FILE  *fptr;                          // File pointer for read/write
00131   char  fname[vpe_SIM_MAX_STRING];      // File name to open/close
00132 } vpeSimFileIo_t;
00133
00134 /* Signal Generator Parameters */
00135 typedef struct {
00136   tbool     state;                  /* TRUE: generator is on.                 */
00137   linSample dcoffset;               /* dc offset (Q0 format)                  */
00138   tint      wftype;                 /* one of sgn_WFT_'s                      */
00139   tint      f1;                     /* the first frequency in Hz              */
00140   tint      f2;                     /* the second frequency in Hz             */
00141   linSample amp1;                   /* amplitude of the first component (Q0)  */
00142   linSample amp2;                   /* amplitude of the second component (Q0) */
00143   tint      nlevel;                 /* idle noise level in dBm0               */
00144   tulong    nseed;                  /* idle noise seed                        */
00145   tint      ntype;                  /* noise type SGN_NT_xxx                  */
00146   tint      pow_level;              /* Hoth or CSS power level in dBm0        */
00147   tulong    hoth_seed;              /* Hoth noise seed                        */
00148
00149 } vpeSGNPars_t;
00150
00151 /* Simulation configuration structure */
00152 typedef struct {
00153   tbool  exec;                        /* TRUE: Provide verbose progress info        */
00154   tbool  hlc_on;                      /* Hlc enable bit                             */
00155   tbool  slm_on;                      /* Slim enable bit                            */
00156   tbool  snl_on;                      /* SNL enable bit                             */
00157   tbool  svd_on;                      /* SVD enable bit                             */
00158   tbool  decim_on;
00159   tbool  interp_on;
00160   tbool  ulaw_enc_on;
00161   tbool  ulaw_dec_on;
00162   tbool  alaw_enc_on;
00163   tbool  alaw_dec_on;
00164   tlong  sample_cnt;                  /* Sample count                               */
00165   tulong sample_bp;                   /* Break (halt) after this sample is reached  */
00166   tbool  sgn;                         /* whether to use sgn, TRUE: use sgn          */
00167   tbool  cfg_sgn;                     /* TRUE: configure SGN                        */
00168   tbool  cfg_hlc;                     /* TRUE: configure HLC                        */
00169   tbool  cfg_slm;                     /* TRUE: configure SLM                        */
00170   tint   slm_mod;                     /* SLM mode, 0: disable, 1~5: enable          */
00171   tint   Fs;                          /* Sampling rate in Hz                        */
00172   hlcControl_t   hlc_ctrl;            /* HLC control structure                      */
00173   vpeSGNPars_t   sgnParam;            /* Parameters used to configure sgn           */
00174   vpeSimFileIo_t sigIn;               /* Signal in file I/O structure               */
00175   vpeSimFileIo_t sigOut;              /* Signal out file I/O structure              */
00176   vpeSimPcm_e    pcmin_format;        /* Input PCM format                           */
00177   vpeSimPcm_e    pcmout_format;       /* Output PCM format                          */
00178   tbool  data;                        /* Flag indicating more samples for simulation*/
00179   tuint  error_id;                    /* Error identifier                           */
00180   tuint  frame_size_in;               /* Simulation frame size, input               */
00181   tuint  frame_size_out;              /* Simulation frame size, output              */
00182   char   baseDir[vpe_SIM_MAX_STRING]; /* Base directory for file I/O                */
00183 } vpeSimConfig_t;
00184
00185 /* Global simulation data */
00186 linSample vpeIOBufs[vpe_SIM_MAX_SAMPLES];
00187 vpeSimConfig_t  vpeSimC;
00188 vpeSimConfig_t *vpeSim = &vpeSimC;
00189 char vpe_sim_global_str[vpe_SIM_MAX_STRING];
00190 char vpe_sim_print_str[vpe_SIM_MAX_STRING];
00191
00192 /* Global PCM data buffers */
00193 linSample sigInBuffer [2*vpe_SIM_MAX_SAMPLES * sizeof(linSample)/sizeof(tword)];
00194 linSample sigOutBuffer[2*vpe_SIM_MAX_SAMPLES * sizeof(linSample)/sizeof(tword)];
00195
00196 /* Delay line and input buffer for source rate converter */
00197 #define VPE_SIM_DECIM_FILT_DEL  (sfc_DEF_FILT_LEN-1)
00198 #define VPE_SIM_DECIM_DELAY_LEN (VPE_SIM_DECIM_FILT_DEL + vpe_SIM_DEF_FRAME_SZ)
00199 linSample decimDelayLine[VPE_SIM_DECIM_DELAY_LEN];
00200
00201 #define VPE_SIM_INTERP_FILT_DEL ((sfc_DEF_FILT_LEN-1)/2)
00202 #define VPE_SIM_INTERP_DELAY_LEN (VPE_SIM_INTERP_FILT_DEL + vpe_SIM_DEF_FRAME_SZ)
00203 linSample interpDelayLine[VPE_SIM_INTERP_DELAY_LEN];
00204
00205 /* debug buffer placed in external memory */
00206 #if _VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00207 #pragma DATA_SECTION (vpeDebugBuf, "VPEExtDbg");
00208 #define VPEDBG_BUF_LENGTH    520000
00209 tlong vpeDebugBuf[VPEDBG_BUF_LENGTH];
00210 tlong dbgCnt = 0;
00211 #endif
00212
00213 /* Local Function Prototypes */
00214 void  vpe_sim_fileio_init   (vpeSimFileIo_t *fioptr, tuint code);
00215 void  vpe_sim_fileio_end    (vpeSimFileIo_t *fioptr);
00216 void  vpe_sim_init          (void);
00217 void  vpe_init              (void);
00218 tbool vpe_sim_fread         (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr);
00219 void  vpe_sim_fwrite        (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr);
00220 void  vpe_sim_input_mux     (void);
00221 void  vpe_sim_output_mux    (void);
00222 void  vpe_print             (char *str);
00223 void  vpe_iprint            (char *str, tlong ivar);
00224 void  vpe_sprint            (char *str, char *svar);
00225 void  vpe_sim_open_sgn      (void *inst);
00226 void vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs);
00227 void  vpe_sim_gen_frame     (void *inst, tint frame_size, linSample *frame);
00228 sgnFileIo_t *vpe_sim_in_file(sgnFileIo_t *dsc);
00229 sgnFileIo_t *vpe_sim_in_file(sgnFileIo_t *dsc);
00230
00231 tint vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e};
00232
00233 /*-----------------------------------------------------------------
00234  * Function:  vpe_banner_print
00235  *
00236  * Description: Utility to provide major progress information.
00237  *-----------------------------------------------------------------*/
00238 static inline void vpe_banner_print (char *str)
00239 {
00240   vpe_print ("\n");
00241   vpe_print ("------------------------------\n");
00242   vpe_print (str);
00243   vpe_print ("------------------------------\n");
00244   vpe_print ("\n");
00245 }
00246
00247 /*-----------------------------------------------------------------
00248  * Function:  vpe_halt
00249  *
00250  * Description: Utility to provide simulation breakpoint.
00251  *-----------------------------------------------------------------*/
00252 void vpe_halt (tbool *exec)
00253 {
00254   /* Wait for further actions - exit when user sets "halt" to FALSE */
00255   while (!(*exec)) {
00256     asm ("  NOP");
00257     asm ("Set_BP_Here:  ");
00258     asm ("  NOP");
00259     asm ("  NOP");
00260   }
00261 }
00262
00263 /* slm instance */
00264 void *slmInst_ptr = NULL;
00265
00266 /* hlc instance */
00267 void *hlcInst_ptr = NULL;
00268 hlcControl_t hctrlInst, *hctrlInst_ptr = &hctrlInst;
00269
00270 /* snl instance */
00271 void *snlInst_ptr = NULL;
00272 /* snl results */
00273 Fract spchLevdB = frct_MAX, noiseLevdB = frct_MAX;
00274 UFract Nthresh = frct_MAX;
00275 /* snl result out file I/O structure */
00276 vpeSimFileIo_t snlLevOut;
00277
00278 /* svd instance */
00279 void *svdInst_ptr = NULL;
00280 /* svd result out file I/O structure */
00281 vpeSimFileIo_t svdOut;
00282
00283 /* sgn instance */
00284 void *sgnInst_ptr = NULL;
00285
00286 /*-----------------------------------------------------------------
00287  * Filename:  main
00288  *
00289  * Description: Test the vpe API functions.
00290  *-----------------------------------------------------------------*/
00291 void main (void)
00292 {
00293   linSample *buf_Inptr = (linSample *)sigInBuffer;
00294   linSample *buf_Outptr = (linSample *)sigOutBuffer;
00295   LFract svd_sig_pow;
00296
00297   tulong sample_total;
00298   tbool sigIn_data;
00299   tuint second_count;
00300   tuint sample_count, num_tuint_in, num_tuint_out;
00301   tint  i, retVal, vad_flag;
00302
00303   /* Initialize for simulation */
00304   vpe_sim_init ();
00305
00306   /* Opportunity to uniquely configure simulation */
00307   vpe_halt (&vpeSim->exec);
00308
00309   /* Progress (verbose only) */
00310   vpe_banner_print ("Simulation:  BEGIN\n");
00311
00312   vpe_init();
00313
00314   /* Main (file) simulation loop */
00315   while (vpeSim->exec) {
00316     /* Simulation pass initialization */
00317     vpeSim->data = TRUE;
00318     if (!vpeSim->sgn){
00319       /* Load I/O files */
00320       vpe_sim_fileio_init (&vpeSim->sigIn,  vpe_SIM_FILEIO_READ);
00321       vpe_sim_fileio_init (&vpeSim->sigOut, vpe_SIM_FILEIO_WRITE);
00322     }
00323   if(vpeSim->snl_on){
00324       /* Load I/O files */
00325       vpe_sim_fileio_init (&snlLevOut, vpe_SIM_FILEIO_WRITE);
00326   }
00327     if(vpeSim->svd_on){
00328       /* Load I/O files */
00329       vpe_sim_fileio_init (&svdOut, vpe_SIM_FILEIO_WRITE);
00330     }
00331
00332     /* Single test/example simulation loop */
00333     second_count = 0;
00334     sample_count = 0;
00335     while (vpeSim->data) {
00336 #ifdef VPE_FLUSH_CACHE
00337     /* flush cache */
00338   memarchcfg_cacheFlush();
00339 #endif
00340       /* if use sgn */
00341       if (vpeSim->sgn){
00342         /* configure sgn */
00343         if (vpeSim->cfg_sgn) {
00344           vpeSim->cfg_sgn = FALSE;
00345           vpe_sim_set_sgn (sgnInst_ptr, &vpeSim->sgnParam, vpeSim->Fs);
00346         }
00347         vpe_sim_gen_frame (sgnInst_ptr, vpeSim->frame_size_in, buf_Inptr);
00348       }
00349       else{
00350         /* Read input data from file */
00351     num_tuint_in = vpeSim->frame_size_in;
00352     if(vpeSim->ulaw_dec_on || vpeSim->alaw_dec_on) {
00353       num_tuint_in /= 2; /* mu-law or A-law input is byte */
00354     }
00355         sigIn_data = vpe_sim_fread (vpeIOBufs, num_tuint_in, &vpeSim->sigIn);
00356         vpeSim->data = sigIn_data;
00357
00358     /* change little endian to big endian */
00359     if(vpeSim->ulaw_dec_on || vpeSim->alaw_dec_on) {
00360       for (i=0; i<num_tuint_in; i++) {
00361         vpeIOBufs[i] = ((vpeIOBufs[i]>>8)&0x0ff) | ((vpeIOBufs[i]&0x0ff)<<8);
00362       }
00363     }
00364       }
00365
00366       if (vpeSim->ulaw_dec_on) {
00367         pcmUlawDecoderP((tuint *)vpeIOBufs, buf_Inptr, vpeSim->frame_size_out);
00368       }
00369       else if (vpeSim->alaw_dec_on) {
00370         pcmAlawDecoderP((tuint *)vpeIOBufs, buf_Inptr, vpeSim->frame_size_out);
00371       }
00372     else {
00373         for (i=0;i<vpeSim->frame_size_in;i++){
00374           buf_Inptr[i] = vpeIOBufs[i];
00375         }
00376     }
00377
00378       if(vpeSim->decim_on) {
00379         /* form the input buffer - holding delay line and input data */
00380         for (i=0;i<vpeSim->frame_size_in;i++){
00381           decimDelayLine[VPE_SIM_DECIM_FILT_DEL+i] = buf_Inptr[i];
00382         }
00383
00384         /* decimate by 2 */
00385         sfcDecimationBy2(decimDelayLine, buf_Inptr, NULL,
00386                          sfc_DEF_FILT_LEN, vpeSim->frame_size_in);
00387
00388         /* shift samples in the delay line */
00389         for (i=0;i<VPE_SIM_DECIM_FILT_DEL;i++){
00390           decimDelayLine[i] = decimDelayLine[vpeSim->frame_size_in+i];
00391         }
00392       }
00393
00394       if(vpeSim->interp_on) {
00395         /* form the input buffer - holding delay line and input data */
00396         for (i=0;i<vpeSim->frame_size_in;i++){
00397           interpDelayLine[VPE_SIM_INTERP_FILT_DEL+i] = buf_Inptr[i];
00398         }
00399
00400         /* interpolate by 2 */
00401         sfcInterpolationBy2(interpDelayLine, buf_Inptr, NULL,
00402                             sfc_DEF_FILT_LEN, vpeSim->frame_size_in);
00403
00404         /* shift samples in the delay line */
00405         for (i=0;i<VPE_SIM_INTERP_FILT_DEL;i++){
00406           interpDelayLine[i] = interpDelayLine[vpeSim->frame_size_in+i];
00407         }
00408       }
00409
00410       /* copy to intermediate storage buffer */
00411       for (i=0;i<vpeSim->frame_size_out;i++){
00412         vpeIOBufs[i] = buf_Inptr[i];
00413       }
00414
00415       /* Run snl if enabled */
00416       if (vpeSim->snl_on ){
00417         /* calculate snl */
00418         retVal = snlProcess (snlInst_ptr, buf_Inptr, vpeSim->frame_size_out);
00419         retVal = snlGetLevels (snlInst_ptr, &spchLevdB, &noiseLevdB, &Nthresh);
00420
00421     /* write SNL results to a file */
00422         vpe_sim_fwrite (&spchLevdB, 1, &snlLevOut);
00423         vpe_sim_fwrite (&noiseLevdB, 1, &snlLevOut);
00424         vpe_sim_fwrite ((Fract *)&Nthresh, 1, &snlLevOut);
00425       }
00426
00427       /* Run svd if enabled */
00428       if (vpeSim->svd_on ){
00429         /* run svd and get decisions */
00430         retVal = svdProcess (svdInst_ptr, buf_Inptr, vpeSim->frame_size_out);
00431         vad_flag = svdGetDecision (svdInst_ptr, &svd_sig_pow);
00432         retVal = svdGetLevels (svdInst_ptr, &spchLevdB, &noiseLevdB, &Nthresh);
00433
00434         /* write SVD results to a file */
00435         vpe_sim_fwrite (&vad_flag, 1, &svdOut);
00436         vpe_sim_fwrite (&spchLevdB, 1, &svdOut);
00437         vpe_sim_fwrite (&noiseLevdB, 1, &svdOut);
00438         vpe_sim_fwrite ((linSample *)&Nthresh, 1, &svdOut);
00439         vpe_sim_fwrite ((linSample *)&svd_sig_pow, 2, &svdOut);
00440       }
00441
00442       /* Run hlc if enabled */
00443       if (vpeSim->hlc_on){
00444         if (vpeSim->cfg_hlc) {
00445           vpeSim->cfg_hlc = FALSE;
00446           retVal = hlcControl(hlcInst_ptr, &vpeSim->hlc_ctrl);
00447           if (retVal != hlc_NOERR){
00448             vpeSim->error_id = vpe_SIM_ERR_5;
00449             vpeSim->exec = FALSE;
00450             vpe_halt (&vpeSim->exec);
00451           }
00452         }
00453         retVal = hlcProcess(hlcInst_ptr, vpeIOBufs);
00454         if (retVal != hlc_NOERR){
00455           vpeSim->error_id = vpe_SIM_ERR_1;
00456           vpeSim->exec = FALSE;
00457           vpe_halt (&vpeSim->exec);
00458         }
00459       }
00460
00461       /* copy to output buffer */
00462       for (i=0;i<vpeSim->frame_size_out;i++){
00463         buf_Outptr[i] = vpeIOBufs[i];
00464       }
00465       /* Run slm if enabled */
00466       if(vpeSim->slm_on){
00467         if(vpeSim->cfg_slm){
00468           vpeSim->cfg_slm = FALSE;
00469           retVal = slmControl(slmInst_ptr, vpeSim->slm_mod);
00470           if (retVal != slm_NOERR){
00471             vpeSim->error_id = vpe_SIM_ERR_8;
00472             vpeSim->exec = FALSE;
00473             vpe_halt (&vpeSim->exec);
00474           }
00475         }
00476         retVal = slmProcess (slmInst_ptr, buf_Outptr, vpeSim->frame_size_out);
00477         if (retVal != slm_NOERR){
00478           vpeSim->error_id = vpe_SIM_ERR_2;
00479           vpeSim->exec = FALSE;
00480           vpe_halt (&vpeSim->exec);
00481         }
00482       }
00483
00484       if (vpeSim->ulaw_enc_on) {
00485         pcmUlawEncoderP(buf_Outptr, (tuint *)vpeIOBufs, vpeSim->frame_size_out);
00486       }
00487       else if (vpeSim->alaw_enc_on) {
00488         pcmAlawEncoderP(buf_Outptr, (tuint *)vpeIOBufs, vpeSim->frame_size_out);
00489       }
00490
00491       /* copy to storage buffer if not using sgn */
00492       if (!vpeSim->sgn){
00493       num_tuint_out = vpeSim->frame_size_out;
00494     if(vpeSim->ulaw_enc_on || vpeSim->alaw_enc_on) {
00495           num_tuint_out /= 2;
00496
00497           /* change big endian to little endian */
00498         for (i=0; i<num_tuint_out; i++) {
00499         buf_Outptr[i] = ((vpeIOBufs[i]>>8)&0x0ff) | ((vpeIOBufs[i]&0x0ff)<<8);
00500       }
00501     }
00502         /* copy to a output buffer */
00503         for (i=0;i<num_tuint_out;i++){
00504           vpeIOBufs[i] = buf_Outptr[i];
00505         }
00506         /* write to a file */
00507         vpe_sim_fwrite (sigOutBuffer, num_tuint_out, &vpeSim->sigOut);
00508       }// end of if (vpeSim->sgn)
00509
00510       /* Update sample count and notify time progress */
00511       sample_count += vpeSim->frame_size_in;
00512       if (sample_count >= vpe_SIM_SAMPLES_PER_SECOND) {
00513         sample_count -= vpe_SIM_SAMPLES_PER_SECOND;
00514         second_count++;
00515         printf (" - Progress: %d seconds\n", second_count);
00516       }
00517
00518       /* Check for simulation halt */
00519       sample_total = (tulong) second_count * vpe_SIM_SAMPLES_PER_SECOND + sample_count;
00520       if ((vpeSim->sample_bp != 0)            &&
00521           (sample_total >= vpeSim->sample_bp) &&
00522           (sample_total  - vpeSim->sample_bp) < vpeSim->frame_size_in) {
00523         vpe_iprint (" - Halting after %d samples\n", sample_total);
00524         vpeSim->exec = FALSE;
00525         vpe_halt (&vpeSim->exec);
00526       }
00527       vpeSim->sample_cnt = sample_total;
00528     } /* vpeSim->data */
00529
00530     vpeSim->exec = FALSE;
00531     if (!vpeSim->sgn) {
00532       /* Close input files if using file I/O */
00533       vpe_sim_fileio_end (&vpeSim->sigIn);
00534       /* Check for output file close */
00535       vpe_sim_fileio_end (&vpeSim->sigOut);
00536     }
00537     if(vpeSim->snl_on) {
00538       /* Check for output file close */
00539       vpe_sim_fileio_end (&snlLevOut);
00540     }
00541
00542     if(vpeSim->svd_on) {
00543       /* Check for output file close */
00544       vpe_sim_fileio_end (&svdOut);
00545     }
00546
00547     /* Progress (verbose only) */
00548     vpe_banner_print ("Simulation:  END\n");
00549     /* End of current simulation test/example */
00550 //    vpe_halt (&vpeSim->exec);
00551   } /* vpeSim->exec */
00552
00553   /* End of simulation */
00554   printf("Simulation done.\n");
00555 }
00556
00557
00558
00559
00560 /*-----------------------------------------------------------------
00561  * Function:  vpe_print
00562  *
00563  * Description: Utility to provide static progress information.
00564  *-----------------------------------------------------------------*/
00565 void vpe_print (char *str)
00566 {
00567   if (vpeSim->exec) {
00568     printf (str);
00569   }
00570 }
00571
00572
00573 /*-----------------------------------------------------------------
00574  * Function:  vpe_iprint
00575  *
00576  * Description: Utility to provide integer progress information.
00577  *-----------------------------------------------------------------*/
00578 void vpe_iprint (char *str, tlong ivar)
00579 {
00580   sprintf   (vpe_sim_print_str, str, ivar);
00581   vpe_print (vpe_sim_print_str);
00582 }
00583
00584
00585 /*-----------------------------------------------------------------
00586  * Function:  vpe_sprint
00587  *
00588  * Description: Utility to provide string progress information.
00589  *-----------------------------------------------------------------*/
00590 void vpe_sprint (char *str, char *svar)
00591 {
00592   sprintf   (vpe_sim_print_str, str, svar);
00593   vpe_print (vpe_sim_print_str);
00594 }
00595
00596 /*-----------------------------------------------------------------
00597  * Function:  vpe_sim_fileio_init
00598  *
00599  * Description: Initialize simulation for file I/O
00600  *-----------------------------------------------------------------*/
00601 void vpe_sim_fileio_init (vpeSimFileIo_t *fioptr, tuint code)
00602 {
00603   if (fioptr->fio) {
00604     /* Create file path string */
00605     strcpy (vpe_sim_global_str, vpeSim->baseDir);
00606     strcat (vpe_sim_global_str, fioptr->fname);
00607
00608     /* Ensure that file pointer is NULL (closed) */
00609     if (fioptr->fptr != NULL) {
00610       vpe_sprint (" - File already open: %s\n", vpe_sim_global_str);
00611       return;
00612     }
00613
00614     /* Open file (read/write binary) and assign file pointer */
00615     if (code == vpe_SIM_FILEIO_READ) {
00616       fioptr->fptr = fopen (vpe_sim_global_str, "rb");
00617     }
00618     else if (code == vpe_SIM_FILEIO_WRITE) {
00619       fioptr->fptr = fopen (vpe_sim_global_str, "wb");
00620     }
00621     else {
00622       vpe_iprint ("Error: unrecognized file action %d \n", code);
00623       return;
00624     }
00625
00626     /* Ensure open success */
00627     if (fioptr->fptr == NULL) {
00628       vpe_sprint ("Unable to open file: %s\n", vpe_sim_global_str);
00629       fioptr->fio = FALSE;
00630     }
00631     else {
00632       vpe_sprint (" - Opened file: %s\n", vpe_sim_global_str);
00633       fioptr->eof = FALSE;
00634     }
00635   }
00636 }
00637
00638
00639 /*-----------------------------------------------------------------
00640  * Function:  vpe_sim_fileio_end
00641  *
00642  * Description: Clear simulation after file I/O
00643  *-----------------------------------------------------------------*/
00644 void vpe_sim_fileio_end (vpeSimFileIo_t *fioptr)
00645 {
00646   if (fioptr->fio) {
00647     /* Close file pointer */
00648     if (fioptr->fptr == NULL) {
00649       vpe_print ("Warning: premature file close\n");
00650     }
00651     else {
00652       if (fioptr->eof) {
00653         fclose (fioptr->fptr);
00654         fioptr->fptr = (FILE *) NULL;
00655         /* Print progress */
00656         strcpy (vpe_sim_global_str, vpeSim->baseDir);
00657         strcat (vpe_sim_global_str, fioptr->fname);
00658         vpe_sprint (" - Closed file: %s\n", vpe_sim_global_str);
00659       }
00660     }
00661   }
00662 }
00663
00664
00665
00666 /*-----------------------------------------------------------------
00667  * Function:  vpe_sim_fread
00668  *
00669  * Description: Perform file input
00670  *-----------------------------------------------------------------*/
00671 #define VPESIM_NUM_BYTES_LINSAMP 2
00672 tword vpe_temp_io_buf[vpe_SIM_MAX_SAMPLES*VPESIM_NUM_BYTES_LINSAMP];
00673
00674 tbool vpe_sim_fread (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
00675 {
00676   tuint num_read;
00677   tint  i, j;
00678
00679   if(fioptr->fptr == NULL){
00680     return FALSE;
00681   }
00682
00683   /* read the file*/
00684   num_read = fread(vpe_temp_io_buf, VPESIM_NUM_BYTES_LINSAMP, buf_size, fioptr->fptr);
00685
00686   /* check for endo of file */
00687   if (num_read != (buf_size)) {
00688       fioptr->eof = TRUE;
00689       return FALSE;
00690   }
00691
00692   /* pack bytes into words */
00693   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00694   {
00695     buf[i]  = vpe_temp_io_buf[j] | (vpe_temp_io_buf[j+1] << 8);
00696   }
00697
00698   return TRUE;
00699 }
00700
00701 /*-----------------------------------------------------------------
00702  * Function:  vpe_sim_fwrite
00703  *
00704  * Description: Perform file output
00705  *-----------------------------------------------------------------*/
00706 void vpe_sim_fwrite (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
00707 {
00708   tuint i, j;
00709
00710   if(fioptr->fptr == NULL){
00711     return;
00712   }
00713
00714   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00715   {
00716     vpe_temp_io_buf[j]   = (buf[i]     ) & 0x00ff;
00717     vpe_temp_io_buf[j+1] = (buf[i] >> 8) & 0x00ff;
00718   }
00719
00720   fwrite(vpe_temp_io_buf, VPESIM_NUM_BYTES_LINSAMP, buf_size, fioptr->fptr);
00721
00722 }
00723
00724 /*-----------------------------------------------------------------
00725  * Function:  vpe_sim_init
00726  *
00727  * Description: vpe simulation initialization.
00728  *-----------------------------------------------------------------*/
00729 void vpe_sim_init (void)
00730 {
00731   /* Simulation structure initialization */
00732   vpeSim->exec          = TRUE;
00733   vpeSim->hlc_on        = TRUE;
00734   vpeSim->slm_on        = TRUE;
00735   vpeSim->snl_on        = TRUE;
00736   vpeSim->svd_on        = TRUE;
00737 #if vpe_DECIM_FLAG
00738   vpeSim->decim_on      = TRUE;
00739   vpeSim->interp_on     = FALSE;
00740 #else
00741   vpeSim->decim_on      = FALSE;
00742   vpeSim->interp_on     = TRUE;
00743 #endif
00744   vpeSim->ulaw_enc_on   = TRUE;
00745   vpeSim->ulaw_dec_on   = FALSE;
00746   vpeSim->alaw_enc_on   = FALSE;
00747   vpeSim->alaw_dec_on   = FALSE;
00748
00749   vpeSim->sample_cnt    = 0;
00750   vpeSim->error_id      = 0;
00751   vpeSim->sample_bp     = 0L;
00752   vpeSim->pcmin_format  = vpe_SIM_PCM_LIN;
00753   vpeSim->pcmout_format = vpe_SIM_PCM_LIN;
00754   vpeSim->frame_size_in = vpe_SIM_DEF_FRAME_SZ;
00755   vpeSim->frame_size_out = vpe_SIM_DEF_FRAME_SZ;
00756   if(vpeSim->decim_on) {
00757     vpeSim->frame_size_out = vpe_SIM_DEF_FRAME_SZ/2;
00758   }
00759   if(vpeSim->interp_on) {
00760     vpeSim->frame_size_out = vpe_SIM_DEF_FRAME_SZ * 2;
00761   }
00762
00763   vpeSim->sgn           = FALSE;
00764   vpeSim->cfg_sgn       = FALSE;
00765   vpeSim->cfg_hlc       = FALSE;
00766   vpeSim->cfg_slm       = TRUE;
00767   vpeSim->slm_mod       = slm_MODE5;
00768   vpeSim->Fs            = vpe_SIM_SAMPLES_PER_SECOND;
00769
00770   /* Simulation file I/O initialization */
00771   vpeSim->sigIn.fio   = TRUE;
00772   vpeSim->sigOut.fio  = TRUE;
00773   vpeSim->sigIn.fptr  = (FILE *) NULL;
00774   vpeSim->sigOut.fptr  = (FILE *) NULL;
00775   strcpy (vpeSim->baseDir   , vpe_SIM_DEF_BASE_DIR);
00776   strcpy (vpeSim->sigIn.fname , vpe_SIM_DEF_SIGIN_FNAME);
00777   strcpy (vpeSim->sigOut.fname , vpe_SIM_DEF_SIGOUT_FNAME);
00778 }
00779 void vpe_init (void)
00780 {
00781   hlcConfig_t hlc_cfg_info;
00782   slmConfig_t slm_cfg_info;
00783   tint hlcSize, slmSize, snlSize, svdSize, sgnSize;
00784   tint srate_factor;
00785
00786   tint retVal;
00787
00788   if (vpeSim->decim_on) {
00789     memset(decimDelayLine, 0, sizeof(linSample)*VPE_SIM_DECIM_FILT_DEL);
00790   }
00791
00792   if (vpeSim->interp_on) {
00793     memset(interpDelayLine, 0, sizeof(linSample)*VPE_SIM_INTERP_FILT_DEL);
00794   }
00795
00796   if (vpeSim->hlc_on){
00797     /* allocate memory for HLC */
00798     retVal = hlcGetSizes(&hlcSize);
00799     if (retVal != hlc_NOERR){
00800       vpeSim->error_id = vpe_SIM_ERR_3;
00801       vpeSim->exec = FALSE;
00802       vpe_halt (&vpeSim->exec);
00803     }
00804
00805     hlcInst_ptr = malloc (hlcSize);
00806     /* init hlc */
00807     hlc_cfg_info.valid_bf = 0x00;
00808
00809     /* configure sampling rate */
00810     hlc_cfg_info.valid_bf |= 0x10;
00811
00812     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00813       hlc_cfg_info.srate_factor = hlc_SRATE_FACTOR_8K;  /* 8kHz sampling rate */
00814     }
00815     else {
00816       hlc_cfg_info.srate_factor = hlc_SRATE_FACTOR_16K; /* 16kHz sampling rate */
00817     }
00818
00819     /* configure frm_len */
00820     if (vpeSim->frame_size_out <= vpe_SIM_MAX_SAMPLES){
00821       hlc_cfg_info.valid_bf |= 0x08; /* configure frame length */
00822       hlc_cfg_info.frm_len = vpeSim->frame_size_out;
00823     }
00824     else{
00825       vpeSim->error_id = vpe_SIM_ERR_4;
00826       vpeSim->exec = FALSE;
00827       vpe_halt (&vpeSim->exec);
00828     }
00829 #if 0
00830    /*------------------------------------------
00831      the following is for testing purpose only
00832     -------------------------------------------*/
00833     /* configure TC */
00834     hlc_cfg_info.valid_bf |= 0x04;
00835     hlc_cfg_info.power_tc = 2;
00836
00837     /* configure ramp_out */
00838     hlc_cfg_info.valid_bf |= 0x02;
00839     hlc_cfg_info.ramp_out_period = 400;
00840
00841     /* configure thresh */
00842     hlc_cfg_info.valid_bf |= 0x01;
00843     hlc_cfg_info.thresh = -20;
00844
00845     /*------ end of testing hlc cfg ---------- */
00846 #endif
00847
00848     retVal = hlcInit(hlcInst_ptr, &hlc_cfg_info);
00849     if (retVal != hlc_NOERR){
00850       vpeSim->error_id = vpe_SIM_ERR_4;
00851       vpeSim->exec = FALSE;
00852       vpe_halt (&vpeSim->exec);
00853     }
00854     /* Enable HLC */
00855     hctrlInst_ptr->ctl_code = hlc_CTL_ENA;
00856     retVal = hlcControl(hlcInst_ptr, hctrlInst_ptr);
00857     if (retVal != hlc_NOERR){
00858       vpeSim->error_id = vpe_SIM_ERR_6;
00859       vpeSim->exec = FALSE;
00860       vpe_halt (&vpeSim->exec);
00861     }
00862   } /* if testing HLC */
00863
00864   /* testing SLM */
00865   if (vpeSim->slm_on){
00866     /* allocate memory for SLM */
00867     retVal = slmGetSizes(&slmSize);
00868     if (retVal != slm_NOERR){
00869       vpeSim->error_id = vpe_SIM_ERR_9;
00870       vpeSim->exec = FALSE;
00871       vpe_halt (&vpeSim->exec);
00872     }
00873     slmInst_ptr = malloc (slmSize);
00874
00875     /* init SLM, SLM is disabled */
00876     slm_cfg_info.valid_bf  = 0x00;
00877     /* configure sampling rate */
00878     slm_cfg_info.valid_bf |= 0x01;
00879     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00880       slm_cfg_info.srate_factor = slm_SRATE_FACTOR_8K;
00881     }
00882     else {
00883       slm_cfg_info.srate_factor = slm_SRATE_FACTOR_16K;
00884     }
00885
00886     retVal = slmInit (slmInst_ptr, &slm_cfg_info);
00887     if (retVal != slm_NOERR){
00888       vpeSim->error_id = vpe_SIM_ERR_7;
00889       vpeSim->exec = FALSE;
00890       vpe_halt (&vpeSim->exec);
00891     }
00892   } /* if testing SLM */
00893
00894   /* testing SNL*/
00895   if (vpeSim->snl_on){
00896     retVal = snlGetSizes(&snlSize);
00897     if (retVal != snl_NOERR){
00898       vpeSim->error_id = vpe_SIM_ERR_10;
00899       vpeSim->exec = FALSE;
00900       vpe_halt (&vpeSim->exec);
00901     }
00902     snlInst_ptr = malloc (snlSize);
00903     /* initialize SNL */
00904     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00905       srate_factor = snl_SRATE_FACTOR_8K;
00906     }
00907     else {
00908       srate_factor = snl_SRATE_FACTOR_16K;
00909     }
00910
00911     retVal = snlInit (snlInst_ptr, srate_factor);
00912     if (retVal != snl_NOERR){
00913       vpeSim->error_id = vpe_SIM_ERR_11;
00914       vpeSim->exec = FALSE;
00915       vpe_halt (&vpeSim->exec);
00916     }
00917   strcpy (snlLevOut.fname, "snlLevOut.pcm");
00918   snlLevOut.fio   = TRUE;
00919     snlLevOut.fptr  = (FILE *) NULL;
00920   } /* end of testing SNL */
00921
00922   /* testing SVD*/
00923   if (vpeSim->svd_on){
00924     retVal = svdGetSizes(&svdSize);
00925     if (retVal != svd_NOERR){
00926       vpeSim->error_id = vpe_SIM_ERR_17;
00927       vpeSim->exec = FALSE;
00928       vpe_halt (&vpeSim->exec);
00929     }
00930     svdInst_ptr = malloc (svdSize);
00931     /* initialize SVD */
00932     if (vpeSim->Fs == vpe_SIM_SAMPLE_FREQ_8000) {
00933       srate_factor = svd_SRATE_8K;
00934     }
00935     else {
00936       srate_factor = svd_SRATE_16K;
00937     }
00938
00939     retVal = svdInit (svdInst_ptr, srate_factor);
00940     if (retVal != svd_NOERR){
00941       vpeSim->error_id = vpe_SIM_ERR_18;
00942       vpeSim->exec = FALSE;
00943       vpe_halt (&vpeSim->exec);
00944     }
00945
00946   strcpy (svdOut.fname, "svdOut.pcm");
00947   svdOut.fio   = TRUE;
00948     svdOut.fptr  = (FILE *) NULL;
00949   } /* end of testing SVD */
00950
00951   /* init sgn */
00952   vpeSim->sgnParam.state     = 1;
00953   vpeSim->sgnParam.dcoffset  = vpe_SGN_DEF_DC_OFFSET;
00954   vpeSim->sgnParam.wftype    = vpe_SGN_DEF_WF_TYPE;
00955   vpeSim->sgnParam.f1        = vpe_SGN_DEF_F1;
00956   vpeSim->sgnParam.f2        = vpe_SGN_DEF_F2;
00957   vpeSim->sgnParam.amp1      = vpe_SGN_DEF_T_AMP1;
00958   vpeSim->sgnParam.amp2      = vpe_SGN_DEF_T_AMP2;
00959   vpeSim->sgnParam.nlevel    = vpe_SGN_DEF_NOISE_LEVEL;
00960   vpeSim->sgnParam.nseed     = vpe_SGN_DEF_NOISE_SEED;
00961   vpeSim->sgnParam.ntype     = vpe_SGN_DEF_NOISE_TYPE;
00962   vpeSim->sgnParam.pow_level = vpe_SGN_DEF_POWER_LEVEL;
00963   vpeSim->sgnParam.hoth_seed = vpe_SGN_DEF_HOTH_WNG_SEED;
00964
00965   retVal = sgnGetSizes (&sgnSize);
00966   sgnInst_ptr = malloc (sgnSize);
00967   vpe_sim_open_sgn (sgnInst_ptr);
00968
00969   /* Init cache, L1D, L1P as cache, L2 32kB cache */
00970
00971 #if _VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00972   cacheConfig.L2sizeCfg = L2_SIZE_32KB;
00973 #endif
00974 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00975   memarchcfg_cacheEnable();
00976 #endif
00977 } /* vpe_init */
00978 #if 1
00979 /*-----------------------------------------------------------------
00980  * Function:  vpe_sim_open_sgn
00981  *
00982  * Description: vpe simulation open signal generator
00983  *-----------------------------------------------------------------*/
00984
00985 void vpe_sim_open_sgn (void *inst)
00986 {
00987   sgnConfig_t cfg;
00988
00989   cfg.dc_offset     = vpe_SGN_DEF_DC_OFFSET;
00990   cfg.wf_type       = vpe_SGN_DEF_WF_TYPE;
00991   cfg.f1            = vpe_SGN_DEF_F1;
00992   cfg.f2            = vpe_SGN_DEF_F2;
00993   cfg.Fs            = vpeSim->Fs;
00994   cfg.t_amp1        = vpe_SGN_DEF_T_AMP1;
00995   cfg.t_amp2        = vpe_SGN_DEF_T_AMP2;
00996   cfg.pr_period     = vpe_SGN_DEF_PR_PERIOD;     /* # of samples between phase reversals */
00997   cfg.pr_enable     = vpe_SGN_DEF_PR_ENABLE;     /* disable phase reversal */
00998   cfg.noise_level   = vpe_SGN_DEF_NOISE_LEVEL;
00999   cfg.noise_seed    = vpe_SGN_DEF_NOISE_SEED;
01000   cfg.noise_type    = vpe_SGN_DEF_NOISE_TYPE;
01001   cfg.fsk_duration  = vpe_SGN_DEF_FSK_DURATION;  /* 90/300 = 300ms */
01002   cfg.fsk_dataptr   = &vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN];
01003   cfg.fsk_numword   = vpe_SGN_DEF_FSK_DATA_LEN;
01004   cfg.power_level   = vpe_SGN_DEF_POWER_LEVEL;
01005   cfg.hoth_wng_seed = vpe_SGN_DEF_HOTH_WNG_SEED;
01006   cfg.file_io_fcn   = vpe_sim_in_file;
01007
01008   sgnInit (inst, &cfg);
01009 } /* vpe_sim_open_sgn */
01010
01011 /*-----------------------------------------------------------------
01012  * Function:  vpe_sim_open_sgn
01013  *
01014  * Description: vpe simulation open signal generator
01015  *-----------------------------------------------------------------*/
01016
01017 void vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs)
01018 {
01019   sgnControl_t  ctl;
01020
01021   if (sgn->state) {
01022     ctl.Fs        = Fs;
01023     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
01024       ctl.code          = sgn_CTL_CSS_POW;
01025       ctl.u.power_level = sgn->pow_level;
01026     }
01027     else if (sgn->wftype == sgn_WFT_HOTH) {
01028       ctl.code          = sgn_CTL_HOTH_POW;
01029       ctl.u.power_level = sgn->pow_level;
01030     }
01031     else {
01032       ctl.code      = sgn_CTL_TONE;
01033       ctl.u.t.f1    = sgn->f1;
01034       ctl.u.t.f2    = sgn->f2;
01035       ctl.u.t.amp1  = sgn->amp1;
01036       ctl.u.t.amp2  = sgn->amp2;
01037     }
01038     sgnControl (inst, &ctl);
01039
01040     ctl.code           = sgn_CTL_NOISE;
01041     ctl.u.noise_level  = sgn->nlevel;
01042   }
01043   else {
01044     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
01045       ctl.code          = sgn_CTL_CSS_POW;
01046       ctl.u.power_level = -80;
01047     }
01048     else if (sgn->wftype == sgn_WFT_HOTH) {
01049       ctl.code          = sgn_CTL_HOTH_POW;
01050       ctl.u.power_level = -80;
01051     }
01052     else {
01053       ctl.code     = sgn_CTL_TONE;
01054       ctl.u.t.f1   = sgn->f1;
01055       ctl.u.t.f2   = sgn->f2;
01056       ctl.u.t.amp1 = 0;
01057       ctl.u.t.amp2 = 0;
01058     }
01059     sgnControl (inst, &ctl);
01060
01061     ctl.code           = sgn_CTL_NOISE;
01062     ctl.u.noise_level  = -80;
01063   }
01064   sgnControl (inst, &ctl);
01065 } /* set_sgn */
01066
01067
01068 /******************************************************************************
01069  * FUNCTION PURPOSE: Generate a signal frame
01070  ******************************************************************************
01071  * DESCRIPTION: Generate a frame
01072  *
01073  *****************************************************************************/
01074 void vpe_sim_gen_frame (void *inst, tint frame_size, linSample *frame)
01075 {
01076   /* Generate one frame of samples */
01077   sgnGenerateFrame (inst, frame_size, frame);
01078
01079 } /* vpe_sim_gen_frame */
01080
01081 /* used to set probe point for the Tx/Rx input signal(s) */
01082 linSample *inFrame, *outFrame;
01083 tint      inCnt, outCnt;
01084
01085 sgnFileIo_t *vpe_sim_in_file (sgnFileIo_t *dsc)
01086 {
01087   inFrame = dsc->frame;
01088   inCnt   = dsc->cnt;
01089   asm (" nop");
01090   asm (" nop");
01091   asm (" nop");
01092   return (dsc);
01093 } /* vpe_sim_in_file */
01094
01095 sgnFileIo_t *vpe_sim_out_file (sgnFileIo_t *dsc)
01096 {
01097   outFrame = dsc->frame;
01098   outCnt   = dsc->cnt;
01099   asm (" nop");
01100   asm (" nop");
01101   asm (" nop");
01102   return (dsc);
01103 } /* vpe_sim_out_file */
01104
01105 #endif
01106
01107 /* 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 | _VPESIM_C66 0
#define | _VPESIM_C66_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.

#define _VPESIM_C66 0

Definition at line 60 of file vpesim.h.

#define _VPESIM_C66_BIG_ENDIAN 0

Definition at line 66 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 #ifdef ti_targets_C66
00058 #define _VPESIM_C66 1
00059 #else
00060 #define _VPESIM_C66 0
00061 #endif
00062
00063 #ifdef ti_targets_C66_big_endian
00064 #define _VPESIM_C66_BIG_ENDIAN 1
00065 #else
00066 #define _VPESIM_C66_BIG_ENDIAN 0
00067 #endif
00068
00069 #endif /* _VPESIM_H */
00070
00071 /* Nothing past this point */