VOLIB: VOLIB User's Manual (c66x)

  • Main Page
  • Files
  • Related Pages

VOLIB User's Manual (c66x)

Release 2.1.0.1

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 2013, 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_1_0_1\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_1_0_1\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_1_0_1\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_1_0_1\packages\ti\mas\ directory such that they will load and build with CCS version 4.2


CID 2.2.1.0 Release Notes

July 1, 2013

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

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:

  • SDOCM00102050 Fix
  • Added C55x CPU Rev 3.3 support

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 ( 2.x & 3.x)
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Versions 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2

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.1.0 Release Notes

June 28, 2013

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 C55x CPU Rev 3.3 support

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 7

back to top

Device Support

This release supports the following device families:

  • C55 ( 2.x & 3.x)
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Versions 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2

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.1.0 Release Notes

June 28, 2013

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 C55x CPU Rev 3 support

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 7
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)
  • ti.mas.iface.ifnmu 1.2.4 (NMU Interface definitions)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Versions 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2
  • 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.1.0 Release Notes

June 28, 2013

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 C55x CPU Rev 3 support

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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)
  • ti.mas.iface.ifplc 1.1.3 (PLC Interface definitions)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Versions 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2
  • 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.1.0

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.1.0 | TI TSPA | Object | N/A | Location | ~/ti/mas/veu
 |  |  |  |  | Obtained from | TI

Credits

Licenses

Copyright (C) 2013 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.1.0 Release Notes

June 28, 2013

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 C55x CPU Rev 3.3 support
  • SDOCM100611 Fix ( VoLIB 2.1.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 7

back to top

Device Support

This release supports the following device families:

  • C55 ( 2.x & 3.x)
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Version 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2
  • XDAIS version 5.21

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.1.0 Release Notes

June 28, 2013

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:

  • Added C55x CPU Rev 3.3 support

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 7

back to top

Device Support

This release supports the following device families:

  • C55 ( 2.x & 3.x)
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.tdu 2.4.1 (Tone Detection)
  • ti.mas.vpe 3.6.0 (PCM Companding)
  • CCS Version 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2

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.1.0 Release Notes

June 28, 2013

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 C55x CPU Rev 3 Support

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 7

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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)
  • ti.mas.iface.ifvau 1.1.3 (VAU Interface definitions)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Versions 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • XDAIS version 5.21
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2
  • 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.1.0 Release Notes

June 28, 2013

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 C55x v3.3 targets
  • Fixed C55x ANR issue (IR #98494, VoLIB 2.1.0)
  • Fixed unit test API calls (IR #98495, VoLIB 2.1.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
  • C55 V3.3
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Versions 5.2

Tool Dependencies for Source Release

  • XDC Tools version 3.24.06.63
  • RTSC Packaging Standard version 2.00.00
  • C55x Code Generation Tools version 4.4.1
  • C6xx Code Generation Tools version 7.4.2
  • 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.1.0.1 Release Notes

July 4, 2013

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 incidents have been resolved:

  1. IR #102050: (CID) Integration documentation issue
  2. IR #100611: (TDU) CPT tone detection issue
  3. IR #98495: (VEU) Unit test API calls
  4. IR #98494: (VEU) C55x results differ from C64x+
  5. IR #91674: (ALL) Manifest Issue
  6. IR #91673: (VPE) Manifest missing License text

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.4.2
  • Code Composer Studio version: V5
  • GNU make version: 3.81
  • RTSC Packaging Standard version: 2.0
  • XDC Tools version: 3

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.6.0.0 Release Notes

June 28, 2013

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 Adaptive Spectral Noise Reduction (ASNR) module

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
  • 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.5 (Common data type definitions)
  • ti.mas.swtools 5.0.4 (Internally used s/w tools)
  • ti.mas.util 4.7.6 (Common utilities)
  • ti.mas.fract 2.4.6 (Common Fractional utilities)

Component Test Dependencies

  • ti.mas.sdk 3.3.9 (Signal Generators)
  • CCS Version 5.2

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.1
  • C6x Code Generation Tools version 7.4.2

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

Questions regarding VPE should be directed to the Texas Instruments BIOS E2E Forum. Please include the text "VoLIB" in the title.

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 (1)
#define | ti_mas_cid_Version_BUILD (0)
#define | ti_mas_cid_Version_QUALITY (3)
#define | ti_mas_cid_Version_BTYPE (0)
#define | ti_mas_cid_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_cid_Version_MAJOR
#define | Version_MINOR ti_mas_cid_Version_MINOR
#define | Version_XVERTICAL ti_mas_cid_Version_XVERTICAL
#define | Version_PATCH ti_mas_cid_Version_PATCH
#define | Version_BUILD ti_mas_cid_Version_BUILD
#define | Version_QUALITY ti_mas_cid_Version_QUALITY
#define | Version_BTYPE ti_mas_cid_Version_BTYPE
#define | Version_WIDTH ti_mas_cid_Version_WIDTH

Define Documentation

#define ti_mas_cid_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_cid_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_cid_Version_MAJOR (2)

Definition at line 50 of file Version.h.

#define ti_mas_cid_Version_MINOR (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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_cid_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_cid_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_cid_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_cid_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_cid_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_cid_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_cid_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_cid_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_cid_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_cid_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_cid_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_cid_Version_WIDTH

Definition at line 97 of file Version.h.


CID: Version.h Source File

  • File List
  • Globals

Version.h

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


CID: Data Structures

  • Data Structures
  • Data Fields

CID Data Structures

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


CID: cid.h File Reference

  • File List
  • Globals

cid.h File Reference

Detailed Description

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

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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
00068 #ifndef _CID_H
00069 #define _CID_H
00070
00074 /* @{ */
00075
00076 /* System Utilities */
00077 #include <ti/mas/types/types.h>
00078 #include <ti/mas/util/utl.h>
00079 #include <ti/mas/util/debug.h>
00080 #include <ti/mas/util/ecomem.h>
00081
00089 /* @{ */
00090 enum {
00091   cid_NOERR     = 0,
00093   /* Errors specific to cidCreate() */
00094   cid_ERROR_CREATE,
00095   cid_ERROR_CREATE_CFG,
00096   cid_ERROR_CREATE_PARAMS,
00098   /* Errors returned by cidGetSizes */
00099   cid_ERROR_GS,
00101   /* Errors returned by cidNew */
00102   cid_ERROR_NEW_PARAMS,
00106   cid_ERROR_NEW_BASE,
00107   cid_ERROR_NEW_MSG,
00108   cid_ERROR_NEW_INST,
00109   cid_ERROR_NEW_DEM_INST,
00110   cid_ERROR_NEW_DEM_WORK,
00112   /* Errors returned by cidOpen */
00113   cid_ERROR_OPEN_CFG,
00114   cid_ERROR_OPEN_OPN,
00115   cid_ERROR_OPEN_CREATE,
00116   cid_ERROR_OPEN_BND,
00117   cid_ERROR_OPEN_SAMP,
00119   /* Errors returned by cidDelete */
00120   cid_ERROR_DEL_CLOSE,
00121   cid_ERROR_DEL_NBUFS,
00123   /* Errors returned by cidBind */
00124   cid_ERROR_BIND_INST,
00125   cid_ERROR_BIND_BND,
00126   cid_ERROR_BIND_CFG,
00127   cid_ERROR_BIND_CREATE,
00128   cid_ERROR_BIND_PARAMS,
00134   cid_ERROR_BIND_FSM
00138 };
00139 /*  @} */
00142 /* Standards definitions */
00143 #define cid_MAXNUM_STANDARDS 6
00144 #define cid_STD_US      0
00145 #define cid_STD_NTT     1
00146 #define cid_STD_ETSI    2
00147 #define cid_STD_YDN     3
00148 #define cid_STD_BT      4
00149 #define cid_STD_AUS     5
00150 #define cid_STD_UNDEFINED 0xffff
00152 /* US - Telcordia allowed message types */
00153 #define cid_US_SDMF_MSGTYPE  0x04
00154 #define cid_US_MDMF_MSGTYPE  0x80
00155 #define cid_US_MWI_MSGTYPE   0x82
00157 /* NTT allowed message types */
00158 #define cid_NTT_BYTE_SERVICE 0x40
00159 #define cid_NTT_RCCM_SERVICE 0x41
00160 #define cid_NTT_BYTE_SERVICE_CW 0x141
00165 /* ETSI allowed message types */
00166 #define cid_ETSI_CS_MSGTYPE    0x80
00167 #define cid_ETSI_MWI_MSGTYPE   0x82
00168 #define cid_ETSI_AOC_MSGTYPE   0x86
00169 #define cid_ETSI_SMS_MSGTYPE   0x89
00170 #define cid_ETSI_NOUMIN_MSGTYPE  0xf1
00171 #define cid_ETSI_NOUMAX_MSGTYPE  0xff
00172
00174 #define cid_CTL_GNRT_US    (2*cid_STD_US+1)
00175 #define cid_CTL_DTCT_US    (cid_CTL_GNRT_US+1)
00176 #define cid_CTL_GNRT_NTT   (2*cid_STD_NTT+1)
00177 #define cid_CTL_DTCT_NTT   (cid_CTL_GNRT_NTT+1)
00178 #define cid_CTL_GNRT_ETSI  (2*cid_STD_ETSI+1)
00179 #define cid_CTL_DTCT_ETSI  (cid_CTL_GNRT_ETSI+1)
00180 #define cid_CTL_GNRT_YDN   (2*cid_STD_YDN+1)
00181 #define cid_CTL_DTCT_YDN   (cid_CTL_GNRT_YDN+1)
00182 #define cid_CTL_GNRT_BT    (2*cid_STD_BT+1)
00183 #define cid_CTL_DTCT_BT    (cid_CTL_GNRT_BT+1)
00184 #define cid_CTL_GNRT_AUS   (2*cid_STD_AUS+1)
00185 #define cid_CTL_DTCT_AUS   (cid_CTL_GNRT_AUS+1)
00186 #define cid_LAST_DTGN_CTL  cid_CTL_DTCT_AUS
00187 #define cid_CTL_DEACTIVATE cid_LAST_DTGN_CTL+1
00188 #define cid_CTL_MULTI_RQST cid_LAST_DTGN_CTL+2
00197 /* @{ */
00198 enum {
00199 /* Detector Report Codes */
00200   cid_RPT_VALID_DTCT  = 0,
00201   cid_RPT_DTCT_START  = 1,
00203   cid_RPT_TIMEOUT     = 2,
00204   cid_RPT_DTCT_DEACT  = 3,
00205   cid_RPT_INVALID_CTL = 4,
00206   cid_RPT_NO_END_BIT  = 5,
00207   cid_RPT_LONG_MARKS  = 6,
00208   cid_RPT_TRNCTD_MSG  = 7,
00209   cid_RPT_BAD_CHCKSUM = 8,
00210   cid_RPT_LAST_DETECT = cid_RPT_BAD_CHCKSUM,
00213   cid_RPT_END_GNRT    = 9,
00214   cid_RPT_GNRT_DEACT  = 10,
00215   cid_RPT_BAD_PARITY  = 11,
00216   cid_RPT_BAD_CRC     = 12,
00217   cid_RPT_BAD_STD     = 13,
00219   cid_RPT_MULTI_RQST    = 20,
00220   cid_RPT_END_OF_ACTION = 21,
00222   cid_RPT_VALID_MULTI = 255
00223 };
00224 /*  @} */
00234 /* @{ */
00235 enum {
00236    cid_EXC_OPEN      = 1,
00237    cid_EXC_DELETE    = 2,
00238    cid_EXC_FRAMESIZE = 3,
00239    cid_EXC_CONTROL   = 4,
00240    cid_EXC_DST_NTT   = 5,
00241    cid_EXC_GST_NTT   = 6,
00242    cid_EXC_DST       = 7
00243 };
00244 /*  @} */
00250 typedef struct {
00251   tuint ID;
00252 } cidNewConfig_t;
00253
00262 typedef struct {
00263   tint ctlCode;
00264   tbool call_waiting;
00266   union {
00267     struct {
00268       tuint  marks_gain;
00270       tint  msg_type;
00271       tint  msg_length;
00272       tuint *msg;
00273     }gnrt;
00274
00275     struct {
00276       tint fragment_offset;
00277       tint fragment_size;
00278       tuint *msg;
00279     }mgnrt ;
00280
00281     struct {
00282       tuint timeout;
00283       tint  direction;
00284       tint  leading_marks;
00285     }dtct ;
00286   }u;
00287 } cidCtlMsg_t;
00288
00289
00293 typedef struct {
00294   dbgInfo_t debugInfo;
00321   void (*reportOutFcn) (tuint ID, tint rcode, tint final_state,
00322                tint dropout_ct, tint bad_mtype_ct, tint type, tint len, tuint* msg, tint len_in_word);
00323
00324   tint maxSamplesPerFrame;
00326   tint maxFragmentSize;
00327 } cidCreateConfig_t;
00328
00329
00333 typedef struct {
00334   tuint standard;
00336   tint  (*gnrt_fsm)  (void*);
00338   void  (*dtct_fsm)  (void*, tint);
00340 } cidBindStandard_t;
00341
00345  typedef struct {
00346   void  (*mod)       (void*, linSample*);
00347   tbool (*modCtrl)   (void*, cidCtlMsg_t*);
00348   void  (*demod)     (void*, linSample*);
00349   tbool (*demodCtrl) (void*, cidCtlMsg_t*);
00350   cidBindStandard_t cidBindStandard[cid_MAXNUM_STANDARDS];
00351 } cidBindConfig_t;
00352
00356 typedef struct {
00357   tuint samples_per_frame;
00359 } cidOpenConfig_t;
00360
00372
00373
00387 tint  cidCreate     (cidCreateConfig_t *create_cfg);
00388
00389
00402 tint  cidGetSizes   (tint *nbufs, const ecomemBuffer_t **bufs);
00403
00404
00425 tint  cidNew        (void **cidInst, tint nbufs, ecomemBuffer_t *bufs,
00426                           cidNewConfig_t *cfg);
00427
00428
00435 void  cidClose      (void *cidInst);
00436
00437
00453 tint  cidDelete     (void **cidInst, tint nbufs, ecomemBuffer_t *bufs);
00454
00455
00592 tint cidBind   (void *cidInst, cidBindConfig_t *cfg);
00593
00607 tint  cidOpen       (void *cidInst, cidOpenConfig_t *cfg);
00608
00609
00617 void  cidControl    (void *cidInst, cidCtlMsg_t *ctlMsg);
00618
00619
00638 void  cidReceiveIn  (void *cidInst, void *samples_in, tbool gnrtPos,
00639                      tbool *rxReplace);
00650  void  cidSendIn     (void *cidInst, void *samples_in);
00652
00664 extern void cidModulator    (void *cidInst, linSample *frame);
00665
00666
00677 extern tbool cidModCtrl   (void *cidInst, cidCtlMsg_t *ctlMsg);
00678
00688 extern void cidDetect       (void *cidInst, linSample *frame);
00689
00690
00702 extern tbool cidDemodCtrl (void *cidInst, cidCtlMsg_t *ctlMsg);
00703
00704
00714 extern void cidDtctFsmNtt  (void *cidInst, tint bit);
00715
00716
00726 extern tint cidGnrtFsmNtt  (void *cidInst);
00727
00728
00738 extern void cidDtctFsmUsEtsi (void *cidInst, tint bit);
00739
00740
00749 extern tint cidGnrtFsmUsEtsi (void *cidInst);
00750
00751 /* @} */ /* ingroup CID */
00752
00753 #endif
00754 /* nothing past this point */
00755
00756


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 143 of file cid.h.

#define cid_STD_US 0

US, Telcordia standard

Definition at line 144 of file cid.h.

#define cid_STD_NTT 1

Japanese, NTT standard

Definition at line 145 of file cid.h.

#define cid_STD_ETSI 2

European, ETSI standard

Definition at line 146 of file cid.h.

#define cid_STD_YDN 3

Chinese, YDN standard

Definition at line 147 of file cid.h.

#define cid_STD_BT 4

UK, BT standard

Definition at line 148 of file cid.h.

#define cid_STD_AUS 5

AUS, Australian standard

Definition at line 149 of file cid.h.

#define cid_STD_UNDEFINED 0xffff

undefined standard

Definition at line 150 of file cid.h.

#define cid_US_SDMF_MSGTYPE 0x04

message type of SDMF

Definition at line 153 of file cid.h.

#define cid_US_MDMF_MSGTYPE 0x80

message type of MDMF

Definition at line 154 of file cid.h.

#define cid_US_MWI_MSGTYPE 0x82

message waiting indicator

Definition at line 155 of file cid.h.

#define cid_NTT_BYTE_SERVICE 0x40

Definition at line 158 of file cid.h.

#define cid_NTT_RCCM_SERVICE 0x41

Definition at line 159 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 160 of file cid.h.

#define cid_ETSI_CS_MSGTYPE 0x80

Call Setup

Definition at line 166 of file cid.h.

#define cid_ETSI_MWI_MSGTYPE 0x82

Message Waiting Indicator

Definition at line 167 of file cid.h.

#define cid_ETSI_AOC_MSGTYPE 0x86

Advice of Charge

Definition at line 168 of file cid.h.

#define cid_ETSI_SMS_MSGTYPE 0x89

Short Message Service

Definition at line 169 of file cid.h.

#define cid_ETSI_NOUMIN_MSGTYPE 0xf1

Reserved for Network Operator Use

Definition at line 170 of file cid.h.

#define cid_ETSI_NOUMAX_MSGTYPE 0xff

Definition at line 171 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 174 of file cid.h.

#define cid_CTL_DTCT_US (cid_CTL_GNRT_US+1)

activate CID detector, Telcordia compliant

Definition at line 175 of file cid.h.

#define cid_CTL_GNRT_NTT (2*cid_STD_NTT+1)

activate CID generator, NTT compliant

Definition at line 176 of file cid.h.

#define cid_CTL_DTCT_NTT (cid_CTL_GNRT_NTT+1)

activate CID detector, NTT compliant

Definition at line 177 of file cid.h.

#define cid_CTL_GNRT_ETSI (2*cid_STD_ETSI+1)

activate CID generator, ETSI compliant

Definition at line 178 of file cid.h.

#define cid_CTL_DTCT_ETSI (cid_CTL_GNRT_ETSI+1)

activate CID detector, ETSI compliant

Definition at line 179 of file cid.h.

#define cid_CTL_GNRT_YDN (2*cid_STD_YDN+1)

activate CID generator, YDN compliant

Definition at line 180 of file cid.h.

#define cid_CTL_DTCT_YDN (cid_CTL_GNRT_YDN+1)

activate CID detector, YDN compliant

Definition at line 181 of file cid.h.

#define cid_CTL_GNRT_BT (2*cid_STD_BT+1)

activate CID generator, BT compliant

Definition at line 182 of file cid.h.

#define cid_CTL_DTCT_BT (cid_CTL_GNRT_BT+1)

activate CID detector, BT compliant

Definition at line 183 of file cid.h.

#define cid_CTL_GNRT_AUS (2*cid_STD_AUS+1)

activate CID generator, Australian compliant

Definition at line 184 of file cid.h.

#define cid_CTL_DTCT_AUS (cid_CTL_GNRT_AUS+1)

activate CID detector, Australian compliant

Definition at line 185 of file cid.h.

#define cid_LAST_DTGN_CTL cid_CTL_DTCT_AUS

last detect/generation control code

Definition at line 186 of file cid.h.

#define cid_CTL_DEACTIVATE cid_LAST_DTGN_CTL+1

deactivate both subsystems

Definition at line 187 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 188 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 198 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 90 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 235 of file cid.h.


CID: CID (Caller ID) Package

CID (Caller ID) Package

Release 2.2.1.0

Page Contents

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

Description

The Caller ID Component (CID)

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

Additional links: Detailed CID Description

Integration

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

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

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

Additional links: | CID External API
 | CID Integration

Default Configuration

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

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

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

Performance

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

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 345 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 350 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 333 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 334 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 293 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 294 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 324 of file cid.h.

tint cidCreateConfig_t::maxFragmentSize

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

Definition at line 326 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 262 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 263 of file cid.h.

tbool cidCtlMsg_t::call_waiting

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

Definition at line 264 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 268 of file cid.h.

tint cidCtlMsg_t::msg_type

low 8 bits contains message type

Definition at line 270 of file cid.h.

tint cidCtlMsg_t::msg_length

message length in bytes

Definition at line 271 of file cid.h.

tuint* cidCtlMsg_t::msg

msg bytes packeted in words(big endian)

Definition at line 272 of file cid.h.

struct { ... } cidCtlMsg_t::gnrt

tint cidCtlMsg_t::fragment_offset

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

Definition at line 276 of file cid.h.

tint cidCtlMsg_t::fragment_size

Fragment size in bytes

Definition at line 277 of file cid.h.

tuint* cidCtlMsg_t::msg

Definition at line 278 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 282 of file cid.h.

tint cidCtlMsg_t::direction

detector position determination

Definition at line 283 of file cid.h.

tint cidCtlMsg_t::leading_marks

min qualification count of marks

Definition at line 284 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 250 of file cid.h.

Data Fields

tuint ID

Field Documentation

tuint cidNewConfig_t::ID

! ID used to identify this instance.

Definition at line 251 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 356 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 357 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 67 of file ccs2pcm.c.


CID Test: ccs2pcm.c Source File

  • File List
  • Globals

ccs2pcm.c

Go to the documentation of this file.
00001 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <stdio.h>
00065 #include <stdlib.h>
00066
00067 void main(int argc, char *argv[]) {
00068 FILE *fin = fopen (argv[1], "rt");
00069 FILE *fout = fopen (argv[2], "wb");
00070 int i;
00071 char line_in[80];
00072 short sample_out;
00073
00074 fgets(line_in, 80, fin);
00075 for (i = 0; ; i ++) {
00076   if(fgets(line_in, 80, fin) == NULL)
00077     break;
00078   if(argv[3][0] == 'h')
00079     sscanf(line_in, "%x", &sample_out);
00080   else
00081     sscanf(line_in, "%d", &sample_out);
00082
00083   printf ("%5d", sample_out);
00084   fwrite(&sample_out, sizeof(short), 1, fout);
00085 }
00086 printf ("%d samples converted\n", i);
00087 fclose(fin);
00088 fclose(fout);
00089 }


CID Test: cidsim.c File Reference

  • File List
  • Globals

cidsim.c File Reference

Detailed Description

CID test main program.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

tuint rng_state

Definition at line 255 of file cidsim.c.


CID Test: cidsim.c Source File

  • File List
  • Globals

cidsim.c

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

Referenced by siu_open_cid().

#define SIU_NUMBER_OF_CHANNELS 2

Definition at line 93 of file cidsim.c.

Referenced by main().

#define SIU_MAX_FRAME_LENGTH 44

Definition at line 95 of file cidsim.c.

Referenced by main().

#define SIU_MAX_BYTES 39

Definition at line 98 of file cidsim.c.

#define NUMBER_OF_FRAMES 1

Definition at line 100 of file cidsim.c.

#define MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)

Definition at line 101 of file cidsim.c.

#define MSG_BUF_LEN 50

Definition at line 102 of file cidsim.c.

#define SIU_DBGMSG_SIZE 256

Definition at line 137 of file cidsim.c.

Referenced by siuDebugInternal().

#define cidsim_PROFILE_FNAME "profile.txt"

Definition at line 152 of file cidsim.c.

Referenced by cidsim_profile_init().

#define cidsim_PROFILE_SND_IDX 0

Definition at line 153 of file cidsim.c.

Referenced by cidsim_profile_print(), and main().

#define cidsim_PROFILE_RCV_IDX 1

Definition at line 154 of file cidsim.c.

Referenced by cidsim_profile_print(), and main().

#define loop for(;;)

Definition at line 259 of file cidsim.c.

Referenced by main(), and siuException().

#define NTT_MSG_LENGTH 90

Definition at line 302 of file cidsim.c.

Referenced by main().

#define BELLCORE_MSG_LENGTH 26

Definition at line 312 of file cidsim.c.

Referenced by main().

Function Documentation

void tstgmpInit ( )

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

References cidProfile, and cidProfile_t::enabled.

Referenced by main().

static void cidsim_profile_disable ( void ) [inline, static]

Definition at line 188 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 194 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 210 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 226 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 233 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 422 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 439 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 455 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 478 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 500 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 515 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 547 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 560 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 592 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 635 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 683 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 743 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 771 of file cidsim.c.

References siuInst_t::cidInst, and siuInst.

Referenced by main().

void siu_delete_cid ( tint chnum )

Definition at line 790 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 816 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 828 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 874 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 930 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 105 of file cidsim.c.

Referenced by main().

linSample siuPcmOutStream[MAX_STREAM_SIZE]

PCM output samples from GNRT

Definition at line 106 of file cidsim.c.

Referenced by siuChSim().

linSample siuPcmInStream[MAX_STREAM_SIZE]

PCM input samples to DTCT

Definition at line 107 of file cidsim.c.

Referenced by main().

tint v21_flags = 0x7e7e

Definition at line 110 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 133 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 134 of file cidsim.c.

Referenced by main().

char siu_dbg_message[SIU_DBGMSG_SIZE]

Definition at line 138 of file cidsim.c.

Referenced by siuDebugInternal().

tuint siu_dbg_id

Definition at line 139 of file cidsim.c.

Referenced by siuDebugInternal().

tint rptBuff

Indicator of instance

Definition at line 140 of file cidsim.c.

Referenced by main().

tuint multi_msg_idx = 0

Definition at line 141 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

tuint multi_msg_len = 0

Definition at line 142 of file cidsim.c.

Referenced by main(), and siuCidRptIn().

tint* multi_msg

Definition at line 143 of file cidsim.c.

Referenced by main().

void* sgnRxInst = (void *) NULL

Definition at line 146 of file cidsim.c.

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

tint flog = 0

Definition at line 147 of file cidsim.c.

cidProfile_t cidProfile

Initial value:

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

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

tuint { ... } rng_state [inherited]

Definition at line 255 of file cidsim.c.

cidBindConfig_t cidBindConfig

Definition at line 261 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 303 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 313 of file cidsim.c.

siuSetup_t siuSetup

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

tuint glob_msgLength

Definition at line 451 of file cidsim.c.

tuint glob_moduleID

Definition at line 452 of file cidsim.c.

tuint glob_msgType

Definition at line 452 of file cidsim.c.

tuint glob_messageCode

Definition at line 452 of file cidsim.c.

tuint glob_msgData[4]

Definition at line 453 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. 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 V5.2 or above and may be used for those who haven't yet upgraded to CCS V5.2 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 V5.2 or above.

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

Dependent Packages

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


CID Test: Module Index

CID Test Modules

Here is a list of all modules:
  • CIDTEST


CID Test: Page Index

CID Test Related Pages

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


CID Test: cidProfile_t Struct Reference

  • Data Structures
  • Data Fields

cidProfile_t Struct Reference
[CIDTEST]

Detailed Description

Definition at line 156 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 157 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 158 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 159 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 160 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 161 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 162 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 163 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 164 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 165 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 81 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 82 of file tstgmp.c.

Referenced by gmpCreate(), and gmpRead().

tuint gmpData_t::write_ix

Definition at line 83 of file tstgmp.c.

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

tbool gmpData_t::avail

Definition at line 84 of file tstgmp.c.

Referenced by gmpDelete().

tuint gmpData_t::array[TSTTDU_MAX_STORAGE]

Definition at line 85 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 90 of file tstgmp.c.

Data Fields

tbool | avail
tuint | payload [TSTTDU_GMC_STORAGE]

Field Documentation

tbool gmpGmcSim_t::avail

Definition at line 91 of file tstgmp.c.

tuint gmpGmcSim_t::payload[TSTTDU_GMC_STORAGE]

Definition at line 92 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 338 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 339 of file cidsim.c.

Referenced by main(), and siuChSim().

tint siuCHSMPars_t::nlevel

channel noise level in dBm0

Definition at line 340 of file cidsim.c.

Referenced by siu_open_csm().

tuint siuCHSMPars_t::nseed

channel noise seed

Definition at line 341 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 118 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 119 of file cidsim.c.

Referenced by siu_delete_cid(), and siu_new_cid().

tuint siuInst_t::ID

Definition at line 122 of file cidsim.c.

void* siuInst_t::cidInst

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

Referenced by siu_delete_cid(), and siu_new_cid().

tint siuInst_t::cid_heap_size

Definition at line 125 of file cidsim.c.

Referenced by siu_delete_cid().

tint siuInst_t::aux_heap_size

Definition at line 128 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 322 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 323 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 324 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::wftype

one of sgn_WFT_'s

Definition at line 325 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 326 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 327 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 328 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 329 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 330 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tuint siuSGNPars_t::nseed

idle noise seed

Definition at line 331 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::ntype

noise type sgn_NT_xxx

Definition at line 332 of file cidsim.c.

Referenced by siu_open_rxsgn().

tint siuSGNPars_t::pow_level

Hoth or CSS power level in dBm0

Definition at line 333 of file cidsim.c.

Referenced by siu_open_rxsgn(), and siu_set_sgn().

tuint siuSGNPars_t::hoth_seed

Hoth noise seed

Definition at line 334 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 344 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 345 of file cidsim.c.

tint siuSetup_t::frame_size

# samples in frame (80 for 10ms frame)

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

Referenced by main(), and siuCidRptIn().

cidCtlMsg_t siuSetup_t::cid_ctlMsg1

CID control message for ch1

Definition at line 348 of file cidsim.c.

Referenced by main().

tint siuSetup_t::tog_cid2

TRUE: change CID control parameters for ch2

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

Referenced by main().

tbool siuSetup_t::tog_chnl_sim

TRUE: toggle channel simulator

Definition at line 351 of file cidsim.c.

Referenced by main().

siuCHSMPars_t siuSetup_t::chSim

channel simulator parameters

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

Referenced by main().

siuSGNPars_t siuSetup_t::rxSGN

Rx Signal Generator Parameters

Definition at line 354 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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 75 of file tstgmp.c.

Referenced by gmpWrite().

#define TSTTDU_GMC_STORAGE (22)

Definition at line 76 of file tstgmp.c.

#define TSTGMP_ITEMS 6

Definition at line 77 of file tstgmp.c.

Referenced by gmpCreate(), and tstgmpInit().

#define TSTGMP_GMC_ITEMS 8

Definition at line 78 of file tstgmp.c.

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

Function Documentation

void* gmpAllocGmc ( tuint input_MID )

Definition at line 108 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 119 of file tstgmp.c.

References gmp_gmcs, and TSTGMP_GMC_ITEMS.

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

Definition at line 131 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 149 of file tstgmp.c.

References gmpData_t::avail.

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

Definition at line 157 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 169 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 88 of file tstgmp.c.

Referenced by gmpCreate(), and tstgmpInit().

gmpGmcSim_t gmp_gmcs[TSTGMP_GMC_ITEMS]

Definition at line 95 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
00068 #include <stdlib.h>
00069 #include <string.h>
00070
00071 #include <ti/mas/types/types.h>
00072 #include <ti/mas/util/utl.h>
00073
00074
00075 #define TSTTDU_MAX_STORAGE  (40)
00076 #define TSTTDU_GMC_STORAGE  (22)
00077 #define TSTGMP_ITEMS 6
00078 #define TSTGMP_GMC_ITEMS 8
00079 extern void siuException (tuint id, char *s);
00080
00081 typedef struct {
00082   tuint read_ix;
00083   tuint write_ix;
00084   tbool  avail;
00085   tuint array[TSTTDU_MAX_STORAGE];
00086 } gmpData_t;
00087
00088 gmpData_t gmp_array[TSTGMP_ITEMS]; /* room for 5 GMCs */
00089
00090 typedef struct {
00091   tbool  avail;
00092   tuint payload[TSTTDU_GMC_STORAGE];
00093 } gmpGmcSim_t;
00094
00095 gmpGmcSim_t gmp_gmcs[TSTGMP_GMC_ITEMS];
00096
00097 void tstgmpInit(void) {
00098 tint i;
00099   for (i = 0; i < TSTGMP_ITEMS; i ++) {
00100     gmp_array[i].avail   = TRUE;
00101   }
00102   for (i = 0; i < TSTGMP_GMC_ITEMS; i ++) {
00103     gmp_gmcs[i].avail   = TRUE;
00104   }
00105 }
00106
00107
00108 void *gmpAllocGmc(tuint input_MID) {
00109 tint i;
00110   for (i = 0; i < TSTGMP_GMC_ITEMS; i ++) {
00111     if(gmp_gmcs[i].avail) {
00112       gmp_gmcs[i].avail = FALSE;
00113       return &gmp_gmcs[i].payload;
00114     }
00115   }
00116   return NULL;
00117 }
00118
00119 tbool gmpFreeGmc(tuint input_MID, void *to_free) {
00120 tint i;
00121   for (i = 0; i < TSTGMP_GMC_ITEMS; i ++) {
00122     if(gmp_gmcs[i].payload == to_free) {
00123       gmp_gmcs[i].avail = TRUE;
00124       return TRUE;
00125     }
00126   }
00127   return FALSE;
00128 }
00129
00130 /* Creation of FILE-like structure, mode is ignored at the moment */
00131 void *gmpCreate (tuint input_MID, tuint mode, tuint recordSize)
00132 {
00133   void *gmp_ptr;
00134   tint  i;
00135
00136   gmp_ptr = (tuint *)NULL;
00137   for (i = 0; i < TSTGMP_ITEMS; i ++) {
00138     if(gmp_array[i].avail) {
00139       gmp_array[i].avail = FALSE;
00140       gmp_array[i].read_ix = gmp_array[i].write_ix = 0;
00141       gmp_ptr = (void *)&gmp_array[i];
00142       break;
00143     }
00144   }
00145   return (gmp_ptr);
00146 }
00147
00148 /* FILE-like structure is deleted */
00149 void gmpDelete (tuint input_MID, void *headIn)
00150 {
00151   gmpData_t *gmp_sim = (gmpData_t *)headIn;
00152   gmp_sim->avail = TRUE;
00153 }
00154
00155 /* Write data into GMP based FILE-like structure. Append mode is assumed. No
00156  * limitation on amount of data to be written */
00157 void gmpWrite (tuint input_MID, void *head, void *srcIn, tint records_to_copy)
00158 {
00159   gmpData_t *gmp_sim = (gmpData_t *)head;
00160
00161   if(head == NULL)
00162     siuException(input_MID, "Null pointer for write");
00163   memcpy (&(gmp_sim->array[gmp_sim->write_ix]), srcIn, records_to_copy);
00164   gmp_sim->write_ix += records_to_copy;
00165   if(gmp_sim->write_ix >= TSTTDU_MAX_STORAGE)
00166     siuException(input_MID, "Max storage exceeded(W)");
00167 }
00168 /* Copy data from GMP into linear buffer. Internal read position marker is updated */
00169 tint gmpRead (tuint input_MID, void *head, void *dstOut, tint records_to_copy)
00170 {
00171   gmpData_t *gmp_sim = (gmpData_t *)head;
00172   tint ret_val;
00173
00174   if(head == NULL)
00175     siuException(input_MID, "Null pointer for read");
00176
00177   ret_val = records_to_copy;
00178   if((gmp_sim->read_ix + records_to_copy) >= gmp_sim->write_ix) {
00179     ret_val = gmp_sim->write_ix - gmp_sim->read_ix;
00180   }
00181   memcpy (dstOut, &(gmp_sim->array[gmp_sim->read_ix]), ret_val);
00182   gmp_sim->read_ix += ret_val;
00183   return ret_val;
00184 }
00185 /* nothing past this point */
00186


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 67 of file wav2ccs.c.


CID Test: wav2ccs.c Source File

  • File List
  • Globals

wav2ccs.c

Go to the documentation of this file.
00001 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <stdio.h>
00065 #include <stdlib.h>
00066
00067 void main (int argc, char *argv[]) {
00068 FILE *fin, *fout;
00069 short sample_in;
00070 int i;
00071
00072 if(argc != 3) {
00073   printf ("\nUsage: %s fileinput.wav fileoutput.dat\n", argv[0]);
00074   exit (0);
00075 }
00076
00077 if((fin  = fopen (argv[1], "rb")) == NULL)
00078 {
00079    printf ("\nCan not open %s for reading\n", argv[1]);
00080    exit(0);
00081 }
00082
00083 if((fout  = fopen (argv[2], "wt")) == NULL)
00084 {
00085    printf ("\nCan not open %s for writting\n", argv[2]);
00086    exit(0);
00087 }
00088
00089
00090 printf ("\nUsing 40-samples frames");
00091 printf ("\nRewinding through first 44 bytes (wav format)\n");
00092 fseek(fin, 44, SEEK_SET);
00093
00094 fprintf (fout, "1651 2 0 1 40\n");
00095 for (i = 0; ; i ++) {
00096   if(fread (&sample_in, sizeof(short), 1, fin) != 1)
00097     break;
00098   fprintf (fout, "%d\n", sample_in);
00099 }
00100
00101 fclose (fout);
00102 fclose (fin);
00103
00104 printf ("\n%d samples converted into %s file\n", i, argv[2]);
00105
00106 }
00107


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 (1)
#define | ti_mas_ecu_Version_BUILD (0)
#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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_ecu_Version_BUILD (0)

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 (1)
00060
00061 /* BUILD */
00062 #define ti_mas_ecu_Version_BUILD (0)
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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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
00128 /* System include files */
00129 #include <ti/mas/types/types.h>
00130
00131 /* System utilities' API's */
00132 #include <ti/mas/util/ecomem.h>
00133
00134
00142 /* @{ */
00143 enum {
00144   ecu_NOMEMORY  = -1,
00145   ecu_NOERR     = 0,
00146   ecu_ERROR     = 1
00147 };
00148 /*  @} */
00156 enum {
00157   ecu_FLT_FOREGROUND = 0,
00158   ecu_FLT_BACKGROUND = 1,
00159   ecu_FLT_SEARCH     = 2
00160 };
00161
00165 enum {
00166   ecu_CTL_MASK              = 0,
00167   ecu_CTL_BG_LMS_SPEED      = 1,
00168   ecu_CTL_BG_LMS_ENABLE     = 2,
00169   ecu_CTL_SEARCH_LMS_SPEED  = 3,
00170   ecu_CTL_SEARCH_LMS_ENABLE = 4,
00171   ecu_CTL_FIXED_NOISE_LEVEL = 5,
00172   ecu_CTL_NLP_AGGRESSIVE    = 6,
00173   ecu_CTL_NLP_CN_CONFIG     = 7
00174 };
00175
00179 enum {
00180   ecu_FORCE_SLOW = 0,
00182   ecu_ALLOW_FAST = 1
00183 };
00184
00191 #define ecu_ENABLE_ECHO_CANCELLER   0x0001
00194 #define ecu_ENABLE_UPDATE           0x0002
00195 #define ecu_ENABLE_NLP              0x0004
00196 #define ecu_RESERVED_1              0x0008
00197 #define ecu_ENABLE_AUTO_UPDATE      0x0010
00201 #define ecu_RESERVED_2              0x0020
00202 #define ecu_ENABLE_SEARCH           0x0040
00204 #define ecu_ENABLE_CNG_ADAPT        0x0080
00205 #define ecu_ENABLE_OPNLP_DETECT     0x0100
00206 #define ecu_CLEAR_FG                0x0200
00207 #define ecu_CLEAR_BG                0x0400
00208 #define ecu_CLEAR_SEARCH            0x0800
00210 #define ecu_DISABLE_DEMEANING       0x1000
00211 #define ecu_TEST_BIT_2              0x2000
00212 #define ecu_FORCED_NLP_CNG          0x4000
00213 #define ecu_NLP_NORMAL_LEVEL        0x8000
00223 #define ecu_ENABLE_NLP_PHASE_RND    0x0001
00224 #define ecu_ERL_CONFIG_BIT_0        0x0002
00226 #define ecu_ERL_CONFIG_BIT_1        0x0004
00255 #define ecu_ENABLE_ECP_CHG_DETECT   0x0008
00257 #define ecu_ENABLE_CPD_DETECT       0x0010
00258 #define ecu_ENABLE_NONLINEAR_EP     0x0020
00260 #define ecu_ENABLE_FAST_CPS         0x0040
00262 #define ecu_ENABLE_WIDEBAND         0x0080
00264 #define ECU_ENABLE_RECEIVE_CPS      0x0100
00269 #define ecu_CTRL0_BIT_FIRST_TIME       0x0001
00270 #define ecu_CTRL0_BIT_FREEZE_EC        0x0002
00271 #define ecu_CTRL0_BIT_USE_NLP          0x0004
00272 #define ecu_CTRL0_BIT_ENABLE_EC        0x0008
00273 #define ecu_CTRL0_BIT_CONVERGED        0x0010
00274 #define ecu_CTRL0_BIT_NO_SEARCH        0x0020
00275 #define ecu_CTRL0_BIT_SLOW_LMS_EN      0x0040
00276 #define ecu_CTRL0_BIT_FORCE_SLOW_LMS   0x0080
00277 #define ecu_CTRL0_BIT_OPNLP_FOUND      0x0100
00278 #define ecu_CTRL0_BIT_FORCE_SLOW_SRCH  0x0200
00279 #define ecu_CTRL0_BIT_RESERVED_2       0x0400
00280 #define ecu_CTRL0_BIT_RESERVED_3       0x0800
00281 #define ecu_CTRL0_BIT_NLP_ADAPT        0x1000
00283 #define ecu_CTRL0_BIT_OPNLP_EN         0x2000
00284 #define ecu_CTRL0_BIT_FREEZE_SRCH      0x4000
00285 #define ecu_CTRL0_BIT_DEMEAN_EN        0x8000
00290 #define ecu_CTRL1_BIT_TONE_PRESENT     0x0001
00291 #define ecu_CTRL1_BIT_FORCED_NLP_CNG   0x0002
00292 #define ecu_CTRL1_BIT_NLP_NORM_LEV     0x0004
00293 #define ecu_CTRL1_BIT_ENABLE_SRCH      0x0008
00294 #define ecu_CTRL1_BIT_ENABLE_UPDATE    0x0010
00295 #define ecu_CTRL1_BIT_NLP_PHASE_RND_EN 0x0020
00296 #define ecu_CTRL1_0DB_CONFIG           0x0040
00297 #define ecu_CTRL1_3DB_CONFIG           0x0080
00298 #define ecu_CTRL1_ECP_CHG_DETECT_EN    0x0100
00299 #define ecu_CTRL1_CPD_DETECT_EN        0x0200
00300 #define ecu_CTRL1_PLACEMENT_OCCUR      0x0400
00301 #define ecu_CTRL1_NONLINEAR_ECHO_PATH  0x0800
00302 #define ecu_CTRL1_FAST_CPS             0x1000
00303 #define ecu_CTRL1_WIDEBAND             0x2000
00304 #define ecu_CTRL1_CPT_SUSPECT          0x4000
00305 #define ECU_CTRL1_RECEIVE_CPS          0x8000
00310 #define ecu_VERF_MULTISEGMENT          0x0001
00311 #define ecu_VERF_5P5MS_FRAME           0x0002
00312 #define ecu_VERF_DLINE_COMPRESS        0x0004
00313 #define ecu_VERF_DEBUG_STREAM          0x0008
00314 #define ecu_VERF_NEAR_MODE             0x0010
00315 #define ecu_VERF_03DB_CONFIG           0x0040
00316 #define ecu_VERF_CONST_PCM_DETECT      0x0080
00317 #define ecu_VERF_INST_RELOCATION       0x0100
00318 #define ecu_VERF_RERL_ESTIMATE         0x0200
00319 #define ecu_VERF_WIDE_BAND             0x0400
00320 #define ecu_VERF_TELOGY_ECAN           0x8000
00326 enum {
00327   ecu_BIT_ACTION_SET = 0,
00328   ecu_BIT_ACTION_CLR = 1
00329 };
00330
00335 enum {
00336   ecu_SEARCH_REQUEST = 0,
00337   ecu_SEARCH_FINISH  = 1
00338 };
00339
00348 /* @{ */
00349 enum {
00350    ecu_EXC_OPEN      = 1,
00351    ecu_EXC_DELETE    = 2,
00352    ecu_EXC_SIZE      = 3,
00353    ecu_EXC_PXBUFSIZE = 4,
00354    ecu_EXC_OPEN_NLP  = 5
00355 };
00356 /*  @} */
00359
00366 typedef struct {
00367   tuint version;
00368   tuint revision;
00369   tuint patch;
00370   tuint build;
00371   tuint feature;
00372 } ecuVersion_t;
00373
00381 typedef struct {
00382   tint  ctl_code;
00383   union {
00384     tint  ctl_mask[2];
00385     tint  bg_speed;
00386     tint  srch_speed;
00387     tint  place_speed;
00388     tbool enable;
00389     tint  n_level;
00390     tuint nlp_aggress;
00393     Fract cn_config;
00395   } u;
00396 } ecuControl_t;
00397
00405 typedef void ecuSizeConfig_t;
00406
00414 typedef struct {
00415   tuint ID;
00416 } ecuNewConfig_t;
00417
00425 typedef struct {
00426   tint  filter_length;
00428   tint  config_bitfield;
00430   tint  config_bitfield1;
00432   tint  noise_level;
00435   Fract nlp_aggress;
00437   Fract cn_config;
00441 } ecuConfigParam_t;
00442
00450 typedef struct {
00451   tint              samples_per_frame;
00452   tint              y2x_delay;
00453   void              *sendOutInst;
00454   void              *recOutInst;
00455   ecuConfigParam_t  *cfgParam;
00458   const tint        *pcm_expand_tbl;
00459   tuint             pcm_zero;
00460 } ecuConfig_t;
00461
00471 typedef struct {
00472   LFract  Px;
00473   LFract  Py;
00474   LFract  Pe;
00475   Fract   erlest;
00476   Fract   acomest;
00477 } ecuPerform_t;
00478
00487 typedef struct {
00488   tulong attempt_update;
00489   tulong attempt_search;
00490   tulong erle_bypass;
00491   tulong xtone_bypass;
00492   tulong other_bypass;
00494   tulong xidle;
00495   tuint  double_talk;
00496   tuint  dt_cps;
00497   tuint  dt_cpt;
00498   tuint  nlp;
00499   tuint  divergence;
00500   tuint  srch_divergence;
00501   tuint  fg_switch;
00502   tuint  bg_switch;
00503   tuint  openloop_found;
00504   tuint  numseg_change;
00506   tuint  segment_change;
00508   tuint  converge_exit;
00509   tuint  txbssat_events;
00510   tuint  rxbssat_events;
00511 } ecuUpdateStat_t;
00512
00520 typedef void (*vfnptr)(void);
00521
00529 typedef struct ecuContext_s {
00530   vfnptr exception;
00531   void (*debugStrmWrite)  (tuint id, tuint n,
00532                            tuint chan, void *vptr, tuint type);
00533   void (*mipsEcuInstEvt)  (void *inst, tint event);
00534   void (*srchPrep)        (tuint ID, tint event);
00535   void (*sendOutFcn)      (void *targetInst,
00536                            void *send_out_ptr);
00538   void (*receiveOutFcn)   (void *targetInst,
00539                            void *receive_out_ptr);
00541   tint max_samples_per_frame;
00542   tint max_filter_length;
00543   tint max_filter_seg_length;
00544   tint max_filter_seg_count;
00545   tint max_y2x_delay;
00546   tulong     expanded_bf;
00548   linSample  *rxout_buf_base;
00549   linSample  *expand_ptr;
00550   tword      *pack_ptr;
00551 } ecuContext_t;
00552
00553 /* ECU context */
00554 extern ecuContext_t ecuContext;
00555
00560 /* ECU.c */
00569 void  ecuClose          (void *ecuInst);
00570
00583 tint  ecuControl        (void *ecuInst, ecuControl_t *ctl);
00584
00596 void  ecuDelete         (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs);
00597
00616 tint  ecuGetFilter      (void *ecuInst, tint select, tint start,
00617                          tint num, Fract *hbuf);
00618
00641 void  ecuGetPerformance (void *ecuInst, tint *state_bf, ecuVersion_t *version,
00642                          ecuPerform_t *perform, ecuUpdateStat_t *ustat,
00643                          LFract *noise_x, LFract *noise_y, Fract *rerl, tint *tail_len,
00644                          tbool rustat);
00654 void  ecuOpen           (void *ecuInst, ecuConfig_t *cfg);
00655
00656 /* ECUINIT.c */
00669 tint  ecuGetSizes       (tint *nbufs, const ecomemBuffer_t **bufs,
00670                          ecuSizeConfig_t *cfg);
00671
00688 tint  ecuNew            (void **ecuInst, tint nbufs, ecomemBuffer_t *bufs,
00689                          ecuNewConfig_t *cfg);
00690 tint  ecuRelocate       (void **ecuInst, tint *numEcoBufs, tword *bufAdrs[]);
00691
00692 /* ECUFG.c */
00693
00709 void  ecuSendIn     (void *ecuInst, void *vsend_in, void *vrecv_in, void *vsend_out);
00710
00720 void  ecuReceiveIn  (void *ecuInst, void *speech_samples);
00721
00722
00726 #endif /* _ECU_H */
00727 /* 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 191 of file ecu.h.

#define ecu_ENABLE_UPDATE 0x0002

Enable/disable adaptation

Definition at line 194 of file ecu.h.

#define ecu_ENABLE_NLP 0x0004

Enable/disable NLP

Definition at line 195 of file ecu.h.

#define ecu_RESERVED_1 0x0008

reserved

Definition at line 196 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 197 of file ecu.h.

#define ecu_RESERVED_2 0x0020

reserved

Definition at line 201 of file ecu.h.

#define ecu_ENABLE_SEARCH 0x0040

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

Definition at line 202 of file ecu.h.

#define ecu_ENABLE_CNG_ADAPT 0x0080

Enables/disable adaptive comfort noise generation

Definition at line 204 of file ecu.h.

#define ecu_ENABLE_OPNLP_DETECT 0x0100

Enables/disable detection for 4-wire condition

Definition at line 205 of file ecu.h.

#define ecu_CLEAR_FG 0x0200

Set: clear foreground filter coefficients

Definition at line 206 of file ecu.h.

#define ecu_CLEAR_BG 0x0400

Set: clear background filter coefficients

Definition at line 207 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 208 of file ecu.h.

#define ecu_DISABLE_DEMEANING 0x1000

Enables/disable demeaning of search filter

Definition at line 210 of file ecu.h.

#define ecu_TEST_BIT_2 0x2000

test bit

Definition at line 211 of file ecu.h.

#define ecu_FORCED_NLP_CNG 0x4000

Enables/disable constant comfort noise generation

Definition at line 212 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 213 of file ecu.h.

#define ecu_ENABLE_NLP_PHASE_RND 0x0001

Enables/disable NLP phase randomization

Definition at line 223 of file ecu.h.

#define ecu_ERL_CONFIG_BIT_0 0x0002

0/3dB ERL configuration bit 0
see table below

Definition at line 224 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 226 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 255 of file ecu.h.

#define ecu_ENABLE_CPD_DETECT 0x0010

Enables/disable constant PCM pattern detection

Definition at line 257 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 258 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 260 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 262 of file ecu.h.

#define ECU_ENABLE_RECEIVE_CPS 0x0100

Enables/disables receive direction constant power signal detection.

Definition at line 264 of file ecu.h.

#define ecu_CTRL0_BIT_FIRST_TIME 0x0001

SET: next open is the first one

Definition at line 269 of file ecu.h.

#define ecu_CTRL0_BIT_FREEZE_EC 0x0002

SET: stop updating the BG filter

Definition at line 270 of file ecu.h.

#define ecu_CTRL0_BIT_USE_NLP 0x0004

SET: use nonlinear processor

Definition at line 271 of file ecu.h.

#define ecu_CTRL0_BIT_ENABLE_EC 0x0008

SET: EC is enabled

Definition at line 272 of file ecu.h.

#define ecu_CTRL0_BIT_CONVERGED 0x0010

SET: FG filter is fully converged

Definition at line 273 of file ecu.h.

#define ecu_CTRL0_BIT_NO_SEARCH 0x0020

SET: do short tail ecu

Definition at line 274 of file ecu.h.

#define ecu_CTRL0_BIT_SLOW_LMS_EN 0x0040

SET: enable slow BG LMS update

Definition at line 275 of file ecu.h.

#define ecu_CTRL0_BIT_FORCE_SLOW_LMS 0x0080

SET: force slow BG LMS update

Definition at line 276 of file ecu.h.

#define ecu_CTRL0_BIT_OPNLP_FOUND 0x0100

SET: 4-wire currently detected

Definition at line 277 of file ecu.h.

#define ecu_CTRL0_BIT_FORCE_SLOW_SRCH 0x0200

SET: force slow search LMS update

Definition at line 278 of file ecu.h.

#define ecu_CTRL0_BIT_RESERVED_2 0x0400

Reserved bitfield position

Definition at line 279 of file ecu.h.

#define ecu_CTRL0_BIT_RESERVED_3 0x0800

Reserved bitfield position

Definition at line 280 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 281 of file ecu.h.

#define ecu_CTRL0_BIT_OPNLP_EN 0x2000

SET: open loop detection enabled

Definition at line 283 of file ecu.h.

#define ecu_CTRL0_BIT_FREEZE_SRCH 0x4000

SET: stop updating the search filter

Definition at line 284 of file ecu.h.

#define ecu_CTRL0_BIT_DEMEAN_EN 0x8000

SET: enable search filter demeaning

Definition at line 285 of file ecu.h.

#define ecu_CTRL1_BIT_TONE_PRESENT 0x0001

SET: Far-end tone present

Definition at line 290 of file ecu.h.

#define ecu_CTRL1_BIT_FORCED_NLP_CNG 0x0002

SET: force NLP CN generation

Definition at line 291 of file ecu.h.

#define ecu_CTRL1_BIT_NLP_NORM_LEV 0x0004

SET: assume normal levels

Definition at line 292 of file ecu.h.

#define ecu_CTRL1_BIT_ENABLE_SRCH 0x0008

SET: search is enabled

Definition at line 293 of file ecu.h.

#define ecu_CTRL1_BIT_ENABLE_UPDATE 0x0010

SET: enable BG LMS update

Definition at line 294 of file ecu.h.

#define ecu_CTRL1_BIT_NLP_PHASE_RND_EN 0x0020

SET: enable phase randomization

Definition at line 295 of file ecu.h.

#define ecu_CTRL1_0DB_CONFIG 0x0040

SET: 0dB ERL configuration

Definition at line 296 of file ecu.h.

#define ecu_CTRL1_3DB_CONFIG 0x0080

SET: 3dB ERL configuration

Definition at line 297 of file ecu.h.

#define ecu_CTRL1_ECP_CHG_DETECT_EN 0x0100

SET: enable echo path change detect

Definition at line 298 of file ecu.h.

#define ecu_CTRL1_CPD_DETECT_EN 0x0200

SET: enable constant PCM pattern detect

Definition at line 299 of file ecu.h.

#define ecu_CTRL1_PLACEMENT_OCCUR 0x0400

SET: placement occurred since reset

Definition at line 300 of file ecu.h.

#define ecu_CTRL1_NONLINEAR_ECHO_PATH 0x0800

SET: expect nonlinear echo path

Definition at line 301 of file ecu.h.

#define ecu_CTRL1_FAST_CPS 0x1000

SET: do fast const power signal detection

Definition at line 302 of file ecu.h.

#define ecu_CTRL1_WIDEBAND 0x2000

SET: enable wideband processing

Definition at line 303 of file ecu.h.

#define ecu_CTRL1_CPT_SUSPECT 0x4000

SET: suspect CPT signal, block FG transfer

Definition at line 304 of file ecu.h.

#define ECU_CTRL1_RECEIVE_CPS 0x8000

SET: do RCV constant power signal detection

Definition at line 305 of file ecu.h.

#define ecu_VERF_MULTISEGMENT 0x0001

ecu_TAIL=YES

Definition at line 310 of file ecu.h.

#define ecu_VERF_5P5MS_FRAME 0x0002

ecu_5P5MS=YES

Definition at line 311 of file ecu.h.

#define ecu_VERF_DLINE_COMPRESS 0x0004

ecu_DLCOMP=YES

Definition at line 312 of file ecu.h.

#define ecu_VERF_DEBUG_STREAM 0x0008

ecu_DEBUG=YES

Definition at line 313 of file ecu.h.

#define ecu_VERF_NEAR_MODE 0x0010

ecu_NEAR=YES

Definition at line 314 of file ecu.h.

#define ecu_VERF_03DB_CONFIG 0x0040

ecu_03DB=YES

Definition at line 315 of file ecu.h.

#define ecu_VERF_CONST_PCM_DETECT 0x0080

ecu_CPD=YES

Definition at line 316 of file ecu.h.

#define ecu_VERF_INST_RELOCATION 0x0100

ecu_RELOC=YES

Definition at line 317 of file ecu.h.

#define ecu_VERF_RERL_ESTIMATE 0x0200

ecu_RERL=YES

Definition at line 318 of file ecu.h.

#define ecu_VERF_WIDE_BAND 0x0400

ecu_WB=YES

Definition at line 319 of file ecu.h.

#define ecu_VERF_TELOGY_ECAN 0x8000

it's Telogy EC

Definition at line 320 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 405 of file ecu.h.

typedef void(*) vfnptr(void)

Void function pointer.

Void function pointer for use in ECU context.

Definition at line 520 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 156 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 165 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 179 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 326 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 335 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 143 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 349 of file ecu.h.


ECU: ECU (Echo Canceller Unit) Package

ECU (Echo Canceller Unit) Package

Release 10.92.1.0

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 450 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 451 of file ecu.h.

tint ecuConfig_t::y2x_delay

extra system delay in samples

Definition at line 452 of file ecu.h.

void* ecuConfig_t::sendOutInst

Send-out object instance pointer

Definition at line 453 of file ecu.h.

void* ecuConfig_t::recOutInst

Receive-out object instance pointer

Definition at line 454 of file ecu.h.

ecuConfigParam_t* ecuConfig_t::cfgParam

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

Definition at line 455 of file ecu.h.

const tint* ecuConfig_t::pcm_expand_tbl

PCM expansion table pointer

Definition at line 458 of file ecu.h.

tuint ecuConfig_t::pcm_zero

PCM representation of 0

Definition at line 459 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 425 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 426 of file ecu.h.

tint ecuConfigParam_t::config_bitfield

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

Definition at line 428 of file ecu.h.

tint ecuConfigParam_t::config_bitfield1

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

Definition at line 430 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 432 of file ecu.h.

Fract ecuConfigParam_t::nlp_aggress

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

Definition at line 435 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 437 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 529 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 530 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 541 of file ecu.h.

tint ecuContext_s::max_filter_length

Maximum filter length in taps

Definition at line 542 of file ecu.h.

tint ecuContext_s::max_filter_seg_length

Maximum filter segment buffer length in taps

Definition at line 543 of file ecu.h.

tint ecuContext_s::max_filter_seg_count

Maximum allowed active filter segments

Definition at line 544 of file ecu.h.

tint ecuContext_s::max_y2x_delay

Maximum extra system delay in samples

Definition at line 545 of file ecu.h.

tulong ecuContext_s::expanded_bf

Bitfield representing those portions of the delay line already expanded.

Definition at line 546 of file ecu.h.

linSample* ecuContext_s::rxout_buf_base

Pointer to base of the scratch delay line

Definition at line 548 of file ecu.h.

linSample* ecuContext_s::expand_ptr

TDM aligned pointer within scratch delay line

Definition at line 549 of file ecu.h.

tword* ecuContext_s::pack_ptr

TDM aligned pointer within packed delay line

Definition at line 550 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 381 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 382 of file ecu.h.

tint ecuControl_t::ctl_mask[2]

Mask used to enable/disable selected features

Definition at line 384 of file ecu.h.

tint ecuControl_t::bg_speed

BG LMS speed: ecu_FORCE_SLOW/ecu_ALLOW_FAST

Definition at line 385 of file ecu.h.

tint ecuControl_t::srch_speed

Search LMS speed: ecu_FORCE_SLOW/ecu_ALLOW_FAST

Definition at line 386 of file ecu.h.

tint ecuControl_t::place_speed

Search placement speed:

Definition at line 387 of file ecu.h.

tbool ecuControl_t::enable

BG/Search LMS enable/disable

Definition at line 388 of file ecu.h.

tint ecuControl_t::n_level

Fixed comfort noise level

Definition at line 389 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 390 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 393 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 414 of file ecu.h.

Data Fields

tuint ID

Field Documentation

tuint ecuNewConfig_t::ID

ECU instance ID

Definition at line 415 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 471 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 472 of file ecu.h.

LFract ecuPerform_t::Py

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

Definition at line 473 of file ecu.h.

LFract ecuPerform_t::Pe

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

Definition at line 474 of file ecu.h.

Fract ecuPerform_t::erlest

estimated erl in Q4

Definition at line 475 of file ecu.h.

Fract ecuPerform_t::acomest

estimated acom in Q4

Definition at line 476 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 487 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 488 of file ecu.h.

tulong ecuUpdateStat_t::attempt_search

# blocks for which we called search FSM

Definition at line 489 of file ecu.h.

tulong ecuUpdateStat_t::erle_bypass

# update bypasses due to high ERLE

Definition at line 490 of file ecu.h.

tulong ecuUpdateStat_t::xtone_bypass

# blocks bypassed due to presence of tones in x

Definition at line 491 of file ecu.h.

tulong ecuUpdateStat_t::other_bypass

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

Definition at line 492 of file ecu.h.

tulong ecuUpdateStat_t::xidle

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

Definition at line 494 of file ecu.h.

tuint ecuUpdateStat_t::double_talk

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

Definition at line 495 of file ecu.h.

tuint ecuUpdateStat_t::dt_cps

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

Definition at line 496 of file ecu.h.

tuint ecuUpdateStat_t::dt_cpt

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

Definition at line 497 of file ecu.h.

tuint ecuUpdateStat_t::nlp

# segments nlp engaged (see ecufg.c)

Definition at line 498 of file ecu.h.

tuint ecuUpdateStat_t::divergence

# times filters were reset due to divergence

Definition at line 499 of file ecu.h.

tuint ecuUpdateStat_t::srch_divergence

# times search filter was reset due to divergence

Definition at line 500 of file ecu.h.

tuint ecuUpdateStat_t::fg_switch

# times FG filter was reset by BG filter

Definition at line 501 of file ecu.h.

tuint ecuUpdateStat_t::bg_switch

# times BG filter was reset by FG filter

Definition at line 502 of file ecu.h.

tuint ecuUpdateStat_t::openloop_found

# of times open loop was detected

Definition at line 503 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 504 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 506 of file ecu.h.

tuint ecuUpdateStat_t::converge_exit

# times the converged state was exited

Definition at line 508 of file ecu.h.

tuint ecuUpdateStat_t::txbssat_events

wide band tx saturation

Definition at line 509 of file ecu.h.

tuint ecuUpdateStat_t::rxbssat_events

wide band rx saturation

Definition at line 510 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 366 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 367 of file ecu.h.

tuint ecuVersion_t::revision

ECU revision

Definition at line 368 of file ecu.h.

tuint ecuVersion_t::patch

ECU patch

Definition at line 369 of file ecu.h.

tuint ecuVersion_t::build

ECU build number

Definition at line 370 of file ecu.h.

tuint ecuVersion_t::feature

ECU compile time features for this build

Definition at line 371 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 84 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00019  *
00020  *              All rights reserved not granted herein.
00021  *
00022  *                         Limited License.
00023  *
00024  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00025  *  non-exclusive license under copyrights and patents it now or hereafter owns
00026  *  or controls to make, have made, use, import, offer to sell and sell
00027  *  ("Utilize") this software subject to the terms herein.  With respect to the
00028  *  foregoing patent license, such license is granted solely to the extent that
00029  *  any such patent is necessary to Utilize the software alone.  The patent
00030  *  license shall not apply to any combinations which include this software,
00031  *  other than combinations with devices manufactured by or for TI (“TI
00032  *  Devices”).  No hardware patent is licensed hereunder.
00033  *
00034  *  Redistributions must preserve existing copyright notices and reproduce this
00035  *  license (including the above copyright notice and the disclaimer and (if
00036  *  applicable) source code license limitations below) in the documentation
00037  *  and/or other materials provided with the distribution
00038  *
00039  *  Redistribution and use in binary form, without modification, are permitted
00040  *  provided that the following conditions are met:
00041  *
00042  *    *  No reverse engineering, decompilation, or disassembly of this software
00043  *  is permitted with respect to any software provided in binary form.
00044  *
00045  *    *  any redistribution and use are licensed by TI for use only with TI
00046  *  Devices.
00047  *
00048  *    *  Nothing shall obligate TI to provide you with source code for the
00049  *  software licensed and provided to you in object code.
00050  *
00051  *  If software source code is provided to you, modification and redistribution
00052  *  of the source code are permitted provided that the following conditions are
00053  *  met:
00054  *
00055  *    *  any redistribution and use of the source code, including any resulting
00056  *  derivative works, are licensed by TI for use only with TI Devices.
00057  *
00058  *    *  any redistribution and use of any object code compiled from the source
00059  *  code and any resulting derivative works, are licensed by TI for use only
00060  *  with TI Devices.
00061  *
00062  *  Neither the name of Texas Instruments Incorporated nor the names of its
00063  *  suppliers may be used to endorse or promote products derived from this
00064  *  software without specific prior written permission.
00065  *
00066  *  DISCLAIMER.
00067  *
00068  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00069  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00070  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00071  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00072  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00073  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00074  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00075  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00076  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00077  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00078  *  DAMAGE.
00079  *****************************************************************************/
00080
00081 #include <ti/mas/types/types.h>
00082 #include <ti/mas/ecu/test/src/cheap.h>
00083
00084 tword siu_core_heap[SIU_CORE_HEAP_SIZE];
00085 /* 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 87 of file cheap.h.

Referenced by main().

Variable Documentation

tword siu_core_heap[]

Definition at line 84 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00023  *
00024  *              All rights reserved not granted herein.
00025  *
00026  *                         Limited License.
00027  *
00028  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00029  *  non-exclusive license under copyrights and patents it now or hereafter owns
00030  *  or controls to make, have made, use, import, offer to sell and sell
00031  *  ("Utilize") this software subject to the terms herein.  With respect to the
00032  *  foregoing patent license, such license is granted solely to the extent that
00033  *  any such patent is necessary to Utilize the software alone.  The patent
00034  *  license shall not apply to any combinations which include this software,
00035  *  other than combinations with devices manufactured by or for TI (“TI
00036  *  Devices”).  No hardware patent is licensed hereunder.
00037  *
00038  *  Redistributions must preserve existing copyright notices and reproduce this
00039  *  license (including the above copyright notice and the disclaimer and (if
00040  *  applicable) source code license limitations below) in the documentation
00041  *  and/or other materials provided with the distribution
00042  *
00043  *  Redistribution and use in binary form, without modification, are permitted
00044  *  provided that the following conditions are met:
00045  *
00046  *    *  No reverse engineering, decompilation, or disassembly of this software
00047  *  is permitted with respect to any software provided in binary form.
00048  *
00049  *    *  any redistribution and use are licensed by TI for use only with TI
00050  *  Devices.
00051  *
00052  *    *  Nothing shall obligate TI to provide you with source code for the
00053  *  software licensed and provided to you in object code.
00054  *
00055  *  If software source code is provided to you, modification and redistribution
00056  *  of the source code are permitted provided that the following conditions are
00057  *  met:
00058  *
00059  *    *  any redistribution and use of the source code, including any resulting
00060  *  derivative works, are licensed by TI for use only with TI Devices.
00061  *
00062  *    *  any redistribution and use of any object code compiled from the source
00063  *  code and any resulting derivative works, are licensed by TI for use only
00064  *  with TI Devices.
00065  *
00066  *  Neither the name of Texas Instruments Incorporated nor the names of its
00067  *  suppliers may be used to endorse or promote products derived from this
00068  *  software without specific prior written permission.
00069  *
00070  *  DISCLAIMER.
00071  *
00072  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00073  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00074  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00075  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00076  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00077  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00078  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00079  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00080  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00081  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00082  *  DAMAGE.
00083  *****************************************************************************/
00084
00085 #include <ti/mas/types/types.h>
00086
00087 #define SIU_CORE_HEAP_SIZE  3072
00088 extern tword siu_core_heap[];
00089
00090 #endif  /* _CHEAP_H */
00091 /* 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 104 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00014  *
00015  *              All rights reserved not granted herein.
00016  *
00017  *                         Limited License.
00018  *
00019  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00020  *  non-exclusive license under copyrights and patents it now or hereafter owns
00021  *  or controls to make, have made, use, import, offer to sell and sell
00022  *  ("Utilize") this software subject to the terms herein.  With respect to the
00023  *  foregoing patent license, such license is granted solely to the extent that
00024  *  any such patent is necessary to Utilize the software alone.  The patent
00025  *  license shall not apply to any combinations which include this software,
00026  *  other than combinations with devices manufactured by or for TI (“TI
00027  *  Devices”).  No hardware patent is licensed hereunder.
00028  *
00029  *  Redistributions must preserve existing copyright notices and reproduce this
00030  *  license (including the above copyright notice and the disclaimer and (if
00031  *  applicable) source code license limitations below) in the documentation
00032  *  and/or other materials provided with the distribution
00033  *
00034  *  Redistribution and use in binary form, without modification, are permitted
00035  *  provided that the following conditions are met:
00036  *
00037  *    *  No reverse engineering, decompilation, or disassembly of this software
00038  *  is permitted with respect to any software provided in binary form.
00039  *
00040  *    *  any redistribution and use are licensed by TI for use only with TI
00041  *  Devices.
00042  *
00043  *    *  Nothing shall obligate TI to provide you with source code for the
00044  *  software licensed and provided to you in object code.
00045  *
00046  *  If software source code is provided to you, modification and redistribution
00047  *  of the source code are permitted provided that the following conditions are
00048  *  met:
00049  *
00050  *    *  any redistribution and use of the source code, including any resulting
00051  *  derivative works, are licensed by TI for use only with TI Devices.
00052  *
00053  *    *  any redistribution and use of any object code compiled from the source
00054  *  code and any resulting derivative works, are licensed by TI for use only
00055  *  with TI Devices.
00056  *
00057  *  Neither the name of Texas Instruments Incorporated nor the names of its
00058  *  suppliers may be used to endorse or promote products derived from this
00059  *  software without specific prior written permission.
00060  *
00061  *  DISCLAIMER.
00062  *
00063  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00064  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00065  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00066  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00067  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00068  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00069  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00070  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00071  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00072  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00073  *  DAMAGE.
00074  *****************************************************************************/
00075
00076 /* Definition of NULL */
00077 #include <stdlib.h>
00078
00079 /* ECU header files */
00080 #include <ti/mas/ecu/ecu.h>
00081 #include <ti/mas/ecu/test/src/ecusim.h>
00082
00083 /* MAG header file */
00084 #if ECUSIM_INCLUDE_MAG
00085 #include <ti/mas/ecu/mag.h>
00086 #endif
00087
00088 /* SIU header files */
00089 #include <ti/mas/ecu/test/src/siu.h>
00090 #include <ti/mas/ecu/test/src/siuloc.h>
00091 #include <ti/mas/ecu/test/src/siuport.h>
00092 #include <ti/mas/ecu/test/src/vctypes.h>
00093
00094 /* Other ECO files */
00095 #include <ti/mas/ecu/test/src/piu.h>
00096
00097 /* System header files */
00098 #include <ti/mas/types/types.h>
00099
00100 /******************************************************************************/
00101 /*****************      START OF ECU CONTEXT         **************************/
00102 /******************************************************************************/
00103
00104 ecuContext_t ecuContext = {
00105 #ifndef _HWDSKT
00106   (vfnptr) siuDebugInfo,      /* Void function pointer to SIU exception handler */
00107 #else
00108   exception_fcn,
00109 #endif
00110   NULL,                       /* Debug streaming function pointer */
00111 #if ECUSIM_INCLUDE_MAG
00112   magEvtEcuInst,              /* MIPS Agent open/close event handler */
00113 #else
00114   NULL,
00115 #endif
00116   NULL,                       /* Search filter swapping function */
00117   ecu_send_out,               /* Send out function pointer */
00118   piuReceiveIn,               /* Receive out function pointer */
00119   SIU_MAX_FRAME_LENGTH,       /* Maximum number of samples per frame */
00120   SIU_MAX_ECU_FILTER_LENGTH,  /* Maximum filter length in taps */
00121   SIU_MAX_ECU_FLTSEG_LENGTH,  /* Maximum filter segment buffer length in taps */
00122   SIU_MAX_ECU_FLTSEG,         /* Maximum allowed active filter segments */
00123   SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH,
00124                               /* Maximum y2x delay in samples */
00125   0L,                         /* Bitfield representing those portions of the
00126                                * delay line already expanded. */
00127   NULL,                       /* Pointer to base of the scratch delay line */
00128   NULL,                       /* TDM aligned pointer within scratch delay line */
00129   NULL,                       /* TDM aligned pointer within packed delay line */
00130 };
00131
00132 /******************************************************************************/
00133 /*****************       END OF ECU CONTEXT          **************************/
00134 /******************************************************************************/
00135
00136
00137 #if ECUSIM_INCLUDE_MAG
00138 /******************************************************************************/
00139 /***************** START OF MIPS AGENT MIPS TABLES   **************************/
00140 /******************************************************************************/
00141
00142 /******************************************************************************
00143  * DATA DEFINITION: ECU static MIPS structure
00144  ******************************************************************************
00145  * DESCRIPTION: FG overhead MIPS.
00146  *
00147  *****************************************************************************/
00148 magEcuMips_t magEcuStaticMips = {
00149   /* FG overhead MIPS */
00150   mag_MIPS_CONVERT(1.414)
00151 };
00152
00153 /******************************************************************************
00154  * DATA DEFINITION: ECU Search Function 5ms frame Cycle coefficients table
00155  ******************************************************************************
00156  * DESCRIPTION: Cycle coefficients for MSEC Search Function.
00157  *
00158  *****************************************************************************/
00159 tuint magTblEcuSearch[][mag_NUM_COEFF] = {
00160   /* 40Nt + 0Ns + 2547 */
00161   { mag_SEARCH_CYCLES_CONVERT(40),
00162     mag_SEARCH_CYCLES_CONVERT(0) ,
00163     mag_SEARCH_CYCLES_CONVERT(2400) },
00164   /* TODO */
00165   { mag_SEARCH_CYCLES_CONVERT(80),
00166     mag_SEARCH_CYCLES_CONVERT(0) ,
00167     mag_SEARCH_CYCLES_CONVERT(4100) }
00168 };
00169
00170
00171 /******************************************************************************
00172  * DATA DEFINITION: ECU Update Function 5ms frame Cycle coefficients table
00173  ******************************************************************************
00174  * DESCRIPTION: Cycle coefficients for MSEC BG Update Function.  States supported
00175  *              are: mag_ECU_UPDATE_SLOW, mag_ECU_UPDATE_FAST.
00176  *
00177  *****************************************************************************/
00178 tuint magTblEcuUpdate[][mag_NUM_COEFF] = {
00179   /* 41Nt + 381Ns + 2920 */
00180   { mag_UPDATE_CYCLES_CONVERT(41)  ,
00181     mag_UPDATE_CYCLES_CONVERT(381) ,
00182     mag_UPDATE_CYCLES_CONVERT(2920) },
00183   /* 81Nt + 760Ns + 4034 */
00184   { mag_UPDATE_CYCLES_CONVERT(81)  ,
00185     mag_UPDATE_CYCLES_CONVERT(760) ,
00186     mag_UPDATE_CYCLES_CONVERT(4034) }
00187 };
00188
00189 /******************************************************************************
00190  * DATA DEFINITION: ECU Echo Removal Function 5ms frame Cycle coefficients
00191  *                  table.
00192  ******************************************************************************
00193  * DESCRIPTION: Cycle coefficients for MSEC Echo Removal Function.  Only one
00194  *              state supported.
00195  *
00196  *****************************************************************************/
00197 tuint magTblEcuRemove[][mag_NUM_COEFF] = {
00198   /*  40Nt + 520Ns + 1372 */
00199   { mag_REMOVE_CYCLES_CONVERT(40)  ,
00200     mag_REMOVE_CYCLES_CONVERT(520) ,
00201     mag_REMOVE_CYCLES_CONVERT(1372) }
00202 };
00203
00204 /******************************************************************************
00205  * DATA DEFINITION: ECU PCM expansion Cycle coefficients table.
00206  ******************************************************************************
00207  * DESCRIPTION: Cycle coefficients for MSEC PCM delay line expansion.
00208  *              The first row is for 5ms/5.5ms frame sizes and the second
00209  *              row for 10ms/11ms frame sizes.
00210  *
00211  *****************************************************************************/
00212 tuint magTblPcmExpand[][mag_NUM_COEFF] = {
00213   /* 5ms/5.5ms frame -- 4Nt + 1200 Cycles */
00214   { mag_EXPAND_CYCLES_CONVERT(4)   ,
00215     mag_EXPAND_CYCLES_CONVERT(0)   ,
00216     mag_EXPAND_CYCLES_CONVERT(1200)},
00217   /* 10ms/11ms frame -- 2Nt + 600 Cycles (equiv) */
00218   { mag_EXPAND_CYCLES_CONVERT(2)   ,
00219     mag_EXPAND_CYCLES_CONVERT(0)   ,
00220     mag_EXPAND_CYCLES_CONVERT(600) }
00221 };
00222
00223 /******************************************************************************
00224  * DATA DEFINITION: Codec encode/decode MIPS table
00225  ******************************************************************************
00226  * DESCRIPTION: Codec type followed by MIPS consumption (U6.10) for encode and
00227  *              decode respectively.
00228  *
00229  *****************************************************************************/
00230 magCodecMips_t magTblCodecMips[] = {
00231   /*--------------------------------------------------------------*/
00232   /* Coding type   Encoder MIPS               Decoder MIPS        */
00233   /*--------------------------------------------------------------*/
00234   {VCT_8APCM,    mag_MIPS_CONVERT(0.16), mag_MIPS_CONVERT(0.13) }, /* A-law */
00235   {VCT_8MUPCM,   mag_MIPS_CONVERT(0.16), mag_MIPS_CONVERT(0.13) }, /* U-law */
00236   {VCT_2ADPCM,   mag_MIPS_CONVERT(4.80), mag_MIPS_CONVERT(5.30) }, /* G.726 16K */
00237   {VCT_3ADPCM,   mag_MIPS_CONVERT(4.90), mag_MIPS_CONVERT(5.40) }, /* G.726 24K */
00238   {VCT_4ADPCM,   mag_MIPS_CONVERT(5.00), mag_MIPS_CONVERT(5.40) }, /* G.726 32K */
00239   {VCT_5ADPCM,   mag_MIPS_CONVERT(5.10), mag_MIPS_CONVERT(5.60) }  /* G.726 40K */
00240 };
00241
00242 /******************************************************************************
00243  * DATA DEFINITION: Channel overhead MIPS table
00244  ******************************************************************************
00245  * DESCRIPTION: MIPS consumption (U6.10) for each channel state. Note that only
00246  *              those channel states valid for this build need to be supplied
00247  *
00248  *****************************************************************************/
00249 magChStateMips_t magTblChanMips[] = {
00250   {SIU_CHST_CLOSED ,mag_MIPS_CONVERT(0)    },
00251   /* IDLE = 0.20 + 0.6 HPIint + 0.83 PCMint + 0.1 mag + 0.46 RXTX =  2.19 MIPS  */
00252   {SIU_CHST_IDLE   ,mag_MIPS_CONVERT(2.19) },
00253   /* VOICE = 3.45 + 0.6 HPIint + 0.83 PCMint + 0.1 mag + 0.46 RXTX =  5.44 MIPS */
00254   {SIU_CHST_VOICE  ,mag_MIPS_CONVERT(5.44) },
00255   /* DTMF = 3.30 + 0.6 HPIint + 0.83 PCMint + 0.1 mag + 0.46 RXTX =  5.29 MIPS  */
00256   {SIU_CHST_DTMF   ,mag_MIPS_CONVERT(5.29) }
00257 };
00258
00259 /******************************************************************************/
00260 /***************** END OF MIPS AGENT MIPS TABLES   ****************************/
00261 /******************************************************************************/
00262
00263
00264 /******************************************************************************/
00265 /***************** START OF MIPS AGENT BUFFERS     ****************************/
00266 /******************************************************************************/
00267
00268 tint           queue1[MAX_CHANNELS];
00269 tint           queue2[MAX_CHANNELS];
00270 UFract         priority[MAX_CHANNELS];
00271 magChannel_t buf1[MAX_CHANNELS] =
00272 {
00273   mag_INIT_CHANNEL_STRUCT, /* Channel  1 context */
00274   mag_INIT_CHANNEL_STRUCT, /* Channel  2 context */
00275   mag_INIT_CHANNEL_STRUCT, /* Channel  3 context */
00276   mag_INIT_CHANNEL_STRUCT, /* Channel  4 context */
00277   mag_INIT_CHANNEL_STRUCT, /* Channel  5 context */
00278   mag_INIT_CHANNEL_STRUCT, /* Channel  6 context */
00279   mag_INIT_CHANNEL_STRUCT, /* Channel  7 context */
00280   mag_INIT_CHANNEL_STRUCT, /* Channel  8 context */
00281   mag_INIT_CHANNEL_STRUCT, /* Channel  9 context */
00282   mag_INIT_CHANNEL_STRUCT  /* Channel 10 context */
00283 };
00284
00285 /******************************************************************************/
00286 /***************** END OF MIPS AGENT BUFFERS       ****************************/
00287 /******************************************************************************/
00288
00289
00290 /******************************************************************************/
00291 /***************** START OF MIPS AGENT CONTEXT     ****************************/
00292 /******************************************************************************/
00293
00294 magContext_t mipsAgent = {
00295   siuMakeID(SIU_MID_ECU,0), /* mag module ID (ECU module, channel 0) */
00296   0,                        /* Clock */
00297   TRUE,                     /* Clock is enabled */
00298   0,                        /* No tasks scheduled */
00299   3,                        /* Search scheduling tick */
00300   2,                        /* Update scheduling tick */
00301   1,                        /* MIPS allocation tick */
00302   4,                        /* Refresh rate (ticks) */
00303   80*65,                    /* Time increment for fuzzy scheduler */
00304   MAX_MIPS,                 /* allotted_mips      MIPS in U22.10 */
00305   0L,                       /* offset_mips        MIPS in U22.10 (0) */
00306   0L,                       /* channel_mips       MIPS in U22.10 (0) */
00307   0L,                       /* codec_mips         MIPS in U22.10 (0) */
00308   0L,                       /* ecufg_mips         MIPS in U22.10 (0) */
00309   MAX_MIPS,                 /* ecu_function_mips  MIPS in U22.10 */
00310   &magEcuStaticMips,      /* Pointer to ECU static MIPS structure */
00311   magTblCodecMips,        /* Pointer to codec MIPS table */
00312   0,                        /* Number of codec records */
00313   magTblChanMips,         /* Pointer to channel state MIPS table */
00314   0,                        /* Number of channel state records */
00315   magTblPcmExpand,        /* Pointer to PCM expansion MIPS table */
00316   /* mipTrack_t structures */
00317   {
00318     /* mipTrack_t structure for Search function */
00319     {
00320       0,                  /* Total MIPS in U6.10 (0)*/
00321       0,                  /* Zero Search instances open */
00322       0,                  /* Zero Search instances active */
00323       magTblEcuSearch   /* Pointer to Search MIPS coeff table */
00324     },
00325     /* mipTrack_t structure for BG Update function */
00326     {
00327       0,                  /* Total MIPS in U6.10 (0)*/
00328       0,                  /* Zero BG Update instances open */
00329       0,                  /* Zero BG Update instances active */
00330       magTblEcuUpdate   /* Pointer to BG Update MIPS coeff table */
00331     },
00332     /* mipTrack_t structure for Echo Removal function */
00333     {
00334       0,                  /* Total MIPS in U6.10 (0)*/
00335       0,                  /* Zero echo removal instances open */
00336       0,                  /* Zero echo removal instances active */
00337       magTblEcuRemove   /* Pointer to Echo Removal MIPS coeff table */
00338     }
00339   },
00340   /* Queue pointers */
00341   {
00342     &queue1[0],           /* Search Queue (no init necessary) */
00343     &queue2[0]            /* Update Queue (no init necessary)*/
00344   },
00345   &buf1[0],               /* Channel structures (no init necessary)*/
00346   &priority[0],           /* channel priority array */
00347   mag_dummy_dp,         /* Dummy function pointer */
00348   NULL,                   /* Debug streaming function pointer */
00349   (vfnptr) siuDebugInfo   /* Exception function pointer */
00350 };
00351
00352 /******************************************************************************/
00353 /*****************   END OF MIPS AGENT CONTEXT     ****************************/
00354 /******************************************************************************/
00355
00356 /******************************************************************************
00357  * FUNCTION PURPOSE:  Initialization of some MIPS agent structure fields
00358  ******************************************************************************
00359  * DESCRIPTION: Fills some fields of MIPS agent table that cannot be inserted in the
00360  *              mipsAgent table in ggcfg.c directly.
00361  *              Also, this function cannot be in ggcfg.c file because
00362  *              it needs to be where the above tables for codec and chan mips are
00363  *              created due to reference to their sizes i.e. in THIS file.
00364  *
00365  *****************************************************************************/
00366
00367 void ggmagTblInit(void)
00368 {
00369   mipsAgent.codecTableNumRecords    = sizeof(magTblCodecMips)/sizeof(magCodecMips_t);
00370   mipsAgent.chStateMipTblNumRecords = sizeof(magTblChanMips)/sizeof(magChStateMips_t);
00371 }
00372 #endif
00373
00374 /* 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 169 of file ecuauto.c.

void ecu_auto_print ( char * str )

Definition at line 181 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 192 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 204 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 216 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 230 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 248 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 304 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 391 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 455 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 496 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 576 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 779 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 805 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 831 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 922 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 954 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 997 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 1057 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 1132 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 1177 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 1222 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 1263 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 1285 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 1316 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 1348 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 1399 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 1434 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 1469 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 1493 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 1520 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 1570 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 1612 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 1641 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 1694 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 88 of file ecuauto.c.

Referenced by ecu_auto_set_defaults().

ecuAutoErr_e autoErrorId

Definition at line 91 of file ecuauto.c.

Referenced by ecu_auto_check_rc(), and ecu_auto_set_defaults().

tuint ecuVersion = 0

Definition at line 94 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

tuint ecuRevision = 0

Definition at line 95 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

tuint ecuPatch = 0

Definition at line 96 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

tuint ecuBuild = 0

Definition at line 97 of file ecuauto.c.

Referenced by ecuAuto_open_chn().

linSample sgnrxBuffer[ecu_AUTO_SGN_BUF_SZ]

Definition at line 100 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 101 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 104 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 105 of file ecuauto.c.

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

linSample routBuffer[ecu_AUTO_MAX_FRAME_SZ]

Definition at line 106 of file ecuauto.c.

Referenced by ecuAuto_process_loop(), and lec_auto_initialize().

linSample soutBuffer[ecu_AUTO_MAX_FRAME_SZ]

Definition at line 107 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 110 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 115 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 116 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 117 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 118 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 121 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 124 of file ecuauto.c.

Referenced by ecu_auto_set_defaults(), and ecu_auto_write_pcm().

tulong AutoDssMemAddr

Definition at line 125 of file ecuauto.c.

Referenced by ecu_auto_set_defaults(), and ecu_auto_write_pcm().

tint AutoDssFileType

Definition at line 126 of file ecuauto.c.

Referenced by ecu_auto_write_pcm().

tint AutoDssPcmFormat

Definition at line 127 of file ecuauto.c.

Referenced by ecu_auto_write_pcm().

char file_string[ecu_AUTO_MAX_STRING]

Definition at line 130 of file ecuauto.c.

Referenced by ecu_auto_close_fout(), and ecuAuto_prep_fout().

char print_string[ecu_AUTO_MAX_STRING]

Definition at line 131 of file ecuauto.c.

Referenced by ecu_auto_iprint(), and ecu_auto_sprint().

tint ecuAutoFrameSize

Definition at line 134 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 137 of file ecuauto.c.

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

tint ecuAutoFrmRemain

Definition at line 138 of file ecuauto.c.

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

ecuAutoConfig_t ecuAutoConfig

Definition at line 141 of file ecuauto.c.

ecuAutoConfig_t* autoCfg = &ecuAutoConfig

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

Referenced by ecu_auto_create_hyb(), and ecuAuto_create_chn().

#define ecu_AUTO_MAX_STRING 256

Definition at line 96 of file ecuauto.h.

Referenced by ecucmd_getflt_handler().

#define ecu_AUTO_DEF_FS 8000

Definition at line 97 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 98 of file ecuauto.h.

Referenced by ecu_auto_addmod_uta().

#define ecu_AUTO_NUM_HYB_INST 1

Definition at line 99 of file ecuauto.h.

Referenced by ecu_auto_addmod_uta().

#define ecu_AUTO_MARK_SIZE 8

Definition at line 100 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 101 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 102 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 103 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 104 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 105 of file ecuauto.h.

Referenced by lec_auto_initialize().

#define ecu_AUTO_MAX_TAIL_LEN (32 *ecu_AUTO_SAMP_PER_MS)

Definition at line 112 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 113 of file ecuauto.h.

#define ecu_AUTO_MAX_SEG_NUM 1

Definition at line 114 of file ecuauto.h.

#define ecu_AUTO_CHCFG_NLP_VALID 0x0001

Definition at line 233 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_ERL_VALID 0x0002

Definition at line 234 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_BYP_VALID 0x0004

Definition at line 235 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_HLD_VALID 0x0008

Definition at line 236 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

#define ecu_AUTO_CHCFG_CLR_VALID 0x0010

Definition at line 237 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 270 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_INIT_PATTERN 0x55

Definition at line 271 of file ecuauto.h.

Referenced by ecu_auto_create_hyb(), and ecucmd_chnnew_handler().

#define ecu_AUTO_DEF_GETFLT_BSIZE 128

Definition at line 272 of file ecuauto.h.

Referenced by ecuAuto_get_filter().

#define ecu_AUTO_DEF_PCM_HOLD_BSIZE ecu_AUTO_PCM_BSIZE

Definition at line 273 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_UTA_FNAME "test.tdf"

Definition at line 274 of file ecuauto.h.

Referenced by ecu_auto_create_uta().

#define ecu_AUTO_DEF_GETFLT_FNAME "hreg.txt"

Definition at line 275 of file ecuauto.h.

#define ecu_AUTO_DEF_RIN_FNAME "rin"

Definition at line 276 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_SIN_FNAME "sin"

Definition at line 277 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_ROUT_FNAME "rout"

Definition at line 278 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_SOUT_FNAME "sout"

Definition at line 279 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

#define ecu_AUTO_DEF_TEST_CHNUM 1

Definition at line 282 of file ecuauto.h.

#define ecu_AUTO_DEF_MIN_ERL ecu_AUTO_ERL_6DB

Definition at line 283 of file ecuauto.h.

#define ecu_AUTO_DEF_NLP_MODE ecu_AUTO_NLP_CNG_ON

Definition at line 284 of file ecuauto.h.

#define ecu_AUTO_DEF_FRAME_SZ (10*ecu_AUTO_SAMP_PER_MS)

Definition at line 285 of file ecuauto.h.

#define ecu_AUTO_DEF_Y2X_DELAY ecu_AUTO_DEF_FRAME_SZ

Definition at line 286 of file ecuauto.h.

#define ecu_AUTO_DEF_TAIL_LEN (128*ecu_AUTO_SAMP_PER_MS)

Definition at line 287 of file ecuauto.h.

#define ecu_AUTO_MIN_SEARCH (64*ecu_AUTO_SAMP_PER_MS)

Definition at line 288 of file ecuauto.h.

Referenced by ecuAuto_config_chn().

#define ecu_AUTO_DEF_HYB_ID 0xBBBB

Definition at line 291 of file ecuauto.h.

Referenced by ecu_auto_create_hyb().

#define ecu_AUTO_DEF_HYB_RX_DELAY 0

Definition at line 292 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_TX_DELAY 0

Definition at line 293 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_MODEL hyb_ST_G168_M1

Definition at line 294 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_ERL 6

Definition at line 295 of file ecuauto.h.

#define ecu_AUTO_DEF_HYB_DELAY (4*ecu_AUTO_SAMP_PER_MS)

Definition at line 296 of file ecuauto.h.

#define ecu_AUTO_DEF_SGN_DELAY 0

Definition at line 299 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 300 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 301 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 302 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 303 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 304 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn().

#define ecu_AUTO_DEF_SGN_TX_NSEED 0x5678

Definition at line 305 of file ecuauto.h.

Referenced by ecu_auto_init_txsgn().

#define ecu_AUTO_DEF_SGN_NTYPE sgn_NT_GAUSS

Definition at line 306 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 307 of file ecuauto.h.

Referenced by ecu_auto_init_rxsgn().

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

Definition at line 353 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 118 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_NOERR
ecu_AUTO_ERR

Definition at line 149 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_RXSGN
ecu_AUTO_TXSGN

Definition at line 155 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_MOD_SGN
ecu_AUTO_MOD_HYB
ecu_AUTO_MOD_ECU

Definition at line 161 of file ecuauto.h.

anonymous enum

Enumerator:
ecu_AUTO_MRK_NONE
ecu_AUTO_MRK_PRE
ecu_AUTO_MRK_POST

Definition at line 168 of file ecuauto.h.

enum ecuPcm_e

Enumerator:
ecu_AUTO_PCM_ALAW
ecu_AUTO_PCM_ULAW
ecu_AUTO_PCM_LIN

Definition at line 175 of file ecuauto.h.

enum ecuNlp_e

Enumerator:
ecu_AUTO_NLP_OFF
ecu_AUTO_NLP_ON
ecu_AUTO_NLP_CNG_ON

Definition at line 182 of file ecuauto.h.

enum ecuErl_e

Enumerator:
ecu_AUTO_ERL_6DB
ecu_AUTO_ERL_3DB
ecu_AUTO_ERL_0DB

Definition at line 189 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 196 of file ecuauto.h.

Function Documentation

void ecuAuto_process_loop ( ecuAutoLoopCfg_t * cfg )

Definition at line 304 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 391 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 455 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 496 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 576 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 779 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 805 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 831 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 169 of file ecuauto.c.

void ecu_auto_halt ( void )

void lec_auto_initialize ( void )

Definition at line 1057 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 997 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 230 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 1132 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 1177 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 922 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 954 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 1694 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 1641 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 1612 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 1570 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 1316 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 1222 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 1520 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 1493 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 1399 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 1434 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 1469 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 1263 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 1285 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 121 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *
00013  *              All rights reserved not granted herein.
00014  *
00015  *                         Limited License.
00016  *
00017  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00018  *  non-exclusive license under copyrights and patents it now or hereafter owns
00019  *  or controls to make, have made, use, import, offer to sell and sell
00020  *  ("Utilize") this software subject to the terms herein.  With respect to the
00021  *  foregoing patent license, such license is granted solely to the extent that
00022  *  any such patent is necessary to Utilize the software alone.  The patent
00023  *  license shall not apply to any combinations which include this software,
00024  *  other than combinations with devices manufactured by or for TI (“TI
00025  *  Devices”).  No hardware patent is licensed hereunder.
00026  *
00027  *  Redistributions must preserve existing copyright notices and reproduce this
00028  *  license (including the above copyright notice and the disclaimer and (if
00029  *  applicable) source code license limitations below) in the documentation
00030  *  and/or other materials provided with the distribution
00031  *
00032  *  Redistribution and use in binary form, without modification, are permitted
00033  *  provided that the following conditions are met:
00034  *
00035  *    *  No reverse engineering, decompilation, or disassembly of this software
00036  *  is permitted with respect to any software provided in binary form.
00037  *
00038  *    *  any redistribution and use are licensed by TI for use only with TI
00039  *  Devices.
00040  *
00041  *    *  Nothing shall obligate TI to provide you with source code for the
00042  *  software licensed and provided to you in object code.
00043  *
00044  *  If software source code is provided to you, modification and redistribution
00045  *  of the source code are permitted provided that the following conditions are
00046  *  met:
00047  *
00048  *    *  any redistribution and use of the source code, including any resulting
00049  *  derivative works, are licensed by TI for use only with TI Devices.
00050  *
00051  *    *  any redistribution and use of any object code compiled from the source
00052  *  code and any resulting derivative works, are licensed by TI for use only
00053  *  with TI Devices.
00054  *
00055  *  Neither the name of Texas Instruments Incorporated nor the names of its
00056  *  suppliers may be used to endorse or promote products derived from this
00057  *  software without specific prior written permission.
00058  *
00059  *  DISCLAIMER.
00060  *
00061  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00062  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00063  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00064  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00065  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00066  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00067  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00068  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00069  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00070  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00071  *  DAMAGE.
00072  *****************************************************************************/
00073
00074 /* ANSI C headers */
00075 #include <stdlib.h>
00076 #include <stdio.h>
00077 #include <string.h>
00078
00079 /* RTSC headers */
00080 #include <ti/mas/types/types.h>
00081 #include <ti/mas/types/const.h>
00082 #include <ti/mas/util/ecomem.h>
00083 #include <ti/mas/util/utl.h>
00084 #include <ti/mas/util/mua.h>
00085 #include <ti/mas/sdk/hyb.h>
00086 #include <ti/mas/sdk/sgn.h>
00087
00088 /* ECU Unit Test headers */
00089 #include <ti/mas/ecu/test/src/ecumem.h>
00090 #include <ti/mas/ecu/test/src/ecuautoport.h>
00091
00092
00093 /* Simulation constraints */
00094 #define ecu_AUTO_MAX_INST          1     /* Maximum ECU Instances        */
00095 #define ecu_AUTO_MAX_ECOBUFS      20     /* Maximum module buffers       */
00096 #define ecu_AUTO_MAX_STRING      256     /* Maximum string size          */
00097 #define ecu_AUTO_DEF_FS         8000     /* Sampling frequency           */
00098 #define ecu_AUTO_NUM_SGN_INST      2     /* Number of signal generators  */
00099 #define ecu_AUTO_NUM_HYB_INST      1     /* Number of hybrid simulations */
00100 #define ecu_AUTO_MARK_SIZE         8     /* Number of samples in marker  */
00101 #define ecu_AUTO_SAMP_PER_MS    (ecu_AUTO_DEF_FS/1000)     /* Samples per ms */
00102 #define ecu_AUTO_MAX_DELAY      (10 *ecu_AUTO_SAMP_PER_MS) /* Maximum system delay */
00103 #define ecu_AUTO_SGN_FRAME_SZ   (40 *ecu_AUTO_SAMP_PER_MS) /* SigGen frame size  */
00104 #define ecu_AUTO_MAX_FRAME_SZ   (10 *ecu_AUTO_SAMP_PER_MS) /* Max ECU frame size */
00105 #define ecu_AUTO_SGN_BUF_SZ     (ecu_AUTO_SGN_FRAME_SZ+(2*ecu_AUTO_MAX_FRAME_SZ))
00106
00107 #if ecu_SEARCH_ENABLE
00108 # define ecu_AUTO_MAX_TAIL_LEN   (128*ecu_AUTO_SAMP_PER_MS) /* Maximum tail length     */
00109 # define ecu_AUTO_MAX_SEG_LEN    (32 *ecu_AUTO_SAMP_PER_MS) /* Maximum seg length      */
00110 # define ecu_AUTO_MAX_SEG_NUM     3                         /* Maximum filter segments */
00111 #else
00112 # define ecu_AUTO_MAX_TAIL_LEN   (32 *ecu_AUTO_SAMP_PER_MS) /* Maximum tail length      */
00113 # define ecu_AUTO_MAX_SEG_LEN    (32 *ecu_AUTO_SAMP_PER_MS) /* Maximum seg length       */
00114 # define ecu_AUTO_MAX_SEG_NUM     1                         /* Maximum filter segments  */
00115 #endif
00116
00117 /* Error identifier enumerations */
00118 typedef enum {
00119   ecu_AUTO_ERR_NONE        = 0x0000,     /* ECU NO ERROR           */
00120   ecu_AUTO_ERR_HYBGETSZ    = 0x1000,     /* HYB API ERRORS         */
00121   ecu_AUTO_ERR_HYBNEW,                   /* hybNew()               */
00122   ecu_AUTO_ERR_HYBOPEN,                  /* hybOpen()              */
00123   ecu_AUTO_ERR_HYBCONTROL,               /* hybControl()           */
00124   ecu_AUTO_ERR_HYBECHO,                  /* hybAddEcho()           */
00125   ecu_AUTO_ERR_SGNGETSZ    = 0x2000,     /* SGN API ERRORS         */
00126   ecu_AUTO_ERR_ECUNEW      = 0x3000,     /* ECU API ERRORS         */
00127   ecu_AUTO_ERR_ECUGETSZ,                 /* ecuGetSizes()          */
00128   ecu_AUTO_ERR_ECUCONTROL,               /* ecuControl()           */
00129   ecu_AUTO_ERR_ECUGETFLT,                /* ecuGetFilter()         */
00130   ecu_AUTO_ERR_UTAGETSZ    = 0x4000,     /* UTA API ERRORS         */
00131   ecu_AUTO_ERR_UTAINIT,                  /* utaInit()              */
00132   ecu_AUTO_ERR_UTAADDMOD,                /* utaAddModule()         */
00133   ecu_AUTO_ERR_UTAPROC,                  /* utaProcess()           */
00134   ecu_AUTO_ERR_UTAMOD,                   /* utaProcess MOD error   */
00135   ecu_AUTO_ERR_UTACMD,                   /* utaProcess CMD error   */
00136   ecu_AUTO_ERR_UTAIDX,                   /* utaProcess IDX error   */
00137   ecu_AUTO_ERR_UTAOPT,                   /* utaProcess OPT error   */
00138   ecu_AUTO_ERR_CREATECHN   = 0x6000,     /* ECU AUTO API ERRORS    */
00139   ecu_AUTO_ERR_DELETECHN,                /* ecuAuto_delete_chn()   */
00140   ecu_AUTO_ERR_OPENCHN,                  /* ecuAuto_open_chn()     */
00141   ecu_AUTO_ERR_CONFIGCHN,                /* ecuAuto_config_chn()   */
00142   ecu_AUTO_ERR_CLOSECHN,                 /* ecuAuto_close_chn()    */
00143   ecu_AUTO_ERR_NUMBUF,                   /* ecu_AUTO_MAX_ECOBUFS   */
00144   ecu_AUTO_ERR_GETFILTER,                /* ecuAuto_get_filter()   */
00145   ecu_AUTO_ERR_GETVERSION                /* ecuAuto_prnt_version() */
00146 } ecuAutoErr_e;
00147
00148 /* Automation error indication  */
00149 enum {
00150   ecu_AUTO_NOERR,                            /* Simulation function pass         */
00151   ecu_AUTO_ERR                               /* Simulation function failure      */
00152 };
00153
00154 /* Signal generator enumeration */
00155 enum {
00156   ecu_AUTO_RXSGN,                            /* RX path signal generator         */
00157   ecu_AUTO_TXSGN                             /* TX path signal generator         */
00158 };
00159
00160 /* Module enumeration for UTA */
00161 enum {
00162   ecu_AUTO_MOD_SGN,                          /* Signal generator module          */
00163   ecu_AUTO_MOD_HYB,                          /* Hybrid simulation module         */
00164   ecu_AUTO_MOD_ECU                           /* ECU ECAN module                  */
00165 };
00166
00167 /* Marker enumeration for UTA */
00168 enum {
00169   ecu_AUTO_MRK_NONE,                          /* Provide no marker               */
00170   ecu_AUTO_MRK_PRE,                           /* Provide marker before data      */
00171   ecu_AUTO_MRK_POST                           /* Provide marker after data       */
00172 };
00173
00174 /* Automation PCM format enumeration */
00175 typedef enum {
00176   ecu_AUTO_PCM_ALAW  = const_COMP_ALAW_8,    /* 8-bit ulaw PCM                   */
00177   ecu_AUTO_PCM_ULAW  = const_COMP_MULAW_8,   /* 8-bit alaw PCM                   */
00178   ecu_AUTO_PCM_LIN   = const_COMP_LINEAR     /* Linear PCM (Platform-Endian)     */
00179 } ecuPcm_e;
00180
00181 /* Automation NLP configuration */
00182 typedef enum {
00183   ecu_AUTO_NLP_OFF    = 0x0000,              /* NLP disabled                     */
00184   ecu_AUTO_NLP_ON     = ecu_ENABLE_NLP,      /* NLP enabled, CNG fixed           */
00185   ecu_AUTO_NLP_CNG_ON = ecu_ENABLE_CNG_ADAPT /* NLP enabled, CNG adaptive        */
00186 } ecuNlp_e;
00187
00188 /* Automation minimum ERL configuration */
00189 typedef enum {
00190   ecu_AUTO_ERL_6DB = 0x0000,                 /* Minimum ERL expected - 6dB       */
00191   ecu_AUTO_ERL_3DB = ecu_ERL_CONFIG_BIT_0,   /* Minimum ERL expected - 3dB       */
00192   ecu_AUTO_ERL_0DB = ecu_ERL_CONFIG_BIT_1    /* Minimum ERL expected - 0dB       */
00193 } ecuErl_e;
00194
00195 /* Automation Output file enumeration */
00196 enum {
00197   ecu_AUTO_FILE_RIN,                         /* Rin file in file array           */
00198   ecu_AUTO_FILE_ROUT,                        /* Rout file in file array          */
00199   ecu_AUTO_FILE_SIN,                         /* Sin file in file array           */
00200   ecu_AUTO_FILE_SOUT,                        /* Sout file in file array          */
00201   ecu_AUTO_NUM_OUTFILES                      /* Size of output file array        */
00202 };
00203
00204 /* ECU PCM file output structure */
00205 typedef struct {
00206   tbool     output_data;                    /* TRUE: Output PCM data            */
00207   tbool     output_mark;                    /* TRUE: Output a marker            */
00208                                             /*   "output_data" must be TRUE     */
00209   tbool     output_flush;                   /* TRUE: Flush output               */
00210   ecuPcm_e  pcm_format;                     /* PCM output format                */
00211   tint      file_type;                      /* File type enumeration            */
00212   FILE      *fptr;                          /* File pointer for read/write      */
00213   linSample *buf;                           /* Buffer from which to output      */
00214   tword     *hold_buf;                      /* Holding buffer between FWRITEs   */
00215   tlong     hold_buf_sz;                    /* Size of holding buf (bytes)      */
00216   tint      hold_count;                     /* Current hold count               */
00217   char      fname[ecu_AUTO_MAX_STRING];      /* File name for output data        */
00218   void      (*pcmout_fcn) (void *fout);     /* PCM output fcn (READ ONLY)       */
00219 } ecuAutoFout_t;
00220 extern ecuAutoFout_t outFile[];
00221
00222 /* ECU Channel configuration structure */
00223 typedef struct {
00224   tuint    valid_bitfield;                  /* Designates valid parameters      */
00225   ecuNlp_e nlp_mode;                        /* NLP/CNG mode                     */
00226   ecuErl_e min_erl;                         /* Minimum expected ERL             */
00227   tbool    bypass;                          /* TRUE: Channel placed in bypass   */
00228   tbool    hreg_hold;                       /* TRUE: H-register contents frozen */
00229   tbool    hreg_clear;                      /* TRUE: H-register contents reset  */
00230 } ecuChnConfig_t;
00231
00232 /* Definitions for ecuChnConfig_t valid_bitfield */
00233 #define ecu_AUTO_CHCFG_NLP_VALID    0x0001  /* NLP configuration change         */
00234 #define ecu_AUTO_CHCFG_ERL_VALID    0x0002  /* Minimum ERL setting change       */
00235 #define ecu_AUTO_CHCFG_BYP_VALID    0x0004  /* ECU Bypass requested             */
00236 #define ecu_AUTO_CHCFG_HLD_VALID    0x0008  /* H-register hold config change    */
00237 #define ecu_AUTO_CHCFG_CLR_VALID    0x0010  /* H-register clear requested       */
00238
00239 /* ECU Run-time parameter structure */
00240 typedef struct {
00241   tint  pcm_format;                         /* PCM companding law               */
00242   tint  chn_index;                          /* Index of channel under test      */
00243   tint  marker;                             /* Marker type enumeration          */
00244   tlong time_ms;                            /* Time (ms) to process             */
00245   tbool enable_out;                         /* TRUE: Perform sample output      */
00246 } ecuAutoLoopCfg_t;
00247
00248 /* Automation configuration structure */
00249 typedef struct {
00250   /* Automation configuration booleans */
00251   tbool verbose_print;                      /* TRUE: Provide progress info      */
00252   tbool cache_enable;                       /* TRUE: Enable and configure cache */
00253   tbool cache_flush;                        /* TRUE: Flush cache each pass      */
00254   tbool get_filter;                         /* TRUE: Dump online filter coeffs  */
00255   tbool dss_output;                         /* TRUE: Output file data via DSS   */
00256   tbool output_rin;                         /* Rin PCM output structure         */
00257   tbool output_sin;                         /* Sin PCM output structure         */
00258   tbool output_rout;                        /* Rout PCM output structure        */
00259   tbool output_sout;                        /* Sout PCM output structure        */
00260
00261   tuint iteration;                          /* Main loop iteration count        */
00262   tlong pcm_hold_sz;                        /* Size of local PCM buffer (bytes) */
00263   tlong sample_cnt;                         /* Overall processed sample counter */
00264   tlong second_cnt;                         /* Seconds counter                  */
00265   tlong sample_bp;                          /* Break when sample_bp is reached  */
00266 } ecuAutoConfig_t;
00267
00268
00269 /* Simulation defaults */
00270 #define ecu_AUTO_DEF_PCM_FORMAT        ecu_AUTO_PCM_ULAW
00271 #define ecu_AUTO_DEF_INIT_PATTERN      0x55
00272 #define ecu_AUTO_DEF_GETFLT_BSIZE      128
00273 #define ecu_AUTO_DEF_PCM_HOLD_BSIZE    ecu_AUTO_PCM_BSIZE
00274 #define ecu_AUTO_DEF_UTA_FNAME         "test.tdf"
00275 #define ecu_AUTO_DEF_GETFLT_FNAME      "hreg.txt"
00276 #define ecu_AUTO_DEF_RIN_FNAME         "rin"
00277 #define ecu_AUTO_DEF_SIN_FNAME         "sin"
00278 #define ecu_AUTO_DEF_ROUT_FNAME        "rout"
00279 #define ecu_AUTO_DEF_SOUT_FNAME        "sout"
00280
00281 /* Channel defaults */
00282 #define ecu_AUTO_DEF_TEST_CHNUM        1
00283 #define ecu_AUTO_DEF_MIN_ERL           ecu_AUTO_ERL_6DB
00284 #define ecu_AUTO_DEF_NLP_MODE          ecu_AUTO_NLP_CNG_ON
00285 #define ecu_AUTO_DEF_FRAME_SZ          (10*ecu_AUTO_SAMP_PER_MS)
00286 #define ecu_AUTO_DEF_Y2X_DELAY         ecu_AUTO_DEF_FRAME_SZ
00287 #define ecu_AUTO_DEF_TAIL_LEN          (128*ecu_AUTO_SAMP_PER_MS)
00288 #define ecu_AUTO_MIN_SEARCH            (64*ecu_AUTO_SAMP_PER_MS)
00289
00290 /* Hybrid defaults */
00291 #define ecu_AUTO_DEF_HYB_ID            0xBBBB
00292 #define ecu_AUTO_DEF_HYB_RX_DELAY      0
00293 #define ecu_AUTO_DEF_HYB_TX_DELAY      0
00294 #define ecu_AUTO_DEF_HYB_MODEL         hyb_ST_G168_M1
00295 #define ecu_AUTO_DEF_HYB_ERL           6
00296 #define ecu_AUTO_DEF_HYB_DELAY         (4*ecu_AUTO_SAMP_PER_MS)
00297
00298 /* Signal generator defaults */
00299 #define ecu_AUTO_DEF_SGN_DELAY         0
00300 #define ecu_AUTO_DEF_SGN_DCOFF         0
00301 #define ecu_AUTO_DEF_SGN_FREQ1         1004
00302 #define ecu_AUTO_DEF_SGN_AMP1          4096
00303 #define ecu_AUTO_DEF_SGN_NLEVEL        (-70)
00304 #define ecu_AUTO_DEF_SGN_RX_NSEED      0x1234
00305 #define ecu_AUTO_DEF_SGN_TX_NSEED      0x5678
00306 #define ecu_AUTO_DEF_SGN_NTYPE         sgn_NT_GAUSS
00307 #define ecu_AUTO_DEF_SGN_SLEVEL        (-10)
00308
00309
00310 /* Simulation Specific Function Prototypes */
00311 void ecuAuto_process_loop (ecuAutoLoopCfg_t *cfg);
00312 void ecuAuto_prep_fout    (void);
00313
00314 /* ECU Channel Function Prototypes */
00315 tuint ecuAuto_create_chn  (tint index, ecuNewConfig_t *ncfg, ecuMemConfig_t *mcfg);
00316 tuint ecuAuto_open_chn    (tint index, ecuConfig_t *cfg);
00317 tuint ecuAuto_config_chn  (tint index, ecuChnConfig_t *cfg);
00318 tuint ecuAuto_close_chn   (tint index);
00319 tuint ecuAuto_delete_chn  (tint index);
00320 tuint ecuAuto_get_filter  (tint index, tint filter, char *fname);
00321
00322
00323 /* ECU Automation internal API functions ("ecu_auto_") */
00324 void ecu_auto_exception    (tuint id, tuint type, tuint code, tuint length, tuint *data);
00325 void ecu_auto_halt         (void);
00326 void lec_auto_initialize   (void);
00327 void ecu_auto_set_defaults (void);
00328 void ecu_auto_check_rc     (ecuAutoErr_e id, tuint rc, tuint pass_code);
00329 void ecu_auto_init_rxsgn   (void);
00330 void ecu_auto_init_txsgn   (void);
00331 void ecu_auto_gen_sgnfrms  (void);
00332 void ecu_auto_addmod_uta   (tint module);
00333 void ecu_auto_create_sgn   (void **inst);
00334 void ecu_auto_create_hyb   (void);
00335 void ecu_auto_create_uta   (void);
00336 void ecu_auto_process_uta  (void);
00337 void ecu_auto_sample_cnt   (void);
00338 void ecu_auto_compand      (tint pcm_format, linSample *in, linSample *out);
00339 void ecu_auto_close_fout   (void);
00340 void ecu_auto_output_pcm   (tbool enable, tbool marker, tbool flush);
00341 void ecu_auto_output_ulaw  (void *vfout);
00342 void ecu_auto_output_alaw  (void *vfout);
00343 void ecu_auto_output_lin   (void *vfout);
00344 void ecu_auto_dline_pack   (tint pcm_format, linSample *in, tword *out);
00345 void ecu_auto_dline_unpack (tint pcm_format, tword *in, linSample *out);
00346
00347
00348 /*-----------------------------------------------------------------
00349  * Macro:  ecu_AUTO_PRINT_DONE
00350  *
00351  * Description: Utility to print completion of a task.
00352  *-----------------------------------------------------------------*/
00353 #define ecu_AUTO_PRINT_DONE() { ecu_auto_print (" DONE\n"); }
00354
00355 #endif /* _ECUAUTO_H */
00356
00357 /* 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 83 of file ecuautoport.h.

#define ecu_WIDE_BAND FALSE

Definition at line 90 of file ecuautoport.h.

#define ecu_DELAY_LINE_COMPRESS FALSE

Definition at line 100 of file ecuautoport.h.

#define ecu_INST_RELOCATION FALSE

Definition at line 110 of file ecuautoport.h.

#define ecu_5P5MS_FRAME_ENABLE FALSE

Definition at line 119 of file ecuautoport.h.

#define ecu_DBGSTRM_ENABLE FALSE

Definition at line 128 of file ecuautoport.h.

#define ecu_03DB_ENABLE FALSE

Definition at line 135 of file ecuautoport.h.

#define ecu_CPD_ENABLE FALSE

Definition at line 142 of file ecuautoport.h.

#define ecu_RERL_ENABLE FALSE

Definition at line 149 of file ecuautoport.h.

#define _ECUAUTOPORT_C54 0

Definition at line 155 of file ecuautoport.h.

#define _ECUAUTOPORT_C54F 0

Definition at line 161 of file ecuautoport.h.

#define _ECUAUTOPORT_C55 0

Definition at line 167 of file ecuautoport.h.

#define _ECUAUTOPORT_C55L 0

Definition at line 173 of file ecuautoport.h.

#define _ECUAUTOPORT_C64 0

Definition at line 179 of file ecuautoport.h.

#define _ECUAUTOPORT_C64_BIG_ENDIAN 0

Definition at line 185 of file ecuautoport.h.

#define _ECUAUTOPORT_C64P 0

Definition at line 191 of file ecuautoport.h.

#define _ECUAUTOPORT_C64P_BIG_ENDIAN 0

Definition at line 197 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C64P 0

Definition at line 203 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 209 of file ecuautoport.h.

#define _ECUAUTOPORT_C66 0

Definition at line 215 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C66 0

Definition at line 221 of file ecuautoport.h.

#define _ECUAUTOPORT_C66_BIG_ENDIAN 0

Definition at line 227 of file ecuautoport.h.

#define _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 233 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *
00013  *              All rights reserved not granted herein.
00014  *
00015  *                         Limited License.
00016  *
00017  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00018  *  non-exclusive license under copyrights and patents it now or hereafter owns
00019  *  or controls to make, have made, use, import, offer to sell and sell
00020  *  ("Utilize") this software subject to the terms herein.  With respect to the
00021  *  foregoing patent license, such license is granted solely to the extent that
00022  *  any such patent is necessary to Utilize the software alone.  The patent
00023  *  license shall not apply to any combinations which include this software,
00024  *  other than combinations with devices manufactured by or for TI (“TI
00025  *  Devices”).  No hardware patent is licensed hereunder.
00026  *
00027  *  Redistributions must preserve existing copyright notices and reproduce this
00028  *  license (including the above copyright notice and the disclaimer and (if
00029  *  applicable) source code license limitations below) in the documentation
00030  *  and/or other materials provided with the distribution
00031  *
00032  *  Redistribution and use in binary form, without modification, are permitted
00033  *  provided that the following conditions are met:
00034  *
00035  *    *  No reverse engineering, decompilation, or disassembly of this software
00036  *  is permitted with respect to any software provided in binary form.
00037  *
00038  *    *  any redistribution and use are licensed by TI for use only with TI
00039  *  Devices.
00040  *
00041  *    *  Nothing shall obligate TI to provide you with source code for the
00042  *  software licensed and provided to you in object code.
00043  *
00044  *  If software source code is provided to you, modification and redistribution
00045  *  of the source code are permitted provided that the following conditions are
00046  *  met:
00047  *
00048  *    *  any redistribution and use of the source code, including any resulting
00049  *  derivative works, are licensed by TI for use only with TI Devices.
00050  *
00051  *    *  any redistribution and use of any object code compiled from the source
00052  *  code and any resulting derivative works, are licensed by TI for use only
00053  *  with TI Devices.
00054  *
00055  *  Neither the name of Texas Instruments Incorporated nor the names of its
00056  *  suppliers may be used to endorse or promote products derived from this
00057  *  software without specific prior written permission.
00058  *
00059  *  DISCLAIMER.
00060  *
00061  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00062  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00063  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00064  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00065  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00066  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00067  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00068  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00069  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00070  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00071  *  DAMAGE.
00072  *****************************************************************************/
00073 #ifndef _ECUAUTOPORT_H
00074 #define _ECUAUTOPORT_H
00075
00076 /* buildfile command line options */
00077
00078 /* Command line search enable/disable (ECU_TAIL) */
00079 #ifdef ENABLE_SEARCH
00080 #define ecu_SEARCH_ENABLE        TRUE /* TRUE:  Use search algorithm, request
00081                                        *        memory for search. */
00082 #else
00083 #define ecu_SEARCH_ENABLE       FALSE /* FALSE: Full filter implementation. */
00084 #endif
00085
00086 /* Command line WB enable/disable (WB=YES/NO) */
00087 #ifdef ENABLE_WB
00088 #define ecu_WIDE_BAND            TRUE /* TRUE:  Use wide band canceller */
00089 #else
00090 #define ecu_WIDE_BAND           FALSE /* FALSE: narrow band only */
00091 #endif
00092
00093 /* Command line PCM delay line compression enable/disable (ecu_DLCOMP=YES/NO) */
00094 #ifdef ENABLE_COMPRESS
00095 #define ecu_DELAY_LINE_COMPRESS  TRUE /* TRUE:  Assume that we receive compressed
00096                                        *        and packed PCM samples for our delay
00097                                        *        line from the PIU.  Perform expansion
00098                                        *        before usage.  */
00099 #else
00100 #define ecu_DELAY_LINE_COMPRESS FALSE /* FALSE: Assume that we DO NOT receive compressed
00101                                        *        and packed PCM samples for our delay
00102                                        *        line from the PIU. */
00103 #endif
00104
00105 /* Command line instance relocation enable/disable (ecu_RELOC=YES/NO) */
00106 #ifdef ENABLE_RELOC
00107 #define ecu_INST_RELOCATION      TRUE /* TRUE:  Assume that we DO support instance
00108                                                 relocation.  */
00109 #else
00110 #define ecu_INST_RELOCATION     FALSE /* FALSE: Assume that we DO NOT support instance
00111                                                 relocation. */
00112 #endif
00113
00114 /* Command line 5.5ms frame handling enable/disable (ecu_5P5MS=YES/NO) */
00115 #ifdef ENABLE_5P5MS
00116 #define ecu_5P5MS_FRAME_ENABLE   TRUE /* TRUE:  Allow multiple of 5.5ms AND 5ms frame
00117                                        *        sizes. */
00118 #else
00119 #define ecu_5P5MS_FRAME_ENABLE  FALSE /* FALSE: Allow multiple of 5ms frame sizes
00120                                        *        only. */
00121 #endif
00122
00123 /* Command line debug streaming enable/disable (ecu_DEBUG=YES/NO) */
00124 #ifdef ENABLE_DEBUG
00125 #define ecu_DBGSTRM_ENABLE       TRUE /* TRUE:  Compile in debug streaming messages
00126                                        *        through DS0's defined in siudbgstrm.h. */
00127 #else
00128 #define ecu_DBGSTRM_ENABLE      FALSE /* FALSE: No debug streaming messages. */
00129 #endif
00130
00131 /* Command line 0/3dB configuration enable/disable (ecu_03DB=YES/NO) */
00132 #ifdef ENABLE_03DB
00133 #define ecu_03DB_ENABLE          TRUE /* TRUE:  Enable 0/3dB ERL support */
00134 #else
00135 #define ecu_03DB_ENABLE         FALSE /* FALSE: Disable 0/3dB ERL support */
00136 #endif
00137
00138 /* Command line constant PCM pattern detection enable/disable (ecu_CPD=YES/NO) */
00139 #ifdef ENABLE_CPD
00140 #define ecu_CPD_ENABLE           TRUE /* TRUE:  Enable const PCM detection */
00141 #else
00142 #define ecu_CPD_ENABLE          FALSE /* FALSE: Disable const PCM detection */
00143 #endif
00144
00145 /* Command line RERL estimation enable/disable (ecu_RERL=YES/NO) */
00146 #ifdef ENABLE_RERL
00147 #define ecu_RERL_ENABLE          TRUE /* TRUE:  Enable RERL estimation  */
00148 #else
00149 #define ecu_RERL_ENABLE         FALSE /* FALSE: Disable RERL estimation */
00150 #endif
00151
00152 #ifdef ti_targets_C54
00153 #define _ECUAUTOPORT_C54 1
00154 #else
00155 #define _ECUAUTOPORT_C54 0
00156 #endif
00157
00158 #ifdef ti_targets_C54_far
00159 #define _ECUAUTOPORT_C54F 1
00160 #else
00161 #define _ECUAUTOPORT_C54F 0
00162 #endif
00163
00164 #ifdef ti_targets_C55
00165 #define _ECUAUTOPORT_C55 1
00166 #else
00167 #define _ECUAUTOPORT_C55 0
00168 #endif
00169
00170 #ifdef ti_targets_C55_large
00171 #define _ECUAUTOPORT_C55L 1
00172 #else
00173 #define _ECUAUTOPORT_C55L 0
00174 #endif
00175
00176 #ifdef ti_targets_C64
00177 #define _ECUAUTOPORT_C64 1
00178 #else
00179 #define _ECUAUTOPORT_C64 0
00180 #endif
00181
00182 #ifdef ti_targets_C64_big_endian
00183 #define _ECUAUTOPORT_C64_BIG_ENDIAN 1
00184 #else
00185 #define _ECUAUTOPORT_C64_BIG_ENDIAN 0
00186 #endif
00187
00188 #ifdef ti_targets_C64P
00189 #define _ECUAUTOPORT_C64P 1
00190 #else
00191 #define _ECUAUTOPORT_C64P 0
00192 #endif
00193
00194 #ifdef ti_targets_C64P_big_endian
00195 #define _ECUAUTOPORT_C64P_BIG_ENDIAN 1
00196 #else
00197 #define _ECUAUTOPORT_C64P_BIG_ENDIAN 0
00198 #endif
00199
00200 #ifdef ti_targets_elf_C64P
00201 #define _ECUAUTOPORT_ELF_C64P 1
00202 #else
00203 #define _ECUAUTOPORT_ELF_C64P 0
00204 #endif
00205
00206 #ifdef ti_targets_elf_C64P_big_endian
00207 #define _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 1
00208 #else
00209 #define _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN 0
00210 #endif
00211
00212 #ifdef ti_targets_C66
00213 #define _ECUAUTOPORT_C66 1
00214 #else
00215 #define _ECUAUTOPORT_C66 0
00216 #endif
00217
00218 #ifdef ti_targets_elf_C66
00219 #define _ECUAUTOPORT_ELF_C66 1
00220 #else
00221 #define _ECUAUTOPORT_ELF_C66 0
00222 #endif
00223
00224 #ifdef ti_targets_C66_big_endian
00225 #define _ECUAUTOPORT_C66_BIG_ENDIAN 1
00226 #else
00227 #define _ECUAUTOPORT_C66_BIG_ENDIAN 0
00228 #endif
00229
00230 #ifdef ti_targets_elf_C66_big_endian
00231 #define _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 1
00232 #else
00233 #define _ECUAUTOPORT_ELF_C66_BIG_ENDIAN 0
00234 #endif
00235
00236
00237 #if   (_ECUAUTOPORT_C54 || _ECUAUTOPORT_C54F)
00238 #include <ti/mas/ecu/test/src/c54/ecuautoport.h>
00239 #elif (_ECUAUTOPORT_C55 || _ECUAUTOPORT_C55L)
00240 #include <ti/mas/ecu/test/src/c55/ecuautoport.h>
00241 #elif (_ECUAUTOPORT_C64       || _ECUAUTOPORT_C64_BIG_ENDIAN      || \
00242        _ECUAUTOPORT_C64P      || _ECUAUTOPORT_C64P_BIG_ENDIAN     || \
00243        _ECUAUTOPORT_ELF_C64P  || _ECUAUTOPORT_ELF_C64P_BIG_ENDIAN || \
00244        _ECUAUTOPORT_C66       || _ECUAUTOPORT_C66_BIG_ENDIAN      || \
00245        _ECUAUTOPORT_ELF_C66   || _ECUAUTOPORT_ELF_C66_BIG_ENDIAN)
00246 #include <ti/mas/ecu/test/src/c64/ecuautoport.h>
00247 #else
00248 #error invalid target
00249 #endif
00250
00251 #endif /* _ECUAUTOPORT_H */
00252 /* 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 87 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 126 of file ecufio.c.

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

Definition at line 148 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 184 of file ecufio.c.

Referenced by ecu_sim_input().

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

Definition at line 201 of file ecufio.c.

Referenced by ecu_sim_input().

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

Definition at line 217 of file ecufio.c.

Referenced by ecu_sim_output().

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

Definition at line 234 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 259 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 296 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 135 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #include <string.h>
00072
00073 #include <ti/mas/util/mua.h>
00074 /* Associated header */
00075 #include <ti/mas/ecu/test/src/ecufio.h>
00076 #include <ti/mas/ecu/test/src/ecusim.h>
00077
00078 /* External references */
00079 extern volatile siuSetup_t *ecuSim;
00080
00081
00082 /*-----------------------------------------------------------------
00083  * Function:  ecu_sim_fileio_init
00084  *
00085  * Description: Initialize simulation for file I/O
00086  *-----------------------------------------------------------------*/
00087 void ecu_sim_fileio_init (volatile ecuSimFileIo_t *fioptr, tuint code)
00088 {
00089   if (fioptr->fio) {
00090     /* Ensure that file pointer is NULL (closed) */
00091     if (fioptr->fptr != NULL) {
00092       printf (" - File already open: %s\n", fioptr->fname);
00093       return;
00094     }
00095
00096     /* Open file (read/write binary) and assign file pointer */
00097     if (code == ecu_SIM_FILEIO_READ) {
00098       fioptr->fptr = fopen ((const char *) fioptr->fname, "rb");
00099     }
00100     else if (code == ecu_SIM_FILEIO_WRITE) {
00101       fioptr->fptr = fopen ((const char *) fioptr->fname, "wb");
00102     }
00103     else {
00104       printf ("Error: unrecognized file action %d \n", code);
00105       return;
00106     }
00107
00108     /* Ensure open success */
00109     if (fioptr->fptr == NULL) {
00110       printf ("Unable to open file: %s\n", fioptr->fname);
00111       fioptr->fio = FALSE;
00112     }
00113     else {
00114       printf (" - Opened file: %s\n", fioptr->fname);
00115       fioptr->eof = FALSE;
00116     }
00117   }
00118 }
00119
00120
00121 /*-----------------------------------------------------------------
00122  * Function:  ecu_sim_fileio_end
00123  *
00124  * Description: Clear simulation after file I/O
00125  *-----------------------------------------------------------------*/
00126 void ecu_sim_fileio_end (volatile ecuSimFileIo_t *fioptr)
00127 {
00128   if (fioptr->fio) {
00129     /* Close file pointer */
00130     if (fioptr->fptr == NULL) {
00131       printf ("Warning: premature file close\n");
00132     }
00133     else {
00134       if (fioptr->eof) {
00135         fclose (fioptr->fptr);
00136         fioptr->fptr = (FILE *) NULL;
00137         /* Print progress */
00138         printf (" - Closed file: %s\n", fioptr->fname);
00139       }
00140     }
00141   }
00142 }
00143 /*-----------------------------------------------------------------
00144  * Function:  ecu_sim_fread
00145  *
00146  * Description: Perform file input
00147  *-----------------------------------------------------------------*/
00148 tbool ecu_sim_fread (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
00149 {
00150   tuint num;
00151   tuint sample_size;
00152
00153   tbool ret_code = FALSE;
00154
00155   if (fioptr->fio) {
00156     /* Set the sample size (in twords) */
00157     sample_size = sizeof(tword);
00158     if (ecuSim->pcm_format == const_COMP_LINEAR) {
00159       sample_size = sizeof(linSample)/sizeof(tword);
00160
00161     }
00162
00163     /* Read from the file */
00164     num = fread (buf, sample_size, buf_size, fioptr->fptr);
00165
00166     /* check for end of file */
00167     if (num != (sample_size * buf_size)) {
00168       fioptr->eof = TRUE;
00169     }
00170     else {
00171       ret_code = TRUE;
00172     }
00173   }
00174   /* Indicate if EOF has been reached */
00175   return (ret_code);
00176 }
00177
00178
00179 /*-----------------------------------------------------------------
00180  * Function:  ecu_sim_get_xlaw
00181  *
00182  * Description: Copy and expand U/A-law PCM samples
00183  *-----------------------------------------------------------------*/
00184 void ecu_sim_get_xlaw (tword *src, linSample *dst, tint n, const tint *tbl)
00185 {
00186   tuint i;
00187   tuint index;
00188
00189   for (i=0; i<n; i++) {
00190     index  = (tuint) src[i];
00191     dst[i] = (linSample) tbl[index];
00192   }
00193 }
00194
00195
00196 /*-----------------------------------------------------------------
00197  * Function:  ecu_sim_get_linear
00198  *
00199  * Description: Copy linear PCM samples
00200  *-----------------------------------------------------------------*/
00201 void ecu_sim_get_linear (tword *src, linSample *dst, tint n)
00202 {
00203   tuint i;
00204   linSample *pcm = (linSample *) src;
00205
00206   for (i=0; i<n; i++) {
00207     dst[i] = pcm[i];
00208   }
00209 }
00210
00211
00212 /*-----------------------------------------------------------------
00213  * Function:  ecu_sim_put_linear
00214  *
00215  * Description: Copy linear PCM samples
00216  *-----------------------------------------------------------------*/
00217 void ecu_sim_put_linear (linSample *src, tword *dst, tint n)
00218 {
00219   tuint i;
00220   linSample *pcm = (linSample *) dst;
00221
00222   for (i=0; i<n; i++) {
00223     pcm[i] = src[i];
00224   }
00225 }
00226
00227
00228 /*-----------------------------------------------------------------
00229  * Function:  ecu_sim_input_mux
00230  *
00231  * Description: Get input samples and expand/shift before
00232  *              broadcasting to all active channels.
00233  *-----------------------------------------------------------------*/
00234 void ecu_sim_input(tword *buf, linSample *linbuf)
00235 {
00236   /* Convert to linear PCM format (if necessary) */
00237   switch (ecuSim->pcm_format) {
00238   /* A-law 8-bit PCM */
00239   case const_COMP_ALAW_8:
00240     ecu_sim_get_xlaw (buf, linbuf, ecuSim->frame_size, muaTblAlaw);
00241     break;
00242   /* U-law 8-bit PCM */
00243   case const_COMP_MULAW_8:
00244     ecu_sim_get_xlaw (buf, linbuf, ecuSim->frame_size, muaTblUlaw);
00245     break;
00246   /* Linear 16-bit PCM */
00247   case const_COMP_LINEAR:
00248     ecu_sim_get_linear (buf, linbuf, ecuSim->frame_size);
00249     break;
00250   }
00251 }
00252
00253
00254 /*-----------------------------------------------------------------
00255  * Function:  ecu_sim_fwrite
00256  *
00257  * Description: Perform file output
00258  *-----------------------------------------------------------------*/
00259 void ecu_sim_fwrite (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr)
00260 {
00261   tuint sample_size;
00262   tuint start;
00263   tint  i, j;
00264
00265   /* */
00266   if (fioptr->fio) {
00267     /* Set the sample size (in twords) */
00268     sample_size = sizeof(tword);
00269     if (ecuSim->pcm_format == const_COMP_LINEAR) {
00270       sample_size = sizeof(linSample)/sizeof(tword);
00271     }
00272
00273     /* Pack to 8-bit data */
00274     else {
00275 #ifdef _BIG_ENDIAN
00276       start = 1;
00277 #else
00278       start = 0;
00279 #endif
00280       for (i=0, j=start; i<buf_size; i++, j+=2) {
00281         buf[i] = buf[j];
00282       }
00283     }
00284
00285     /* Write to the file */
00286     fwrite (buf, sample_size, buf_size, fioptr->fptr);
00287   }
00288 }
00289
00290
00291 /*-----------------------------------------------------------------
00292  * Function:  ecu_sim_output
00293  *
00294  * Description: Perform file output
00295  *-----------------------------------------------------------------*/
00296 void ecu_sim_output (tword *buf, linSample *linbuf)
00297 {
00298 #if _ECUSIMPORT_C55 || _ECUSIMPORT_C55L
00299   tint i;
00300   linSample temp_buffer[SIU_MAX_FRAME_LENGTH*2];
00301
00302   for (i = 0; i<ecuSim->frame_size; i++) {
00303     temp_buffer[2*i+0] = linbuf[i];
00304     temp_buffer[2*i+1] = 0;
00305   }
00306 #endif
00307
00308   /* Convert to linear PCM format (if necessary) */
00309   switch (ecuSim->pcm_format) {
00310     /* A-law 8-bit PCM */
00311     case const_COMP_ALAW_8:
00312       muaTblAlawCmpr (ecuSim->frame_size, linbuf, (tint *) buf);
00313       break;
00314
00315     /* U-law 8-bit PCM */
00316     case const_COMP_MULAW_8:
00317 #if _ECUSIMPORT_C55 || _ECUSIMPORT_C55L
00318       muaTblUlawCmpr (ecuSim->frame_size*2, temp_buffer, (tint *) buf);
00319 #else
00320       muaTblUlawCmpr (ecuSim->frame_size, linbuf, (tint *) buf);
00321 #endif
00322       break;
00323
00324     /* Linear 16-bit PCM */
00325     case const_COMP_LINEAR:
00326       ecu_sim_put_linear (linbuf, buf, ecuSim->frame_size);
00327       break;
00328   }
00329 }
00330
00331 /* 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 87 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 126 of file ecufio.c.

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

Definition at line 234 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 296 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 148 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 259 of file ecufio.c.

References ecuSim, and siuSetup_s::pcm_format.

Referenced by main().

Variable Documentation

tword rinBuffer[]

Definition at line 104 of file ecuauto.c.

tword sinBuffer[]

Definition at line 105 of file ecuauto.c.

tword routBuffer[]

Definition at line 106 of file ecuauto.c.

tword soutBuffer[]

Definition at line 107 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00010  *
00011  *              All rights reserved not granted herein.
00012  *
00013  *                         Limited License.
00014  *
00015  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00016  *  non-exclusive license under copyrights and patents it now or hereafter owns
00017  *  or controls to make, have made, use, import, offer to sell and sell
00018  *  ("Utilize") this software subject to the terms herein.  With respect to the
00019  *  foregoing patent license, such license is granted solely to the extent that
00020  *  any such patent is necessary to Utilize the software alone.  The patent
00021  *  license shall not apply to any combinations which include this software,
00022  *  other than combinations with devices manufactured by or for TI (“TI
00023  *  Devices”).  No hardware patent is licensed hereunder.
00024  *
00025  *  Redistributions must preserve existing copyright notices and reproduce this
00026  *  license (including the above copyright notice and the disclaimer and (if
00027  *  applicable) source code license limitations below) in the documentation
00028  *  and/or other materials provided with the distribution
00029  *
00030  *  Redistribution and use in binary form, without modification, are permitted
00031  *  provided that the following conditions are met:
00032  *
00033  *    *  No reverse engineering, decompilation, or disassembly of this software
00034  *  is permitted with respect to any software provided in binary form.
00035  *
00036  *    *  any redistribution and use are licensed by TI for use only with TI
00037  *  Devices.
00038  *
00039  *    *  Nothing shall obligate TI to provide you with source code for the
00040  *  software licensed and provided to you in object code.
00041  *
00042  *  If software source code is provided to you, modification and redistribution
00043  *  of the source code are permitted provided that the following conditions are
00044  *  met:
00045  *
00046  *    *  any redistribution and use of the source code, including any resulting
00047  *  derivative works, are licensed by TI for use only with TI Devices.
00048  *
00049  *    *  any redistribution and use of any object code compiled from the source
00050  *  code and any resulting derivative works, are licensed by TI for use only
00051  *  with TI Devices.
00052  *
00053  *  Neither the name of Texas Instruments Incorporated nor the names of its
00054  *  suppliers may be used to endorse or promote products derived from this
00055  *  software without specific prior written permission.
00056  *
00057  *  DISCLAIMER.
00058  *
00059  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00060  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00061  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00062  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00063  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00064  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00065  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00066  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00067  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00068  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00069  *  DAMAGE.
00070  *****************************************************************************/
00071 #ifndef _ECUFIO_H
00072 #define _ECUFIO_H
00073
00074 #include <ti/mas/types/types.h>
00075 #include <ti/mas/types/const.h>
00076 #include <ti/mas/ecu/test/src/ecusim.h>
00077
00078 /******************************************************************************
00079  * External References
00080  ******************************************************************************/
00081 extern tword rinBuffer [];
00082 extern tword sinBuffer [];
00083 extern tword routBuffer[];
00084 extern tword soutBuffer[];
00085
00086 /******************************************************************************
00087  * Function prototypes
00088  ******************************************************************************/
00089 void  ecu_sim_fileio_init  (volatile ecuSimFileIo_t *fioptr, tuint code);
00090 void  ecu_sim_fileio_end   (volatile ecuSimFileIo_t *fioptr);
00091 void  ecu_sim_input        (tword *buf, linSample *linbuf);
00092 void  ecu_sim_output       (tword *buf, linSample *linbuf);
00093 tbool ecu_sim_fread        (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr);
00094 void  ecu_sim_fwrite       (tword *buf, tint buf_size, volatile ecuSimFileIo_t *fioptr);
00095
00096 #endif /* _ECUFIO_H */
00097
00098 /* 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 87 of file ecuiram.c.

Fract ecu_bg_work[IRAM_ECU_BG_WORK_LENGTH]

Definition at line 92 of file ecuiram.c.

linSample ecu_bg_e[IRAM_ECU_BG_E_LENGTH]

Definition at line 93 of file ecuiram.c.

Fract ecu_bg_filter[IRAM_ECU_BG_FLTSEG_LENGTH]

Definition at line 94 of file ecuiram.c.

Fract ecu_fg_filter[IRAM_ECU_FG_FLTSEG_LENGTH]

Definition at line 95 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 97 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00019  *
00020  *              All rights reserved not granted herein.
00021  *
00022  *                         Limited License.
00023  *
00024  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00025  *  non-exclusive license under copyrights and patents it now or hereafter owns
00026  *  or controls to make, have made, use, import, offer to sell and sell
00027  *  ("Utilize") this software subject to the terms herein.  With respect to the
00028  *  foregoing patent license, such license is granted solely to the extent that
00029  *  any such patent is necessary to Utilize the software alone.  The patent
00030  *  license shall not apply to any combinations which include this software,
00031  *  other than combinations with devices manufactured by or for TI (“TI
00032  *  Devices”).  No hardware patent is licensed hereunder.
00033  *
00034  *  Redistributions must preserve existing copyright notices and reproduce this
00035  *  license (including the above copyright notice and the disclaimer and (if
00036  *  applicable) source code license limitations below) in the documentation
00037  *  and/or other materials provided with the distribution
00038  *
00039  *  Redistribution and use in binary form, without modification, are permitted
00040  *  provided that the following conditions are met:
00041  *
00042  *    *  No reverse engineering, decompilation, or disassembly of this software
00043  *  is permitted with respect to any software provided in binary form.
00044  *
00045  *    *  any redistribution and use are licensed by TI for use only with TI
00046  *  Devices.
00047  *
00048  *    *  Nothing shall obligate TI to provide you with source code for the
00049  *  software licensed and provided to you in object code.
00050  *
00051  *  If software source code is provided to you, modification and redistribution
00052  *  of the source code are permitted provided that the following conditions are
00053  *  met:
00054  *
00055  *    *  any redistribution and use of the source code, including any resulting
00056  *  derivative works, are licensed by TI for use only with TI Devices.
00057  *
00058  *    *  any redistribution and use of any object code compiled from the source
00059  *  code and any resulting derivative works, are licensed by TI for use only
00060  *  with TI Devices.
00061  *
00062  *  Neither the name of Texas Instruments Incorporated nor the names of its
00063  *  suppliers may be used to endorse or promote products derived from this
00064  *  software without specific prior written permission.
00065  *
00066  *  DISCLAIMER.
00067  *
00068  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00069  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00070  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00071  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00072  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00073  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00074  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00075  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00076  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00077  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00078  *  DAMAGE.
00079  *****************************************************************************/
00080
00081 #include <ti/mas/ecu/test/src/ecuiram.h>
00082
00083 #if ecu_DELAY_LINE_COMPRESS
00084   linSample ecu_pcm_expand[IRAM_ECU_EXPAND_LENGTH];
00085   tword     piu_ecu_receive[IRAM_PIU_ECU_RECEIVE_LENGTH];
00086 #else
00087   linSample piu_ecu_receive[IRAM_PIU_ECU_RECEIVE_LENGTH];
00088 #endif
00089 #if ecu_SEARCH_ENABLE
00090   Fract     ecu_srch_filter[IRAM_ECU_SRCH_FILTER_LENGTH];
00091 #endif
00092   Fract     ecu_bg_work[IRAM_ECU_BG_WORK_LENGTH];
00093   linSample ecu_bg_e[IRAM_ECU_BG_E_LENGTH];
00094   Fract     ecu_bg_filter[IRAM_ECU_BG_FLTSEG_LENGTH];
00095   Fract     ecu_fg_filter[IRAM_ECU_FG_FLTSEG_LENGTH];
00096
00097   iramSeg_t iramSeg = {
00098 #if ecu_DELAY_LINE_COMPRESS
00099     &ecu_pcm_expand[0],
00100     &piu_ecu_receive[0],
00101 #else
00102     &piu_ecu_receive[0],
00103 #endif
00104 #if ecu_SEARCH_ENABLE
00105     &ecu_srch_filter[0],
00106 #endif
00107     &ecu_bg_work[0],
00108     &ecu_bg_e[0],
00109     &ecu_bg_filter[0],
00110     &ecu_fg_filter[0]
00111   };
00112
00113 /* 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 99 of file ecuiram.h.

#define IRAM_ECU_BLOCK_LENGTH 40

Definition at line 100 of file ecuiram.h.

#define IRAM_ECU_SRCH_FILTER_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Definition at line 109 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 113 of file ecuiram.h.

#define IRAM_PIU_ECU_RECEIVE_LENGTH ecu_DELAY_LINE_LENGTH

Definition at line 118 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_BG_WORK_LENGTH IRAM_ECU_SRCH_FILTER_LENGTH

Definition at line 120 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_BG_E_LENGTH IRAM_ECU_BLOCK_LENGTH

Definition at line 123 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_BG_FLTSEG_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Definition at line 124 of file ecuiram.h.

Referenced by siu_new_ecu().

#define IRAM_ECU_FG_FLTSEG_LENGTH IRAM_ECU_MAX_FLTSEG_LENGTH

Definition at line 125 of file ecuiram.h.

Referenced by siu_new_ecu().

Variable Documentation

iramSeg_t iramSeg

Definition at line 97 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00018  *
00019  *              All rights reserved not granted herein.
00020  *
00021  *                         Limited License.
00022  *
00023  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00024  *  non-exclusive license under copyrights and patents it now or hereafter owns
00025  *  or controls to make, have made, use, import, offer to sell and sell
00026  *  ("Utilize") this software subject to the terms herein.  With respect to the
00027  *  foregoing patent license, such license is granted solely to the extent that
00028  *  any such patent is necessary to Utilize the software alone.  The patent
00029  *  license shall not apply to any combinations which include this software,
00030  *  other than combinations with devices manufactured by or for TI (“TI
00031  *  Devices”).  No hardware patent is licensed hereunder.
00032  *
00033  *  Redistributions must preserve existing copyright notices and reproduce this
00034  *  license (including the above copyright notice and the disclaimer and (if
00035  *  applicable) source code license limitations below) in the documentation
00036  *  and/or other materials provided with the distribution
00037  *
00038  *  Redistribution and use in binary form, without modification, are permitted
00039  *  provided that the following conditions are met:
00040  *
00041  *    *  No reverse engineering, decompilation, or disassembly of this software
00042  *  is permitted with respect to any software provided in binary form.
00043  *
00044  *    *  any redistribution and use are licensed by TI for use only with TI
00045  *  Devices.
00046  *
00047  *    *  Nothing shall obligate TI to provide you with source code for the
00048  *  software licensed and provided to you in object code.
00049  *
00050  *  If software source code is provided to you, modification and redistribution
00051  *  of the source code are permitted provided that the following conditions are
00052  *  met:
00053  *
00054  *    *  any redistribution and use of the source code, including any resulting
00055  *  derivative works, are licensed by TI for use only with TI Devices.
00056  *
00057  *    *  any redistribution and use of any object code compiled from the source
00058  *  code and any resulting derivative works, are licensed by TI for use only
00059  *  with TI Devices.
00060  *
00061  *  Neither the name of Texas Instruments Incorporated nor the names of its
00062  *  suppliers may be used to endorse or promote products derived from this
00063  *  software without specific prior written permission.
00064  *
00065  *  DISCLAIMER.
00066  *
00067  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00068  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00069  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00070  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00071  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00072  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00073  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00074  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00075  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00076  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00077  *  DAMAGE.
00078  *****************************************************************************/
00079
00080 #include <ti/mas/types/types.h>
00081
00082 #include <ti/mas/ecu/ecu.h>
00083
00084 #include <ti/mas/ecu/test/src/ecusim.h>     /* for simulation-specific defines */
00085
00086 /*****************************************************************************
00087  * DATA DEFINITION: Partition definition for special addressing mode
00088  *                  segment. piu_ecu_receive[] buffer must be aligned to
00089  *                  the nearest larger power of 2 for the sake of circular
00090  *                  addressing. This is necessary only when the circular
00091  *                  buffer is accessed usign circular addressing mode in
00092  *                  either ECU module or PCM interface module (e.g. PIU) which
00093  *                  syncronizes far end samples after the optional resampling.
00094  *
00095  *                  Actual piu_ecu_receive[] length must always be whole number
00096  *                  of frames as required by PCM interface module.
00097  *****************************************************************************/
00098
00099 #define IRAM_ECU_MAX_FLTSEG_LENGTH    256
00100 #define IRAM_ECU_BLOCK_LENGTH         40
00101 #if ecu_5P5MS_FRAME_ENABLE
00102 #undef  IRAM_ECU_BLOCK_LENGTH
00103 #define IRAM_ECU_BLOCK_LENGTH         44
00104 #endif
00105
00106 #if ecu_SEARCH_ENABLE
00107 #define IRAM_ECU_SRCH_FILTER_LENGTH   1024
00108 #else
00109 #define IRAM_ECU_SRCH_FILTER_LENGTH   IRAM_ECU_MAX_FLTSEG_LENGTH
00110 #endif
00111 /* NOTE:  The following limits the maximum frame size to 2 ECU blocks, */
00112 /*        (i.e., 10ms or 11ms)                                         */
00113 #define ecu_DELAY_LINE_LENGTH         (IRAM_ECU_SRCH_FILTER_LENGTH + 2*IRAM_ECU_BLOCK_LENGTH + SIU_MAX_SYSTEM_DELAY + SIU_MAX_FRAME_LENGTH)
00114 #if ecu_DELAY_LINE_COMPRESS
00115 #define IRAM_ECU_EXPAND_LENGTH        (ecu_DELAY_LINE_LENGTH - IRAM_ECU_BLOCK_LENGTH)
00116 #define IRAM_PIU_ECU_RECEIVE_LENGTH   (ecu_DELAY_LINE_LENGTH/ecu_SIM_DLINE_SAMPLES_PER_WORD)
00117 #else
00118 #define IRAM_PIU_ECU_RECEIVE_LENGTH   ecu_DELAY_LINE_LENGTH /* linSample, for 128ms hybrid */
00119 #endif
00120 #define IRAM_ECU_BG_WORK_LENGTH       IRAM_ECU_SRCH_FILTER_LENGTH  /* changed from 8*/
00121                                             /* 1024 for search filter length */
00122                                             /* Fract (see ecuport.h, eculms.s) */
00123 #define IRAM_ECU_BG_E_LENGTH          IRAM_ECU_BLOCK_LENGTH   /* linSample */
00124 #define IRAM_ECU_BG_FLTSEG_LENGTH     IRAM_ECU_MAX_FLTSEG_LENGTH  /* Fract */
00125 #define IRAM_ECU_FG_FLTSEG_LENGTH     IRAM_ECU_MAX_FLTSEG_LENGTH  /* Fract */
00126
00127 typedef struct {
00128 #if ecu_DELAY_LINE_COMPRESS
00129   linSample *ecu_pcm_expand_ptr;
00130   tword     *piu_ecu_receive_ptr;
00131 #else
00132   linSample *piu_ecu_receive_ptr;
00133 #endif
00134 #if ecu_SEARCH_ENABLE
00135   Fract     *ecu_srch_filter_ptr;
00136 #endif
00137   Fract     *ecu_bg_work_ptr;
00138   linSample *ecu_bg_e_ptr;
00139   Fract     *ecu_bg_filter_ptr;
00140   Fract     *ecu_fg_filter_ptr;
00141 } iramSeg_t;
00142
00143 extern iramSeg_t iramSeg;
00144
00145 #endif /* _ecuiram_h */
00146 /* 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 80 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 89 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 97 of file ecumem.c.

Referenced by ecu_mem_alloc_align().

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

Definition at line 106 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 117 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 130 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 74 of file ecumem.c.

Referenced by ecu_mem_init_heap().

tword ecuMem2[ecu_HEAP2_SIZE]

Definition at line 76 of file ecumem.c.

Referenced by ecu_mem_init_heap().

ecuMemHeap_t ecuHeap[ecu_HEAP_CNT]

Definition at line 77 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <stdio.h>
00065 #include <stdlib.h>
00066 #include <string.h>
00067
00068 #include <ti/mas/types/types.h>
00069 #include <ti/mas/util/ecomem.h>
00070 #include <ti/mas/ecu/test/src/ecumem.h>
00071
00072
00073 #pragma DATA_SECTION (ecuMem1, "ecu_heap_1");
00074 tword ecuMem1[ecu_HEAP1_SIZE];
00075 #pragma DATA_SECTION (ecuMem2, "ecu_heap_2");
00076 tword ecuMem2[ecu_HEAP2_SIZE];
00077 ecuMemHeap_t ecuHeap[ecu_HEAP_CNT];
00078
00079
00080 void ecu_mem_heap_init (ecuMemHeap_t *ptr, tword *heapBase, tulong size)
00081 {
00082   ptr->base = heapBase;
00083   ptr->size = size;
00084   ptr->indx = 0;
00085   /* Note : memory is not initialized deliberately to expose
00086             uninitialized memory read problems */
00087 }
00088
00089 void ecu_mem_init_heap (void)
00090 {
00091   /* Internal heap 1 */
00092   ecu_mem_heap_init (&ecuHeap[ecu_HEAP_ID1], ecuMem1, ecu_HEAP1_SIZE);
00093   /* Internal heap 2 */
00094   ecu_mem_heap_init (&ecuHeap[ecu_HEAP_ID2], ecuMem2, ecu_HEAP2_SIZE);
00095 }
00096
00097 void *ecu_mem_align (void *addr, tuint lin_align)
00098 {
00099   tulong align_addr;
00100
00101   align_addr = ((tulong) addr + lin_align - 1UL) & (0xFFFFFFFFUL - lin_align + 1UL);
00102   return ((void *) align_addr);
00103 }
00104
00105
00106 tword *ecu_mem_heap_alloc (ecuMemHeap_t *ptr, tulong size)
00107 {
00108   tword *alloc = NULL;
00109
00110   if ((ptr->indx + size) <= ptr->size) {
00111     alloc = &ptr->base[ptr->indx];
00112     ptr->indx += size;
00113   }
00114   return (alloc);
00115 }
00116
00117 void *ecu_mem_alloc_align (tulong size, tint linAlign, tint heap_id)
00118 {
00119   ecuMemHeap_t *hptr = &ecuHeap[heap_id];
00120   void         *allocPtr;
00121
00122   if ((allocPtr = (void *) ecu_mem_heap_alloc (hptr, size + linAlign - 1)) == NULL) {
00123     printf("\nNot enough heap, exiting\n");
00124     exit (0);
00125   }
00126
00127   return (ecu_mem_align (allocPtr, linAlign));
00128 }
00129
00130 void ecu_mem_alloc_eco (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr,
00131                         ecuMemConfig_t *mem, tint heap_id)
00132 {
00133   tint   i;
00134   tuint  linAlign;
00135   tuint  log2align;
00136
00137
00138   for (i=0; i<nbufs; i++) {
00139     log2align = sizeBufsPtr[i].log2align;
00140     linAlign = (tuint) 1 << log2align;
00141
00142     ecoBufsPtr[i].size      = sizeBufsPtr[i].size;
00143     ecoBufsPtr[i].volat     = sizeBufsPtr[i].volat;
00144     ecoBufsPtr[i].log2align = sizeBufsPtr[i].log2align;
00145     ecoBufsPtr[i].mclass    = ecomem_CLASS_INTERNAL;
00146
00147     ecu_auto_iprint (" Buffer: %d", i);
00148     ecu_auto_iprint (" align:  %d", linAlign);
00149     ecu_auto_iprint ("  size:  %d", sizeBufsPtr[i].size);
00150     if (mem->pre_init_bufs) {
00151       ecu_auto_iprint ("  init: %d", (tint) mem->init_pattern);
00152     }
00153     ecu_auto_iprint ("  heap:  %d\n", heap_id);
00154
00155     if (ecoBufsPtr[i].size == 0) {
00156       ecoBufsPtr[i].base = NULL;
00157       continue;
00158     }
00159
00160     ecoBufsPtr[i].base = ecu_mem_alloc_align (ecoBufsPtr[i].size, linAlign, heap_id);
00161
00162     if (mem->pre_init_bufs) {
00163       memset (ecoBufsPtr[i].base, mem->init_pattern, ecoBufsPtr[i].size);
00164     }
00165   }
00166 }
00167
00168 /* 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 84 of file ecumem.h.

Referenced by ecu_mem_init_heap().

#define ecu_HEAP_ID2 1

Definition at line 85 of file ecumem.h.

Referenced by ecu_mem_init_heap().

#define ecu_HEAP_CNT 2

Definition at line 86 of file ecumem.h.

Function Documentation

void ecu_auto_print ( char * str )

Definition at line 181 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 97 of file ecumem.c.

Referenced by ecu_mem_alloc_align().

void ecu_mem_init_heap ( void )

Definition at line 89 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 130 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 117 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #ifndef _ECUMEM_H
00065 #define _ECUMEM_H
00066
00067 #include <ti/mas/types/types.h>
00068 #include <ti/mas/util/ecomem.h>
00069 #include <ti/mas/ecu/test/src/ecuautoport.h>
00070
00071 extern void ecu_auto_print  (char *str);
00072
00073 typedef struct {
00074   tword *base;
00075   tulong indx;
00076   tulong size;
00077 } ecuMemHeap_t;
00078
00079 typedef struct {
00080   tbool pre_init_bufs;
00081   tword init_pattern;
00082 } ecuMemConfig_t;
00083
00084 #define ecu_HEAP_ID1  0
00085 #define ecu_HEAP_ID2  1
00086 #define ecu_HEAP_CNT  2
00087
00088 void *ecu_mem_align       (void *addr, tuint lin_align);
00089 void  ecu_mem_init_heap   (void);
00090 void  ecu_mem_alloc_eco   (tint nbufs, const ecomemBuffer_t *sizeBufsPtr, ecomemBuffer_t *ecoBufsPtr,
00091                            ecuMemConfig_t *mem, tint id);
00092 void *ecu_mem_alloc_align (tulong size, tint linAlign, tint id);
00093
00094 #endif /* _ECUMEM_H */
00095
00096 /* 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 97 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 110 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 126 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 155 of file ecuprof.c.

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

void ecusim_profile_print ( void )

Definition at line 172 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,
  FALSE,
  FALSE,
  0L,
  0L,
  0L
}

Definition at line 82 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #include <stdio.h>
00072
00073 #include <ti/mas/sdk/profile.h>
00074 #include <ti/mas/sdk/memArchCfg.h>
00075
00076 #include <ti/mas/ecu/test/src/ecusim.h>
00077
00078
00079 /***********************************************************************
00080  * Profiling structure
00081  ***********************************************************************/
00082 ecuProfile_t ecuProfile = {
00083   (FILE *) NULL,            /* fptr:  initialize to NULL    */
00084   FALSE,                     /* use_cache:  FALSE by default  */
00085   FALSE,                    /* enabled:    FALSE by default */
00086   0L,                       /* overhead:   cleared          */
00087   0L,                       /* start_cnt:  cleared          */
00088   0L                        /* cycles:     cleared          */
00089 };
00090
00091
00092 /***********************************************************************
00093  * Profiling routines
00094  ***********************************************************************/
00095
00096  /* ============ ecusim_profile_start () ========== */
00097 void ecusim_profile_start (void)
00098 {
00099   /* Flush the cache */
00100   if (ecuProfile.use_cache) {
00101     memarchcfg_cacheFlush ();
00102   }
00103
00104   /* Clear the total cycles and get the start count */
00105   ecuProfile.cycles     = 0L;
00106   ecuProfile.start_cnt  = profile_getCPUcycleCount ();
00107 }
00108
00109 /* ============ ecusim_profile_stop () ========== */
00110 void ecusim_profile_stop (void)
00111 {
00112   /* Get end cycles */
00113   tlong count = profile_getCPUcycleCount();
00114
00115   /* Calculate total cycles (correct for timer wrap) */
00116   count -= ecuProfile.start_cnt;
00117   if (count < 0) {
00118     count += sdk_PROFILE_MAXCNT;
00119   }
00120
00121   /* Store adjusted total cycles */
00122   ecuProfile.cycles = count - ecuProfile.overhead;
00123 }
00124
00125 /* ============ ecusim_profile_init () ========== */
00126 void ecusim_profile_init (void)
00127 {
00128   /* Always open in the "disabled mode" */
00129   ecuProfile.enabled = FALSE;
00130
00131   /* Initialize SDK profiling and cache */
00132   profile_initCycleProfiling ();
00133   if (ecuProfile.use_cache) {
00134     memarchcfg_cacheEnable ();
00135   }
00136
00137   /* Get estimate of profile cycle call overhead */
00138   ecuProfile.overhead = 0L;
00139   ecusim_profile_start ();
00140   ecusim_profile_stop  ();
00141   ecuProfile.overhead = ecuProfile.cycles;
00142
00143   /* Open profiling data file */
00144   ecuProfile.fptr = fopen (ecusim_PROFILE_FNAME, "w");
00145   if (ecuProfile.fptr == (FILE *) NULL) {
00146     fprintf (stderr, "Unable to open profiling file");
00147   }
00148   else {
00149     fprintf (stdout, " - Opened file: %s\n", ecusim_PROFILE_FNAME);
00150   }
00151 } /* ecusim_profile_init */
00152
00153
00154 /* ============ ecusim_profile_close () ========== */
00155 void ecusim_profile_close (void)
00156 {
00157   /* Ensure profiling is disabled */
00158   ecuProfile.enabled = FALSE;
00159
00160   /* Close SDK profiler */
00161   profile_closeCycleProfiling ();
00162
00163   /* Close profiling data file */
00164   if (ecuProfile.fptr != NULL) {
00165     fclose (ecuProfile.fptr);
00166     fprintf (stdout, " - Closed file: %s\n", ecusim_PROFILE_FNAME);
00167   }
00168 } /* ecusim_profile_close */
00169
00170
00171 /* ============ ecusim_profile_print () ========== */
00172 void ecusim_profile_print (void)
00173 {
00174   /* Only report if profiling is enabled */
00175   if (ecuProfile.enabled && ecuProfile.fptr != NULL) {
00176     fprintf (ecuProfile.fptr, "%8d\n", ecuProfile.cycles);
00177     fflush  (ecuProfile.fptr);
00178   }
00179 } /* ecusim_profile_print */
00180
00181 /* 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 155 of file ecuprof.c.

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

void ecusim_profile_print ( void )

Definition at line 172 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 126 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 97 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 110 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 82 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #ifndef _ECUPROF_H
00072 #define _ECUPROF_H
00073
00074
00075 /***********************************************************************
00076  * Function prototypes
00077  ***********************************************************************/
00078 void ecusim_profile_close (void);
00079 void ecusim_profile_print (void);
00080 void ecusim_profile_init  (void);
00081 void ecusim_profile_start (void);
00082 void ecusim_profile_stop  (void);
00083
00084 /***********************************************************************
00085  * Profiling structure
00086  ***********************************************************************/
00087 extern ecuProfile_t ecuProfile;
00088
00089
00090 #endif /* _ECUPROF_H */
00091
00092 /* 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 94 of file ecusim.c.

Referenced by main().

Function Documentation

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

Definition at line 278 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 285 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 326 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 360 of file ecusimfunc.c.

void siu_new_ecu ( tint chnum )

Definition at line 397 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 509 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 541 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 595 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 641 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 686 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 1041 of file ecusimfunc.c.

Referenced by siu_new_piu().

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

Definition at line 1029 of file ecusimfunc.c.

Referenced by siu_new_piu().

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

Definition at line 1018 of file ecusimfunc.c.

Referenced by siu_new_piu().

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

Definition at line 984 of file ecusimfunc.c.

Referenced by siu_new_piu().

void ecu_sim_init ( void )

Definition at line 750 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 134 of file ecusim.c.

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

void main ( void )

Definition at line 153 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 87 of file ecusim.c.

Referenced by convert_tx_tone_frame(), and main().

linSample* piu_segment_out

Definition at line 88 of file ecusim.c.

Referenced by main().

linSample* segment_in

Definition at line 89 of file ecusim.c.

Referenced by main().

linSample* rx_segment_out

Definition at line 90 of file ecusim.c.

Referenced by main().

linSample* rx_frame_in

Definition at line 91 of file ecusim.c.

Referenced by main().

Fract siu_getflt[SIU_MAX_GETFLT]

Definition at line 95 of file ecusim.c.

Referenced by main().

void* sgnTxInst

Definition at line 104 of file ecusimfunc.c.

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

void* sgnRxInst

Definition at line 105 of file ecusimfunc.c.

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

void* hybTxInst

Definition at line 108 of file ecusimfunc.c.

Referenced by main(), and siu_open_txhyb().

tint siuInStream[]

Definition at line 91 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInUCmpStream[]

Definition at line 92 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInACmpStream[]

Definition at line 93 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

linSample siuRxInStream[]

Definition at line 94 of file ecusimfunc.c.

Referenced by generate_rx_tone_frame().

linSample siuOutErrStream[]

Definition at line 98 of file ecusimfunc.c.

Referenced by ecu_send_out(), and main().

volatile siuSetup_t* ecuSim

Definition at line 135 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00014  *
00015  *              All rights reserved not granted herein.
00016  *
00017  *                         Limited License.
00018  *
00019  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00020  *  non-exclusive license under copyrights and patents it now or hereafter owns
00021  *  or controls to make, have made, use, import, offer to sell and sell
00022  *  ("Utilize") this software subject to the terms herein.  With respect to the
00023  *  foregoing patent license, such license is granted solely to the extent that
00024  *  any such patent is necessary to Utilize the software alone.  The patent
00025  *  license shall not apply to any combinations which include this software,
00026  *  other than combinations with devices manufactured by or for TI (“TI
00027  *  Devices”).  No hardware patent is licensed hereunder.
00028  *
00029  *  Redistributions must preserve existing copyright notices and reproduce this
00030  *  license (including the above copyright notice and the disclaimer and (if
00031  *  applicable) source code license limitations below) in the documentation
00032  *  and/or other materials provided with the distribution
00033  *
00034  *  Redistribution and use in binary form, without modification, are permitted
00035  *  provided that the following conditions are met:
00036  *
00037  *    *  No reverse engineering, decompilation, or disassembly of this software
00038  *  is permitted with respect to any software provided in binary form.
00039  *
00040  *    *  any redistribution and use are licensed by TI for use only with TI
00041  *  Devices.
00042  *
00043  *    *  Nothing shall obligate TI to provide you with source code for the
00044  *  software licensed and provided to you in object code.
00045  *
00046  *  If software source code is provided to you, modification and redistribution
00047  *  of the source code are permitted provided that the following conditions are
00048  *  met:
00049  *
00050  *    *  any redistribution and use of the source code, including any resulting
00051  *  derivative works, are licensed by TI for use only with TI Devices.
00052  *
00053  *    *  any redistribution and use of any object code compiled from the source
00054  *  code and any resulting derivative works, are licensed by TI for use only
00055  *  with TI Devices.
00056  *
00057  *  Neither the name of Texas Instruments Incorporated nor the names of its
00058  *  suppliers may be used to endorse or promote products derived from this
00059  *  software without specific prior written permission.
00060  *
00061  *  DISCLAIMER.
00062  *
00063  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00064  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00065  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00066  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00067  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00068  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00069  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00070  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00071  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00072  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00073  *  DAMAGE.
00074  *****************************************************************************/
00075 #include <stdio.h>
00076 #include <stdlib.h>
00077 #include <string.h>
00078
00079 /* Test include files */
00080 #include <ti/mas/ecu/test/src/ecusim.h>     /* for simulation-specific defines */
00081 #include <ti/mas/ecu/test/src/ecufio.h>     /* file I/O functions */
00082 #include <ti/mas/ecu/test/src/ecuprof.h>    /* ECU profiling */
00083 #include <ti/mas/ecu/test/src/vheap.h>      /* Voice heap */
00084 #include <ti/mas/ecu/test/src/cheap.h>      /* Core heap */
00085
00086 /* global pointers */
00087 linSample *piu_segment_in;       /* PCM buffers for piuPcmIo() */
00088 linSample *piu_segment_out;
00089 linSample *segment_in;      /* linear buffer for Tx generator */
00090 linSample *rx_segment_out;  /* linear buffer for Rx out display */
00091 linSample *rx_frame_in;     /* linear buffer for Rx generator */
00092
00093 /* ecuGetFilter() support data */
00094 #define SIU_MAX_GETFLT    64
00095 Fract siu_getflt[SIU_MAX_GETFLT];   /* coefficient buffer */
00096
00097 /* Signal Generator Instances */
00098 extern void  *sgnTxInst;
00099 extern void  *sgnRxInst;
00100
00101 /* Hybrid Instance and hybrid filter */
00102 extern void  *hybTxInst;
00103
00104 /* Input streams */
00105 extern tint  siuInStream[];       /* input samples in Q0 */
00106 extern tuint siuInUCmpStream[];   /* u-law coded input samples */
00107 extern tuint siuInACmpStream[];   /* A-law coded input samples */
00108 extern linSample siuRxInStream[]; /* Rx input samples in Q0 */
00109
00110 /* Output streams */
00111 extern linSample siuOutErrStream[];   /* output error in Q0   */
00112 /* simulation setup structure */
00113 extern volatile siuSetup_t *ecuSim;
00114
00115 /* function prototypes used in this file */
00116 extern void generate_tx_tone_frame (tint frame_size, linSample *frame);
00117 extern void convert_tx_tone_frame (tint frame_length, tint pcm_law, linSample *frame);
00118 extern tint generate_rx_tone_frame (tint frame_size, linSample *frame);
00119 extern void ecu_send_out (void *ecuSoInst, void *samples_in);
00120 extern void siu_new_ecu (tint chnum);
00121 extern void siu_open_ecu (tint chnum, tint frame_size);
00122 extern void siu_open_txhyb (tint chnum, tint frame_length, tint filter_length);
00123
00124 extern void siu_open_rxsgn (tint chnum);
00125 extern void siu_open_txsgn (tint chnum);
00126 extern void siu_set_sgn (void *inst, siuSGNPars_t *sgn);
00127 extern void siuTxRxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id);
00128 extern void siuPcmSampleTrace (tint chnum, tint pcm_size, void *pcm_in, tuint dir);
00129 extern void siuPiuReport (void *siuInst, tint report_code);
00130 extern void siuDebugInfoNew (tuint moduleID, tuint msgType, tuint messageCode,
00131                       tuint msgLength, tuint *messageData);
00132 extern void ecu_sim_init(void);
00133
00134 void ecu_halt (volatile tbool *exec)
00135 {
00136   /* Wait for further actions - run when user sets "exec" to TRUE, i.e., 1 */
00137   while (!(*exec)) {
00138     asm ("  NOP");
00139     asm ("Set_BP_Here:  ");
00140     asm ("  NOP");
00141     asm ("  NOP");
00142   }
00143 }
00144
00145
00146 /******************************************************************************
00147  * FUNCTION PURPOSE: Main program.
00148  ******************************************************************************
00149  * DESCRIPTION: Main program. Starts the system.
00150  *
00151  *****************************************************************************/
00152
00153 void main (void)
00154 {
00155   int i;
00156   piuControl_t piuCtrl;
00157   siuConfig_t  siuCfg;
00158 #if ECU_SIM_USE_VPE
00159   slmConfig_t  slmCfg;
00160 #endif
00161   siuInst_t    *inst;
00162   void *cheap;
00163   void *vheap;
00164   tint chnum;
00165   tint frame_size;
00166   tint ulaw;
00167   tint hyb_filter_length;
00168   tint seg_count;
00169   tbool do_freerun = FALSE;
00170   tint  dataIn = 1;
00171   linSample ecu_out_buf[ecuSIM_MAXSENDOUT_LENGTH+1],*ecu_out_buf_start;
00172 #if ECU_SIM_USE_VPE
00173   tint slmSize, retVal;
00174 #endif
00175   tuint sample_count = 0;
00176   tuint sec_count = 0;
00177
00178   /* align ecu out buf */
00179   ecu_out_buf_start = typChkAlign(ecu_out_buf,1)? ecu_out_buf : (ecu_out_buf+1);
00180
00181   /* We may need exception routines rather soon */
00182   siuCfg.ID             = siuMakeID (SIU_MID_SIU, 0); /* use chnum 0 this time */
00183 # ifndef _HWDSKT
00184     siuCfg.exception    = siuException;
00185     siuCfg.debug        = siuDebug;
00186 # else
00187     siuCfg.exception    = exception_fcn;
00188     siuCfg.debug        = debug_fcn;
00189 # endif
00190
00191   /* Initialize simulation parameters */
00192   ecu_sim_init();
00193   /* wait here, change any simulation parameters before run again */
00194   //ecu_halt (&ecuSim->exec);
00195   /*----------------------------------------------*/
00196   /* Set the clock mode register.                 */
00197   /*----------------------------------------------*/
00198 #if 0  /* Remove for now until c55x target hardware utilities are defined */
00199   if (ecuSim->clock_mul != 0)
00200     thwClockSet (ecuSim->clock_mul);
00201 #endif
00202
00203   /*----------------------------------------------*/
00204   /* Set some simulation configuration parameters */
00205   /*----------------------------------------------*/
00206   ulaw = ecuSim->pcm_format;         /* specify type of physical I/O */
00207   siu_exc_assert (ulaw >= -1 && ulaw <= 2, &siuCfg);
00208
00209   /* NOTE: physical I/O type is used for Voice Coding Companding Law!!! */
00210   /*-----------------------------*/
00211   /* Initialize DSP Architecture */
00212   /*-----------------------------*/
00213
00214   /* Initialize profiling */
00215   ecusim_profile_init ();
00216
00217   /* Initialize heaps */
00218   cheap = mhmCreate (siu_core_heap, SIU_CORE_HEAP_SIZE,0);
00219   siu_exc_assert (cheap != NULL, &siuCfg);
00220   vheap = mhmCreate (siu_voice_heap, SIU_VOICE_HEAP_SIZE,0);
00221   siu_exc_assert (vheap != NULL, &siuCfg);
00222
00223   /* Init SIU */
00224   siuCfg.companding_law = ulaw;                 /* physical I/O type */
00225   siuCfg.pcm_bits       = ecuSim->pcm_bits;    /* # of bits in physical I/O */
00226   siuCfg.core_heap      = cheap;
00227   siuCfg.voice_heap     = vheap;
00228   siuInit (&siuCfg);                /* inits siuContext & siuInst[] */
00229
00230   /* from now on, deal with channel #1 */
00231   chnum = 1;
00232   inst = &siuInst[chnum-1];       /* SIU instance for channel #1 */
00233
00234   frame_size = ecuSim->frame_size;     /* 5ms default */
00235   siu_exc_assert ((frame_size >= ecuSim->rxSGN.delay     &&
00236                    frame_size >= ecuSim->txSGN.delay)    ||
00237                   (ecuSim->rxSGN.wftype != sgn_WFT_FILE  &&
00238                    ecuSim->txSGN.wftype != sgn_WFT_FILE), &siuCfg);
00239   do_freerun = FALSE;                   /* No free run until toggled */
00240   hyb_filter_length = ecuSim->hyb_filter_length;
00241
00242   /* Alter ECU context based on siuSetup selections */
00243   ecuContext.max_filter_seg_length = ecuSim->ecu_fltseg_length;
00244   ecuContext.max_filter_seg_count  = ecuSim->ecu_num_fltseg;
00245
00246   /* Print some parameters (sorry, no printer available at this time) */
00247
00248   /* Create some modules. Order is important:
00249    *  ECU, PIU must be in this order. */
00250
00251   /* Create ECU module */
00252   siu_new_ecu (chnum);
00253
00254   /* Create PIU module */
00255   siu_new_piu (chnum, (tint)SIU_MAX_FRAME_LENGTH);
00256
00257 #if ECU_SIM_USE_VPE
00258   /* initialize signal limiter */
00259   retVal = slmGetSizes(&slmSize);
00260   if (retVal != slm_NOERR){
00261     ecuSim->error_id = ecu_SIM_ERR_SLM;
00262     ecuSim->exec = FALSE;
00263     ecu_halt (&ecuSim->exec);
00264   }
00265   inst->slmInst = malloc(slmSize);
00266   /* configure slm */
00267   slmCfg.valid_bf = 0;
00268   /* configure sampling rate */
00269   slmCfg.valid_bf |= 0x01;
00270   if (ecuSim->Fs == ecu_SIM_DEF_FS)
00271     slmCfg.srate_factor = slm_SRATE_FACTOR_8K;
00272   else
00273     slmCfg.srate_factor = slm_SRATE_FACTOR_16K;
00274   slmInit (inst->slmInst, &slmCfg);
00275 #endif
00276
00277   /* Allocate PIU Sample Segment Buffers */
00278   segment_in = (linSample*)siuCAlloc (FILEIO_FRM_FACTOR*frame_size*sizeof(linSample));
00279   inst->cheap_used += frame_size*sizeof(linSample);
00280   siu_exc_assert (segment_in != NULL, inst);
00281   utlLsMemSet (&segment_in[0], (linSample)0,FILEIO_FRM_FACTOR*frame_size);
00282
00283   rx_segment_out = (linSample*)siuCAlloc (frame_size*sizeof(linSample));
00284   inst->cheap_used += frame_size*sizeof(linSample);
00285   siu_exc_assert (rx_segment_out != NULL, inst);
00286   /* Zero it out! */
00287   for (i = 0; i < frame_size; i++)
00288     rx_segment_out[i] = (linSample)0;
00289
00290   /* Allocate receive in samples segment buffer */
00291   rx_frame_in = (linSample*)siuCAlloc(FILEIO_FRM_FACTOR*frame_size*sizeof(linSample));
00292   inst->cheap_used += frame_size*sizeof(linSample);
00293   siu_exc_assert (rx_frame_in != NULL, inst);
00294   utlLsMemSet (&rx_frame_in[0], (linSample)0,FILEIO_FRM_FACTOR*frame_size);
00295
00296    /* Open Tx Task */
00297   siu_open_tx (chnum, frame_size);
00298   /* Open ECU module */
00299   siu_open_ecu (chnum, frame_size);
00300
00301   /* Open PIU module */
00302   siu_open_piu (chnum, frame_size);
00303
00304   /* Open Hybrid in Tx Path */
00305   siu_open_txhyb (chnum, frame_size, hyb_filter_length);
00306   /* Open Tx Signal Generator */
00307   siu_open_txsgn (chnum);
00308   /* Open Rx Signal Generator */
00309   siu_open_rxsgn (chnum);
00310
00311   /* sync signal generation with PIU */
00312   piuCtrl.ctl_code                 = piu_SET_FRAME_SIZE;
00313   piuCtrl.u.set_frame.frame_size   = frame_size;
00314   piuControl (inst->piuInst, &piuCtrl);
00315   piu_segment_in  = (linSample *)(piuCtrl.u.set_frame.send_out_buf);
00316   piu_segment_out = (linSample *)(piuCtrl.u.set_frame.receive_in_buf);
00317
00318   if (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE){
00319     /* open the input files */
00320     ecu_sim_fileio_init (&ecuSim->rin, ecu_SIM_FILEIO_READ);
00321     ecu_sim_fileio_init (&ecuSim->sin, ecu_SIM_FILEIO_READ);
00322     /* open output files */
00323     ecu_sim_fileio_init (&ecuSim->rout, ecu_SIM_FILEIO_WRITE);
00324     ecu_sim_fileio_init (&ecuSim->sout, ecu_SIM_FILEIO_WRITE);
00325   }
00326   else if (ecuSim->save_to_file == TRUE){
00327     /* rin file I/O init */
00328     strcpy((char *)ecuSim->rin.fname, "rin_sgn.pcm");
00329     /* sin file I/O init */
00330     strcpy((char *)ecuSim->sin.fname, "sin_sgn.pcm");
00331     /* rout file I/O init */
00332     strcpy((char *)ecuSim->rout.fname, "rout_sgn.pcm");
00333     /* sout file I/O init */
00334     strcpy((char *)ecuSim->sout.fname, "sout_sgn.pcm");
00335     ecu_sim_fileio_init (&ecuSim->rin, ecu_SIM_FILEIO_WRITE);
00336     ecu_sim_fileio_init (&ecuSim->sin, ecu_SIM_FILEIO_WRITE);
00337     /* open output files */
00338     ecu_sim_fileio_init (&ecuSim->rout, ecu_SIM_FILEIO_WRITE);
00339     ecu_sim_fileio_init (&ecuSim->sout, ecu_SIM_FILEIO_WRITE);
00340   }
00341
00342
00343   /* Enter main loop */
00344   while (dataIn) {
00345     /* one segment of Tx samples generated in each pass!
00346      *  Rx frames are generated every segs_per_frame segments! */
00347     if (ecuSim->toggle_getflt) {
00348       ecuSim->toggle_getflt = FALSE;
00349       if (ecuSim->getflt.ncoeff > SIU_MAX_GETFLT) {
00350         ecuSim->getflt.ncoeff = SIU_MAX_GETFLT;
00351       }
00352       ecuSim->getflt.retstat = ecuGetFilter (inst->ecuInst,
00353                                ecuSim->getflt.select, ecuSim->getflt.start,
00354                                ecuSim->getflt.ncoeff, &siu_getflt[0]);
00355     }
00356     if (ecuSim->toggle_ecu) {
00357       ecuSim->toggle_ecu = FALSE;
00358       ecuControl (inst->ecuInst, (ecuControl_t*)&ecuSim->ecuCtl);
00359     }
00360     if (ecuSim->toggle_piu) {
00361       ecuSim->toggle_piu = FALSE;
00362       piuControl (inst->piuInst, (piuControl_t*)&ecuSim->piuCtl);
00363     }
00364     if (ecuSim->toggle_tx_sg) {
00365       ecuSim->toggle_tx_sg = FALSE;
00366       ecuSim->txSGN.state = !ecuSim->txSGN.state;
00367       siu_set_sgn (sgnTxInst, (siuSGNPars_t*)&ecuSim->txSGN);
00368     }
00369     if (ecuSim->toggle_rx_sg) {
00370       ecuSim->toggle_rx_sg = FALSE;
00371       ecuSim->rxSGN.state = !ecuSim->rxSGN.state;
00372       siu_set_sgn (sgnRxInst, (siuSGNPars_t*)&ecuSim->rxSGN);
00373     }
00374     if (ecuSim->toggle_hyb) {
00375       ecuSim->toggle_hyb = FALSE;
00376       hybControl (hybTxInst, (hybControl_t*)&ecuSim->hybCtl);
00377     }
00378     if (ecuSim->toggle_freerun) {
00379       ecuSim->toggle_freerun = FALSE;
00380       seg_count  = ecuSim->freerun_frame_cnt;
00381       do_freerun = TRUE;
00382     }
00383 #if ECU_SIM_USE_VPE
00384     if (ecuSim->toggle_slm) {
00385       ecuSim->toggle_slm = FALSE;
00386       slmControl (inst->slmInst, ecuSim->slm_mode);
00387     }
00388 #endif
00389
00390     /* Allow dynamic profiling enable/disable */
00391     ecuProfile.enabled = ecuSim->profile_enable;
00392
00393     /* Free running over many frames */
00394     if (do_freerun) {
00395       if (seg_count-- < 0) {
00396         /* Place breakpoint here */
00397         do_freerun = FALSE;
00398         asm (" nop");
00399         asm (" nop");
00400       }
00401     }
00402
00403     /* RX Frame MUST be generated before piuPcmIo() starts!!! */
00404     dataIn = generate_rx_tone_frame (frame_size, rx_frame_in);
00405
00406     /* if signal is from SGN and want to save to a file */
00407     if ((ecuSim->sig_src      == ecu_SIM_SIG_SRC_SGN) &&
00408         (ecuSim->save_to_file == TRUE)) {
00409       /* write rin to a file */
00410       ecu_sim_output (rinBuffer, rx_frame_in);
00411       ecu_sim_fwrite (rinBuffer, ecuSim->frame_size, &ecuSim->rin);
00412     }
00413 #if ECU_SIM_USE_VPE
00414     slmProcess (inst->slmInst, rx_frame_in, frame_size);
00415 #endif
00416     piuReceiveIn (inst->piuInst, rx_frame_in);
00417
00418     /* Now generate TX segment */
00419     if (ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN) {
00420       generate_tx_tone_frame (frame_size, segment_in);
00421       /* Implement hybrid simulation */
00422       hybAddEcho (hybTxInst, &segment_in[0], &rx_segment_out[0]);
00423       /* if signal is from SGN and want to save to a file */
00424       if ((ecuSim->sig_src      == ecu_SIM_SIG_SRC_SGN) &&
00425           (ecuSim->save_to_file == TRUE)){
00426         ecu_sim_output (sinBuffer, segment_in);
00427         ecu_sim_fwrite (sinBuffer, ecuSim->frame_size, &ecuSim->sin);
00428       }
00429     }
00430     else {
00431       dataIn &= ecu_sim_fread (sinBuffer, frame_size, &ecuSim->sin);
00432       ecu_sim_input (sinBuffer, segment_in);
00433     }
00434
00435     /* Convert near-end signal into u/A-law */
00436     convert_tx_tone_frame (frame_size, inst->companding_law, &segment_in[0]);
00437
00438     piuSendIn (inst->piuInst, (tword **) &piu_segment_in, 0, frame_size);
00439     piuReceiveOut (inst->piuInst, (tword **) &piu_segment_out, 0, frame_size);
00440
00441     /* Explicitly call ecuSendIn() every frame */
00442     ecusim_profile_start ();
00443     ecuSendIn (inst->TxInst.TxSendOut.targetInst, inst->TxInst.send_frame_ptr,
00444                inst->TxInst.recv_frame_ptr, ecu_out_buf_start);
00445     ecusim_profile_stop ();
00446     ecusim_profile_print ();
00447
00448     /* copy out resulting samples */
00449     for (i=0; i<inst->TxInst.send_frame_length; i++) {
00450       siuOutErrStream[i] = ecu_out_buf_start[i];
00451     }
00452
00453     /* write Sout to output file */
00454     if ( (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE) ||
00455         ((ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN ) &&
00456          (ecuSim->save_to_file == TRUE))) {
00457       ecu_sim_output (soutBuffer, siuOutErrStream);
00458       ecu_sim_fwrite (soutBuffer, ecuSim->frame_size, &ecuSim->sout);
00459     }
00460
00461     /* Convert piu_segment_out to rx_segment_out */
00462     if (inst->companding_law == const_COMP_MULAW_8) {
00463       for (i=0; i<frame_size; i++) {
00464         rx_segment_out[i] = (linSample)muaTblUlaw[piu_segment_out[i]];
00465       }
00466     }
00467     else if (inst->companding_law == const_COMP_ALAW_8) {
00468       for (i=0; i<frame_size; i++) {
00469         rx_segment_out[i] = (linSample)muaTblAlaw[piu_segment_out[i]];
00470       }
00471     }
00472     else if (inst->companding_law == const_COMP_LINEAR) {
00473       for (i=0; i<frame_size; i++) {
00474         rx_segment_out[i] = (linSample) (piu_segment_out[i] << (16 - inst->pcm_bits));
00475       }
00476     }
00477     else {                          /* use u-law in transparent mode */
00478       for (i=0; i<frame_size; i++) {
00479         rx_segment_out[i] = (linSample)muaTblUlaw[piu_segment_out[i]];
00480       }
00481     }
00482
00483     /* write rout (really Rin) to output file */
00484     if ( (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE) ||
00485         ((ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN ) &&
00486          (ecuSim->save_to_file == TRUE))) {
00487       ecu_sim_output (routBuffer, rx_segment_out);
00488       ecu_sim_fwrite (routBuffer, ecuSim->frame_size, &ecuSim->rout);
00489     }
00490
00491     /* Update sample count and notify time progress */
00492     sample_count += ecuSim->frame_size;
00493     if (sample_count >= ecuSim->Fs) {
00494       sample_count -= ecuSim->Fs;
00495       sec_count++;
00496       printf (" - Progress: %d seconds\n", sec_count);
00497     }
00498
00499     /* Check for simulation progress */
00500     ecuSim->sample_cnt = ((tulong)sec_count * ecuSim->Fs) + sample_count;
00501   }
00502   /* Close profiling */
00503   ecusim_profile_close ();
00504
00505   /* close files if needed */
00506   if ( (ecuSim->sig_src == ecu_SIM_SIG_SRC_FILE) ||
00507       ((ecuSim->sig_src == ecu_SIM_SIG_SRC_SGN)  &&
00508        (ecuSim->save_to_file == TRUE))) {
00509     ecu_sim_fileio_end (&ecuSim->rin);
00510     ecu_sim_fileio_end (&ecuSim->sin);
00511     ecu_sim_fileio_end (&ecuSim->rout);
00512     ecu_sim_fileio_end (&ecuSim->sout);
00513   }
00514   ecuSim->error_id = ecu_SIM_END;
00515   ecuSim->exec     = FALSE;
00516   //ecu_halt (&ecuSim->exec);
00517 } /* main */
00518
00519 /* end of ecusim.c*/
00520
00521


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 96 of file ecusim.h.

#define ECU_SIM_USE_VPE 0

Definition at line 97 of file ecusim.h.

#define NUMBER_OF_FRAMES 1

Definition at line 108 of file ecusim.h.

#define SIU_MAX_FRAME_LENGTH 80

Definition at line 114 of file ecusim.h.

Referenced by ecu_sim_output(), and main().

#define SIU_MAX_SYSTEM_DELAY 40

Definition at line 115 of file ecusim.h.

#define MAX_STREAM_SIZE (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)

Definition at line 117 of file ecusim.h.

#define MAX_HYBSEG_LENGTH 256

Definition at line 118 of file ecusim.h.

#define MAX_HYB_SAMPLES_PER_FRAME SIU_MAX_FRAME_LENGTH

Definition at line 119 of file ecusim.h.

Referenced by siu_open_txhyb().

#define MAX_HYB_FILTER_LEN 1024

Definition at line 120 of file ecusim.h.

Referenced by siu_open_txhyb().

#define MAX_HYB_RX_DELAY 0

Definition at line 121 of file ecusim.h.

Referenced by siu_open_txhyb().

#define MAX_HYB_TX_DELAY SIU_MAX_SYSTEM_DELAY

Definition at line 122 of file ecusim.h.

Referenced by siu_open_txhyb().

#define ecu_HYB_SIM_MAX_ECOBUFS 5

Definition at line 123 of file ecusim.h.

Referenced by siu_open_txhyb().

#define SIU_MAX_ECU_FILTER_LENGTH 256

Definition at line 131 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_MAX_HYBRID_LENGTH 256

Definition at line 132 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_MAX_ECU_FLTSEG 1

Definition at line 133 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_MAX_ECU_FLTSEG_LENGTH 256

Definition at line 134 of file ecusim.h.

Referenced by ecu_sim_init().

#define SIU_CHST_CLOSED 0

Definition at line 145 of file ecusim.h.

#define SIU_CHST_IDLE 1

Definition at line 146 of file ecusim.h.

#define SIU_CHST_VOICE 2

Definition at line 147 of file ecusim.h.

#define SIU_CHST_DTMF 3

Definition at line 148 of file ecusim.h.

#define ecu_SIM_MAX_CHANNELS 16

Definition at line 151 of file ecusim.h.

#define ecu_SIM_MAX_SAMPLES MAX_STREAM_SIZE

Definition at line 152 of file ecusim.h.

#define ecu_SIM_MAX_TAIL_LEN 128

Definition at line 153 of file ecusim.h.

#define ecu_SIM_MAX_ECOBUFS 5

Definition at line 154 of file ecusim.h.

#define ecu_SIM_MAX_STRING 256

Definition at line 155 of file ecusim.h.

#define ecu_SIM_MAX_BSIZE 128

Definition at line 156 of file ecusim.h.

#define ecu_SIM_FILEIO_READ ( 0)

Definition at line 159 of file ecusim.h.

Referenced by ecu_sim_fileio_init(), and main().

#define ecu_SIM_FILEIO_WRITE ( 1)

Definition at line 160 of file ecusim.h.

Referenced by ecu_sim_fileio_init(), and main().

#define ecu_SIM_ERR_SLM ( 1)

Definition at line 163 of file ecusim.h.

Referenced by main().

#define ecu_SIM_ERR_HYB ( 2)

Definition at line 164 of file ecusim.h.

Referenced by siu_open_txhyb().

#define ecu_SIM_ERR_SGN ( 4)

Definition at line 165 of file ecusim.h.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

#define ecu_SIM_ERR_5 ( 5)

Definition at line 166 of file ecusim.h.

#define ecu_SIM_ERR_6 ( 6)

Definition at line 167 of file ecusim.h.

#define ecu_SIM_ERR_7 ( 7)

Definition at line 168 of file ecusim.h.

#define ecu_SIM_ERR_8 ( 8)

Definition at line 169 of file ecusim.h.

#define ecu_SIM_ERR_9 ( 9)

Definition at line 170 of file ecusim.h.

#define ecu_SIM_ERR_10 (10)

Definition at line 171 of file ecusim.h.

#define ecu_SIM_ERR_11 (11)

Definition at line 172 of file ecusim.h.

#define ecu_SIM_ERR_12 (12)

Definition at line 173 of file ecusim.h.

#define ecu_SIM_ERR_13 (13)

Definition at line 174 of file ecusim.h.

#define ecu_SIM_ERR_14 (14)

Definition at line 175 of file ecusim.h.

#define ecu_SIM_ERR_15 (15)

Definition at line 176 of file ecusim.h.

#define ecu_SIM_END (16)

Definition at line 177 of file ecusim.h.

#define ecu_SIM_SIG_SRC_FILE 0

Definition at line 180 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

#define ecu_SIM_SIG_SRC_SGN 1

Definition at line 181 of file ecusim.h.

Referenced by generate_rx_tone_frame(), and main().

#define ecu_SIM_DEF_FS 8000

Definition at line 184 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

#define ecu_SIM_DEF_RIN_FNAME "rin.pcm"

Definition at line 185 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_SIN_FNAME "sin.pcm"

Definition at line 186 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_ROUT_FNAME "rout.pcm"

Definition at line 187 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_SOUT_FNAME "sout.pcm"

Definition at line 188 of file ecusim.h.

Referenced by ecu_sim_init().

#define ecu_SIM_DEF_FILT_FNAME "hreg.txt"

Definition at line 189 of file ecusim.h.

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

Definition at line 197 of file ecusim.h.

Referenced by ecusim_profile_close(), and ecusim_profile_init().

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

Definition at line 198 of file ecusim.h.

Referenced by ecu_sim_init().

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

Definition at line 199 of file ecusim.h.

Referenced by ecu_sim_init().

#define FILEIO_FRM_FACTOR 3

Definition at line 203 of file ecusim.h.

Referenced by main().

#define SEG_END_TBLSIZE 8

Definition at line 206 of file ecusim.h.

Referenced by acmpr(), and mucmpr().

#define ecuSIM_MAXSENDOUT_LENGTH 88

Definition at line 207 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 360 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070 #ifndef _ECUSIM_H
00071 #define _ECUSIM_H
00072
00073 #include <stdio.h>
00074
00075 /* System level includes */
00076 #include <ti/mas/types/types.h>
00077 #include <ti/mas/util/utl.h>
00078 #include <ti/mas/sdk/sgn.h>
00079 #include <ti/mas/sdk/hyb.h>
00080 #include <ti/mas/util/mua.h>
00081 #include <ti/mas/mhm/mhm.h>
00082
00083 /* ECU includes */
00084 #include <ti/mas/ecu/ecu.h>        /* for ecuGetSizes(), ecuNew(), ecuOpen(),... */
00085
00086 /* SIU header files */
00087 #include <ti/mas/ecu/test/src/siu.h>
00088 #include <ti/mas/ecu/test/src/siuloc.h>
00089 #include <ti/mas/ecu/test/src/siuport.h>
00090
00091 /* Test include files */
00092 #include <ti/mas/ecu/test/src/ecusimport.h>
00093 #include <ti/mas/ecu/test/src/piu.h>        /* for piuPcmIo() */
00094
00095 /* Options */
00096 #define ECUSIM_INCLUDE_MAG  0
00097 #define ECU_SIM_USE_VPE     0
00098
00099 #if ECU_SIM_USE_VPE
00100 #include <ti/mas/vpe/slm.h>
00101 #endif
00102
00103 #if ECUSIM_INCLUDE_MAG
00104 #include <ti/mas/ecu/mag.h>
00105 #endif
00106
00107
00108 #define NUMBER_OF_FRAMES          1       /* # of frames to save */
00109
00110 #if ecu_5P5MS_FRAME_ENABLE
00111 #define SIU_MAX_FRAME_LENGTH      88      /* 11ms maximum frame duration */
00112 #define SIU_MAX_SYSTEM_DELAY      44      /* maximum extra system delay in samples */
00113 #else
00114 #define SIU_MAX_FRAME_LENGTH      80      /* 10ms maximum frame duration */
00115 #define SIU_MAX_SYSTEM_DELAY      40      /* maximum extra system delay in samples */
00116 #endif
00117 #define MAX_STREAM_SIZE   (NUMBER_OF_FRAMES*SIU_MAX_FRAME_LENGTH)
00118 #define MAX_HYBSEG_LENGTH         256     /* maximum hybrid segment length */
00119 #define MAX_HYB_SAMPLES_PER_FRAME SIU_MAX_FRAME_LENGTH
00120 #define MAX_HYB_FILTER_LEN        1024
00121 #define MAX_HYB_RX_DELAY          0
00122 #define MAX_HYB_TX_DELAY          SIU_MAX_SYSTEM_DELAY
00123 #define ecu_HYB_SIM_MAX_ECOBUFS   5
00124 /* Define search related constants */
00125 #if ecu_SEARCH_ENABLE
00126 #define SIU_MAX_ECU_FILTER_LENGTH 1024    /* maximum echo tail in taps */
00127 #define SIU_MAX_HYBRID_LENGTH     1024    /* maximum hybrid filter length in taps */
00128 #define SIU_MAX_ECU_FLTSEG        3       /* maximum number of filter segments */
00129 #define SIU_MAX_ECU_FLTSEG_LENGTH 256     /* maximum taps for all filter segments */
00130 #else
00131 #define SIU_MAX_ECU_FILTER_LENGTH 256     /* maximum echo tail in taps */
00132 #define SIU_MAX_HYBRID_LENGTH     256     /* maximum hybrid filter length in taps */
00133 #define SIU_MAX_ECU_FLTSEG        1       /* maximum number of filter segments */
00134 #define SIU_MAX_ECU_FLTSEG_LENGTH 256     /* maximum taps for all filter segments */
00135 #endif
00136
00137 #if ECUSIM_INCLUDE_MAG
00138 /* MIPS Agent Required definitions */
00139 #define MAX_CHANNELS   10          /* Number of channels for the build */
00140 #define MAX_MIPS       0x00017C00L /* maximum MIPS = 95.0 in U22.10 */
00141 #define mag_INIT_CHANNEL_STRUCT {0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}
00142 #endif
00143
00144 /* SIU channel state definitions */
00145 #define SIU_CHST_CLOSED 0
00146 #define SIU_CHST_IDLE   1
00147 #define SIU_CHST_VOICE  2
00148 #define SIU_CHST_DTMF   3
00149
00150 /* Simulation constraints */
00151 #define ecu_SIM_MAX_CHANNELS         16          // Maximum number of channels to simulate
00152 #define ecu_SIM_MAX_SAMPLES    MAX_STREAM_SIZE   // Maximum frame_size
00153 #define ecu_SIM_MAX_TAIL_LEN        128          // Maximum tail length
00154 #define ecu_SIM_MAX_ECOBUFS           5          // Maximum module buffers
00155 #define ecu_SIM_MAX_STRING          256          // Maximum string size
00156 #define ecu_SIM_MAX_BSIZE           128          // Maximum filter block size
00157
00158 /* Simulation file open actions */
00159 #define ecu_SIM_FILEIO_READ         ( 0)    // Open file for read (binary)
00160 #define ecu_SIM_FILEIO_WRITE        ( 1)    // Open file for write (binary)
00161
00162 /* Simulation error identifiers */
00163 #define ecu_SIM_ERR_SLM             ( 1)    /* SLM related errors   */
00164 #define ecu_SIM_ERR_HYB             ( 2)    /* HYB related errors   */
00165 #define ecu_SIM_ERR_SGN             ( 4)    /* SGN related errors   */
00166 #define ecu_SIM_ERR_5               ( 5)    /* related errors   */
00167 #define ecu_SIM_ERR_6               ( 6)    /* related errors   */
00168 #define ecu_SIM_ERR_7               ( 7)    /* related errors   */
00169 #define ecu_SIM_ERR_8               ( 8)    /* related errors   */
00170 #define ecu_SIM_ERR_9               ( 9)    /* related errors   */
00171 #define ecu_SIM_ERR_10              (10)    /* related errors   */
00172 #define ecu_SIM_ERR_11              (11)    /* related errors   */
00173 #define ecu_SIM_ERR_12              (12)    /* related errors   */
00174 #define ecu_SIM_ERR_13              (13)    /* related errors   */
00175 #define ecu_SIM_ERR_14              (14)    /* related errors   */
00176 #define ecu_SIM_ERR_15              (15)    /* related errors   */
00177 #define ecu_SIM_END                 (16)    /* simulation ends  */
00178
00179 /* simulation signal source */
00180 #define ecu_SIM_SIG_SRC_FILE        0
00181 #define ecu_SIM_SIG_SRC_SGN         1
00182
00183 /* simulation default settings */
00184 #define ecu_SIM_DEF_FS             8000     /* default sampling rate 8kHz */
00185 #define ecu_SIM_DEF_RIN_FNAME      "rin.pcm"
00186 #define ecu_SIM_DEF_SIN_FNAME      "sin.pcm"
00187 #define ecu_SIM_DEF_ROUT_FNAME     "rout.pcm"
00188 #define ecu_SIM_DEF_SOUT_FNAME     "sout.pcm"
00189 #define ecu_SIM_DEF_FILT_FNAME     "hreg.txt"
00190
00191 /* Handle CCS Project paths */
00192 #ifdef  __CCS_PROJECT_REL_PATH
00193 #define ecusim_PROFILE_FNAME       "../../../vectors/profile/profile.txt"
00194 #define ecu_SIM_DEF_BASE_INDIR     "../../../vectors/inp/"
00195 #define ecu_SIM_DEF_BASE_OUTDIR    "../../../vectors/out/"
00196 #else
00197 #define ecusim_PROFILE_FNAME       "../../vectors/profile/profile.txt"
00198 #define ecu_SIM_DEF_BASE_INDIR     "../../vectors/inp/"
00199 #define ecu_SIM_DEF_BASE_OUTDIR    "../../vectors/out/"
00200 #endif
00201
00202 /* Miscellaneous defines */
00203 #define FILEIO_FRM_FACTOR   3    /* Increase RX/TX frames by this factor when */
00204                                  /* using file I/O to allow for delay */
00205
00206 #define SEG_END_TBLSIZE   8     /* number of u/A-law segments */
00207 #define ecuSIM_MAXSENDOUT_LENGTH   88      /* 10ms for 8kHz */
00208
00209 /* Signal Generator Parameters */
00210 typedef struct {
00211   tbool      state;     /* TRUE: generator is on. */
00212   tbool      reset;     /* TRUE: reset the generator (only for CSS) */
00213   tint      delay;      /* number of samples to delay signal generation */
00214   linSample dcoffset;   /* dc offset (Q0 format) */
00215   tint      wftype;     /* one of sgn_WFT_'s */
00216   tint      f1;         /* the first frequency in Hz */
00217   tint      f2;         /* the second frequency in Hz */
00218   linSample amp1;       /* amplitude of the first component (Q0) */
00219   linSample amp2;       /* amplitude of the second component (Q0) */
00220   tint      nlevel;     /* idle noise level in dBm0 */
00221   tuint     nseed;      /* idle noise seed */
00222   tint      ntype;      /* noise type sgn_NT_xxx */
00223   tint      pow_level;  /* Hoth or CSS power level in dBm0 */
00224   tuint     hoth_seed;  /* Hoth noise seed */
00225   tulong    sdram_addr; /* Address of SDRAM samples */
00226   tulong    num_sample; /* Number of SDRAM samples */
00227 } siuSGNPars_t;
00228
00229 /* Get filter parameters */
00230 typedef struct {
00231   tint  select;       /* 0 - FG, 1 - BG */
00232   tint  start;        /* starting index */
00233   tint  ncoeff;       /* # of coefficients (up to SIU_MAX_GETFLT) */
00234   tint  retstat;      /* most recent return status */
00235 } siuGetFlt_t;
00236
00237 #if ECUSIM_INCLUDE_MAG
00238 typedef struct {
00239   tint    event;        /* Event type generated */
00240   union {
00241     tint ecu_event;     /* ECU event code */
00242     struct {
00243       tint id;          /* Channel ID (indexing starts at 1) */
00244       tint codec;       /* Codec code (see vctypes.h) */
00245       tint event;       /* Codec event (open/close) */
00246       tint type;        /* Codec type (encoder/decoder) */
00247     } codec;
00248     struct {
00249       tint id;          /* Channel ID (indexing starts at 1) */
00250       tint ostate;      /* Old channel state */
00251       tint nstate;      /* New channel state */
00252     } channel;
00253     magControl_t ctl; /* MIPS Agent control structure */
00254   } u;
00255 } siuMaEvt_t;
00256 #endif
00257
00258 typedef struct {
00259   tbool fio;                            // TRUE: Get/put samples from/to file
00260   tbool eof;                            // TRUE: End of file reached
00261   FILE  *fptr;                          // File pointer for read/write
00262   char  fname[ecu_SIM_MAX_STRING];      // File name to open/close
00263 } ecuSimFileIo_t;
00264
00265 typedef struct {
00266   FILE  *fptr;              /* FILE pointer for profiling data */
00267   tbool use_cache;          /* Boolean to enable/disable cache usage/flush */
00268   tbool enabled;            /* Boolean to enable disable internally */
00269   tlong overhead;           /* Cycle overhead for profile cycle measurement */
00270   tlong start_cnt;          /* Cycle start count prior to profile call */
00271   tlong cycles;             /* Total cycles for ecuSendIn() */
00272 } ecuProfile_t;
00273
00274 /* SIU Setup Structure (simulator configuration) */
00275 typedef struct siuSetup_s {
00276   tbool           exec;               /* execution flag */
00277   tulong          sample_cnt;         /* number of samples executed */
00278   tuint           clock_mul;          /* Clock multiplier value (1-16) */
00279   tint            pcm_format;         /* companding law -1 (transparent),
00280                                        *  0 (A-law), 1 (u-law), 2 (linear) */
00281   tint            pcm_bits;           /* (1-16), number of bits in a pcm-sample */
00282   tint            frame_size;         /* # samples in frame */
00283   tint            ecu_y2x_delay;      /* ECU y2x delay (0 for SDRAM input) */
00284   tint            ecu_fltseg_length;  /* max # taps total for filter segments */
00285   tint            ecu_num_fltseg;     /* max # filter segments */
00286   tint            ecu_filter_length;  /* # taps in ECU tail */
00287   tint            hyb_filter_length;  /* # taps in hybrid filter */
00288   tbool           toggle_ecu;         /* TRUE: change ECU control parameters */
00289   ecuControl_t    ecuCtl;             /* ECU control parameters */
00290   tbool           toggle_hyb;         /* TRUE: change hybrid parameters */
00291   hybControl_t    hybCtl;             /* Hybrid control parameters */
00292   tbool           toggle_tx_sg;       /* TRUE: toggle Tx signal generator */
00293   siuSGNPars_t    txSGN;              /* Tx Signal Generator Parameters */
00294   tbool           toggle_rx_sg;       /* TRUE: toggle Rx signal generator */
00295   siuSGNPars_t    rxSGN;              /* Rx Signal Generator Parameters */
00296   tbool           toggle_piu;         /* TRUE: change ECU control parameters */
00297   piuControl_t    piuCtl;             /* PIU control parameters */
00298   tbool           toggle_getflt;      /* TRUE: get filter coefficients */
00299   siuGetFlt_t     getflt;             /* Get filter parameters */
00300 #if ECUSIM_INCLUDE_MAG
00301   tbool           toggle_mipsevt;     /* TRUE: Generate event for MIPS Agent */
00302   siuMaEvt_t      mipsEvt;            /* MIPS Agent event parameters */
00303 #endif
00304   tbool           profile_enable;     /* TRUE: enable ECU profiling */
00305 #if ECU_SIM_USE_VPE
00306   tbool           toggle_slm;         /* TRUE: change signal limiter mode */
00307   tint            slm_mode;           /* signal limiter mode */
00308 #endif
00309   tbool           toggle_freerun;     /* TRUE: Run "free" for a scpecific period */
00310   tuint           freerun_frame_cnt;  /* Number of frames to run "free" */
00311   tuint           Fs;                 /* sampling rate */
00312   tuint           error_id;           /* error return ID */
00313   tuint           sig_src;            /* signal source, from SGN or from file */
00314   tbool           save_to_file;       /* if signal source is from SGN, whether save to a file*/
00315   tuint           num_channel;        /* number of channels in the simulation */
00316   tuint           output_chnum;       /* output channel number */
00317   ecuSimFileIo_t  rin;                /* rin file I/O structure  */
00318   ecuSimFileIo_t  sin;                /* sin file I/O structure  */
00319   ecuSimFileIo_t  rout;               /* rout file I/O structure */
00320   ecuSimFileIo_t  sout;               /* sout file I/O structure */
00321 } siuSetup_t;
00322
00323
00324 /* Prototypes needed for initialization */
00325 void  ecu_send_out   (void *ecuSoInst, void *samples_in);
00326
00327 #if ECUSIM_INCLUDE_MAG
00328 tuint mag_dummy_dp (tint code, tint action);
00329 #endif
00330
00331 #endif /* _ECUSIM_H */
00332 /* 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 118 of file ecusimfunc.c.

Referenced by ecu_sim_init().

#define MIPS_AGENT_EVENT_ECU 1

Definition at line 119 of file ecusimfunc.c.

#define MIPS_AGENT_EVENT_CODEC 2

Definition at line 120 of file ecusimfunc.c.

#define MIPS_AGENT_EVENT_CHSTATE 3

Definition at line 121 of file ecusimfunc.c.

#define QUANT_MASK (0xf)

Definition at line 124 of file ecusimfunc.c.

Referenced by acmpr().

#define SEG_SHIFT (4)

Definition at line 125 of file ecusimfunc.c.

Referenced by acmpr().

#define SEG_MASK (0x70)

Definition at line 126 of file ecusimfunc.c.

#define BIAS (0x84)

Definition at line 127 of file ecusimfunc.c.

Referenced by mucmpr().

#define ecu_FG_FLTSEG 1

Definition at line 389 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_BG_FLTSEG 2

Definition at line 390 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_BG_E_BUF 3

Definition at line 391 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_RECEIVE_IN 4

Definition at line 392 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_EXPAND_DL_BUF 5

Definition at line 393 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_BG_UPDATE_BUF 6

Definition at line 394 of file ecusimfunc.c.

Referenced by siu_new_ecu().

#define ecu_SEARCH_FILTER_BUF 14

Definition at line 395 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 177 of file ecusimfunc.c.

Referenced by acmpr(), and mucmpr().

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

Definition at line 188 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 219 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 134 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 252 of file ecusimfunc.c.

Referenced by siu_open_txsgn().

sgnFileIo_t* siu_rx_file ( sgnFileIo_t * dsc )

Definition at line 265 of file ecusimfunc.c.

Referenced by siu_open_rxsgn().

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

Definition at line 278 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 285 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 326 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 360 of file ecusimfunc.c.

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

void siu_new_ecu ( tint chnum )

Definition at line 397 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 509 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 541 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 595 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 641 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 686 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 750 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 948 of file ecusimfunc.c.

Referenced by siu_tx_execute().

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

Definition at line 969 of file ecusimfunc.c.

Referenced by siuDebugInfo(), and siuDebugInfoNew().

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

Definition at line 984 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 1018 of file ecusimfunc.c.

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

Definition at line 1029 of file ecusimfunc.c.

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

Definition at line 1041 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 91 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInUCmpStream[MAX_STREAM_SIZE]

Definition at line 92 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

tuint siuInACmpStream[MAX_STREAM_SIZE]

Definition at line 93 of file ecusimfunc.c.

Referenced by convert_tx_tone_frame().

linSample siuRxInStream[MAX_STREAM_SIZE]

Definition at line 94 of file ecusimfunc.c.

Referenced by generate_rx_tone_frame().

linSample siuOutStream[MAX_STREAM_SIZE]

Definition at line 97 of file ecusimfunc.c.

Referenced by siu_tx_execute().

linSample siuOutErrStream[MAX_STREAM_SIZE]

Definition at line 98 of file ecusimfunc.c.

Referenced by ecu_send_out(), and main().

linSample* piu_segment_in

Definition at line 87 of file ecusim.c.

Referenced by convert_tx_tone_frame(), and main().

void* sgnTxInst = NULL

Definition at line 104 of file ecusimfunc.c.

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

void* sgnRxInst = NULL

Definition at line 105 of file ecusimfunc.c.

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

void* hybTxInst = NULL

Definition at line 108 of file ecusimfunc.c.

Referenced by main(), and siu_open_txhyb().

Fract hybUserFilter[MAX_HYBSEG_LENGTH]

Definition at line 109 of file ecusimfunc.c.

tint v21_flags = 0x7e7e

Definition at line 112 of file ecusimfunc.c.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

tint gelFlag = 0

Definition at line 115 of file ecusimfunc.c.

tint seg_end[SEG_END_TBLSIZE] [static]

Initial value:

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

Definition at line 129 of file ecusimfunc.c.

Referenced by acmpr(), and mucmpr().

volatile siuSetup_t siuSetup

Definition at line 134 of file ecusimfunc.c.

volatile siuSetup_t* ecuSim = &siuSetup

Definition at line 135 of file ecusimfunc.c.

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

Definition at line 138 of file ecusimfunc.c.

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

Definition at line 139 of file ecusimfunc.c.

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

Definition at line 140 of file ecusimfunc.c.

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

Definition at line 141 of file ecusimfunc.c.

tint siu_piu_report_code

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


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 83 of file ecusimport.h.

#define ecu_WIDE_BAND FALSE

Definition at line 90 of file ecusimport.h.

#define ecu_DELAY_LINE_COMPRESS FALSE

Definition at line 100 of file ecusimport.h.

#define ecu_INST_RELOCATION FALSE

Definition at line 110 of file ecusimport.h.

#define ecu_5P5MS_FRAME_ENABLE FALSE

Definition at line 119 of file ecusimport.h.

#define ecu_DBGSTRM_ENABLE FALSE

Definition at line 128 of file ecusimport.h.

#define ecu_03DB_ENABLE FALSE

Definition at line 135 of file ecusimport.h.

#define ecu_CPD_ENABLE FALSE

Definition at line 142 of file ecusimport.h.

#define ecu_RERL_ENABLE FALSE

Definition at line 149 of file ecusimport.h.

#define _ECUSIMPORT_C54 0

Definition at line 155 of file ecusimport.h.

#define _ECUSIMPORT_C54F 0

Definition at line 161 of file ecusimport.h.

#define _ECUSIMPORT_C55 0

Definition at line 167 of file ecusimport.h.

Referenced by ecu_sim_output().

#define _ECUSIMPORT_C55L 0

Definition at line 173 of file ecusimport.h.

Referenced by ecu_sim_output().

#define _ECUSIMPORT_C64 0

Definition at line 179 of file ecusimport.h.

#define _ECUSIMPORT_C64_BIG_ENDIAN 0

Definition at line 185 of file ecusimport.h.

#define _ECUSIMPORT_C64P 0

Definition at line 191 of file ecusimport.h.

#define _ECUSIMPORT_C64P_BIG_ENDIAN 0

Definition at line 197 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C64P 0

Definition at line 203 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 209 of file ecusimport.h.

#define _ECUSIMPORT_C66 0

Definition at line 215 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C66 0

Definition at line 221 of file ecusimport.h.

#define _ECUSIMPORT_C66_BIG_ENDIAN 0

Definition at line 227 of file ecusimport.h.

#define _ECUSIMPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 233 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *
00013  *              All rights reserved not granted herein.
00014  *
00015  *                         Limited License.
00016  *
00017  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00018  *  non-exclusive license under copyrights and patents it now or hereafter owns
00019  *  or controls to make, have made, use, import, offer to sell and sell
00020  *  ("Utilize") this software subject to the terms herein.  With respect to the
00021  *  foregoing patent license, such license is granted solely to the extent that
00022  *  any such patent is necessary to Utilize the software alone.  The patent
00023  *  license shall not apply to any combinations which include this software,
00024  *  other than combinations with devices manufactured by or for TI (“TI
00025  *  Devices”).  No hardware patent is licensed hereunder.
00026  *
00027  *  Redistributions must preserve existing copyright notices and reproduce this
00028  *  license (including the above copyright notice and the disclaimer and (if
00029  *  applicable) source code license limitations below) in the documentation
00030  *  and/or other materials provided with the distribution
00031  *
00032  *  Redistribution and use in binary form, without modification, are permitted
00033  *  provided that the following conditions are met:
00034  *
00035  *    *  No reverse engineering, decompilation, or disassembly of this software
00036  *  is permitted with respect to any software provided in binary form.
00037  *
00038  *    *  any redistribution and use are licensed by TI for use only with TI
00039  *  Devices.
00040  *
00041  *    *  Nothing shall obligate TI to provide you with source code for the
00042  *  software licensed and provided to you in object code.
00043  *
00044  *  If software source code is provided to you, modification and redistribution
00045  *  of the source code are permitted provided that the following conditions are
00046  *  met:
00047  *
00048  *    *  any redistribution and use of the source code, including any resulting
00049  *  derivative works, are licensed by TI for use only with TI Devices.
00050  *
00051  *    *  any redistribution and use of any object code compiled from the source
00052  *  code and any resulting derivative works, are licensed by TI for use only
00053  *  with TI Devices.
00054  *
00055  *  Neither the name of Texas Instruments Incorporated nor the names of its
00056  *  suppliers may be used to endorse or promote products derived from this
00057  *  software without specific prior written permission.
00058  *
00059  *  DISCLAIMER.
00060  *
00061  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00062  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00063  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00064  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00065  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00066  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00067  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00068  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00069  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00070  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00071  *  DAMAGE.
00072  *****************************************************************************/
00073 #ifndef _ECUSIMPORT_H
00074 #define _ECUSIMPORT_H
00075
00076 /* buildfile command line options */
00077
00078 /* Command line search enable/disable (ECU_TAIL) */
00079 #ifdef ENABLE_SEARCH
00080 #define ecu_SEARCH_ENABLE        TRUE /* TRUE:  Use search algorithm, request
00081                                        *        memory for search. */
00082 #else
00083 #define ecu_SEARCH_ENABLE       FALSE /* FALSE: Full filter implementation. */
00084 #endif
00085
00086 /* Command line WB enable/disable (WB=YES/NO) */
00087 #ifdef ENABLE_WB
00088 #define ecu_WIDE_BAND            TRUE /* TRUE:  Use wide band canceller */
00089 #else
00090 #define ecu_WIDE_BAND           FALSE /* FALSE: narrow band only */
00091 #endif
00092
00093 /* Command line PCM delay line compression enable/disable (ecu_DLCOMP=YES/NO) */
00094 #ifdef ENABLE_COMPRESS
00095 #define ecu_DELAY_LINE_COMPRESS  TRUE /* TRUE:  Assume that we receive compressed
00096                                        *        and packed PCM samples for our delay
00097                                        *        line from the PIU.  Perform expansion
00098                                        *        before usage.  */
00099 #else
00100 #define ecu_DELAY_LINE_COMPRESS FALSE /* FALSE: Assume that we DO NOT receive compressed
00101                                        *        and packed PCM samples for our delay
00102                                        *        line from the PIU. */
00103 #endif
00104
00105 /* Command line instance relocation enable/disable (ecu_RELOC=YES/NO) */
00106 #ifdef ENABLE_RELOC
00107 #define ecu_INST_RELOCATION      TRUE /* TRUE:  Assume that we DO support instance
00108                                                 relocation.  */
00109 #else
00110 #define ecu_INST_RELOCATION     FALSE /* FALSE: Assume that we DO NOT support instance
00111                                                 relocation. */
00112 #endif
00113
00114 /* Command line 5.5ms frame handling enable/disable (ecu_5P5MS=YES/NO) */
00115 #ifdef ENABLE_5P5MS
00116 #define ecu_5P5MS_FRAME_ENABLE   TRUE /* TRUE:  Allow multiple of 5.5ms AND 5ms frame
00117                                        *        sizes. */
00118 #else
00119 #define ecu_5P5MS_FRAME_ENABLE  FALSE /* FALSE: Allow multiple of 5ms frame sizes
00120                                        *        only. */
00121 #endif
00122
00123 /* Command line debug streaming enable/disable (ecu_DEBUG=YES/NO) */
00124 #ifdef ENABLE_DEBUG
00125 #define ecu_DBGSTRM_ENABLE       TRUE /* TRUE:  Compile in debug streaming messages
00126                                        *        through DS0's defined in siudbgstrm.h. */
00127 #else
00128 #define ecu_DBGSTRM_ENABLE      FALSE /* FALSE: No debug streaming messages. */
00129 #endif
00130
00131 /* Command line 0/3dB configuration enable/disable (ecu_03DB=YES/NO) */
00132 #ifdef ENABLE_03DB
00133 #define ecu_03DB_ENABLE          TRUE /* TRUE:  Enable 0/3dB ERL support */
00134 #else
00135 #define ecu_03DB_ENABLE         FALSE /* FALSE: Disable 0/3dB ERL support */
00136 #endif
00137
00138 /* Command line constant PCM pattern detection enable/disable (ecu_CPD=YES/NO) */
00139 #ifdef ENABLE_CPD
00140 #define ecu_CPD_ENABLE           TRUE /* TRUE:  Enable const PCM detection */
00141 #else
00142 #define ecu_CPD_ENABLE          FALSE /* FALSE: Disable const PCM detection */
00143 #endif
00144
00145 /* Command line RERL estimation enable/disable (ecu_RERL=YES/NO) */
00146 #ifdef ENABLE_RERL
00147 #define ecu_RERL_ENABLE          TRUE /* TRUE:  Enable RERL estimation  */
00148 #else
00149 #define ecu_RERL_ENABLE         FALSE /* FALSE: Disable RERL estimation */
00150 #endif
00151
00152 #ifdef ti_targets_C54
00153 #define _ECUSIMPORT_C54 1
00154 #else
00155 #define _ECUSIMPORT_C54 0
00156 #endif
00157
00158 #ifdef ti_targets_C54_far
00159 #define _ECUSIMPORT_C54F 1
00160 #else
00161 #define _ECUSIMPORT_C54F 0
00162 #endif
00163
00164 #ifdef ti_targets_C55
00165 #define _ECUSIMPORT_C55 1
00166 #else
00167 #define _ECUSIMPORT_C55 0
00168 #endif
00169
00170 #ifdef ti_targets_C55_large
00171 #define _ECUSIMPORT_C55L 1
00172 #else
00173 #define _ECUSIMPORT_C55L 0
00174 #endif
00175
00176 #ifdef ti_targets_C64
00177 #define _ECUSIMPORT_C64 1
00178 #else
00179 #define _ECUSIMPORT_C64 0
00180 #endif
00181
00182 #ifdef ti_targets_C64_big_endian
00183 #define _ECUSIMPORT_C64_BIG_ENDIAN 1
00184 #else
00185 #define _ECUSIMPORT_C64_BIG_ENDIAN 0
00186 #endif
00187
00188 #ifdef ti_targets_C64P
00189 #define _ECUSIMPORT_C64P 1
00190 #else
00191 #define _ECUSIMPORT_C64P 0
00192 #endif
00193
00194 #ifdef ti_targets_C64P_big_endian
00195 #define _ECUSIMPORT_C64P_BIG_ENDIAN 1
00196 #else
00197 #define _ECUSIMPORT_C64P_BIG_ENDIAN 0
00198 #endif
00199
00200 #ifdef ti_targets_elf_C64P
00201 #define _ECUSIMPORT_ELF_C64P 1
00202 #else
00203 #define _ECUSIMPORT_ELF_C64P 0
00204 #endif
00205
00206 #ifdef ti_targets_elf_C64P_big_endian
00207 #define _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 1
00208 #else
00209 #define _ECUSIMPORT_ELF_C64P_BIG_ENDIAN 0
00210 #endif
00211
00212 #ifdef ti_targets_C66
00213 #define _ECUSIMPORT_C66 1
00214 #else
00215 #define _ECUSIMPORT_C66 0
00216 #endif
00217
00218 #ifdef ti_targets_elf_C66
00219 #define _ECUSIMPORT_ELF_C66 1
00220 #else
00221 #define _ECUSIMPORT_ELF_C66 0
00222 #endif
00223
00224 #ifdef ti_targets_C66_big_endian
00225 #define _ECUSIMPORT_C66_BIG_ENDIAN 1
00226 #else
00227 #define _ECUSIMPORT_C66_BIG_ENDIAN 0
00228 #endif
00229
00230 #ifdef ti_targets_elf_C66_big_endian
00231 #define _ECUSIMPORT_ELF_C66_BIG_ENDIAN 1
00232 #else
00233 #define _ECUSIMPORT_ELF_C66_BIG_ENDIAN 0
00234 #endif
00235
00236
00237 #if   (_ECUSIMPORT_C54 || _ECUSIMPORT_C54F)
00238 #include <ti/mas/ecu/test/src/c54/ecusimport.h>
00239 #elif (_ECUSIMPORT_C55 || _ECUSIMPORT_C55L)
00240 #include <ti/mas/ecu/test/src/c55/ecusimport.h>
00241 #elif (_ECUSIMPORT_C64       || _ECUSIMPORT_C64_BIG_ENDIAN      || \
00242        _ECUSIMPORT_C64P      || _ECUSIMPORT_C64P_BIG_ENDIAN     || \
00243        _ECUSIMPORT_ELF_C64P  || _ECUSIMPORT_ELF_C64P_BIG_ENDIAN || \
00244        _ECUSIMPORT_C66       || _ECUSIMPORT_C66_BIG_ENDIAN      || \
00245        _ECUSIMPORT_ELF_C66   || _ECUSIMPORT_ELF_C66_BIG_ENDIAN)
00246 #include <ti/mas/ecu/test/src/c64/ecusimport.h>
00247 #else
00248 #error invalid target
00249 #endif
00250
00251 #endif /* _ECUSIMPORT_H */
00252 /* 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 179 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 212 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 236 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 318 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 342 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 438 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 493 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 552 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 80 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 92 of file ecuuta.c.

const utaEnum_t ecuBoolVals[2]

Initial value:

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

Definition at line 99 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 105 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 112 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 119 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 125 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 134 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 146 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 154 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 162 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #include <ti/mas/ecu/ecu.h>
00072 #include <ti/mas/sdk/sgn.h>
00073 #include <ti/mas/sdk/hyb.h>
00074 #include <ti/mas/util/mua.h>
00075 #include <ti/mas/ecu/test/src/ecuuta.h>
00076 #include <ti/mas/ecu/test/src/ecuautoport.h>
00077
00078
00079 /* Allocate and fill ECU command table */
00080 const utaCommand_t ecuCommands[ecucmd_AUTO_NUM_CMD] = {
00081   { "CHNNEW", ecucmd_chnnew_handler, ecucmd_NUM_CHNNEW_OPT, ecuChnnewOpts },
00082   { "CHNDEL", ecucmd_chndel_handler, 0 },
00083   { "OPEN",   ecucmd_open_handler,   ecucmd_NUM_OPEN_OPT,   ecuOpenOpts   },
00084   { "CLOSE",  ecucmd_close_handler,  0 },
00085   { "CHNCFG", ecucmd_chncfg_handler, ecucmd_NUM_CHNCFG_OPT, ecuChncfgOpts },
00086   { "RUNSIM", ecucmd_runsim_handler, ecucmd_NUM_RUNSIM_OPT, ecuRunsimOpts },
00087   { "OUTPUT", ecucmd_output_handler, ecucmd_NUM_OUTPUT_OPT, ecuOutputOpts },
00088   { "GETFLT", ecucmd_getflt_handler, ecucmd_NUM_GETFLT_OPT, ecuGetfltOpts }
00089 };
00090
00091 /* Channel open PCM option (PCM) value enumerations */
00092 const utaEnum_t ecuPcmVals[3] = {
00093   { "ULA", ecu_AUTO_PCM_ULAW },
00094   { "ALA", ecu_AUTO_PCM_ALAW },
00095   { "LIN", ecu_AUTO_PCM_LIN  }
00096 };
00097
00098 /* Boolean option value enumerations */
00099 const utaEnum_t ecuBoolVals[2] = {
00100   { "OFF", FALSE },
00101   { "ON",  TRUE  }
00102 };
00103
00104 /* Filter option value enumerations */
00105 const utaEnum_t ecuFilterVals[3] = {
00106   { "FG",   ecu_FLT_FOREGROUND },
00107   { "BG",   ecu_FLT_BACKGROUND },
00108   { "SRCH", ecu_FLT_SEARCH     }
00109 };
00110
00111 /* Execution marker enumerations */
00112 const utaEnum_t ecuMarkVals[3] = {
00113   { "NONE", ecu_AUTO_MRK_NONE },
00114   { "PRE",  ecu_AUTO_MRK_PRE  },
00115   { "POST", ecu_AUTO_MRK_POST }
00116 };
00117
00118 /* Channel creation (CHNNEW) options */
00119 const utaOption_t ecuChnnewOpts[ecucmd_NUM_CHNNEW_OPT] = {
00120   { { "TAIL", ecucmd_CHNNEW_OPT_TAIL_ID }, uta_OPT_TYPE_INT },
00121   { { "Y2X",  ecucmd_CHNNEW_OPT_Y2X_ID },  uta_OPT_TYPE_INT }
00122 };
00123
00124 /* Channel open (OPEN) options */
00125 const utaOption_t ecuOpenOpts[ecucmd_NUM_OPEN_OPT] = {
00126   { { "TAIL",  ecucmd_OPEN_OPT_TAIL_ID  }, uta_OPT_TYPE_INT },
00127   { { "Y2X",   ecucmd_OPEN_OPT_Y2X_ID   }, uta_OPT_TYPE_INT },
00128   { { "CHIDX", ecucmd_OPEN_OPT_CHIDX_ID }, uta_OPT_TYPE_INT },
00129   { { "FRAME", ecucmd_OPEN_OPT_FRAME_ID }, uta_OPT_TYPE_INT },
00130   { { "PCM",   ecucmd_OPEN_OPT_PCM_ID   }, uta_OPT_TYPE_ENUM, { 2, ecuPcmVals } }
00131 };
00132
00133 /* Channel config (CHNCFG) options */
00134 const utaOption_t ecuChncfgOpts[ecucmd_NUM_CHNCFG_OPT] = {
00135   { { "RESET",  ecucmd_CHNCFG_OPT_RESET_ID  }, uta_OPT_TYPE_NONE },
00136   { { "HCLEAR", ecucmd_CHNCFG_OPT_HCLEAR_ID }, uta_OPT_TYPE_NONE },
00137   { { "MINERL", ecucmd_CHNCFG_OPT_MINERL_ID }, uta_OPT_TYPE_INT  },
00138   { { "TAIL",   ecucmd_CHNCFG_OPT_TAIL_ID   }, uta_OPT_TYPE_INT  },
00139   { { "BYPASS", ecucmd_CHNCFG_OPT_BYPASS_ID }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
00140   { { "NLP",    ecucmd_CHNCFG_OPT_NLP_ID    }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
00141   { { "CNG",    ecucmd_CHNCFG_OPT_CNG_ID    }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } },
00142   { { "HHOLD",  ecucmd_CHNCFG_OPT_HHOLD_ID  }, uta_OPT_TYPE_ENUM, { 2, ecuBoolVals } }
00143 };
00144
00145 /* Execution (RUNSIM) options */
00146 const utaOption_t ecuRunsimOpts[ecucmd_NUM_RUNSIM_OPT] = {
00147   { { "TIME",   ecucmd_RUNSIM_OPT_TIME_ID   }, uta_OPT_TYPE_INT },
00148   { { "PCM",    ecucmd_RUNSIM_OPT_PCM_ID    }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals  } },
00149   { { "NOFOUT", ecucmd_RUNSIM_OPT_NOFOUT_ID }, uta_OPT_TYPE_NONE },
00150   { { "MARK",   ecucmd_RUNSIM_OPT_MARK_ID   }, uta_OPT_TYPE_ENUM, { 3, ecuMarkVals } }
00151 };
00152
00153 /* File output (OUTPUT) options */
00154 const utaOption_t ecuOutputOpts[ecucmd_NUM_OUTPUT_OPT] = {
00155   { { "RIN",   ecucmd_OUTPUT_OPT_RIN   }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
00156   { { "SIN",   ecucmd_OUTPUT_OPT_SIN   }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
00157   { { "ROUT",  ecucmd_OUTPUT_OPT_ROUT  }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } },
00158   { { "SOUT",  ecucmd_OUTPUT_OPT_SOUT  }, uta_OPT_TYPE_ENUM, { 3, ecuPcmVals } }
00159 };
00160
00161 /* Filter coefficient output (GETFLT) options */
00162 const utaOption_t ecuGetfltOpts[ecucmd_NUM_GETFLT_OPT] = {
00163   { { "FNAME",  ecucmd_GETFLT_OPT_FNAME_ID  }, uta_OPT_TYPE_STR  },
00164   { { "FILTER", ecucmd_GETFLT_OPT_FILTER_ID }, uta_OPT_TYPE_ENUM, { 3, ecuFilterVals } },
00165 };
00166
00167
00168
00169 /******************************************************************************
00170  * FUNCTION PURPOSE: ECU automation "CHNNEW" handler function.
00171  ******************************************************************************
00172  * DESCRIPTION: UTA command handler for ECU command "CHNNEW"
00173  *
00174  *  tint ecucmd_chnnew_handler (
00175  *    tint index,     - Channel instance index
00176  *    void *options)  - pointer to array of option:value pairs
00177  *
00178  *****************************************************************************/
00179 tint ecucmd_chnnew_handler (tint index, void *options)
00180 {
00181   ecuNewConfig_t ncfg;
00182   ecuMemConfig_t mcfg;
00183   tint ret_code;
00184
00185   /* Channel create configuration */
00186   ncfg.ID = index + 1;
00187
00188   /* Memory initialization */
00189   mcfg.pre_init_bufs = FALSE;
00190   mcfg.init_pattern  = ecu_AUTO_DEF_INIT_PATTERN;
00191
00192   /* Create ECU Channel */
00193   ret_code = ecuAuto_create_chn (index, &ncfg, &mcfg);
00194   ecu_auto_check_rc (ecu_AUTO_ERR_CREATECHN, ret_code, ecu_AUTO_NOERR);
00195
00196   /* Return success */
00197   return (uta_NO_ERROR);
00198 }
00199
00200
00201
00202 /******************************************************************************
00203  * FUNCTION PURPOSE: ECU automation "CHNDEL" handler function.
00204  ******************************************************************************
00205  * DESCRIPTION: UTA command handler for ECU command "CHNDEL"
00206  *
00207  *  tint ecucmd_chndel_handler (
00208  *    tint index,     - Channel instance index
00209  *    void *options)  - pointer to array of option:value pairs
00210  *
00211  *****************************************************************************/
00212 tint ecucmd_chndel_handler (tint index, void *options)
00213 {
00214   tint ret_code;
00215
00216   /* Delete Channel and check for errors */
00217   ret_code = ecuAuto_delete_chn (index);
00218   ecu_auto_check_rc (ecu_AUTO_ERR_DELETECHN, ret_code, ecu_AUTO_NOERR);
00219
00220   /* Return success */
00221   return (uta_NO_ERROR);
00222 }
00223
00224
00225
00226 /******************************************************************************
00227  * FUNCTION PURPOSE: ECU automation "OPEN" handler function.
00228  ******************************************************************************
00229  * DESCRIPTION: UTA command handler for ECU command "OPEN"
00230  *
00231  *  tint ecucmd_open_handler (
00232  *    tint index,     - Channel instance index
00233  *    void *options)  - pointer to array of option:value pairs
00234  *
00235  *****************************************************************************/
00236 tint ecucmd_open_handler (tint index, void *options)
00237 {
00238   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00239   ecuConfigParam_t cfg_param;
00240   ecuConfig_t cfg;
00241   tint ret_code;
00242
00243   /* ECU ecuOpen() non-configurable parameters */
00244   cfg.sendOutInst = (void *) NULL;  /* Non-configurable */
00245   cfg.recOutInst  = (void *) NULL;  /* Non-configurable */
00246   cfg.cfgParam    = &cfg_param;     /* Non-configurable */
00247   cfg_param.config_bitfield  = ecu_ENABLE_ECHO_CANCELLER
00248                              | ecu_ENABLE_UPDATE
00249                              | ecu_ENABLE_NLP
00250                              | ecu_ENABLE_AUTO_UPDATE
00251                              | ecu_ENABLE_SEARCH
00252                              | ecu_ENABLE_CNG_ADAPT
00253                              | ecu_ENABLE_OPNLP_DETECT
00254                              | ecu_CLEAR_FG
00255                              | ecu_CLEAR_BG
00256                              | ecu_CLEAR_SEARCH;
00257   cfg_param.config_bitfield1 = ecu_ENABLE_NLP_PHASE_RND;
00258   cfg_param.noise_level      = 0;
00259   cfg_param.nlp_aggress      = 0;
00260   cfg_param.cn_config        = 16384;
00261
00262   /* ECU ecuOpen() default configurable parameters */
00263   cfg_param.filter_length = ecucmd_OPEN_OPT_TAIL_DEF;
00264   cfg.y2x_delay         = ecucmd_OPEN_OPT_Y2X_DEF;
00265   cfg.pcm_expand_tbl    = muaTblUlaw;
00266   cfg.pcm_zero          = ecu_AUTO_ULA_ZERO;
00267   cfg.samples_per_frame = ecucmd_OPEN_OPT_FRAME_DEF;
00268
00269   /* UTA option definition structure */
00270   while (opts->id != uta_IDX_NULL) {
00271     /* Switch based on option ID */
00272     switch (opts->id) {
00273     case ecucmd_OPEN_OPT_TAIL_ID:
00274       cfg_param.filter_length = opts->value.integer * ecu_AUTO_SAMP_PER_MS;
00275       break;
00276     case ecucmd_OPEN_OPT_Y2X_ID:
00277       cfg.y2x_delay = (tint) opts->value.integer;
00278       break;
00279     case ecucmd_OPEN_OPT_FRAME_ID:
00280       cfg.samples_per_frame = (tint) opts->value.integer;
00281       break;
00282     case ecucmd_OPEN_OPT_PCM_ID:
00283       if ((tint) opts->value.integer == ecu_AUTO_PCM_ALAW) {
00284         cfg.pcm_expand_tbl = muaTblAlaw;
00285         cfg.pcm_zero       = ecu_AUTO_ALA_ZERO;
00286       }
00287       break;
00288     case ecucmd_OPEN_OPT_CHIDX_ID:
00289       break;
00290     default:
00291       /* Illegal index */
00292       return (uta_TDF_ERROR);
00293     }
00294     /* Increment options pointer */
00295     opts++;
00296   }
00297
00298   /* Open ECU Channel */
00299   ret_code = ecuAuto_open_chn (index, &cfg);
00300   ecu_auto_check_rc (ecu_AUTO_ERR_OPENCHN, ret_code, ecu_AUTO_NOERR);
00301
00302   /* Return success */
00303   return (uta_NO_ERROR);
00304 }
00305
00306
00307
00308 /******************************************************************************
00309  * FUNCTION PURPOSE: ECU automation "CLOSE" handler function.
00310  ******************************************************************************
00311  * DESCRIPTION: UTA command handler for ECU command "CLOSE"
00312  *
00313  *  tint ecucmd_close_handler (
00314  *    tint index,     - Channel instance index
00315  *    void *options)  - pointer to array of option:value pairs
00316  *
00317  *****************************************************************************/
00318 tint ecucmd_close_handler (tint index, void *options)
00319 {
00320   tint ret_code;
00321
00322   /* Close ECU instance */
00323   ret_code = ecuAuto_close_chn (index);
00324   ecu_auto_check_rc (ecu_AUTO_ERR_OPENCHN, ret_code, ecu_AUTO_NOERR);
00325
00326   /* Return success */
00327   return (uta_NO_ERROR);
00328 }
00329
00330
00331
00332 /******************************************************************************
00333  * FUNCTION PURPOSE: ECU automation "CHNCFG" handler function.
00334  ******************************************************************************
00335  * DESCRIPTION: UTA command handler for ECU command "CHNCFG"
00336  *
00337  *  tint ecucmd_chncfg_handler (
00338  *    tint index,     - Channel instance index
00339  *    void *options)  - pointer to array of option:value pairs
00340  *
00341  *****************************************************************************/
00342 tint ecucmd_chncfg_handler (tint index, void *options)
00343 {
00344   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00345   ecuChnConfig_t cfg;
00346   tint  min_erl;
00347   tbool nlp_on;
00348   tbool cng_on;
00349   tint  ret_code;
00350
00351   /* Initialization */
00352   cfg.valid_bitfield = 0;
00353   nlp_on = TRUE;
00354   cng_on = TRUE;
00355
00356   /* UTA option definition structure */
00357   while (opts->id != uta_IDX_NULL) {
00358     /* Switch based on option ID */
00359     switch (opts->id) {
00360     /* Channel reset */
00361     case ecucmd_CHNCFG_OPT_RESET_ID:
00362     case ecucmd_CHNCFG_OPT_HCLEAR_ID:
00363       /* Set to reset the channel */
00364       cfg.valid_bitfield |= ecu_AUTO_CHCFG_CLR_VALID;
00365       cfg.hreg_clear = TRUE;
00366       break;
00367     /* Minimum ERL change */
00368     case ecucmd_CHNCFG_OPT_MINERL_ID:
00369       /* Find the associated minimum ERL bits */
00370       cfg.valid_bitfield |= ecu_AUTO_CHCFG_ERL_VALID;
00371       cfg.min_erl = ecu_AUTO_ERL_6DB;
00372       min_erl = (tint) opts->value.integer;
00373       if      (min_erl == 0) cfg.min_erl = ecu_AUTO_ERL_0DB;
00374       else if (min_erl == 3) cfg.min_erl = ecu_AUTO_ERL_3DB;
00375       else if (min_erl != 6) return (uta_TDF_ERROR);
00376       break;
00377     /* Tail length change */
00378     case ecucmd_CHNCFG_OPT_TAIL_ID:
00379       /* Ignore */
00380       break;
00381     /* Bypass mode change */
00382     case ecucmd_CHNCFG_OPT_BYPASS_ID:
00383       cfg.valid_bitfield |= ecu_AUTO_CHCFG_BYP_VALID;
00384       cfg.bypass = (tbool) opts->value.integer;
00385       break;
00386     /* NLP mode change */
00387     case ecucmd_CHNCFG_OPT_NLP_ID:
00388       cfg.valid_bitfield |= ecu_AUTO_CHCFG_NLP_VALID;
00389       nlp_on = ((tbool) opts->value.integer);
00390       break;
00391     /* CNG mode change */
00392     case ecucmd_CHNCFG_OPT_CNG_ID:
00393       cfg.valid_bitfield |= ecu_AUTO_CHCFG_NLP_VALID;
00394       cng_on = ((tbool) opts->value.integer);
00395       break;
00396     /* H-register hold mode change */
00397     case ecucmd_CHNCFG_OPT_HHOLD_ID:
00398       cfg.valid_bitfield |= ecu_AUTO_CHCFG_HLD_VALID;
00399       cfg.hreg_hold = (tbool) opts->value.integer;
00400       break;
00401     default:
00402       /* Illegal index */
00403       return (uta_TDF_ERROR);
00404     }
00405     /* Increment options pointer */
00406     opts++;
00407   }
00408
00409   /* Set NLP/CNG based on settings */
00410   cfg.nlp_mode = ecu_AUTO_NLP_OFF;
00411   if (nlp_on) {
00412     cfg.nlp_mode = ecu_AUTO_NLP_ON;
00413     if (cng_on) {
00414       cfg.nlp_mode = ecu_AUTO_NLP_CNG_ON;
00415     }
00416   }
00417
00418   /* Configure the ECU instance */
00419   ret_code = ecuAuto_config_chn (index, &cfg);
00420   ecu_auto_check_rc (ecu_AUTO_ERR_CONFIGCHN, ret_code, ecu_AUTO_NOERR);
00421
00422   /* Return success */
00423   return (uta_NO_ERROR);
00424 }
00425
00426
00427
00428 /******************************************************************************
00429  * FUNCTION PURPOSE: ECU automation "RUNSIM" handler function.
00430  ******************************************************************************
00431  * DESCRIPTION: UTA command handler for ECU command "RUNSIM"
00432  *
00433  *  tint ecucmd_runsim_handler (
00434  *    tint index,     - instance index
00435  *    void *options)  - pointer to array of option:value pairs
00436  *
00437  *****************************************************************************/
00438 tint ecucmd_runsim_handler (tint index, void *options)
00439 {
00440   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00441   ecuAutoLoopCfg_t cfg;
00442
00443   /* Set the parameters for the loop */
00444   cfg.enable_out = TRUE;
00445   cfg.chn_index  = index;
00446   cfg.time_ms    = 0;
00447   cfg.marker     = ecucmd_RUNSIM_OPT_MARK_DEF;
00448   cfg.pcm_format = ecucmd_RUNSIM_OPT_PCM_DEF;
00449
00450   /* UTA option definition structure */
00451   while (opts->id != uta_IDX_NULL) {
00452     /* Switch based on option ID */
00453     switch (opts->id) {
00454     case ecucmd_RUNSIM_OPT_TIME_ID:
00455       cfg.time_ms = opts->value.integer;
00456       break;
00457     case ecucmd_RUNSIM_OPT_PCM_ID:
00458       cfg.pcm_format = (tint) opts->value.integer;
00459       break;
00460     case ecucmd_RUNSIM_OPT_NOFOUT_ID:
00461       cfg.enable_out = FALSE;
00462       break;
00463     case ecucmd_RUNSIM_OPT_MARK_ID:
00464       cfg.marker = (tint) opts->value.integer;
00465       break;
00466     default:
00467       /* Illegal index */
00468       return (uta_TDF_ERROR);
00469     }
00470     /* Increment options pointer */
00471     opts++;
00472   }
00473
00474   /* Call the echo simulation processing loop */
00475   ecuAuto_process_loop (&cfg);
00476
00477   /* Return success */
00478   return (uta_NO_ERROR);
00479 }
00480
00481
00482
00483 /******************************************************************************
00484  * FUNCTION PURPOSE: ECU automation ECU file output "OUTPUT" handler function.
00485  ******************************************************************************
00486  * DESCRIPTION: UTA command handler for ECU command "OUTPUT"
00487  *
00488  *  tint ecucmd_output_handler (
00489  *    tint index,     - instance index
00490  *    void *options)  - pointer to array of option:value pairs
00491  *
00492  *****************************************************************************/
00493 tint ecucmd_output_handler (tint index, void *options)
00494 {
00495   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00496   tint i;
00497
00498   /* Index is irrelevant - take output from active channel instance */
00499
00500   /* Disable all file output */
00501   for (i=0; i<ecu_AUTO_NUM_OUTFILES; i++) {
00502     outFile[i].output_data = FALSE;
00503   }
00504
00505   /* UTA option definition structure */
00506   while (opts->id != uta_IDX_NULL) {
00507     /* Switch based on option ID */
00508     switch (opts->id) {
00509     case ecucmd_OUTPUT_OPT_RIN:
00510       outFile[ecu_AUTO_FILE_RIN].output_data  = TRUE;
00511       outFile[ecu_AUTO_FILE_RIN].pcm_format   = (ecuPcm_e) opts->value.integer;
00512       break;
00513     case ecucmd_OUTPUT_OPT_SIN:
00514       outFile[ecu_AUTO_FILE_SIN].output_data  = TRUE;
00515       outFile[ecu_AUTO_FILE_SIN].pcm_format   = (ecuPcm_e) opts->value.integer;
00516       break;
00517     case ecucmd_OUTPUT_OPT_ROUT:
00518       outFile[ecu_AUTO_FILE_ROUT].output_data = TRUE;
00519       outFile[ecu_AUTO_FILE_ROUT].pcm_format  = (ecuPcm_e) opts->value.integer;
00520       break;
00521     case ecucmd_OUTPUT_OPT_SOUT:
00522       outFile[ecu_AUTO_FILE_SOUT].output_data = TRUE;
00523       outFile[ecu_AUTO_FILE_SOUT].pcm_format  = (ecuPcm_e) opts->value.integer;
00524       break;
00525     default:
00526       /* Illegal index */
00527       return (uta_TDF_ERROR);
00528     }
00529     /* Increment options pointer */
00530     opts++;
00531   }
00532
00533   /* Prepare for file output */
00534   ecuAuto_prep_fout ();
00535
00536   /* Return success */
00537   return (uta_NO_ERROR);
00538 }
00539
00540
00541
00542 /******************************************************************************
00543  * FUNCTION PURPOSE: ECU automation get filter "GETFLT" handler function.
00544  ******************************************************************************
00545  * DESCRIPTION: UTA command handler for ECU command "GETFLT"
00546  *
00547  *  tint ecucmd_getflt_handler (
00548  *    tint index,     - Channel instance index
00549  *    void *options)  - pointer to array of option:value pairs
00550  *
00551  *****************************************************************************/
00552 tint ecucmd_getflt_handler (tint index, void *options)
00553 {
00554   utaOptionPair_t *opts = (utaOptionPair_t *) options;
00555   char fname[ecu_AUTO_MAX_STRING];
00556   tint ret_code;
00557   tint filter;
00558
00559   /* Set all defaults */
00560   filter = ecucmd_GETFLT_OPT_FILTER_DEF;
00561
00562   /* UTA option definition structure */
00563   while (opts->id != uta_IDX_NULL) {
00564     /* Switch based on option ID */
00565     switch (opts->id) {
00566     case ecucmd_GETFLT_OPT_FNAME_ID:
00567       strcpy (fname, opts->value.string);
00568       break;
00569     case ecucmd_GETFLT_OPT_FILTER_ID:
00570       filter = (tint) opts->value.integer;
00571       break;
00572     default:
00573       /* Illegal index */
00574       return (uta_TDF_ERROR);
00575     }
00576     /* Increment options pointer */
00577     opts++;
00578   }
00579
00580   /* Perform filter coefficient output */
00581   ret_code = ecuAuto_get_filter (index, filter, fname);
00582   ecu_auto_check_rc (ecu_AUTO_ERR_GETFILTER, ret_code, ecu_AUTO_NOERR);
00583
00584   /* Return success */
00585   return (uta_NO_ERROR);
00586 }
00587
00588 /* 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 100 of file ecuuta.h.

Referenced by ecu_auto_addmod_uta().

#define ecucmd_NUM_CHNNEW_OPT 2

Definition at line 103 of file ecuuta.h.

#define ecucmd_CHNNEW_OPT_TAIL_ID 0

Definition at line 104 of file ecuuta.h.

#define ecucmd_CHNNEW_OPT_Y2X_ID 1

Definition at line 105 of file ecuuta.h.

#define ecucmd_NUM_OPEN_OPT 5

Definition at line 108 of file ecuuta.h.

#define ecucmd_OPEN_OPT_TAIL_ID 0

Definition at line 109 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_Y2X_ID 1

Definition at line 110 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_CHIDX_ID 2

Definition at line 111 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_FRAME_ID 3

Definition at line 112 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_PCM_ID 4

Definition at line 113 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_TAIL_DEF ecu_AUTO_DEF_TAIL_LEN

Definition at line 114 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_Y2X_DEF ecu_AUTO_DEF_Y2X_DELAY

Definition at line 115 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_OPEN_OPT_PCM_DEF ecu_AUTO_DEF_PCM_FORMAT

Definition at line 116 of file ecuuta.h.

#define ecucmd_OPEN_OPT_FRAME_DEF ecu_AUTO_DEF_FRAME_SZ

Definition at line 117 of file ecuuta.h.

Referenced by ecucmd_open_handler().

#define ecucmd_NUM_CHNCFG_OPT 8

Definition at line 120 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_HCLEAR_ID 0

Definition at line 121 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_MINERL_ID 1

Definition at line 122 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_TAIL_ID 2

Definition at line 123 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_BYPASS_ID 3

Definition at line 124 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_NLP_ID 4

Definition at line 125 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_CNG_ID 5

Definition at line 126 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_HHOLD_ID 6

Definition at line 127 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_MINERL_DEF 6

Definition at line 128 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_RESET_ID 7

Definition at line 129 of file ecuuta.h.

Referenced by ecucmd_chncfg_handler().

#define ecucmd_CHNCFG_OPT_TAIL_DEF 128

Definition at line 130 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_BYPASS_DEF FALSE

Definition at line 131 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_NLP_DEF TRUE

Definition at line 132 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_CNG_DEF TRUE

Definition at line 133 of file ecuuta.h.

#define ecucmd_CHNCFG_OPT_HHOLD_DEF FALSE

Definition at line 134 of file ecuuta.h.

#define ecucmd_NUM_RUNSIM_OPT 4

Definition at line 137 of file ecuuta.h.

#define ecucmd_RUNSIM_OPT_TIME_ID 0

Definition at line 138 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_PCM_ID 1

Definition at line 139 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_NOFOUT_ID 2

Definition at line 140 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_MARK_ID 3

Definition at line 141 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_PCM_DEF ecu_AUTO_PCM_ULAW

Definition at line 142 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_RUNSIM_OPT_MARK_DEF ecu_AUTO_MRK_NONE

Definition at line 143 of file ecuuta.h.

Referenced by ecucmd_runsim_handler().

#define ecucmd_NUM_OUTPUT_OPT 4

Definition at line 146 of file ecuuta.h.

#define ecucmd_OUTPUT_OPT_RIN 0

Definition at line 147 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_OUTPUT_OPT_SIN 1

Definition at line 148 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_OUTPUT_OPT_ROUT 2

Definition at line 149 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_OUTPUT_OPT_SOUT 3

Definition at line 150 of file ecuuta.h.

Referenced by ecucmd_output_handler().

#define ecucmd_NUM_GETFLT_OPT 2

Definition at line 153 of file ecuuta.h.

#define ecucmd_GETFLT_OPT_FNAME_ID 0

Definition at line 154 of file ecuuta.h.

Referenced by ecucmd_getflt_handler().

#define ecucmd_GETFLT_OPT_FILTER_ID 1

Definition at line 155 of file ecuuta.h.

Referenced by ecucmd_getflt_handler().

#define ecucmd_GETFLT_OPT_FILTER_DEF ecu_FLT_FOREGROUND

Definition at line 156 of file ecuuta.h.

Referenced by ecucmd_getflt_handler().

Function Documentation

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

Definition at line 179 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 212 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 236 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 318 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 342 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 438 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 493 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 552 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 80 of file ecuuta.c.

Referenced by ecu_auto_addmod_uta().

const utaOption_t ecuChnnewOpts[]

Definition at line 119 of file ecuuta.c.

const utaOption_t ecuOpenOpts[]

Definition at line 125 of file ecuuta.c.

const utaOption_t ecuChncfgOpts[]

Definition at line 134 of file ecuuta.c.

const utaOption_t ecuRunsimOpts[]

Definition at line 146 of file ecuuta.c.

const utaOption_t ecuOutputOpts[]

Definition at line 154 of file ecuuta.c.

const utaOption_t ecuGetfltOpts[]

Definition at line 162 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *
00013  *              All rights reserved not granted herein.
00014  *
00015  *                         Limited License.
00016  *
00017  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00018  *  non-exclusive license under copyrights and patents it now or hereafter owns
00019  *  or controls to make, have made, use, import, offer to sell and sell
00020  *  ("Utilize") this software subject to the terms herein.  With respect to the
00021  *  foregoing patent license, such license is granted solely to the extent that
00022  *  any such patent is necessary to Utilize the software alone.  The patent
00023  *  license shall not apply to any combinations which include this software,
00024  *  other than combinations with devices manufactured by or for TI (“TI
00025  *  Devices”).  No hardware patent is licensed hereunder.
00026  *
00027  *  Redistributions must preserve existing copyright notices and reproduce this
00028  *  license (including the above copyright notice and the disclaimer and (if
00029  *  applicable) source code license limitations below) in the documentation
00030  *  and/or other materials provided with the distribution
00031  *
00032  *  Redistribution and use in binary form, without modification, are permitted
00033  *  provided that the following conditions are met:
00034  *
00035  *    *  No reverse engineering, decompilation, or disassembly of this software
00036  *  is permitted with respect to any software provided in binary form.
00037  *
00038  *    *  any redistribution and use are licensed by TI for use only with TI
00039  *  Devices.
00040  *
00041  *    *  Nothing shall obligate TI to provide you with source code for the
00042  *  software licensed and provided to you in object code.
00043  *
00044  *  If software source code is provided to you, modification and redistribution
00045  *  of the source code are permitted provided that the following conditions are
00046  *  met:
00047  *
00048  *    *  any redistribution and use of the source code, including any resulting
00049  *  derivative works, are licensed by TI for use only with TI Devices.
00050  *
00051  *    *  any redistribution and use of any object code compiled from the source
00052  *  code and any resulting derivative works, are licensed by TI for use only
00053  *  with TI Devices.
00054  *
00055  *  Neither the name of Texas Instruments Incorporated nor the names of its
00056  *  suppliers may be used to endorse or promote products derived from this
00057  *  software without specific prior written permission.
00058  *
00059  *  DISCLAIMER.
00060  *
00061  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00062  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00063  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00064  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00065  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00066  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00067  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00068  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00069  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00070  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00071  *  DAMAGE.
00072  *****************************************************************************/
00073
00074 #include <ti/mas/ecu/test/src/ecuauto.h>
00075 #include <ti/mas/types/types.h>
00076 #include <ti/mas/sdk/uta.h>
00077
00078
00079 /* ECU command table and options */
00080 extern const utaCommand_t ecuCommands[];
00081 extern const utaOption_t ecuChnnewOpts[];
00082 extern const utaOption_t ecuOpenOpts[];
00083 extern const utaOption_t ecuChncfgOpts[];
00084 extern const utaOption_t ecuRunsimOpts[];
00085 extern const utaOption_t ecuOutputOpts[];
00086 extern const utaOption_t ecuGetfltOpts[];
00087
00088 /* ECU command handler prototypes */
00089 tint ecucmd_chnnew_handler (tint index, void *opt_pairs);
00090 tint ecucmd_chndel_handler (tint index, void *opt_pairs);
00091 tint ecucmd_open_handler   (tint index, void *opt_pairs);
00092 tint ecucmd_close_handler  (tint index, void *opt_pairs);
00093 tint ecucmd_chncfg_handler (tint index, void *opt_pairs);
00094 tint ecucmd_runsim_handler (tint index, void *opt_pairs);
00095 tint ecucmd_output_handler (tint index, void *opt_pairs);
00096 tint ecucmd_getflt_handler (tint index, void *opt_pairs);
00097
00098
00099 /* Main ECU defines for UTA */
00100 #define ecucmd_AUTO_NUM_CMD                 8
00101
00102 /* Channel creation (CHNNEW) defines */
00103 #define ecucmd_NUM_CHNNEW_OPT               2
00104 #define ecucmd_CHNNEW_OPT_TAIL_ID           0
00105 #define ecucmd_CHNNEW_OPT_Y2X_ID            1
00106
00107 /* Channel open (OPEN) defines */
00108 #define ecucmd_NUM_OPEN_OPT                 5
00109 #define ecucmd_OPEN_OPT_TAIL_ID             0
00110 #define ecucmd_OPEN_OPT_Y2X_ID              1
00111 #define ecucmd_OPEN_OPT_CHIDX_ID            2
00112 #define ecucmd_OPEN_OPT_FRAME_ID            3
00113 #define ecucmd_OPEN_OPT_PCM_ID              4
00114 #define ecucmd_OPEN_OPT_TAIL_DEF            ecu_AUTO_DEF_TAIL_LEN
00115 #define ecucmd_OPEN_OPT_Y2X_DEF             ecu_AUTO_DEF_Y2X_DELAY
00116 #define ecucmd_OPEN_OPT_PCM_DEF             ecu_AUTO_DEF_PCM_FORMAT
00117 #define ecucmd_OPEN_OPT_FRAME_DEF           ecu_AUTO_DEF_FRAME_SZ
00118
00119 /* Channel config (CHNCFG) defines */
00120 #define ecucmd_NUM_CHNCFG_OPT               8
00121 #define ecucmd_CHNCFG_OPT_HCLEAR_ID         0
00122 #define ecucmd_CHNCFG_OPT_MINERL_ID         1
00123 #define ecucmd_CHNCFG_OPT_TAIL_ID           2
00124 #define ecucmd_CHNCFG_OPT_BYPASS_ID         3
00125 #define ecucmd_CHNCFG_OPT_NLP_ID            4
00126 #define ecucmd_CHNCFG_OPT_CNG_ID            5
00127 #define ecucmd_CHNCFG_OPT_HHOLD_ID          6
00128 #define ecucmd_CHNCFG_OPT_MINERL_DEF        6
00129 #define ecucmd_CHNCFG_OPT_RESET_ID          7
00130 #define ecucmd_CHNCFG_OPT_TAIL_DEF        128
00131 #define ecucmd_CHNCFG_OPT_BYPASS_DEF        FALSE
00132 #define ecucmd_CHNCFG_OPT_NLP_DEF           TRUE
00133 #define ecucmd_CHNCFG_OPT_CNG_DEF           TRUE
00134 #define ecucmd_CHNCFG_OPT_HHOLD_DEF         FALSE
00135
00136 /* ECU automation (RUNSIM) defines */
00137 #define ecucmd_NUM_RUNSIM_OPT               4
00138 #define ecucmd_RUNSIM_OPT_TIME_ID           0
00139 #define ecucmd_RUNSIM_OPT_PCM_ID            1
00140 #define ecucmd_RUNSIM_OPT_NOFOUT_ID         2
00141 #define ecucmd_RUNSIM_OPT_MARK_ID           3
00142 #define ecucmd_RUNSIM_OPT_PCM_DEF           ecu_AUTO_PCM_ULAW
00143 #define ecucmd_RUNSIM_OPT_MARK_DEF          ecu_AUTO_MRK_NONE
00144
00145 /* File output (OUTPUT) defines */
00146 #define ecucmd_NUM_OUTPUT_OPT               4
00147 #define ecucmd_OUTPUT_OPT_RIN               0
00148 #define ecucmd_OUTPUT_OPT_SIN               1
00149 #define ecucmd_OUTPUT_OPT_ROUT              2
00150 #define ecucmd_OUTPUT_OPT_SOUT              3
00151
00152 /* Filter output (GETFLT) defines */
00153 #define ecucmd_NUM_GETFLT_OPT               2
00154 #define ecucmd_GETFLT_OPT_FNAME_ID          0
00155 #define ecucmd_GETFLT_OPT_FILTER_ID         1
00156 #define ecucmd_GETFLT_OPT_FILTER_DEF        ecu_FLT_FOREGROUND
00157
00158 #endif  /* _ECUUTA_H */
00159 /* 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. 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 CCSV 5.2 or above and may be used for those who haven't yet upgraded to CCSV 5.2 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 CCSV 5.2 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
  • 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 98 of file piu.c.

References piuContext_t::debugInfo, and piuContext.

void piuDelete | ( | void ** | piuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Definition at line 115 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 128 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 144 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 168 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 240 of file piu.c.

References piu_CLOSED, and piuInst_s::state.

void piuBidSilenceDetect | ( | void * | piuInst,
 |  | bidSilenceDet_t * | ctrl
 | ) |  |

Definition at line 262 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 302 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 331 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 359 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 392 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 427 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 90 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *
00012  *              All rights reserved not granted herein.
00013  *
00014  *                         Limited License.
00015  *
00016  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00017  *  non-exclusive license under copyrights and patents it now or hereafter owns
00018  *  or controls to make, have made, use, import, offer to sell and sell
00019  *  ("Utilize") this software subject to the terms herein.  With respect to the
00020  *  foregoing patent license, such license is granted solely to the extent that
00021  *  any such patent is necessary to Utilize the software alone.  The patent
00022  *  license shall not apply to any combinations which include this software,
00023  *  other than combinations with devices manufactured by or for TI (“TI
00024  *  Devices”).  No hardware patent is licensed hereunder.
00025  *
00026  *  Redistributions must preserve existing copyright notices and reproduce this
00027  *  license (including the above copyright notice and the disclaimer and (if
00028  *  applicable) source code license limitations below) in the documentation
00029  *  and/or other materials provided with the distribution
00030  *
00031  *  Redistribution and use in binary form, without modification, are permitted
00032  *  provided that the following conditions are met:
00033  *
00034  *    *  No reverse engineering, decompilation, or disassembly of this software
00035  *  is permitted with respect to any software provided in binary form.
00036  *
00037  *    *  any redistribution and use are licensed by TI for use only with TI
00038  *  Devices.
00039  *
00040  *    *  Nothing shall obligate TI to provide you with source code for the
00041  *  software licensed and provided to you in object code.
00042  *
00043  *  If software source code is provided to you, modification and redistribution
00044  *  of the source code are permitted provided that the following conditions are
00045  *  met:
00046  *
00047  *    *  any redistribution and use of the source code, including any resulting
00048  *  derivative works, are licensed by TI for use only with TI Devices.
00049  *
00050  *    *  any redistribution and use of any object code compiled from the source
00051  *  code and any resulting derivative works, are licensed by TI for use only
00052  *  with TI Devices.
00053  *
00054  *  Neither the name of Texas Instruments Incorporated nor the names of its
00055  *  suppliers may be used to endorse or promote products derived from this
00056  *  software without specific prior written permission.
00057  *
00058  *  DISCLAIMER.
00059  *
00060  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00061  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00062  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00063  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00064  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00065  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00066  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00067  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00068  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00069  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00070  *  DAMAGE.
00071  *****************************************************************************/
00072 /* Ansi C header files */
00073 #include <stdlib.h>
00074
00075 /* System Level header files */
00076 #include <ti/mas/types/types.h>
00077 #include <ti/mas/fract/fract.h>
00078
00079 /* System Utilities' API's */
00080 #include <ti/mas/util/utl.h>
00081 #include <ti/mas/util/debug.h>
00082 #include <ti/mas/util/wng.h>
00083
00084 /* PIU related header files */
00085 #include <ti/mas/ecu/test/src/piu.h>
00086 #include <ti/mas/ecu/test/src/piuloc.h>
00087 #include <ti/mas/ecu/test/src/piuport.h>
00088
00089 /* Allocate the global ecu Context */
00090 piuContext_t piuContext;
00091
00092 /******************************************************************************
00093  * FUNCTION PURPOSE: Exception function
00094  ******************************************************************************
00095  * DESCRIPTION: Relays a fatal exception through the global exception
00096  *              pointer.
00097  *****************************************************************************/
00098 void piu_exception(tuint ID, tuint code)
00099 {
00100    piuContext.debugInfo ((void *)&ID, dbg_EXCEPTION_FATAL, code, 0, NULL);
00101 }
00102 /*****************************************************************************
00103  * FUNCTION PURPOSE: Delete a PIU instance
00104  *****************************************************************************
00105  * DESCRIPTION: Deletes an instance of PIU. Deallocates any memory allocated
00106  *              in piuNew() including PIU instance structure.
00107  *
00108  *   void piuDelete (
00109  *     void        **piuInst, - an address of memory location that contains
00110  *                              a pointer to instance structure
00111  *     tint        nbufs,     - number of memory buffers
00112  *     memBuffer_t *bufs)     - a vector of buffer descriptors
00113  *
00114  ****************************************************************************/
00115 void piuDelete (void **piuInst, tint nbufs, ecomemBuffer_t *bufs)
00116 {
00117   piuInst_t    *inst    = (piuInst_t *) *piuInst;
00118
00119   piu_exc_assert ((inst->state == piu_CLOSED), piu_EXC_DELETE, inst);
00120
00121   /* Mark the instance as free */
00122   *piuInst = NULL;
00123 } /* piuDelete */
00124
00125 /*****************************************************************************
00126  * FUNCTION PURPOSE: reset piu receive in buffer
00127  ****************************************************************************/
00128 void piu_reset_receive_in_buf (piuInst_t *inst)
00129 {
00130   inst->receive_in_buf.in_ptr  = inst->receive_in_buf.out_ptr =
00131   inst->receive_in_buf.end_ptr = inst->receive_in_buf.start_ptr;
00132   while ((inst->receive_in_buf.top_ptr - inst->receive_in_buf.end_ptr)
00133           >= inst->segment_size) {
00134     inst->receive_in_buf.end_ptr += inst->segment_size;
00135   };
00136   inst->receive_in_buf.segment_count = 0;
00137 } /* piu_reset_receive_in_buf */
00138 /*****************************************************************************
00139  * FUNCTION PURPOSE:
00140  *****************************************************************************
00141  * DESCRIPTION:
00142  *
00143  *****************************************************************************/
00144 void piuSetCompanding (piuInst_t *inst, piuCompandingCfg_t *cfg)
00145 {
00146   inst->pcm_expand_table  = cfg->pcm_expand_table;
00147   inst->pcm_format        = cfg->law;
00148   if (inst->pcm_format == piu_COMP_ULAW)
00149     inst->silence_pattern = piu_MULAW_SILENCE;
00150   else if (inst->pcm_format == piu_COMP_ALAW)
00151     inst->silence_pattern = piu_ALAW_SILENCE;
00152   else
00153     inst->silence_pattern = piu_LINEAR_SILENCE;
00154 }
00155
00156 /*****************************************************************************
00157  * FUNCTION PURPOSE: Open and configure a specific instance of a PIU
00158  *****************************************************************************
00159  * DESCRIPTION: This routine initializes and configures a specific instance
00160  * of a PIU. Instance structure is assumed to be allocated by piuNew(). In
00161  * case of error, generates an exception.
00162  *
00163  *   void piuOpen (
00164  *     void        *piuInst, - A pointer to PIU instance
00165  *     piuConfig_t *cfg)     - A pointer to PIU configuration structure
00166  *
00167   ****************************************************************************/
00168 void piuOpen (void *piuInst, piuConfig_t *cfg)
00169 {
00170   piuInst_t    *inst    = (piuInst_t *) piuInst;
00171   piu_exc_assert ((inst->state == piu_CLOSED), piu_EXC_OPEN, inst);
00172
00173   /* The TRIPLE_RX_BUF mode is controlled by piuNew(), so don't wipe it here */
00174   inst->mode_bitfield &= piu_CTRL_BIT_TRIPLE_RX_BUF;
00175   inst->mode_bitfield |= piu_CTRL_BIT_RECV_IN_BUF_EMPTY;
00176
00177   if (cfg->transp_mode) { /* Set transparent mode flag */
00178     inst->mode_bitfield    |= piu_CTRL_BIT_TRANSPARENT_MODE;
00179   }
00180   /* set compression mode - u-law or A-law */
00181   piuSetCompanding(inst, &cfg->companding);
00182
00183   /* segment_size is not more than what is assigned in piuNew and must be
00184    *  a multiple of sub_segment_size! */
00185   piu_exc_assert (cfg->segment_size > 0, piu_EXC_SUBFRAMESIZE, inst);
00186
00187   inst->segment_size      = cfg->segment_size;
00188   inst->rx_underflow_cnt  = inst->rx_overflow_cnt  = 0;
00189   inst->rx_delay          = cfg->rx_delay;
00190
00191   /* Initialize energy and DC level */
00192   inst->energy_DClevel.txEnergy  = inst->energy_DClevel.rxEnergy
00193   = inst->energy_DClevel.txDClevel = inst->energy_DClevel.rxDClevel = 0;
00194
00195   /* Initialize bi-directional silence detedtion parameters */
00196   inst->bidSilence.txSilDetEnergy = inst->bidSilence.rxSilDetEnergy = 0;
00197   /* Initialize target instances of report and sendout functions */
00198   inst->reportOutTargetInst    = cfg->reportOutTargetInst;
00199   inst->sendOutProcTargetInst  = cfg->sendOutProcTargetInst;
00200   inst->sendOutIsrTargetInst   = cfg->sendOutIsrTargetInst;
00201
00202   /* By default pattern generation is diabled */
00203   inst->generatePattern = 0;             /* Default pattern */
00204
00205   /* use receive out buf or not; if not allocated in new, do not use it */
00206   inst->receive_out_buf_ptr = inst->receive_out_buf;
00207   if (cfg->use_recv_out_buf) {
00208     tuint loc_segment_size;
00209
00210     loc_segment_size =
00211       (inst->mode_bitfield & piu_CTRL_BIT_TRIPLE_RX_BUF ? piu_NUMSEGM_RX3 : piu_NUMSEGM_RX2);
00212 #if PIUDLCOMP_ENABLE
00213     loc_segment_size *= (inst->segment_size>>1);
00214 #else
00215     loc_segment_size *= inst->segment_size;
00216 #endif
00217     utlLsMemSet (inst->receive_out_buf, (linSample) 0, loc_segment_size);
00218     inst->mode_bitfield |= piu_CTRL_BIT_USE_RECV_OUT_BUF;
00219   }
00220
00221   /* initialize send-out buffer */
00222   inst->send_out_buf_ptr = inst->send_out_buf;
00223   utlLsMemSet ( inst->send_out_buf, (linSample) 0,
00224                 piu_NUMSEGM_TX * inst->segment_size );
00225
00226   /* initialize receive_in buffer */
00227   piu_reset_receive_in_buf(inst);
00228   inst->state = piu_OPEN;     /* set state to open */
00229
00230 } /* piuOpen */
00231
00232 /*****************************************************************************
00233  * FUNCTION PURPOSE: Close an instance of a PIU
00234  *****************************************************************************
00235  * DESCRIPTION: Closes a PIU instance.
00236  *
00237  *   void piuClose ( void *piuInst ) - A pointer to PIU instance
00238  *
00239  ****************************************************************************/
00240 void piuClose ( void *piuInst )
00241 {
00242   piuInst_t *inst = (piuInst_t *) piuInst ;
00243
00244   /* set state to closed */
00245   inst->state = piu_CLOSED ;
00246 } /* piuClose */
00247
00248 /*****************************************************************************
00249  * FUNCTION PURPOSE: Bidirectional Silence Detection Enable/Disable
00250  *****************************************************************************
00251  * DESCRIPTION: The signal power level calculation for both directions is
00252  *              running all the time. This function enables or disables
00253  *              Bidirectional Silence Detection.
00254  *
00255  * void piuBidSilenceDetect (
00256  *   void *piuInst,  - instance structure
00257  *   tbool enable,    - enable/disable
00258  *   tint threshold, - power level under which the signal absence is declared
00259  *   tint hangover)  - in [ms], during which continuous absence is necessary
00260  *
00261  ****************************************************************************/
00262 void piuBidSilenceDetect (void *piuInst, bidSilenceDet_t *ctrl)
00263 {
00264   LFract    lin_thres;
00265   piuInst_t *inst = (piuInst_t *) piuInst;
00266   LFract    linpwr;
00267
00268   if (ctrl->enable) {
00269     linpwr = utldB2LinPower(frctAdjustQ (ctrl->threshold, 0, 4));
00270     inst->bidSilence.threshold = frctAdjustQ(linpwr,0,piu_ENERGY_Q);
00271     inst->bidSilence.initCnt   = (ctrl->hangover)<< piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR;
00272     inst->bidSilence.cnt       = inst->bidSilence.initCnt;
00273     inst->bidSilence.txSilDetEnergy = inst->energy_DClevel.txDClevel;
00274     inst->bidSilence.rxSilDetEnergy = inst->energy_DClevel.rxDClevel;
00275     lin_thres                       = inst->bidSilence.threshold*8;
00276     if (inst->energy_DClevel.txDClevel > lin_thres)
00277       inst->bidSilence.txSilDetEnergy = lin_thres;
00278     if (inst->energy_DClevel.rxDClevel > lin_thres)
00279       inst->bidSilence.rxSilDetEnergy = lin_thres;
00280
00281     /* sequence is important, this command has to be the last */
00282     inst->mode_bitfield |= piu_CTRL_BIT_BID_SILENCE_DET;
00283   }
00284   else
00285     inst->mode_bitfield &= (~piu_CTRL_BIT_BID_SILENCE_DET);
00286 } /* piuBidSilenceDetect */
00287
00288 /*****************************************************************************
00289  * FUNCTION PURPOSE: Detect presence/absence of specified pattern.
00290  *****************************************************************************
00291  * DESCRIPTION: If the specified pattern is present on the PCM interface, for
00292  *              specified duration of time, the detection message will be sent.
00293  *
00294  * void piuPatternDetect (
00295  *   void *piuInst,   - instance structure
00296  *   tbool enable,     - enable/disable
00297  *   tint type,       - custom, T1 or E1
00298  *   tint time,       - in [ms]
00299  *   tint custom)     - custom pattern to be detected.
00300  *
00301  ****************************************************************************/
00302 void piuPatternDetect (void *piuInst, pcmPatternDet_t *pattern_detect)
00303 {
00304   piuInst_t             *inst       = (piuInst_t *) piuInst;
00305   piuPcmPatternDetect_t *pcmPattern = &inst->pcmPattern;
00306
00307   if (pattern_detect->enable)
00308   {
00309     /* initialization */
00310     pcmPattern->type    = pattern_detect->type;
00311     pcmPattern->initCnt = pattern_detect->time;
00312     pcmPattern->cnt     = (pcmPattern->initCnt * 8); /* [ms] to [samples] */
00313     pcmPattern->custom  = pattern_detect->custom;
00314
00315     inst->mode_bitfield |= piu_CTRL_BIT_PATTERN_DETECT;
00316   }
00317   else
00318     inst->mode_bitfield &= (~piu_CTRL_BIT_PATTERN_DETECT);
00319 } /* piuPatternDetect */
00320
00321 /*****************************************************************************
00322  * FUNCTION PURPOSE: SIU passing pattern generation info to PIU
00323  *****************************************************************************
00324  * DESCRIPTION: This function passes the patterngeneration info from MIC
00325  *        message to PIU instance
00326  * void piuPatternGeneration(
00327  *   void *piuInst,       - Pointer to PIU instance
00328  *   tuint patternGenControl, - Pattern generation enable/disable flag
00329  *   tint pattern)        - Pattern to be generated
00330  *****************************************************************************/
00331 void piuPatternGeneration(void *piuInst, pcmPatternGen_t *ctrl)
00332 {
00333   piuInst_t *inst   = (piuInst_t *) piuInst;
00334   tuint     pattern = ctrl->pattern;
00335
00336   if(ctrl->enable)
00337   {
00338     inst->mode_bitfield  |= piu_CTRL_BIT_PATTERN_GENERATE;
00339     inst->generatePattern = pattern;
00340   }
00341   else {
00342     inst->mode_bitfield  &= (~piu_CTRL_BIT_PATTERN_GENERATE);
00343     inst->generatePattern = 0;
00344   }
00345 } /* piuPatternGeneration */
00346
00347 /*****************************************************************************
00348  * FUNCTION PURPOSE: Control voice samples loopback mode on a PIU
00349  *****************************************************************************
00350  * DESCRIPTION: Starts voice samples loopback if the loopback_on parameter is
00351  *              TRUE, stops loopback otherwise. Ignores the calls that come
00352  *              within improper state.
00353  *
00354  *   void piu_loopback_config (
00355  *     void *piuInst,    - A pointer to PIU instance
00356  *     tint selection)   - Loopback on if nonzero
00357  *
00358  ****************************************************************************/
00359 void piu_loopback_config (void *piuInst, tint selection)
00360 {
00361   piuInst_t *inst = (piuInst_t *) piuInst;
00362
00363   inst->mode_bitfield &= (~piu_CTRL_BIT_DO_PCM_LOOPBACK);
00364   inst->mode_bitfield &= (~piu_CTRL_BIT_DO_LIN_LOOPBACK);
00365   inst->mode_bitfield &= (~piu_CTRL_BIT_LOOPBACK_NOPASS); /* enable */
00366   if (selection & PCM_LOOPBACK_ON) { /* PCM loopback */
00367     inst->mode_bitfield |= piu_CTRL_BIT_DO_PCM_LOOPBACK;
00368     inst->receive_in_buf.in_ptr  = inst->receive_in_buf.start_ptr;
00369     inst->receive_in_buf.out_ptr = inst->receive_in_buf.start_ptr
00370                                     + inst->segment_size;                /* Why is this so ? */
00371     inst->receive_in_buf.segment_count = -1;
00372   }
00373   if (selection & LIN_LOOPBACK_ON) { /* linear loopback */
00374     inst->mode_bitfield |= piu_CTRL_BIT_DO_LIN_LOOPBACK;
00375   }
00376   if (selection & DATA_FLOW_DISABLE) { /* linear loopback */
00377     inst->mode_bitfield |= piu_CTRL_BIT_LOOPBACK_NOPASS;
00378   }
00379 } /* piu_loopback_config */
00380
00381
00382 /*****************************************************************************
00383  * FUNCTION PURPOSE: SIU passing Dc offset removal information to PIU
00384  *****************************************************************************
00385  * DESCRIPTION: This function passes the Dc offset removal information from MIC
00386  *        message to PIU instance
00387  * void piuDcOffsetRemoval(
00388  *   void *piuInst,       - Pointer to PIU instance
00389  *   tint mode,                 - Selects whether Dc offset removal is diabled
00390  *                                or if enabled then the mode of operation
00391  ******************************************************************************/
00392 void piuDcOffsetRemoval(void *piuInst, tint mode)
00393 {
00394   piuInst_t *inst   = (piuInst_t *) piuInst;
00395
00396   if(mode == piu_DC_OFFSET_DISABLE)
00397   {
00398     inst->mode_bitfield  &= (~piu_CTRL_BIT_REMOVE_DC_COMP);
00399   }
00400   else
00401   { /* DC offset is enabled select mode */
00402     inst->mode_bitfield  |= piu_CTRL_BIT_REMOVE_DC_COMP;
00403     if (mode == piu_DC_OFFSET_MODE1)
00404     {
00405        inst->mode_bitfield |= piu_CTRL_BIT_DC_FILTR_SELECT_MODE1;
00406     }
00407     else
00408     {
00409         inst->mode_bitfield &= (~piu_CTRL_BIT_DC_FILTR_SELECT_MODE1);
00410     }
00411   }
00412 } /* piuDcoffsetRemoval */
00413
00414
00415 /******************************************************************************
00416  * FUNCTION PURPOSE: Enable/disable the processes in PIU
00417  ******************************************************************************
00418  * DESCRIPTION: Enable/disable the processes in PIU.
00419  *
00420  *  tint piuControl (void         *piuInst, - pointer to instance information
00421  *                   piuControl_t *ctl)     - pointer to code/mode information
00422  *
00423  *  return value: piu_NOERR  - success
00424  *                piu_ERROR  - invalid control code or ecu not open
00425  *
00426  *****************************************************************************/
00427 tint piuControl (void *piuInst, piuControl_t *ctl)
00428 {
00429   piuInst_t  *inst = (piuInst_t *) piuInst;
00430   tint        ret_val = piu_NOERR;
00431   tint        code = ctl->ctl_code;
00432
00433   /* make sure the PIU is open */
00434   if (inst->state != piu_OPEN)
00435     return (piu_ERROR);
00436
00437   switch (code) {
00438   case piu_SET_LOOPBACK:
00439     piu_loopback_config (piuInst, ctl->u.loopback_select);
00440     break;
00441   case piu_SET_FRAME_SIZE:
00442     PIU_BEGIN_CRITICAL_SECTION();
00443       inst->segment_size = ctl->u.set_frame.frame_size;
00444       piu_reset_receive_in_buf(inst);
00445       inst->send_out_buf_ptr          = inst->send_out_buf;
00446       inst->receive_out_buf_ptr       = inst->receive_out_buf;
00447       ctl->u.set_frame.send_out_buf   = (tuint *)inst->send_out_buf;
00448       ctl->u.set_frame.receive_in_buf = (tuint *)inst->receive_in_buf.start_ptr;
00449     PIU_END_CRITICAL_SECTION();
00450     break;
00451   case piu_ENABLE_UNDERRUN_REPORT:
00452     inst->mode_bitfield |= piu_CTRL_BIT_UNDERRUN_REPORT;
00453     break;
00454   case piu_DISABLE_UNDERRUN_REPORT:
00455     inst->mode_bitfield &= (~piu_CTRL_BIT_UNDERRUN_REPORT);
00456     break;
00457   case piu_GET_LEVELS:
00458     piu_get_stats (piuInst, (piuStats_t *)&ctl->u.stats);
00459     break;
00460   case piu_PATTERN_GENERATION:
00461     piuPatternGeneration(piuInst, (pcmPatternGen_t *)&ctl->u.pattern_generate);
00462     break;
00463   case piu_PATTERN_DETECTION:
00464     piuPatternDetect (piuInst, (pcmPatternDet_t *)&ctl->u.pattern_detect);
00465     break;
00466   case piu_BID_SILENCE_DETECTION:
00467     piuBidSilenceDetect (piuInst, (bidSilenceDet_t *)&ctl->u.bid_silence_detect);
00468     break;
00469   case piu_SET_COMPANDING:
00470     piuSetCompanding (piuInst, &ctl->u.companding);
00471     break;
00472   case  piu_DC_OFFSET_REMOVAL:
00473     piuDcOffsetRemoval (piuInst, ctl->u.dc_offset_removal_select);
00474     break;
00475
00476   default:  /* invalid control code */
00477     ret_val = piu_ERROR;
00478     break;
00479   }
00480   return (ret_val);
00481 } /* piuControl */
00482 /* 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 90 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 91 of file piu.h.

Referenced by piu_loopback_config(), piuReceiveIn(), and piuTxRxProc().

#define piu_CTRL_BIT_DO_LIN_LOOPBACK 0x0004

Definition at line 92 of file piu.h.

Referenced by piu_loopback_config(), and piuTxRxProc().

#define piu_CTRL_BIT_REMOVE_DC_COMP 0x0008

Definition at line 93 of file piu.h.

Referenced by piuDcOffsetRemoval(), and piuTxRxProc().

#define piu_CTRL_BIT_LOOPBACK_NOPASS 0x0010

Definition at line 94 of file piu.h.

Referenced by piu_loopback_config(), and piuTxRxProc().

#define piu_CTRL_BIT_BID_SILENCE_DET 0x0020

Definition at line 95 of file piu.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), piuReceiveIn(), and piuTxRxProc().

#define piu_CTRL_BIT_PATTERN_DETECT 0x0040

Definition at line 96 of file piu.h.

Referenced by piu_pcm_pattern_detect(), piuPatternDetect(), and piuTxRxProc().

#define piu_CTRL_BIT_PATTERN_GENERATE 0x0080

Definition at line 97 of file piu.h.

Referenced by piuPatternGeneration(), piuReceiveIn(), and piuTxRxProc().

#define piu_CTRL_BIT_USE_RECV_OUT_BUF 0x0100

Definition at line 98 of file piu.h.

Referenced by piuOpen(), piuReceiveOut(), and piuTxRxProc().

#define piu_CTRL_BIT_TRIPLE_RX_BUF 0x0200

Definition at line 99 of file piu.h.

Referenced by piuNew(), piuOpen(), and piuReceiveIn().

#define piu_CTRL_BIT_RECV_IN_BUF_EMPTY 0x0400

Definition at line 100 of file piu.h.

Referenced by piuOpen(), and piuTxRxProc().

#define piu_CTRL_BIT_UNDERRUN_REPORT 0x0800

Definition at line 101 of file piu.h.

Referenced by piuControl(), and piuTxRxProc().

#define piu_CTRL_BIT_DC_FILTR_SELECT_MODE1 0x1000

Definition at line 102 of file piu.h.

Referenced by piuDcOffsetRemoval(), and piuTxRxProc().

#define piu_ALAW_SILENCE 0x55

Definition at line 120 of file piu.h.

Referenced by piuSetCompanding().

#define piu_MULAW_SILENCE 0x7F

Definition at line 121 of file piu.h.

Referenced by piuSetCompanding().

#define piu_LINEAR_SILENCE 0

Definition at line 122 of file piu.h.

Referenced by piuSetCompanding().

#define LOOPBACK_OFF 0

Definition at line 140 of file piu.h.

#define PCM_LOOPBACK_ON 0x1

Definition at line 141 of file piu.h.

Referenced by piu_loopback_config().

#define LIN_LOOPBACK_ON 0x2

Definition at line 142 of file piu.h.

Referenced by piu_loopback_config().

#define DATA_FLOW_DISABLE 0x10

Definition at line 143 of file piu.h.

Referenced by piu_loopback_config().

Enumeration Type Documentation

anonymous enum

Enumerator:
piu_NOMEMORY
piu_NOERR
piu_ERROR

Definition at line 105 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 112 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 125 of file piu.h.

anonymous enum

Enumerator:
piu_BIDIR_SILENCE_DETECTED
piu_PATTERN_DETECTED
piu_UNDERRUN

Definition at line 146 of file piu.h.

anonymous enum

Enumerator:
piu_EXC_OPEN
piu_EXC_DELETE
piu_EXC_SUBFRAMESIZE

Definition at line 153 of file piu.h.

anonymous enum

Enumerator:
piu_DC_OFFSET_DISABLE
piu_DC_OFFSET_MODE1
piu_DC_OFFSET_MODE2

Definition at line 160 of file piu.h.

Function Documentation

void piuClose ( void * piuInst )

Definition at line 240 of file piu.c.

References piu_CLOSED, and piuInst_s::state.

void piuDelete | ( | void ** | piuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Definition at line 115 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 122 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 183 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 168 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 348 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 403 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 427 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 392 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 104 of file piuexpan.c.

Referenced by piu_pcm_companding().

void piuSendIn | ( | void * | piuInst,
 |  | tword ** | fromTdm,
 |  | tuint | timeStamp,
 |  | tuint | frameLength
 | ) |  |

Definition at line 182 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 102 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 90 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00019  *
00020  *              All rights reserved not granted herein.
00021  *
00022  *                         Limited License.
00023  *
00024  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00025  *  non-exclusive license under copyrights and patents it now or hereafter owns
00026  *  or controls to make, have made, use, import, offer to sell and sell
00027  *  ("Utilize") this software subject to the terms herein.  With respect to the
00028  *  foregoing patent license, such license is granted solely to the extent that
00029  *  any such patent is necessary to Utilize the software alone.  The patent
00030  *  license shall not apply to any combinations which include this software,
00031  *  other than combinations with devices manufactured by or for TI (“TI
00032  *  Devices”).  No hardware patent is licensed hereunder.
00033  *
00034  *  Redistributions must preserve existing copyright notices and reproduce this
00035  *  license (including the above copyright notice and the disclaimer and (if
00036  *  applicable) source code license limitations below) in the documentation
00037  *  and/or other materials provided with the distribution
00038  *
00039  *  Redistribution and use in binary form, without modification, are permitted
00040  *  provided that the following conditions are met:
00041  *
00042  *    *  No reverse engineering, decompilation, or disassembly of this software
00043  *  is permitted with respect to any software provided in binary form.
00044  *
00045  *    *  any redistribution and use are licensed by TI for use only with TI
00046  *  Devices.
00047  *
00048  *    *  Nothing shall obligate TI to provide you with source code for the
00049  *  software licensed and provided to you in object code.
00050  *
00051  *  If software source code is provided to you, modification and redistribution
00052  *  of the source code are permitted provided that the following conditions are
00053  *  met:
00054  *
00055  *    *  any redistribution and use of the source code, including any resulting
00056  *  derivative works, are licensed by TI for use only with TI Devices.
00057  *
00058  *    *  any redistribution and use of any object code compiled from the source
00059  *  code and any resulting derivative works, are licensed by TI for use only
00060  *  with TI Devices.
00061  *
00062  *  Neither the name of Texas Instruments Incorporated nor the names of its
00063  *  suppliers may be used to endorse or promote products derived from this
00064  *  software without specific prior written permission.
00065  *
00066  *  DISCLAIMER.
00067  *
00068  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00069  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00070  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00071  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00072  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00073  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00074  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00075  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00076  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00077  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00078  *  DAMAGE.
00079  *****************************************************************************/
00080
00081 /* System level header files */
00082 #include <ti/mas/types/types.h>
00083 #include <ti/mas/types/const.h>
00084
00085 /* System utilities' API's */
00086 #include <ti/mas/util/ecomem.h>
00087 #include <ti/mas/util/debug.h>
00088
00089 /* PIU bit map definitions of different control mode */
00090 #define piu_CTRL_BIT_TRANSPARENT_MODE             0x0001 /* TRUE: Transp. mode enabled */
00091 #define piu_CTRL_BIT_DO_PCM_LOOPBACK              0x0002 /* TRUE: loopback PCM sample */
00092 #define piu_CTRL_BIT_DO_LIN_LOOPBACK              0x0004 /* TRUE: loopback linear sample*/
00093 #define piu_CTRL_BIT_REMOVE_DC_COMP               0x0008 /* TRUE: enables DC offset removal*/
00094 #define piu_CTRL_BIT_LOOPBACK_NOPASS              0x0010 /* TRUE: pass through disabled */
00095 #define piu_CTRL_BIT_BID_SILENCE_DET              0x0020 /* TRUE: Sil. Detection enabled*/
00096 #define piu_CTRL_BIT_PATTERN_DETECT               0x0040 /* TRUE: Patt Detection enabled*/
00097 #define piu_CTRL_BIT_PATTERN_GENERATE             0x0080 /* TRUE: Patt Generation enabled*/
00098 #define piu_CTRL_BIT_USE_RECV_OUT_BUF             0x0100 /* TRUE: recv_out buf is used */
00099 #define piu_CTRL_BIT_TRIPLE_RX_BUF                0x0200 /* TRUE: triple buffering in rx*/
00100 #define piu_CTRL_BIT_RECV_IN_BUF_EMPTY            0x0400 /* TRUE: recv_in buf is empty */
00101 #define piu_CTRL_BIT_UNDERRUN_REPORT              0x0800 /* TRUE: report */
00102 #define piu_CTRL_BIT_DC_FILTR_SELECT_MODE1        0x1000 /* TRUE: Select mode 1, else mode 2 */
00103
00104 /* PIU error codes */
00105 enum {
00106   piu_NOMEMORY = -1,        /* memory exhausted */
00107   piu_NOERR    =  0,        /* success */
00108   piu_ERROR    =  1         /* error */
00109 };
00110
00111 /* PCM companding law flags */
00112 enum {
00113   piu_COMP_FIRST  = const_COMP_FIRST,
00114   piu_COMP_ALAW   = const_COMP_ALAW_8,  /* 8-bit A-law */
00115   piu_COMP_ULAW   = const_COMP_MULAW_8, /* 8-bit u-law */
00116   piu_COMP_LINEAR = const_COMP_LINEAR,  /* 16 linear samples */
00117   piu_COMP_LAST   = const_COMP_LAST
00118 };
00119
00120 #define piu_ALAW_SILENCE    0x55  /* Corresponds to -8.0F */
00121 #define piu_MULAW_SILENCE   0x7F  /* Corresponds to 0.0F  */
00122 #define piu_LINEAR_SILENCE     0  /* Any linear A/D & D/A */
00123
00124 /* control code definition */
00125 enum {
00126   piu_SET_LOOPBACK    = 0,
00127   piu_SET_FRAME_SIZE,
00128   piu_SET_IDLE_NOISE_LEVEL,
00129   piu_GET_LEVELS,
00130   piu_PATTERN_GENERATION,
00131   piu_PATTERN_DETECTION,
00132   piu_BID_SILENCE_DETECTION,
00133   piu_ENABLE_UNDERRUN_REPORT,
00134   piu_DISABLE_UNDERRUN_REPORT,
00135   piu_SET_COMPANDING,
00136   piu_DC_OFFSET_REMOVAL
00137 };
00138
00139 /* PIU loopback options */
00140 #define LOOPBACK_OFF      0
00141 #define PCM_LOOPBACK_ON   0x1
00142 #define LIN_LOOPBACK_ON   0x2
00143 #define DATA_FLOW_DISABLE 0x10
00144
00145 /* PIU report options */
00146 enum {
00147   piu_BIDIR_SILENCE_DETECTED = 0,
00148   piu_PATTERN_DETECTED       = 1,
00149   piu_UNDERRUN               = 2
00150 };
00151
00152 /* Exception Messages */
00153 enum {
00154    piu_EXC_OPEN         = 1, /* Opened an already open channel */
00155    piu_EXC_DELETE       = 2, /* Deleted an open instance */
00156    piu_EXC_SUBFRAMESIZE = 3  /* Control request received by a closed channel */
00157 };
00158
00159 /* DC offset removal options */
00160 enum {
00161   piu_DC_OFFSET_DISABLE = 0,
00162   piu_DC_OFFSET_MODE1 = 1, /* Satisfies the mask given by the standard */
00163   piu_DC_OFFSET_MODE2 = 2 /* Used for echo canceller */
00164 };
00165
00166 /******************************************************************************
00167  * DATA DEFINITION: PIU signal level measurement structure
00168  ******************************************************************************
00169  * DESCRIPTION : This structure indicates the result of PIU
00170  * signal level measurements via piuGetLevels().
00171  ******************************************************************************/
00172
00173 typedef struct {
00174   tint  send_out;            /* send-out level in dBm0         */
00175   tint  send_out_mean;       /* send-out linear mean value     */
00176   tint  receive_out;         /* receive-out level in dBm0      */
00177   tint  receive_out_mean;    /* receive-out linear mean value  */
00178   tuint underrun;            /* underrun stats */
00179 } piuStats_t;
00180
00181 /******************************************************************************
00182  * DATA DEFINITION: PIU size configuration structure
00183  ******************************************************************************
00184  * DESCRIPTION: This structure contains information used in memory
00185  *              configuration.
00186  *****************************************************************************/
00187
00188 typedef struct {
00189   tint max_samples_per_segment;     /* Maximum number of samples per segment */
00190 #if 0
00191   /* TODO: if this functionality is needed, it has to be reworked */
00192   tbool alloc_recv_out_buf;          /* TRUE: allocate receive out buffer */
00193 #endif
00194   tbool rx_triple_buffering;         /* true:  triple buffering in Rx direction */
00195                                     /* false: double buffering in Rx direction */
00196                                     /* NOTE:  Tx direction is always double buffered */
00197 } piuSizeConfig_t;
00198
00199 typedef struct {
00200   tint max_pcm_val;        /* Max allowed PCM value */
00201   dbgInfo_t             debugInfo;
00202   void (*reportOutFcn)    (void *targetInst, tint report_code);
00203   void (*sendOutProcFcn)  (void *targetInst, void *send_data, void *rcv_data,
00204                            tint task_id);
00205   void (*sendOutIsrFcn)   (void *targetInst, void *send_data, void *rcv_data,
00206                            tint task_id);
00207   void (*pcmSampleTrace)  (tint chnum, tint pcm_size, void *pcm_in, tuint dir);
00208 } piuContext_t;
00209
00210 /******************************************************************************
00211  * DATA DEFINITION: Configuration structure for piuNew()
00212  ******************************************************************************
00213  * DESCRIPTION: This structure is supplied by the user during piuNew() to
00214  *              create a PIU object.
00215  *
00216  ******************************************************************************/
00217 typedef struct {
00218   tuint ID;                                    /* user-defined ID field  */
00219   piuContext_t    context;                    /* context initialization */
00220   piuSizeConfig_t sizeCfg;                    /* Size structure         */
00221 } piuNewConfig_t;
00222
00223 /******************************************************************************
00224  * DATA DEFINITION: PIU Control structure
00225  ******************************************************************************
00226  * DESCRIPTION: Contains parameters required for calls to piuControl().
00227  *
00228  *****************************************************************************/
00229 typedef struct {
00230   tbool enable;
00231   tint threshold;
00232   tuint hangover;
00233 } bidSilenceDet_t;
00234
00235
00236
00237 typedef struct {
00238   tbool enable;
00239   tint type;
00240   tint time;
00241   tint custom;
00242 } pcmPatternDet_t;
00243
00244 typedef struct {
00245   tbool  enable;
00246   tuint pattern;
00247 } pcmPatternGen_t;
00248
00249 typedef struct {
00250   tint  law;                     /* A-law, Mu-law or Linear law */
00251   const tint *pcm_expand_table;  /* Pointer to expansion table (linear is using NULL) */
00252 } piuCompandingCfg_t;
00253
00254 typedef struct {
00255   tuint frame_size;
00256   tuint *send_out_buf;
00257   tuint *receive_in_buf;
00258 } setFrame_t;
00259
00260 typedef struct {
00261   tint  ctl_code;  /* Code indicating what PIU function will be controlled */
00262   union {
00263     tint                loopback_select;
00264     tuint               frame_size;
00265     setFrame_t          set_frame;
00266     piuStats_t          stats;
00267     bidSilenceDet_t     bid_silence_detect;
00268     pcmPatternDet_t     pattern_detect;
00269     pcmPatternGen_t     pattern_generate;
00270     piuCompandingCfg_t  companding;
00271     tint                dc_offset_removal_select;
00272   } u;
00273 } piuControl_t;
00274
00275 /******************************************************************************
00276  * DATA DEFINITION: PIU configuration structure.
00277  ******************************************************************************
00278  * DESCRIPTION: This structure contains information used to initialize a
00279  *              PIU object for a specific configuration. The values defined in
00280  *              this structure apply to a specific instance of a PIU.
00281  *
00282  *****************************************************************************/
00283
00284 typedef struct {
00285   tbool transp_mode;             /* if TRUE, transparent mode is enabled. No
00286                                  *  conversion of PCM samples to linear samples
00287                                  *  is done. */
00288   tint segment_size;            /* Number of samples in a PIU voice segment */
00289   void *sendOutProcTargetInst;  /* Address of function and data structure to
00290                                  *  process voice samples sent from PIU from
00291                                  *  foreground processes */
00292   void *sendOutIsrTargetInst;   /* Address of function and data structure to
00293                                  *  process voice samples sent from PIU from
00294                                  *  ISR driven processes */
00295   void *reportOutTargetInst;    /* Bid Silence/pattern Out obj. descriptor */
00296   tint max_pcm_val;             /* Maximum allowed PCM value */
00297   tuint rx_delay;               /* delay length in samples */
00298   tbool  use_recv_out_buf;       /* if TRUE, receive_out_buf is be used */
00299   piuCompandingCfg_t companding; /* compading configuration data */
00300 } piuConfig_t;
00301
00302 /* External references to the PIU context */
00303 extern piuContext_t piuContext;
00304
00305 /***                         FUNCTION PROTOTYPES                         ***/
00306 void piuClose     (void *piuInst);
00307 void piuDelete    (void **piuInst, tint nbufs, ecomemBuffer_t *bufs);
00308 tint piuGetSizes  (tint *nbufs, const ecomemBuffer_t **bufs,
00309                    piuSizeConfig_t *cfg);
00310 tint piuNew       (void **piuInst, tint nbufs, ecomemBuffer_t *bufs,
00311                    piuNewConfig_t *cfg);
00312 void piuOpen      (void *piuInst, piuConfig_t *cfg);
00313 void piuReceiveIn (void *piuInst, void *speech_samples);
00314 void piuTxRxProc  (void *piuInst, linSample *tx_ptr, linSample *rx_ptr);
00315 tint piuControl   (void *piuInst, piuControl_t *ctl);
00316 void piuDcOffsetRemoval (void *piuInst, tint mode);
00317
00318 /* in piuexpan.s, used by PCM codec as well */
00319 void UAExpand  (tint sub_segment_size, tword *pcm_in,
00320                 linSample **send_out_buf_ptr_ptr, const tint *pcm_expand_table);
00321
00322 void piuSendIn (void *piuInst, tword **fromTdm, tuint timeStamp,
00323                 tuint frameLength);
00324 void piuReceiveOut (void *piuInst, tword **toTdm, tuint timestamp,
00325                     tuint frameLength);
00326 #endif /* _PIU_H */
00327 /* 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 104 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00020  *
00021  *              All rights reserved not granted herein.
00022  *
00023  *                         Limited License.
00024  *
00025  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00026  *  non-exclusive license under copyrights and patents it now or hereafter owns
00027  *  or controls to make, have made, use, import, offer to sell and sell
00028  *  ("Utilize") this software subject to the terms herein.  With respect to the
00029  *  foregoing patent license, such license is granted solely to the extent that
00030  *  any such patent is necessary to Utilize the software alone.  The patent
00031  *  license shall not apply to any combinations which include this software,
00032  *  other than combinations with devices manufactured by or for TI (“TI
00033  *  Devices”).  No hardware patent is licensed hereunder.
00034  *
00035  *  Redistributions must preserve existing copyright notices and reproduce this
00036  *  license (including the above copyright notice and the disclaimer and (if
00037  *  applicable) source code license limitations below) in the documentation
00038  *  and/or other materials provided with the distribution
00039  *
00040  *  Redistribution and use in binary form, without modification, are permitted
00041  *  provided that the following conditions are met:
00042  *
00043  *    *  No reverse engineering, decompilation, or disassembly of this software
00044  *  is permitted with respect to any software provided in binary form.
00045  *
00046  *    *  any redistribution and use are licensed by TI for use only with TI
00047  *  Devices.
00048  *
00049  *    *  Nothing shall obligate TI to provide you with source code for the
00050  *  software licensed and provided to you in object code.
00051  *
00052  *  If software source code is provided to you, modification and redistribution
00053  *  of the source code are permitted provided that the following conditions are
00054  *  met:
00055  *
00056  *    *  any redistribution and use of the source code, including any resulting
00057  *  derivative works, are licensed by TI for use only with TI Devices.
00058  *
00059  *    *  any redistribution and use of any object code compiled from the source
00060  *  code and any resulting derivative works, are licensed by TI for use only
00061  *  with TI Devices.
00062  *
00063  *  Neither the name of Texas Instruments Incorporated nor the names of its
00064  *  suppliers may be used to endorse or promote products derived from this
00065  *  software without specific prior written permission.
00066  *
00067  *  DISCLAIMER.
00068  *
00069  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00070  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00071  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00072  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00073  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00074  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00075  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00076  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00077  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00078  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00079  *  DAMAGE.
00080 ******************************************************************************/
00081 /* system level header files */
00082 #include <ti/mas/types/types.h>
00083
00084 /* system utilities' API's */
00085 #include <ti/mas/util/utl.h>
00086 #include <ti/mas/util/mua.h>
00087 #include <ti/mas/util/cb.h>
00088 #include <ti/mas/util/wng.h>
00089
00090 /* PIU related header files */
00091 #include <ti/mas/ecu/test/src/piu.h>
00092 #include <ti/mas/ecu/test/src/piuloc.h>
00093 #include <ti/mas/ecu/test/src/piuport.h>
00094
00095  /*****************************************************************************
00096  * DESCRIPTION: U_law and A_law table look up
00097  * void UAExpand(
00098  *  tint         sub_segment_size,       - subsegment size
00099  *  tint         *pcm_in,                - input data array
00100  *  linSample    **send_out_buf_ptr_ptr, - address of output buffer pointer
00101  *  const tint   *pcm_expand_table)      - pointer to the A_law or U_law table
00102  *
00103  *****************************************************************************/
00104 void UAExpand(tint sub_segment_size, tword *pcm_in, linSample **send_out_buf_ptr_ptr,
00105               const tint *pcm_expand_table)
00106 {
00107   int       i, ratio = sizeof(linSample)/sizeof(tword);
00108   tint      pcm_val;
00109   tword     *pcmptr = pcm_in;
00110   linSample *send_out_buf_ptr;
00111
00112   send_out_buf_ptr = *send_out_buf_ptr_ptr;
00113
00114 #ifdef _BIG_ENDIAN
00115   pcmptr++;
00116 #endif
00117
00118   for (i=0; i<sub_segment_size; i++) {
00119     pcm_val = (tword)((tuint) *pcmptr & 0x00FF);
00120     pcmptr += ratio;
00121     *send_out_buf_ptr++ = pcm_expand_table[pcm_val];
00122   }
00123
00124   *send_out_buf_ptr_ptr = send_out_buf_ptr;    /* store the new value! */
00125 } /* UAExpand */
00126 /* 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 106 of file piufutil.c.

Referenced by piuReceiveIn(), and piuTxRxProc().

void piu_frame_DClevel | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | DC_level
 | ) |  |

Definition at line 137 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 151 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00024  *
00025  *              All rights reserved not granted herein.
00026  *
00027  *                         Limited License.
00028  *
00029  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00030  *  non-exclusive license under copyrights and patents it now or hereafter owns
00031  *  or controls to make, have made, use, import, offer to sell and sell
00032  *  ("Utilize") this software subject to the terms herein.  With respect to the
00033  *  foregoing patent license, such license is granted solely to the extent that
00034  *  any such patent is necessary to Utilize the software alone.  The patent
00035  *  license shall not apply to any combinations which include this software,
00036  *  other than combinations with devices manufactured by or for TI (“TI
00037  *  Devices”).  No hardware patent is licensed hereunder.
00038  *
00039  *  Redistributions must preserve existing copyright notices and reproduce this
00040  *  license (including the above copyright notice and the disclaimer and (if
00041  *  applicable) source code license limitations below) in the documentation
00042  *  and/or other materials provided with the distribution
00043  *
00044  *  Redistribution and use in binary form, without modification, are permitted
00045  *  provided that the following conditions are met:
00046  *
00047  *    *  No reverse engineering, decompilation, or disassembly of this software
00048  *  is permitted with respect to any software provided in binary form.
00049  *
00050  *    *  any redistribution and use are licensed by TI for use only with TI
00051  *  Devices.
00052  *
00053  *    *  Nothing shall obligate TI to provide you with source code for the
00054  *  software licensed and provided to you in object code.
00055  *
00056  *  If software source code is provided to you, modification and redistribution
00057  *  of the source code are permitted provided that the following conditions are
00058  *  met:
00059  *
00060  *    *  any redistribution and use of the source code, including any resulting
00061  *  derivative works, are licensed by TI for use only with TI Devices.
00062  *
00063  *    *  any redistribution and use of any object code compiled from the source
00064  *  code and any resulting derivative works, are licensed by TI for use only
00065  *  with TI Devices.
00066  *
00067  *  Neither the name of Texas Instruments Incorporated nor the names of its
00068  *  suppliers may be used to endorse or promote products derived from this
00069  *  software without specific prior written permission.
00070  *
00071  *  DISCLAIMER.
00072  *
00073  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00074  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00075  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00076  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00077  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00078  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00079  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00080  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00081  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00082  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00083  *  DAMAGE.
00084  *****************************************************************************/
00085
00086 #include <ti/mas/types/types.h>
00087 #include <ti/mas/fract/fract.h>
00088 #include <ti/mas/util/utl.h>
00089
00090 #include <ti/mas/ecu/test/src/piuloc.h>
00091
00092 /*****************************************************************************
00093  * FUNCTION PURPOSE: Signal energy level
00094  *****************************************************************************
00095  * DESCRIPTION: This function calculates signal energy using geometric average.
00096  *              E(n) = E(n-1) + dE = E(n-1) + alpha * [e - E(n-1)]
00097  *
00098  * void piu_frame_energy (
00099  *   tint frameLen,  - number of samples in input frame
00100  *   Fract *frame,   - pointer to a data frame
00101  *   LFract *energy) - current mean value
00102  *
00103  * NOTE: alpha = 2^(-8), corresponding to time constant T=36ms.
00104  *
00105  ****************************************************************************/
00106 void piu_frame_energy (tint frameLen, Fract *frame, LFract *energy)
00107 {
00108   LFract x, e, dE;
00109   int    i;
00110
00111   *energy = frctAdjustQ(*energy,2,0);
00112   for (i = 0; i < frameLen; i++)
00113   {
00114     x = frctF2LF(frame[i], 0, 0);
00115     e = frctMulLFbyLF (x, 0, x, 0, 0);/* e */
00116     dE = e - *energy;                 /* e - E(n-1) */
00117     dE = frctDivLFbyP2 (dE, 0, 8, 0); /* alpha * [e - E(n-1)] */
00118     *energy += dE;
00119   }
00120   *energy = frctAdjustQ(*energy,0,2);
00121 }
00122
00123 /*****************************************************************************
00124  * FUNCTION PURPOSE: Signal DC level
00125  *****************************************************************************
00126  * DESCRIPTION: This function calculates signal energy using geometric average.
00127  *              DC(n) = DC(n-1) + dDC = DC(n-1) + alpha * [x - DC(n-1)]
00128  *
00129  * void piu_frame_DClevel (
00130  *   tint frameLen,  - number of samples in input frame
00131  *   Fract *frame,   - pointer to a data frame
00132  *   LFract *DC_level) - current mean value
00133  *
00134  * NOTE: alpha = 2^(-13), corresponding to time constant T=36ms.
00135  *
00136  ****************************************************************************/
00137 void piu_frame_DClevel (tint frameLen, Fract *frame, LFract *DC_level)
00138 {
00139   LFract dLevel;
00140   int    i;
00141
00142   for (i = 0; i < frameLen; i++)
00143   {
00144     dLevel = frame[i] - *DC_level;    /* dLevel = x - DC_level */
00145     dLevel = frctDivLFbyP2 (dLevel, 0, 13, 0); /* alpha(13)*(x-dc) */
00146     *DC_level += dLevel;                       /* dc+alpha*(x-dc)  */
00147   }
00148 }
00149
00150 /* C version of assembly -- Not tested */
00151 void piu_remove_dc_component (tint frameLen, Fract *frame, LFract *DC_level, tint alpha)
00152 /* alpha parameter is log2 of the multiplying factor
00153    y[n] = (1-beta)*y[n-1] + beta*x[n]
00154    beta = 2^alpha */
00155 {
00156   int   i;
00157   LFract dLevel;
00158
00159   for (i = 0; i < frameLen; i++)
00160   {
00161      dLevel = *DC_level - frame[i];
00162      dLevel = dLevel<<alpha;
00163      *DC_level -= dLevel;
00164      frame[i] -= *DC_level;
00165
00166   }
00167 }
00168 /* 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 91 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_INSTANCE_BUFN 0

Definition at line 92 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_SENDOUT_BUFN 1

Definition at line 93 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_RECVIN_BUFN 2

Definition at line 94 of file piuinit.c.

Referenced by piuGetSizes(), and piuNew().

#define piu_RECVOUT_BUFN 3

Definition at line 95 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 122 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 183 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 98 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00010  *
00011  *              All rights reserved not granted herein.
00012  *
00013  *                         Limited License.
00014  *
00015  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00016  *  non-exclusive license under copyrights and patents it now or hereafter owns
00017  *  or controls to make, have made, use, import, offer to sell and sell
00018  *  ("Utilize") this software subject to the terms herein.  With respect to the
00019  *  foregoing patent license, such license is granted solely to the extent that
00020  *  any such patent is necessary to Utilize the software alone.  The patent
00021  *  license shall not apply to any combinations which include this software,
00022  *  other than combinations with devices manufactured by or for TI (“TI
00023  *  Devices”).  No hardware patent is licensed hereunder.
00024  *
00025  *  Redistributions must preserve existing copyright notices and reproduce this
00026  *  license (including the above copyright notice and the disclaimer and (if
00027  *  applicable) source code license limitations below) in the documentation
00028  *  and/or other materials provided with the distribution
00029  *
00030  *  Redistribution and use in binary form, without modification, are permitted
00031  *  provided that the following conditions are met:
00032  *
00033  *    *  No reverse engineering, decompilation, or disassembly of this software
00034  *  is permitted with respect to any software provided in binary form.
00035  *
00036  *    *  any redistribution and use are licensed by TI for use only with TI
00037  *  Devices.
00038  *
00039  *    *  Nothing shall obligate TI to provide you with source code for the
00040  *  software licensed and provided to you in object code.
00041  *
00042  *  If software source code is provided to you, modification and redistribution
00043  *  of the source code are permitted provided that the following conditions are
00044  *  met:
00045  *
00046  *    *  any redistribution and use of the source code, including any resulting
00047  *  derivative works, are licensed by TI for use only with TI Devices.
00048  *
00049  *    *  any redistribution and use of any object code compiled from the source
00050  *  code and any resulting derivative works, are licensed by TI for use only
00051  *  with TI Devices.
00052  *
00053  *  Neither the name of Texas Instruments Incorporated nor the names of its
00054  *  suppliers may be used to endorse or promote products derived from this
00055  *  software without specific prior written permission.
00056  *
00057  *  DISCLAIMER.
00058  *
00059  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00060  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00061  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00062  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00063  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00064  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00065  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00066  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00067  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00068  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00069  *  DAMAGE.
00070  *****************************************************************************/
00071
00072 /* Ansi C header files */
00073 #include <stdlib.h>
00074
00075 /* System Level header files */
00076 #include <ti/mas/types/types.h>
00077
00078 /* System Utilities' API's */
00079 #include <ti/mas/util/ecomem.h>
00080
00081 /* PIU related header files */
00082 #include <ti/mas/ecu/test/src/piu.h>
00083 #include <ti/mas/ecu/test/src/piuloc.h>
00084 #include <ti/mas/ecu/test/src/piuport.h>
00085
00086 /*****************************************************************
00087  *                  Static Variable declarations                 *
00088  *****************************************************************/
00089
00090 /* PIU dynamic memory buffers */
00091 #define piu_NBUFS         4
00092 #define piu_INSTANCE_BUFN 0
00093 #define piu_SENDOUT_BUFN  1
00094 #define piu_RECVIN_BUFN   2
00095 #define piu_RECVOUT_BUFN  3
00096
00097 /* Memory buffers initialization */
00098 static ecomemBuffer_t piuBufs[piu_NBUFS] = {
00099 /* class,           log2align, size, volat, base */
00100   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL, /* instance structure */
00101   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL, /* send in buffer */
00102   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL, /* receive in buffer */
00103   ecomem_CLASS_EXTERNAL,         0,    0, FALSE, NULL  /* receive out buffer */
00104 };
00105
00106 /******************************************************************************
00107  * FUNCTION PURPOSE: Obtain memory requirements for an instance of PIU
00108  ******************************************************************************
00109  * DESCRIPTION: Memory buffer description as defined in memory.h is used for
00110  *              buffer description. Vector of memory buffer descriptions that
00111  *              is returned in bufs must not be changed by external software.
00112  *              Memory requirements are determined based on the size
00113  *              configuration structure.
00114  *
00115  *  tint piuGetSizes (
00116  *    tint               *nbufs, - number of buffers used
00117  *    const memBuffer_t  **bufs, - memory buffer description structure
00118  *    piuSizeConfig_t    *cfg)   - size configuration structure
00119  *
00120  *****************************************************************************/
00121
00122 tint piuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, piuSizeConfig_t *cfg)
00123 {
00124   *nbufs = piu_NBUFS;
00125
00126   piuBufs[piu_INSTANCE_BUFN].size = sizeof(piuInst_t);
00127   piuBufs[piu_SENDOUT_BUFN].size  = piu_NUMSEGM_TX *
00128                                     cfg->max_samples_per_segment *
00129                                     sizeof(linSample);
00130
00131   if (cfg->rx_triple_buffering) {
00132      /* Triple buffering case in Rx direction (VOICE app) */
00133      piuBufs[piu_RECVIN_BUFN].size   = piu_NUMSEGM_RX3 *
00134                                        cfg->max_samples_per_segment *
00135                                        sizeof(linSample);
00136 #if PIUDLCOMP_ENABLE
00137       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX3 *
00138                                       (cfg->max_samples_per_segment>>1) *
00139                                        sizeof(linSample);
00140 #else
00141       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX3 *
00142                                       cfg->max_samples_per_segment *
00143                                        sizeof(linSample);
00144 #endif
00145   }
00146   else {
00147      /* Double buffering case in Rx direction (e.g. FAX app) */
00148     piuBufs[piu_RECVIN_BUFN].size   = piu_NUMSEGM_RX2 *
00149                                        cfg->max_samples_per_segment *
00150                                        sizeof(linSample);
00151 #if PIUDLCOMP_ENABLE
00152       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX2 *
00153                                       (cfg->max_samples_per_segment>>1) *
00154                                        sizeof(linSample);
00155 #else
00156       piuBufs[piu_RECVOUT_BUFN].size= piu_NUMSEGM_RX2 *
00157                                       cfg->max_samples_per_segment *
00158                                        sizeof(linSample);
00159 #endif
00160   }
00161
00162   *bufs = piuBufs ;      /* Return pointer to instance */
00163
00164   return (piu_NOERR);
00165 } /* piuGetSizes */
00166
00167 /*****************************************************************************
00168  * FUNCTION PURPOSE: Create a PIU object and assign PIU globals
00169  *****************************************************************************
00170  * DESCRIPTION: Creates an instance of PIU and initializes its memory.
00171  *
00172  * int piuNew (
00173  *   void           **piuInst, - an address of memory location that will
00174  *                               receive a pointer to instance structure
00175  *   tint           nbufs,     - number of buffers used
00176  *   memBuffer_t    *bufs,     - a vector of buffer descriptors
00177  *   piuNewConfig_t *cfg)      - a pointer to configuration structure
00178  *
00179  * RETURN VALUE: piu_NOMEMORY  - heap exhausted
00180  *               piu_NOERR     - success
00181  *               piu_ERROR     - invalid input parameters
00182  ****************************************************************************/
00183 tint piuNew (void **piuInst, tint nbufs, ecomemBuffer_t *bufs, piuNewConfig_t *cfg)
00184 {
00185   int   i;
00186   tbool  failed;
00187   piuInst_t   *inst;
00188   ecomemBuffer_t *bufp;
00189
00190   /* Test instance pointer (Must be NULL) */
00191   if (*piuInst != NULL || nbufs != piu_NBUFS) return (piu_ERROR) ;
00192
00193   /* Allocate all dynamic buffers (base address != NULL ?)*/
00194   failed = FALSE;
00195   for (i = 0, bufp = &bufs[0]; i<nbufs; i++, bufp++) {
00196     /* ignore NULL pointer on receive_out_buf when it is not allocated */
00197     failed = failed || (bufp->base == NULL);
00198   }
00199   if (failed)
00200     return (piu_NOMEMORY);
00201
00202   /* Identify the instance structure */
00203   bufp = &bufs[piu_INSTANCE_BUFN];
00204   if (bufp->size < sizeof(piuInst_t)) return (piu_ERROR);
00205   inst = (piuInst_t *)bufp->base;
00206
00207   /* Identify the send-out buffer */
00208   bufp = &bufs[piu_SENDOUT_BUFN];
00209   inst->send_out_buf = (linSample *)bufp->base;
00210
00211   /* Identify the receive-in buffer */
00212   bufp = &bufs[piu_RECVIN_BUFN];
00213   inst->receive_in_buf.start_ptr = (linSample *)bufp->base;
00214
00215   /* Identify the receive-out buffer */
00216   bufp = &bufs[piu_RECVOUT_BUFN];
00217   inst->receive_out_buf = (linSample *)bufp->base;
00218
00219   inst->mode_bitfield          = 0;
00220   inst->receive_in_buf.end_ptr = inst->receive_in_buf.start_ptr;
00221   if (cfg->sizeCfg.rx_triple_buffering) {
00222     /* This is implicit indication of VOICE (or Modem) application.
00223      * It requires triple buffering scheme */
00224     inst->receive_in_buf.end_ptr += (piu_NUMSEGM_RX3 * cfg->sizeCfg.max_samples_per_segment);
00225     inst->mode_bitfield |= piu_CTRL_BIT_TRIPLE_RX_BUF;
00226   } else {
00227     /* It requires double buffering scheme */
00228     inst->receive_in_buf.end_ptr += (piu_NUMSEGM_RX2 * cfg->sizeCfg.max_samples_per_segment);
00229   }
00230   inst->receive_in_buf.top_ptr   = inst->receive_in_buf.end_ptr;
00231
00232   /* Save some configuration parameters */
00233   inst->ID      = cfg->ID;
00234   piuContext    = cfg->context;
00235   inst->state   = piu_CLOSED;     /* state is set to closed */
00236
00237   *piuInst = (void *)inst;          /* return the instance pointer */
00238
00239   return (piu_NOERR);
00240 } /* piuNew */
00241
00242
00243 /* 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 84 of file piuisr.c.

Function Documentation

void piuReceiveOut | ( | void * | piuInst,
 |  | tword ** | toTdm,
 |  | tuint | timestamp,
 |  | tuint | frameLength
 | ) |  |

Definition at line 102 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 182 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070 /* system level header files */
00071 #include <ti/mas/types/types.h>
00072
00073 /* system utilities' API's */
00074 #include <ti/mas/util/wng.h>
00075 #include <ti/mas/util/utl.h>
00076 #include <ti/mas/util/pkt.h>
00077
00078 /* PIU related header files */
00079 #include <ti/mas/ecu/test/src/piu.h>
00080 #include <ti/mas/ecu/test/src/piuloc.h>
00081 #include <ti/mas/ecu/test/src/piuport.h>
00082
00083
00084 #define piuABS(x) (((x)<0)?(-(x)):(x))  /* Absolute value definition */
00085
00086 /*****************************************************************************
00087  * FUNCTION PURPOSE: Perform receive-out processing for piuPcmIo().
00088  *****************************************************************************
00089  * DESCRIPTION: Performs PIU receive-out processing to send speech
00090  *              data from the PIU to the PCM interface.
00091  *
00092  *  static void piuReceiveOut (
00093  *    piuInst_t *inst,        - a pointer to PIU instance
00094  *    tword     **toTdm       - On entry this points to the frame size buffer
00095  *                              that HAL has just finished processing. On exit
00096  *                              it must point to the buffer that will be used
00097  *                              by hal on the next frame.
00098  *    tuint      timestamp    - A sample counter provided by HAL
00099  *    tuint      frameLength  - The frame size used by HAL. This size is not
00100  *                              checked for a match with piu
00101  *****************************************************************************/
00102 void piuReceiveOut (void *piuInst, tword **toTdm , tuint timestamp, tuint frameLength)
00103 {
00104   piuInst_t *inst = (piuInst_t *)piuInst;
00105   piuContext_t *context = &piuContext;
00106   linSample *s_ptr,*r_ptr;
00107 #if !PIUDLCOMP_ENABLE
00108   tuint ratio = sizeof(linSample)/sizeof(tword);
00109 #endif
00110
00111   if (inst->state != piu_OPEN)
00112     return;
00113
00114   /* If underflow, there is now no data
00115    * to send to the HAL for output on the TDM line.
00116    * One frame of silence will be introduced here. */
00117   if (inst->receive_in_buf.segment_count <= 0)  {
00118     utlLsMemSet (inst->receive_in_buf.in_ptr, inst->silence_pattern,
00119                  inst->segment_size);
00120     piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00121     inst->rx_underflow_cnt++;
00122   }
00123
00124   /* Provide to HAL where to get the next data to send out the TDM interface */
00125   *toTdm = (tword *)inst->receive_in_buf.out_ptr;
00126   piu_update_buf_ptr (inst, 1, &inst->receive_in_buf.out_ptr);
00127
00128   /* we have compressed linear samples, expand it for ECU delay line!
00129    * Provide to the ECU the samples that HAL is about to transmit on the
00130    * PCM interface */
00131   r_ptr = inst->receive_out_buf_ptr;  /* Store send out value before update */
00132   if (inst->mode_bitfield & piu_CTRL_BIT_USE_RECV_OUT_BUF) {
00133
00134 #if PIUDLCOMP_ENABLE
00135     ecuSim_packLSBof16bitsIntoWords ((linSample *) *toTdm, (tword *)inst->receive_out_buf_ptr,
00136                                      inst->segment_size);
00137     inst->receive_out_buf_ptr += inst->segment_size >> 1; /* store the new value! */
00138 #else
00139     utlCopy((tword *)*toTdm, (tword *)inst->receive_out_buf_ptr, ratio*inst->segment_size);
00140     inst->receive_out_buf_ptr += inst->segment_size;    /* store the new value! */
00141 #endif
00142   }
00143
00144   /* The send out buffer pointer is updated in the HAL call to piu_send_in.
00145    * By convention piu_send_in has been called prior to this function.
00146    * Therefore on entry to this function the send_out_buf_ptr points to the
00147    * location of data that has just been received by HAL */
00148   s_ptr = inst->send_out_buf_ptr;
00149
00150   /* Receive Out is a ping-pong buffer */
00151   if (r_ptr != inst->receive_out_buf) {
00152     inst->receive_out_buf_ptr = inst->receive_out_buf;
00153   }
00154
00155   /* call send-out function */
00156   /* pcm trace */
00157   (*context->pcmSampleTrace)(((inst->ID&0xFF)-1), inst->segment_size,
00158                              *toTdm, 1);
00159
00160
00161   (*context->sendOutIsrFcn)(inst->sendOutIsrTargetInst, s_ptr, r_ptr,
00162                             piu_TXRX_TASK_ID);
00163
00164 } /* piuReceiveOut */
00165
00166 /*****************************************************************************
00167  * FUNCTION PURPOSE: Perform send_in processing for piuPcmIo().
00168  *****************************************************************************
00169  * DESCRIPTION: Performs PIU send-in processing to send
00170  *              data from the PCM to PIU.
00171  *
00172  *   void piuSendIn (
00173  *    piuInst_t *inst,        - a pointer to PIU instance
00174  *    word       **fromTdm    - A pointer to the frame of data that HAL has
00175  *                              completed. On return it will tell HAL where
00176  *                              to put data in the next frame.
00177  *    tuint      timeStamp    - A sample counter provided by HAL
00178  *    tuint      frameLength  - The frame size HAL is using. There is no
00179  *                              check that this is the piu frame size.
00180  *
00181  *****************************************************************************/
00182 void piuSendIn (void *piuInst, tword **fromTdm, tuint timeStamp, tuint frameLength)
00183 {
00184   piuInst_t    *inst = (piuInst_t *)piuInst;
00185   piuContext_t *context = &piuContext;
00186
00187   if (inst->state != piu_OPEN)
00188     return;
00189
00190   /* On entry, fromTdm contains a pointer to the frame of data that has
00191    * just been received by the TDM port */
00192   inst->send_out_buf_ptr = (linSample *)*fromTdm;
00193
00194   /* call pcmTrace function */
00195   (*context->pcmSampleTrace)(((inst->ID&0xFF)-1), inst->segment_size,
00196                              inst->send_out_buf_ptr, 0);
00197
00198   /* Return to HAL the buffer to place the next frame of data. The send
00199    * out buffer is stricly double buffered, so a simple check of the
00200    * just finished buffer is enough to find the location of the next
00201    * buffer half */
00202   if (inst->send_out_buf_ptr == inst->send_out_buf)
00203     *fromTdm = (tword *)&(inst->send_out_buf_ptr[inst->segment_size]);
00204   else
00205     *fromTdm = (tword *)inst->send_out_buf;
00206
00207 } /* 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 96 of file piuloc.h.

Referenced by piuGetSizes(), piuNew(), piuOpen(), and piuReceiveIn().

#define piu_NUMSEGM_RX2 2

Definition at line 100 of file piuloc.h.

Referenced by piuGetSizes(), piuOpen(), and piuReceiveIn().

#define piu_NUMSEGM_TX 2

Definition at line 101 of file piuloc.h.

Referenced by piuGetSizes(), and piuOpen().

#define piu_TX_TASK_ID 2

Definition at line 104 of file piuloc.h.

Referenced by piuTxRxProc().

#define piu_TXRX_TASK_ID 0

Definition at line 105 of file piuloc.h.

Referenced by piuReceiveOut().

#define piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT -6

Definition at line 108 of file piuloc.h.

Referenced by piuTxRxProc().

#define piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT -2

Definition at line 109 of file piuloc.h.

Referenced by piuTxRxProc().

#define piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION 2

Definition at line 115 of file piuloc.h.

Referenced by piu_bid_silence_detect().

#define piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR 1

Definition at line 125 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 217 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 129 of file piuloc.h.

anonymous enum

Enumerator:
piu_PCM_PATTERN_CUSTOM
piu_PCM_PATTERN_T1
piu_PCM_PATTERN_E1

Definition at line 135 of file piuloc.h.

Function Documentation

void piu_exception | ( | tuint | id,
 |  | tuint | code
 | ) |  |

Definition at line 98 of file piu.c.

References piuContext_t::debugInfo, and piuContext.

void piu_frame_energy | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | energy
 | ) |  |

Definition at line 106 of file piufutil.c.

Referenced by piuReceiveIn(), and piuTxRxProc().

void piu_frame_DClevel | ( | tint | frameLen,
 |  | Fract * | frame,
 |  | LFract * | DClevel
 | ) |  |

Definition at line 137 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 151 of file piufutil.c.

Referenced by piuTxRxProc().

void piu_get_stats | ( | void * | piuInst,
 |  | piuStats_t * | levels
 | ) |  |

Definition at line 188 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 266 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 318 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 223 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 162 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 131 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 97 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00020  *
00021  *              All rights reserved not granted herein.
00022  *
00023  *                         Limited License.
00024  *
00025  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00026  *  non-exclusive license under copyrights and patents it now or hereafter owns
00027  *  or controls to make, have made, use, import, offer to sell and sell
00028  *  ("Utilize") this software subject to the terms herein.  With respect to the
00029  *  foregoing patent license, such license is granted solely to the extent that
00030  *  any such patent is necessary to Utilize the software alone.  The patent
00031  *  license shall not apply to any combinations which include this software,
00032  *  other than combinations with devices manufactured by or for TI (“TI
00033  *  Devices”).  No hardware patent is licensed hereunder.
00034  *
00035  *  Redistributions must preserve existing copyright notices and reproduce this
00036  *  license (including the above copyright notice and the disclaimer and (if
00037  *  applicable) source code license limitations below) in the documentation
00038  *  and/or other materials provided with the distribution
00039  *
00040  *  Redistribution and use in binary form, without modification, are permitted
00041  *  provided that the following conditions are met:
00042  *
00043  *    *  No reverse engineering, decompilation, or disassembly of this software
00044  *  is permitted with respect to any software provided in binary form.
00045  *
00046  *    *  any redistribution and use are licensed by TI for use only with TI
00047  *  Devices.
00048  *
00049  *    *  Nothing shall obligate TI to provide you with source code for the
00050  *  software licensed and provided to you in object code.
00051  *
00052  *  If software source code is provided to you, modification and redistribution
00053  *  of the source code are permitted provided that the following conditions are
00054  *  met:
00055  *
00056  *    *  any redistribution and use of the source code, including any resulting
00057  *  derivative works, are licensed by TI for use only with TI Devices.
00058  *
00059  *    *  any redistribution and use of any object code compiled from the source
00060  *  code and any resulting derivative works, are licensed by TI for use only
00061  *  with TI Devices.
00062  *
00063  *  Neither the name of Texas Instruments Incorporated nor the names of its
00064  *  suppliers may be used to endorse or promote products derived from this
00065  *  software without specific prior written permission.
00066  *
00067  *  DISCLAIMER.
00068  *
00069  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00070  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00071  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00072  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00073  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00074  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00075  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00076  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00077  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00078  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00079  *  DAMAGE.
00080  *****************************************************************************/
00081
00082 /* System level header files */
00083 #include <ti/mas/types/const.h>
00084 #include <ti/mas/types/types.h>
00085 #include <ti/mas/fract/fract.h>
00086
00087 /* System utilities' API's */
00088 #include <ti/mas/util/cb.h>
00089
00090 /* PIU high level header files */
00091 #include <ti/mas/ecu/test/src/piu.h>
00092 /* PIU low level header files */
00093 #include <ti/mas/ecu/test/src/piuport.h>
00094
00095 /* Triple buffering in Rx direction (VOICE application) */
00096 #define piu_NUMSEGM_RX3            3
00097 /* Double buffering in Rx direction                   *
00098  * (used only if receiveout buffer is not allocated,  *
00099  *  like for FAX application)                         */
00100 #define piu_NUMSEGM_RX2            2
00101 #define piu_NUMSEGM_TX             2
00102
00103 /* Sampling Frequency */
00104 #define piu_TX_TASK_ID   2 /* same as SIU_TX_QUEUE_ID */
00105 #define piu_TXRX_TASK_ID 0 /* same as SIU_TXRX_QUEUE_ID */
00106
00107 /* Parameters for DC offset removal */
00108 #define piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT -6
00109 #define piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT -2
00110
00111 #ifndef GG_MULTSAMPVC
00112
00113 /* Defines for Bidirectional Silence detection */
00114 /* Decrement the counter once every 2^2 = 4 sample Decreases precision to 0.5ms*/
00115 #define piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION  2
00116
00117 #else /* 16 KHz sampling rate */
00118
00119 /* Defines for Bidirectional Silence detection */
00120 /* Decrement the counter once every 2^3 = 8 sample Decreases precision to 0.5ms*/
00121 #define piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION  3
00122
00123 #endif
00124
00125 #define piu_BIDIR_SILENCE_RESOLUTION_LOG2_FACTOR 1 /* log2(65536 (max tuint) / 32768 (max time in ms)) */
00126
00127
00128 /* PIU global states */
00129 enum {
00130   piu_CLOSED = 0,
00131   piu_OPEN   = 1
00132 };
00133
00134 /* PCM Pattern Detection Types */
00135 enum {
00136   piu_PCM_PATTERN_CUSTOM,
00137   piu_PCM_PATTERN_T1,
00138   piu_PCM_PATTERN_E1
00139 };
00140
00141 typedef struct {
00142   tint type;       /* custom, T1 or E1 */
00143   tint custom;     /* custom pattern to be detected */
00144   tlong cnt;       /* Counts successive matching samples */
00145   tint initCnt;    /* Required number of matching samples */
00146 } piuPcmPatternDetect_t;
00147
00148 /* Geometric mean values */
00149 typedef struct {
00150   LFract txEnergy;
00151   LFract rxEnergy;
00152   LFract txDClevel;
00153   LFract rxDClevel;
00154 } piuEnergyDCLevel_t;
00155
00156 /* bi-directional silence detection */
00157 typedef struct {
00158   LFract txSilDetEnergy;  /* saturated energy */
00159   LFract rxSilDetEnergy;
00160   LFract threshold;       /* Below this power level the absence of
00161                            * signal is declared */
00162   tuint  cnt;             /* Hangover Timer; counts time while both,
00163                            * tx & rx, energies are below threshold */
00164   tuint   initCnt;         /* Initial value for Hangover Timer */
00165 } bidSilenceCtrl_t;
00166
00167 /* receive_in buf parameters */
00168 typedef struct {
00169   linSample *in_ptr;
00170   linSample *out_ptr;
00171   linSample *start_ptr;
00172   linSample *end_ptr;
00173   linSample *top_ptr;
00174   tint      segment_count;
00175 } receive_in_buf_t;
00176
00177
00178 /******************************************************************************
00179  * DATA DEFINITION: PIU instance data structure
00180  ******************************************************************************
00181  * DESCRIPTION: This structure specifies the state of an instance of a PIU.
00182  *
00183  ******************************************************************************/
00184 typedef struct piuInst_s {
00185   tuint ID;                       /* user-defined ID field */
00186   tint  state;                    /* indicates if PIU is open or closed */
00187   tuint mode_bitfield;            /* bit field of different mode */
00188   const tint *pcm_expand_table;   /* lookup table for PCM expansion */
00189   tint pcm_format;                /* PCM conversion format (u-law, A-law,
00190                                    *  linear) */
00191   tint segment_size;              /* # of samples in a PIU voice segment */
00192   tuint rx_delay;                 /* delay length in samples */
00193   tuint rx_underflow_cnt;         /* # of Rx underflows in receive-out fcn's */
00194   tuint rx_overflow_cnt;          /* # of Rx overflows in receive-out fcn's */
00195   linSample *receive_out_buf;     /* address of receive-out buffer */
00196   linSample *receive_out_buf_ptr; /* current receive-out buffer pointer    */
00197   linSample *send_out_buf;        /* address of send-in buffer             */
00198   linSample *send_out_buf_ptr;    /* current send-in buffer pointer     */
00199
00200   void *reportOutTargetInst;      /* report instance              */
00201   void *sendOutProcTargetInst;    /* foreground sendOut instance  */
00202   void *sendOutIsrTargetInst;     /* background sendOut instance  */
00203
00204   piuEnergyDCLevel_t    energy_DClevel; /* enery/DC levels of Tx/Rx */
00205   tuint                 generatePattern;/* pattern to be generated */
00206   receive_in_buf_t      receive_in_buf; /* receive in buffer parameters */
00207   bidSilenceCtrl_t      bidSilence;     /* bidSilence parameters */
00208   piuPcmPatternDetect_t pcmPattern;     /* PCM Pattern Detection parameters */
00209   linSample             silence_pattern;/* silence pattern */
00210 } piuInst_t;
00211
00212 /*----------------------------*/
00213 /* Exception and Debug Macros */
00214 /*----------------------------*/
00215
00216 /* Assert macro for the exceptions */
00217 #define piu_exc_assert(expr,code,inst) { \
00218   (expr) ? ((void)0) : piu_exception((inst)->ID, code); }
00219
00220 /* Function prototypes */
00221 /* piu.c */
00222 void piu_exception(tuint id, tuint code);
00223 /* piufutil.s */
00224 void piu_frame_energy   (tint frameLen, Fract *frame, LFract *energy);
00225 void piu_frame_DClevel  (tint frameLen, Fract *frame, LFract *DClevel);
00226 void piu_remove_dc_component (tint frameLen, Fract *frame, LFract *DClevel, tint alpha);
00227 /* piutxrx.c */
00228 void piu_get_stats             (void *piuInst, piuStats_t *levels);
00229 void piu_pcm_pattern_detect    (piuInst_t *inst, tint *pcm_in);
00230 void piu_pcm_pattern_generate  (piuInst_t *inst);
00231 void piu_bid_silence_detect    (piuInst_t *inst);
00232 void piu_energy_dc_measurement (piuInst_t *inst, tint *lin_samples);
00233 void piu_update_buf_ptr        (piuInst_t *inst, tbool dir, linSample **in_ptr);
00234 void piu_pcm_companding        (piuInst_t *inst, tint *pcm_in, tint *linear_out,
00235                                 tint length);
00236 void piu_pcm_compressing       (piuInst_t *inst, tint *linear_in, tint *pcm_out,
00237                                 tint length);
00238
00239
00240 #endif /* _PIULOC_H */
00241 /* 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 76 of file piuport.h.

#define PIU_STATE_BEGIN ( ) ((void)0)

Definition at line 83 of file piuport.h.

#define PIU_STATE_END ( ) ((void)0)

Definition at line 84 of file piuport.h.

#define PIU_BEGIN_CRITICAL_SECTION ( ) ((void)0)

Definition at line 87 of file piuport.h.

Referenced by piuControl(), and piuReceiveIn().

#define PIU_END_CRITICAL_SECTION ( ) ((void)0)

Definition at line 88 of file piuport.h.

Referenced by piuControl(), and piuReceiveIn().

#define PIUDLCOMP_ENABLE 0

Definition at line 93 of file piuport.h.

#define _ECUSIM_PIU_PORT_C54 0

Definition at line 99 of file piuport.h.

#define _ECUSIM_PIU_PORT_C54F 0

Definition at line 105 of file piuport.h.

#define _ECUSIM_PIU_PORT_C55 0

Definition at line 111 of file piuport.h.

#define _ECUSIM_PIU_PORT_C55L 0

Definition at line 117 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64 0

Definition at line 123 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 0

Definition at line 129 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64P 0

Definition at line 135 of file piuport.h.

#define _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 0

Definition at line 141 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C64P 0

Definition at line 147 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 153 of file piuport.h.

#define _ECUSIM_PIU_PORT_C66 0

Definition at line 159 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C66 0

Definition at line 165 of file piuport.h.

#define _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 0

Definition at line 171 of file piuport.h.

#define _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 0

Definition at line 177 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #ifndef _PIUPORT_H
00072 #define _PIUPORT_H
00073
00074 #include <ti/mas/ecu/test/src/ecusimport.h>
00075
00076 #define PIU_MAX_SUBSEGLENGTH   40   /* maximum 40 samples in a sub-segment */
00077
00078 /*-----------------------------*/
00079 /* PIU Critical Section Macros */
00080 /*-----------------------------*/
00081
00082 /* Critical section for the PIU states (piuInst->state) */
00083 #define PIU_STATE_BEGIN() ((void)0)
00084 #define PIU_STATE_END()   ((void)0)
00085
00086 /* Critical section for the PIU receive-in buffer synchronization */
00087 #define PIU_BEGIN_CRITICAL_SECTION() ((void)0)
00088 #define PIU_END_CRITICAL_SECTION()   ((void)0)
00089
00090 #if ecu_DELAY_LINE_COMPRESS
00091 #define PIUDLCOMP_ENABLE        1
00092 #else
00093 #define PIUDLCOMP_ENABLE        0
00094 #endif
00095
00096 #ifdef ti_targets_C54
00097 #define _ECUSIM_PIU_PORT_C54 1
00098 #else
00099 #define _ECUSIM_PIU_PORT_C54 0
00100 #endif
00101
00102 #ifdef ti_targets_C54_far
00103 #define _ECUSIM_PIU_PORT_C54F 1
00104 #else
00105 #define _ECUSIM_PIU_PORT_C54F 0
00106 #endif
00107
00108 #ifdef ti_targets_C55
00109 #define _ECUSIM_PIU_PORT_C55 1
00110 #else
00111 #define _ECUSIM_PIU_PORT_C55 0
00112 #endif
00113
00114 #ifdef ti_targets_C55_large
00115 #define _ECUSIM_PIU_PORT_C55L 1
00116 #else
00117 #define _ECUSIM_PIU_PORT_C55L 0
00118 #endif
00119
00120 #ifdef ti_targets_C64
00121 #define _ECUSIM_PIU_PORT_C64 1
00122 #else
00123 #define _ECUSIM_PIU_PORT_C64 0
00124 #endif
00125
00126 #ifdef ti_targets_C64_big_endian
00127 #define _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 1
00128 #else
00129 #define _ECUSIM_PIU_PORT_C64_BIG_ENDIAN 0
00130 #endif
00131
00132 #ifdef ti_targets_C64P
00133 #define _ECUSIM_PIU_PORT_C64P 1
00134 #else
00135 #define _ECUSIM_PIU_PORT_C64P 0
00136 #endif
00137
00138 #ifdef ti_targets_C64P_big_endian
00139 #define _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 1
00140 #else
00141 #define _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN 0
00142 #endif
00143
00144 #ifdef ti_targets_elf_C64P
00145 #define _ECUSIM_PIU_PORT_ELF_C64P 1
00146 #else
00147 #define _ECUSIM_PIU_PORT_ELF_C64P 0
00148 #endif
00149
00150 #ifdef ti_targets_elf_C64P_big_endian
00151 #define _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 1
00152 #else
00153 #define _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN 0
00154 #endif
00155
00156 #ifdef ti_targets_C66
00157 #define _ECUSIM_PIU_PORT_C66 1
00158 #else
00159 #define _ECUSIM_PIU_PORT_C66 0
00160 #endif
00161
00162 #ifdef ti_targets_elf_C66
00163 #define _ECUSIM_PIU_PORT_ELF_C66 1
00164 #else
00165 #define _ECUSIM_PIU_PORT_ELF_C66 0
00166 #endif
00167
00168 #ifdef ti_targets_C66_big_endian
00169 #define _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 1
00170 #else
00171 #define _ECUSIM_PIU_PORT_C66_BIG_ENDIAN 0
00172 #endif
00173
00174 #ifdef ti_targets_elf_C66_big_endian
00175 #define _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 1
00176 #else
00177 #define _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN 0
00178 #endif
00179
00180
00181 #if   (_ECUSIM_PIU_PORT_C54 || _ECUSIM_PIU_PORT_C54F)
00182 #include <ti/mas/ecu/test/src/c54/piuport.h>
00183 #elif (_ECUSIM_PIU_PORT_C55 || _ECUSIM_PIU_PORT_C55L)
00184 #include <ti/mas/ecu/test/src/c55/piuport.h>
00185 #elif (_ECUSIM_PIU_PORT_C64       || _ECUSIM_PIU_PORT_C64_BIG_ENDIAN      || \
00186        _ECUSIM_PIU_PORT_C64P      || _ECUSIM_PIU_PORT_C64P_BIG_ENDIAN     || \
00187        _ECUSIM_PIU_PORT_ELF_C64P  || _ECUSIM_PIU_PORT_ELF_C64P_BIG_ENDIAN || \
00188        _ECUSIM_PIU_PORT_C66       || _ECUSIM_PIU_PORT_C66_BIG_ENDIAN      || \
00189        _ECUSIM_PIU_PORT_ELF_C66   || _ECUSIM_PIU_PORT_ELF_C66_BIG_ENDIAN)
00190 #include <ti/mas/ecu/test/src/c64/piuport.h>
00191 #else
00192 #error invalid target
00193 #endif
00194
00195 #endif /* _PIUPORT_H */
00196
00197 /* Nothing past this point */
00198
00199


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 97 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 131 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 162 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 188 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 223 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 266 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 318 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 348 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 403 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00008  *
00009  *              All rights reserved not granted herein.
00010  *
00011  *                         Limited License.
00012  *
00013  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00014  *  non-exclusive license under copyrights and patents it now or hereafter owns
00015  *  or controls to make, have made, use, import, offer to sell and sell
00016  *  ("Utilize") this software subject to the terms herein.  With respect to the
00017  *  foregoing patent license, such license is granted solely to the extent that
00018  *  any such patent is necessary to Utilize the software alone.  The patent
00019  *  license shall not apply to any combinations which include this software,
00020  *  other than combinations with devices manufactured by or for TI (“TI
00021  *  Devices”).  No hardware patent is licensed hereunder.
00022  *
00023  *  Redistributions must preserve existing copyright notices and reproduce this
00024  *  license (including the above copyright notice and the disclaimer and (if
00025  *  applicable) source code license limitations below) in the documentation
00026  *  and/or other materials provided with the distribution
00027  *
00028  *  Redistribution and use in binary form, without modification, are permitted
00029  *  provided that the following conditions are met:
00030  *
00031  *    *  No reverse engineering, decompilation, or disassembly of this software
00032  *  is permitted with respect to any software provided in binary form.
00033  *
00034  *    *  any redistribution and use are licensed by TI for use only with TI
00035  *  Devices.
00036  *
00037  *    *  Nothing shall obligate TI to provide you with source code for the
00038  *  software licensed and provided to you in object code.
00039  *
00040  *  If software source code is provided to you, modification and redistribution
00041  *  of the source code are permitted provided that the following conditions are
00042  *  met:
00043  *
00044  *    *  any redistribution and use of the source code, including any resulting
00045  *  derivative works, are licensed by TI for use only with TI Devices.
00046  *
00047  *    *  any redistribution and use of any object code compiled from the source
00048  *  code and any resulting derivative works, are licensed by TI for use only
00049  *  with TI Devices.
00050  *
00051  *  Neither the name of Texas Instruments Incorporated nor the names of its
00052  *  suppliers may be used to endorse or promote products derived from this
00053  *  software without specific prior written permission.
00054  *
00055  *  DISCLAIMER.
00056  *
00057  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00058  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00059  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00060  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00061  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00062  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00063  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00064  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00065  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00066  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00067  *  DAMAGE.
00068  *****************************************************************************/
00069 /* Ansi C header files */
00070 #include <stdlib.h>
00071 #include <string.h>
00072
00073 /* System Level header files */
00074 #include <ti/mas/types/types.h>
00075
00076 /* System Utilities' API's */
00077 #include <ti/mas/util/utl.h>
00078 #include <ti/mas/util/mua.h>
00079
00080 /* PIU related header files */
00081 #include <ti/mas/ecu/test/src/piu.h>
00082 #include <ti/mas/ecu/test/src/piuloc.h>
00083 #include <ti/mas/ecu/test/src/piuport.h>
00084
00085 /*****************************************************************************
00086  * FUNCTION PURPOSE: Perform linear samples to PCM samples conversion.
00087  *****************************************************************************
00088  * DESCRIPTION: Performs 16-bit to n-bit PCM compression
00089  *
00090  *  void piu_pcm_compressing (
00091  *    piuInst_t *inst,        - a pointer to PIU instance
00092  *    tint      *linear_in,   - a pointer to input buffer
00093  *    tint      *pcm_out,     - a pointer to output buffer
00094  *    tint      length)       - number of samples to compress
00095  *
00096  *****************************************************************************/
00097 void piu_pcm_compressing (piuInst_t *inst, tint *linear_in,
00098                           tint *pcm_out, tint length)
00099 {
00100   linSample *in_ptr, *out_ptr;
00101
00102   /* Initialize common variable(s) */
00103   in_ptr  = linear_in;
00104   out_ptr = pcm_out;
00105   if ((inst->mode_bitfield&piu_CTRL_BIT_TRANSPARENT_MODE)) {
00106     utlCopy((tword *)in_ptr, (tword *)out_ptr, length);
00107   }
00108   else {
00109     /* Perform 16-bit to 8-bit compression or linear compression */
00110     if (inst->pcm_format == piu_COMP_ULAW)        /* u-law + saturation */
00111       muaTblUlawCmpr (length, in_ptr, out_ptr);
00112     else if (inst->pcm_format == piu_COMP_ALAW)   /* A-law + saturation */
00113       muaTblAlawCmpr (length, in_ptr, out_ptr);
00114     else                         /* linear 16 bit data, out = in */
00115       utlCopy((tword *)in_ptr, (tword *)out_ptr, length);
00116   }
00117 } /* piu_pcm_compressing */
00118
00119 /*****************************************************************************
00120  * FUNCTION PURPOSE: Perform PCM samples to linear samples conversion
00121  *****************************************************************************
00122  * DESCRIPTION: PCM samples to linear samples conversion.
00123  *
00124  *  void piu_pcm_companding (
00125  *    piuInst_t *inst,        - a pointer to PIU instance
00126  *    tint      *pcm_in,      - a pointer to input buffer
00127  *    tint      *linear_out,  - a pointer to output buffer
00128  *    tint      length)       - number of samples to compand
00129  *
00130  ****************************************************************************/
00131 void piu_pcm_companding (piuInst_t *inst, tint *pcm_in,
00132                          tint *linear_out, tint length)
00133 {
00134   tint  *linear_out_ptr;
00135   const tint *pcm_expand_table;
00136
00137   linear_out_ptr = linear_out;
00138   /* Perform n-bit to 16-bit PCM expansion */
00139   if ((!(inst->mode_bitfield&piu_CTRL_BIT_TRANSPARENT_MODE)) &&
00140     (inst->pcm_expand_table != NULL)) {
00141     pcm_expand_table = inst->pcm_expand_table;
00142     UAExpand(length, (tword *)pcm_in, &linear_out_ptr, pcm_expand_table);
00143   }
00144   else {    /* no processing in transparent mode or linear expansion */
00145     utlCopy((tword *)pcm_in, (tword *)linear_out_ptr, length);
00146   }
00147 } /* piu_pcm_companding */
00148
00149 /******************************************************************************
00150  * FUNCTION PURPOSE: Update (boundary check) the receive_in buffer in_index
00151  ******************************************************************************
00152  * DESCRIPTION: Update (boundary check) the receive_in buffer in_index.
00153  *
00154  *   void piu_update_buf_ptr (
00155  *     void *piuInst, - A pointer to PIU instance
00156  *     tbool dir,      - direction: 0-input, 1-output
00157  *     tint **inptr)  - Adress of receive_in buf in_ptr address
00158  *
00159  *
00160  *****************************************************************************/
00161
00162 void piu_update_buf_ptr (piuInst_t *inst, tbool dir, linSample **in_ptr)
00163 {
00164   *in_ptr += inst->segment_size;
00165   if (*in_ptr == inst->receive_in_buf.end_ptr) {
00166     *in_ptr = inst->receive_in_buf.start_ptr;
00167   }
00168   if (dir)
00169     inst->receive_in_buf.segment_count--;
00170   else
00171     inst->receive_in_buf.segment_count++;
00172 } /* piu_update_buf_ptr */
00173
00174 /******************************************************************************
00175  * FUNCTION PURPOSE: Measure signal levels
00176  ******************************************************************************
00177  * DESCRIPTION: This function reports the PIU send-out and receive-out signal
00178  *              levels. It is executed in the context of the calling task.
00179  *              The signal level reported in dBm0.
00180  *
00181  *   void piu_get_stats (
00182  *     void        *piuInst, - A pointer to PIU instance
00183  *     piuLevels_t *levels)  - Pointer to signal level structure
00184  *
00185  * NOTE: Vmax = 32768 for +3dBm0
00186  *
00187  *****************************************************************************/
00188 void piu_get_stats (void *piuInst, piuStats_t *stats)
00189 {
00190   tint db;
00191   LFract lin;
00192   piuInst_t          *inst       = (piuInst_t *)piuInst;
00193   piuEnergyDCLevel_t *lin_levels = (piuEnergyDCLevel_t *)&inst->energy_DClevel;
00194
00195   /* mean is reported in 16bits signed linear integer format */
00196   stats->send_out_mean     = frctLF2F(lin_levels->txDClevel, piu_MEAN_Q, 0);
00197   stats->receive_out_mean  = frctLF2F(lin_levels->rxDClevel, piu_MEAN_Q, 0);
00198
00199   /* energy is reported in 16bits signed dBm0 format */
00200   lin = frctAdjustQ (lin_levels->txEnergy, piu_ENERGY_Q, 0);
00201   if (lin <= 0) /* input to utlLin2dBPower must be > 0 */
00202     lin = 1;    /* -84 dBm0 */
00203   db = utlLin2dBPower (lin);
00204   stats->send_out = frctAdjustQ (db, piu_POWER_DB_Q, 0);
00205
00206   lin = frctAdjustQ (lin_levels->rxEnergy, piu_ENERGY_Q, 0);
00207   if (lin <= 0) /* input to utlLin2dBPower must be > 0 */
00208     lin = 1;    /* -84 dBm0 */
00209   db = utlLin2dBPower (lin);
00210   stats->receive_out = frctAdjustQ (db, piu_POWER_DB_Q, 0);
00211   stats->underrun    = inst->rx_underflow_cnt;
00212 } /* piu_get_stats */
00213
00214 /*****************************************************************************
00215  * FUNCTION PURPOSE: Bidirectional Silence Detection
00216  *****************************************************************************
00217  * DESCRIPTION: Bidirectional Silence Detection .
00218  *
00219  * void piu_bid_silence_detect (
00220  *    piuInst_t *inst) - a pointer to PIU instance
00221  *
00222  ****************************************************************************/
00223 void piu_bid_silence_detect (piuInst_t *inst)
00224 {
00225   LFract lin_thres;
00226   piuContext_t *context = &piuContext;
00227
00228   lin_thres = inst->bidSilence.threshold*8;
00229   if (inst->bidSilence.txSilDetEnergy > lin_thres)
00230     inst->bidSilence.txSilDetEnergy = lin_thres;
00231   if (inst->bidSilence.rxSilDetEnergy > lin_thres)
00232     inst->bidSilence.rxSilDetEnergy = lin_thres;
00233
00234   if ((inst->bidSilence.txSilDetEnergy < inst->bidSilence.threshold) &&
00235       (inst->bidSilence.rxSilDetEnergy < inst->bidSilence.threshold))
00236   {
00237     inst->bidSilence.cnt -= (inst->segment_size) >> piu_BIDIR_SILENCE_LOG2_FRAME_DECIMATION;  /* Since the
00238                                                           counter is decremented once every 4 samples */
00239
00240     if (inst->bidSilence.cnt <= 0)
00241     {
00242       /* disable the detection */
00243       inst->mode_bitfield &= (~piu_CTRL_BIT_BID_SILENCE_DET);
00244
00245       /* report detection */
00246       (*context->reportOutFcn) (inst->reportOutTargetInst,
00247                                 piu_BIDIR_SILENCE_DETECTED);
00248     }
00249   }
00250   else
00251     inst->bidSilence.cnt = inst->bidSilence.initCnt; /* re-initialize cntr */
00252 } /* piu_bid_silence_detect */
00253
00254 /*****************************************************************************
00255  * FUNCTION PURPOSE: Detect presence of specified pattern
00256  *****************************************************************************
00257  * DESCRIPTION: If the specified pattern is present on the PCM interface, for
00258  *              specified duration of time, the detection message will be sent.
00259  *
00260  * void piu_pcm_pattern_detect (
00261  *   piuInst_t *inst,   - instance structure
00262  *   tint *pcm_in)      - subsegment of input samples
00263  *
00264  ****************************************************************************/
00265
00266 void piu_pcm_pattern_detect (piuInst_t *inst, tint *pcm_in)
00267 {
00268   piuPcmPatternDetect_t *pcmPattern    = &inst->pcmPattern;
00269   piuContext_t          *context       = &piuContext;
00270   tbool                  patternPresent = TRUE;
00271   tuint                 pattern1, pattern2,pattern3;
00272   tint                  i, sample;
00273
00274   if (pcmPattern->type == piu_PCM_PATTERN_E1) {
00275     /* E1 patterns */
00276     pattern1 = 0x54; pattern2 = 0xD4; pattern3 = 0xD5;
00277   }
00278   else {
00279     if (pcmPattern->type == piu_PCM_PATTERN_CUSTOM){
00280       /* patterns defined by user */
00281       pattern1 = pattern2 = pattern3 = pcmPattern->custom;
00282     }
00283     else if (pcmPattern->type == piu_PCM_PATTERN_T1) {
00284       /* T1 patterns */
00285       pattern1 = pattern2 = pattern3 = 0x7f;
00286     }
00287     else patternPresent = FALSE;
00288     for (i = 0; i < inst->segment_size; i++) {
00289       sample = pcm_in[i] & 0xFF;
00290       if ((sample != pattern1) && (sample != pattern2) && (sample != pattern3))
00291         patternPresent = FALSE;
00292     }
00293   }
00294   if (patternPresent) {
00295     pcmPattern->cnt -= inst->segment_size;
00296     if (pcmPattern->cnt <= 0)
00297     {
00298       inst->mode_bitfield &= (~piu_CTRL_BIT_PATTERN_DETECT);
00299       /* report detection if the pattern appears consecutively for
00300          the configured length */
00301       (*context->reportOutFcn) (inst->reportOutTargetInst, piu_PATTERN_DETECTED);
00302     }
00303   }
00304   else /* pattern is not present consecutively, re-initialize cntr */
00305     pcmPattern->cnt = (pcmPattern->initCnt*8);
00306 } /* piu_pcm_pattern_detect */
00307
00308 /*****************************************************************************
00309  * FUNCTION PURPOSE: Generate specified pattern
00310  *****************************************************************************
00311  * DESCRIPTION: Generate specified pattern.
00312  *
00313  * void piu_pcm_pattern_generate (
00314  *   piuInst_t *inst)   - instance structure
00315  *
00316  ****************************************************************************/
00317
00318 void piu_pcm_pattern_generate (piuInst_t *inst)
00319 {
00320   int i;
00321
00322   if ((inst->pcm_format == piu_COMP_ULAW)||(inst->pcm_format == piu_COMP_ALAW)){
00323     /* generate 8 bit patterns and pack them to 16 bit */
00324     for(i=0; i < inst->segment_size; i+=2) {
00325       inst->receive_in_buf.in_ptr[i]  =(tint)((inst->generatePattern>>8)&0x00ff);
00326       inst->receive_in_buf.in_ptr[i+1]=(tint)(inst->generatePattern & 0x00ff);
00327     }
00328   }
00329   else {
00330     /* generate 16 bit patterns */
00331     utlLsMemSet (inst->receive_in_buf.in_ptr, (tint) (inst->generatePattern),
00332                  inst->segment_size );
00333   }
00334   piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00335 } /* piu_pcm_pattern_generate */
00336
00337 /******************************************************************************
00338  * FUNCTION PURPOSE : Write speech samples to PIU receive-in buffer for playout
00339  ******************************************************************************
00340  * DESCRIPTION : This function writes a segment of voice samples into the
00341  * PIU receive-in buffer.
00342  *
00343  *   void piuReceiveIn (
00344  *     void      *piuInst,        - A pointer to PIU instance
00345  *     linSample *speech_samples) - A pointer to a segment of voice samples
00346  *
00347  *****************************************************************************/
00348 void piuReceiveIn ( void *piuInst, void *speech_samples )
00349 {
00350   piuInst_t *inst          = (piuInst_t *) piuInst;
00351   linSample *voice_samples = (linSample *) speech_samples;
00352   tuint segment_rxcount;
00353
00354   if (inst->state != piu_OPEN)
00355     return;
00356   /* bypass if it is PCM loopback or do pattern generation */
00357   if(inst->mode_bitfield & (piu_CTRL_BIT_DO_PCM_LOOPBACK|
00358      piu_CTRL_BIT_PATTERN_GENERATE))
00359     return;
00360
00361   PIU_BEGIN_CRITICAL_SECTION();
00362
00363   /* Triple or double buffering ? */
00364   segment_rxcount =
00365     (inst->mode_bitfield & piu_CTRL_BIT_TRIPLE_RX_BUF ? piu_NUMSEGM_RX3 : piu_NUMSEGM_RX2);
00366
00367   /* check for overflow into buffers by RxIn */
00368   if (inst->receive_in_buf.segment_count >= segment_rxcount - 1)
00369   {
00370     inst->rx_overflow_cnt++;
00371     goto EXIT;
00372   }
00373   /* energy and DC level measurement for samples toward TDM */
00374   piu_frame_energy (inst->segment_size, voice_samples, &inst->energy_DClevel.rxEnergy);
00375   piu_frame_DClevel(inst->segment_size, voice_samples, &inst->energy_DClevel.rxDClevel);
00376   if (inst->mode_bitfield & piu_CTRL_BIT_BID_SILENCE_DET) {
00377     piu_frame_energy (inst->segment_size, voice_samples,
00378                       &inst->bidSilence.rxSilDetEnergy);
00379   }
00380   /* compress the voice samples and store them in the receive_in buffer */
00381   piu_pcm_compressing(inst, voice_samples, inst->receive_in_buf.in_ptr,
00382                       inst->segment_size);
00383
00384   /* buffer in-index update */
00385   piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00386
00387 EXIT:
00388   PIU_END_CRITICAL_SECTION();
00389 } /* piuReceiveIn */
00390
00391
00392 /*****************************************************************************
00393  * FUNCTION PURPOSE: PIU Processes
00394  *****************************************************************************
00395  * DESCRIPTION: PIU Processes.
00396  *
00397  * void piuTxRxProc (
00398  *    piuInst_t *inst,     - a pointer to PIU instance
00399  *    tint      *tx_ptr,   - a pointer to PIU send_out Buffer
00400  *    tint      *rx_ptr)   - a pointer to PIU receive_out Buffer
00401  *
00402  ****************************************************************************/
00403 void piuTxRxProc (void *piuInst, linSample *tx_ptr, linSample *rx_ptr)
00404 {
00405   piuInst_t    *inst    = (piuInst_t *) piuInst;
00406   piuContext_t *context = &piuContext;
00407   tint         *send_out_ptr, *linear_loopback_ptr;
00408   tuint ratio = sizeof(linSample)/sizeof(tword);
00409
00410 #if !PIUDLCOMP_ENABLE
00411   tint         *receive_out_ptr;
00412 #endif
00413
00414   if (inst->state != piu_OPEN) return ;
00415
00416   send_out_ptr    = (tint *)tx_ptr;
00417 #if !PIUDLCOMP_ENABLE
00418   receive_out_ptr = (tint *)rx_ptr;
00419 #endif
00420
00421   /* pattern generation if enabled */
00422   if(inst->mode_bitfield & piu_CTRL_BIT_PATTERN_GENERATE)
00423     piu_pcm_pattern_generate (inst);
00424
00425   /* PCM loopback processing */
00426   if (inst->mode_bitfield & piu_CTRL_BIT_DO_PCM_LOOPBACK) {
00427     /* tx PCM samples looped back to rx */
00428     utlCopy((tword *)send_out_ptr, (tword *)inst->receive_in_buf.in_ptr, ratio*inst->segment_size);
00429     piu_update_buf_ptr (inst, 0, &inst->receive_in_buf.in_ptr);
00430     if (inst->mode_bitfield & piu_CTRL_BIT_LOOPBACK_NOPASS) {
00431       memset (send_out_ptr, inst->silence_pattern, inst->segment_size);
00432     }
00433   }
00434   else if (inst->mode_bitfield & piu_CTRL_BIT_DO_LIN_LOOPBACK) {
00435     /* rx Linear samples looped back to tx */
00436     if (inst->receive_in_buf.in_ptr == inst->receive_in_buf.start_ptr)
00437       linear_loopback_ptr = inst->receive_in_buf.end_ptr - inst->segment_size;
00438     else
00439       linear_loopback_ptr = inst->receive_in_buf.in_ptr - inst->segment_size;
00440     utlCopy((tword *)linear_loopback_ptr, (tword *)send_out_ptr, ratio*inst->segment_size);
00441     if (inst->mode_bitfield & piu_CTRL_BIT_LOOPBACK_NOPASS) {
00442       memset (linear_loopback_ptr, inst->silence_pattern, inst->segment_size);
00443     }
00444   }
00445
00446   /* PCM Pattern Detection */
00447   if (inst->mode_bitfield&piu_CTRL_BIT_PATTERN_DETECT)
00448     piu_pcm_pattern_detect (inst, tx_ptr);
00449   /* 8 bit to 16 bit conversion */
00450   piu_pcm_companding(inst, send_out_ptr, send_out_ptr, inst->segment_size);
00451 #if !PIUDLCOMP_ENABLE
00452   if (inst->mode_bitfield & piu_CTRL_BIT_USE_RECV_OUT_BUF){
00453       piu_pcm_companding(inst, receive_out_ptr, receive_out_ptr,
00454                          inst->segment_size);
00455   }
00456 #endif
00457   /* energy and DC level measurement for samples from TDM */
00458   piu_frame_energy (inst->segment_size, tx_ptr, &inst->energy_DClevel.txEnergy);
00459
00460   if(!(inst->mode_bitfield & piu_CTRL_BIT_REMOVE_DC_COMP))
00461   {
00462     /* Measure DC level for Statistics */
00463     piu_frame_DClevel(inst->segment_size, tx_ptr, &inst->energy_DClevel.txDClevel);
00464   }
00465   else
00466   { /* Measure and remove DC component */
00467     if (inst->mode_bitfield & piu_CTRL_BIT_DC_FILTR_SELECT_MODE1)
00468     {
00469         /* Select Mode 1 alpha = 1/64 */
00470         piu_remove_dc_component(inst->segment_size, tx_ptr, &inst->energy_DClevel.txDClevel,
00471         piu_DC_FILTER_MODE1_MINUS_ALPHA_SHIFT);
00472     }
00473     else
00474     {
00475         /* Mode 2 for echo canceller alpha = 1/4 */
00476         piu_remove_dc_component(inst->segment_size, tx_ptr, &inst->energy_DClevel.txDClevel,
00477         piu_DC_FILTER_MODE2_MINUS_ALPHA_SHIFT);
00478     }
00479
00480   }
00481
00482  /* bid Silence Detection */
00483   if (inst->mode_bitfield&piu_CTRL_BIT_BID_SILENCE_DET) {
00484     piu_frame_energy (inst->segment_size, tx_ptr, &inst->bidSilence.txSilDetEnergy);
00485     piu_bid_silence_detect (inst);
00486   }
00487
00488 #if 0 /* remove the underrun report for now */
00489   /* report underrun as error indication */
00490   if ((inst->mode_bitfield&piu_CTRL_BIT_RECV_IN_BUF_EMPTY)&&
00491       (inst->mode_bitfield&piu_CTRL_BIT_UNDERRUN_REPORT))
00492     (*context->reportOutFcn)(inst->reportOutTargetInst, piu_UNDERRUN);
00493 #endif
00494
00495   /* call send-out function */
00496   (*context->sendOutProcFcn)(inst->sendOutProcTargetInst, (void *)tx_ptr, (void *) rx_ptr,
00497                              piu_TX_TASK_ID);
00498 } /* piuTxRxProc */
00499 /* nothing past this point */


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 87 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 102 of file siu.c.

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

Definition at line 118 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 130 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 135 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 142 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 173 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 89 of file siu.c.

Referenced by siuCAlloc(), siuInit(), and siuVAlloc().

siuInst_t siuInst[SIU_MAX_CHANNELS]

Definition at line 90 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 92 of file siu.c.

Referenced by siuDebugInternal().

char siu_dbg_message[SIU_DBGMSG_SIZE]

Definition at line 93 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *
00012  *              All rights reserved not granted herein.
00013  *
00014  *                         Limited License.
00015  *
00016  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00017  *  non-exclusive license under copyrights and patents it now or hereafter owns
00018  *  or controls to make, have made, use, import, offer to sell and sell
00019  *  ("Utilize") this software subject to the terms herein.  With respect to the
00020  *  foregoing patent license, such license is granted solely to the extent that
00021  *  any such patent is necessary to Utilize the software alone.  The patent
00022  *  license shall not apply to any combinations which include this software,
00023  *  other than combinations with devices manufactured by or for TI (“TI
00024  *  Devices”).  No hardware patent is licensed hereunder.
00025  *
00026  *  Redistributions must preserve existing copyright notices and reproduce this
00027  *  license (including the above copyright notice and the disclaimer and (if
00028  *  applicable) source code license limitations below) in the documentation
00029  *  and/or other materials provided with the distribution
00030  *
00031  *  Redistribution and use in binary form, without modification, are permitted
00032  *  provided that the following conditions are met:
00033  *
00034  *    *  No reverse engineering, decompilation, or disassembly of this software
00035  *  is permitted with respect to any software provided in binary form.
00036  *
00037  *    *  any redistribution and use are licensed by TI for use only with TI
00038  *  Devices.
00039  *
00040  *    *  Nothing shall obligate TI to provide you with source code for the
00041  *  software licensed and provided to you in object code.
00042  *
00043  *  If software source code is provided to you, modification and redistribution
00044  *  of the source code are permitted provided that the following conditions are
00045  *  met:
00046  *
00047  *    *  any redistribution and use of the source code, including any resulting
00048  *  derivative works, are licensed by TI for use only with TI Devices.
00049  *
00050  *    *  any redistribution and use of any object code compiled from the source
00051  *  code and any resulting derivative works, are licensed by TI for use only
00052  *  with TI Devices.
00053  *
00054  *  Neither the name of Texas Instruments Incorporated nor the names of its
00055  *  suppliers may be used to endorse or promote products derived from this
00056  *  software without specific prior written permission.
00057  *
00058  *  DISCLAIMER.
00059  *
00060  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00061  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00062  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00063  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00064  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00065  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00066  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00067  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00068  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00069  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00070  *  DAMAGE.
00071  *****************************************************************************/
00072
00073 /* #include <math.h> */     /* used for cosine initialization only */
00074 #include <stdlib.h>
00075 #include <string.h>
00076
00077 #include <ti/mas/types/types.h>
00078 #include <ti/mas/fract/fract.h>
00079 #include <ti/mas/util/debug.h>
00080
00081 /* SIU header files */
00082 #include <ti/mas/ecu/test/src/siu.h>
00083 #include <ti/mas/ecu/test/src/siuloc.h>
00084 #include <ti/mas/ecu/test/src/siuport.h>
00085
00086 /* Endless loop */
00087 #define loop      for(;;)
00088
00089 siuContext_t  siuContext;                 /* SIU Global Context */
00090 siuInst_t     siuInst[SIU_MAX_CHANNELS];  /* SIU instance structures */
00091
00092 tuint siu_dbg_id;     /* debug ID used in debug and exception functions */
00093 char siu_dbg_message[SIU_DBGMSG_SIZE];    /* debug message */
00094
00095 /******************************************************************************
00096  * FUNCTION PURPOSE: Debug & exception functions.
00097  ******************************************************************************
00098  * DESCRIPTION: Debug & exception functions.
00099  *
00100  *****************************************************************************/
00101
00102 static inline void siu_tuint_to_hex (char *dest, tuint val)
00103 {
00104   tint i;
00105
00106   dest[4] = 0; /* Null terminate */
00107
00108   for (i=3; i>=0; i--) {
00109     dest[i] = (val & 0xF);
00110     if (dest[i] > 9)
00111       dest[i] += 'A' - 10;
00112     else
00113       dest[i] += '0';
00114     val >>= 4;
00115   }
00116 }
00117
00118 static inline void siuDebugInternal (tuint id, char *str)
00119 {
00120   int i;
00121   char *src, *dst;
00122
00123   /* Copy id and message in a safe place */
00124   siu_dbg_id = id;
00125   src = str; dst = (char*)&siu_dbg_message[0];
00126   for (i = 0; i < SIU_DBGMSG_SIZE; i++)
00127     *dst++ = *src++;
00128 } /* siuDebugInternal */
00129
00130 void siuDebug (tuint id, char *s)
00131 {
00132   siuDebugInternal (id, s);
00133 } /* siuDebug */
00134
00135 void siuException (tuint id, char *s)
00136 {
00137   siuDebugInternal (id, s);
00138
00139   loop;     /* loop forever */
00140 } /* siuException */
00141
00142 void siuDebugInfo (tuint id, tuint type, tuint code, tuint len, tuint *data)
00143 {
00144   char exc_string[25];
00145
00146   /* Convert message code to a string -- call SIU exception handler */
00147   strcpy (exc_string, "Exception 0x");
00148
00149   /* Tack exception code after previous string */
00150   siu_tuint_to_hex (exc_string+12, ((id & 0xFF00) << 2) | (code & 0x3FF));
00151
00152   switch (type)
00153   {
00154     case dbg_EXCEPTION_FATAL:
00155       siuException (id, exc_string);
00156       break;
00157     case dbg_TRACE_INFO:
00158       /* Post debug trace to debug task */
00159       siuDebug (id, exc_string);
00160       break;
00161     default:
00162       break;  /* Ignore invalid message types */
00163   }
00164 }
00165
00166 /******************************************************************************
00167  * FUNCTION PURPOSE: SIU Initialization Function.
00168  ******************************************************************************
00169  * DESCRIPTION: Initializes SIU Global Context and all SIU channel instances.
00170  *
00171  *****************************************************************************/
00172
00173 tint siuInit (siuConfig_t *cfg)
00174 {
00175   int i;
00176
00177   /* Initialize global context */
00178   siuContext.ID           = cfg->ID;        /* has SIU MID and 0 for chnum */
00179   siuContext.exception    = cfg->exception;
00180   siuContext.debug        = cfg->debug;
00181   siuContext.cheap        = cfg->core_heap;
00182   siuContext.cheap_used   = 0;
00183   siuContext.vheap        = cfg->voice_heap;
00184   siuContext.vheap_used   = 0;
00185   /* here we could place some siuContext.magic = SIU_CONFIGURED as
00186    * magic number to verify SIU is configured when necessary. */
00187
00188   /* Initialize instances for all channels and "make" them "closed" */
00189   for (i = 0; i < SIU_MAX_CHANNELS; i++) {
00190     siuInst[i].ID                 = siuMakeID (SIU_MID_SIU, i+1);
00191     siuInst[i].exception          = siuContext.exception;
00192     siuInst[i].debug              = siuContext.debug;
00193     siuInst[i].cheap_used         = 0;
00194     siuInst[i].vheap_used         = 0;
00195     siuInst[i].companding_law     = cfg->companding_law;  /* default companding */
00196     siuInst[i].pcm_bits           = cfg->pcm_bits;
00197     siuInst[i].piuInst            = NULL;
00198     siuInst[i].ecuInst            = NULL;
00199   siuInst[i].slmInst            = NULL;
00200
00201     /* Tx Task Part */
00202     siuInst[i].TxInst.enabled               = FALSE;
00203     siuInst[i].TxInst.send_frame_length     = 0;
00204     siuInst[i].TxInst.recv_frame_length     = 0;
00205     siuInst[i].TxInst.send_frame_ptr        = NULL;
00206     siuInst[i].TxInst.recv_frame_ptr        = NULL;
00207     siuInst[i].TxInst.TxSendOut.fcn         = NULL;
00208     siuInst[i].TxInst.TxSendOut.targetInst  = NULL;
00209   }
00210   return(SIU_NOERR);
00211 } /* siuInit */
00212 /* 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 104 of file siu.h.

Function Documentation

tint siuInit ( siuConfig_t * cfg )

Definition at line 173 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 142 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 162 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 1018 of file ecusimfunc.c.

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

Definition at line 1029 of file ecusimfunc.c.

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

Definition at line 1041 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 984 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00039  *
00040  *              All rights reserved not granted herein.
00041  *
00042  *                         Limited License.
00043  *
00044  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00045  *  non-exclusive license under copyrights and patents it now or hereafter owns
00046  *  or controls to make, have made, use, import, offer to sell and sell
00047  *  ("Utilize") this software subject to the terms herein.  With respect to the
00048  *  foregoing patent license, such license is granted solely to the extent that
00049  *  any such patent is necessary to Utilize the software alone.  The patent
00050  *  license shall not apply to any combinations which include this software,
00051  *  other than combinations with devices manufactured by or for TI (“TI
00052  *  Devices”).  No hardware patent is licensed hereunder.
00053  *
00054  *  Redistributions must preserve existing copyright notices and reproduce this
00055  *  license (including the above copyright notice and the disclaimer and (if
00056  *  applicable) source code license limitations below) in the documentation
00057  *  and/or other materials provided with the distribution
00058  *
00059  *  Redistribution and use in binary form, without modification, are permitted
00060  *  provided that the following conditions are met:
00061  *
00062  *    *  No reverse engineering, decompilation, or disassembly of this software
00063  *  is permitted with respect to any software provided in binary form.
00064  *
00065  *    *  any redistribution and use are licensed by TI for use only with TI
00066  *  Devices.
00067  *
00068  *    *  Nothing shall obligate TI to provide you with source code for the
00069  *  software licensed and provided to you in object code.
00070  *
00071  *  If software source code is provided to you, modification and redistribution
00072  *  of the source code are permitted provided that the following conditions are
00073  *  met:
00074  *
00075  *    *  any redistribution and use of the source code, including any resulting
00076  *  derivative works, are licensed by TI for use only with TI Devices.
00077  *
00078  *    *  any redistribution and use of any object code compiled from the source
00079  *  code and any resulting derivative works, are licensed by TI for use only
00080  *  with TI Devices.
00081  *
00082  *  Neither the name of Texas Instruments Incorporated nor the names of its
00083  *  suppliers may be used to endorse or promote products derived from this
00084  *  software without specific prior written permission.
00085  *
00086  *  DISCLAIMER.
00087  *
00088  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00089  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00090  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00091  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00092  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00093  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00094  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00095  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00096  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00097  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00098  *  DAMAGE.
00099  *****************************************************************************/
00100
00101 #include <ti/mas/types/types.h>
00102
00103 /* SIU Error codes */
00104 enum {
00105   SIU_NOERR = 0,
00106   SIU_ERROR = -1
00107 };
00108
00109 /******************************************************************************
00110  * DATA DEFINITION: SIU Configuration Structure.
00111  ******************************************************************************
00112  * DESCRIPTION: Used when configuring SIU module.
00113  *
00114  *****************************************************************************/
00115
00116 typedef struct {
00117   tuint ID;                                 /* Module ID with chnum = 0 */
00118   void  (*exception)(tuint id, char *str);  /* master exception function */
00119   void  (*debug)(tuint id, char *str);      /* master debug function */
00120   tint  companding_law;   /* Provides information on which type of companding
00121                            *  is used before linear samples are obtained. Valid
00122                            *  values are CONST_COMP_ALAW_8, CONST_COMP_MULAW_8,
00123                            *  CONST_COMP_LINEAR (no companding). Invalid value
00124                            *  indicates 8-bit transparent mode. */
00125   tint  pcm_bits;         /* # bits in a PCM sample (8 for u-law, A-law, and
00126                            *  transparent mode, [1,16] range for linear). */
00127   void  *core_heap;       /* Core heap handle */
00128   void  *voice_heap;      /* Voice heap handle */
00129 } siuConfig_t;
00130
00131 /******************************************************************************
00132  * DATA DEFINITION: SIU Tx Task Send Out Object.
00133  ******************************************************************************
00134  * DESCRIPTION: Transmit task send-out object description. Current
00135  *              implementation takes send-in and receive-in frame like in
00136  *              the case of ECU.
00137  *
00138  *****************************************************************************/
00139
00140 typedef struct {
00141   void (*fcn) (void *targetInst, void *send_frame, void *recv_frame,
00142                void *send_out_frame);
00143   void *targetInst;   /* instance of the target object which owns the fcn */
00144 } siuTxSendOut_t;
00145
00146 /******************************************************************************
00147  * DATA DEFINITION: SIU Tx Task Configuration Structure.
00148  ******************************************************************************
00149  * DESCRIPTION: Used when configuring SIU Tx Task with siuTxOpen().
00150  *
00151  *****************************************************************************/
00152
00153 typedef struct {
00154   tint            send_frame_length;    /* send frame length in samples */
00155   tint            recv_frame_length;    /* receive frame length in samples */
00156   siuTxSendOut_t  TxSendOut;            /* Tx Send-out object description */
00157 } siuTxConfig_t;
00158
00159 /* External function prototypes */
00160 /* siu.c */
00161 tint siuInit (siuConfig_t *cfg);
00162
00163 /* siutx.c */
00164 void siuTxOpen   (void *siuInst, siuTxConfig_t *cfg);
00165 void siuTxSendIn (void *siuInst, void *send_frame, void *recv_frame, tint queue_id);
00166
00167 /* ecusim.c */
00168 void siuPiuReport     (void *siuInst, tint report_code);
00169 void siuPcmSampleTrace(tint chnum, tint pcm_size, void *pcm_in, tuint dir);
00170 void siuTxRxSendIn    (void *siuInst, void *send_frame, void *recv_frame, tint queue_id);
00171 void siuDebugInfoNew  (tuint moduleID, tuint msgType, tuint messageCode,
00172                        tuint msgLength, tuint *messageData);
00173 #endif /* _SIU_H */
00174 /* 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 81 of file siuloc.h.

Referenced by main(), siu_new_ecu(), siu_new_piu(), and siuInit().

#define _SIUSTR ( x ) __SIUSTR(x)

Definition at line 87 of file siuloc.h.

#define __SIUSTR ( x ) #x

Definition at line 88 of file siuloc.h.

#define siu_exc_assert | ( | expr,
 |  | inst | )

Value:

{                     \
  ((expr) ? ((void)0) :                             \
            (*(inst)->exception)((inst)->ID,        \
              __FILE__ "(" _SIUSTR(__LINE__) ")")); \
}

Definition at line 90 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 97 of file siuloc.h.

#define SIU_DEBUG_INFO 0

Definition at line 202 of file siuloc.h.

#define SIU_DEBUG_WARNING 1

Definition at line 203 of file siuloc.h.

#define SIU_DEBUG_FATAL 2

Definition at line 204 of file siuloc.h.

Referenced by siuDebugInfoNew().

Function Documentation

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

Definition at line 130 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 135 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 142 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 106 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 176 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 217 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 220 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 237 of file siuloc.h.

References siuContext, and siuContext_t::vheap.

Referenced by siu_new_ecu().

Variable Documentation

siuContext_t siuContext

Definition at line 89 of file siu.c.

Referenced by siuCAlloc(), siuInit(), and siuVAlloc().

siuInst_t siuInst[]

Definition at line 90 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00013  *
00014  *              All rights reserved not granted herein.
00015  *
00016  *                         Limited License.
00017  *
00018  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00019  *  non-exclusive license under copyrights and patents it now or hereafter owns
00020  *  or controls to make, have made, use, import, offer to sell and sell
00021  *  ("Utilize") this software subject to the terms herein.  With respect to the
00022  *  foregoing patent license, such license is granted solely to the extent that
00023  *  any such patent is necessary to Utilize the software alone.  The patent
00024  *  license shall not apply to any combinations which include this software,
00025  *  other than combinations with devices manufactured by or for TI (“TI
00026  *  Devices”).  No hardware patent is licensed hereunder.
00027  *
00028  *  Redistributions must preserve existing copyright notices and reproduce this
00029  *  license (including the above copyright notice and the disclaimer and (if
00030  *  applicable) source code license limitations below) in the documentation
00031  *  and/or other materials provided with the distribution
00032  *
00033  *  Redistribution and use in binary form, without modification, are permitted
00034  *  provided that the following conditions are met:
00035  *
00036  *    *  No reverse engineering, decompilation, or disassembly of this software
00037  *  is permitted with respect to any software provided in binary form.
00038  *
00039  *    *  any redistribution and use are licensed by TI for use only with TI
00040  *  Devices.
00041  *
00042  *    *  Nothing shall obligate TI to provide you with source code for the
00043  *  software licensed and provided to you in object code.
00044  *
00045  *  If software source code is provided to you, modification and redistribution
00046  *  of the source code are permitted provided that the following conditions are
00047  *  met:
00048  *
00049  *    *  any redistribution and use of the source code, including any resulting
00050  *  derivative works, are licensed by TI for use only with TI Devices.
00051  *
00052  *    *  any redistribution and use of any object code compiled from the source
00053  *  code and any resulting derivative works, are licensed by TI for use only
00054  *  with TI Devices.
00055  *
00056  *  Neither the name of Texas Instruments Incorporated nor the names of its
00057  *  suppliers may be used to endorse or promote products derived from this
00058  *  software without specific prior written permission.
00059  *
00060  *  DISCLAIMER.
00061  *
00062  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00063  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00064  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00065  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00066  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00067  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00068  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00069  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00070  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00071  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00072  *  DAMAGE.
00073  *****************************************************************************/
00074
00075 #include <ti/mas/types/types.h>
00076 #include <ti/mas/mhm/mhm.h>          /* required for siuXAlloc() */
00077 #include <ti/mas/ecu/test/src/siu.h> /* required for siuTxSendOut_t */
00078 #include <ti/mas/ecu/test/src/siuport.h>    /* required for SIU_TEC_ENABLE */
00079
00080 /* Useful macros */
00081 #define siuMakeID(mid,chnum)    ((tuint)(mid)<<8|(tuint)(chnum))
00082
00083 /*----------------------------*/
00084 /* Exception and Debug Macros */
00085 /*----------------------------*/
00086
00087 #define _SIUSTR(x)   __SIUSTR(x)
00088 #define __SIUSTR(x)  #x
00089 /* Assert macro for the exceptions */
00090 #define siu_exc_assert(expr,inst) {                     \
00091   ((expr) ? ((void)0) :                             \
00092             (*(inst)->exception)((inst)->ID,        \
00093               __FILE__ "(" _SIUSTR(__LINE__) ")")); \
00094 }
00095
00096 /* Debug macro  */
00097 #define siu_dbg_out(inst,s) {  (*(inst)->debug)((inst)->ID,(s));  }
00098
00099 /******************************************************************************
00100  * DATA DEFINITION: SIU Global Context.
00101  ******************************************************************************
00102  * DESCRIPTION: Contains state information for SIU module.
00103  *
00104  *****************************************************************************/
00105
00106 typedef struct {
00107   tuint   ID;                                 /* SIU Module ID (initialized in
00108                                                *  siuInit() */
00109   void    (*exception)(tuint id, char *str);  /* master exception function
00110                                                *  (initialized in siuInit() */
00111   void    (*debug)(tuint id, char *str);      /* master debug function
00112                                                *  (initialized in siuInit() */
00113   tuint    cheap_used;   /* # words of core heap used outside siuInst_t */
00114   void    *cheap;       /* core heap handle */
00115   tuint    vheap_used;   /* # words of voice heap used outside siuInst_t */
00116   void    *vheap;       /* voice heap handle */
00117 } siuContext_t;
00118
00119 /******************************************************************************
00120  * DATA DEFINITION: SIU Tx Task Instance.
00121  ******************************************************************************
00122  * DESCRIPTION: Transmit task instance.
00123  *
00124  *****************************************************************************/
00125
00126 typedef struct {
00127   tbool           enabled;              /* TRUE: task works, FALSE: doesn't */
00128   tint            send_frame_length;    /* # samples in send frame */
00129   tint            recv_frame_length;    /* # samples in receive frame */
00130   linSample       *send_frame_ptr;      /* a pointer to send frame */
00131   linSample       *recv_frame_ptr;      /* a pointer to receive frame */
00132   siuTxSendOut_t  TxSendOut;            /* send-out object */
00133 } siuTxInst_t;
00134
00135 /******************************************************************************
00136  * DATA DEFINITION: SIU Signal Limiter Instance.
00137  ******************************************************************************
00138  * DESCRIPTION: Signal Limiter instance.
00139  *
00140  *****************************************************************************/
00141
00142 typedef struct {
00143   tint              mode;           /* SPAD operation mode, see siuspad.c */
00144   tint              thresh_idx;     /* current limiter threshold index */
00145   tint              sign;           /* the sign of limiter threshold */
00146 } siuSlimInst_t;
00147
00148 /******************************************************************************
00149  * DATA DEFINITION: SIU Instance.
00150  ******************************************************************************
00151  * DESCRIPTION: Contains state information for one SIU channel.
00152  *
00153  *****************************************************************************/
00154
00155 typedef struct {
00156   tuint ID;                                 /* instance ID (initialized in
00157                                              *  siuInit() */
00158   void  (*exception)(tuint id, char *str);  /* exception function (initialized
00159                                              *  in siuInit() */
00160   void  (*debug)(tuint id, char *str);      /* debug function (initialized
00161                                              *  in siuInit() */
00162   /* Channel information */
00163   siuTxInst_t   TxInst;   /* Tx Task Instance */
00164   void         *slmInst;  /* Signal limiter Instance */
00165   tuint  cheap_used;      /* # words allocated from core heap on this channel */
00166   tuint  vheap_used;      /* # words allocated from voice heap on this channel */
00167   tint  companding_law;   /* Provides information on which type of companding
00168                            *  is used before linear samples are obtained. Valid
00169                            *  values are CONST_COMP_ALAW_8, CONST_COMP_MULAW_8,
00170                            *  CONST_COMP_LINEAR (no companding, the number of
00171                            *  bits in a linear sample has to be provided
00172                            *  somewhere.) Refers to physical I/O used. */
00173   tint  pcm_bits;         /* # of bits in a PCM sample. (8 for u-law, A-law,
00174                            *  and transparent mode, [1,16] range for linear) */
00175   void  *piuInst;         /* a pointer to PIU instance */
00176 #if SIU_TEC_ENABLE
00177   void  *tecInst;         /* a pointer to the TEC instance */
00178 #else
00179   void  *ecuInst;         /* a pointer to the ECU instance */
00180 #endif
00181 } siuInst_t;
00182
00183 /* External references local to SIU */
00184 extern siuContext_t siuContext;         /* SIU Global Context (siu.c) */
00185 extern siuInst_t    siuInst[];          /* SIU instances (siu.c) */
00186
00187 /* External functions local to SIU (siu.c) */
00188 void siuDebug      (tuint id, char *s);
00189 void siuException  (tuint id, char *s);
00190 void siuDebugInfo  (tuint id, tuint type, tuint code, tuint len, tuint *data);
00191
00192 /* siumgr.c */
00193 void siu_new_piu  (tint chnum, tint max_frame_length);
00194 void siu_open_piu (tint chnum, tint frame_size);
00195 void siu_open_tx  (tint chnum, tint frame_size);
00196
00197 /* siuslimnum.c/.s */
00198 void siu_spad_process (linSample *speech_samples, tint *thresh_idx_p, tint *sign_p,
00199                        tint frame_length, const linSample *siu_spad_tbl);
00200
00201 /* Debug report levels */
00202 #define SIU_DEBUG_INFO         0    /* Passing debug information */
00203 #define SIU_DEBUG_WARNING      1    /* Warning message */
00204 #define SIU_DEBUG_FATAL        2    /* Fatal message. Report to MICRO and                                     * go to infinite loop. */
00205
00206 /* A few memory allocation static inline functions */
00207
00208 /******************************************************************************
00209  * FUNCTION PURPOSE: Allocate memory block from the core heap.
00210  ******************************************************************************
00211  * DESCRIPTION: Allocates a memory block from the core heap.
00212  *
00213  *    static inline void *siuCAlloc (
00214  *      tuint size)      - number of words to allocate
00215  *
00216  *    Return value: memory block base address of NULL upon error.
00217  *
00218  *****************************************************************************/
00219
00220 static inline void *siuCAlloc (tuint size)
00221 {
00222   return (mhmAlloc (siuContext.cheap, size));
00223 } /* siuCAlloc */
00224
00225 /******************************************************************************
00226  * FUNCTION PURPOSE: Allocate memory block from the voice heap.
00227  ******************************************************************************
00228  * DESCRIPTION: Allocates a memory block from the voice heap.
00229  *
00230  *    static inline void *siuVAlloc (
00231  *      tuint size)      - number of words to allocate
00232  *
00233  *    Return value: memory block base address of NULL upon error.
00234  *
00235  *****************************************************************************/
00236
00237 static inline void *siuVAlloc (tuint size)
00238 {
00239   return (mhmAlloc (siuContext.vheap, size));
00240 } /* siuVAlloc */
00241 #endif  /* _SIULOC_H */
00242 /* 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 106 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 176 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 217 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00013  *
00014  *              All rights reserved not granted herein.
00015  *
00016  *                         Limited License.
00017  *
00018  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00019  *  non-exclusive license under copyrights and patents it now or hereafter owns
00020  *  or controls to make, have made, use, import, offer to sell and sell
00021  *  ("Utilize") this software subject to the terms herein.  With respect to the
00022  *  foregoing patent license, such license is granted solely to the extent that
00023  *  any such patent is necessary to Utilize the software alone.  The patent
00024  *  license shall not apply to any combinations which include this software,
00025  *  other than combinations with devices manufactured by or for TI (“TI
00026  *  Devices”).  No hardware patent is licensed hereunder.
00027  *
00028  *  Redistributions must preserve existing copyright notices and reproduce this
00029  *  license (including the above copyright notice and the disclaimer and (if
00030  *  applicable) source code license limitations below) in the documentation
00031  *  and/or other materials provided with the distribution
00032  *
00033  *  Redistribution and use in binary form, without modification, are permitted
00034  *  provided that the following conditions are met:
00035  *
00036  *    *  No reverse engineering, decompilation, or disassembly of this software
00037  *  is permitted with respect to any software provided in binary form.
00038  *
00039  *    *  any redistribution and use are licensed by TI for use only with TI
00040  *  Devices.
00041  *
00042  *    *  Nothing shall obligate TI to provide you with source code for the
00043  *  software licensed and provided to you in object code.
00044  *
00045  *  If software source code is provided to you, modification and redistribution
00046  *  of the source code are permitted provided that the following conditions are
00047  *  met:
00048  *
00049  *    *  any redistribution and use of the source code, including any resulting
00050  *  derivative works, are licensed by TI for use only with TI Devices.
00051  *
00052  *    *  any redistribution and use of any object code compiled from the source
00053  *  code and any resulting derivative works, are licensed by TI for use only
00054  *  with TI Devices.
00055  *
00056  *  Neither the name of Texas Instruments Incorporated nor the names of its
00057  *  suppliers may be used to endorse or promote products derived from this
00058  *  software without specific prior written permission.
00059  *
00060  *  DISCLAIMER.
00061  *
00062  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00063  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00064  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00065  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00066  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00067  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00068  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00069  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00070  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00071  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00072  *  DAMAGE.
00073  *****************************************************************************/
00074
00075 #include <stdlib.h>
00076
00077 #include <ti/mas/types/types.h>
00078 #include <ti/mas/util/mua.h>
00079
00080 /* PIU related header files */
00081 #include <ti/mas/ecu/test/src/piu.h>
00082 /* SIU header files */
00083 #include <ti/mas/ecu/test/src/siu.h>
00084 #include <ti/mas/ecu/test/src/siuloc.h>
00085 #include <ti/mas/ecu/test/src/siuport.h>
00086 /* ECU files */
00087 #include <ti/mas/ecu/ecu.h>
00088
00089
00090 /******************************************************************************
00091  * FUNCTION PURPOSE: Create PIU module.
00092  ******************************************************************************
00093  * DESCRIPTION: Obtains info on PIU buffers, and creates one instance of PIU.
00094  *
00095  *              NOTE: Should save number of buffers and buffer descriptors
00096  *                    in order to make delete possible.
00097  *
00098  *  void siu_new_piu (
00099  *    tint chnum,             - channel number (1 to SIU_MAX_CHANNELS)
00100  *    tint max_frame_length)  - maximum # samples in the frame (must be
00101  *                              greater than or equal to maximum sub-segment
00102  *                              size)
00103  *
00104  *****************************************************************************/
00105
00106 void siu_new_piu (tint chnum, tint max_frame_length)
00107 {
00108   int i;
00109   tint stat, piuNbufs;
00110
00111   const ecomemBuffer_t *bufs;
00112   ecomemBuffer_t    *piuBufs;
00113   piuSizeConfig_t   piuCfgSize;
00114   piuNewConfig_t    piuCfgNew;
00115
00116   siuInst_t *inst = &siuInst[chnum-1];
00117
00118   piuCfgSize.max_samples_per_segment = max_frame_length;  /* x-ms at 8kHz */
00119
00120   /* Default to triple buffering (delay is not added - just prevention from PIU
00121    * overflow/underflow) */
00122   piuCfgSize.rx_triple_buffering     = TRUE;
00123
00124   /* PIU get sizes */
00125   stat = piuGetSizes (&piuNbufs, &bufs, &piuCfgSize);
00126   siu_exc_assert (stat == piu_NOERR, inst);
00127
00128   piuBufs = (ecomemBuffer_t*)siuCAlloc (piuNbufs*sizeof(ecomemBuffer_t));
00129   inst->cheap_used += piuNbufs*sizeof(ecomemBuffer_t);
00130   siu_exc_assert (piuBufs != NULL, inst);
00131
00132   /* assume all buffers are in external memory, no alignment requests */
00133   for (i = 0; i < piuNbufs; i++) {
00134     piuBufs[i]        = bufs[i];
00135     piuBufs[i].volat  = FALSE;
00136     piuBufs[i].base   = siuCAlloc (bufs[i].size);
00137     inst->cheap_used += bufs[i].size;
00138     siu_exc_assert (piuBufs[i].base != NULL, inst);
00139   }
00140   /* inst->piuBufs  =...
00141    * inst->piuNbufs =...  NOTE: needs it to delete VCU one day. */
00142
00143   /* piuNew */
00144   piuCfgNew.ID                      = siuMakeID (SIU_MID_PIU, chnum);
00145   piuCfgNew.context.max_pcm_val     = mua_TBL_MAX_PCM_VAL;
00146   piuCfgNew.context.debugInfo       = (dbgInfo_t)(siuDebugInfoNew);
00147   piuCfgNew.context.sendOutProcFcn  = siuTxSendIn;
00148   piuCfgNew.context.sendOutIsrFcn   = siuTxRxSendIn;
00149   piuCfgNew.context.reportOutFcn    = siuPiuReport;
00150   piuCfgNew.context.pcmSampleTrace  = siuPcmSampleTrace;
00151   piuCfgNew.sizeCfg                 = piuCfgSize;
00152   stat = piuNew (&inst->piuInst, piuNbufs, piuBufs, &piuCfgNew);
00153   siu_exc_assert (stat == piu_NOERR, inst);
00154 } /* siu_new_piu */
00155
00156 /******************************************************************************
00157  * FUNCTION PURPOSE: Open PIU module.
00158  ******************************************************************************
00159  * DESCRIPTION: Opens one instance of PIU module.
00160  *
00161  *              NOTE: Currently, the frame_size is constrained to be
00162  *                    a whole number of segments. However, this is not
00163  *                    checked here. We rely on PIU to check it.
00164  *
00165  *                    Receive-out buffer is part of ECU and related
00166  *                    parameters should be taken from there!!!
00167  *
00168  *  void siu_open_piu (
00169  *    tint chnum,                 - channel number (1 to SIU_MAX_CHANNELS)
00170  *    tint segment_size,          - # samples in one PIU sub-segment
00171  *    tint frame_size)            - # samples in the frame (must be
00172  *                                  greater than or equal to sub-segment size)
00173  *
00174  *****************************************************************************/
00175
00176 void siu_open_piu (tint chnum, tint frame_size)
00177 {
00178   piuConfig_t piuCfg;
00179   siuInst_t *inst = &siuInst[chnum-1];
00180
00181   piuCfg.transp_mode      = FALSE;
00182   piuCfg.use_recv_out_buf = TRUE;
00183
00184   piuCfg.rx_delay                 = 0;    /* removes jitter in piuReceiveIn() */
00185   piuCfg.segment_size             = frame_size;
00186   piuCfg.sendOutProcTargetInst    = inst;
00187   piuCfg.sendOutIsrTargetInst     = inst;
00188   piuCfg.reportOutTargetInst      = inst;
00189   piuCfg.max_pcm_val              = mua_TBL_MAX_PCM_VAL;
00190   if (inst->companding_law == const_COMP_MULAW_8) {
00191     piuCfg.companding.law   = piu_COMP_ULAW;
00192     piuCfg.companding.pcm_expand_table = muaTblUlaw;
00193   }
00194   else if (inst->companding_law == const_COMP_ALAW_8) {
00195     piuCfg.companding.law   = piu_COMP_ALAW;
00196     piuCfg.companding.pcm_expand_table = muaTblAlaw;
00197   }
00198   else if (inst->companding_law == const_COMP_LINEAR) {
00199     piuCfg.companding.law   = piu_COMP_LINEAR;
00200     piuCfg.companding.pcm_expand_table = NULL;
00201   }
00202
00203   piuOpen (inst->piuInst, &piuCfg);
00204 } /* siu_open_piu */
00205
00206 /******************************************************************************
00207  * FUNCTION PURPOSE: Open Transmit Task for a channel of SIU.
00208  ******************************************************************************
00209  * DESCRIPTION: Opens transmit task for a channel of SIU.
00210  *
00211  *  void siu_open_tx (
00212  *    tint chnum,                 - channel number (1 to SIU_MAX_CHANNELS)
00213  *    tint frame_size)            - # samples in the frame
00214  *
00215  *****************************************************************************/
00216
00217 void siu_open_tx (tint chnum, tint frame_size)
00218 {
00219   siuTxConfig_t siuTxCfg;
00220   siuInst_t *inst = &siuInst[chnum-1];
00221
00222   siuTxCfg.send_frame_length    = frame_size;
00223   siuTxCfg.recv_frame_length    = frame_size;       /* same size for now */
00224 #if SIU_TEC_ENABLE
00225   siuTxCfg.TxSendOut.fcn        = NULL;             /* Not used */
00226   siuTxCfg.TxSendOut.targetInst = NULL;
00227 #else
00228   siuTxCfg.TxSendOut.fcn        = ecuSendIn;        /* send samples to ECU */
00229   siuTxCfg.TxSendOut.targetInst = inst->ecuInst;
00230 #endif
00231   siuTxOpen (inst, &siuTxCfg);
00232 } /* siu_open_tx */
00233 /* 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 79 of file siuport.h.

Referenced by siuInit().

#define SIU_MID_SIU 0x01

Definition at line 82 of file siuport.h.

Referenced by main(), and siuInit().

#define SIU_MID_VCU 0x02

Definition at line 83 of file siuport.h.

#define SIU_MID_VCA 0x03

Definition at line 84 of file siuport.h.

#define SIU_MID_PIU 0x04

Definition at line 85 of file siuport.h.

Referenced by siu_new_piu().

#define SIU_MID_ECU 0x05

Definition at line 86 of file siuport.h.

Referenced by siu_new_ecu().

#define SIU_DBGMSG_SIZE 256

Definition at line 88 of file siuport.h.

Referenced by siuDebugInternal().

#define SIU_ULAW_ZERO (0xFFFF)

Definition at line 90 of file siuport.h.

Referenced by siu_open_ecu().

#define SIU_ALAW_ZERO (0x55D5)

Definition at line 91 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00013  *
00014  *              All rights reserved not granted herein.
00015  *
00016  *                         Limited License.
00017  *
00018  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00019  *  non-exclusive license under copyrights and patents it now or hereafter owns
00020  *  or controls to make, have made, use, import, offer to sell and sell
00021  *  ("Utilize") this software subject to the terms herein.  With respect to the
00022  *  foregoing patent license, such license is granted solely to the extent that
00023  *  any such patent is necessary to Utilize the software alone.  The patent
00024  *  license shall not apply to any combinations which include this software,
00025  *  other than combinations with devices manufactured by or for TI (“TI
00026  *  Devices”).  No hardware patent is licensed hereunder.
00027  *
00028  *  Redistributions must preserve existing copyright notices and reproduce this
00029  *  license (including the above copyright notice and the disclaimer and (if
00030  *  applicable) source code license limitations below) in the documentation
00031  *  and/or other materials provided with the distribution
00032  *
00033  *  Redistribution and use in binary form, without modification, are permitted
00034  *  provided that the following conditions are met:
00035  *
00036  *    *  No reverse engineering, decompilation, or disassembly of this software
00037  *  is permitted with respect to any software provided in binary form.
00038  *
00039  *    *  any redistribution and use are licensed by TI for use only with TI
00040  *  Devices.
00041  *
00042  *    *  Nothing shall obligate TI to provide you with source code for the
00043  *  software licensed and provided to you in object code.
00044  *
00045  *  If software source code is provided to you, modification and redistribution
00046  *  of the source code are permitted provided that the following conditions are
00047  *  met:
00048  *
00049  *    *  any redistribution and use of the source code, including any resulting
00050  *  derivative works, are licensed by TI for use only with TI Devices.
00051  *
00052  *    *  any redistribution and use of any object code compiled from the source
00053  *  code and any resulting derivative works, are licensed by TI for use only
00054  *  with TI Devices.
00055  *
00056  *  Neither the name of Texas Instruments Incorporated nor the names of its
00057  *  suppliers may be used to endorse or promote products derived from this
00058  *  software without specific prior written permission.
00059  *
00060  *  DISCLAIMER.
00061  *
00062  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00063  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00064  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00065  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00066  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00067  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00068  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00069  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00070  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00071  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00072  *  DAMAGE.
00073  *****************************************************************************/
00074
00075 #include <ti/mas/types/const.h>
00076 #include <ti/mas/types/types.h>
00077 #include <ti/mas/ecu/test/src/ecusimport.h>
00078
00079 #define SIU_MAX_CHANNELS      1         /* Maximum number of SIU channels */
00080
00081 /* Module ID's */
00082 #define SIU_MID_SIU     0x01      /* SIU module */
00083 #define SIU_MID_VCU     0x02      /* VCU module */
00084 #define SIU_MID_VCA     0x03      /* VCA modules */
00085 #define SIU_MID_PIU     0x04      /* PIU module */
00086 #define SIU_MID_ECU     0x05      /* ECU module */
00087
00088 #define SIU_DBGMSG_SIZE   256     /* Size of debug message buffer */
00089
00090 #define SIU_ULAW_ZERO   (0xFFFF)  /* Ulaw 0 */
00091 #define SIU_ALAW_ZERO   (0x55D5)  /* Alaw 0 (really -8, 8) */
00092
00093 #endif  /* _SIUPORT_H */
00094 /* 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 83 of file siutx.c.

Function Documentation

static void siu_tx_execute ( siuInst_t * inst ) [inline, static]

Definition at line 87 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 107 of file siutx.c.

Referenced by siuTxMain().

static void siu_tx_wake_up ( siuInst_t * inst ) [inline, static]

Definition at line 112 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 125 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 142 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 162 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *
00012  *              All rights reserved not granted herein.
00013  *
00014  *                         Limited License.
00015  *
00016  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00017  *  non-exclusive license under copyrights and patents it now or hereafter owns
00018  *  or controls to make, have made, use, import, offer to sell and sell
00019  *  ("Utilize") this software subject to the terms herein.  With respect to the
00020  *  foregoing patent license, such license is granted solely to the extent that
00021  *  any such patent is necessary to Utilize the software alone.  The patent
00022  *  license shall not apply to any combinations which include this software,
00023  *  other than combinations with devices manufactured by or for TI (“TI
00024  *  Devices”).  No hardware patent is licensed hereunder.
00025  *
00026  *  Redistributions must preserve existing copyright notices and reproduce this
00027  *  license (including the above copyright notice and the disclaimer and (if
00028  *  applicable) source code license limitations below) in the documentation
00029  *  and/or other materials provided with the distribution
00030  *
00031  *  Redistribution and use in binary form, without modification, are permitted
00032  *  provided that the following conditions are met:
00033  *
00034  *    *  No reverse engineering, decompilation, or disassembly of this software
00035  *  is permitted with respect to any software provided in binary form.
00036  *
00037  *    *  any redistribution and use are licensed by TI for use only with TI
00038  *  Devices.
00039  *
00040  *    *  Nothing shall obligate TI to provide you with source code for the
00041  *  software licensed and provided to you in object code.
00042  *
00043  *  If software source code is provided to you, modification and redistribution
00044  *  of the source code are permitted provided that the following conditions are
00045  *  met:
00046  *
00047  *    *  any redistribution and use of the source code, including any resulting
00048  *  derivative works, are licensed by TI for use only with TI Devices.
00049  *
00050  *    *  any redistribution and use of any object code compiled from the source
00051  *  code and any resulting derivative works, are licensed by TI for use only
00052  *  with TI Devices.
00053  *
00054  *  Neither the name of Texas Instruments Incorporated nor the names of its
00055  *  suppliers may be used to endorse or promote products derived from this
00056  *  software without specific prior written permission.
00057  *
00058  *  DISCLAIMER.
00059  *
00060  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00061  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00062  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00063  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00064  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00065  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00066  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00067  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00068  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00069  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00070  *  DAMAGE.
00071  *****************************************************************************/
00072
00073 #include <stdlib.h>
00074
00075 #include <ti/mas/types/types.h>
00076
00077 /* SIU header files */
00078 #include <ti/mas/ecu/test/src/siu.h>
00079 #include <ti/mas/ecu/test/src/siuloc.h>
00080 #include <ti/mas/ecu/test/src/siuport.h>
00081
00082 /* Nice way for doing endless loop */
00083 #define loop      for(;;)
00084
00085 #include <ti/mas/sdk/hyb.h>
00086
00087 static inline void siu_tx_execute (siuInst_t *inst)
00088 {
00089   if (inst->TxInst.enabled) {
00090     int k;
00091     extern linSample  siuOutStream[];
00092     extern void siuUpdateECUPowers (siuInst_t *inst, linSample *send_in,
00093                                     linSample *recv_in);
00094
00095     /* For test purposes, call Hybrid here and copy out samples with
00096      *  added echo! */
00097     /* hybAddEcho (&hybTxInst, inst->TxInst.send_frame_ptr,
00098                             inst->TxInst.recv_frame_ptr); */
00099
00100     /* Create a shadow copy of send frame */
00101     for (k = 0; k < inst->TxInst.send_frame_length; k++) {
00102       siuOutStream[k] = inst->TxInst.send_frame_ptr[k];
00103     }
00104   }
00105 } /* siu_tx_execute */
00106
00107 static inline void siu_tx_sleep (siuInst_t *inst)
00108 {
00109   /* currently not used. will be used when ISR is done. */
00110 } /* siu_tx_sleep */
00111
00112 static inline void siu_tx_wake_up (siuInst_t *inst)
00113 {
00114   siu_tx_execute (inst);    /* currently we directly execute Tx task here */
00115 } /* siu_tx_wake_up */
00116
00117 /******************************************************************************
00118  * FUNCTION PURPOSE: Main Routine for SIU Transmit Task.
00119  ******************************************************************************
00120  * DESCRIPTION: Waits to be waken up by ISR (or another task) in order to
00121  *              process input samples.
00122  *
00123  *****************************************************************************/
00124
00125 void siuTxMain (void *siuInst)
00126 {
00127   siuInst_t *inst = (siuInst_t*)siuInst;
00128
00129   loop {
00130     siu_tx_sleep (inst);
00131     siu_tx_execute (inst);
00132   }
00133 } /* siuTxMain */
00134
00135 /******************************************************************************
00136  * FUNCTION PURPOSE: SIU Tx Task configuration.
00137  ******************************************************************************
00138  * DESCRIPTION: Configures and enables SIU Tx task.
00139  *
00140  *****************************************************************************/
00141
00142 void siuTxOpen (void *siuInst, siuTxConfig_t *cfg)
00143 {
00144   siuInst_t *inst = (siuInst_t *)siuInst;
00145
00146   inst->TxInst.send_frame_length  = cfg->send_frame_length;
00147   inst->TxInst.recv_frame_length  = cfg->recv_frame_length;
00148   inst->TxInst.send_frame_ptr     = NULL;
00149   inst->TxInst.recv_frame_ptr     = NULL;
00150   inst->TxInst.TxSendOut          = cfg->TxSendOut;
00151   inst->TxInst.enabled            = TRUE;
00152 } /* siuTxOpen */
00153
00154 /******************************************************************************
00155  * FUNCTION PURPOSE: Accept send and receive samples for Tx task.
00156  ******************************************************************************
00157  * DESCRIPTION: Accepts send and receive samples for Tx task. Starts Tx task
00158  *              if necessary.
00159  *
00160  *****************************************************************************/
00161
00162 void siuTxSendIn (void *siuInst, void *send_frame, void *recv_frame,
00163                   tint queue_id)
00164 {
00165   siuInst_t *inst = (siuInst_t*)siuInst;
00166
00167   /* NOTE: this may result in race condition if siuTxSendIn is called again
00168    *       before siu_tx_execute() completed. */
00169   inst->TxInst.send_frame_ptr = (linSample *) send_frame;
00170   inst->TxInst.recv_frame_ptr = (linSample *) recv_frame;     /* store frame pointers */
00171
00172   siu_tx_wake_up (inst);                    /* wake up Tx task */
00173 } /* siuTxSendIn */
00174 /* 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 157 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 158 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), and piuOpen().

LFract bidSilenceCtrl_t::rxSilDetEnergy

Definition at line 159 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

LFract bidSilenceCtrl_t::threshold

Definition at line 160 of file piuloc.h.

Referenced by piu_bid_silence_detect(), and piuBidSilenceDetect().

tuint bidSilenceCtrl_t::cnt

Definition at line 162 of file piuloc.h.

Referenced by piu_bid_silence_detect(), and piuBidSilenceDetect().

tuint bidSilenceCtrl_t::initCnt

Definition at line 164 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 229 of file piu.h.

Data Fields

tbool | enable
tint | threshold
tuint | hangover

Field Documentation

tbool bidSilenceDet_t::enable

Definition at line 230 of file piu.h.

Referenced by piuBidSilenceDetect().

tint bidSilenceDet_t::threshold

Definition at line 231 of file piu.h.

Referenced by piuBidSilenceDetect().

tuint bidSilenceDet_t::hangover

Definition at line 232 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 249 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 251 of file ecuauto.h.

Referenced by ecu_auto_print(), and ecu_auto_set_defaults().

tbool ecuAutoConfig_t::cache_enable

Definition at line 252 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::cache_flush

Definition at line 253 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and ecuAuto_process_loop().

tbool ecuAutoConfig_t::get_filter

Definition at line 254 of file ecuauto.h.

Referenced by ecu_auto_set_defaults().

tbool ecuAutoConfig_t::dss_output

Definition at line 255 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 256 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::output_sin

Definition at line 257 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::output_rout

Definition at line 258 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tbool ecuAutoConfig_t::output_sout

Definition at line 259 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tuint ecuAutoConfig_t::iteration

Definition at line 261 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and ecuAuto_process_loop().

tlong ecuAutoConfig_t::pcm_hold_sz

Definition at line 262 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and lec_auto_initialize().

tlong ecuAutoConfig_t::sample_cnt

Definition at line 263 of file ecuauto.h.

Referenced by ecu_auto_sample_cnt(), and ecu_auto_set_defaults().

tlong ecuAutoConfig_t::second_cnt

Definition at line 264 of file ecuauto.h.

Referenced by ecu_auto_sample_cnt(), and ecu_auto_set_defaults().

tlong ecuAutoConfig_t::sample_bp

Definition at line 265 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 205 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 206 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 207 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 209 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 210 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 211 of file ecuauto.h.

Referenced by ecu_auto_set_defaults(), and ecu_auto_write_pcm().

FILE* ecuAutoFout_t::fptr

Definition at line 212 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 213 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 214 of file ecuauto.h.

Referenced by ecu_auto_write_pcm().

tlong ecuAutoFout_t::hold_buf_sz

Definition at line 215 of file ecuauto.h.

Referenced by ecu_auto_write_pcm(), and lec_auto_initialize().

tint ecuAutoFout_t::hold_count

Definition at line 216 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 217 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 240 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 241 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tint ecuAutoLoopCfg_t::chn_index

Definition at line 242 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tint ecuAutoLoopCfg_t::marker

Definition at line 243 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tlong ecuAutoLoopCfg_t::time_ms

Definition at line 244 of file ecuauto.h.

Referenced by ecuAuto_process_loop(), and ecucmd_runsim_handler().

tbool ecuAutoLoopCfg_t::enable_out

Definition at line 245 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 223 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 224 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

ecuNlp_e ecuChnConfig_t::nlp_mode

Definition at line 225 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

ecuErl_e ecuChnConfig_t::min_erl

Definition at line 226 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

tbool ecuChnConfig_t::bypass

Definition at line 227 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

tbool ecuChnConfig_t::hreg_hold

Definition at line 228 of file ecuauto.h.

Referenced by ecuAuto_config_chn(), and ecucmd_chncfg_handler().

tbool ecuChnConfig_t::hreg_clear

Definition at line 229 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 79 of file ecumem.h.

Data Fields

tbool | pre_init_bufs
tword | init_pattern

Field Documentation

tbool ecuMemConfig_t::pre_init_bufs

Definition at line 80 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 81 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 73 of file ecumem.h.

Data Fields

tword * | base
tulong | indx
tulong | size

Field Documentation

tword* ecuMemHeap_t::base

Definition at line 74 of file ecumem.h.

Referenced by ecu_mem_heap_alloc(), and ecu_mem_heap_init().

tulong ecuMemHeap_t::indx

Definition at line 75 of file ecumem.h.

Referenced by ecu_mem_heap_alloc(), and ecu_mem_heap_init().

tulong ecuMemHeap_t::size

Definition at line 76 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 265 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 266 of file ecusim.h.

Referenced by ecusim_profile_close(), ecusim_profile_init(), and ecusim_profile_print().

tbool ecuProfile_t::use_cache

Definition at line 267 of file ecusim.h.

Referenced by ecusim_profile_init(), and ecusim_profile_start().

tbool ecuProfile_t::enabled

Definition at line 268 of file ecusim.h.

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

tlong ecuProfile_t::overhead

Definition at line 269 of file ecusim.h.

Referenced by ecusim_profile_init(), and ecusim_profile_stop().

tlong ecuProfile_t::start_cnt

Definition at line 270 of file ecusim.h.

Referenced by ecusim_profile_start(), and ecusim_profile_stop().

tlong ecuProfile_t::cycles

Definition at line 271 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 258 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 259 of file ecusim.h.

Referenced by ecu_sim_init().

tbool ecuSimFileIo_t::eof

Definition at line 260 of file ecusim.h.

Referenced by ecu_sim_init().

FILE* ecuSimFileIo_t::fptr

Definition at line 261 of file ecusim.h.

Referenced by ecu_sim_init().

char ecuSimFileIo_t::fname[ecu_SIM_MAX_STRING]

Definition at line 262 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 127 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 132 of file ecuiram.h.

Referenced by siu_new_ecu().

Fract* iramSeg_t::ecu_bg_work_ptr

Definition at line 137 of file ecuiram.h.

Referenced by siu_new_ecu().

linSample* iramSeg_t::ecu_bg_e_ptr

Definition at line 138 of file ecuiram.h.

Referenced by siu_new_ecu().

Fract* iramSeg_t::ecu_bg_filter_ptr

Definition at line 139 of file ecuiram.h.

Referenced by siu_new_ecu().

Fract* iramSeg_t::ecu_fg_filter_ptr

Definition at line 140 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 237 of file piu.h.

Data Fields

tbool | enable
tint | type
tint | time
tint | custom

Field Documentation

tbool pcmPatternDet_t::enable

Definition at line 238 of file piu.h.

Referenced by piuPatternDetect().

tint pcmPatternDet_t::type

Definition at line 239 of file piu.h.

Referenced by piuPatternDetect().

tint pcmPatternDet_t::time

Definition at line 240 of file piu.h.

Referenced by piuPatternDetect().

tint pcmPatternDet_t::custom

Definition at line 241 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 244 of file piu.h.

Data Fields

tbool | enable
tuint | pattern

Field Documentation

tbool pcmPatternGen_t::enable

Definition at line 245 of file piu.h.

Referenced by piuPatternGeneration().

tuint pcmPatternGen_t::pattern

Definition at line 246 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 249 of file piu.h.

Data Fields

tint | law
const tint * | pcm_expand_table

Field Documentation

tint piuCompandingCfg_t::law

Definition at line 250 of file piu.h.

Referenced by piuSetCompanding(), and siu_open_piu().

const tint* piuCompandingCfg_t::pcm_expand_table

Definition at line 251 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 284 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 285 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

tint piuConfig_t::segment_size

Definition at line 288 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

void* piuConfig_t::sendOutProcTargetInst

Definition at line 289 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

void* piuConfig_t::sendOutIsrTargetInst

Definition at line 292 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

void* piuConfig_t::reportOutTargetInst

Definition at line 295 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

tint piuConfig_t::max_pcm_val

Definition at line 296 of file piu.h.

Referenced by siu_open_piu().

tuint piuConfig_t::rx_delay

Definition at line 297 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

tbool piuConfig_t::use_recv_out_buf

Definition at line 298 of file piu.h.

Referenced by piuOpen(), and siu_open_piu().

piuCompandingCfg_t piuConfig_t::companding

Definition at line 299 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 199 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 200 of file piu.h.

Referenced by siu_new_piu().

dbgInfo_t piuContext_t::debugInfo

Definition at line 201 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 260 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 261 of file piu.h.

Referenced by ecu_sim_init(), main(), and piuControl().

tint piuControl_t::loopback_select

Definition at line 263 of file piu.h.

Referenced by piuControl().

tuint piuControl_t::frame_size

Definition at line 264 of file piu.h.

setFrame_t piuControl_t::set_frame

Definition at line 265 of file piu.h.

Referenced by main(), and piuControl().

piuStats_t piuControl_t::stats

Definition at line 266 of file piu.h.

Referenced by piuControl().

bidSilenceDet_t piuControl_t::bid_silence_detect

Definition at line 267 of file piu.h.

Referenced by piuControl().

pcmPatternDet_t piuControl_t::pattern_detect

Definition at line 268 of file piu.h.

Referenced by piuControl().

pcmPatternGen_t piuControl_t::pattern_generate

Definition at line 269 of file piu.h.

Referenced by piuControl().

piuCompandingCfg_t piuControl_t::companding

Definition at line 270 of file piu.h.

Referenced by piuControl().

tint piuControl_t::dc_offset_removal_select

Definition at line 271 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 149 of file piuloc.h.

Data Fields

LFract | txEnergy
LFract | rxEnergy
LFract | txDClevel
LFract | rxDClevel

Field Documentation

LFract piuEnergyDCLevel_t::txEnergy

Definition at line 150 of file piuloc.h.

Referenced by piu_get_stats(), and piuOpen().

LFract piuEnergyDCLevel_t::rxEnergy

Definition at line 151 of file piuloc.h.

Referenced by piu_get_stats(), piuOpen(), and piuReceiveIn().

LFract piuEnergyDCLevel_t::txDClevel

Definition at line 152 of file piuloc.h.

Referenced by piu_get_stats(), piuBidSilenceDetect(), and piuOpen().

LFract piuEnergyDCLevel_t::rxDClevel

Definition at line 153 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 184 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 185 of file piuloc.h.

Referenced by piuReceiveOut(), and piuSendIn().

tint piuInst_s::state

Definition at line 186 of file piuloc.h.

Referenced by piuClose(), piuControl(), piuDelete(), piuOpen(), piuReceiveIn(), piuReceiveOut(), piuSendIn(), and piuTxRxProc().

tuint piuInst_s::mode_bitfield

Definition at line 187 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 188 of file piuloc.h.

Referenced by piu_pcm_companding(), and piuSetCompanding().

tint piuInst_s::pcm_format

Definition at line 189 of file piuloc.h.

Referenced by piu_pcm_compressing(), piu_pcm_pattern_generate(), and piuSetCompanding().

tint piuInst_s::segment_size

Definition at line 191 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 192 of file piuloc.h.

Referenced by piuOpen().

tuint piuInst_s::rx_underflow_cnt

Definition at line 193 of file piuloc.h.

Referenced by piu_get_stats(), piuOpen(), and piuReceiveOut().

tuint piuInst_s::rx_overflow_cnt

Definition at line 194 of file piuloc.h.

Referenced by piuOpen(), and piuReceiveIn().

linSample* piuInst_s::receive_out_buf

Definition at line 195 of file piuloc.h.

Referenced by piuControl(), piuNew(), piuOpen(), and piuReceiveOut().

linSample* piuInst_s::receive_out_buf_ptr

Definition at line 196 of file piuloc.h.

Referenced by piuControl(), piuOpen(), and piuReceiveOut().

linSample* piuInst_s::send_out_buf

Definition at line 197 of file piuloc.h.

Referenced by piuControl(), piuNew(), piuOpen(), and piuSendIn().

linSample* piuInst_s::send_out_buf_ptr

Definition at line 198 of file piuloc.h.

Referenced by piuControl(), piuOpen(), piuReceiveOut(), and piuSendIn().

void* piuInst_s::reportOutTargetInst

Definition at line 200 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piu_pcm_pattern_detect(), and piuOpen().

void* piuInst_s::sendOutProcTargetInst

Definition at line 201 of file piuloc.h.

Referenced by piuOpen().

void* piuInst_s::sendOutIsrTargetInst

Definition at line 202 of file piuloc.h.

Referenced by piuOpen(), and piuReceiveOut().

piuEnergyDCLevel_t piuInst_s::energy_DClevel

Definition at line 204 of file piuloc.h.

Referenced by piu_get_stats(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

tuint piuInst_s::generatePattern

Definition at line 205 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 206 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 207 of file piuloc.h.

Referenced by piu_bid_silence_detect(), piuBidSilenceDetect(), piuOpen(), and piuReceiveIn().

piuPcmPatternDetect_t piuInst_s::pcmPattern

Definition at line 208 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

linSample piuInst_s::silence_pattern

Definition at line 209 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 217 of file piu.h.

Data Fields

tuint ID
piuContext_t context
piuSizeConfig_t sizeCfg

Field Documentation

tuint piuNewConfig_t::ID

Definition at line 218 of file piu.h.

Referenced by siu_new_piu().

piuContext_t piuNewConfig_t::context

Definition at line 219 of file piu.h.

Referenced by siu_new_piu().

piuSizeConfig_t piuNewConfig_t::sizeCfg

Definition at line 220 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 141 of file piuloc.h.

Data Fields

tint | type
tint | custom
tlong | cnt
tint | initCnt

Field Documentation

tint piuPcmPatternDetect_t::type

Definition at line 142 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

tint piuPcmPatternDetect_t::custom

Definition at line 143 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

tlong piuPcmPatternDetect_t::cnt

Definition at line 144 of file piuloc.h.

Referenced by piu_pcm_pattern_detect(), and piuPatternDetect().

tint piuPcmPatternDetect_t::initCnt

Definition at line 145 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 188 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 189 of file piu.h.

Referenced by piuGetSizes(), piuNew(), and siu_new_piu().

tbool piuSizeConfig_t::rx_triple_buffering

Definition at line 194 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 173 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 174 of file piu.h.

Referenced by piu_get_stats().

tint piuStats_t::send_out_mean

Definition at line 175 of file piu.h.

Referenced by piu_get_stats().

tint piuStats_t::receive_out

Definition at line 176 of file piu.h.

Referenced by piu_get_stats().

tint piuStats_t::receive_out_mean

Definition at line 177 of file piu.h.

Referenced by piu_get_stats().

tuint piuStats_t::underrun

Definition at line 178 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 168 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 169 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 170 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 171 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 172 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 173 of file piuloc.h.

Referenced by piu_reset_receive_in_buf().

tint receive_in_buf_t::segment_count

Definition at line 174 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 254 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 255 of file piu.h.

Referenced by main(), and piuControl().

tuint* setFrame_t::send_out_buf

Definition at line 256 of file piu.h.

Referenced by main(), and piuControl().

tuint* setFrame_t::receive_in_buf

Definition at line 257 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 116 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 117 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 120 of file siu.h.

Referenced by main(), and siuInit().

tint siuConfig_t::pcm_bits

Definition at line 125 of file siu.h.

Referenced by main(), and siuInit().

void* siuConfig_t::core_heap

Definition at line 127 of file siu.h.

Referenced by main(), and siuInit().

void* siuConfig_t::voice_heap

Definition at line 128 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 106 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 107 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 113 of file siuloc.h.

Referenced by siuInit().

void* siuContext_t::cheap

Definition at line 114 of file siuloc.h.

Referenced by siuCAlloc(), and siuInit().

tuint siuContext_t::vheap_used

Definition at line 115 of file siuloc.h.

Referenced by siuInit().

void* siuContext_t::vheap

Definition at line 116 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 230 of file ecusim.h.

Data Fields

tint | select
tint | start
tint | ncoeff
tint | retstat

Field Documentation

tint siuGetFlt_t::select

Definition at line 231 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuGetFlt_t::start

Definition at line 232 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuGetFlt_t::ncoeff

Definition at line 233 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuGetFlt_t::retstat

Definition at line 234 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 155 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 156 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 163 of file siuloc.h.

Referenced by ecu_send_out(), main(), siu_tx_execute(), siuInit(), siuTxOpen(), and siuTxSendIn().

void* siuInst_t::slmInst

Definition at line 164 of file siuloc.h.

Referenced by main(), and siuInit().

tuint siuInst_t::cheap_used

Definition at line 165 of file siuloc.h.

Referenced by main(), siu_new_piu(), and siuInit().

tuint siuInst_t::vheap_used

Definition at line 166 of file siuloc.h.

Referenced by siu_new_ecu(), and siuInit().

tint siuInst_t::companding_law

Definition at line 167 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 173 of file siuloc.h.

Referenced by siuInit().

void* siuInst_t::piuInst

Definition at line 175 of file siuloc.h.

Referenced by main(), siu_new_piu(), siu_open_piu(), siuInit(), and siuTxRxSendIn().

void* siuInst_t::ecuInst

Definition at line 179 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 210 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 211 of file ecusim.h.

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

tbool siuSGNPars_t::reset

Definition at line 212 of file ecusim.h.

Referenced by ecu_sim_init(), and siu_set_sgn().

tint siuSGNPars_t::delay

Definition at line 213 of file ecusim.h.

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

linSample siuSGNPars_t::dcoffset

Definition at line 214 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 215 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 216 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 217 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 218 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 219 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 220 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 221 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), and siu_open_txsgn().

tint siuSGNPars_t::ntype

Definition at line 222 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), and siu_open_txsgn().

tint siuSGNPars_t::pow_level

Definition at line 223 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 224 of file ecusim.h.

Referenced by ecu_sim_init(), siu_open_rxsgn(), and siu_open_txsgn().

tulong siuSGNPars_t::sdram_addr

Definition at line 225 of file ecusim.h.

Referenced by siu_open_rxsgn(), and siu_open_txsgn().

tulong siuSGNPars_t::num_sample

Definition at line 226 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 275 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 276 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 277 of file ecusim.h.

Referenced by ecu_sim_init().

tuint siuSetup_s::clock_mul

Definition at line 278 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::pcm_format

Definition at line 279 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 281 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::frame_size

Definition at line 282 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 283 of file ecusim.h.

Referenced by ecu_sim_init(), and siu_open_ecu().

tint siuSetup_s::ecu_fltseg_length

Definition at line 284 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::ecu_num_fltseg

Definition at line 285 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tint siuSetup_s::ecu_filter_length

Definition at line 286 of file ecusim.h.

Referenced by ecu_sim_init(), and siu_open_ecu().

tint siuSetup_s::hyb_filter_length

Definition at line 287 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_ecu

Definition at line 288 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

ecuControl_t siuSetup_s::ecuCtl

Definition at line 289 of file ecusim.h.

Referenced by ecu_sim_init(), main(), and siu_open_ecu().

tbool siuSetup_s::toggle_hyb

Definition at line 290 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

hybControl_t siuSetup_s::hybCtl

Definition at line 291 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_tx_sg

Definition at line 292 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

siuSGNPars_t siuSetup_s::txSGN

Definition at line 293 of file ecusim.h.

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

tbool siuSetup_s::toggle_rx_sg

Definition at line 294 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

siuSGNPars_t siuSetup_s::rxSGN

Definition at line 295 of file ecusim.h.

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

tbool siuSetup_s::toggle_piu

Definition at line 296 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

piuControl_t siuSetup_s::piuCtl

Definition at line 297 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_getflt

Definition at line 298 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

siuGetFlt_t siuSetup_s::getflt

Definition at line 299 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::profile_enable

Definition at line 304 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tbool siuSetup_s::toggle_freerun

Definition at line 309 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tuint siuSetup_s::freerun_frame_cnt

Definition at line 310 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tuint siuSetup_s::Fs

Definition at line 311 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 312 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 313 of file ecusim.h.

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

tbool siuSetup_s::save_to_file

Definition at line 314 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

tuint siuSetup_s::num_channel

Definition at line 315 of file ecusim.h.

Referenced by ecu_sim_init().

tuint siuSetup_s::output_chnum

Definition at line 316 of file ecusim.h.

Referenced by ecu_sim_init().

ecuSimFileIo_t siuSetup_s::rin

Definition at line 317 of file ecusim.h.

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

ecuSimFileIo_t siuSetup_s::sin

Definition at line 318 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

ecuSimFileIo_t siuSetup_s::rout

Definition at line 319 of file ecusim.h.

Referenced by ecu_sim_init(), and main().

ecuSimFileIo_t siuSetup_s::sout

Definition at line 320 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 142 of file siuloc.h.

Data Fields

tint | mode
tint | thresh_idx
tint | sign

Field Documentation

tint siuSlimInst_t::mode

Definition at line 143 of file siuloc.h.

tint siuSlimInst_t::thresh_idx

Definition at line 144 of file siuloc.h.

tint siuSlimInst_t::sign

Definition at line 145 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 153 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 154 of file siu.h.

Referenced by siu_open_tx(), and siuTxOpen().

tint siuTxConfig_t::recv_frame_length

Definition at line 155 of file siu.h.

Referenced by siu_open_tx(), and siuTxOpen().

siuTxSendOut_t siuTxConfig_t::TxSendOut

Definition at line 156 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 126 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 127 of file siuloc.h.

Referenced by siu_tx_execute(), siuInit(), and siuTxOpen().

tint siuTxInst_t::send_frame_length

Definition at line 128 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 129 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

linSample* siuTxInst_t::send_frame_ptr

Definition at line 130 of file siuloc.h.

Referenced by main(), siu_tx_execute(), siuInit(), siuTxOpen(), and siuTxSendIn().

linSample* siuTxInst_t::recv_frame_ptr

Definition at line 131 of file siuloc.h.

Referenced by main(), siuInit(), siuTxOpen(), and siuTxSendIn().

siuTxSendOut_t siuTxInst_t::TxSendOut

Definition at line 132 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 140 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 143 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 116 of file vctypes.h.

#define VCT_8BITS 0x00u

Definition at line 117 of file vctypes.h.

#define VCT_1BITS 0x01u

Definition at line 118 of file vctypes.h.

#define VCT_2BITS 0x02u

Definition at line 119 of file vctypes.h.

#define VCT_3BITS 0x03u

Definition at line 120 of file vctypes.h.

#define VCT_4BITS 0x04u

Definition at line 121 of file vctypes.h.

#define VCT_5BITS 0x05u

Definition at line 122 of file vctypes.h.

#define VCT_6BITS 0x06u

Definition at line 123 of file vctypes.h.

#define VCT_7BITS 0x07u

Definition at line 124 of file vctypes.h.

#define VCT_8APCM 0x08u

Definition at line 126 of file vctypes.h.

#define VCT_8MUPCM 0x09u

Definition at line 127 of file vctypes.h.

#define VCT_2ADPCM 0x0Au

Definition at line 128 of file vctypes.h.

#define VCT_3ADPCM 0x0Bu

Definition at line 129 of file vctypes.h.

#define VCT_4ADPCM 0x0Cu

Definition at line 130 of file vctypes.h.

#define VCT_5ADPCM 0x0Du

Definition at line 131 of file vctypes.h.

#define VCT_E4_2ADPCM 0x14u

Definition at line 133 of file vctypes.h.

#define VCT_E5_2ADPCM 0x15u

Definition at line 134 of file vctypes.h.

#define VCT_E8_6ADPCM 0x18u

Definition at line 136 of file vctypes.h.

#define EVCT_LDCELP_16K 0x42u

Definition at line 143 of file vctypes.h.

#define EVCT_G729 0x43u

Definition at line 144 of file vctypes.h.

#define EVCT_CSACELP EVCT_G729

Definition at line 145 of file vctypes.h.

#define EVCT_G729A 0x44u

Definition at line 146 of file vctypes.h.

#define EVCT_G729AB 0x44u

Definition at line 147 of file vctypes.h.

#define EVCT_G729E 0x45u

Definition at line 148 of file vctypes.h.

#define EVCT_E2_2ADPCM 0x48u

Definition at line 149 of file vctypes.h.

#define EVCT_E3_2ADPCM 0x49u

Definition at line 150 of file vctypes.h.

#define EVCT_GSMEFR 0x4Au

Definition at line 151 of file vctypes.h.

#define EVCT_GSMFR 0x4Bu

Definition at line 152 of file vctypes.h.

#define EVCT_G723_53 0x50u

Definition at line 153 of file vctypes.h.

#define EVCT_G723_63 0x51u

Definition at line 154 of file vctypes.h.

#define EVCT_FAX 0x80u

Definition at line 157 of file vctypes.h.

#define EVCT_DATA 0x90u

Definition at line 160 of file vctypes.h.

#define EVCT_MRU 0xB2u

Definition at line 163 of file vctypes.h.

#define EVCT_CSACELP_IS641 0xC1u

Definition at line 169 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00049  *
00050  *              All rights reserved not granted herein.
00051  *
00052  *                         Limited License.
00053  *
00054  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00055  *  non-exclusive license under copyrights and patents it now or hereafter owns
00056  *  or controls to make, have made, use, import, offer to sell and sell
00057  *  ("Utilize") this software subject to the terms herein.  With respect to the
00058  *  foregoing patent license, such license is granted solely to the extent that
00059  *  any such patent is necessary to Utilize the software alone.  The patent
00060  *  license shall not apply to any combinations which include this software,
00061  *  other than combinations with devices manufactured by or for TI (“TI
00062  *  Devices”).  No hardware patent is licensed hereunder.
00063  *
00064  *  Redistributions must preserve existing copyright notices and reproduce this
00065  *  license (including the above copyright notice and the disclaimer and (if
00066  *  applicable) source code license limitations below) in the documentation
00067  *  and/or other materials provided with the distribution
00068  *
00069  *  Redistribution and use in binary form, without modification, are permitted
00070  *  provided that the following conditions are met:
00071  *
00072  *    *  No reverse engineering, decompilation, or disassembly of this software
00073  *  is permitted with respect to any software provided in binary form.
00074  *
00075  *    *  any redistribution and use are licensed by TI for use only with TI
00076  *  Devices.
00077  *
00078  *    *  Nothing shall obligate TI to provide you with source code for the
00079  *  software licensed and provided to you in object code.
00080  *
00081  *  If software source code is provided to you, modification and redistribution
00082  *  of the source code are permitted provided that the following conditions are
00083  *  met:
00084  *
00085  *    *  any redistribution and use of the source code, including any resulting
00086  *  derivative works, are licensed by TI for use only with TI Devices.
00087  *
00088  *    *  any redistribution and use of any object code compiled from the source
00089  *  code and any resulting derivative works, are licensed by TI for use only
00090  *  with TI Devices.
00091  *
00092  *  Neither the name of Texas Instruments Incorporated nor the names of its
00093  *  suppliers may be used to endorse or promote products derived from this
00094  *  software without specific prior written permission.
00095  *
00096  *  DISCLAIMER.
00097  *
00098  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00099  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00100  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00101  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00102  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00103  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00104  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00105  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00106  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00107  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00108  *  DAMAGE.
00109  *****************************************************************************/
00110
00111 /*--------------------------------------------------*/
00112 /* Voice Coding Types (Figure 5/G.764) ('000nnnnn') */
00113 /*--------------------------------------------------*/
00114
00115 /* Codings that are not listed are reserved for future use. */
00116 #define EVCT_INVALID        0xFFu   /* Invalid Codec - used for initialization */
00117 #define VCT_8BITS           0x00u   /* 8 bits/sample */
00118 #define VCT_1BITS           0x01u   /* 1 bit/sample  */
00119 #define VCT_2BITS           0x02u   /* 2 bits/sample */
00120 #define VCT_3BITS           0x03u   /* 3 bits/sample */
00121 #define VCT_4BITS           0x04u   /* 4 bits/sample */
00122 #define VCT_5BITS           0x05u   /* 5 bits/sample */
00123 #define VCT_6BITS           0x06u   /* 6 bits/sample */
00124 #define VCT_7BITS           0x07u   /* 7 bits/sample */
00125
00126 #define VCT_8APCM           0x08u   /* 8 bit A-law PCM */
00127 #define VCT_8MUPCM          0x09u   /* 8 bit mu-law PCM */
00128 #define VCT_2ADPCM          0x0Au   /* 2 bits/sample ADPCM (G.726) */
00129 #define VCT_3ADPCM          0x0Bu   /* 3 bits/sample ADPCM (G.726) */
00130 #define VCT_4ADPCM          0x0Cu   /* 4 bits/sample ADPCM (G.726) */
00131 #define VCT_5ADPCM          0x0Du   /* 5 bits/sample ADPCM (G.726) */
00132
00133 #define VCT_E4_2ADPCM       0x14u   /* (4,2) embedded ADPCM (G.727) */
00134 #define VCT_E5_2ADPCM       0x15u   /* (5,2) embedded ADPCM (G.727) */
00135
00136 #define VCT_E8_6ADPCM       0x18u   /* (8,6) embedded ADPCM (G.722) */
00137
00138 /*---------------------------------------------------------------------*/
00139 /* Extended Voice Coding Types (Fax, Modem, Voice Coders not in G.764) */
00140 /*---------------------------------------------------------------------*/
00141
00142 /* Voice Types ('010nnnnn') */
00143 #define EVCT_LDCELP_16K     0x42u       /* LD-CELP 16K (G.728) */
00144 #define EVCT_G729           0x43u       /* CS-ACELP 8K (G.729) */
00145 #define EVCT_CSACELP        EVCT_G729   /* obsolete! do not use it! */
00146 #define EVCT_G729A          0x44u       /* CS_ACELP 8K (G.729A) */
00147 #define EVCT_G729AB         0x44u       /* CS_ACELP 8K with int. vad (G.729AB)*/
00148 #define EVCT_G729E          0x45u       /* CS_ACELP 11.8K (G.729E) */
00149 #define EVCT_E2_2ADPCM      0x48u       /* (2,2) embedded ADPCM (G.727) */
00150 #define EVCT_E3_2ADPCM      0x49u       /* (3,2) embedded ADPCM (G.727) */
00151 #define EVCT_GSMEFR         0x4Au       /* GSM EFR                      */
00152 #define EVCT_GSMFR          0x4Bu       /* GSM FR                       */
00153 #define EVCT_G723_53        0x50u       /* G.723 at 5.3 kbits/s */
00154 #define EVCT_G723_63        0x51u       /* G.723 at 6.3 kbits/s */
00155
00156 /* Fax Types ('1000nnnn') */
00157 #define EVCT_FAX            0x80u   /* Fax */
00158
00159 /* Data Types ('1001nnnn') */
00160 #define EVCT_DATA           0x90u   /* Data - transparent 8-bit PCM */
00161
00162 /* Modem Relay Types ('1011nnnn') */
00163 #define EVCT_MRU            0xB2u   /* Modem Relay Unit */
00164
00165 /* Modem Types ('1011nnnn') */
00166 /* currently none of EVCT_MDM_xxx */
00167
00168 /* Non ITU Types ('110nnnnn') */
00169 #define EVCT_CSACELP_IS641  0xC1u   /* CS-ACELP 8K (TIAEIA IS641) */
00170
00171 /* TELOGY Types ('111nnnnn') */
00172 /* currently none of EVCT_TNI_xxx */
00173 #endif /* _VCTYPES_H */
00174 /* 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 84 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00019  *
00020  *              All rights reserved not granted herein.
00021  *
00022  *                         Limited License.
00023  *
00024  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00025  *  non-exclusive license under copyrights and patents it now or hereafter owns
00026  *  or controls to make, have made, use, import, offer to sell and sell
00027  *  ("Utilize") this software subject to the terms herein.  With respect to the
00028  *  foregoing patent license, such license is granted solely to the extent that
00029  *  any such patent is necessary to Utilize the software alone.  The patent
00030  *  license shall not apply to any combinations which include this software,
00031  *  other than combinations with devices manufactured by or for TI (“TI
00032  *  Devices”).  No hardware patent is licensed hereunder.
00033  *
00034  *  Redistributions must preserve existing copyright notices and reproduce this
00035  *  license (including the above copyright notice and the disclaimer and (if
00036  *  applicable) source code license limitations below) in the documentation
00037  *  and/or other materials provided with the distribution
00038  *
00039  *  Redistribution and use in binary form, without modification, are permitted
00040  *  provided that the following conditions are met:
00041  *
00042  *    *  No reverse engineering, decompilation, or disassembly of this software
00043  *  is permitted with respect to any software provided in binary form.
00044  *
00045  *    *  any redistribution and use are licensed by TI for use only with TI
00046  *  Devices.
00047  *
00048  *    *  Nothing shall obligate TI to provide you with source code for the
00049  *  software licensed and provided to you in object code.
00050  *
00051  *  If software source code is provided to you, modification and redistribution
00052  *  of the source code are permitted provided that the following conditions are
00053  *  met:
00054  *
00055  *    *  any redistribution and use of the source code, including any resulting
00056  *  derivative works, are licensed by TI for use only with TI Devices.
00057  *
00058  *    *  any redistribution and use of any object code compiled from the source
00059  *  code and any resulting derivative works, are licensed by TI for use only
00060  *  with TI Devices.
00061  *
00062  *  Neither the name of Texas Instruments Incorporated nor the names of its
00063  *  suppliers may be used to endorse or promote products derived from this
00064  *  software without specific prior written permission.
00065  *
00066  *  DISCLAIMER.
00067  *
00068  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00069  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00070  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00071  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00072  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00073  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00074  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00075  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00076  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00077  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00078  *  DAMAGE.
00079  *****************************************************************************/
00080
00081 #include <ti/mas/types/types.h>
00082 #include <ti/mas/ecu/test/src/vheap.h>
00083
00084 tword siu_voice_heap[SIU_VOICE_HEAP_SIZE];
00085 /* 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 87 of file vheap.h.

Referenced by main().

Variable Documentation

tword siu_voice_heap[]

Definition at line 84 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00023  *
00024  *              All rights reserved not granted herein.
00025  *
00026  *                         Limited License.
00027  *
00028  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00029  *  non-exclusive license under copyrights and patents it now or hereafter owns
00030  *  or controls to make, have made, use, import, offer to sell and sell
00031  *  ("Utilize") this software subject to the terms herein.  With respect to the
00032  *  foregoing patent license, such license is granted solely to the extent that
00033  *  any such patent is necessary to Utilize the software alone.  The patent
00034  *  license shall not apply to any combinations which include this software,
00035  *  other than combinations with devices manufactured by or for TI (“TI
00036  *  Devices”).  No hardware patent is licensed hereunder.
00037  *
00038  *  Redistributions must preserve existing copyright notices and reproduce this
00039  *  license (including the above copyright notice and the disclaimer and (if
00040  *  applicable) source code license limitations below) in the documentation
00041  *  and/or other materials provided with the distribution
00042  *
00043  *  Redistribution and use in binary form, without modification, are permitted
00044  *  provided that the following conditions are met:
00045  *
00046  *    *  No reverse engineering, decompilation, or disassembly of this software
00047  *  is permitted with respect to any software provided in binary form.
00048  *
00049  *    *  any redistribution and use are licensed by TI for use only with TI
00050  *  Devices.
00051  *
00052  *    *  Nothing shall obligate TI to provide you with source code for the
00053  *  software licensed and provided to you in object code.
00054  *
00055  *  If software source code is provided to you, modification and redistribution
00056  *  of the source code are permitted provided that the following conditions are
00057  *  met:
00058  *
00059  *    *  any redistribution and use of the source code, including any resulting
00060  *  derivative works, are licensed by TI for use only with TI Devices.
00061  *
00062  *    *  any redistribution and use of any object code compiled from the source
00063  *  code and any resulting derivative works, are licensed by TI for use only
00064  *  with TI Devices.
00065  *
00066  *  Neither the name of Texas Instruments Incorporated nor the names of its
00067  *  suppliers may be used to endorse or promote products derived from this
00068  *  software without specific prior written permission.
00069  *
00070  *  DISCLAIMER.
00071  *
00072  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00073  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00074  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00075  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00076  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00077  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00078  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00079  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00080  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00081  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00082  *  DAMAGE.
00083  *****************************************************************************/
00084
00085 #include <ti/mas/types/types.h>
00086
00087 #define SIU_VOICE_HEAP_SIZE  2048    /* 1024 */
00088 extern tword siu_voice_heap[];
00089
00090 #endif  /* _VHEAP_H */
00091 /* 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 (1)
#define | ti_mas_nmu_Version_BUILD (0)
#define | ti_mas_nmu_Version_QUALITY (3)
#define | ti_mas_nmu_Version_BTYPE (0)
#define | ti_mas_nmu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_nmu_Version_MAJOR
#define | Version_MINOR ti_mas_nmu_Version_MINOR
#define | Version_XVERTICAL ti_mas_nmu_Version_XVERTICAL
#define | Version_PATCH ti_mas_nmu_Version_PATCH
#define | Version_BUILD ti_mas_nmu_Version_BUILD
#define | Version_QUALITY ti_mas_nmu_Version_QUALITY
#define | Version_BTYPE ti_mas_nmu_Version_BTYPE
#define | Version_WIDTH ti_mas_nmu_Version_WIDTH

Define Documentation

#define ti_mas_nmu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_nmu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_nmu_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_nmu_Version_MINOR (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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_nmu_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_nmu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_nmu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_nmu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_nmu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_nmu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_nmu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_nmu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_nmu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_nmu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_nmu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_nmu_Version_WIDTH

Definition at line 97 of file Version.h.


NMU: Version.h Source File

  • File List
  • Globals

Version.h

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


NMU: Data Structures

  • Data Structures
  • Data Fields

NMU Data Structures

Here are the data structures with brief descriptions:
nmurxNewConfig_t | Create time configuration parameters
nmurxOpenConfig_t | Open time configuration parameters
nmurxSizeConfig_t | Size query time configuration parameters
nmurxXdaisAllocParams_t | Configuration parameters overloading for algAlloc API
nmurxXdaisCallTable_t | NMU Rx's XDAIS call table definition
nmurxXdaisInitParams_t | Configuration parameters overloading for algInit API
nmutxNewConfig_t | Create time configuration parameters
nmutxOpenConfig_t | Open time configuration parameters
nmutxSizeConfig_t | Size query time configuration parameters
nmutxStats_s | Statistics reported by NMU Tx
nmutxXdaisAllocParams_t | Configuration parameters overloading for algAlloc API
nmutxXdaisCallTable_t | NMU Tx's XDAIS call table definition
nmutxXdaisInitParams_t | Configuration parameters overloading for algInit API


NMU: Detailed NMU Description

NMU (Noise Matching Unit) Package

Detailed NMU Description

Description

The purpose of noise matching is to improve the speech quality during discontinuous transmission (DTX). Due to the presence of background noise, the absence of noise transmission can cause audible artifacts in the speech output at the receiving side (RX) during transitions between voice (in which background noise is present) and noise. Therefore, noise information (transmitted as packets) can reduce the audible artifacts and provide better speech quality at the cost of bandwidth during non-speech periods. In the absence of transmission of noise information in any form, at a minimum, the receiver needs to generate comfort noise (CNG) during silence periods to give a feeling to the user that the connection is alive (complete silence can make user uncomfortable and may interpret as loss of connection). In all the documentation, tx will be use to refer to the direction towards packet i.e where noise estimation is done and rx will be used to refer to the direction from packet i.e where noise generation needs to be done. The NMU package actually consists of two modules as per the direction, NMUTX for tx direction and NMURX for rx direction. Nmutx works using an upstream VAD (Voice Activity Detection) module decision of voice/no-voice. During no-voice periods, the NMUTX estimates level and/or spectral character of noise and sends updates of noise information for NMURX to generate noise based on this information. The NMURX generates noise during every single silence frame based on the last updated information about the noise characteristics from the received noise information payload. Nmutx always generates noise information on every transition from voice to silence.

Features

Different noise matching methods allow the realization of the trade-offs among speech quality, bandwidth savings and computational/algorithmic complexity. There are three types of NMU algorithms supported.

Fixed Level CNG

This is applicable in the rx direction only. It gives ability to the user to generate noise at a fixed configured level no matter what NMURX receives. Generally, but not necessarily, this configuration is used together with NMUTX configured to "none" mode, where it only generates noise payload with level -70 dBm when there is voice to no-voice transition but no updates during no-voice, it does not estimate the level. This gives maximum bandwidth savings. A default level of -70 dBm is used in absence of a user configured level by NMURX. Because there is no estimating/tracking by tx/rx of actual noise, this is not really noise matching in the strictest sense. The generated noise is pink.

Level (only) Matching

This is applicable for both tx and rx directions. The NMUTX estimates noise level based on energy of noise and generates single byte packet payload representing level information as per RFC3389. The NMURX generates pink noise at a level that is the same as the one in the single byte packet payload it receives as per RFC3389 i.e. it tries to track the level based on transmitted information it receives. Until NMURX gets the first packet payload containing noise infomration, if receiver is asked to generate noise, it will use a user configured noise level (default of -70 dBm if user has not configured). If a packet payload contains more than 1 byte i.e more than level information (e.g spectrum information), the extra payload is ignored by NMURX. This combination of tx and rx allows noise matching in terms of level character of the noise, but not the spectral character of noise. The DTX (discontinuous transmission) logic in nmu tx will decide during silence periods when to send updates, for example when noise level changes by more than a certain amount over a certain time. No DTX configurability is currently provided to the user to realize a tradeoff between quality and bandwidth. Because this type of noise matching does not really match the spectral character, DTX is designed to be relatively conservative compared to the spectrum matching i.e. the updates are not as frequent as spectrally matched noise. So this setting is recommended when bandwidth savings are more important than quality of noise matching. Level matching can be used for any sampling rate.

Spectrum Matching G.711 Appendix II

G.711 Appendix II is used in spectrum matching. G.711 Appendix II defines a comfort noise payload format, which consists of a description of the noise level and spectral information in the form of reflection coefficients in the all-pole model. Spectral information is optional and can vary based on selected LP (Linear Prediction) order. G.711 Appendix II also presents an example solution of how to generate and use the defined comfort noise payload format but does not specify the DTX logic, which is TI proprietary. G.711 Appendix II is intended for packet-based systems with a large header overhead where the packet transmission rate plays a significant role in the overall system bit-rate compared to the payload size, so a small increase in payload such as going from a single byte payload containing level only to a 11 byte payload containing level and 10 spectral coefficients does not siginficantly affect the bandwidth, but provides better quality due to spectral matching.

The NMUTX estimates noise level and spectrum and generates multi-byte packet payload representing level and spectrum information as per RFC3389. The NMURX generates noise using spectrum and level information that it receives from transmitter i.e. it tries to track the noise character based on transmitted information it receives. Both NMUTX and NMURX can be configured for an LP order ranging from 0 to 10. The NMUTX will generate paylod of 1 byte (for level) plus additional bytes equal to the LP order containing spectrum information. The NMURX will only use up to the configured LP order bytes to generate noise even if it receives bigger payload representing more LP bytes than it is configured to handle. If NMURX receives packet payload of size representing LP coefficients less than LP order it is configured for, it will use whatever packet payload bytes are available. Thus, NMURX, even when configured for a certain LP order is flexible to handle any kind of packet payload size, so rx and tx configurations are completely independent. The DTX (discontinuous transmission) logic in nmu tx will decide during silence periods when to send updates, for example when noise level or spectum changes by more than a certain amount over a certain time occur.

No DTX configurability is currently provided to the user to realize a tradeoff between quality and bandwidth. Because this type of noise matching matches best the character of noise compared to level only matching, the DTX logic in NMUTX is designed to be relatively more sensitive to changes in level and spectrum compared to that of the level matching one, so that rapid changes in level and spectrum, such as for complex noise like office, street, cafe, pub etc will result in a higher rate of noise updates. So this setting is recommended when bandwidth savings are less important than quality of noise matching, such as aforementioned complex noise scenarios where level only matching or slow updates can cause annoying artifacts. However, for relatively steady noise (in terms of level and spectrum), the DTX will not generate unnecessary updates. Note that even with a DTX logic that is more sensitive to changes in noise character, there is still good bandwidth savings because noise is coded at much lower bandwidth than voice (at least for PCM codec which codes 80 bytes in a 10 ms frame of voice whereas only 11 bytes are required for noise).

(Voice Activity Detection) Alert for better tracking.

The NMUTX requires an alert indication from an upstream VAD module so that it can start an early estimation of noise character before the actual voice to noise transition happens. This allows level to be tracked and prevent artifacts when noise character may change during long periods of active speech and not doing this will cause a change in noise perceived during the active speech period and the transition to noise. VAD is expected to give an early indication about 80 ms or more in advance of the end of its hangover period. Generally VAD hangover periods are in excess of 100 ms. If the alert was a false alarm, the NMUTX will reset its estimation so that the voice does not influence noise estimation. This also helps prevent artifact of first voice to noise transition (e.g if a voice call starts with active speech) because of NMUTX not getting an opportunity to learn anything about the background noise character before the first voice to noise transition, due to this capabilitiy, it will be able to learn before the transition happens.


NMU:

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

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

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

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

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

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

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

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

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


NMU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


NMU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

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


NMU: NMU External API

NMU (Noise Matching Unit) Package

NMU External API

Page Contents

  1. NMURX ECO API
  2. NMU ECO Creation Functions
  3. NMU ECO Configuration Functions
  4. NMU ECO Execution Functions
  5. NMU ECO Destruction Functions
  6. NMU ECO Return Codes
  7. NMU XDais API

NMURX ECO API

Since the NMU ECO RX and TX modules are so similar, the APIs for both will be described together in the following sections. Any differences will be duly noted.

The NMU Embedded Communication Object (ECO) receive path (RX) and send path (TX) APIs consist of the following routines for instance creation, configuration, destruction and execution.

NMURX NMUTX
  1. nmurxGetSizes()
  2. nmurxNew()
  3. nmurxOpen()
  4. nmurxControl()
  5. nmurxRelocate()
  6. nmurxProcess()
  7. nmurxIsAlgSupported()
  8. nmurxClose()
  9. nmurxDelete()
  1. nmutxGetSizes()
  2. nmutxNew()
  3. nmutxOpen()
  4. nmutxControl()
  5. nmutxRelocate()
  6. nmutxProcess()
  7. nmutxIsAlgSupported()
  8. nmutxGetStats()
  9. nmutxClose()
  10. nmutxDelete()

NMU ECO Creation Functions

NMU (RX or TX) instance creation is a four step process. First, determine the module memory requirements via the modules GetSizes routine. Second, allocate the module memory buffers using any system-prescribed method. Create the module instance by passing the allocated buffer information to the associated New API routine. Finally, open the instance for use via the associated OpenAPI function.

This process must be followed in the order given for proper operation. Once an NMU instance is opened, it may be applied for noise estimation or generation.

NMURX NMUTX
  1. nmurxGetSizes()
  2. nmurxNew()
  3. nmurxOpen()
  1. nmutxGetSizes()
  2. nmutxNew()
  3. nmutxOpen()

NMU ECO Configuration Functions

The NMU component has two common external API configuration routines; one to configure the module instance - nmurxControl or nmutxControl, and one to to query for algorithmic support - nmurxIsAlgSupported or nmutxIsAlgSupported. The NMUTX module offers one additional API routine to gather operatoinal statistics - nmutxGetStats. Follow the links below for further details.

NMURX NMUTX
  1. nmurxControl()
  2. nmurxIsAlgSupported()
  1. nmutxControl()
  2. nmutxIsAlgSupported()
  3. nmutxGetStats()

NMU ECO Execution Functions

The NMU execution API consists of two routines, one for RX or TX processing - nmurxProcess or nmutxProcess, and one for module instance relocation - nmurxRelocate or nmutxRelocate. The execution API functions require an active NMU module instance that has been opened according to the procedure in NMU ECO Creation Functions above. Follow the links below for further details.

NMURX NMUTX
  1. nmurxProcess()
  2. nmurxRelocate()
  1. nmutxProcess()
  2. nmutxRelocate()

NMU ECO Destruction Functions

NMU module instance desctruction is a two step process. First, the NMU module (RX or TX) must be closed via the associated ECO Close API function. Once the NMU module is closed it may be removed via the approppriate ECO Delete function. Follow the links below for further details.

NMURX NMUTX
  1. nmurxClose()
  2. nmurxDelete()
  1. nmutxClose()
  2. nmutxDelete()

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

NMU ECO Return Codes

The NMU modules provide both warning and error output to indicate problems calling the NMU API functions. Follow the links below for further details.

NMURX NMUTX
  1. NMU RX Warning Codes
  2. NMU RX Exception Codes
  3. NMU RX Error Codes
  1. NMU RX Warning Codes
  2. NMU TX Exception Codes
  3. NMU TX Error Codes

NMU XDais API

The NMU modules also offer the eXpressDsp Algorithm Interoperability Standard (XDAIS) API. This API is available via the nmurxXdaisCallTable for NMURX and nmutxXdaisCallTable for NMUTX. These call tables provide the control and process API functions.


NMU: File Index

  • File List
  • Globals

NMU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
nmurx.h [code] | Contains definitions and external APIs for NMU Rx
nmutx.h [code] | Contains definitions and external APIs for the NMU Tx


NMU: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • c
  • d
  • f
  • g
  • i
  • l
  • p
  • s

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

- c -

  • cfg : nmurxXdaisAllocParams_t , nmutxXdaisAllocParams_t
  • cfgNew : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • cfgOpen : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • config : nmurxOpenConfig_t , nmutxSizeConfig_t , nmutxOpenConfig_t , nmurxSizeConfig_t
  • control : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • curr_bg_noise : nmutxStats_s

- d -

  • debugInfo : nmurxNewConfig_t , nmutxNewConfig_t

- f -

  • frame_size : nmurxOpenConfig_t , nmutxOpenConfig_t

- g -

  • g711a2TxProcessDecimateInterval : nmutxNewConfig_t

- i -

  • ialg : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • ID : nmurxNewConfig_t , nmutxNewConfig_t
  • isSidAllowed : nmutxNewConfig_t

- l -

  • level_format : nmurxOpenConfig_t , nmutxOpenConfig_t

- p -

  • param : nmurxXdaisAllocParams_t , nmurxXdaisInitParams_t , nmutxXdaisInitParams_t , nmutxXdaisAllocParams_t
  • process : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t

- s -

  • sizeCfg : nmurxNewConfig_t , nmutxNewConfig_t


NMU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • c
  • d
  • f
  • g
  • i
  • l
  • p
  • s

- c -

  • cfg : nmurxXdaisAllocParams_t , nmutxXdaisAllocParams_t
  • cfgNew : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • cfgOpen : nmurxXdaisInitParams_t , nmutxXdaisInitParams_t
  • config : nmurxOpenConfig_t , nmutxSizeConfig_t , nmutxOpenConfig_t , nmurxSizeConfig_t
  • control : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • curr_bg_noise : nmutxStats_s

- d -

  • debugInfo : nmurxNewConfig_t , nmutxNewConfig_t

- f -

  • frame_size : nmurxOpenConfig_t , nmutxOpenConfig_t

- g -

  • g711a2TxProcessDecimateInterval : nmutxNewConfig_t

- i -

  • ialg : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t
  • ID : nmurxNewConfig_t , nmutxNewConfig_t
  • isSidAllowed : nmutxNewConfig_t

- l -

  • level_format : nmurxOpenConfig_t , nmutxOpenConfig_t

- p -

  • param : nmurxXdaisAllocParams_t , nmurxXdaisInitParams_t , nmutxXdaisInitParams_t , nmutxXdaisAllocParams_t
  • process : nmurxXdaisCallTable_t , nmutxXdaisCallTable_t

- s -

  • sizeCfg : nmurxNewConfig_t , nmutxNewConfig_t


NMU: Data Fields

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

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

- _ -

  • __extern : Version.h

- n -

  • nmurx_E1 : nmurx.h
  • nmurx_ERROR : nmurx.h
  • nmurx_EXC_INVALID_MODE : nmurx.h
  • nmurx_G711A2_MAX_LP_ORDER : nmurx.h
  • nmurx_LEVEL_FORMAT_dBm : nmurx.h
  • nmurx_LEVEL_FORMAT_dBov : nmurx.h
  • nmurx_NOERR : nmurx.h
  • nmurx_NOMEMORY : nmurx.h
  • nmurx_W1 : nmurx.h
  • nmurx_W10 : nmurx.h
  • nmurx_W11 : nmurx.h
  • nmurx_W2 : nmurx.h
  • nmurx_W3 : nmurx.h
  • nmurx_W4 : nmurx.h
  • nmurx_W5 : nmurx.h
  • nmurx_W6 : nmurx.h
  • nmurx_W7 : nmurx.h
  • nmurx_W8 : nmurx.h
  • nmurx_W9 : nmurx.h
  • nmurx_WARN_CTL_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_CTL_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmurx_WARN_NEW_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmurxClose() : nmurx.h
  • nmurxControl() : nmurx.h
  • nmurxDelete() : nmurx.h
  • nmurxGetSizes() : nmurx.h
  • nmurxIsAlgSupported() : nmurx.h
  • nmurxNew() : nmurx.h
  • nmurxOpen() : nmurx.h
  • nmurxProcess() : nmurx.h
  • nmurxRelocate() : nmurx.h
  • nmurxXdaisCallTable : nmurx.h
  • nmutx_E1 : nmutx.h
  • nmutx_ERROR : nmutx.h
  • nmutx_EXC_INVALID_MODE : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS : nmutx.h
  • nmutx_LEVEL_FORMAT_dBm : nmutx.h
  • nmutx_LEVEL_FORMAT_dBov : nmutx.h
  • nmutx_NOERR : nmutx.h
  • nmutx_NOMEMORY : nmutx.h
  • nmutx_W1 : nmutx.h
  • nmutx_W10 : nmutx.h
  • nmutx_W2 : nmutx.h
  • nmutx_W3 : nmutx.h
  • nmutx_W4 : nmutx.h
  • nmutx_W5 : nmutx.h
  • nmutx_W6 : nmutx.h
  • nmutx_W7 : nmutx.h
  • nmutx_W8 : nmutx.h
  • nmutx_W9 : nmutx.h
  • nmutx_WARN_CTL_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_CTL_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmutx.h
  • nmutx_WARN_NEW_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmutx.h
  • nmutxClose() : nmutx.h
  • nmutxControl() : nmutx.h
  • nmutxDelete() : nmutx.h
  • nmutxGetSizes() : nmutx.h
  • nmutxGetStats() : nmutx.h
  • nmutxIsAlgSupported() : nmutx.h
  • nmutxNew() : nmutx.h
  • nmutxOpen() : nmutx.h
  • nmutxProcess() : nmutx.h
  • nmutxRelocate() : nmutx.h
  • nmutxStats_t : nmutx.h
  • nmutxXdaisCallTable : nmutx.h

- t -

  • ti_mas_nmu_Version___VERS : Version.h
  • ti_mas_nmu_Version__top__ : Version.h
  • ti_mas_nmu_Version_BTYPE : Version.h
  • ti_mas_nmu_Version_BUILD : Version.h
  • ti_mas_nmu_Version_MAJOR : Version.h
  • ti_mas_nmu_Version_MINOR : Version.h
  • ti_mas_nmu_Version_PATCH : Version.h
  • ti_mas_nmu_Version_QUALITY : Version.h
  • ti_mas_nmu_Version_WIDTH : Version.h
  • ti_mas_nmu_Version_XVERTICAL : Version.h

- v -

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


NMU: Data Fields

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

- _ -

  • __extern : Version.h

- n -

  • nmurx_E1 : nmurx.h
  • nmurx_ERROR : nmurx.h
  • nmurx_G711A2_MAX_LP_ORDER : nmurx.h
  • nmurx_LEVEL_FORMAT_dBm : nmurx.h
  • nmurx_LEVEL_FORMAT_dBov : nmurx.h
  • nmurx_NOERR : nmurx.h
  • nmurx_NOMEMORY : nmurx.h
  • nmurx_W1 : nmurx.h
  • nmurx_W10 : nmurx.h
  • nmurx_W11 : nmurx.h
  • nmurx_W2 : nmurx.h
  • nmurx_W3 : nmurx.h
  • nmurx_W4 : nmurx.h
  • nmurx_W5 : nmurx.h
  • nmurx_W6 : nmurx.h
  • nmurx_W7 : nmurx.h
  • nmurx_W8 : nmurx.h
  • nmurx_W9 : nmurx.h
  • nmutx_E1 : nmutx.h
  • nmutx_ERROR : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS : nmutx.h
  • nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS : nmutx.h
  • nmutx_LEVEL_FORMAT_dBm : nmutx.h
  • nmutx_LEVEL_FORMAT_dBov : nmutx.h
  • nmutx_NOERR : nmutx.h
  • nmutx_NOMEMORY : nmutx.h
  • nmutx_W1 : nmutx.h
  • nmutx_W10 : nmutx.h
  • nmutx_W2 : nmutx.h
  • nmutx_W3 : nmutx.h
  • nmutx_W4 : nmutx.h
  • nmutx_W5 : nmutx.h
  • nmutx_W6 : nmutx.h
  • nmutx_W7 : nmutx.h
  • nmutx_W8 : nmutx.h
  • nmutx_W9 : nmutx.h

- t -

  • ti_mas_nmu_Version___VERS : Version.h
  • ti_mas_nmu_Version__top__ : Version.h
  • ti_mas_nmu_Version_BTYPE : Version.h
  • ti_mas_nmu_Version_BUILD : Version.h
  • ti_mas_nmu_Version_MAJOR : Version.h
  • ti_mas_nmu_Version_MINOR : Version.h
  • ti_mas_nmu_Version_PATCH : Version.h
  • ti_mas_nmu_Version_QUALITY : Version.h
  • ti_mas_nmu_Version_WIDTH : Version.h
  • ti_mas_nmu_Version_XVERTICAL : Version.h

- v -

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


NMU: Data Fields

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

  • nmurx_EXC_INVALID_MODE : nmurx.h
  • nmurx_WARN_CTL_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_CTL_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED : nmurx.h
  • nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmurx_WARN_NEW_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_LP_ORDER : nmurx.h
  • nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmurx.h
  • nmurx_WARN_OPN_BAD_NOISE_MODE_CFG : nmurx.h
  • nmurx_WARN_OPN_LP_ORDER_REJECTED : nmurx.h
  • nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmurx.h
  • nmutx_EXC_INVALID_MODE : nmutx.h
  • nmutx_WARN_CTL_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_CTL_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED : nmutx.h
  • nmutx_WARN_NEW_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_LP_ORDER : nmutx.h
  • nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG : nmutx.h
  • nmutx_WARN_OPN_BAD_NOISE_MODE_CFG : nmutx.h
  • nmutx_WARN_OPN_LP_ORDER_REJECTED : nmutx.h
  • nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED : nmutx.h


NMU: Data Fields

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

  • nmurxClose() : nmurx.h
  • nmurxControl() : nmurx.h
  • nmurxDelete() : nmurx.h
  • nmurxGetSizes() : nmurx.h
  • nmurxIsAlgSupported() : nmurx.h
  • nmurxNew() : nmurx.h
  • nmurxOpen() : nmurx.h
  • nmurxProcess() : nmurx.h
  • nmurxRelocate() : nmurx.h
  • nmutxClose() : nmutx.h
  • nmutxControl() : nmutx.h
  • nmutxDelete() : nmutx.h
  • nmutxGetSizes() : nmutx.h
  • nmutxGetStats() : nmutx.h
  • nmutxIsAlgSupported() : nmutx.h
  • nmutxNew() : nmutx.h
  • nmutxOpen() : nmutx.h
  • nmutxProcess() : nmutx.h
  • nmutxRelocate() : nmutx.h


NMU: Data Fields

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

  • nmutxStats_t : nmutx.h


NMU: Data Fields

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

  • nmurxXdaisCallTable : nmurx.h
  • nmutxXdaisCallTable : nmutx.h


NMU: Graph Legend

Graph Legend

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

Consider the following example:

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

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

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

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

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

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

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

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

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

The boxes in the above graph have the following meaning:

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


NMU: NMURX

NMURX

Collaboration diagram for NMURX:

Detailed Description

Modules

NMU RX Warning Codes
NMU Rx Warning Messages.
NMU RX Exception Codes
Exception Messages.
NMU RX Error Codes

Data Structures

struct | nmurxSizeConfig_t
Size query time configuration parameters. More...
struct | nmurxNewConfig_t
Create time configuration parameters. More...
struct | nmurxOpenConfig_t
Open time configuration parameters. More...
struct | nmurxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmurxXdaisAllocParams_t
configuration parameters overloading for algAlloc API More...
struct | nmurxXdaisInitParams_t
configuration parameters overloading for algInit API More...
struct | nmurxXdaisCallTable_t
NMU Rx's XDAIS call table definition. More...

XDAIS APIs

nmurxXdaisCallTable_t nmurxXdaisCallTable

ECO (Telogy Embedded Communication Object) APIs

Remarks:
new, delete, getSizes, Open, Close and relocate are standard ECO APIs so are not described here in detail. Return codes may be one of nmurx_ERROR or nmurx_NOERR.

tint | nmurxNew (void **nmurxInst, tint nbufs, ecomemBuffer_t *bufs, nmurxNewConfig_t *cfg)
void | nmurxDelete (void **nmurxInst)
tint | nmurxGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, nmurxSizeConfig_t *cfg)
tint | nmurxOpen (void *nmurxInst, nmurxOpenConfig_t *cfg)
void | nmurxClose (void *nmurxInst)
tint | nmurxRelocate (void **nmurxInst, tint nbufs, ecomemBuffer_t *bufs, tuint *relocBufBitMaskPtr)
void | nmurxProcess (void *nmurxInst, ISPHDEC1_FrameType frameType, tint inCwsegSize, tword *inCwseg, linSample *samples)
NMU Rx Processing.
void | nmurxControl (void *nmurxInst, ifnmurxConfig_t *cfg)
Control API.
tbool | nmurxIsAlgSupported (tuint mode)
API to query if noise_mode is supported in the image (does not mean it is enabled/disabled).

Defines

#define | nmurx_G711A2_MAX_LP_ORDER 10
#define | nmurx_W1 nmurx_WARN_NEW_BAD_NOISE_MODE_CFG, "New: Bad Noise Mode Config"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the warning codes.
#define | nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open: Noise Mode Config rejected"
#define | nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open: Bad Noise Mode Config"
#define | nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open: Bad Frame Size Config"
#define | nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open: Bad Level Format Config"
#define | nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER, "Open: Bad LP order Config"
#define | nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED, "Open: LP order Rejected"
#define | nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"
#define | nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order Config"
#define | nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
#define | nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"
#define | nmurx_E1 nmurx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
Useful for entries into a table in test/integration code for printing diagnostic messages related to the exception codes.

Define Documentation

#define nmurx_G711A2_MAX_LP_ORDER 10

Definition at line 83 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 121 of file nmurx.h.

#define nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open: Noise Mode Config rejected"

Definition at line 122 of file nmurx.h.

#define nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open: Bad Noise Mode Config"

Definition at line 123 of file nmurx.h.

#define nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open: Bad Frame Size Config"

Definition at line 124 of file nmurx.h.

#define nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open: Bad Level Format Config"

Definition at line 125 of file nmurx.h.

#define nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER, "Open: Bad LP order Config"

Definition at line 126 of file nmurx.h.

#define nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED, "Open: LP order Rejected"

Definition at line 127 of file nmurx.h.

#define nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"

Definition at line 128 of file nmurx.h.

#define nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order Config"

Definition at line 129 of file nmurx.h.

#define nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"

Definition at line 130 of file nmurx.h.

#define nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"

Definition at line 131 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 150 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 128 of file nmutx.h.

#define nmutx_W2 nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open/algInit: Noise Mode Config rejected"

Definition at line 129 of file nmutx.h.

#define nmutx_W3 nmutx_WARN_OPN_BAD_NOISE_MODE_CFG, "Open/algInit: Bad Noise Mode Config"

Definition at line 130 of file nmutx.h.

#define nmutx_W4 nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG, "Open/algInit: Bad Frame Size Config"

Definition at line 131 of file nmutx.h.

#define nmutx_W5 nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG, "Open/algInit: Bad Level Format Config"

Definition at line 132 of file nmutx.h.

#define nmutx_W6 nmutx_WARN_OPN_LP_ORDER_REJECTED, "Open/algInit: LP order Rejected"

Definition at line 133 of file nmutx.h.

#define nmutx_W7 nmutx_WARN_OPN_BAD_LP_ORDER, "Open/algInit: Bad LP order Config"

Definition at line 134 of file nmutx.h.

#define nmutx_W8 nmutx_WARN_CTL_LP_ORDER_REJECTED, "Control: LP order Rejected"

Definition at line 135 of file nmutx.h.

#define nmutx_W9 nmutx_WARN_CTL_BAD_LP_ORDER, "Control: Bad LP order"

Definition at line 136 of file nmutx.h.

#define nmutx_W10 nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"

Definition at line 137 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 156 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 155 of file nmurx.h.

#define nmurx_NOERR 0

API returned with no error

Definition at line 156 of file nmurx.h.

#define nmurx_ERROR 1

API returned with some error

Definition at line 157 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 142 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 91 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 161 of file nmutx.h.

#define nmutx_NOERR 0

API returned with no error

Definition at line 162 of file nmutx.h.

#define nmutx_ERROR 1

API returned with some error

Definition at line 163 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 148 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 90 of file nmutx.h.


NMU: NMU (Noise Matching Unit) Package

NMU (Noise Matching Unit) Package

Release 1.5.1.0

Page Contents

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

Description

The purpose of noise matching is to improve the speech quality during discontinuous transmission (DTX). Due to the presence of background noise, the absence of noise transmission can cause audible artifacts in the speech output at the receiving side (RX) during transitions between voice (in which background noise is present) and noise.

Additional links: Detailed NMU Description

Integration

The NMU component can be integrated into a system to perform voice activity detection as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

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

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

Additional links: | NMU External API
 | NMU Integration

Default Configuration

NMU configuration is defined in the external ifnmu interface (ifnmutx.h and ifnmurx.h)

NMU Tx Configuration

  1. None. This is no tracking of noise character during noise periods. Noise payload is generated only when voice to noise transition occurs with a fixed level in the payload of -70 dBm.
  2. Level. This is level matching i.e. level is tracked during noise periods.
  3. G.711 Appendix II. This is spectral matching.
  4. LP (Linear Prediction) order from 0 to 10

NMU Rx Configuration

  1. Fixed. This is NMURX generating fixed level as per configuration.
  2. Level adaptive. This is level matching.
  3. G.711 Appendix II. This is spectral matching.
  4. LP order from 0 to 10.
  5. Idle noise level. This is the fixed level corresponding to selection of Fixed Level CNG. It is also used for Level (only) Matching above by the receiver to generate this level of noise until it gets the first packet payload from the transmitter and it is asked to generate noise (this is typical of a situation when a call is established).

Interoperability between different configurations of TX and RX

Any configuration on TX is interoperable with any configuration on RX. The behavior for a particular combination of TX configuration with RX configuration can be determined by referring to Detailed NMU Description. For example, if NMUTX is configured as G.711 Appendix II with LP order 5 and NMURX is configured to be level adaptive, the NMUTX will send payloads with level and 5 spectral parameters and when NMURX receives this payload, it will only use the level information to generate pink noise of that level and ignore all the spectral parameters.

Performance

Performance measures for the NMU modules are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

N/A

Standards Compliance

Fixed Level

N/A

Level Matching

  • RFC3389 Real-time Transport Protocol for Comfort Noise

Spectrum Matching

  • Spectral matching CNG is compliant with G.711 Appendix II.
  • RFC3389 Real-time Transport Protocol for Comfort Noise

Dependent Packages

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

  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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 193 of file nmurx.h.

#define nmurx_LEVEL_FORMAT_dBm 1

Definition at line 196 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
00074 /* @{ */
00075
00076 #include <ti/mas/types/types.h>
00077 #include <ti/mas/util/ecomem.h>
00078 #include <ti/mas/util/debug.h>
00079 #include <ti/mas/iface/ifnmu/ifnmurx.h>
00080 #include <ti/xdais/dm/isphdec1.h>
00081
00082 /* limits of config params */
00083 #define nmurx_G711A2_MAX_LP_ORDER   10
00084
00090 /* @{ */
00091 enum {
00092   nmurx_WARN_NEW_BAD_NOISE_MODE_CFG       = 1,
00093   nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED  = 2,
00097   nmurx_WARN_OPN_BAD_NOISE_MODE_CFG       = 3,
00098   nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG       = 4,
00099   nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG       = 5,
00100   nmurx_WARN_OPN_BAD_LP_ORDER             = 6,
00101   nmurx_WARN_OPN_LP_ORDER_REJECTED        = 7,
00104   nmurx_WARN_CTL_BAD_LP_ORDER             = 8,
00105   nmurx_WARN_CTL_LP_ORDER_REJECTED        = 9,
00108   nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED  = 10,
00114   nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED = 11
00115 };
00116 /* @} */
00117
00121 #define nmurx_W1 nmurx_WARN_NEW_BAD_NOISE_MODE_CFG,       "New: Bad Noise Mode Config"
00122 #define nmurx_W2 nmurx_WARN_OPN_NOISE_MODE_CFG_REJECTED,  "Open: Noise Mode Config rejected"
00123 #define nmurx_W3 nmurx_WARN_OPN_BAD_NOISE_MODE_CFG,       "Open: Bad Noise Mode Config"
00124 #define nmurx_W4 nmurx_WARN_OPN_BAD_FRAME_SIZE_CFG,       "Open: Bad Frame Size Config"
00125 #define nmurx_W5 nmurx_WARN_OPN_BAD_LVL_FORMAT_CFG,       "Open: Bad Level Format Config"
00126 #define nmurx_W6 nmurx_WARN_OPN_BAD_LP_ORDER,             "Open: Bad LP order Config"
00127 #define nmurx_W7 nmurx_WARN_OPN_LP_ORDER_REJECTED,        "Open: LP order Rejected"
00128 #define nmurx_W8 nmurx_WARN_CTL_LP_ORDER_REJECTED,        "Control: LP order Rejected"
00129 #define nmurx_W9 nmurx_WARN_CTL_BAD_LP_ORDER,             "Control: Bad LP order Config"
00130 #define nmurx_W10 nmurx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
00131 #define nmurx_W11 nmurx_WARN_CTL_NOISE_LEVEL_CFG_REJECTED,"Control: Noise Level Config Rejected"
00132
00141 /* @{ */
00142 enum {
00143   nmurx_EXC_INVALID_MODE = 1
00144 };
00145 /* @} */
00146
00150 #define nmurx_E1 nmurx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
00151
00154 /* @{ */
00155 #define nmurx_NOMEMORY  (-1)
00156 #define nmurx_NOERR       0
00157 #define nmurx_ERROR       1
00158 /* @} */
00159
00167 typedef struct {
00168   ifnmurxConfig_t config;
00169 } nmurxSizeConfig_t;
00170
00176 typedef struct {
00177   tuint     ID;
00178   dbgInfo_t debugInfo;
00179   nmurxSizeConfig_t sizeCfg;
00180 } nmurxNewConfig_t;
00181
00188 typedef struct {
00189   tuint     frame_size;
00193 #define nmurx_LEVEL_FORMAT_dBov 0
00196 #define nmurx_LEVEL_FORMAT_dBm  1       /* This format is dBm, used for AAL2 */
00197   tuint     level_format;
00199   ifnmurxConfig_t config;
00200 } nmurxOpenConfig_t;
00201
00207 /* @{ */
00208 tint      nmurxNew(void **nmurxInst, tint nbufs, ecomemBuffer_t * bufs,
00209                    nmurxNewConfig_t * cfg);
00210 void      nmurxDelete(void **nmurxInst);
00211 tint      nmurxGetSizes(tint * nbufs, const ecomemBuffer_t ** bufs,
00212                         nmurxSizeConfig_t * cfg);
00213 tint      nmurxOpen(void *nmurxInst, nmurxOpenConfig_t * cfg);
00214 void      nmurxClose(void *nmurxInst);
00215 tint      nmurxRelocate(void **nmurxInst, tint nbufs, ecomemBuffer_t * bufs,
00216                         tuint * relocBufBitMaskPtr);
00217
00239 void      nmurxProcess(void *nmurxInst, ISPHDEC1_FrameType frameType, tint inCwsegSize,
00240                        tword *inCwseg, linSample *samples);
00241
00251 void      nmurxControl(void *nmurxInst, ifnmurxConfig_t * cfg);
00252
00259 tbool     nmurxIsAlgSupported(tuint mode);
00260 /* @} */
00261
00285 /* @{ */
00286 typedef struct {
00287   IALG_Params param;
00288   nmurxSizeConfig_t cfg;
00289 } nmurxXdaisAllocParams_t;
00290
00330 typedef struct {
00331   IALG_Params param;
00332   nmurxNewConfig_t  cfgNew;
00333   nmurxOpenConfig_t cfgOpen;
00334 } nmurxXdaisInitParams_t;
00335
00339 typedef struct {
00340     IALG_Fxns   ialg;
00346     void  (*process) (IALG_Handle handle, ISPHDEC1_FrameType frameType, tint inCwsegSize,
00347                        tword *inCwseg, linSample *outSamples);
00348
00353     void (*control)(IALG_Handle handle, ifnmurxConfig_t * cfg);
00354 } nmurxXdaisCallTable_t;
00355
00356 extern nmurxXdaisCallTable_t nmurxXdaisCallTable;
00357
00358 /* @} */ /* @name XDAIS APIs */
00359 /* @} */ /* ingroup */
00360
00361 #endif                          /* _NMURX_H */
00362 /* 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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 186 of file nmutx.h.

#define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS 160

20 ms processing

Definition at line 187 of file nmutx.h.

#define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS 240

30 ms processing

Definition at line 188 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 226 of file nmutx.h.

#define nmutx_LEVEL_FORMAT_dBm 1

level_format: This format is dBm, used for AAL2

Definition at line 229 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
00074 /* @{ */
00075
00076 #include <ti/xdais/xdas.h>
00077 #include <ti/xdais/ialg.h>
00078 #include <ti/mas/types/types.h>
00079 #include <ti/mas/util/ecomem.h>
00080 #include <ti/mas/util/debug.h>
00081 #include <ti/mas/iface/ifnmu/ifnmutx.h>
00082 #include <ti/xdais/dm/isphenc1.h>
00083
00089 /* @{ */
00090 enum {
00091   nmutx_WARN_NEW_BAD_NOISE_MODE_CFG = 1,
00092   nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED = 2,
00096   nmutx_WARN_OPN_BAD_NOISE_MODE_CFG = 3,
00097   nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG = 4,
00098   nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG = 5,
00099   nmutx_WARN_OPN_BAD_LP_ORDER = 6,
00100   nmutx_WARN_OPN_LP_ORDER_REJECTED = 7,
00105   nmutx_WARN_CTL_BAD_LP_ORDER = 8,
00106   nmutx_WARN_CTL_LP_ORDER_REJECTED = 9,
00110   nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED = 10
00122 };
00123 /* @} */
00124
00128 #define nmutx_W1 nmutx_WARN_NEW_BAD_NOISE_MODE_CFG,      "New/algInit: Bad Noise Mode Config"
00129 #define nmutx_W2 nmutx_WARN_OPN_NOISE_MODE_CFG_REJECTED, "Open/algInit: Noise Mode Config rejected"
00130 #define nmutx_W3 nmutx_WARN_OPN_BAD_NOISE_MODE_CFG,      "Open/algInit: Bad Noise Mode Config"
00131 #define nmutx_W4 nmutx_WARN_OPN_BAD_FRAME_SIZE_CFG,      "Open/algInit: Bad Frame Size Config"
00132 #define nmutx_W5 nmutx_WARN_OPN_BAD_LVL_FORMAT_CFG,      "Open/algInit: Bad Level Format Config"
00133 #define nmutx_W6 nmutx_WARN_OPN_LP_ORDER_REJECTED,       "Open/algInit: LP order Rejected"
00134 #define nmutx_W7 nmutx_WARN_OPN_BAD_LP_ORDER,            "Open/algInit: Bad LP order Config"
00135 #define nmutx_W8 nmutx_WARN_CTL_LP_ORDER_REJECTED,       "Control: LP order Rejected"
00136 #define nmutx_W9 nmutx_WARN_CTL_BAD_LP_ORDER,            "Control: Bad LP order"
00137 #define nmutx_W10 nmutx_WARN_CTL_NOISE_MODE_CFG_REJECTED, "Control: Noise Mode Config Rejected"
00138
00147 /* @{ */
00148 enum {
00149   nmutx_EXC_INVALID_MODE = 1
00150 };
00151 /* @} */
00152
00156 #define nmutx_E1 nmutx_EXC_INVALID_MODE, "Processing: Invalid Noise Mode"
00157
00160 /* @{ */
00161 #define nmutx_NOMEMORY  (-1)
00162 #define nmutx_NOERR       0
00163 #define nmutx_ERROR       1
00164 /* @} */
00165
00173 typedef struct {
00174   ifnmutxConfig_t config;
00175 } nmutxSizeConfig_t;
00176
00182 typedef struct {
00183   tuint     ID;
00184   dbgInfo_t debugInfo;
00186 #define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS   80
00187 #define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_20MS  160
00188 #define nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_30MS  240
00189   tint      g711a2TxProcessDecimateInterval;
00211   tuint (*isSidAllowed) (tuint ID);
00212
00213   nmutxSizeConfig_t sizeCfg;
00214 } nmutxNewConfig_t;
00215
00222 typedef struct {
00223   tuint     frame_size;
00226 #define nmutx_LEVEL_FORMAT_dBov 0
00229 #define nmutx_LEVEL_FORMAT_dBm  1
00230   tuint     level_format;
00232   ifnmutxConfig_t config;
00233 } nmutxOpenConfig_t;
00234
00238 typedef struct nmutxStats_s {
00239   tint      curr_bg_noise;
00240 } nmutxStats_t;
00241
00247 /* @{ */
00248 tint      nmutxGetSizes(tint * nbufs, const ecomemBuffer_t ** bufs,
00249                         nmutxSizeConfig_t * cfg);
00250 tint      nmutxNew(void **nmutxInst, tint nbufs, ecomemBuffer_t * bufs,
00251                    nmutxNewConfig_t * cfg);
00252 void      nmutxDelete(void **nmutxInst);
00253 tint      nmutxOpen(void *nmutxInst, nmutxOpenConfig_t * cfg);
00254 void      nmutxClose(void *nmutxInst);
00255 tint      nmutxRelocate(void **nmutxInst, tint nbufs, ecomemBuffer_t * bufs,
00256                         tuint * relocBufBitMaskPtr);
00288 tuint     nmutxProcess(void *nmutxInst, ISPHENC1_FrameType *frameType, tbool vadAlertFlag,
00289                        linSample *inSamples, tint *outCwsegSize, tword *outCwseg);
00290
00300 void      nmutxControl(void *nmutxInst, ifnmutxConfig_t * cfg);
00301
00308 tbool     nmutxIsAlgSupported(tuint mode);
00309
00318 void      nmutxGetStats(void *nmutxInst, tbool reset, nmutxStats_t * stats);
00319 /* @} */
00320
00344 /* @ {*/
00345 typedef struct {
00346   IALG_Params param;
00347   nmutxSizeConfig_t cfg;
00348 } nmutxXdaisAllocParams_t;
00349
00389 typedef struct {
00390   IALG_Params param;
00391   nmutxNewConfig_t  cfgNew;
00392   nmutxOpenConfig_t cfgOpen;
00393 } nmutxXdaisInitParams_t;
00394
00398 typedef struct {
00399     IALG_Fxns   ialg;
00405     void  (*process) (IALG_Handle handle, ISPHENC1_FrameType *frameType, tbool vadAlertFlag,
00406                        linSample *inSamples, tint *outCwsegSize, tword *outCwseg);
00407
00412     void (*control)(IALG_Handle handle, ifnmutxConfig_t * cfg);
00413 } nmutxXdaisCallTable_t;
00414
00415 extern nmutxXdaisCallTable_t nmutxXdaisCallTable;
00416 /* @} */ /* @name XDAIS APIs */
00417 /* @} */ /* ingroup */
00418
00419 #endif                          /* _NMUTX_H */
00420 /* 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 176 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 177 of file nmurx.h.

dbgInfo_t nmurxNewConfig_t::debugInfo

Generic call-back API for debug/exception, XDAIS default is NULL

Definition at line 178 of file nmurx.h.

nmurxSizeConfig_t nmurxNewConfig_t::sizeCfg

Definition at line 179 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 188 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 189 of file nmurx.h.

tuint nmurxOpenConfig_t::level_format

level_format: This format is dBm, used for AAL2

Definition at line 197 of file nmurx.h.

ifnmurxConfig_t nmurxOpenConfig_t::config

Configuration as per ifnmu external interface (ifnmurx.h)

Definition at line 199 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 167 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 168 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 286 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 287 of file nmurx.h.

nmurxSizeConfig_t nmurxXdaisAllocParams_t::cfg

refer to nmurxSizeConfig_t

Definition at line 288 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 339 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 340 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 330 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 331 of file nmurx.h.

nmurxNewConfig_t nmurxXdaisInitParams_t::cfgNew

refer to nmurxNewConfig_t

Definition at line 332 of file nmurx.h.

nmurxOpenConfig_t nmurxXdaisInitParams_t::cfgOpen

refer to nmurxOpenConfig_t

Definition at line 333 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 182 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 183 of file nmutx.h.

dbgInfo_t nmutxNewConfig_t::debugInfo

Generic call-back API for debug/exception, XDAIS default is NULL

Definition at line 184 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 189 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 213 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 222 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 223 of file nmutx.h.

tuint nmutxOpenConfig_t::level_format

format of level in packet (SID) payload

Definition at line 230 of file nmutx.h.

ifnmutxConfig_t nmutxOpenConfig_t::config

Definition at line 232 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 173 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 174 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 238 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 239 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 345 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 346 of file nmutx.h.

nmutxSizeConfig_t nmutxXdaisAllocParams_t::cfg

refer to nmutxSizeConfig_t

Definition at line 347 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 398 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 399 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 389 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 390 of file nmutx.h.

nmutxNewConfig_t nmutxXdaisInitParams_t::cfgNew

refer to nmutxNewConfig_t

Definition at line 391 of file nmutx.h.

nmutxOpenConfig_t nmutxXdaisInitParams_t::cfgOpen

refer to nmutxOpenConfig_t

Definition at line 392 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 102 of file test.c.

#define ti_mas_vau_Version__nolocalnames

Definition at line 103 of file test.c.

#define SIU_MAX_MODULE_NBUFS 100

required for ECO API memory descriptors, not for XDAIS APIs

Definition at line 118 of file test.c.

Referenced by siu_new_open_config_modules().

#define MAX_FRAME_SIZE 80

10 ms frame

Definition at line 119 of file test.c.

#define SIU_INITIAL_SILENCE_FRAMES 20

20*5 = 100 ms initial silence

Definition at line 120 of file test.c.

Referenced by siu_open().

#define nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"

Definition at line 130 of file test.c.

Referenced by siu_open().

#define nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"

Definition at line 131 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGAZ_FNAME "../../logs/Az.csv"

Definition at line 132 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGSID_FNAME "../../logs/SID.csv"

Definition at line 133 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"

Definition at line 134 of file test.c.

Referenced by siu_open().

#define SIU_MAX_ERR_MSG_STRING_LENGTH 100

Definition at line 412 of file test.c.

#define NMUTX_ID 1

Definition at line 423 of file test.c.

Referenced by siu_new_open_config_modules().

#define NMURX_ID 2

Definition at line 424 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 256 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 325 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 341 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 367 of file test.c.

Referenced by siu_new_open_config_modules().

char* siuGetMsg | ( | msgTable_t * | tbl,
 |  | tuint | size,
 |  | tuint | msgCode
 | ) |  |

Definition at line 431 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 444 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 497 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 812 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 1050 of file test.c.

References siuInst_s::inFrameFilePtr, and siuInst.

Referenced by main().

tint siu_write_outFrame | ( | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 1071 of file test.c.

References siuInst_s::outFrameFilePtr, and siuInst.

Referenced by main().

void hw_init ( void )

Definition at line 1082 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 1101 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 168 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 254 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 377 of file test.c.

msgTable_t nmuTxExceptions[]

Initial value:

 {
  nmutx_E1
}

Definition at line 390 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 394 of file test.c.

msgTable_t nmuRxExceptions[]

Initial value:

 {
  nmurx_E1
}

Definition at line 408 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 426 of file test.c.

Referenced by siu_debug_info().

linSample inFrame[MAX_FRAME_SIZE]

Definition at line 1099 of file test.c.

linSample outFrame[MAX_FRAME_SIZE]

Definition at line 1099 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. 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 5.2 or above and may be used for those who haven't yet upgraded to CCS V5.2 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 5.2 (Eclipse).

  1. Open CCS version 5.2 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 73 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 102 of file mem.c.

Referenced by siu_init_heaps().

#define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Definition at line 103 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 81 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 91 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 114 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 120 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 130 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 139 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 145 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 150 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 185 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 220 of file mem.c.

Referenced by siu_dealloc_ialg_mem().

Variable Documentation

tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE]

Definition at line 106 of file mem.c.

Referenced by siu_init_heaps().

tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE]

Definition at line 109 of file mem.c.

Referenced by siu_init_heaps().

siuMemHeap_t siuMemHeapVolatile

Definition at line 111 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().

siuMemHeap_t siuMemHeapNonVolatile

Definition at line 112 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <stdio.h>
00065 #include <stdlib.h>
00066 #include <string.h>
00067 #include <xdc/std.h>
00068 #include <ti/mas/types/types.h>
00069 #include <ti/mas/util/ecomem.h>
00070 #include <ti/xdais/ialg.h>
00071 #include <ti/mas/nmu/test/src/mem.h>
00072
00073 #define align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
00074
00075 typedef struct {
00076   tword *heapBase;
00077   tulong indx;
00078   tulong size;
00079 } siuMemHeap_t;
00080
00081 void siu_mem_heap_init(siuMemHeap_t *ptr, tword *heapBase, tulong size)
00082 {
00083   ptr->heapBase = heapBase;
00084   ptr->size = size;
00085   ptr->indx = 0;
00086
00087   /* Note : memory is not initialized deliberately to expose
00088             uninitialized memory read problems */
00089 }
00090
00091 tword *siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
00092 {
00093   tword *alloc = NULL;
00094
00095   if ((ptr->indx + size) <= ptr->size) {
00096     alloc = &ptr->heapBase[ptr->indx];
00097     ptr->indx += size;
00098   }
00099   return(alloc);
00100 }
00101
00102 #define SIU_MEM_VOLATILE_HEAP_SIZE 5000
00103 #define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000
00104
00105 #pragma DATA_SECTION (siuVolatileMemBufs, ".volatileMemBufs");
00106 tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE];
00107
00108 #pragma DATA_SECTION (siuNonVolatileMemBufs, ".nonVolatileMemBufs");
00109 tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE];
00110
00111 siuMemHeap_t siuMemHeapVolatile;
00112 siuMemHeap_t siuMemHeapNonVolatile;
00113
00114 void siu_init_heaps(void)
00115 {
00116   siu_mem_heap_init ( &siuMemHeapVolatile, siuVolatileMemBufs, SIU_MEM_VOLATILE_HEAP_SIZE);
00117   siu_mem_heap_init ( &siuMemHeapNonVolatile, siuNonVolatileMemBufs, SIU_MEM_NONVOLATILE_HEAP_SIZE);
00118 }
00119
00120 tword *siu_malloc (tint size, tbool volat)
00121 {
00122   if (volat == TRUE) /* Scratchpad type */ {
00123     return ( siu_mem_heap_alloc (&siuMemHeapVolatile, size) );
00124   }
00125   else {
00126     return ( siu_mem_heap_alloc (&siuMemHeapNonVolatile, size) );
00127   }
00128 }
00129
00130 static inline void print_header (void)
00131 {
00132   printf("+-----------+-----------+-----------+-------------+\n");
00133   printf("| Buffer ID | Alignment |   Size    | Volatility  |\n");
00134   printf("|           |  (Bytes)  | (Bytes)   |             |\n");
00135   printf("+-----------+-----------+-----------+-------------+\n");
00136 /*printf("| %9d | %9d | %9d | %11s |\n");*/
00137 }
00138
00139 static inline void print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
00140 {
00141   printf("| %9d | %9d | %9d | %11s |\n", ID, linAlign * (TYP_TWORD_SIZE/8),
00142         sizeMAUs * (TYP_TWORD_SIZE/8), (isVolat == TRUE)? "scratch" : "non-scratch" );
00143 }
00144
00145 static inline void print_footer (void)
00146 {
00147   printf("+-----------+-----------+-----------+-------------+\n");
00148 }
00149
00150 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00151                    ecomemBuffer_t * ecoBufsPtr)
00152 {
00153   tint      i;
00154   void     *allocPtr;
00155   tuint     linAlign, log2align;
00156   tbool     isVolat;
00157
00158   print_header();
00159
00160   for (i = 0; i < nbufs; i++) {
00161     ecoBufsPtr[i] = sizeBufsPtr[i];
00162
00163     isVolat = ecoBufsPtr[i].volat;
00164
00165     log2align = sizeBufsPtr[i].log2align;
00166     linAlign = (tuint) 1 << log2align;
00167
00168     print_buffer (i, linAlign, sizeBufsPtr[i].size, isVolat);
00169
00170     if (sizeBufsPtr[i].size == 0) {
00171       ecoBufsPtr[i].base = NULL;
00172       continue;
00173     }
00174
00175     if ((allocPtr = (void *) siu_malloc((sizeBufsPtr[i].size + linAlign - 1), isVolat)) == NULL) {
00176       printf("Not enough heap, exiting\n");
00177       exit(0);
00178     }
00179     ecoBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00180   }
00181
00182   print_footer();
00183 }
00184
00185 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00186 {
00187   tint      i;
00188   void     *allocPtr;
00189   tint     linAlign;
00190   tint      alignmentAdjustedSize;
00191   tbool    isVolat;
00192
00193   print_header();
00194
00195   for (i = 0; i < nbufs; i++) {
00196
00197     isVolat = (xdaisBufsPtr[i].attrs == IALG_SCRATCH) ? TRUE : FALSE;
00198     linAlign = (tint) xdaisBufsPtr[i].alignment;
00199
00200     print_buffer (i, linAlign, xdaisBufsPtr[i].size, isVolat);
00201
00202     if (xdaisBufsPtr[i].size == 0) {
00203       xdaisBufsPtr[i].base = NULL;
00204       continue;
00205     }
00206
00207     alignmentAdjustedSize = xdaisBufsPtr[i].size + linAlign - 1;
00208     if ((allocPtr = (void *) siu_malloc(alignmentAdjustedSize, isVolat)
00209         ) == NULL) {
00210       printf("Not enough heap, exiting\n");
00211       exit(0);
00212     }
00213     *mallocedSizeCounter += alignmentAdjustedSize;
00214     xdaisBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00215   }
00216
00217   print_footer();
00218 }
00219
00220 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00221 {
00222   tint i;
00223
00224   for(i = 0; i < nbufs; i++) {
00225     *mallocedSizeCounter -= (xdaisBufsPtr[i].size + xdaisBufsPtr[i].alignment - 1);
00226     if (xdaisBufsPtr[i].base) {
00227
00228     /* Note the free below may not have the right pointers as were in malloc because
00229        the module was fed aligned pointers, it is not possible to reverse and derive
00230        original unaligned pointer, so don't do free */
00231       //free(xdaisBufsPtr[i].base);
00232     }
00233   }
00234 }
00235
00236 /* 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 114 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 150 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 185 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 220 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <ti/mas/types/types.h>
00065 #include <ti/mas/util/ecomem.h>
00066 #include <ti/xdais/ialg.h>
00067
00068 void siu_init_heaps(void);
00069 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00070                    ecomemBuffer_t * ecoBufsPtr);
00071
00072 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00073 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00074
00075 /* 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
  • Disclaimer


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 140 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 141 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 143 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 147 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 149 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 151 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 155 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 156 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 157 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 158 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 208 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

running maximum of cycles

Definition at line 209 of file test.c.

tlong cycles_s::avg

running average of cycles (using exponential averaging)

Definition at line 210 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 372 of file test.c.

Data Fields

tuint | msgCode
char | msgString [200]

Field Documentation

tuint msgTable_t::msgCode

Definition at line 373 of file test.c.

char msgTable_t::msgString[200]

Definition at line 374 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 414 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 415 of file test.c.

char msgTables_t::name[SIU_MAX_ERR_MSG_STRING_LENGTH]

Definition at line 416 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::warnTbl

Definition at line 417 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeWarnTbl

Definition at line 418 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::excTbl

Definition at line 419 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeExcTbl

Definition at line 420 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 225 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 226 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 227 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 228 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 229 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 230 of file test.c.

Referenced by siu_new_open_config_modules().

IALG_Handle siuInst_s::nmurxXdaisInst

nmurx's XDAIS instance

Definition at line 231 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process_txrx().

tlong siuInst_s::frameCount

Definition at line 232 of file test.c.

Referenced by main(), and siu_process_txrx().

tlong siuInst_s::prevSIDframeCount

Definition at line 233 of file test.c.

Referenced by siu_process_txrx().

FILE* siuInst_s::inFrameFilePtr

Definition at line 234 of file test.c.

Referenced by siu_close(), siu_open(), and siu_read_inFrame().

FILE* siuInst_s::outFrameFilePtr

Definition at line 235 of file test.c.

Referenced by siu_close(), siu_open(), and siu_write_outFrame().

FILE* siuInst_s::AzFilePtr

Definition at line 239 of file test.c.

Referenced by siu_close(), and siu_open().

FILE* siuInst_s::SIDfilePtr

Definition at line 240 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process_txrx().

tint siuInst_s::inFrameInitialSilenceFrames

Definition at line 241 of file test.c.

Referenced by main(), and siu_open().

tlong siuInst_s::cyclesOverhead

to measure fixed overhead in cycle measurement

Definition at line 242 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesVau

Vau's cycle statistics

Definition at line 243 of file test.c.

Referenced by siu_process_txrx().

cycles_t siuInst_s::cyclesNmuTx

NMU Tx's cycles statistics

Definition at line 244 of file test.c.

Referenced by siu_process_txrx().

cycles_t siuInst_s::cyclesNmuRx

NMU Rx's cycles statistics

Definition at line 245 of file test.c.

tint siuInst_s::isVoice

set to 1 if voice frame post nmutx, else 0

Definition at line 246 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 247 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 248 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 249 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 75 of file mem.c.

Data Fields

tword * | heapBase
tulong | indx
tulong | size

Field Documentation

tword* siuMemHeap_t::heapBase

Definition at line 76 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::indx

Definition at line 77 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::size

Definition at line 78 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 214 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 218 of file test.c.

Referenced by siu_process_txrx().

ISPHENC1_FrameType vauSim_s::state

SPEECH or NO_DATA

Definition at line 219 of file test.c.

Referenced by siu_open(), and siu_process_txrx().

tbool vauSim_s::vadAlertFlag

whether or not voice alert

Definition at line 220 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.
Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 215 of file test.c.

Referenced by siu_process_txrx().

#define SIU_VAU_ALERT_IN_FRAMES 8

Definition at line 217 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
00081 /* @{ */
00082
00083 #include <stdio.h>
00084 #include <stdlib.h>
00085 #include <string.h>
00086 #include <xdc/std.h>
00087 #include <ti/mas/types/types.h>
00088 #include <ti/mas/util/utl.h>
00089 #include <ti/mas/util/pkt.h>
00090 #include <ti/mas/util/debug.h>
00091 #include <ti/mas/iface/ifvau/ifvau.h>
00092 #include <ti/mas/vau/vau.h>
00093 #include <ti/mas/iface/ifnmu/ifnmutx.h>
00094 #include <ti/mas/iface/ifnmu/ifnmurx.h>
00095 #include <ti/mas/nmu/nmutx.h>
00096 #include <ti/mas/nmu/nmurx.h>
00097 #include <ti/xdais/dm/isphenc1.h>
00098 #include <ti/xdais/dm/isphdec1.h>
00099 #include <ti/xdais/ialg.h>
00100 #include <ti/mas/nmu/test/src/mem.h>
00101
00102 #define ti_mas_nmu_Version__nolocalnames
00103 #define ti_mas_vau_Version__nolocalnames
00104
00105 #include <ti/mas/vau/Version.h>
00106 #include <ti/mas/nmu/Version.h>
00107
00108 // #define AZ_INFO_AVAILABLE
00109
00110 #ifdef USE_CACHE
00111 #include <ti/mas/sdk/memArchCfg.h>
00112 #endif
00113
00114 #ifdef PROFILE_CYCLES
00115 #include <ti/mas/sdk/profile.h>
00116 #endif
00117
00118 #define SIU_MAX_MODULE_NBUFS 100
00119 #define MAX_FRAME_SIZE 80
00120 #define SIU_INITIAL_SILENCE_FRAMES 20
00122 /* Handle CCS Project paths */
00123 #ifdef  __CCS_PROJECT_REL_PATH
00124 #define nmu_SIM_INPUT_FNAME        "../../../vectors/inp/in.raw"
00125 #define nmu_SIM_OUTPUT_FNAME       "../../../vectors/out/out.raw"
00126 #define nmu_SIM_LOGAZ_FNAME        "../../../logs/Az.csv"
00127 #define nmu_SIM_LOGSID_FNAME       "../../../logs/SID.csv"
00128 #define nmu_SIM_LOGCYC_FNAME       "../../../logs/cycles.txt"
00129 #else
00130 #define nmu_SIM_INPUT_FNAME        "../../vectors/inp/in.raw"
00131 #define nmu_SIM_OUTPUT_FNAME       "../../vectors/out/out.raw"
00132 #define nmu_SIM_LOGAZ_FNAME        "../../logs/Az.csv"
00133 #define nmu_SIM_LOGSID_FNAME       "../../logs/SID.csv"
00134 #define nmu_SIM_LOGCYC_FNAME       "../../logs/cycles.txt"
00135 #endif
00136
00137
00140 typedef struct config_s {
00141   tbool     xdaisFlag;
00143   tbool     xdaisDefaultCfgFlag;
00147   tint      frameSize;
00149   tint      vauBypass;
00151   tint      allNoiseAfterFirstVoice2Noise;
00155   ifvauConfig_t vauConfig;
00156   ifvauControl_t vauControl;
00157   ifnmutxConfig_t nmutxConfig;
00158   ifnmurxConfig_t nmurxConfig;
00159 #ifdef USE_CACHE
00160   tint  doCacheFlush;
00161   tint  doCacheEnable;
00162 #endif
00163 } config_t;
00164
00168 config_t  config = {
00169   1,  /* xdaisFlag */
00170   0,  /* don't use default configuration for xdais */
00171   80,                           /* 10 ms default frame size */
00172   0,                            /* do not bypass VAU */
00173   0,                            /* no setting permanently to noise after first
00174                                    transition */
00175
00176   /* vauConfig */
00177   {
00178    ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
00179    ifvau_TYPE_ADAPTIVE,
00180    0,
00181    180},
00182
00183   /* vauControl */
00184   {
00185    ifvau_VALID_CONTROL,
00186    ifvau_ENABLE},
00187
00188   /* nmutxConfig */
00189   {
00190    ifnmutx_CONFIG_VALID_NOISE_MODE | ifnmutx_CONFIG_VALID_NOISE_LP_ORDER,
00191    ifnmutx_CONFIG_NOISE_MODE_G711A2,
00192    ifnmutx_CONFIG_MAX_LP_ORDER,
00193    },
00194
00195   /* nmurxConfig */
00196   {
00197    ifnmurx_CONFIG_VALID_NOISE_MODE | ifnmurx_CONFIG_VALID_NOISE_LP_ORDER,
00198    ifnmurx_CONFIG_NOISE_MODE_G711A2,
00199    ifnmurx_CONFIG_MAX_LP_ORDER,
00200    }
00201 #ifdef USE_CACHE
00202  ,1, /* doCacheFlush */
00203   1  /* doCacheEnable */
00204 #endif
00205 };
00206
00208 typedef struct cycles_s {
00209   tlong     max;
00210   tlong     avg;
00211 } cycles_t;
00212
00213
00214 typedef struct vauSim_s {
00215 #define SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES 15
00217 #define SIU_VAU_ALERT_IN_FRAMES 8
00218   tint      countOnOff;
00219   ISPHENC1_FrameType state;
00220   tbool     vadAlertFlag;
00221 } vauSim_t;
00222
00225 typedef struct siuInst_s {
00226   void     *vauInst;
00227   IALG_Handle vauXdaisInst;
00228   void     *nmutxInst;
00229   IALG_Handle nmutxXdaisInst;
00230   void     *nmurxInst;
00231   IALG_Handle nmurxXdaisInst;
00232   tlong     frameCount;
00233   tlong     prevSIDframeCount;
00234   FILE     *inFrameFilePtr;
00235   FILE     *outFrameFilePtr;
00236 #ifdef PROFILE_CYCLES
00237   FILE   *outCyclesFilePtr;
00238 #endif
00239   FILE     *AzFilePtr;
00240   FILE     *SIDfilePtr;
00241   tint      inFrameInitialSilenceFrames;
00242   tlong     cyclesOverhead;
00243   cycles_t  cyclesVau;
00244   cycles_t  cyclesNmuTx;
00245   cycles_t  cyclesNmuRx;
00246   tint      isVoice;
00247   tuint     numSIDs;
00248   vauSim_t  vauSim;
00249   tulong   xdaisBufsMallocFreeCounter;
00252 } siuInst_t;
00253
00254 siuInst_t siuInst;
00255
00256 void siu_open(void)
00257 {
00258 #ifdef PROFILE_CYCLES
00259   volatile tlong cycles;
00260 #endif
00261
00262   memset(&siuInst, 0, sizeof(siuInst_t));
00263
00264   siu_init_heaps();
00265
00266   if ((siuInst.inFrameFilePtr = fopen(nmu_SIM_INPUT_FNAME, "rb")) == NULL) {
00267     printf(" Error opening in.raw\n");
00268     exit(0);
00269   }
00270
00271   if ((siuInst.outFrameFilePtr = fopen(nmu_SIM_OUTPUT_FNAME, "wb")) == NULL) {
00272     printf(" Error opening out.raw\n");
00273     exit(0);
00274   }
00275
00276   if ((siuInst.AzFilePtr = fopen(nmu_SIM_LOGAZ_FNAME, "wt")) == NULL) {
00277     printf(" Error opening Az.csv\n");
00278     exit(0);
00279   }
00280
00281   if ((siuInst.SIDfilePtr = fopen(nmu_SIM_LOGSID_FNAME, "wt")) == NULL) {
00282     printf(" Error opening SID.csv\n");
00283     exit(0);
00284   }
00285
00286   siuInst.inFrameInitialSilenceFrames = SIU_INITIAL_SILENCE_FRAMES;
00287
00288   siuInst.vauSim.state = ISPHENC1_FTYPE_SPEECH;
00289   siuInst.vauSim.vadAlertFlag = FALSE;
00290
00291   /* measure measurement overhead of cycles */
00292
00293 #ifdef PROFILE_CYCLES
00294   if ((siuInst.outCyclesFilePtr = fopen (nmu_SIM_LOGCYC_FNAME, "wt")) == NULL) {
00295     printf (" Error opening cycles.txt\n");
00296     exit(0);
00297   }
00298   cycles = profile_getCPUcycleCount();
00299 #endif
00300
00301 #ifdef PROFILE_CYCLES
00302   cycles = (profile_getCPUcycleCount() - cycles);
00303   siuInst.cyclesOverhead = cycles;
00304 #endif
00305
00306 }
00307
00308 #ifdef PROFILE_CYCLES
00309 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00310                                          tlong overhead)
00311 {
00312   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00313          (long) cyclesPtr->max - (long) overhead,
00314          (long) cyclesPtr->avg - (long) overhead);
00315 }
00316
00317 void siu_print_cycles(void)
00318 {
00319   siu_print_cycles_util(&siuInst.cyclesVau, "Vau", siuInst.cyclesOverhead);
00320   siu_print_cycles_util(&siuInst.cyclesNmuTx, "Nmu Tx", siuInst.cyclesOverhead);
00321   siu_print_cycles_util(&siuInst.cyclesNmuRx, "Nmu Rx", siuInst.cyclesOverhead);
00322 }
00323 #endif
00324
00325 void siu_dealloc_ialg_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr, tulong *mallocedSizeCounter)
00326 {
00327   Int nbufs;
00328   IALG_MemRec *xdaisBufsPtr;
00329
00330   nbufs = ialgFxnsPtr->algNumAlloc();
00331   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00332
00333   nbufs = ialgFxnsPtr->algFree(xdaisInstPtr, xdaisBufsPtr);
00334
00335   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00336
00337   free(xdaisBufsPtr);
00338 }
00339
00340
00341 void siu_close(void)
00342 {
00343   fclose(siuInst.inFrameFilePtr);
00344   fclose(siuInst.outFrameFilePtr);
00345   fclose(siuInst.AzFilePtr);
00346   fclose(siuInst.SIDfilePtr);
00347   printf(" Number of SIDs = %d\n", siuInst.numSIDs);
00348
00349 #ifdef PROFILE_CYCLES
00350   fclose(siuInst.outCyclesFilePtr);
00351   siu_print_cycles();
00352   profile_closeCycleProfiling();
00353 #endif
00354
00355   if (config.xdaisFlag) {
00356     siu_dealloc_ialg_mem (&nmurxXdaisCallTable.ialg, siuInst.nmurxXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00357     siu_dealloc_ialg_mem (&nmutxXdaisCallTable.ialg, siuInst.nmutxXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00358     siu_dealloc_ialg_mem (&vauXdaisCallTable.ialg, siuInst.vauXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00359     if (siuInst.xdaisBufsMallocFreeCounter) {
00360       printf(" Error: mismatched malloc-free\n");
00361     }
00362   }
00363
00364   memset(&siuInst, 0, sizeof(siuInst_t));
00365 }
00366
00367 tuint siu_pvp_control(tuint ID)
00368 {
00369   return (1);
00370 }
00371
00372 typedef struct {
00373  tuint msgCode;
00374  char  msgString[200];
00375 } msgTable_t;
00376
00377 msgTable_t nmuTxWarnings[] = {
00378   nmutx_W1,
00379   nmutx_W2,
00380   nmutx_W3,
00381   nmutx_W4,
00382   nmutx_W5,
00383   nmutx_W6,
00384   nmutx_W7,
00385   nmutx_W8,
00386   nmutx_W9,
00387   nmutx_W10
00388 };
00389
00390 msgTable_t nmuTxExceptions[] = {
00391   nmutx_E1
00392 };
00393
00394 msgTable_t nmuRxWarnings[] = {
00395   nmurx_W1,
00396   nmurx_W2,
00397   nmurx_W3,
00398   nmurx_W4,
00399   nmurx_W5,
00400   nmurx_W6,
00401   nmurx_W7,
00402   nmurx_W8,
00403   nmurx_W9,
00404   nmurx_W10,
00405   nmurx_W11
00406 };
00407
00408 msgTable_t nmuRxExceptions[] = {
00409   nmurx_E1
00410 };
00411
00412 #define SIU_MAX_ERR_MSG_STRING_LENGTH 100
00413
00414 typedef struct {
00415   tuint ID;
00416   char  name[SIU_MAX_ERR_MSG_STRING_LENGTH];
00417   msgTable_t *warnTbl;
00418   tuint sizeWarnTbl;
00419   msgTable_t *excTbl;
00420   tuint sizeExcTbl;
00421 } msgTables_t;
00422
00423 #define NMUTX_ID 1
00424 #define NMURX_ID 2
00425
00426 msgTables_t msgTables[] = {
00427   {NMUTX_ID, "nmuTx", nmuTxWarnings, sizeof(nmuTxWarnings)/sizeof(msgTable_t), nmuTxExceptions, sizeof(nmuTxExceptions)/sizeof(msgTable_t)},
00428   {NMURX_ID, "nmuRx", nmuRxWarnings, sizeof(nmuRxWarnings)/sizeof(msgTable_t), nmuRxExceptions, sizeof(nmuRxExceptions)/sizeof(msgTable_t)},
00429 };
00430
00431 char *siuGetMsg(msgTable_t *tbl, tuint size, tuint msgCode)
00432 {
00433   int i;
00434   for (i = 0; i < size; i++) {
00435     if (tbl[i].msgCode == msgCode) {
00436       return(tbl[i].msgString);
00437     }
00438   }
00439   printf(" Fatal: Table entry not found\n");
00440   exit(0);
00441   return(NULL);
00442 }
00443
00444 void siu_debug_info(void * inID, tuint msgType, tuint msgCode, tuint msgLength,
00445                     tuint * supportingData)
00446 {
00447   int i;
00448   int doExit = 0, found;
00449   msgTables_t *msgTblPtr;
00450   tuint ID = *((tuint *) inID);
00451
00452   for (i = 0, found = 0; i < sizeof(msgTables)/sizeof(msgTables_t); i++) {
00453     if (msgTables[i].ID == ID) {
00454       found = 1;
00455       msgTblPtr = &msgTables[i];
00456     }
00457   }
00458
00459   if (! found) {
00460      printf("Message from unknown module of ID %d received, quitting..\n", ID);
00461      exit(0);
00462   }
00463
00464   printf("%s :", msgTblPtr->name);
00465
00466   switch (msgType) {
00467     case  dbg_TRACE_INFO:
00468       printf("Trace Info: ");
00469     break;
00470     case dbg_WARNING:
00471       printf("Warning in ");
00472       printf("%s\n",siuGetMsg(msgTblPtr->warnTbl, msgTblPtr->sizeWarnTbl, msgCode));
00473     break;
00474     case dbg_EXCEPTION_FATAL:
00475       printf("Exception: ");
00476       printf("%s\n",siuGetMsg(msgTblPtr->excTbl, msgTblPtr->sizeExcTbl, msgCode));
00477       doExit = 1;
00478     break;
00479     default:
00480       printf(" Invalid diagnostic message, exiting..");
00481     break;
00482   }
00483
00484   if (msgLength) {
00485     printf("\nSupporting Data: ");
00486     for (i = 0; i < msgLength; i++) {
00487       printf("%d\n",supportingData[i]);
00488     }
00489   }
00490
00491   if (doExit) {
00492     printf("\n Exiting.. ");
00493     exit(0);
00494   }
00495 }
00496
00497 void siu_new_open_config_modules(config_t * config)
00498 {
00499   tint      nbufs, ret;
00500   const ecomemBuffer_t *sizeBufs;
00501   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00502   const IALG_Params *paramsPtr;
00503   IALG_MemRec *xdaisBufsPtr;
00504
00505   vauSizeConfig_t vauSizeCfg;
00506   vauOpenConfig_t vauOpenCfg;
00507
00508   vauXdaisInitParams_t vauXdaisInitParams;
00509
00510   nmutxSizeConfig_t nmutxSizeCfg;
00511   nmutxNewConfig_t nmutxNewCfg;
00512   nmutxOpenConfig_t nmutxOpenCfg;
00513
00514   nmutxXdaisAllocParams_t nmutxXdaisAllocParams;
00515   nmutxXdaisInitParams_t nmutxXdaisInitParams;
00516
00517   nmurxSizeConfig_t nmurxSizeCfg;
00518   nmurxNewConfig_t nmurxNewCfg;
00519   nmurxOpenConfig_t nmurxOpenCfg;
00520
00521   nmurxXdaisAllocParams_t nmurxXdaisAllocParams;
00522   nmurxXdaisInitParams_t nmurxXdaisInitParams;
00523
00524   vauXdaisInitParams.param.size = (Int) sizeof(vauXdaisInitParams_t);
00525
00526   nmutxXdaisAllocParams.param.size = (Int) sizeof(nmutxXdaisAllocParams_t);
00527   nmutxXdaisInitParams.param.size = (Int) sizeof(nmutxXdaisInitParams_t);
00528
00529   nmurxXdaisAllocParams.param.size = (Int) sizeof(nmurxXdaisAllocParams_t);
00530   nmurxXdaisInitParams.param.size = (Int) sizeof(nmurxXdaisInitParams_t);
00531
00532   printf("Querying VAU Memory Requirements\n");
00533
00534   vauSizeCfg.max_frame_size = config->frameSize;
00535   vauSizeCfg.max_sampling_rate_8k_multiple = vau_SAMP_RATE_8KHZ;
00536
00537   if (config->xdaisFlag) {
00538     nbufs = (tint) vauXdaisCallTable.ialg.algNumAlloc();
00539     if (nbufs == 0) {
00540       printf(" algNumAlloc error, exiting\n");
00541       exit(0);
00542     }
00543
00544     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00545     if (xdaisBufsPtr == NULL) {
00546       printf("Not enough heap for VAU memory records, exiting\n");
00547       exit(0);
00548     }
00549     if (config->xdaisDefaultCfgFlag) {
00550       paramsPtr = NULL;
00551     }
00552     else {
00553       /* currently no config supported in vau for alloc, but if introduce in
00554          future, refer to that configuration */
00555       paramsPtr = NULL;
00556     }
00557     vauXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00558   }
00559   else {
00560     if (vauGetSizes(&nbufs, &sizeBufs, &vauSizeCfg) != vau_NOERR) {
00561       printf(" Vau get sizes error, exiting \n");
00562       exit(0);
00563     }
00564   }
00565
00566   printf("Allocating VAU memory \n");
00567
00568   if (config->xdaisFlag) {
00569     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00570     siuInst.vauXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00571   }
00572   else {
00573     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00574   }
00575
00576   vauOpenCfg.frame_size = config->frameSize;
00577   vauOpenCfg.sampling_rate_8k_multiple = vau_SAMP_RATE_8KHZ;
00578   vauOpenCfg.config = config->vauConfig;
00579
00580   if (config->xdaisFlag) {
00581     if (config->xdaisDefaultCfgFlag) {
00582       paramsPtr = NULL;
00583     }
00584     else {
00585       vauXdaisInitParams.cfgOpen = vauOpenCfg;
00586       paramsPtr = (IALG_Params *) &vauXdaisInitParams;
00587     }
00588     ret = vauXdaisCallTable.ialg.algInit(siuInst.vauXdaisInst,
00589                                    xdaisBufsPtr, NULL, paramsPtr);
00590
00591     free(xdaisBufsPtr);
00592
00593     if (ret == IALG_EFAIL) {
00594       printf("algInit() failure, exiting\n");
00595       exit(0);
00596     }
00597   }
00598   else {
00599     if (vauNew(&(siuInst.vauInst), nbufs, ecoBufs) != vau_NOERR) {
00600       printf(" Vau New error, exiting \n");
00601       exit(0);
00602     }
00603     vauOpen(siuInst.vauInst, &vauOpenCfg);
00604   }
00605
00606   if (config->xdaisFlag) {
00607     vauXdaisCallTable.control (siuInst.vauXdaisInst, &(config->vauConfig), &(config->vauControl));
00608   }
00609   else {
00610     vauControl(siuInst.vauInst, &(config->vauConfig), &(config->vauControl));
00611   }
00612
00613   printf("Querying NMU Tx Memory Requirements\n");
00614
00615   /* nmu Tx */
00616   nmutxSizeCfg.config = config->nmutxConfig;
00617
00618   if (config->xdaisFlag) {
00619     nbufs = (tint) nmutxXdaisCallTable.ialg.algNumAlloc();
00620     if (nbufs == 0) {
00621       printf(" algNumAlloc error, exiting\n");
00622       exit(0);
00623     }
00624
00625     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00626     if (xdaisBufsPtr == NULL) {
00627       printf("Not enough heap for nmu tx memory records, exiting\n");
00628       exit(0);
00629     }
00630     if (config->xdaisDefaultCfgFlag) {
00631       paramsPtr = NULL;
00632     }
00633     else {
00634       nmutxXdaisAllocParams.cfg = nmutxSizeCfg;
00635       paramsPtr = (IALG_Params *) &nmutxXdaisAllocParams;
00636     }
00637     nmutxXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00638   }
00639   else {
00640     if (nmutxGetSizes(&nbufs, &sizeBufs, &nmutxSizeCfg) != nmutx_NOERR) {
00641       printf(" Nmu Tx get sizes error, exiting \n");
00642       exit(0);
00643     }
00644   }
00645
00646   printf("Allocating NMU Tx memory \n");
00647
00648   if (config->xdaisFlag) {
00649     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00650     siuInst.nmutxXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00651   }
00652   else {
00653     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00654   }
00655
00656   nmutxNewCfg.ID = NMUTX_ID;
00657   nmutxNewCfg.debugInfo = siu_debug_info;
00658   nmutxNewCfg.sizeCfg = nmutxSizeCfg;
00659   nmutxNewCfg.isSidAllowed = siu_pvp_control;
00660   nmutxNewCfg.g711a2TxProcessDecimateInterval =
00661       nmutx_G711A2_PROCESS_DECIMATE_INTERVAL_10MS;
00662   nmutxOpenCfg.level_format = nmutx_LEVEL_FORMAT_dBov;
00663   nmutxOpenCfg.frame_size = config->frameSize;
00664   nmutxOpenCfg.config = config->nmutxConfig;
00665
00666   if (config->xdaisFlag) {
00667     if (config->xdaisDefaultCfgFlag) {
00668       paramsPtr = NULL;
00669     }
00670     else {
00671       nmutxXdaisInitParams.cfgNew = nmutxNewCfg;
00672       nmutxXdaisInitParams.cfgOpen = nmutxOpenCfg;
00673       paramsPtr = (IALG_Params *) &nmutxXdaisInitParams;
00674     }
00675     ret = nmutxXdaisCallTable.ialg.algInit(siuInst.nmutxXdaisInst,
00676                                    xdaisBufsPtr, NULL, paramsPtr);
00677
00678     free(xdaisBufsPtr);
00679
00680     if (ret == IALG_EFAIL) {
00681       printf("algInit() failure, exiting\n");
00682       exit(0);
00683     }
00684   }
00685   else {
00686     if (nmutxNew(&siuInst.nmutxInst, nbufs, ecoBufs, &nmutxNewCfg) != nmutx_NOERR) {
00687       printf(" Nmu Tx New error, exiting \n");
00688       exit(0);
00689     }
00690
00691     nmutxOpen(siuInst.nmutxInst, &nmutxOpenCfg);
00692   }
00693
00694   /* although control is not necessary to exercise here, it is good to test to
00695      see if it does not produce side effects, real test is to issue
00696      control during frame processing */
00697   if (config->xdaisFlag) {
00698     nmutxXdaisCallTable.control (siuInst.nmutxXdaisInst, &(config->nmutxConfig));
00699   }
00700   else {
00701     nmutxControl(siuInst.nmutxInst, &(config->nmutxConfig));
00702   }
00703
00704   printf("Querying NMU Rx Memory Requirements\n");
00705
00706   nmurxSizeCfg.config = config->nmurxConfig;
00707
00708   if (config->xdaisFlag) {
00709     nbufs = (tint) nmurxXdaisCallTable.ialg.algNumAlloc();
00710     if (nbufs == 0) {
00711       printf(" algNumAlloc error, exiting\n");
00712       exit(0);
00713     }
00714
00715     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00716     if (xdaisBufsPtr == NULL) {
00717       printf("Not enough heap for nmu rx memory records, exiting\n");
00718       exit(0);
00719     }
00720     if (config->xdaisDefaultCfgFlag) {
00721       paramsPtr = NULL;
00722     }
00723     else {
00724       nmurxXdaisAllocParams.cfg = nmurxSizeCfg;
00725       paramsPtr = (IALG_Params *) &nmurxXdaisAllocParams;
00726     }
00727     nmurxXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00728   }
00729   else {
00730     /* nmu Rx */
00731     if (nmurxGetSizes(&nbufs, &sizeBufs, &nmurxSizeCfg) != nmurx_NOERR) {
00732       printf(" Nmu Rx get sizes error, exiting \n");
00733       exit(0);
00734     }
00735   }
00736
00737   printf("Allocating NMU Rx memory \n");
00738
00739   if (config->xdaisFlag) {
00740     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00741     siuInst.nmurxXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00742   }
00743   else {
00744     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00745   }
00746
00747   nmurxNewCfg.ID = NMURX_ID;
00748   nmurxNewCfg.debugInfo = siu_debug_info;
00749   nmurxNewCfg.sizeCfg = nmurxSizeCfg;
00750   nmurxOpenCfg.level_format = nmurx_LEVEL_FORMAT_dBov;
00751   nmurxOpenCfg.frame_size = config->frameSize;
00752   nmurxOpenCfg.config = config->nmurxConfig;
00753
00754   if (config->xdaisFlag) {
00755     if (config->xdaisDefaultCfgFlag) {
00756       paramsPtr = NULL;
00757     }
00758     else {
00759       nmurxXdaisInitParams.cfgNew = nmurxNewCfg;
00760       nmurxXdaisInitParams.cfgOpen = nmurxOpenCfg;
00761       paramsPtr = (IALG_Params *) &nmurxXdaisInitParams;
00762     }
00763     ret = nmurxXdaisCallTable.ialg.algInit(siuInst.nmurxXdaisInst,
00764                                    xdaisBufsPtr, NULL, paramsPtr);
00765
00766     free(xdaisBufsPtr);
00767
00768     if (ret == IALG_EFAIL) {
00769       printf("algInit() failure, exiting\n");
00770       exit(0);
00771     }
00772   }
00773   else {
00774     if (nmurxNew(&siuInst.nmurxInst, nbufs, ecoBufs, &nmurxNewCfg) != nmurx_NOERR) {
00775       printf(" Nmu Rx New error, exiting \n");
00776       exit(0);
00777     }
00778
00779     nmurxOpen(siuInst.nmurxInst, &nmurxOpenCfg);
00780   }
00781
00782   /* although control is not necessary to exercise here, it is good to test to
00783      see if it does not produce side effects, real test is to issue
00784      control during frame processing */
00785   if (config->xdaisFlag) {
00786     nmurxXdaisCallTable.control (siuInst.nmurxXdaisInst, &(config->nmurxConfig));
00787   }
00788   else {
00789     nmurxControl(siuInst.nmurxInst, &(config->nmurxConfig));
00790   }
00791 }
00792
00793 #ifdef PROFILE_CYCLES
00794 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00795 {
00796   if (cycles > cyclesPtr->max) {
00797     cyclesPtr->max = cycles;
00798   }
00799
00800   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00801 }
00802 #endif
00803
00804 #ifdef AZ_INFO_AVAILABLE
00805 extern tint glob_Az[];
00806 #endif
00807
00808 #if 0
00809 int       nmurxCount = 1;
00810 #endif
00811
00812 void siu_process_txrx(linSample * framePtr, linSample ** outFramePtr)
00813 {
00814   linSample *vauOutSamplesPtr = *outFramePtr;
00815   ISPHENC1_FrameType vauFrameType;
00816   tword *nmutxOutCwseg;
00817   tint  nmutxOutCwsegSize;
00818   ISPHDEC1_FrameType nmu_rx_frame_type;
00819   tint      i;
00820   tword    *cwseg;
00821   tbool     vadAlertFlag = FALSE;
00822
00823 #ifdef PROFILE_CYCLES
00824   volatile tlong cycles;
00825 #endif
00826 #ifdef AZ_INFO_AVAILABLE
00827   tint      sidDeclared;
00828 #endif
00829   tword     cwsegPackedMem[utlNbytes2NtwordsCeil(ifnmutx_CONFIG_MAX_LP_ORDER + 1)];
00830   tword     cwsegUnpacked[ifnmutx_CONFIG_MAX_LP_ORDER + 1];
00831   tint      numBytes;
00832
00833   nmutxOutCwseg = cwsegPackedMem;
00834
00835 #ifdef USE_CACHE
00836   if (config.doCacheFlush) {
00837     memarchcfg_cacheFlush();
00838   }
00839 #endif
00840
00841   if (config.vauBypass) {
00842     memcpy(vauOutSamplesPtr, framePtr, sizeof(linSample) * config.frameSize);
00843
00844     switch (siuInst.vauSim.state) {
00845       case ISPHENC1_FTYPE_SPEECH:
00846         if (siuInst.vauSim.countOnOff ==
00847             (SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES - SIU_VAU_ALERT_IN_FRAMES)) {
00848           siuInst.vauSim.vadAlertFlag = TRUE;
00849         }
00850         break;
00851       case ISPHENC1_FTYPE_NODATA:
00852         if ((!config.allNoiseAfterFirstVoice2Noise) &&
00853             (siuInst.vauSim.countOnOff == SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES)) {
00854           siuInst.vauSim.state = ISPHENC1_FTYPE_SPEECH;
00855           siuInst.vauSim.countOnOff = 0;
00856         }
00857         break;
00858       default:
00859         break;
00860     }
00861
00862     vadAlertFlag = siuInst.vauSim.vadAlertFlag;
00863
00864     if (siuInst.vauSim.vadAlertFlag) {
00865       if (siuInst.vauSim.countOnOff == SIU_VAU_ON_OFF_SEGMENT_IN_FRAMES - 1) {
00866         siuInst.vauSim.state = ISPHENC1_FTYPE_NODATA;
00867         siuInst.vauSim.countOnOff = 0;
00868         siuInst.vauSim.vadAlertFlag = FALSE;
00869       }
00870     }
00871
00872     siuInst.vauSim.countOnOff++;
00873     vauFrameType = siuInst.vauSim.state;
00874   }
00875   else {
00876
00877 #ifdef PROFILE_CYCLES
00878     cycles = profile_getCPUcycleCount();
00879 #endif
00880
00881     if (config.xdaisFlag) {
00882       vadAlertFlag =
00883       vauXdaisCallTable.process(siuInst.vauXdaisInst, framePtr, &vauOutSamplesPtr,
00884                   &vauFrameType);
00885     }
00886     else {
00887       vadAlertFlag =
00888       vauProcess(siuInst.vauInst, framePtr, &vauOutSamplesPtr,
00889                 &vauFrameType);
00890     }
00891
00892 #if 0
00893     printf("c = %ld, f = %d a = %d\n", (long) siuInst.frameCount, vauFrameType,
00894            vadAlertFlag);
00895
00896     if (siuInst.frameCount > 279) {
00897       int       i, j, k;
00898
00899       printf("f = %d\n", (long) siuInst.frameCount);
00900       for (j = 0, k = 0; j < 8; j++) {
00901         for (i = 0; i < 10; i++) {
00902           printf("%7d ", (int) vauOutSamplesPtr[k++]);
00903         }
00904         printf("\n");
00905       }
00906     }
00907 #endif
00908
00909 #ifdef PROFILE_CYCLES
00910     cycles = (profile_getCPUcycleCount() - cycles);
00911     siu_process_cycles(cycles, &siuInst.cyclesVau);
00912 #endif
00913
00914   }
00915
00916 #ifdef USE_CACHE
00917   if (config.doCacheFlush) {
00918     memarchcfg_cacheFlush();
00919   }
00920 #endif
00921
00922 #ifdef PROFILE_CYCLES
00923   cycles = profile_getCPUcycleCount();
00924 #endif
00925
00926   /* vau above will classify as voice, noise (no-data) and generate alert flag,
00927      nmutx will classify as voice, sid or noise */
00928   if (config.xdaisFlag) {
00929     nmutxXdaisCallTable.process(siuInst.nmutxXdaisInst, &vauFrameType, vadAlertFlag,
00930                                 vauOutSamplesPtr, &nmutxOutCwsegSize, nmutxOutCwseg);
00931   }
00932   else {
00933     nmutxProcess(siuInst.nmutxInst, &vauFrameType, vadAlertFlag, vauOutSamplesPtr,
00934                  &nmutxOutCwsegSize, nmutxOutCwseg);
00935   }
00936
00937 #ifdef PROFILE_CYCLES
00938   cycles = (profile_getCPUcycleCount() - cycles);
00939   siu_process_cycles(cycles, &siuInst.cyclesNmuTx);
00940   fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00941 #endif
00942
00943   /* translate to appropriate frame types to be understood by rx nmu */
00944 #ifdef AZ_INFO_AVAILABLE
00945   sidDeclared = 0;
00946 #endif
00947   switch (vauFrameType) {
00948     case ISPHENC1_FTYPE_SIDFRAME:
00949       nmu_rx_frame_type = ISPHDEC1_FTYPE_SIDUPDATE;
00950       if (siuInst.isVoice) {
00951         printf(" SID tx ( first)");
00952       }
00953       else {
00954         printf(" SID tx (update)");
00955       }
00956       printf(" at frame %10ld, deltaTime = %5ld, SID = ", (long) siuInst.frameCount,
00957              (long) (siuInst.frameCount - siuInst.prevSIDframeCount));
00958       siuInst.prevSIDframeCount = siuInst.frameCount;
00959       cwseg = nmutxOutCwseg;
00960       numBytes = nmutxOutCwsegSize / 8;
00961
00962       /* unpacking only for printing/logging purpose */
00963       pktUnpackWordsIntoBytes(cwseg, cwsegUnpacked, numBytes, 0);
00964       for (i = 0; i < numBytes; i++) {
00965         printf("%d ", cwsegUnpacked[i]);
00966         fprintf(siuInst.SIDfilePtr, "%5d, ", cwsegUnpacked[i]);
00967       }
00968       printf("\n");
00969       fprintf(siuInst.SIDfilePtr, "\n");
00970
00971       siuInst.isVoice = 0;
00972
00973 #ifdef AZ_INFO_AVAILABLE
00974       sidDeclared = 1;
00975 #endif
00976
00977       siuInst.numSIDs++;
00978
00979       break;
00980
00981     case ISPHENC1_FTYPE_SPEECH:
00982       nmu_rx_frame_type = ISPHDEC1_FTYPE_SPEECHGOOD;
00983       siuInst.isVoice = 1;
00984       break;
00985
00986     case ISPHENC1_FTYPE_NODATA:
00987       nmu_rx_frame_type = ISPHDEC1_FTYPE_NODATA;
00988       siuInst.isVoice = 0;
00989       break;
00990
00991     default:
00992       printf(" Bad nmu Tx out frame type\n");
00993       exit(0);
00994       break;
00995   }
00996
00997 #ifdef USE_CACHE
00998   if (config.doCacheFlush) {
00999     memarchcfg_cacheFlush();
01000   }
01001 #endif
01002
01003 #ifdef PROFILE_CYCLES
01004   cycles = profile_getCPUcycleCount();
01005 #endif
01006
01007 #if 0
01008   {
01009     int       i;
01010
01011     printf("\nNmu Rx call %d\n", nmurxCount++);
01012     printf("frameType %d\n", nmu_rx_frame_type);
01013     // printf("cwseg_size %d\n",nmutxOutCwsegSize);
01014     if (nmu_rx_frame_type == ISPHDEC1_FTYPE_SPEECHGOOD) {
01015       for (i = 0; i < 80; i++) {
01016         printf("%d\n", (int) vauOutSamplesPtr[i]);
01017       }
01018     }
01019   }
01020 #endif
01021
01022   if (config.xdaisFlag) {
01023     nmurxXdaisCallTable.process(siuInst.nmurxXdaisInst, nmu_rx_frame_type,
01024                                 nmutxOutCwsegSize, cwseg, vauOutSamplesPtr);
01025   }
01026   else {
01027     nmurxProcess(siuInst.nmurxInst, nmu_rx_frame_type, nmutxOutCwsegSize, cwseg, vauOutSamplesPtr);
01028   }
01029
01030 #ifdef PROFILE_CYCLES
01031   cycles = (profile_getCPUcycleCount() - cycles);
01032   siu_process_cycles(cycles, &siuInst.cyclesNmuRx);
01033 #endif
01034
01035 #ifdef AZ_INFO_AVAILABLE
01036   if (sidDeclared) {
01037     int       i;
01038
01039     fprintf(siuInst.AzFilePtr, "%ld,", (long) siuInst.frameCount);
01040     for (i = 0; i <= 10; i++) {
01041       fprintf(siuInst.AzFilePtr, "%f,", (float) glob_Az[i] / 4096.0);
01042     }
01043     fprintf(siuInst.AzFilePtr, "\n");
01044   }
01045 #endif
01046
01047   *outFramePtr = vauOutSamplesPtr;
01048 }
01049
01050 tint siu_read_inFrame(linSample * inFramePtr, tint numSamples)
01051 {
01052   int       i;
01053
01054   for (i = 0; i < numSamples; i++) {
01055     int       lsb, msb;
01056
01057     lsb = fgetc(siuInst.inFrameFilePtr);
01058     msb = fgetc(siuInst.inFrameFilePtr);
01059     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
01060   }
01061
01062   if (feof(siuInst.inFrameFilePtr)) {
01063     /* silence the last frame as it could have garbage */
01064     memset(inFramePtr, 0, numSamples * sizeof(linSample));
01065     return (0);
01066   }
01067   else {
01068     return (1);
01069   }
01070 }
01071 tint siu_write_outFrame(linSample * outFramePtr, tint numSamples)
01072 {
01073   int       i;
01074
01075   for (i = 0; i < numSamples; i++) {
01076     fputc(outFramePtr[i] & 0xFF, siuInst.outFrameFilePtr);
01077     fputc(((outFramePtr[i] >> 8) & 0xFF), siuInst.outFrameFilePtr);
01078   }
01079   return (0);
01080 }
01081
01082 void hw_init(void)
01083 {
01084 #ifdef PROFILE_CYCLES
01085   if (!profile_initCycleProfiling()) {
01086     printf("Could not acquire profiling resources..Exiting\n");
01087     exit(0);
01088   }
01089 #endif
01090
01091 #ifdef USE_CACHE
01092   if (config.doCacheEnable) {
01093     memarchcfg_cacheEnable();
01094   }
01095 #endif
01096 }
01097
01098
01099 linSample inFrame[MAX_FRAME_SIZE], outFrame[MAX_FRAME_SIZE];
01100
01101 void main(void)
01102 {
01103   linSample *outFramePtr = outFrame;
01104
01105   printf("Version Information of modules tested:\n");
01106   printf("VAU %d.%d.%d.%d\n",
01107           ti_mas_vau_Version_MAJOR, ti_mas_vau_Version_MINOR,
01108           ti_mas_vau_Version_XVERTICAL, ti_mas_vau_Version_PATCH);
01109
01110   printf("NMU %d.%d.%d.%d\n\n",
01111           ti_mas_nmu_Version_MAJOR, ti_mas_nmu_Version_MINOR,
01112           ti_mas_nmu_Version_XVERTICAL, ti_mas_nmu_Version_PATCH);
01113
01114   if (config.xdaisFlag) {
01115     printf("Using XDAIS APIs\n");
01116   }
01117   else {
01118     printf("Using ECO APIs\n");
01119   }
01120
01121   hw_init();
01122
01123   siu_open();
01124
01125   siu_new_open_config_modules(&config);
01126
01127   printf("Processing Frames..\n");
01128
01129   /* send some initial silence, this is the assumed background in which files will
01130      be piped in */
01131   while (siuInst.inFrameInitialSilenceFrames) {
01132     memset(inFrame, 0, config.frameSize * sizeof(linSample));
01133     siuInst.inFrameInitialSilenceFrames--;
01134     siu_process_txrx(inFrame, &outFramePtr);
01135   }
01136
01137   while (siu_read_inFrame(inFrame, config.frameSize)) {
01138     siuInst.frameCount++;
01139
01140     siu_process_txrx(inFrame, &outFramePtr);
01141
01142     if (siu_write_outFrame(outFramePtr, config.frameSize)) {
01143       printf(" Error writing output frame, exiting \n");
01144       exit(0);
01145
01146     }
01147
01148   }
01149
01150   siu_close();
01151
01152 }
01153
01154
01155 /* @} */ /* ingroup */
01156
01157 /* 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 (1)
#define | ti_mas_plc_Version_BUILD (0)
#define | ti_mas_plc_Version_QUALITY (3)
#define | ti_mas_plc_Version_BTYPE (0)
#define | ti_mas_plc_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_plc_Version_MAJOR
#define | Version_MINOR ti_mas_plc_Version_MINOR
#define | Version_XVERTICAL ti_mas_plc_Version_XVERTICAL
#define | Version_PATCH ti_mas_plc_Version_PATCH
#define | Version_BUILD ti_mas_plc_Version_BUILD
#define | Version_QUALITY ti_mas_plc_Version_QUALITY
#define | Version_BTYPE ti_mas_plc_Version_BTYPE
#define | Version_WIDTH ti_mas_plc_Version_WIDTH

Define Documentation

#define ti_mas_plc_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_plc_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_plc_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_plc_Version_MINOR (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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_plc_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_plc_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_plc_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_plc_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_plc_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_plc_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_plc_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_plc_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_plc_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_plc_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_plc_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_plc_Version_WIDTH

Definition at line 97 of file Version.h.


PLC: Version.h Source File

  • File List
  • Globals

Version.h

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


PLC: Data Structures

  • Data Structures
  • Data Fields

PLC Data Structures

Here are the data structures with brief descriptions:
plcNewConfig_t | Create time configuration parameters
plcOpenConfig_t | Open time configuration parameters
plcSizeConfig_t | Size query time configuration parameters
plcXdaisAllocParams_t | Configuration parameters overloading for algAlloc API
plcXdaisCallTable_t | PLC's XDAIS call table definition
plcXdaisInitParams_t | Configuration parameters overloading for algInit API


PLC: Detailed PLC Description

PLC (Packet Loss Concealment) Package

Detailed PLC Description

Description

Packet Loss Concealment (PLC) is a mechanism to synthesize the missing signal during the period of packet loss. PLC algorithms, also known as frame erasure concealment algorithms, hide transmission losses in an audio system where the input signal is encoded and packetized at a transmitter, sent over a network, and received at a receiver that decodes the packet and plays out the output. PLC algorithms are designed to eliminate or minimize the speech-quality distortion and annoying impairments, such as pops, clicks, glitches, and harshness. Many speech coders have their own PLC algorithm built into the corresponding standards. The details of PLC algorithms can be found in corresponding codec descriptions.

This package includes the implementation of ITU-T Recommendation G.711 Appendix I, which is a high-quality, low-complexity algorithm for packet loss concealment. It requires a 47.85 msec. history buffer and has a 3.75 msec. algorithm delay. The PLC algorithm of ITU-T Recommendation G.711 Appendix I is capable of concealing errors when packets include up to 50 msec. of speech, and is effective when packet loss rates are as high as 20%. Annoying impairments, such as clicks, pops, and harshness are minimized, though intelligibility may suffer when packet loss rates are high.


PLC:

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

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

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

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

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

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

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

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

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


PLC: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


PLC: doxygen.h Source File

  • File List
  • Globals

doxygen.h

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


PLC: PLC External API

PLC (Packet Loss Concealment) Package

PLC External API

Page Contents

  1. PLC ECO API
  2. PLC ECO Creation Functions
  3. PLC ECO Configuration Functions
  4. PLC ECO Execution Functions
  5. PLC ECO Destruction Functions
  6. PLC ECO Return Codes
  7. PLC XDais API

PLC ECO API

The PLC Embedded Communication Object (ECO) API consists of the following nine routines for PLC instance creation, configuration, destruction and execution.

  1. plcGetSizes()
  2. plcNew()
  3. plcOpen()
  4. plcControl()
  5. plcIsAlgSupported()
  6. plcRelocate()
  7. plcProcess()
  8. plcClose()
  9. plcDelete()

PLC ECO Creation Functions

PLC instance creation is a four step process. First, determine the PLC memory requirements via plcGetSizes below. Second, allocate the PLC memory buffers using any system-prescribed method. Create the PLC instance by passing the allocated buffer information to plcNew. Finally, open the PLC instance for use via the plcOpen API function. This process must be followed in the order given for proper operation. Once an PLC instance is opened, it may be used for packet concealment. Follow the links below for further details.

  1. plcGetSizes()
  2. plcNew()
  3. plcOpen()

PLC ECO Configuration Functions

The PLC component has two external API configuration routines; one to configure the instance - plcControl(), and one to to query for algorithmic support - plcIsAlgSupported. These external API functions require an active PLC instance that has been opened according to the procedure in PLC ECO Creation Functions above. Follow the links below for further details.

  1. plcControl()
  2. plcIsAlgSupported()

PLC ECO Execution Functions

The PLC execution API consists of two routines, one for RX path (Network-to_TDM) processing - plcProcess, and one for module instance relocation - plcRelocate. The execution API functions require an active PLC module instance that has been opened according to the procedure in PLC ECO Creation Functions above. Follow the links below for further details.

  1. plcProcess()
  2. plcRelocate()

PLC ECO Destruction Functions

PLC instance desctruction is a two step process. First, the PLC must be closed using the plcClose API function. Once the PLC is closed it may be removed via the plcDelete function.

  1. plcClose()
  2. plcDelete()

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

PLC ECO Return Codes

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

  • PLC Warning Codes
  • PLC Error Codes
  • PLC Exception Codes

PLC XDais API

The PLC eXpressDsp Algorithm Interoperability Standard (XDAIS) API is available via plcXdaisCallTable. This call table provides the control and process API functions.


PLC: File Index

  • File List
  • Globals

PLC File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
plc.h [code] API definitions for the PLC component. Includes XDAIS and ECO (Telogy-proprietary) API definitions


PLC: Data Fields

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

  • cfg : plcXdaisAllocParams_t
  • cfgNew : plcXdaisInitParams_t
  • cfgOpen : plcXdaisInitParams_t
  • codingType : plcOpenConfig_t
  • config : plcSizeConfig_t , plcOpenConfig_t
  • control : plcXdaisCallTable_t
  • debugInfo : plcNewConfig_t
  • frame_size : plcOpenConfig_t
  • ialg : plcXdaisCallTable_t
  • ID : plcNewConfig_t
  • param : plcXdaisAllocParams_t , plcXdaisInitParams_t
  • process : plcXdaisCallTable_t
  • sizeCfg : plcNewConfig_t


PLC: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • cfg : plcXdaisAllocParams_t
  • cfgNew : plcXdaisInitParams_t
  • cfgOpen : plcXdaisInitParams_t
  • codingType : plcOpenConfig_t
  • config : plcSizeConfig_t , plcOpenConfig_t
  • control : plcXdaisCallTable_t
  • debugInfo : plcNewConfig_t
  • frame_size : plcOpenConfig_t
  • ialg : plcXdaisCallTable_t
  • ID : plcNewConfig_t
  • param : plcXdaisAllocParams_t , plcXdaisInitParams_t
  • process : plcXdaisCallTable_t
  • sizeCfg : plcNewConfig_t


PLC: Data Fields

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

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

- _ -

  • __extern : Version.h

- p -

  • plc_CODING_TYPE_ALAW : plc.h
  • plc_CODING_TYPE_MULAW : plc.h
  • plc_E1 : plc.h
  • plc_ERROR : plc.h
  • plc_EXC_INVALID_TYPE : plc.h
  • plc_NOERR : plc.h
  • plc_NOMEMORY : plc.h
  • plc_W1 : plc.h
  • plc_W2 : plc.h
  • plc_WARN_NEW_BAD_PLC_TYPE : plc.h
  • plc_WARN_OPN_BAD_PLC_TYPE : plc.h
  • plcClose() : plc.h
  • plcControl() : plc.h
  • plcDelete() : plc.h
  • plcGetSizes() : plc.h
  • plcIsAlgSupported() : plc.h
  • plcNew() : plc.h
  • plcOpen() : plc.h
  • plcProcess() : plc.h
  • plcRelocate() : plc.h
  • plcXdaisCallTable : plc.h

- t -

  • ti_mas_plc_Version___VERS : Version.h
  • ti_mas_plc_Version__top__ : Version.h
  • ti_mas_plc_Version_BTYPE : Version.h
  • ti_mas_plc_Version_BUILD : Version.h
  • ti_mas_plc_Version_MAJOR : Version.h
  • ti_mas_plc_Version_MINOR : Version.h
  • ti_mas_plc_Version_PATCH : Version.h
  • ti_mas_plc_Version_QUALITY : Version.h
  • ti_mas_plc_Version_WIDTH : Version.h
  • ti_mas_plc_Version_XVERTICAL : Version.h

- v -

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


PLC: Data Fields

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

  • __extern : Version.h
  • plc_CODING_TYPE_ALAW : plc.h
  • plc_CODING_TYPE_MULAW : plc.h
  • plc_E1 : plc.h
  • plc_ERROR : plc.h
  • plc_NOERR : plc.h
  • plc_NOMEMORY : plc.h
  • plc_W1 : plc.h
  • plc_W2 : plc.h
  • ti_mas_plc_Version___VERS : Version.h
  • ti_mas_plc_Version__top__ : Version.h
  • ti_mas_plc_Version_BTYPE : Version.h
  • ti_mas_plc_Version_BUILD : Version.h
  • ti_mas_plc_Version_MAJOR : Version.h
  • ti_mas_plc_Version_MINOR : Version.h
  • ti_mas_plc_Version_PATCH : Version.h
  • ti_mas_plc_Version_QUALITY : Version.h
  • ti_mas_plc_Version_WIDTH : Version.h
  • ti_mas_plc_Version_XVERTICAL : Version.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


PLC: Data Fields

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

  • plc_EXC_INVALID_TYPE : plc.h
  • plc_WARN_NEW_BAD_PLC_TYPE : plc.h
  • plc_WARN_OPN_BAD_PLC_TYPE : plc.h


PLC: Data Fields

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

  • plcClose() : plc.h
  • plcControl() : plc.h
  • plcDelete() : plc.h
  • plcGetSizes() : plc.h
  • plcIsAlgSupported() : plc.h
  • plcNew() : plc.h
  • plcOpen() : plc.h
  • plcProcess() : plc.h
  • plcRelocate() : plc.h


PLC: Data Fields

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

  • plcXdaisCallTable : plc.h


PLC: Graph Legend

Graph Legend

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

Consider the following example:

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

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

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

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

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

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

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

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

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

The boxes in the above graph have the following meaning:

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


PLC: PLC Error Codes

PLC Error Codes
[PLC]

Collaboration diagram for PLC Error Codes:

Detailed Description

Error codes returned by PLC APIs.

Defines

#define | plc_NOMEMORY (-1)
#define | plc_NOERR 0
#define | plc_ERROR 1

Define Documentation

#define plc_NOMEMORY (-1)

Not used presently

Definition at line 135 of file plc.h.

#define plc_NOERR 0

Definition at line 136 of file plc.h.

#define plc_ERROR 1

Definition at line 137 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 126 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 118 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 104 of file plc.h.

#define plc_W2 plc_WARN_OPN_BAD_PLC_TYPE, "plcOpen/algInit: Bad PLC type"

Definition at line 105 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 95 of file plc.h.


PLC: PLC (Packet Loss Concealment) Package

PLC (Packet Loss Concealment) Package

Release 1.3.1.0

Page Contents

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

Description

Packet Loss Concealment (PLC) is a mechanism to synthesize the missing signal during the period of packet loss. PLC algorithms, also known as frame erasure concealment algorithms, hide transmission losses in an audio system where the input signal is encoded and packetized at a transmitter, sent over a network, and received at a receiver that decodes the packet and plays out the output. PLC algorithms are designed to eliminate or minimize the speech-quality distortion and annoying impairments, such as pops, clicks, glitches, and harshness. Many speech coders have their own PLC algorithm built into the corresponding standards.

Additional links: Detailed PLC Description

Integration

The PLC component can be integrated into a system to perform voice activity detection as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

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

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

Additional links: | PLC External API
 | PLC Integration

Default Configuration

The following PLC parameters are configurable at instance creation (plcOpen):

  • Frame size (required)
  • Coding type (a-law/u-law required for ECO only)
  • Mode (ifplc_TYPE_NONE/ifplc_TYPE_G711A1)

The following PLC parameters are run-time configurable:

  • Mode (ifplc_TYPE_NONE/ifplc_TYPE_G711A1)

See plcControl() for more information.

Performance

The performance of the PLC algorithm depends on the specific codec implementation, speech signal characteristics, and packet loss patterns relative to the speech signal.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

N/A.

Standards Compliance

  • Packet loss concealment (PLC) is compliant with G.711 Appendix I.

Dependent Packages

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

  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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 169 of file plc.h.

#define plc_CODING_TYPE_ALAW 1

Definition at line 170 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
00074 /* @{ */
00075 #include <ti/xdais/xdas.h>
00076 #include <ti/xdais/ialg.h>
00077 #include <ti/mas/types/types.h>
00078 #include <ti/xdais/dm/isphdec1.h>
00079 #include <ti/mas/iface/ifplc/ifplc.h>
00080 #include <ti/mas/util/debug.h>
00081 #include <ti/mas/util/ecomem.h>
00082
00083 #ifdef G711A1_USE_GMP
00084 #ifndef G711A1
00085 #error G711A1_USE_GMP can only be defined when G711A1 is defined - Correct Makefile Parameters
00086 #endif
00087 #endif
00088
00094 /* @{ */
00095 enum {
00096   plc_WARN_NEW_BAD_PLC_TYPE = 1,
00097   plc_WARN_OPN_BAD_PLC_TYPE = 2
00098 };
00099
00104 #define plc_W1 plc_WARN_NEW_BAD_PLC_TYPE, "plcNew/algInit: Bad PLC type"
00105 #define plc_W2 plc_WARN_OPN_BAD_PLC_TYPE, "plcOpen/algInit: Bad PLC type"
00106 /* @} */
00107
00108
00117 /* @{ */
00118 enum {
00119   plc_EXC_INVALID_TYPE = 1
00120 };
00121
00126 #define plc_E1 plc_EXC_INVALID_TYPE, "Processing: Invalid plc type"
00127 /* @} */
00128
00134 /* @{ */
00135 #define plc_NOMEMORY  (-1)
00136 #define plc_NOERR       0
00137 #define plc_ERROR       1
00138 /* @} */
00139
00146 typedef struct {
00147   ifplcConfig_t config;
00148 } plcSizeConfig_t;
00149
00155 typedef struct {
00156   tuint     ID;
00157   dbgInfo_t debugInfo;
00158   plcSizeConfig_t sizeCfg;
00159 } plcNewConfig_t;
00160
00167 typedef struct {
00168   tuint     frame_size;
00169 #define    plc_CODING_TYPE_MULAW  0
00170 #define    plc_CODING_TYPE_ALAW   1
00171   tuint     codingType;
00175   ifplcConfig_t config;
00176 } plcOpenConfig_t;
00177
00182 /* @{ */
00183 tint      plcNew(void **plcInst, tint nbufs, ecomemBuffer_t * bufs,
00184                  plcNewConfig_t * cfg);
00185 void      plcDelete(void **plcInst);
00186 tint      plcGetSizes(tint * nbufs, const ecomemBuffer_t ** bufs,
00187                       plcSizeConfig_t * cfg);
00188 tint      plcOpen(void *plcInst, plcOpenConfig_t * cfg);
00189 void      plcClose(void *plcInst);
00190 tint      plcRelocate(void **plcInst, tint nbufs, ecomemBuffer_t * bufs,
00191                       tuint * relocBufBitMask);
00213 void      plcProcess(void *plcInst, linSample * cwIn, linSample * inSamples,
00214                         ISPHDEC1_FrameType frameType, tint bufferDepth);
00227 tuint     plcControl(void *plcInst, ifplcConfig_t * cfg);
00228
00235 tbool     plcIsAlgSupported(tuint mode);
00236
00237 #ifdef G711A1_USE_GMP
00238 void      g711a1ResetHistory(void *plcInst);
00239 void      g711a1UpdateHistory(void *plcInst, void *gmp_ptr);
00240 tuint     g711a1GetGmpUsage(void *plcInst);
00241 void      g711a1DropGmp(void *plcInst);
00242 void      g711a1FreeGmc(void *plcInst);
00243 #endif
00244 /* @} */ /* @name ECO APIs */
00245
00246
00266 /* @{ */
00267 typedef struct {
00268   IALG_Params param;
00269   plcSizeConfig_t cfg;
00270 } plcXdaisAllocParams_t;
00271
00307 typedef struct {
00308   IALG_Params param;
00309   plcNewConfig_t  cfgNew;
00310   plcOpenConfig_t cfgOpen;
00311 } plcXdaisInitParams_t;
00312
00316 typedef struct {
00317     IALG_Fxns   ialg;
00322     void  (*process) (IALG_Handle handle, linSample * cw_in, linSample * smpin,
00323                         ISPHDEC1_FrameType frame_type, tint bufferDepth);
00324
00329     tuint (*control)(IALG_Handle handle, ifplcConfig_t * cfg);
00330 } plcXdaisCallTable_t;
00331
00335 extern plcXdaisCallTable_t plcXdaisCallTable;
00336 /* @} */ /* @name XDAIS APIs */
00337 /* @} */ /* ingroup PLC */
00338
00339 #endif                          /* _PLC_H */
00340
00341 /* 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 155 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 156 of file plc.h.

dbgInfo_t plcNewConfig_t::debugInfo

Generic call-back API for debug/exception, XDAIS default is NULL

Definition at line 157 of file plc.h.

plcSizeConfig_t plcNewConfig_t::sizeCfg

size configuration as described in the structure definition

Definition at line 158 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 167 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 168 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 171 of file plc.h.

ifplcConfig_t plcOpenConfig_t::config

Configuration as per ifplc external interface

Definition at line 175 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 146 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 147 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 267 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 268 of file plc.h.

plcSizeConfig_t plcXdaisAllocParams_t::cfg

refer to plcSizeConfig_t definition

Definition at line 269 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 316 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 317 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 307 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 308 of file plc.h.

plcNewConfig_t plcXdaisInitParams_t::cfgNew

refer to plcNewConfig_t definition

Definition at line 309 of file plc.h.

plcOpenConfig_t plcXdaisInitParams_t::cfgOpen

refer to plcOpenConfig_t definition

Definition at line 310 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 107 of file test.c.

Referenced by siu_new_open_config_modules().

#define MAX_FRAME_LENGTH 80

10 ms frame

Definition at line 108 of file test.c.

#define plc_SIM_INP_FNAME "../../vectors/inp/in.raw"

Definition at line 118 of file test.c.

Referenced by siu_open().

#define plc_SIM_INPFE_FNAME "../../vectors/inp/inFE.txt"

Definition at line 119 of file test.c.

Referenced by siu_open().

#define plc_SIM_OUT_FNAME "../../vectors/out/outNoPLC.raw"

Definition at line 120 of file test.c.

Referenced by siu_open().

#define plc_SIM_OUTPLC_FNAME "../../vectors/out/outPLC.raw"

Definition at line 121 of file test.c.

Referenced by siu_open().

#define plc_SIM_LOGCYC_FNAME "../../logs/cycles.txt"

Definition at line 122 of file test.c.

Referenced by siu_open().

#define SIU_MAX_ERR_MSG_STRING_LENGTH 100

Definition at line 197 of file test.c.

#define PLC_ID 1

Definition at line 208 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 215 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 229 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 282 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 297 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 365 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 388 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 495 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 550 of file test.c.

Referenced by main().

tint siu_write_outFrame | ( | FILE * | filePtr,
 |  | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 572 of file test.c.

Referenced by main().

void hw_init ( void )

Definition at line 589 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 608 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 144 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 181 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 188 of file test.c.

msgTable_t plcExceptions[]

Initial value:

 {
  plc_E1
}

Definition at line 193 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 210 of file test.c.

Referenced by siu_debug_info().

linSample inFrame[MAX_FRAME_LENGTH]

Definition at line 605 of file test.c.

linSample outFramePLC[MAX_FRAME_LENGTH]

Definition at line 605 of file test.c.

linSample outFrameNoPLC[MAX_FRAME_LENGTH]

Definition at line 605 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. 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 5.2 or above and may be used for those who haven't yet upgraded to CCS version 5.2 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 5.2 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 74 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 103 of file mem.c.

Referenced by siu_init_heaps().

#define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Definition at line 104 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 82 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 92 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 115 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 121 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 131 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 140 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 146 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 151 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 186 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 221 of file mem.c.

Referenced by siu_dealloc_plc_xdais_mem().

Variable Documentation

tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE]

Definition at line 107 of file mem.c.

Referenced by siu_init_heaps().

tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE]

Definition at line 110 of file mem.c.

Referenced by siu_init_heaps().

siuMemHeap_t siuMemHeapVolatile

Definition at line 112 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().

siuMemHeap_t siuMemHeapNonVolatile

Definition at line 113 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <stdio.h>
00065 #include <stdlib.h>
00066 #include <string.h>
00067 #include <xdc/std.h>
00068
00069 #include <ti/mas/types/types.h>
00070 #include <ti/mas/util/ecomem.h>
00071 #include <ti/xdais/ialg.h>
00072 #include <ti/mas/plc/test/src/mem.h>
00073
00074 #define align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
00075
00076 typedef struct {
00077   tword *heapBase;
00078   tulong indx;
00079   tulong size;
00080 } siuMemHeap_t;
00081
00082 void siu_mem_heap_init(siuMemHeap_t *ptr, tword *heapBase, tulong size)
00083 {
00084   ptr->heapBase = heapBase;
00085   ptr->size = size;
00086   ptr->indx = 0;
00087
00088   /* Note : memory is not initialized deliberately to expose
00089             uninitialized memory read problems */
00090 }
00091
00092 tword *siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
00093 {
00094   tword *alloc = NULL;
00095
00096   if ((ptr->indx + size) <= ptr->size) {
00097     alloc = &ptr->heapBase[ptr->indx];
00098     ptr->indx += size;
00099   }
00100   return(alloc);
00101 }
00102
00103 #define SIU_MEM_VOLATILE_HEAP_SIZE 5000
00104 #define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000
00105
00106 #pragma DATA_SECTION (siuVolatileMemBufs, ".volatileMemBufs");
00107 tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE];
00108
00109 #pragma DATA_SECTION (siuNonVolatileMemBufs, ".nonVolatileMemBufs");
00110 tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE];
00111
00112 siuMemHeap_t siuMemHeapVolatile;
00113 siuMemHeap_t siuMemHeapNonVolatile;
00114
00115 void siu_init_heaps(void)
00116 {
00117   siu_mem_heap_init ( &siuMemHeapVolatile, siuVolatileMemBufs, SIU_MEM_VOLATILE_HEAP_SIZE);
00118   siu_mem_heap_init ( &siuMemHeapNonVolatile, siuNonVolatileMemBufs, SIU_MEM_NONVOLATILE_HEAP_SIZE);
00119 }
00120
00121 tword *siu_malloc (tint size, tbool volat)
00122 {
00123   if (volat == TRUE) /* Scratchpad type */ {
00124     return ( siu_mem_heap_alloc (&siuMemHeapVolatile, size) );
00125   }
00126   else {
00127     return ( siu_mem_heap_alloc (&siuMemHeapNonVolatile, size) );
00128   }
00129 }
00130
00131 static inline void print_header (void)
00132 {
00133   printf("+-----------+-----------+-----------+-------------+\n");
00134   printf("| Buffer ID | Alignment |   Size    | Volatility  |\n");
00135   printf("|           |  (Bytes)  | (Bytes)   |             |\n");
00136   printf("+-----------+-----------+-----------+-------------+\n");
00137 /*printf("| %9d | %9d | %9d | %11s |\n");*/
00138 }
00139
00140 static inline void print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
00141 {
00142   printf("| %9d | %9d | %9d | %11s |\n", ID, linAlign * (TYP_TWORD_SIZE/8),
00143         sizeMAUs * (TYP_TWORD_SIZE/8), (isVolat == TRUE)? "scratch" : "non-scratch" );
00144 }
00145
00146 static inline void print_footer (void)
00147 {
00148   printf("+-----------+-----------+-----------+-------------+\n");
00149 }
00150
00151 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00152                    ecomemBuffer_t * ecoBufsPtr)
00153 {
00154   tint      i;
00155   void     *allocPtr;
00156   tuint     linAlign, log2align;
00157   tbool     isVolat;
00158
00159   print_header();
00160
00161   for (i = 0; i < nbufs; i++) {
00162     ecoBufsPtr[i] = sizeBufsPtr[i];
00163
00164     isVolat = ecoBufsPtr[i].volat;
00165
00166     log2align = sizeBufsPtr[i].log2align;
00167     linAlign = (tuint) 1 << log2align;
00168
00169     print_buffer (i, linAlign, sizeBufsPtr[i].size, isVolat);
00170
00171     if (sizeBufsPtr[i].size == 0) {
00172       ecoBufsPtr[i].base = NULL;
00173       continue;
00174     }
00175
00176     if ((allocPtr = (void *) siu_malloc((sizeBufsPtr[i].size + linAlign - 1), isVolat)) == NULL) {
00177       printf("Not enough heap, exiting\n");
00178       exit(0);
00179     }
00180     ecoBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00181   }
00182
00183   print_footer();
00184 }
00185
00186 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00187 {
00188   tint      i;
00189   void     *allocPtr;
00190   tint     linAlign;
00191   tint      alignmentAdjustedSize;
00192   tbool    isVolat;
00193
00194   print_header();
00195
00196   for (i = 0; i < nbufs; i++) {
00197
00198     isVolat = (xdaisBufsPtr[i].attrs == IALG_SCRATCH) ? TRUE : FALSE;
00199     linAlign = (tint) xdaisBufsPtr[i].alignment;
00200
00201     print_buffer (i, linAlign, xdaisBufsPtr[i].size, isVolat);
00202
00203     if (xdaisBufsPtr[i].size == 0) {
00204       xdaisBufsPtr[i].base = NULL;
00205       continue;
00206     }
00207
00208     alignmentAdjustedSize = xdaisBufsPtr[i].size + linAlign - 1;
00209     if ((allocPtr = (void *) siu_malloc(alignmentAdjustedSize, isVolat)
00210         ) == NULL) {
00211       printf("Not enough heap, exiting\n");
00212       exit(0);
00213     }
00214     *mallocedSizeCounter += alignmentAdjustedSize;
00215     xdaisBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00216   }
00217
00218   print_footer();
00219 }
00220
00221 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00222 {
00223   tint i;
00224
00225   for(i = 0; i < nbufs; i++) {
00226     if(xdaisBufsPtr[i].size)
00227   {
00228     *mallocedSizeCounter -= (xdaisBufsPtr[i].size + xdaisBufsPtr[i].alignment - 1);
00229   }
00230     if (xdaisBufsPtr[i].base) {
00231
00232     /* Note the free below may not have the right pointers as were in malloc because
00233        the module was fed aligned pointers, it is not possible to reverse and derive
00234        original unaligned pointer, so don't do free */
00235       //free(xdaisBufsPtr[i].base);
00236     }
00237   }
00238 }
00239
00240 /* 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 115 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 151 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 186 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 221 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <ti/mas/types/types.h>
00065 #include <ti/mas/util/ecomem.h>
00066 #include <ti/xdais/ialg.h>
00067
00068 void siu_init_heaps(void);
00069 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00070                    ecomemBuffer_t * ecoBufsPtr);
00071
00072 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00073 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00074
00075 /* Nothing past this point */


PLC Test: Module Index

PLC Test Modules

Here is a list of all modules:
  • PLCTEST


PLC Test: Page Index

PLC Test Related Pages

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


PLC Test: config_s Struct Reference

  • Data Structures
  • Data Fields

config_s Struct Reference
[PLCTEST]

Detailed Description

global test configuration structure definition

Definition at line 128 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 129 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 130 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 132 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 134 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 159 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

Definition at line 160 of file test.c.

tlong cycles_s::avg

Definition at line 161 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 183 of file test.c.

Data Fields

tuint | msgCode
char | msgString [200]

Field Documentation

tuint msgTable_t::msgCode

Definition at line 184 of file test.c.

char msgTable_t::msgString[200]

Definition at line 185 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 199 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 200 of file test.c.

char msgTables_t::name[SIU_MAX_ERR_MSG_STRING_LENGTH]

Definition at line 201 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::warnTbl

Definition at line 202 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeWarnTbl

Definition at line 203 of file test.c.

Referenced by siu_debug_info().

msgTable_t* msgTables_t::excTbl

Definition at line 204 of file test.c.

Referenced by siu_debug_info().

tuint msgTables_t::sizeExcTbl

Definition at line 205 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 164 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 165 of file test.c.

Referenced by siu_new_open_config_modules(), and siu_process().

IALG_Handle siuInst_s::plcXdaisInst

Definition at line 166 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process().

tlong siuInst_s::frameCount

Definition at line 167 of file test.c.

Referenced by main(), and siu_process().

FILE* siuInst_s::inFrameFilePtr

Definition at line 168 of file test.c.

Referenced by main(), siu_close(), and siu_open().

FILE* siuInst_s::outFrameFilePtrNoPLC

Definition at line 169 of file test.c.

Referenced by main(), siu_close(), and siu_open().

FILE* siuInst_s::outFrameFilePtrPLC

Definition at line 170 of file test.c.

Referenced by main(), siu_close(), and siu_open().

tlong siuInst_s::cyclesOverhead

Definition at line 174 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesPlc

Definition at line 175 of file test.c.

Referenced by siu_process().

FILE* siuInst_s::eraseFilePtr

Definition at line 176 of file test.c.

Referenced by siu_close(), siu_open(), and siu_process().

tuint siuInst_s::frameToBeErased

Definition at line 177 of file test.c.

Referenced by siu_open(), and siu_process().

tulong siuInst_s::xdaisBufsMallocFreeCounter

Definition at line 178 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 76 of file mem.c.

Data Fields

tword * | heapBase
tulong | indx
tulong | size

Field Documentation

tword* siuMemHeap_t::heapBase

Definition at line 77 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::indx

Definition at line 78 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::size

Definition at line 79 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
Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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
00082 /* @{ */
00083
00084 #include <stdio.h>
00085 #include <stdlib.h>
00086 #include <string.h>
00087 #include <xdc/std.h>
00088
00089 #include <ti/mas/types/types.h>
00090 #include <ti/mas/util/utl.h>
00091 #include <ti/mas/iface/ifplc/ifplc.h>
00092 #include <ti/mas/plc/plc.h>
00093 #include <ti/xdais/dm/isphdec1.h>
00094 #include <ti/mas/util/ecomem.h>
00095 #include <ti/mas/plc/Version.h>
00096 #include <ti/xdais/ialg.h>
00097 #include <ti/mas/plc/test/src/mem.h>
00098
00099 #ifdef USE_CACHE
00100 #include <ti/mas/sdk/memArchCfg.h>
00101 #endif
00102
00103 #ifdef PROFILE_CYCLES
00104 #include <ti/mas/sdk/profile.h>
00105 #endif
00106
00107 #define SIU_MAX_MODULE_NBUFS 100
00108 #define MAX_FRAME_LENGTH 80
00110 /* Handle CCS Project paths */
00111 #ifdef  __CCS_PROJECT_REL_PATH
00112 #define plc_SIM_INP_FNAME          "../../../vectors/inp/in.raw"
00113 #define plc_SIM_INPFE_FNAME        "../../../vectors/inp/inFE.txt"
00114 #define plc_SIM_OUT_FNAME          "../../../vectors/out/outNoPLC.raw"
00115 #define plc_SIM_OUTPLC_FNAME       "../../../vectors/out/outPLC.raw"
00116 #define plc_SIM_LOGCYC_FNAME       "../../../logs/cycles.txt"
00117 #else
00118 #define plc_SIM_INP_FNAME          "../../vectors/inp/in.raw"
00119 #define plc_SIM_INPFE_FNAME        "../../vectors/inp/inFE.txt"
00120 #define plc_SIM_OUT_FNAME          "../../vectors/out/outNoPLC.raw"
00121 #define plc_SIM_OUTPLC_FNAME       "../../vectors/out/outPLC.raw"
00122 #define plc_SIM_LOGCYC_FNAME       "../../logs/cycles.txt"
00123 #endif
00124
00125
00128 typedef struct config_s {
00129   tbool     xdaisFlag;
00130   tbool     xdaisDefaultCfgFlag;
00132   tint      frameLength;
00134   ifplcConfig_t plcConfig;
00135 #ifdef USE_CACHE
00136   tint  doCacheFlush;
00137   tint  doCacheEnable;
00138 #endif
00139 } config_t;
00140
00144 config_t  config = {
00145   1,  /* xdaisFlag */
00146   0,  /* don't use default configuration for xdais */
00147   80,                           /* 10 ms default frame size */
00148
00149   /* plcConfig */
00150   {
00151    ifplc_TYPE_G711A1
00152   }
00153 #ifdef USE_CACHE
00154  ,1, /* doCacheFlush */
00155   1  /* doCacheEnable */
00156 #endif
00157 };
00158
00159 typedef struct cycles_s {
00160   tlong     max;
00161   tlong     avg;
00162 } cycles_t;
00163
00164 typedef struct siuInst_s {
00165   void     *plcInst;
00166   IALG_Handle plcXdaisInst;
00167   tlong     frameCount;
00168   FILE     *inFrameFilePtr;
00169   FILE     *outFrameFilePtrNoPLC;
00170   FILE     *outFrameFilePtrPLC;
00171 #ifdef PROFILE_CYCLES
00172   FILE   *outCyclesFilePtr;
00173 #endif
00174   tlong     cyclesOverhead;
00175   cycles_t  cyclesPlc;
00176   FILE     *eraseFilePtr;
00177   tuint    frameToBeErased;
00178   tulong   xdaisBufsMallocFreeCounter;
00179 } siuInst_t;
00180
00181 siuInst_t siuInst;
00182
00183 typedef struct {
00184   tuint     msgCode;
00185   char      msgString[200];
00186 } msgTable_t;
00187
00188 msgTable_t plcWarnings[] = {
00189   plc_W1,
00190   plc_W2
00191 };
00192
00193 msgTable_t plcExceptions[] = {
00194   plc_E1
00195 };
00196
00197 #define SIU_MAX_ERR_MSG_STRING_LENGTH 100
00198
00199 typedef struct {
00200   tuint     ID;
00201   char      name[SIU_MAX_ERR_MSG_STRING_LENGTH];
00202   msgTable_t *warnTbl;
00203   tuint     sizeWarnTbl;
00204   msgTable_t *excTbl;
00205   tuint     sizeExcTbl;
00206 } msgTables_t;
00207
00208 #define PLC_ID 1
00209
00210 msgTables_t msgTables[] = {
00211   {PLC_ID, "plc", plcWarnings, sizeof(plcWarnings) / sizeof(msgTable_t),
00212    plcExceptions, sizeof(plcExceptions) / sizeof(msgTable_t)}
00213 };
00214
00215 char     *siuGetMsg(msgTable_t * tbl, tuint size, tuint msgCode)
00216 {
00217   int       i;
00218
00219   for (i = 0; i < size; i++) {
00220     if (tbl[i].msgCode == msgCode) {
00221       return (tbl[i].msgString);
00222     }
00223   }
00224   printf(" Fatal: Table entry not found\n");
00225   exit(0);
00226   return (NULL);
00227 }
00228
00229 void siu_debug_info(void *inID, tuint msgType, tuint msgCode, tuint msgLength,
00230                     tuint * supportingData)
00231 {
00232   int       i;
00233   int       doExit = 0, found;
00234   msgTables_t *msgTblPtr;
00235   tuint ID = *((tuint *) inID);
00236
00237   for (i = 0, found = 0; i < sizeof(msgTables) / sizeof(msgTables_t); i++) {
00238     if (msgTables[i].ID == ID) {
00239       found = 1;
00240       msgTblPtr = &msgTables[i];
00241     }
00242   }
00243
00244   if (!found) {
00245     printf("Message from unknown module of ID %d received, quitting..\n", ID);
00246     exit(0);
00247   }
00248
00249   printf("%s :", msgTblPtr->name);
00250
00251   switch (msgType) {
00252     case dbg_TRACE_INFO:
00253       printf("Trace Info: ");
00254       break;
00255     case dbg_WARNING:
00256       printf("Warning in ");
00257       printf("%s\n", siuGetMsg(msgTblPtr->warnTbl, msgTblPtr->sizeWarnTbl, msgCode));
00258       break;
00259     case dbg_EXCEPTION_FATAL:
00260       printf("Exception: ");
00261       printf("%s\n", siuGetMsg(msgTblPtr->excTbl, msgTblPtr->sizeExcTbl, msgCode));
00262       doExit = 1;
00263       break;
00264     default:
00265       printf(" Invalid diagnostic message, exiting..");
00266       break;
00267   }
00268
00269   if (msgLength) {
00270     printf("\nSupporting Data: ");
00271     for (i = 0; i < msgLength; i++) {
00272       printf("%d\n", supportingData[i]);
00273     }
00274   }
00275
00276   if (doExit) {
00277     printf("\n Exiting.. ");
00278     exit(0);
00279   }
00280 }
00281
00282 void siu_dealloc_plc_xdais_mem (IALG_Handle plcXdaisInstPtr, tulong *mallocedSizeCounter)
00283 {
00284   Int nbufs;
00285   IALG_MemRec *xdaisBufsPtr;
00286
00287   nbufs = plcXdaisCallTable.ialg.algNumAlloc();
00288   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00289
00290   nbufs = plcXdaisCallTable.ialg.algFree(plcXdaisInstPtr, xdaisBufsPtr);
00291
00292   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00293
00294   free(xdaisBufsPtr);
00295 }
00296
00297 void siu_open(void)
00298 {
00299 #ifdef PROFILE_CYCLES
00300   volatile tlong cycles;
00301 #endif
00302
00303   memset(&siuInst, 0, sizeof(siuInst_t));
00304
00305   siu_init_heaps();
00306
00307   if ((siuInst.inFrameFilePtr = fopen (plc_SIM_INP_FNAME, "rb")) == NULL) {
00308     printf(" Error opening in.raw\n");
00309     exit(0);
00310   }
00311
00312   if ((siuInst.eraseFilePtr = fopen (plc_SIM_INPFE_FNAME, "rt")) == NULL) {
00313     printf(" Error opening inFE.txt\n");
00314     exit(0);
00315   }
00316   else {
00317     if (!feof(siuInst.eraseFilePtr)) {
00318       int i;
00319       fscanf(siuInst.eraseFilePtr, "%d\n", &i);
00320       siuInst.frameToBeErased = (tuint) i;
00321     }
00322   }
00323
00324   if ((siuInst.outFrameFilePtrNoPLC = fopen (plc_SIM_OUT_FNAME, "wb")) == NULL) {
00325     printf(" Error opening outNoPLC.raw\n");
00326     exit(0);
00327   }
00328
00329   if ((siuInst.outFrameFilePtrPLC = fopen (plc_SIM_OUTPLC_FNAME, "wb")) == NULL) {
00330     printf(" Error opening outPLC.raw\n");
00331     exit(0);
00332   }
00333
00334   /* measure measurement overhead of cycles */
00335 #ifdef PROFILE_CYCLES
00336   if ((siuInst.outCyclesFilePtr = fopen (plc_SIM_LOGCYC_FNAME, "wt")) == NULL) {
00337     printf(" Error opening cycles.txt\n");
00338     exit(0);
00339   }
00340   cycles = profile_getCPUcycleCount();
00341 #endif
00342
00343 #ifdef PROFILE_CYCLES
00344   cycles = (profile_getCPUcycleCount() - cycles);
00345   siuInst.cyclesOverhead = cycles;
00346 #endif
00347
00348 }
00349
00350 #ifdef PROFILE_CYCLES
00351 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00352                                          tlong overhead)
00353 {
00354   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00355          (long) cyclesPtr->max - (long) overhead,
00356          (long) cyclesPtr->avg - (long) overhead);
00357 }
00358
00359 void siu_print_cycles(void)
00360 {
00361   siu_print_cycles_util(&siuInst.cyclesPlc, "Plc", siuInst.cyclesOverhead);
00362 }
00363 #endif
00364
00365 void siu_close(void)
00366 {
00367   fclose(siuInst.inFrameFilePtr);
00368   fclose(siuInst.outFrameFilePtrNoPLC);
00369   fclose(siuInst.outFrameFilePtrPLC);
00370   fclose(siuInst.eraseFilePtr);
00371
00372 #ifdef PROFILE_CYCLES
00373   fclose(siuInst.outCyclesFilePtr);
00374   siu_print_cycles();
00375   profile_closeCycleProfiling();
00376 #endif
00377
00378   if (config.xdaisFlag) {
00379     siu_dealloc_plc_xdais_mem (siuInst.plcXdaisInst, &siuInst.xdaisBufsMallocFreeCounter);
00380     if (siuInst.xdaisBufsMallocFreeCounter) {
00381       printf(" Error: mismatched malloc-free\n");
00382     }
00383   }
00384
00385   memset(&siuInst, 0, sizeof(siuInst_t));
00386 }
00387
00388 void siu_new_open_config_modules(config_t * config)
00389 {
00390   tint      nbufs, ret;
00391   const ecomemBuffer_t *sizeBufs;
00392   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00393
00394   plcSizeConfig_t plcSizeCfg;
00395   plcOpenConfig_t plcOpenCfg;
00396   plcNewConfig_t plcNewCfg;
00397
00398   IALG_MemRec *xdaisBufsPtr;
00399   plcXdaisAllocParams_t plcXdaisAllocParams;
00400   plcXdaisInitParams_t plcXdaisInitParams;
00401   const IALG_Params *paramsPtr;
00402
00403   plcXdaisAllocParams.param.size = (Int) sizeof(plcXdaisAllocParams_t);
00404   plcXdaisInitParams.param.size = (Int) sizeof(plcXdaisInitParams_t);
00405
00406   printf(" Querying PLC Memory Requirements\n");
00407
00408   plcSizeCfg.config = config->plcConfig;
00409
00410   if (config->xdaisFlag) {
00411     nbufs = (tint) plcXdaisCallTable.ialg.algNumAlloc();
00412     if (nbufs == 0) {
00413       printf(" algNumAlloc error, exiting\n");
00414       exit(0);
00415     }
00416
00417     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00418     if (xdaisBufsPtr == NULL) {
00419       printf("Not enough heap for PLC memory records, exiting\n");
00420       exit(0);
00421     }
00422     if (config->xdaisDefaultCfgFlag) {
00423       paramsPtr = NULL;
00424     }
00425     else {
00426       plcXdaisAllocParams.cfg = plcSizeCfg;
00427       paramsPtr = (const IALG_Params *) &plcXdaisAllocParams;
00428     }
00429     plcXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00430   }
00431   else {
00432     if (plcGetSizes(&nbufs, &sizeBufs, &plcSizeCfg) != plc_NOERR) {
00433       printf(" PLC get sizes error, exiting \n");
00434       exit(0);
00435     }
00436   }
00437
00438   printf(" Allocating PLC memory \n");
00439   if (config->xdaisFlag) {
00440     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00441     siuInst.plcXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00442   }
00443   else {
00444     siu_alloc_eco_mem (nbufs, sizeBufs, ecoBufs);
00445   }
00446
00447   plcNewCfg.sizeCfg = plcSizeCfg;
00448   plcNewCfg.ID = PLC_ID;
00449   plcNewCfg.debugInfo = siu_debug_info;
00450   plcOpenCfg.frame_size = config->frameLength;
00451   plcOpenCfg.codingType = plc_CODING_TYPE_MULAW;        /* only meaningful for GMP
00452                                                            usage */
00453   plcOpenCfg.config = config->plcConfig;
00454
00455   if (config->xdaisFlag) {
00456     if (config->xdaisDefaultCfgFlag) {
00457       paramsPtr = NULL;
00458     }
00459     else {
00460       plcXdaisInitParams.cfgNew = plcNewCfg;
00461       plcXdaisInitParams.cfgOpen = plcOpenCfg;
00462       paramsPtr = (IALG_Params *) &plcXdaisInitParams;
00463     }
00464     ret = plcXdaisCallTable.ialg.algInit((IALG_Handle) siuInst.plcXdaisInst,
00465                                    xdaisBufsPtr, NULL, paramsPtr);
00466
00467     free(xdaisBufsPtr);
00468
00469     if (ret == IALG_EFAIL) {
00470       printf("algInit() failure, exiting\n");
00471       exit(0);
00472     }
00473
00474   }
00475   else {
00476     if (plcNew(&(siuInst.plcInst), nbufs, ecoBufs, &plcNewCfg) != plc_NOERR) {
00477       printf(" PLC New error, exiting \n");
00478       exit(0);
00479     }
00480     plcOpen(siuInst.plcInst, &plcOpenCfg);
00481   }
00482 }
00483
00484 #ifdef PROFILE_CYCLES
00485 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00486 {
00487   if (cycles > cyclesPtr->max) {
00488     cyclesPtr->max = cycles;
00489   }
00490
00491   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00492 }
00493 #endif
00494
00495 void siu_process(linSample * framePtr, linSample * outFramePtrPLC,
00496                  linSample * outFramePtrNoPLC)
00497 {
00498   ISPHDEC1_FrameType frameType;
00499
00500 #ifdef PROFILE_CYCLES
00501   volatile tlong cycles;
00502 #endif
00503
00504   frameType = ISPHDEC1_FTYPE_SPEECHGOOD;
00505   if (siuInst.frameToBeErased == siuInst.frameCount) {
00506
00507     /* read next one if there */
00508     if (!feof(siuInst.eraseFilePtr)) {
00509       int i;
00510       fscanf(siuInst.eraseFilePtr, "%d\n", &i);
00511       siuInst.frameToBeErased = (tuint) i;
00512     }
00513
00514     frameType = ISPHDEC1_FTYPE_SPEECHLOST;
00515     memset(outFramePtrNoPLC, 0, config.frameLength * sizeof(linSample));
00516     printf(" Erasure at frame %d\n", (int) siuInst.frameCount);
00517   }
00518
00519   if (frameType == ISPHDEC1_FTYPE_SPEECHGOOD) {
00520     memcpy(outFramePtrNoPLC, framePtr, config.frameLength * sizeof(linSample));
00521   }
00522
00523 #ifdef USE_CACHE
00524   if (config.doCacheFlush) {
00525     memarchcfg_cacheFlush();
00526   }
00527 #endif
00528
00529 #ifdef PROFILE_CYCLES
00530   cycles = profile_getCPUcycleCount();
00531 #endif
00532
00533   if (config.xdaisFlag) {
00534     plcXdaisCallTable.process (siuInst.plcXdaisInst, NULL, framePtr, frameType, 0);
00535   }
00536   else {
00537     plcProcess(siuInst.plcInst, NULL, framePtr, frameType, 0);
00538   }
00539
00540 #ifdef PROFILE_CYCLES
00541   cycles = (profile_getCPUcycleCount() - cycles);
00542   siu_process_cycles(cycles, &siuInst.cyclesPlc);
00543   fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00544 #endif
00545
00546   memcpy(outFramePtrPLC, framePtr, config.frameLength * sizeof(linSample));
00547
00548 }
00549
00550 tint siu_read_inFrame(FILE * filePtr, linSample * inFramePtr, tint numSamples)
00551 {
00552   int       i;
00553
00554   for (i = 0; i < numSamples; i++) {
00555     int       lsb, msb;
00556
00557     lsb = fgetc(filePtr);
00558     msb = fgetc(filePtr);
00559     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00560   }
00561
00562   if (feof(filePtr)) {
00563     /* silence the last frame as it could have garbage */
00564     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00565     return (0);
00566   }
00567   else {
00568     return (1);
00569   }
00570 }
00571
00572 tint siu_write_outFrame(FILE * filePtr, linSample * outFramePtr, tint numSamples)
00573 {
00574   int       i;
00575
00576   for (i = 0; i < numSamples; i++) {
00577     fputc(outFramePtr[i] & 0xFF, filePtr);
00578     fputc(((outFramePtr[i] >> 8) & 0xFF), filePtr);
00579   }
00580
00581   if (feof(filePtr)) {
00582     return (1);
00583   }
00584   else {
00585     return (0);
00586   }
00587 }
00588
00589 void hw_init(void)
00590 {
00591 #ifdef PROFILE_CYCLES
00592   if (!profile_initCycleProfiling()) {
00593     printf("Could not acquire profiling resources..Exiting\n");
00594     exit(0);
00595   }
00596 #endif
00597
00598 #ifdef USE_CACHE
00599   if (config.doCacheEnable) {
00600     memarchcfg_cacheEnable();
00601   }
00602 #endif
00603 }
00604
00605 linSample inFrame[MAX_FRAME_LENGTH], outFramePLC[MAX_FRAME_LENGTH],
00606     outFrameNoPLC[MAX_FRAME_LENGTH];
00607
00608 void main(void)
00609 {
00610   linSample *outFramePtrPLC = outFramePLC;
00611   linSample *outFramePtrNoPLC = outFrameNoPLC;
00612
00613   printf("Testing PLC version %d.%d.%d.%d\n",
00614           ti_mas_plc_Version_MAJOR, ti_mas_plc_Version_MINOR,
00615           ti_mas_plc_Version_PATCH, ti_mas_plc_Version_BUILD);
00616
00617   if (config.xdaisFlag) {
00618     printf("Using XDAIS APIs\n");
00619   }
00620   else {
00621     printf("Using ECO APIs\n");
00622   }
00623
00624   hw_init();
00625
00626   siu_open();
00627
00628   siu_new_open_config_modules(&config);
00629
00630   printf("Processing Frames..\n");
00631
00632   while (siu_read_inFrame(siuInst.inFrameFilePtr, inFrame, config.frameLength)) {
00633     siuInst.frameCount++;
00634     siu_process(inFrame, outFramePtrPLC, outFramePtrNoPLC);
00635     if (siu_write_outFrame
00636         (siuInst.outFrameFilePtrPLC, outFramePtrPLC, config.frameLength)) {
00637       printf(" Error writing output frame, exiting \n");
00638       exit(0);
00639     }
00640     if (siu_write_outFrame
00641         (siuInst.outFrameFilePtrNoPLC, outFramePtrNoPLC, config.frameLength)) {
00642       printf(" Error writing output frame, exiting \n");
00643       exit(0);
00644     }
00645   }
00646
00647   siu_close();
00648 }
00649
00650 /* @} */ /* ingroup */
00651
00652 /* 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 (1)
#define | ti_mas_tdu_Version_BUILD (0)
#define | ti_mas_tdu_Version_QUALITY (3)
#define | ti_mas_tdu_Version_BTYPE (0)
#define | ti_mas_tdu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_tdu_Version_MAJOR
#define | Version_MINOR ti_mas_tdu_Version_MINOR
#define | Version_XVERTICAL ti_mas_tdu_Version_XVERTICAL
#define | Version_PATCH ti_mas_tdu_Version_PATCH
#define | Version_BUILD ti_mas_tdu_Version_BUILD
#define | Version_QUALITY ti_mas_tdu_Version_QUALITY
#define | Version_BTYPE ti_mas_tdu_Version_BTYPE
#define | Version_WIDTH ti_mas_tdu_Version_WIDTH

Define Documentation

#define ti_mas_tdu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_tdu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_tdu_Version_MAJOR (2)

Definition at line 50 of file Version.h.

#define ti_mas_tdu_Version_MINOR (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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_tdu_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_tdu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_tdu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_tdu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_tdu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_tdu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_tdu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_tdu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_tdu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_tdu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_tdu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_tdu_Version_WIDTH

Definition at line 97 of file Version.h.


TDU: Version.h Source File

  • File List
  • Globals

Version.h

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


TDU: Data Structures

  • Data Structures
  • Data Fields

TDU Data Structures

Here are the data structures with brief descriptions:
tduCallTable_t |
tduCfgCtl_t | Configuration structure passed to TDU through tduControl() API. This contains several unionized substructures. Each substructure is used with a specific control code in a specific use case/call flow
tduCfgCtlStd_s | Single frequency detector configuration structure. Use case: Non-MF tone detection ON
tduConfig_t | Configuration structure passed to tduOpen() API
tduContext_s |
tduCptCfgCtl_t | Call progress tone detector configuration structure. Use case: Non-MF tone detection ON
tduCptSmartRep_t | Additional information about TDU detection event. This structure is shared by several detectors inside TDU
tduDetContext_t | This is the definition of detector context structure. Usage information of this structure is at Individual detector contexts
tduDigitFilterCfgCtl_s | Structure for filtering digit reports upon digit detection Use case: Configure Digit Actions
tduIntFwTable_t | Internal framework call table
tduMfCfgCtl_t | MF detection configuration structure. Use case: MF tone detection
tduMfState_t | Structure used for saving/restoring MF detector configuration parameters Use case: Digit Signalling
tduNewConfig_t | Configuration structure for creation of TDU instance. This structure is passed to tduNew() API. It contains unique ID in the system to be used for this TDU instance
tduPosition_t | Configuration structure for setting position of TDU in system. Use case: TDU Position
tduQueryState_t | Structure used by TDU to report its internal state in response to tdu_CTL_QUERY_STATE control code Use case: Digit Signalling
tduRepStats_s | TDU reporting statistics structure. This structure is passed to the tduGetStats() API function. It contains false detection statistics
tduSfdPeek_t | Structure for querying and returning TDU's internal configuration for SS7 COT and SS7 COR detectors. Use case: Autocot generation
tduSizeConfig_t | Size configuration structure. This structure is passed to tduGetSizes() and tduNew() APIs. It contains the worst case input frame length, and whether TDU is being instantiated in lite mode or full mode
tduTable_t | Call table definition for control and process funcitons of individual detectors
tduToneFilterCfgCtl_t | Configuration structure to enable/disable tone detection reports Use case: Enable Detection Reports
tduTxDelayLine_t | Structure used by TDU to return pointer to memory relinquished (TDU's internal delay line buffer) Use case: Relinquish Memory


TDU: Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » Bell 103 Ans. (2225Hz) Modem SFD

Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD

Description

Bell 103 is a full-duplex modem using frequency multiplex (1070 Hz-1270 Hz for the originating channel and 2025 Hz-2225 Hz for the answering channel). This type of signal is recognized by a preamble consisting of consecutive marks in either channel.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.18, 11-2000, Operational and interworking requirements for DCEs operating in the text telephone mode
  2. ITU-T Recommendation V.18, V.18 (2000) Amendment 1, 11-2002, Harmonization with ANSI TIA/EIA-825 (2000) text phones
  3. ITU-T Recommendation V.150.1, 01-2003, Modem-over-IP networks: Procedures for the end-to-end connection of V-series DCEs
  4. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band data over IP networks

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: Bell 103 Ans. (2225Hz) Modem SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

Bell 103 Ans. (2225Hz) Modem SFD

Description

Same as the Bell 103 ans detector in the Primary Direction (see Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD).

This detector is configured simultaneously with the Bell 103 ans Primary Direction detector. The same configuration parameters are used.

The detector is automatically disabled if any of the following events are detected: V.25, V.21, V.23, V.8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).


TDU: Bell 202: 1200 Hz or 2200 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

Bell 202: 1200 Hz or 2200 Hz SFD

Description

Bell 202 is a half-duplex FSK modem protocol using frequency multiplex with 1200 bps baud rate. This type of signal is recognized by a preamble consisting of consecutive marks or spaces. Both single tone events (1200 Hz or 2200 Hz) are detected.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, or UNS1.

Three tests need to be passed for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation V.152, 2004, Procedures for supporting voice-band data over IP networks
  2. Bell 103 - Asynchronous data transmission, full-duplex operation over 2-wire dialup or leased lines; 300-bps data rate
  3. Bell 212 A - Synchronous/ asynchronous data transmission, full-duplex operation over 2-wire leased or dialup lines; 1200-bps data rate

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.25 Detection (CED) 2100 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description » V.25 Detection 2100 Hz SFD

V.25 Detection (CED) 2100 Hz SFD

Description

This detector detects following events:

  1. ANS (or CED) is a 2100 Hz tone transmitted by the answering DCE at its nominal power level. The frequency tolerance is specified by ITU-T Recommendation G.164 as ±15 Hz. The signal duration is defined by V.25 and T.30 and should be in a 2.6 - 4.0 second window. CED does not include phase reversals.

  2. ANSam is the Answer Tone generated by a V.8-capable answering DCE. This modified answering tone is amplitude modulated by a sine wave at 15 Hz. The depth of modulation is 20% of the average amplitude.

  3. ANS/ and ANSam/ represent a phase reversal to the ANS or ANSam signals. These phase reversals are 180 degrees ±10 degrees, in a one ms window, repeating over a 450 ms period ±25 ms.

If configured to do so, the detector can internally generate early alert after 6 0 ms causing voice path squelching (this can be used to prevent 2100 Hz leak and its detection at the remote end).

The final decision, reported after 570-600 ms, includes discrimination between ANS and ANS/. Based on the final decision, the DSP can perform automatic reconfiguration actions. If it is ANS/ (2100 Hz with phase reversal) the echo canceller may be disabled. If it is a CED event (2100 Hz without phase reversal), the echo canceller NLP may be disabled. After detection of a bidirectional silence condition, the echo canceller may be restored to it's previous state.

Three tests need to be passed continuously for an event to be qualified:

  • Peak frequency test
  • Absolute power threshold test (power has to be between minimum and maximum power thresholds)
  • Tone-to-the-rest-of-signal ratio

All three tests have to be continuously passed for the run-time configurable time (default value is 330 ms).

After initial qualification, a phase reversal search is started for the next 250 ms. During that interval, phase reversal can be suspended for 20 ms, on the PKT side (if the PKT-side 2100 Hz tone is detected), if a decoder switchover is detected, or a packet loss appears.

If a phase reversal is detected, additional tone qualification, (the three tests listed before) for the next 130 ms, is executed.

Finally, if a tone gets qualified, it is reported as an ANS/ event. If a phase reversal is not detected, a CED (ANS) event is reported.

The detector is automatically disabled if any of following events is detected: V.25, V.21, V.23, V8bis initiating sequence, Bell, UNS1, or Bell 202 (primary or secondary direction).

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, and hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate, detection direction, and timestamp of an internal clock.

Standards Compliance

  1. ITU-T Recommendation V.25, 10-1996, Automatic answering equipment and general procedures for automatic calling equipment on the general switched telephone network including procedures for disabling of echo control devices for both manually and automatically established calls
  2. ITU-T Recommendation G.164, 11-1988, Echo suppressors
  3. ITU-T Recommendation G.165, 03-1993, Echo cancellers
  4. ITU-T Recommendation G.168, 06-2002, Digital network echo cancellers

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: V.25 Detection 2100 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

V.25 Detection 2100 Hz SFD

Description

This is the same as the V.25 (CED) detector in Primary Direction (see V.25 Detection (CED) 2100 Hz SFD).

This detector is configured simultaneously with the V.25 Primary Direction detector. The same configuration parameters are used.


TDU: CID CAS 2130 Hz & 2750 Hz Dual Tone Detector

TDU (Tone Detection Unit) Package » Detailed TDU Description

CID CAS 2130 Hz & 2750 Hz Dual Tone Detector

Description

The caller ID with call waiting service (CIDCW) defines the protocol for reliable delivery of caller information under these conditions. The CPE is alerted by a single tone (subscriber alerting signal 400 Hz) followed by a dual tone (2130 + 2750 Hz). It can be used by the application to cut the voice connection during the FSK signal. A report is generated to the application indicating: tone ID, frequency estimation of each tone, total power, type of event (on/off), and the internal timestamp.

Four tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test for each tone
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds) for each tone
  3. Tone-to-the-rest-of-signal ratio.
  4. Twist test (power difference between two tones)

Standards Compliance

  1. GR-30-CORE, CLASS Feature: Calling Number Delivery FSD 01-02-1051, Bellcore, December 1994

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: T.30 Calling Tone (CNG) 1100 Hz SFD

TDU (Tone Detection Unit) Package » Detailed TDU Description

T.30 Calling Tone (CNG) 1100 Hz SFD

Description

This tone may optionally be generated by an originating FAX machine, and if so, it is the first in-band signal that may indicate FAX transmission. Since usage is not mandatory, this signal alone is not a sufficient indication of a FAX transmission. As soon as CED is detected from the opposite direction, the CNG tone generation is stopped.

Per ITU-T Recommendation T.30, its cadence is well defined: 500 ms of 1100 Hz tone, followed by 3000 ms of silence. The pattern is repeated.

Three tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation T.30, 07-2003, Procedures for document facsimile transmission in the general switched telephone network

Limitations

  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 5 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: SS7 Continuity Test Tone Detection (Auto COT)

TDU (Tone Detection Unit) Package » Detailed TDU Description

SS7 Continuity Test Tone Detection (Auto COT)

Description

Because the bearer path is distinct from the signaling path, SS7 requires a specific means to validate the bearer channel before the call is established. If there is some inherent check for faulty conditions built into the transmission system, the continuity path check is not needed. But if the circuit-type is not known to the SS7 signaling, the continuity path check should be performed. This is of particular interest for analog circuits and international traffic.

Continuity (voice path presence) check (or Continuity Test - COT) is usually performed after initial addressing information, and might be repeated few times during complete voice path establishment, and before final confirmation that addressing is completed.

Continuity check is accomplished through tonal-based handshaking. There are two types of COT tests: Loopback and Transponder. In the 4-wire case, the originating side transmits a 2000/2010 Hz tone. The terminating end can establish the loopback, or it can detect the 2000/2010 Hz tone and respond with 2000/2010 Hz tone. In the 2-wire case, the originating side transmits a 2000/2010 Hz tone and the terminating end responds with a 1780 Hz tone.

The TDU provides support for standard continuity checks to allow voice path verification capabilities over TDM and Network paths.

Existing SS7 2000/2010Hz and 1780Hz detectors are used for automatic COT, i.e. they are temporarily dedicated for this operation.

Standards Compliance

  1. ITU-T Recommendation Q.724, 11-1988, Telephone user part signaling procedure
  2. GR-246-CORE Annex B, 12-1994, Telcordia Technologies Specification of Signaling System Number 7, Annex B

Limitations

N/A

Configuration

  • Mode of operation (originating/terminating)
  • Tones involved (2000Hz or 2010Hz or 1780Hz)
  • Minimum detection power threshold
  • Minimum detection qualification time
  • Time to wait for action of remote end (action is determined by detecting presence/absence of remote tone).


TDU: Call Progress Tone Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

Call Progress Tone Detection

Description

There are many single- or dual-tone events in the lower frequency band (300-650 Hz) which indicate various line conditions, events that are primarily intended for human use: ringback, busy, idle, and so on.

Administrations use different sets of frequencies and cadence for tonal events. In most cases, one or two tones are used simultaneously. But, there are few cases with three-tone events, or modulated low frequency signals.

Recognition of specific call progress tone events is accomplished by the host using the DSP estimated number of tones and their frequencies, and their detected cadence (on/off indications).

Three tests need to be passed continuously for an event to be qualified:

  1. Peak frequency test.
  2. Absolute power threshold test (power has to be between minimum and maximum power thresholds).
  3. Tone-to-the-rest-of-signal ratio.

Hard-coded configuration parameters are: frequency detection window, maximum power level, power drop to declare tone off event, hangover time (on-to-off transition).

The detection report includes: tone ID, on/off type of event, frequency estimate, power estimate and the internal clock timestamp.

Standards Compliance

  1. ITU-T Recommendation Q.35/E.180, 03-1998, Technical characteristics of tones for the telephone service
  2. E.180 Supplement 2

Limitations

  • Host needs to filter out many false alerts in presence of speech, using cadence and frequency information provided by the DSP detector.
  • Frequency estimation accuracy is ±3 Hz
  • Power estimation accuracy is ±1 dBm
  • Tone on/off timing accuracy is: 10 ms

Configuration

  • The detector can be turned on or off
  • Qualification time is run-time configurable
  • Minimum power threshold
  • Minimum tone-to-the-rest-of-signal linear ratio


TDU: Detailed TDU Description

TDU (Tone Detection Unit) Package

Detailed TDU Description

Page Contents

  • Description
  • Primary Direction Detectors
  • Secondary Direction Detectors
  • Auto COT

Description

The Tone Detection Unit (TDU) is able to detect various types of line events encountered in a voice band channel. In the PSTN, tones are generated at different places. Some detectors are needed even before a voice path is established (trunk events), and are actually a prerequisite for voice path establishment (e.g., PTS). Some tone events need to be detected and transported through the packet network with descriptive attributes. These events and attributes are also used for proper tone restoration on the remote side (low bit-rate voice codecs cannot guarantee the reproduction of some tone signals accurately for automatic recognition), or for out-of-band signaling. By defining separate payload formats for tone events, additional bandwidth compression is achieved.

There are two options for this module to handle digits and events. First, it can detect and measure frequency components of the voice band signals. In this mode of operation no attempt is made to discern the meaning of the tones, but just to distinguish tones from speech signals. This is of particular interest for operation in conjunction with low bit rate codecs and line echo cancellers. Another option is to recognize the tones and translate them into a name, i.e. to recognize the meaning of the tone.

Tone events handled by the TDU are classified by the following four groups:

  1. Single Tone Events
    • Frequency of tone to be detected
      • Central frequency of band where tone detection should be performed
    • Allowed offset from central frequency
      • Can be absolute (Hz) or relative (%), depending on the standard.
      • Tone detection should be performed in frequency band around the central frequency.
      • The width of band is defined by allowed frequency offset (from central frequency offset to central frequency + offset)
    • Minimum time of tone presence before tone event is declared
      • Minimum time interval before declaring tone event. Absolute threshold test, relative (SNR) test and frequency offset must be passed during this period.
    • Minimum absolute power of tone to declare event
      • Lowest power of tone peak.
    • Minimum ratio of tone power to total signal power during tone detection
      • This ratio is passed as linear parameter (Q15 format), but, internally is converted to logarithmic value (Q4 format).
    • Tone-off power histeresis
      • During On-to-Off transition detection, test of absolute tone power is performed against lower value than during Off-to-On transition. The difference between these two thresholds is defined by histeresis (linear, Q15).

  2. Dual Tone Events
    • Dual-Tone Multi-Frequency (DTMF)
    • MF R1
    • MF R2 forward signaling
    • MF R2 backward signaling

  3. Band-Pass Energy Events
    • Absolute power threshold of signal content in frequency band (dB units)
    • Relative ratio of signal within frequency band and total signal power (Q15, linear)
    • Minimum tone duration exceeding the aforementioned thresholds.

  4. Repeated FSK Pattern Events
    • V.21 flags
    • CM signal (Call Menu V.8 signal)

Tone events may be used by a system to automatically reconfigure a voice channel in some scenarios, like echo canceller (ECAN) disabling and bidirectional silence detector activation after V.25 tone detection. Internal system notification may be used to trigger specific processing, such as in-band relay, tone generation/detection protocols,and echo canceller control. External host notification may be exploited to enables processing at the host processor's discretion for control of operations such as voice/fax switchover.

Primary Direction Detectors

The primary detection direction in many cases is from the TDM interface and after echo removal. The majority of the tone detectors are located in the primary direction. If requested, the primary direction can be changed to the direction from the network interface (after the voice decoder). This configuration is useful only if the decoder is a waveform codec such as G.711 or ADPCM. In this configuration, tone detectors that are normally bidirectional (V.25, Bell 103, and V.22) become unidirectional, and provide detection only from the primary side.

Primary Detector Details

  • DTMF Detection
  • MFR1 and R2 Detection
  • Signaling Frequency 2600 Hz SFD
  • V.21(H) HDLC Flags Detection
  • V.8 Call Menu (CM) & Call Indicator(CI) Detection
  • V.25 Detection (CED) 2100 Hz SFD
  • T.30 Calling Tone (CNG) 1100 Hz SFD
  • Call Progress Tone Detection
  • V.18A 1400 Hz or 1800 Hz SFD
  • SS7 COT 2010 Hz or 1780 Hz SFD
  • Test Tones 1000/1004 Hz SFD
  • CID CAS 2130 Hz & 2750 Hz Dual Tone Detector
  • V.22 Unscrambled Binary Ones (USB1) 2250 Hz SFD
  • Bell 103 Orig (1270 Hz) or Ans (2225 Hz) Modem SFD
  • V.23 Marks: 1300 Hz (fwd) or 390 Hz (bkwd) SFD
  • V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD
  • Bell 202: 1200 Hz or 2200 Hz SFD
  • V.8bis Dual Tone (1375 Hz & 2002 Hz) or (1529 Hz, 2225 Hz) Detection
  • V.32 Ext (2100 Hz followed by 1800 Hz in secondary direction)
  • SIA

Secondary Direction Detectors

The secondary direction in many cases is the direction from the Packet Network Interface. There are few detectors operating in this direction: V.25, Bell 103 answering tone , V.22 unscrambled binary ones, V.21 tones, V.18a tones, and V32 Ext tones. These detectors are bidirectional.

Secondary Detector Details

  • V.25 Detection 2100 Hz SFD
  • V.22 Unscrambled Binary Ones (UNS1) (2250 Hz) SFD
  • Bell 103 Ans. (2225Hz) Modem SFD
  • V.21 marks: V.21(L) 980 Hz or V.21(H) 1650 Hz SFD
  • V.18A 1400 Hz or 1800Hz SFD
  • V.32 Ext (2100 Hz followed by 1800 Hz in primary direction)
  • SIA

Auto COT

  • SS7 Continuity Test Tone Detection (Auto COT)


TDU:

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

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

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

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

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

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

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

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

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


TDU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


TDU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

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


TDU: DTMF Detection

TDU (Tone Detection Unit) Package » Detailed TDU Description

DTMF Detection

Description

The Dual-tone Multi-Frequency detector detects voice band dual-tone events, such as those generated by multi-frequency push-button terminals. Two tones are simultaneously generated by a device, one from the lower frequency group: 697, 770, 852, and 941Hz and one from the upper frequency group: 1209, 1336, 1477, and 1633 Hz. There are 16 events: (0-9, ‘*’, ‘#’, ‘A’, ’B’, ‘C’, and ‘D’).

This feature is used in multiple configurations: digit collection, digit in-band relay, digitupspeed, and digit removal for out-of-band relay.

The detector executes multiple tests to qualify a digit event. These tests include: frequency tolerance of each tone, power of each tone, overall SNR, power twist, and minimum duration.

Hard-coded configuration parameters are: frequency detection window, qualification time, and hangover time.

The detection report includes digit ID, frequency estimation of each tone, combined power, and internal timestamp.

Standards Compliance

  1. ITU-T Recommendation Q.23, 11-1988, Technical features of push-button telephone sets
  2. ITU-T Recommendation Q.24, 11-1988, Multifrequency push-button signal reception
  3. GR-506, 06-1996, LSSGR: Signaling for Analog Interfaces

Limitations

No digits shorter than 25 ms. are detected, and no digits longer than 38 ms. are missed. Digits with duration 25-38 ms. may or may not be detected. There is grey area of 3 dBm0 above the minimum tone power threshold where digits may or may not be detected.

A digit alert is used by relay processing to suppress the voice path, and is generated 10-15 ms. after a tone starts. Therefore, the digit leakage, as voice before relay begins, may be up to 15 ms. in duration.

Configuration

Set of power threshold parameters that are run-time configurable:

  1. Minimum tone power threshold (tones below this value are rejected)
  2. Maximum tone power threshold (tones above this value are rejected)
  3. Positive twist (maximum power difference between lower and upper tone)
  4. Negative twist (maximum power difference between upper and lower tone)
  5. Break threshold (tones below this value are declared off, after being initially reported as on)

Special digit report filtering can be provisioned for four digit groups (0-9, "*", "#", and A-D) based on:

  1. Digit edge (on / off), e.g., only digit-on events are reported.
  2. Duration of long digits


TDU: TDU External API

TDU (Tone Detection Unit) Package

TDU External API

Page Contents

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

Complete TDU API

  1. tduGetSizes()
  2. tduNew()
  3. tduOpen()
  4. tduControl()
  5. tduGetStats()
  6. tduSendIn()
  7. tduReceiveIn()
  8. tduClose()
  9. tduDelete()

TDU Creation Functions

TDU instance creation is a four step process. First, determine the TDU memory requirements via tduGetSize() below. Second, allocate the TDU memory buffers using any system-prescribed method. Create the TDU instance by passing the allocated buffer information to tduNew(). Finally, open the TDU instance for use via the tduOpen() API function. This process must be followed in the order given for proper operation.

  1. tduGetSizes()
  2. tduNew()
  3. tduOpen()

TDU Configuration Functions

The TDU component has two external API configuration routines; one to configure the instance -- tduControl(), and one to gather operational statistics -- tduGetStats(). These external API functions require an active TDU instance that has been opened according to the procedure in TDU Creation Functions above.

  1. tduControl()
  2. tduGetStats()

TDU Execution Functions

The TDU execution API consists of two routines, one per direction. The tduSendIn() API function operates on linear samples in the from-TDM-to-Network direction. This is considered the "primary" direction for tone detection. The tduReceiveIn() API function operates on linear samples in the from-Network-to-TDM direction. This is considered the "secondary" direction for tone detection.

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

  1. tduSendIn()
  2. tduReceiveIn()

TDU Destruction Functions

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

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

  1. tduClose()
  2. tduDelete()

TDU Return Codes

The TDU module provides various kinds of output to indicate errors in configuration, execution errors and to indicate tone detections.

  • ECO API return codes
  • Exception codes
  • Detection report codes


TDU: File Index

  • File List
  • Globals

TDU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
tdu.h [code] Contains definitions and external APIs for TDU


TDU: Data Fields

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

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

- a -

  • active_tone_reports : tduQueryState_t

- b -

  • base : tduTxDelayLine_t
  • baudotReport : tduContext_s
  • bdtew : tduIntFwTable_t
  • bellTid : tduIntFwTable_t
  • bfield1 : tduMfState_t
  • breakThresh : tduMfCfgCtl_t

- c -

  • c_code_off : tduDetContext_t
  • c_code_on : tduDetContext_t
  • changed_bfield : tduToneFilterCfgCtl_t
  • Control : tduTable_t
  • cpt : tduIntFwTable_t , tduCfgCtl_t

- d -

  • debugInfo : tduContext_s
  • detId : tduDetContext_t
  • detInstVec : tduContext_s
  • detNum : tduContext_s
  • detNumSFDF : tduContext_s
  • detNumSFDT : tduContext_s
  • detSlot : tduDetContext_t
  • detState : tduQueryState_t
  • dfilt : tduCfgCtl_t
  • digit_echo : tduContext_s
  • digit_filter : tduIntFwTable_t
  • digit_sent : tduCfgCtl_t

- e -

  • endFreq : tduCptCfgCtl_t

- f -

  • FalseAlert : tduRepStats_s
  • filter_bfield : tduDigitFilterCfgCtl_s
  • frame_size : tduConfig_t
  • freq1 : tduCptSmartRep_t
  • freq2 : tduCptSmartRep_t
  • freq_pow_thresh_high : tduMfState_t
  • freq_pow_thresh_low : tduMfState_t
  • freqPowThreshHigh : tduMfCfgCtl_t
  • freqPowThreshLow : tduMfCfgCtl_t

- g -

  • gmpAllocGmc : tduContext_s
  • gmpCreate : tduContext_s
  • gmpDelete : tduContext_s
  • gmpFreeGmc : tduContext_s
  • gmpRead : tduContext_s
  • gmpWrite : tduContext_s

- h -

  • hot_detectors : tduQueryState_t

- i -

  • ID : tduNewConfig_t

- l -

  • length : tduTxDelayLine_t
  • lite : tduCfgCtl_t , tduSizeConfig_t
  • local_buf : tduContext_s
  • long_digit_bfield : tduDigitFilterCfgCtl_s
  • long_digit_hangover : tduDigitFilterCfgCtl_s

- m -

  • magnitudes : tduContext_s
  • maxSamplesPerFrame : tduSizeConfig_t
  • mf : tduIntFwTable_t , tduCfgCtl_t
  • mf_cidcas_ctl : tduIntFwTable_t
  • mf_coin_tones_ctl : tduIntFwTable_t
  • mf_v8bis_fs_ctl : tduIntFwTable_t
  • mfstate : tduCfgCtl_t

- o -

  • operation : tduSfdPeek_t

- p -

  • params : tduMfState_t , tduDetContext_t
  • peek : tduCfgCtl_t
  • position : tduCfgCtl_t
  • Process : tduTable_t

- r -

  • reports_bfield : tduToneFilterCfgCtl_t

- s -

  • sfd_llmr_ANSam : tduIntFwTable_t
  • sfd_llmr_ANSam_reset : tduIntFwTable_t
  • sfd_llmr_ANSam_test : tduIntFwTable_t
  • sfdf : tduIntFwTable_t
  • sfdt : tduIntFwTable_t
  • sizeCfg : tduNewConfig_t
  • slot : tduSfdPeek_t
  • slotInstSize : tduDetContext_t
  • startFreq : tduCptCfgCtl_t
  • state : tduCfgCtl_t
  • std : tduCfgCtl_t , tduCptCfgCtl_t , tduSfdPeek_t
  • switched : tduMfState_t

- t -

  • tableId_dir : tduDetContext_t
  • tdu_send_out : tduContext_s
  • tduClose : tduCallTable_t
  • tduControl : tduCallTable_t
  • tduDelete : tduCallTable_t
  • tduGetSizes : tduCallTable_t
  • tduNew : tduCallTable_t
  • tduOpen : tduCallTable_t
  • tduReceiveIn : tduCallTable_t
  • tduRxSaveSize : tduContext_s
  • tduSendIn : tduCallTable_t
  • tfilt : tduCfgCtl_t
  • tone1bw : tduCptSmartRep_t
  • tone2bw : tduCptSmartRep_t
  • toneOnConfirmDuration : tduCfgCtlStd_s
  • toneOnEnergy : tduCfgCtlStd_s
  • toneOnSnr : tduCfgCtlStd_s
  • twistNegative : tduMfCfgCtl_t
  • twistPositive : tduMfCfgCtl_t
  • tx_delay_line : tduCfgCtl_t

- u -

  • u : tduCfgCtl_t

- v -

  • v21 : tduIntFwTable_t
  • valid_bitfield : tduPosition_t
  • value_bitfield : tduPosition_t
  • voice_disc : tduIntFwTable_t
  • voice_disc_ctl : tduIntFwTable_t

- w -

  • work_buf : tduContext_s


TDU: Data Fields - Variables

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

- a -

  • active_tone_reports : tduQueryState_t

- b -

  • base : tduTxDelayLine_t
  • baudotReport : tduContext_s
  • bdtew : tduIntFwTable_t
  • bellTid : tduIntFwTable_t
  • bfield1 : tduMfState_t
  • breakThresh : tduMfCfgCtl_t

- c -

  • c_code_off : tduDetContext_t
  • c_code_on : tduDetContext_t
  • changed_bfield : tduToneFilterCfgCtl_t
  • Control : tduTable_t
  • cpt : tduIntFwTable_t , tduCfgCtl_t

- d -

  • debugInfo : tduContext_s
  • detId : tduDetContext_t
  • detInstVec : tduContext_s
  • detNum : tduContext_s
  • detNumSFDF : tduContext_s
  • detNumSFDT : tduContext_s
  • detSlot : tduDetContext_t
  • detState : tduQueryState_t
  • dfilt : tduCfgCtl_t
  • digit_echo : tduContext_s
  • digit_filter : tduIntFwTable_t
  • digit_sent : tduCfgCtl_t

- e -

  • endFreq : tduCptCfgCtl_t

- f -

  • FalseAlert : tduRepStats_s
  • filter_bfield : tduDigitFilterCfgCtl_s
  • frame_size : tduConfig_t
  • freq1 : tduCptSmartRep_t
  • freq2 : tduCptSmartRep_t
  • freq_pow_thresh_high : tduMfState_t
  • freq_pow_thresh_low : tduMfState_t
  • freqPowThreshHigh : tduMfCfgCtl_t
  • freqPowThreshLow : tduMfCfgCtl_t

- g -

  • gmpAllocGmc : tduContext_s
  • gmpCreate : tduContext_s
  • gmpDelete : tduContext_s
  • gmpFreeGmc : tduContext_s
  • gmpRead : tduContext_s
  • gmpWrite : tduContext_s

- h -

  • hot_detectors : tduQueryState_t

- i -

  • ID : tduNewConfig_t

- l -

  • length : tduTxDelayLine_t
  • lite : tduCfgCtl_t , tduSizeConfig_t
  • local_buf : tduContext_s
  • long_digit_bfield : tduDigitFilterCfgCtl_s
  • long_digit_hangover : tduDigitFilterCfgCtl_s

- m -

  • magnitudes : tduContext_s
  • maxSamplesPerFrame : tduSizeConfig_t
  • mf : tduIntFwTable_t , tduCfgCtl_t
  • mf_cidcas_ctl : tduIntFwTable_t
  • mf_coin_tones_ctl : tduIntFwTable_t
  • mf_v8bis_fs_ctl : tduIntFwTable_t
  • mfstate : tduCfgCtl_t

- o -

  • operation : tduSfdPeek_t

- p -

  • params : tduMfState_t , tduDetContext_t
  • peek : tduCfgCtl_t
  • position : tduCfgCtl_t
  • Process : tduTable_t

- r -

  • reports_bfield : tduToneFilterCfgCtl_t

- s -

  • sfd_llmr_ANSam : tduIntFwTable_t
  • sfd_llmr_ANSam_reset : tduIntFwTable_t
  • sfd_llmr_ANSam_test : tduIntFwTable_t
  • sfdf : tduIntFwTable_t
  • sfdt : tduIntFwTable_t
  • sizeCfg : tduNewConfig_t
  • slot : tduSfdPeek_t
  • slotInstSize : tduDetContext_t
  • startFreq : tduCptCfgCtl_t
  • state : tduCfgCtl_t
  • std : tduCfgCtl_t , tduCptCfgCtl_t , tduSfdPeek_t
  • switched : tduMfState_t

- t -

  • tableId_dir : tduDetContext_t
  • tdu_send_out : tduContext_s
  • tduClose : tduCallTable_t
  • tduControl : tduCallTable_t
  • tduDelete : tduCallTable_t
  • tduGetSizes : tduCallTable_t
  • tduNew : tduCallTable_t
  • tduOpen : tduCallTable_t
  • tduReceiveIn : tduCallTable_t
  • tduRxSaveSize : tduContext_s
  • tduSendIn : tduCallTable_t
  • tfilt : tduCfgCtl_t
  • tone1bw : tduCptSmartRep_t
  • tone2bw : tduCptSmartRep_t
  • toneOnConfirmDuration : tduCfgCtlStd_s
  • toneOnEnergy : tduCfgCtlStd_s
  • toneOnSnr : tduCfgCtlStd_s
  • twistNegative : tduMfCfgCtl_t
  • twistPositive : tduMfCfgCtl_t
  • tx_delay_line : tduCfgCtl_t

- u -

  • u : tduCfgCtl_t

- v -

  • v21 : tduIntFwTable_t
  • valid_bitfield : tduPosition_t
  • value_bitfield : tduPosition_t
  • voice_disc : tduIntFwTable_t
  • voice_disc_ctl : tduIntFwTable_t

- w -

  • work_buf : tduContext_s


TDU: Data Fields

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

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

- _ -

  • __extern : Version.h


TDU: Data Fields

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

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

- m -

  • MF_ALERT_ONLY : tdu.h
  • MF_CONFIRMED_OR_ALERT_ON : tdu.h


TDU: Data Fields

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

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

- t -

  • tdu_CTL_B202_TONES_OFF : tdu.h
  • tdu_CTL_B202_TONES_ON : tdu.h
  • tdu_CTL_BDTEW_OFF : tdu.h
  • tdu_CTL_BDTEW_ON : tdu.h
  • tdu_CTL_BELL_OFF : tdu.h
  • tdu_CTL_BELL_ON : tdu.h
  • tdu_CTL_CIDCAS_ALL_OFF : tdu.h
  • tdu_CTL_CIDCAS_ALL_ON : tdu.h
  • tdu_CTL_CNG_OFF : tdu.h
  • tdu_CTL_CNG_ON : tdu.h
  • tdu_CTL_COIN_TONES_OFF : tdu.h
  • tdu_CTL_CPT_OFF : tdu.h
  • tdu_CTL_CPT_ON : tdu.h
  • tdu_CTL_CRE2_OFF : tdu.h
  • tdu_CTL_CRE2_ON : tdu.h
  • tdu_CTL_CRE_OFF : tdu.h
  • tdu_CTL_CRE_ON : tdu.h
  • tdu_CTL_DIGIT_FILTER : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_OFF : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_ON : tdu.h
  • tdu_CTL_GET_LITE : tdu.h
  • tdu_CTL_LLMR_OFF : tdu.h
  • tdu_CTL_LLMR_ON : tdu.h
  • tdu_CTL_MF_CIDCAS_ON : tdu.h
  • tdu_CTL_MF_COIN_TONES_ON : tdu.h
  • tdu_CTL_MF_CRE1_OFF : tdu.h
  • tdu_CTL_MF_CRE1_ON : tdu.h
  • tdu_CTL_MF_DTMF : tdu.h
  • tdu_CTL_MF_MAX : tdu.h
  • tdu_CTL_MF_MIN : tdu.h
  • tdu_CTL_MF_R1 : tdu.h
  • tdu_CTL_MF_R2BW : tdu.h
  • tdu_CTL_MF_R2FW : tdu.h
  • tdu_CTL_MF_RELAY_OFF : tdu.h
  • tdu_CTL_MF_STD_OFF : tdu.h
  • tdu_CTL_MF_STD_ON : tdu.h
  • tdu_CTL_MFSTD_RESTORE : tdu.h
  • tdu_CTL_MFSTD_SAVE : tdu.h
  • tdu_CTL_MULTIPLE_TONES : tdu.h
  • tdu_CTL_NONE : tdu.h
  • tdu_CTL_OFF_FIRST : tdu.h
  • tdu_CTL_OFF_LAST : tdu.h
  • tdu_CTL_ON_FIRST : tdu.h
  • tdu_CTL_ON_LAST : tdu.h
  • tdu_CTL_PEEK_SFD : tdu.h
  • tdu_CTL_POSITION : tdu.h
  • tdu_CTL_PR_SEARCH_RST : tdu.h
  • tdu_CTL_QUERY_STATE : tdu.h
  • tdu_CTL_RELEASE : tdu.h
  • tdu_CTL_RESTART : tdu.h
  • tdu_CTL_RSVD1 : tdu.h
  • tdu_CTL_RSVD2 : tdu.h
  • tdu_CTL_RSVD3 : tdu.h
  • tdu_CTL_RSVD4 : tdu.h
  • tdu_CTL_SF_OFF : tdu.h
  • tdu_CTL_SF_ON : tdu.h
  • tdu_CTL_SFDT_CIDCAS_OFF : tdu.h
  • tdu_CTL_SFDT_CIDCAS_ON : tdu.h
  • tdu_CTL_SIA_OFF : tdu.h
  • tdu_CTL_SIA_ON : tdu.h
  • tdu_CTL_SS7COR_OFF : tdu.h
  • tdu_CTL_SS7COR_ON : tdu.h
  • tdu_CTL_SS7COT_OFF : tdu.h
  • tdu_CTL_SS7COT_ON : tdu.h
  • tdu_CTL_STOP : tdu.h
  • tdu_CTL_SUSSPEND : tdu.h
  • tdu_CTL_THRE_MAX : tdu.h
  • tdu_CTL_THRE_MIN : tdu.h
  • tdu_CTL_TT1khz_OFF : tdu.h
  • tdu_CTL_TT1khz_ON : tdu.h
  • tdu_CTL_UMF_OFF : tdu.h
  • tdu_CTL_V18A_OFF : tdu.h
  • tdu_CTL_V18A_ON : tdu.h
  • tdu_CTL_V21_CM_FAX_OFF : tdu.h
  • tdu_CTL_V21_CM_FAX_ON : tdu.h
  • tdu_CTL_V21_OFF : tdu.h
  • tdu_CTL_V21_ON : tdu.h
  • tdu_CTL_V21_TONES_OFF : tdu.h
  • tdu_CTL_V21_TONES_ON : tdu.h
  • tdu_CTL_V21_V8DATA_OFF : tdu.h
  • tdu_CTL_V21_V8DATA_ON : tdu.h
  • tdu_CTL_V23_TONES_OFF : tdu.h
  • tdu_CTL_V23_TONES_ON : tdu.h
  • tdu_CTL_V25_OFF : tdu.h
  • tdu_CTL_V25_ON : tdu.h
  • tdu_CTL_V8BIS_TONES_OFF : tdu.h
  • tdu_CTL_V8BIS_TONES_ON : tdu.h
  • tdu_CTL_VOICE_DISC_OFF : tdu.h
  • tdu_CTL_VOICE_DISC_ON : tdu.h
  • tdu_DET_DIR_MASK : tdu.h
  • tdu_DET_ID_CASH : tdu.h
  • tdu_DET_ID_CASL : tdu.h
  • tdu_DET_ID_CIDCAS : tdu.h
  • tdu_DET_ID_CNG : tdu.h
  • tdu_DET_ID_COIN_TONES : tdu.h
  • tdu_DET_ID_CPT : tdu.h
  • tdu_DET_ID_CRE2 : tdu.h
  • tdu_DET_ID_DTMF : tdu.h
  • tdu_DET_ID_MODEMDISC : tdu.h
  • tdu_DET_ID_NONE : tdu.h
  • tdu_DET_ID_R1 : tdu.h
  • tdu_DET_ID_R2BW : tdu.h
  • tdu_DET_ID_R2FW : tdu.h
  • tdu_DET_ID_SF : tdu.h
  • tdu_DET_ID_SIA : tdu.h
  • tdu_DET_ID_SS7COR : tdu.h
  • tdu_DET_ID_SS7COT : tdu.h
  • tdu_DET_ID_TT1khz : tdu.h
  • tdu_DET_ID_V18A : tdu.h
  • tdu_DET_ID_V21 : tdu.h
  • tdu_DET_ID_V25LLMR : tdu.h
  • tdu_DET_ID_V8BIS_FS : tdu.h
  • tdu_DET_RXDIR : tdu.h
  • tdu_DET_TABLEID_MASK : tdu.h
  • tdu_DET_TXDIR : tdu.h
  • tdu_digit_filter() : tdu.h
  • tdu_ERROR : tdu.h
  • tdu_EXC_DELETE : tdu.h
  • tdu_EXC_FRAMESIZE : tdu.h
  • tdu_EXC_MEMORY : tdu.h
  • tdu_EXC_MFDET : tdu.h
  • tdu_EXC_OPEN : tdu.h
  • tdu_EXC_RECEIVEIN : tdu.h
  • tdu_EXC_SENDIN : tdu.h
  • tdu_FALSE_ALERT_CNT_MASK : tdu.h
  • tdu_GET_FALSE_ALERT_CNT : tdu.h
  • tdu_GET_ON_OFF_FLAG : tdu.h
  • tdu_MAX_SLOT : tdu.h
  • tdu_MAX_SLOT_RX : tdu.h
  • tdu_MAX_SLOT_TX : tdu.h
  • tdu_mf_cidcas_ctl() : tdu.h
  • tdu_mf_coin_tones_ctl() : tdu.h
  • tdu_MF_DIGIT_ALERT_OFF : tdu.h
  • tdu_MF_DIGIT_ALERT_ON : tdu.h
  • tdu_MF_DIGIT_OFF : tdu.h
  • tdu_MF_DIGIT_ON : tdu.h
  • tdu_mf_v8bis_fs_ctl() : tdu.h
  • tdu_NOERR : tdu.h
  • tdu_NOMEMORY : tdu.h
  • tdu_OPERATION_DIR_MASK : tdu.h
  • tdu_OPERATION_ENABLED : tdu.h
  • tdu_POSITION_MF_TESTS_CHANGED : tdu.h
  • tdu_POSITION_MF_TESTS_PREDIGIT_SNR : tdu.h
  • tdu_POSITION_MF_TESTS_SHIFT : tdu.h
  • tdu_POSITION_MF_TESTS_STEP_RISE : tdu.h
  • tdu_POSITION_PRI_AC : tdu.h
  • tdu_POSITION_PRI_ACBC_CHANGED : tdu.h
  • tdu_POSITION_RX : tdu.h
  • tdu_POSITION_SEC_AC : tdu.h
  • tdu_POSITION_SEC_ACBC_CHANGED : tdu.h
  • tdu_POSITION_TXRX_CHANGED : tdu.h
  • tdu_POSITION_TYPE : tdu.h
  • tdu_RX_AFTER_CONF : tdu.h
  • tdu_RX_BEFORE_CONF : tdu.h
  • tdu_RX_ONLY : tdu.h
  • tdu_SET_FALSE_ALERT_CNT : tdu.h
  • tdu_SET_ON_OFF_FLAG : tdu.h
  • tdu_sfd_llmr_ANSam() : tdu.h
  • tdu_sfd_llmr_ANSam_reset() : tdu.h
  • tdu_sfd_llmr_ANSam_test() : tdu.h
  • tdu_SFDT_DET_2225_2250_2300_RX : tdu.h
  • tdu_SFDT_DET_2225_RX : tdu.h
  • tdu_SFDT_DET_2250_RX : tdu.h
  • tdu_SFDT_DET_CASH_RX : tdu.h
  • tdu_SFDT_DET_CASL_RX : tdu.h
  • tdu_SFDT_DET_CIDCAS_RX : tdu.h
  • tdu_SFDT_DET_NONE_RX : tdu.h
  • tdu_SFDT_DET_SIA_RX : tdu.h
  • tdu_SFDT_DET_SIA_S_RX : tdu.h
  • tdu_SFDT_DET_SS7COT_RX : tdu.h
  • tdu_SFDT_DET_V18A_RX : tdu.h
  • tdu_SFDT_DET_V18A_S_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_S_RX : tdu.h
  • tdu_SFDT_DET_V23FW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V25_RX : tdu.h
  • tdu_SIZECFG_FULL : tdu.h
  • tdu_SIZECFG_LITE : tdu.h
  • tdu_SLOT_B202_M : tdu.h
  • tdu_SLOT_B202_S : tdu.h
  • tdu_SLOT_BDTEW : tdu.h
  • tdu_SLOT_BELLRX1 : tdu.h
  • tdu_SLOT_BELLRX2 : tdu.h
  • tdu_SLOT_BELLTX1 : tdu.h
  • tdu_SLOT_BELLTX2 : tdu.h
  • tdu_SLOT_CASH_RX : tdu.h
  • tdu_SLOT_CASL_RX : tdu.h
  • tdu_SLOT_CNG : tdu.h
  • tdu_SLOT_CPT : tdu.h
  • tdu_SLOT_MAX : tdu.h
  • tdu_SLOT_MAX_RX : tdu.h
  • tdu_SLOT_MAX_TX : tdu.h
  • tdu_SLOT_MF_RSVD1 : tdu.h
  • tdu_SLOT_MF_RSVD2 : tdu.h
  • tdu_SLOT_MF_RSVD3 : tdu.h
  • tdu_SLOT_MF_STD : tdu.h
  • tdu_SLOT_MF_USER : tdu.h
  • tdu_SLOT_MF_USER1 : tdu.h
  • tdu_SLOT_NONE : tdu.h
  • tdu_SLOT_SF : tdu.h
  • tdu_SLOT_SFDT_DUMMY1 : tdu.h
  • tdu_SLOT_SFDT_DUMMY2 : tdu.h
  • tdu_SLOT_SFDT_DUMMY3 : tdu.h
  • tdu_SLOT_SIA : tdu.h
  • tdu_SLOT_SIA_RX : tdu.h
  • tdu_SLOT_SIA_S : tdu.h
  • tdu_SLOT_SIA_S_RX : tdu.h
  • tdu_SLOT_SS7COR : tdu.h
  • tdu_SLOT_SS7COT : tdu.h
  • tdu_SLOT_SS7COT_RX : tdu.h
  • tdu_SLOT_TT1khz : tdu.h
  • tdu_SLOT_V18A : tdu.h
  • tdu_SLOT_V18A_RX : tdu.h
  • tdu_SLOT_V18A_S : tdu.h
  • tdu_SLOT_V18A_S_RX : tdu.h
  • tdu_SLOT_V21 : tdu.h
  • tdu_SLOT_V21LOW_MARKS : tdu.h
  • tdu_SLOT_V21LOW_MARKS_RX : tdu.h
  • tdu_SLOT_V21LOW_S_RX : tdu.h
  • tdu_SLOT_V21LOW_SPACES : tdu.h
  • tdu_SLOT_V21UPPER_MARKS : tdu.h
  • tdu_SLOT_V23BW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS_RX : tdu.h
  • tdu_SLOT_V25RX : tdu.h
  • tdu_SLOT_V25TX : tdu.h
  • tdu_TID_ANSAM : tdu.h
  • tdu_TID_ANSAM_PR : tdu.h
  • tdu_TID_ANSAM_PR_RX : tdu.h
  • tdu_TID_ANSAM_RX : tdu.h
  • tdu_TID_B202_TONES : tdu.h
  • tdu_TID_BDTEW1400 : tdu.h
  • tdu_TID_BDTEW1800 : tdu.h
  • tdu_TID_BELL : tdu.h
  • tdu_TID_CAS_T : tdu.h
  • tdu_TID_CIDCAS : tdu.h
  • tdu_TID_CIDCAS_RX : tdu.h
  • tdu_TID_CNG : tdu.h
  • tdu_TID_COIN_TONES : tdu.h
  • tdu_TID_CPT : tdu.h
  • tdu_TID_CRE2 : tdu.h
  • tdu_TID_FIRST : tdu.h
  • tdu_TID_FIRST_EXT : tdu.h
  • tdu_TID_LAST : tdu.h
  • tdu_TID_LAST_EXT : tdu.h
  • tdu_TID_LONG_DIGIT : tdu.h
  • tdu_TID_MASK_ID : tdu.h
  • tdu_TID_MASKED : tdu.h
  • tdu_TID_NULL : tdu.h
  • tdu_TID_PARALLEL_MASK : tdu.h
  • tdu_TID_RXDIR : tdu.h
  • tdu_TID_SF : tdu.h
  • tdu_TID_SIA : tdu.h
  • tdu_TID_SS7COR : tdu.h
  • tdu_TID_SS7COT : tdu.h
  • tdu_TID_TONE0 : tdu.h
  • tdu_TID_TONE1 : tdu.h
  • tdu_TID_TONE10 : tdu.h
  • tdu_TID_TONE11 : tdu.h
  • tdu_TID_TONE12 : tdu.h
  • tdu_TID_TONE13 : tdu.h
  • tdu_TID_TONE14 : tdu.h
  • tdu_TID_TONE15 : tdu.h
  • tdu_TID_TONE16 : tdu.h
  • tdu_TID_TONE2 : tdu.h
  • tdu_TID_TONE3 : tdu.h
  • tdu_TID_TONE4 : tdu.h
  • tdu_TID_TONE5 : tdu.h
  • tdu_TID_TONE6 : tdu.h
  • tdu_TID_TONE7 : tdu.h
  • tdu_TID_TONE8 : tdu.h
  • tdu_TID_TONE9 : tdu.h
  • tdu_TID_TT1khz : tdu.h
  • tdu_TID_TXDIR : tdu.h
  • tdu_TID_TYPE00 : tdu.h
  • tdu_TID_TYPE01 : tdu.h
  • tdu_TID_TYPE02 : tdu.h
  • tdu_TID_TYPE03 : tdu.h
  • tdu_TID_TYPE_MASK : tdu.h
  • tdu_TID_V18A : tdu.h
  • tdu_TID_V21 : tdu.h
  • tdu_TID_V21_CI : tdu.h
  • tdu_TID_V21_CM : tdu.h
  • tdu_TID_V21_CM_FAX : tdu.h
  • tdu_TID_V21_LOWER : tdu.h
  • tdu_TID_V21_TONES : tdu.h
  • tdu_TID_V23_TONES : tdu.h
  • tdu_TID_V25 : tdu.h
  • tdu_TID_V25_EARLY_REPORT_ALERT : tdu.h
  • tdu_TID_V25_EARLY_REPORT_FALSE : tdu.h
  • tdu_TID_V25_PR : tdu.h
  • tdu_TID_V25_RX : tdu.h
  • tdu_TID_V25_RX_PR : tdu.h
  • tdu_TID_V8BIS_TONES : tdu.h
  • tdu_TID_VOICE_DISC : tdu.h
  • tdu_TX_AFTER_CONF : tdu.h
  • tdu_TX_BEFORE_CONF : tdu.h
  • tdu_TX_DELAY_BUF_NUM : tdu.h
  • tdu_TX_ONLY : tdu.h
  • tdu_V8_OFFSET : tdu.h
  • tduBDTEWControl() : tdu.h
  • tduBDTEWProcess() : tdu.h
  • tduBellTid() : tdu.h
  • tduCfgCtlStd_t : tdu.h
  • tduClose() : tdu.h
  • tduContext_t : tdu.h
  • tduControl() : tdu.h
  • tduCPTControl() : tdu.h
  • tduCPTProcess() : tdu.h
  • tduDelete() : tdu.h
  • tduDetContexts : tdu.h
  • tduDigitFilterCfgCtl_t : tdu.h
  • tduDummyControl() : tdu.h
  • tduDummyProcess() : tdu.h
  • tduGetSizes() : tdu.h
  • tduGetStats() : tdu.h
  • tduIncB202_MARKS_F : tdu.h
  • tduIncB202_SPACES_F : tdu.h
  • tduIncBELLRX1_T : tdu.h
  • tduIncBELLRX2_T : tdu.h
  • tduIncBELLTX1_F : tdu.h
  • tduIncBELLTX2_F : tdu.h
  • tduIncCASH_T_RX : tdu.h
  • tduIncCASL_T_RX : tdu.h
  • tduIncCIDCAS : tdu.h
  • tduIncCNG_F : tdu.h
  • tduIncCNG_T : tdu.h
  • tduIncCOIN_TONES : tdu.h
  • tduIncCPT : tdu.h
  • tduIncDTMF : tdu.h
  • tduIncR1 : tdu.h
  • tduIncR2BW : tdu.h
  • tduIncR2FW : tdu.h
  • tduIncSF_F : tdu.h
  • tduIncSFDT_DUMMY1_T : tdu.h
  • tduIncSFDT_DUMMY2_T : tdu.h
  • tduIncSFDT_DUMMY3_T : tdu.h
  • tduIncSIA_F : tdu.h
  • tduIncSIA_S_F : tdu.h
  • tduIncSIA_S_T_RX : tdu.h
  • tduIncSIA_T_RX : tdu.h
  • tduIncSS7COR_F : tdu.h
  • tduIncSS7COT_F : tdu.h
  • tduIncSS7COT_T : tdu.h
  • tduIncTT1khz_F : tdu.h
  • tduIncUMF : tdu.h
  • tduIncV18A_F : tdu.h
  • tduIncV18A_S_F : tdu.h
  • tduIncV18A_S_T_RX : tdu.h
  • tduIncV18A_T_RX : tdu.h
  • tduIncV21 : tdu.h
  • tduIncV21CM : tdu.h
  • tduIncV21LOW_MARKS_F : tdu.h
  • tduIncV21LOW_MARKS_T : tdu.h
  • tduIncV21LOW_MARKS_T_RX : tdu.h
  • tduIncV21LOW_SPACES_F : tdu.h
  • tduIncV21LOW_SPACES_T_RX : tdu.h
  • tduIncV21UPPER_MARKS_F : tdu.h
  • tduIncV21UPPER_MARKS_LITE_T : tdu.h
  • tduIncV23BW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_T : tdu.h
  • tduIncV25_F : tdu.h
  • tduIncV25_T_RX : tdu.h
  • tduIncV25_T_TX : tdu.h
  • tduIncV25RX_DUMMY_T : tdu.h
  • tduIncV825_F : tdu.h
  • tduIncV8BIS_FS_F : tdu.h
  • tduIntFwTable : tdu.h
  • tduMFControl() : tdu.h
  • tduMFProcess() : tdu.h
  • tduNew() : tdu.h
  • tduOpen() : tdu.h
  • tduReceiveIn() : tdu.h
  • tduRepStats_t : tdu.h
  • tduRxLocation_t : tdu.h
  • tduSendIn() : tdu.h
  • tduSFDControl() : tdu.h
  • tduSFDFProcess() : tdu.h
  • tduSFDTProcess() : tdu.h
  • tduTxLocation_t : tdu.h
  • tduV21Control() : tdu.h
  • tduV21Process() : tdu.h
  • tduVoiceDiscCtl() : tdu.h
  • tduVoiceDiscProcess() : tdu.h
  • ti_mas_tdu_Version___VERS : Version.h
  • ti_mas_tdu_Version__top__ : Version.h
  • ti_mas_tdu_Version_BTYPE : Version.h
  • ti_mas_tdu_Version_BUILD : Version.h
  • ti_mas_tdu_Version_MAJOR : Version.h
  • ti_mas_tdu_Version_MINOR : Version.h
  • ti_mas_tdu_Version_PATCH : Version.h
  • ti_mas_tdu_Version_QUALITY : Version.h
  • ti_mas_tdu_Version_WIDTH : Version.h
  • ti_mas_tdu_Version_XVERTICAL : Version.h


TDU: Data Fields

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

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

- v -

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


TDU: Data Fields

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

- _ -

  • __extern : Version.h


TDU: Data Fields

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

- m -

  • MF_ALERT_ONLY : tdu.h
  • MF_CONFIRMED_OR_ALERT_ON : tdu.h


TDU: Data Fields

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

- t -

  • tdu_CTL_B202_TONES_OFF : tdu.h
  • tdu_CTL_B202_TONES_ON : tdu.h
  • tdu_CTL_BDTEW_OFF : tdu.h
  • tdu_CTL_BDTEW_ON : tdu.h
  • tdu_CTL_BELL_OFF : tdu.h
  • tdu_CTL_BELL_ON : tdu.h
  • tdu_CTL_CIDCAS_ALL_OFF : tdu.h
  • tdu_CTL_CIDCAS_ALL_ON : tdu.h
  • tdu_CTL_CNG_OFF : tdu.h
  • tdu_CTL_CNG_ON : tdu.h
  • tdu_CTL_COIN_TONES_OFF : tdu.h
  • tdu_CTL_CPT_OFF : tdu.h
  • tdu_CTL_CPT_ON : tdu.h
  • tdu_CTL_CRE2_OFF : tdu.h
  • tdu_CTL_CRE2_ON : tdu.h
  • tdu_CTL_CRE_OFF : tdu.h
  • tdu_CTL_CRE_ON : tdu.h
  • tdu_CTL_DIGIT_FILTER : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_OFF : tdu.h
  • tdu_CTL_EARLY_ALERT_SUPPRESS_ON : tdu.h
  • tdu_CTL_GET_LITE : tdu.h
  • tdu_CTL_LLMR_OFF : tdu.h
  • tdu_CTL_LLMR_ON : tdu.h
  • tdu_CTL_MF_CIDCAS_ON : tdu.h
  • tdu_CTL_MF_COIN_TONES_ON : tdu.h
  • tdu_CTL_MF_CRE1_OFF : tdu.h
  • tdu_CTL_MF_CRE1_ON : tdu.h
  • tdu_CTL_MF_DTMF : tdu.h
  • tdu_CTL_MF_MAX : tdu.h
  • tdu_CTL_MF_MIN : tdu.h
  • tdu_CTL_MF_R1 : tdu.h
  • tdu_CTL_MF_R2BW : tdu.h
  • tdu_CTL_MF_R2FW : tdu.h
  • tdu_CTL_MF_RELAY_OFF : tdu.h
  • tdu_CTL_MF_STD_OFF : tdu.h
  • tdu_CTL_MF_STD_ON : tdu.h
  • tdu_CTL_MFSTD_RESTORE : tdu.h
  • tdu_CTL_MFSTD_SAVE : tdu.h
  • tdu_CTL_MULTIPLE_TONES : tdu.h
  • tdu_CTL_NONE : tdu.h
  • tdu_CTL_OFF_FIRST : tdu.h
  • tdu_CTL_OFF_LAST : tdu.h
  • tdu_CTL_ON_FIRST : tdu.h
  • tdu_CTL_ON_LAST : tdu.h
  • tdu_CTL_PEEK_SFD : tdu.h
  • tdu_CTL_POSITION : tdu.h
  • tdu_CTL_PR_SEARCH_RST : tdu.h
  • tdu_CTL_QUERY_STATE : tdu.h
  • tdu_CTL_RELEASE : tdu.h
  • tdu_CTL_RESTART : tdu.h
  • tdu_CTL_RSVD1 : tdu.h
  • tdu_CTL_RSVD2 : tdu.h
  • tdu_CTL_RSVD3 : tdu.h
  • tdu_CTL_RSVD4 : tdu.h
  • tdu_CTL_SF_OFF : tdu.h
  • tdu_CTL_SF_ON : tdu.h
  • tdu_CTL_SFDT_CIDCAS_OFF : tdu.h
  • tdu_CTL_SFDT_CIDCAS_ON : tdu.h
  • tdu_CTL_SIA_OFF : tdu.h
  • tdu_CTL_SIA_ON : tdu.h
  • tdu_CTL_SS7COR_OFF : tdu.h
  • tdu_CTL_SS7COR_ON : tdu.h
  • tdu_CTL_SS7COT_OFF : tdu.h
  • tdu_CTL_SS7COT_ON : tdu.h
  • tdu_CTL_STOP : tdu.h
  • tdu_CTL_SUSSPEND : tdu.h
  • tdu_CTL_THRE_MAX : tdu.h
  • tdu_CTL_THRE_MIN : tdu.h
  • tdu_CTL_TT1khz_OFF : tdu.h
  • tdu_CTL_TT1khz_ON : tdu.h
  • tdu_CTL_UMF_OFF : tdu.h
  • tdu_CTL_V18A_OFF : tdu.h
  • tdu_CTL_V18A_ON : tdu.h
  • tdu_CTL_V21_CM_FAX_OFF : tdu.h
  • tdu_CTL_V21_CM_FAX_ON : tdu.h
  • tdu_CTL_V21_OFF : tdu.h
  • tdu_CTL_V21_ON : tdu.h
  • tdu_CTL_V21_TONES_OFF : tdu.h
  • tdu_CTL_V21_TONES_ON : tdu.h
  • tdu_CTL_V21_V8DATA_OFF : tdu.h
  • tdu_CTL_V21_V8DATA_ON : tdu.h
  • tdu_CTL_V23_TONES_OFF : tdu.h
  • tdu_CTL_V23_TONES_ON : tdu.h
  • tdu_CTL_V25_OFF : tdu.h
  • tdu_CTL_V25_ON : tdu.h
  • tdu_CTL_V8BIS_TONES_OFF : tdu.h
  • tdu_CTL_V8BIS_TONES_ON : tdu.h
  • tdu_CTL_VOICE_DISC_OFF : tdu.h
  • tdu_CTL_VOICE_DISC_ON : tdu.h
  • tdu_DET_DIR_MASK : tdu.h
  • tdu_DET_ID_CASH : tdu.h
  • tdu_DET_ID_CASL : tdu.h
  • tdu_DET_ID_CIDCAS : tdu.h
  • tdu_DET_ID_CNG : tdu.h
  • tdu_DET_ID_COIN_TONES : tdu.h
  • tdu_DET_ID_CPT : tdu.h
  • tdu_DET_ID_CRE2 : tdu.h
  • tdu_DET_ID_DTMF : tdu.h
  • tdu_DET_ID_MODEMDISC : tdu.h
  • tdu_DET_ID_NONE : tdu.h
  • tdu_DET_ID_R1 : tdu.h
  • tdu_DET_ID_R2BW : tdu.h
  • tdu_DET_ID_R2FW : tdu.h
  • tdu_DET_ID_SF : tdu.h
  • tdu_DET_ID_SIA : tdu.h
  • tdu_DET_ID_SS7COR : tdu.h
  • tdu_DET_ID_SS7COT : tdu.h
  • tdu_DET_ID_TT1khz : tdu.h
  • tdu_DET_ID_V18A : tdu.h
  • tdu_DET_ID_V21 : tdu.h
  • tdu_DET_ID_V25LLMR : tdu.h
  • tdu_DET_ID_V8BIS_FS : tdu.h
  • tdu_DET_RXDIR : tdu.h
  • tdu_DET_TABLEID_MASK : tdu.h
  • tdu_DET_TXDIR : tdu.h
  • tdu_FALSE_ALERT_CNT_MASK : tdu.h
  • tdu_GET_FALSE_ALERT_CNT : tdu.h
  • tdu_GET_ON_OFF_FLAG : tdu.h
  • tdu_MAX_SLOT : tdu.h
  • tdu_MAX_SLOT_RX : tdu.h
  • tdu_MAX_SLOT_TX : tdu.h
  • tdu_MF_DIGIT_ALERT_OFF : tdu.h
  • tdu_MF_DIGIT_ALERT_ON : tdu.h
  • tdu_MF_DIGIT_OFF : tdu.h
  • tdu_MF_DIGIT_ON : tdu.h
  • tdu_OPERATION_DIR_MASK : tdu.h
  • tdu_OPERATION_ENABLED : tdu.h
  • tdu_POSITION_MF_TESTS_CHANGED : tdu.h
  • tdu_POSITION_MF_TESTS_PREDIGIT_SNR : tdu.h
  • tdu_POSITION_MF_TESTS_SHIFT : tdu.h
  • tdu_POSITION_MF_TESTS_STEP_RISE : tdu.h
  • tdu_POSITION_PRI_AC : tdu.h
  • tdu_POSITION_PRI_ACBC_CHANGED : tdu.h
  • tdu_POSITION_RX : tdu.h
  • tdu_POSITION_SEC_AC : tdu.h
  • tdu_POSITION_SEC_ACBC_CHANGED : tdu.h
  • tdu_POSITION_TXRX_CHANGED : tdu.h
  • tdu_POSITION_TYPE : tdu.h
  • tdu_SET_FALSE_ALERT_CNT : tdu.h
  • tdu_SET_ON_OFF_FLAG : tdu.h
  • tdu_SFDT_DET_2225_2250_2300_RX : tdu.h
  • tdu_SFDT_DET_2225_RX : tdu.h
  • tdu_SFDT_DET_2250_RX : tdu.h
  • tdu_SFDT_DET_CASH_RX : tdu.h
  • tdu_SFDT_DET_CASL_RX : tdu.h
  • tdu_SFDT_DET_CIDCAS_RX : tdu.h
  • tdu_SFDT_DET_NONE_RX : tdu.h
  • tdu_SFDT_DET_SIA_RX : tdu.h
  • tdu_SFDT_DET_SIA_S_RX : tdu.h
  • tdu_SFDT_DET_SS7COT_RX : tdu.h
  • tdu_SFDT_DET_V18A_RX : tdu.h
  • tdu_SFDT_DET_V18A_S_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V21LOW_S_RX : tdu.h
  • tdu_SFDT_DET_V23FW_MARKS_RX : tdu.h
  • tdu_SFDT_DET_V25_RX : tdu.h
  • tdu_SIZECFG_FULL : tdu.h
  • tdu_SIZECFG_LITE : tdu.h
  • tdu_SLOT_B202_M : tdu.h
  • tdu_SLOT_B202_S : tdu.h
  • tdu_SLOT_BDTEW : tdu.h
  • tdu_SLOT_BELLRX1 : tdu.h
  • tdu_SLOT_BELLRX2 : tdu.h
  • tdu_SLOT_BELLTX1 : tdu.h
  • tdu_SLOT_BELLTX2 : tdu.h
  • tdu_SLOT_CASH_RX : tdu.h
  • tdu_SLOT_CASL_RX : tdu.h
  • tdu_SLOT_CNG : tdu.h
  • tdu_SLOT_CPT : tdu.h
  • tdu_SLOT_MAX : tdu.h
  • tdu_SLOT_MAX_RX : tdu.h
  • tdu_SLOT_MAX_TX : tdu.h
  • tdu_SLOT_MF_RSVD1 : tdu.h
  • tdu_SLOT_MF_RSVD2 : tdu.h
  • tdu_SLOT_MF_RSVD3 : tdu.h
  • tdu_SLOT_MF_STD : tdu.h
  • tdu_SLOT_MF_USER : tdu.h
  • tdu_SLOT_MF_USER1 : tdu.h
  • tdu_SLOT_NONE : tdu.h
  • tdu_SLOT_SF : tdu.h
  • tdu_SLOT_SFDT_DUMMY1 : tdu.h
  • tdu_SLOT_SFDT_DUMMY2 : tdu.h
  • tdu_SLOT_SFDT_DUMMY3 : tdu.h
  • tdu_SLOT_SIA : tdu.h
  • tdu_SLOT_SIA_RX : tdu.h
  • tdu_SLOT_SIA_S : tdu.h
  • tdu_SLOT_SIA_S_RX : tdu.h
  • tdu_SLOT_SS7COR : tdu.h
  • tdu_SLOT_SS7COT : tdu.h
  • tdu_SLOT_SS7COT_RX : tdu.h
  • tdu_SLOT_TT1khz : tdu.h
  • tdu_SLOT_V18A : tdu.h
  • tdu_SLOT_V18A_RX : tdu.h
  • tdu_SLOT_V18A_S : tdu.h
  • tdu_SLOT_V18A_S_RX : tdu.h
  • tdu_SLOT_V21 : tdu.h
  • tdu_SLOT_V21LOW_MARKS : tdu.h
  • tdu_SLOT_V21LOW_MARKS_RX : tdu.h
  • tdu_SLOT_V21LOW_S_RX : tdu.h
  • tdu_SLOT_V21LOW_SPACES : tdu.h
  • tdu_SLOT_V21UPPER_MARKS : tdu.h
  • tdu_SLOT_V23BW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS : tdu.h
  • tdu_SLOT_V23FW_MARKS_RX : tdu.h
  • tdu_SLOT_V25RX : tdu.h
  • tdu_SLOT_V25TX : tdu.h
  • tdu_TID_ANSAM : tdu.h
  • tdu_TID_ANSAM_PR : tdu.h
  • tdu_TID_ANSAM_PR_RX : tdu.h
  • tdu_TID_ANSAM_RX : tdu.h
  • tdu_TID_B202_TONES : tdu.h
  • tdu_TID_BDTEW1400 : tdu.h
  • tdu_TID_BDTEW1800 : tdu.h
  • tdu_TID_BELL : tdu.h
  • tdu_TID_CAS_T : tdu.h
  • tdu_TID_CIDCAS : tdu.h
  • tdu_TID_CIDCAS_RX : tdu.h
  • tdu_TID_CNG : tdu.h
  • tdu_TID_COIN_TONES : tdu.h
  • tdu_TID_CPT : tdu.h
  • tdu_TID_CRE2 : tdu.h
  • tdu_TID_FIRST : tdu.h
  • tdu_TID_FIRST_EXT : tdu.h
  • tdu_TID_LAST : tdu.h
  • tdu_TID_LAST_EXT : tdu.h
  • tdu_TID_LONG_DIGIT : tdu.h
  • tdu_TID_MASK_ID : tdu.h
  • tdu_TID_MASKED : tdu.h
  • tdu_TID_NULL : tdu.h
  • tdu_TID_PARALLEL_MASK : tdu.h
  • tdu_TID_RXDIR : tdu.h
  • tdu_TID_SF : tdu.h
  • tdu_TID_SIA : tdu.h
  • tdu_TID_SS7COR : tdu.h
  • tdu_TID_SS7COT : tdu.h
  • tdu_TID_TONE0 : tdu.h
  • tdu_TID_TONE1 : tdu.h
  • tdu_TID_TONE10 : tdu.h
  • tdu_TID_TONE11 : tdu.h
  • tdu_TID_TONE12 : tdu.h
  • tdu_TID_TONE13 : tdu.h
  • tdu_TID_TONE14 : tdu.h
  • tdu_TID_TONE15 : tdu.h
  • tdu_TID_TONE16 : tdu.h
  • tdu_TID_TONE2 : tdu.h
  • tdu_TID_TONE3 : tdu.h
  • tdu_TID_TONE4 : tdu.h
  • tdu_TID_TONE5 : tdu.h
  • tdu_TID_TONE6 : tdu.h
  • tdu_TID_TONE7 : tdu.h
  • tdu_TID_TONE8 : tdu.h
  • tdu_TID_TONE9 : tdu.h
  • tdu_TID_TT1khz : tdu.h
  • tdu_TID_TXDIR : tdu.h
  • tdu_TID_TYPE00 : tdu.h
  • tdu_TID_TYPE01 : tdu.h
  • tdu_TID_TYPE02 : tdu.h
  • tdu_TID_TYPE03 : tdu.h
  • tdu_TID_TYPE_MASK : tdu.h
  • tdu_TID_V18A : tdu.h
  • tdu_TID_V21 : tdu.h
  • tdu_TID_V21_CI : tdu.h
  • tdu_TID_V21_CM : tdu.h
  • tdu_TID_V21_CM_FAX : tdu.h
  • tdu_TID_V21_LOWER : tdu.h
  • tdu_TID_V21_TONES : tdu.h
  • tdu_TID_V23_TONES : tdu.h
  • tdu_TID_V25 : tdu.h
  • tdu_TID_V25_EARLY_REPORT_ALERT : tdu.h
  • tdu_TID_V25_EARLY_REPORT_FALSE : tdu.h
  • tdu_TID_V25_PR : tdu.h
  • tdu_TID_V25_RX : tdu.h
  • tdu_TID_V25_RX_PR : tdu.h
  • tdu_TID_V8BIS_TONES : tdu.h
  • tdu_TID_VOICE_DISC : tdu.h
  • tdu_TX_DELAY_BUF_NUM : tdu.h
  • tdu_V8_OFFSET : tdu.h
  • ti_mas_tdu_Version___VERS : Version.h
  • ti_mas_tdu_Version__top__ : Version.h
  • ti_mas_tdu_Version_BTYPE : Version.h
  • ti_mas_tdu_Version_BUILD : Version.h
  • ti_mas_tdu_Version_MAJOR : Version.h
  • ti_mas_tdu_Version_MINOR : Version.h
  • ti_mas_tdu_Version_PATCH : Version.h
  • ti_mas_tdu_Version_QUALITY : Version.h
  • ti_mas_tdu_Version_WIDTH : Version.h
  • ti_mas_tdu_Version_XVERTICAL : Version.h


TDU: Data Fields

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

- v -

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


TDU: Data Fields

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

  • tduRxLocation_t : tdu.h
  • tduTxLocation_t : tdu.h


TDU: Data Fields

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

  • tdu_ERROR : tdu.h
  • tdu_EXC_DELETE : tdu.h
  • tdu_EXC_FRAMESIZE : tdu.h
  • tdu_EXC_MEMORY : tdu.h
  • tdu_EXC_MFDET : tdu.h
  • tdu_EXC_OPEN : tdu.h
  • tdu_EXC_RECEIVEIN : tdu.h
  • tdu_EXC_SENDIN : tdu.h
  • tdu_NOERR : tdu.h
  • tdu_NOMEMORY : tdu.h
  • tdu_RX_AFTER_CONF : tdu.h
  • tdu_RX_BEFORE_CONF : tdu.h
  • tdu_RX_ONLY : tdu.h
  • tdu_TX_AFTER_CONF : tdu.h
  • tdu_TX_BEFORE_CONF : tdu.h
  • tdu_TX_ONLY : tdu.h


TDU: Data Fields

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

- t -

  • tdu_digit_filter() : tdu.h
  • tdu_mf_cidcas_ctl() : tdu.h
  • tdu_mf_coin_tones_ctl() : tdu.h
  • tdu_mf_v8bis_fs_ctl() : tdu.h
  • tdu_sfd_llmr_ANSam() : tdu.h
  • tdu_sfd_llmr_ANSam_reset() : tdu.h
  • tdu_sfd_llmr_ANSam_test() : tdu.h
  • tduBDTEWControl() : tdu.h
  • tduBDTEWProcess() : tdu.h
  • tduBellTid() : tdu.h
  • tduClose() : tdu.h
  • tduControl() : tdu.h
  • tduCPTControl() : tdu.h
  • tduCPTProcess() : tdu.h
  • tduDelete() : tdu.h
  • tduDummyControl() : tdu.h
  • tduDummyProcess() : tdu.h
  • tduGetSizes() : tdu.h
  • tduGetStats() : tdu.h
  • tduMFControl() : tdu.h
  • tduMFProcess() : tdu.h
  • tduNew() : tdu.h
  • tduOpen() : tdu.h
  • tduReceiveIn() : tdu.h
  • tduSendIn() : tdu.h
  • tduSFDControl() : tdu.h
  • tduSFDFProcess() : tdu.h
  • tduSFDTProcess() : tdu.h
  • tduV21Control() : tdu.h
  • tduV21Process() : tdu.h
  • tduVoiceDiscCtl() : tdu.h
  • tduVoiceDiscProcess() : tdu.h


TDU: Data Fields

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

  • tduCfgCtlStd_t : tdu.h
  • tduContext_t : tdu.h
  • tduDigitFilterCfgCtl_t : tdu.h
  • tduRepStats_t : tdu.h


TDU: Data Fields

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

- t -

  • tduDetContexts : tdu.h
  • tduIncB202_MARKS_F : tdu.h
  • tduIncB202_SPACES_F : tdu.h
  • tduIncBELLRX1_T : tdu.h
  • tduIncBELLRX2_T : tdu.h
  • tduIncBELLTX1_F : tdu.h
  • tduIncBELLTX2_F : tdu.h
  • tduIncCASH_T_RX : tdu.h
  • tduIncCASL_T_RX : tdu.h
  • tduIncCIDCAS : tdu.h
  • tduIncCNG_F : tdu.h
  • tduIncCNG_T : tdu.h
  • tduIncCOIN_TONES : tdu.h
  • tduIncCPT : tdu.h
  • tduIncDTMF : tdu.h
  • tduIncR1 : tdu.h
  • tduIncR2BW : tdu.h
  • tduIncR2FW : tdu.h
  • tduIncSF_F : tdu.h
  • tduIncSFDT_DUMMY1_T : tdu.h
  • tduIncSFDT_DUMMY2_T : tdu.h
  • tduIncSFDT_DUMMY3_T : tdu.h
  • tduIncSIA_F : tdu.h
  • tduIncSIA_S_F : tdu.h
  • tduIncSIA_S_T_RX : tdu.h
  • tduIncSIA_T_RX : tdu.h
  • tduIncSS7COR_F : tdu.h
  • tduIncSS7COT_F : tdu.h
  • tduIncSS7COT_T : tdu.h
  • tduIncTT1khz_F : tdu.h
  • tduIncUMF : tdu.h
  • tduIncV18A_F : tdu.h
  • tduIncV18A_S_F : tdu.h
  • tduIncV18A_S_T_RX : tdu.h
  • tduIncV18A_T_RX : tdu.h
  • tduIncV21 : tdu.h
  • tduIncV21CM : tdu.h
  • tduIncV21LOW_MARKS_F : tdu.h
  • tduIncV21LOW_MARKS_T : tdu.h
  • tduIncV21LOW_MARKS_T_RX : tdu.h
  • tduIncV21LOW_SPACES_F : tdu.h
  • tduIncV21LOW_SPACES_T_RX : tdu.h
  • tduIncV21UPPER_MARKS_F : tdu.h
  • tduIncV21UPPER_MARKS_LITE_T : tdu.h
  • tduIncV23BW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_F : tdu.h
  • tduIncV23FW_MARKS_T : tdu.h
  • tduIncV25_F : tdu.h
  • tduIncV25_T_RX : tdu.h
  • tduIncV25_T_TX : tdu.h
  • tduIncV25RX_DUMMY_T : tdu.h
  • tduIncV825_F : tdu.h
  • tduIncV8BIS_FS_F : tdu.h
  • tduIntFwTable : tdu.h


TDU: Graph Legend

Graph Legend

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

Consider the following example:

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

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

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

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

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

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

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

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

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

The boxes in the above graph have the following meaning:

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


TDU: Tone Detection Unit

Tone Detection Unit

Collaboration diagram for Tone Detection Unit:

Modules

Inband relay regeneration
Non-MF tone detection ON
Non-MF tone detection OFF
TDU Instance Slots
MF Tone Detection
TDU Position
Modem Relay
Configure Digit Actions
Enable Detection Reports
MIPS Savings
Autocot generation
Digit Signalling
Signal Interruption
Relinquish Memory
Lite mode
CED early alert control
ECO API return codes
Exception codes
Detection report codes

Data Structures

struct | tduCfgCtlStd_s
Single frequency detector configuration structure. Use case: Non-MF tone detection ON. More...
struct | tduCptCfgCtl_t
Call progress tone detector configuration structure. Use case: Non-MF tone detection ON. More...
struct | tduCfgCtl_t
Configuration structure passed to TDU through tduControl() API. This contains several unionized substructures. Each substructure is used with a specific control code in a specific use case/call flow. More...
struct | tduCptSmartRep_t
additional information about TDU detection event. This structure is shared by several detectors inside TDU. More...

Defines

#define | tdu_CTL_MF_STD_ON 0
#define | tdu_CTL_THRE_MIN 2
#define | tdu_DET_ID_DTMF 0
#define | tdu_DET_ID_R1 1
#define | tdu_DET_ID_R2FW 2
#define | tdu_DET_ID_R2BW 3
#define | tdu_DET_ID_V21 4
#define | tdu_DET_ID_CPT 5
#define | tdu_DET_ID_MODEMDISC 6
#define | tdu_DET_ID_V18A 7
#define | tdu_DET_ID_SS7COT 8
#define | tdu_DET_ID_SF 9
#define | tdu_DET_ID_CNG 10
#define | tdu_DET_ID_TT1khz 11
#define | tdu_DET_ID_SS7COR 12
#define | tdu_DET_ID_CIDCAS 13
#define | tdu_DET_ID_CASL 14
#define | tdu_DET_ID_CASH 15
#define | tdu_DET_ID_V8BIS_FS 16
#define | tdu_DET_ID_CRE2 17
#define | tdu_DET_ID_V25LLMR 18
#define | tdu_DET_ID_COIN_TONES 19
#define | tdu_DET_ID_SIA 20
#define | tdu_DET_ID_NONE 255
#define | tdu_CTL_MF_RELAY_OFF 130
#define | tdu_CTL_NONE 255

Typedefs

typedef tduCfgCtlStd_s | tduCfgCtlStd_t
Single frequency detector configuration structure. Use case: Non-MF tone detection ON.

Define Documentation

#define tdu_CTL_MF_STD_ON 0

Turn ON MF detector

Definition at line 95 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 99 of file tdu.h.

#define tdu_DET_ID_DTMF 0

Definition at line 250 of file tdu.h.

#define tdu_DET_ID_R1 1

Definition at line 251 of file tdu.h.

#define tdu_DET_ID_R2FW 2

Definition at line 252 of file tdu.h.

#define tdu_DET_ID_R2BW 3

Definition at line 253 of file tdu.h.

#define tdu_DET_ID_V21 4

Definition at line 254 of file tdu.h.

#define tdu_DET_ID_CPT 5

Definition at line 255 of file tdu.h.

#define tdu_DET_ID_MODEMDISC 6

Definition at line 256 of file tdu.h.

#define tdu_DET_ID_V18A 7

Definition at line 257 of file tdu.h.

#define tdu_DET_ID_SS7COT 8

Definition at line 258 of file tdu.h.

#define tdu_DET_ID_SF 9

Definition at line 259 of file tdu.h.

#define tdu_DET_ID_CNG 10

Definition at line 260 of file tdu.h.

#define tdu_DET_ID_TT1khz 11

Definition at line 261 of file tdu.h.

#define tdu_DET_ID_SS7COR 12

Definition at line 262 of file tdu.h.

#define tdu_DET_ID_CIDCAS 13

Definition at line 263 of file tdu.h.

#define tdu_DET_ID_CASL 14

Definition at line 264 of file tdu.h.

#define tdu_DET_ID_CASH 15

Definition at line 266 of file tdu.h.

#define tdu_DET_ID_V8BIS_FS 16

Definition at line 268 of file tdu.h.

#define tdu_DET_ID_CRE2 17

Definition at line 269 of file tdu.h.

#define tdu_DET_ID_V25LLMR 18

Definition at line 270 of file tdu.h.

#define tdu_DET_ID_COIN_TONES 19

Definition at line 271 of file tdu.h.

#define tdu_DET_ID_SIA 20

Definition at line 272 of file tdu.h.

#define tdu_DET_ID_NONE 255

Definition at line 273 of file tdu.h.

#define tdu_CTL_MF_RELAY_OFF 130

TODO: What is this? SIU does not use this

Definition at line 748 of file tdu.h.

#define tdu_CTL_NONE 255

TDU internal use: dummy control code

Definition at line 750 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 574 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 743 of file tdu.h.

#define tdu_CTL_EARLY_ALERT_SUPPRESS_OFF 129

disable CED early alert event report

Definition at line 744 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 459 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 855 of file tdu.h.

#define tdu_TID_TONE1 1

Definition at line 856 of file tdu.h.

#define tdu_TID_TONE2 2

Definition at line 857 of file tdu.h.

#define tdu_TID_TONE3 3

Definition at line 858 of file tdu.h.

#define tdu_TID_TONE4 4

Definition at line 859 of file tdu.h.

#define tdu_TID_TONE5 5

Definition at line 860 of file tdu.h.

#define tdu_TID_TONE6 6

Definition at line 861 of file tdu.h.

#define tdu_TID_TONE7 7

Definition at line 862 of file tdu.h.

#define tdu_TID_TONE8 8

Definition at line 863 of file tdu.h.

#define tdu_TID_TONE9 9

Definition at line 864 of file tdu.h.

#define tdu_TID_TONE10 10

Definition at line 865 of file tdu.h.

#define tdu_TID_TONE11 11

Definition at line 866 of file tdu.h.

#define tdu_TID_TONE12 12

Definition at line 867 of file tdu.h.

#define tdu_TID_TONE13 13

Definition at line 868 of file tdu.h.

#define tdu_TID_TONE14 14

Definition at line 869 of file tdu.h.

#define tdu_TID_TONE15 15

Definition at line 870 of file tdu.h.

#define tdu_TID_TONE16 16

Definition at line 871 of file tdu.h.

#define tdu_TID_NULL -1

Definition at line 872 of file tdu.h.

#define tdu_TID_FIRST 17

Definition at line 874 of file tdu.h.

#define tdu_TID_V21 17

Definition at line 877 of file tdu.h.

#define tdu_TID_V25 18

Definition at line 879 of file tdu.h.

#define tdu_TID_V25_PR 19

Definition at line 880 of file tdu.h.

#define tdu_TID_CPT 20

Definition at line 882 of file tdu.h.

#define tdu_TID_V18A 21

Definition at line 883 of file tdu.h.

#define tdu_TID_SS7COT 22

Definition at line 885 of file tdu.h.

#define tdu_TID_SF 23

Definition at line 887 of file tdu.h.

#define tdu_TID_CNG 24

Definition at line 892 of file tdu.h.

#define tdu_TID_SS7COR 25

Definition at line 894 of file tdu.h.

#define tdu_TID_TT1khz 26

Definition at line 896 of file tdu.h.

#define tdu_TID_CIDCAS 27

Definition at line 897 of file tdu.h.

#define tdu_TID_CIDCAS_RX 28

Definition at line 899 of file tdu.h.

#define tdu_TID_V25_RX 32

Definition at line 905 of file tdu.h.

#define tdu_TID_V25_RX_PR 33

Definition at line 908 of file tdu.h.

#define tdu_TID_BELL 34

Definition at line 911 of file tdu.h.

#define tdu_TID_FIRST_EXT tdu_TID_BELL

Definition at line 914 of file tdu.h.

#define tdu_TID_V8BIS_TONES 35

Definition at line 915 of file tdu.h.

#define tdu_TID_V21_TONES 36

Definition at line 917 of file tdu.h.

#define tdu_TID_V23_TONES 37

Definition at line 919 of file tdu.h.

#define tdu_TID_V21_CM_FAX 38

Definition at line 922 of file tdu.h.

#define tdu_TID_V21_CI 39

Definition at line 923 of file tdu.h.

#define tdu_TID_B202_TONES 40

Definition at line 924 of file tdu.h.

#define tdu_TID_VOICE_DISC 44

Definition at line 925 of file tdu.h.

#define tdu_TID_LAST_EXT tdu_TID_VOICE_DISC

Definition at line 926 of file tdu.h.

#define tdu_TID_COIN_TONES 45

Definition at line 928 of file tdu.h.

#define tdu_TID_V21_CM 47

Definition at line 930 of file tdu.h.

#define tdu_TID_ANSAM 48

Definition at line 932 of file tdu.h.

#define tdu_TID_ANSAM_PR 49

Definition at line 933 of file tdu.h.

#define tdu_TID_V21_LOWER 50

Definition at line 934 of file tdu.h.

#define tdu_TID_CRE2 51

Definition at line 935 of file tdu.h.

#define tdu_TID_ANSAM_RX 62

Definition at line 936 of file tdu.h.

#define tdu_TID_ANSAM_PR_RX 63

Definition at line 937 of file tdu.h.

#define tdu_TID_V25_EARLY_REPORT_ALERT 64

Early report of 2100 Hz detection.

Definition at line 939 of file tdu.h.

#define tdu_TID_V25_EARLY_REPORT_FALSE 65

Report of early 2100 Hz detection was false.

Definition at line 941 of file tdu.h.

#define tdu_TID_SIA 66

Definition at line 943 of file tdu.h.

#define tdu_TID_LAST 66

Last valid report code

Definition at line 944 of file tdu.h.

#define tdu_TID_BDTEW1400 96

Definition at line 946 of file tdu.h.

#define tdu_TID_BDTEW1800 97

Definition at line 947 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 949 of file tdu.h.

#define tdu_TID_LONG_DIGIT 0x2000

indication of a long digit

Definition at line 951 of file tdu.h.

#define tdu_TID_TXDIR 0x0100

Bit value indicates tone event reported for signal in from TDM direction

Definition at line 953 of file tdu.h.

#define tdu_TID_RXDIR 0x0200

Bit value indicates tone event reported for signal in from Network direction

Definition at line 955 of file tdu.h.

#define tdu_TID_MASK_ID 0x00ff

Bit mask for tone detection event main type

Definition at line 957 of file tdu.h.

#define tdu_TID_TYPE00 (0 << 10)

Tone detector sub-type 0

Definition at line 959 of file tdu.h.

#define tdu_TID_TYPE01 (1 << 10)

Tone detector sub-type 1

Definition at line 960 of file tdu.h.

#define tdu_TID_TYPE02 (2 << 10)

Tone detector sub-type 2

Definition at line 961 of file tdu.h.

#define tdu_TID_TYPE03 (3 << 10)

Tone detector sub-type 3

Definition at line 962 of file tdu.h.

#define tdu_TID_TYPE_MASK (3 << 10)

Tone detector sub-type mask

Definition at line 963 of file tdu.h.

#define tdu_V8_OFFSET 30

TODO: what is this?

Definition at line 965 of file tdu.h.

#define tdu_TID_PARALLEL_MASK 0x0080

TODO: what is this?

Definition at line 967 of file tdu.h.

#define tdu_TID_CAS_T (tdu_TID_CIDCAS_RX | tdu_TID_PARALLEL_MASK)

TODO: what is this?

Definition at line 968 of file tdu.h.

#define tdu_MF_DIGIT_OFF 0

Digit OFF event

Definition at line 975 of file tdu.h.

#define tdu_MF_DIGIT_ON 1

Digit confirmed ON event

Definition at line 976 of file tdu.h.

#define tdu_MF_DIGIT_ALERT_OFF 2

Digit early warning OFF event

Definition at line 977 of file tdu.h.

#define tdu_MF_DIGIT_ALERT_ON 3

Digit early warning ON event

Definition at line 978 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 980 of file tdu.h.

#define MF_ALERT_ONLY (tdu_MF_DIGIT_ALERT_OFF & tdu_MF_DIGIT_ALERT_ON)

TDU internal use

Definition at line 981 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 1120 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 1122 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 1126 of file tdu.h.

#define tdu_SFDT_DET_V25_RX 3

Offset of V25 (from Net) detector context in tduDetContexts array

Definition at line 1130 of file tdu.h.

#define tdu_SFDT_DET_2225_2250_2300_RX 4

Internal use

Definition at line 1135 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 1136 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 1140 of file tdu.h.

#define tdu_SFDT_DET_V18A_RX 6

Definition at line 1144 of file tdu.h.

#define tdu_SFDT_DET_V18A_S_RX 7

Definition at line 1145 of file tdu.h.

#define tdu_SFDT_DET_V21LOW_MARKS_RX 8

Definition at line 1146 of file tdu.h.

#define tdu_SFDT_DET_V21LOW_S_RX 9

Definition at line 1147 of file tdu.h.

#define tdu_SFDT_DET_CIDCAS_RX 10

Definition at line 1148 of file tdu.h.

#define tdu_SFDT_DET_CASL_RX 10

Definition at line 1149 of file tdu.h.

#define tdu_SFDT_DET_CASH_RX 11

Definition at line 1150 of file tdu.h.

#define tdu_SFDT_DET_SIA_RX 6

Definition at line 1151 of file tdu.h.

#define tdu_SFDT_DET_SIA_S_RX 7

Definition at line 1152 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 620 of file tdu.h.

#define tdu_CTL_MFSTD_SAVE 122

Save configuration parameters from MF STD slot in a system structure

Definition at line 621 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 623 of file tdu.h.

#define tdu_SLOT_MF_STD 0

Slot number of MF tone detector

Definition at line 626 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 804 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 529 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 829 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 96 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 728 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 353 of file tdu.h.

#define tdu_CTL_MF_DTMF 73

Turn on DTMF detector

Definition at line 355 of file tdu.h.

#define tdu_CTL_MF_R1 74

Turn on MF R1 detector

Definition at line 356 of file tdu.h.

#define tdu_CTL_MF_R2FW 75

Turn on MF R2 forward detector

Definition at line 357 of file tdu.h.

#define tdu_CTL_MF_R2BW 76

Turn on MF R2 backward detector

Definition at line 358 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 359 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 555 of file tdu.h.

#define tdu_CTL_RELEASE 113

Reenable all tone detectors previously disabled through tdu_CTL_SUSSPEND

Definition at line 556 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 444 of file tdu.h.

#define tdu_CTL_LLMR_OFF 109

Switch out of Modem Relay mode

Definition at line 445 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 189 of file tdu.h.

#define tdu_CTL_V21_OFF 33

Switch off V.21 detector

Definition at line 191 of file tdu.h.

#define tdu_CTL_V25_OFF 34

Switch off V.25 detector

Definition at line 192 of file tdu.h.

#define tdu_CTL_RSVD3 35

Reseved. Control codes correspond to TDU report codes

Definition at line 193 of file tdu.h.

#define tdu_CTL_CPT_OFF 36

Switch off Call Progress Tonedetector

Definition at line 195 of file tdu.h.

#define tdu_CTL_V18A_OFF 37

Switch off V.18A detector

Definition at line 196 of file tdu.h.

#define tdu_CTL_SS7COT_OFF 38

Switch off SS7 COT detector

Definition at line 197 of file tdu.h.

#define tdu_CTL_SF_OFF 39

Switch off Single Frequency detector

Definition at line 198 of file tdu.h.

#define tdu_CTL_CNG_OFF 40

Switch off (fax) CNG detector

Definition at line 199 of file tdu.h.

#define tdu_CTL_SS7COR_OFF 41

Switch off SS7 COR detector

Definition at line 200 of file tdu.h.

#define tdu_CTL_TT1khz_OFF 42

Switch off Test tone (1kHz) detector

Definition at line 201 of file tdu.h.

#define tdu_CTL_UMF_OFF 43

Switch off the slot (TX) populated with CID CAS

Definition at line 202 of file tdu.h.

#define tdu_CTL_SFDT_CIDCAS_OFF 44

Switch off the slots (RX) populated with CID CAS

Definition at line 204 of file tdu.h.

#define tdu_CTL_CIDCAS_ALL_OFF 45

Switch off both CID CAS detectors (Tx & RX)

Definition at line 206 of file tdu.h.

#define tdu_CTL_RSVD4 46

Reseved

Definition at line 208 of file tdu.h.

#define tdu_CTL_CRE_OFF 47

Disable both first and second segment CRe detectors

Definition at line 209 of file tdu.h.

#define tdu_CTL_MF_CRE1_OFF 48

Switch off first segment detector (dual-tone)

Definition at line 211 of file tdu.h.

#define tdu_CTL_CRE2_OFF 49

Switch off second segment detector (single-tone)

Definition at line 213 of file tdu.h.

#define tdu_CTL_BELL_OFF 50

Switch off 2225/2250 Hz detector

Definition at line 215 of file tdu.h.

#define tdu_CTL_V8BIS_TONES_OFF 51

Switch off V8BIS detector

Definition at line 216 of file tdu.h.

#define tdu_CTL_V21_TONES_OFF 52

Switch off V21 detector

Definition at line 217 of file tdu.h.

#define tdu_CTL_V23_TONES_OFF 53

Switch off V23 detector

Definition at line 218 of file tdu.h.

#define tdu_CTL_V21_CM_FAX_OFF 54

Switch off V21_CM_FAX detector

Definition at line 219 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 220 of file tdu.h.

#define tdu_CTL_B202_TONES_OFF 56

Switch off B202 detector

Definition at line 222 of file tdu.h.

#define tdu_CTL_VOICE_DISC_OFF 59

Switch off VOICE DISC detector

Definition at line 223 of file tdu.h.

#define tdu_CTL_COIN_TONES_OFF 60

Switch off COIN TONES detector

Definition at line 224 of file tdu.h.

#define tdu_CTL_BDTEW_OFF 61

Switch off BDT EW detector

Definition at line 225 of file tdu.h.

#define tdu_CTL_SIA_OFF 62

Switch off SIA detector

Definition at line 226 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 228 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 230 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 111 of file tdu.h.

#define tdu_CTL_V21_ON 2

Turn on V.21 detector (upper channel)

Definition at line 113 of file tdu.h.

#define tdu_CTL_V25_ON 3

Turn on V.25 detector

Definition at line 114 of file tdu.h.

#define tdu_CTL_RSVD1 4

Reseved. Control codes correspond to TDU report codes

Definition at line 115 of file tdu.h.

#define tdu_CTL_CPT_ON 5

Turn on Call Progress Tone detector

Definition at line 117 of file tdu.h.

#define tdu_CTL_V18A_ON 6

Turn on V.18A detector

Definition at line 118 of file tdu.h.

#define tdu_CTL_SS7COT_ON 7

Switch on SS7 COT detector

Definition at line 119 of file tdu.h.

#define tdu_CTL_SF_ON 8

Switch on Single Frequency detector

Definition at line 120 of file tdu.h.

#define tdu_CTL_CNG_ON 9

Switch on (fax) CNG detector

Definition at line 121 of file tdu.h.

#define tdu_CTL_SS7COR_ON 10

Switch on SS7 COR detector

Definition at line 122 of file tdu.h.

#define tdu_CTL_TT1khz_ON 11

Switch on Test tone (1kHz) detector

Definition at line 123 of file tdu.h.

#define tdu_CTL_MF_CIDCAS_ON 12

CID CAS dual tone alert: 1 per group

Definition at line 124 of file tdu.h.

#define tdu_CTL_SFDT_CIDCAS_ON 13

CID CAS dual tone detector served by SFDT table

Definition at line 125 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 127 of file tdu.h.

#define tdu_CTL_RSVD2 15

Reseved

Definition at line 129 of file tdu.h.

#define tdu_CTL_CRE_ON 16

Turn on both first and second segment CRe detectors

Definition at line 131 of file tdu.h.

#define tdu_CTL_MF_CRE1_ON 17

Turn on Dual-tone first segment

Definition at line 133 of file tdu.h.

#define tdu_CTL_CRE2_ON 18

Turn on Single-tone second segment

Definition at line 134 of file tdu.h.

#define tdu_CTL_BELL_ON 19

Switch on 2225/2250 Hz detector

Definition at line 135 of file tdu.h.

#define tdu_CTL_V8BIS_TONES_ON 20

Switch on first segment dual-tone detectors

Definition at line 136 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 138 of file tdu.h.

#define tdu_CTL_V23_TONES_ON 22

V.23 forward channel, 2300/1300Hz (0/1), continuous marks

Definition at line 140 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 142 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 144 of file tdu.h.

#define tdu_CTL_B202_TONES_ON 25

Bell202 Modem Tone

Definition at line 146 of file tdu.h.

#define tdu_CTL_VOICE_DISC_ON 29

Turn on voice descrimination detector

Definition at line 147 of file tdu.h.

#define tdu_CTL_MF_COIN_TONES_ON 30

Coin machine dual frequency tones

Definition at line 148 of file tdu.h.

#define tdu_CTL_BDTEW_ON 31

BDT Early warning detector

Definition at line 149 of file tdu.h.

#define tdu_CTL_SIA_ON 32

Turn on the SIA Tone detector

Definition at line 150 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 151 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 697 of file tdu.h.

#define tdu_CTL_RESTART 126

Restart TDU operation - use preserved configuration parameters from before stop operation

Definition at line 699 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 673 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 286 of file tdu.h.

#define tdu_SLOT_MF_USER 1

For mf user defined detector

Definition at line 287 of file tdu.h.

#define tdu_SLOT_V21 2

For v.21 detector

Definition at line 288 of file tdu.h.

#define tdu_SLOT_CPT 3

For call progress tone detector

Definition at line 289 of file tdu.h.

#define tdu_SLOT_V25TX 4

First slot for V.25 detector, usually Tx

Definition at line 290 of file tdu.h.

#define tdu_SLOT_V18A 5

For v.18a tone detector

Definition at line 291 of file tdu.h.

#define tdu_SLOT_MF_RSVD2 6

Defined in interface file: tdu.h

Definition at line 292 of file tdu.h.

#define tdu_SLOT_SF 7

For single frequency signalling: should be 7

Definition at line 293 of file tdu.h.

#define tdu_SLOT_CNG 8

For cng

Definition at line 294 of file tdu.h.

#define tdu_SLOT_TT1khz 9

For test tones (old 1000 Hz and new 1004 Hz)

Definition at line 295 of file tdu.h.

#define tdu_SLOT_MF_RSVD3 10

Defined in interface file: tdu.h

Definition at line 296 of file tdu.h.

#define tdu_SLOT_BELLTX1 11

Bell 103 and V.22 unscrambled ones

Definition at line 297 of file tdu.h.

#define tdu_SLOT_BELLTX2 12

Bell 103 lower channel, 1270Hz, continuous marks

Definition at line 298 of file tdu.h.

#define tdu_SLOT_V21LOW_MARKS 13

V.21 low channel, 1180/980 Hz (0/1), continuous marks

Definition at line 299 of file tdu.h.

#define tdu_SLOT_V21UPPER_MARKS 14

V.21 upper channel, 1850/1650 Hz (0/1), continuous marks

Definition at line 300 of file tdu.h.

#define tdu_SLOT_V23FW_MARKS 15

V.23 forward channel, 2300/1300 Hz (0/1), continuous marks

Definition at line 301 of file tdu.h.

#define tdu_SLOT_V23BW_MARKS 16

V.23 backward channel, 390/450Hz (0/1), continuous marks

Definition at line 302 of file tdu.h.

#define tdu_SLOT_V18A_S 17

V.18A low channel, 1800 Hz, continuous spaces

Definition at line 303 of file tdu.h.

#define tdu_SLOT_B202_M 18

Bell 202 continuous marks (1200Hz)

Definition at line 304 of file tdu.h.

#define tdu_SLOT_B202_S 19

Bell 202 continuous spaces (2200Hz)

Definition at line 305 of file tdu.h.

#define tdu_SLOT_BDTEW 20

Used for early warning detection

Definition at line 306 of file tdu.h.

#define tdu_SLOT_V21LOW_SPACES 21

V.21 low channel, 1180/980 Hz (0/1)

Definition at line 307 of file tdu.h.

#define tdu_SLOT_MF_USER1 22

Definition at line 308 of file tdu.h.

#define tdu_SLOT_SIA 23

SIA: 1400 Hz detection

Definition at line 309 of file tdu.h.

#define tdu_SLOT_SIA_S 24

SIA: 2300 Hz detection

Definition at line 310 of file tdu.h.

#define tdu_SLOT_MAX_TX 24

Last TX slot used

Definition at line 311 of file tdu.h.

#define tdu_SLOT_V25RX 0

Time domain V.25 detector on Rx path.

Definition at line 313 of file tdu.h.

#define tdu_SLOT_BELLRX1 1

RX path time domain slot: 2225 Hz detection

Definition at line 314 of file tdu.h.

#define tdu_SLOT_BELLRX2 2

RX path time domain slot: 2250 Hz detection

Definition at line 315 of file tdu.h.

#define tdu_SLOT_V23FW_MARKS_RX 3

RX path time domain slot: 1300 Hz detection

Definition at line 316 of file tdu.h.

#define tdu_SLOT_V18A_RX 4

RX path time domain slot: V.18A 1400Hz detector

Definition at line 317 of file tdu.h.

#define tdu_SLOT_V18A_S_RX 5

RX path time domain slot: V.18A 1800Hz detector

Definition at line 318 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 319 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 320 of file tdu.h.

#define tdu_SLOT_CASL_RX 8

RX path time domain slot: CAS low tone detector

Definition at line 321 of file tdu.h.

#define tdu_SLOT_CASH_RX 9

RX path time domain slot: CAS high tone detector

Definition at line 322 of file tdu.h.

#define tdu_SLOT_SFDT_DUMMY1 10

Internal slot for mux-ed Rx side detectors

Definition at line 323 of file tdu.h.

#define tdu_SLOT_SFDT_DUMMY2 11

Internal slot for mux-ed Rx side detectors

Definition at line 324 of file tdu.h.

#define tdu_SLOT_SFDT_DUMMY3 12

Internal slot for mux-ed Rx side detectors

Definition at line 325 of file tdu.h.

#define tdu_SLOT_SS7COT_RX 13

SS7COT RX side time domain detector

Definition at line 327 of file tdu.h.

#define tdu_SLOT_SIA_RX 14

Definition at line 328 of file tdu.h.

#define tdu_SLOT_SIA_S_RX 15

Definition at line 329 of file tdu.h.

#define tdu_SLOT_MAX_RX 15

Last RX slot used

Definition at line 331 of file tdu.h.

#define tdu_SLOT_NONE 255

Definition at line 334 of file tdu.h.

#define tdu_SLOT_MAX (tdu_SLOT_MAX_TX + tdu_SLOT_MAX_RX + 1)

Definition at line 335 of file tdu.h.

#define tdu_MAX_SLOT (tdu_SLOT_MAX + 1)

Max detectors operating in parallel

Definition at line 336 of file tdu.h.

#define tdu_MAX_SLOT_TX (tdu_SLOT_MAX_TX + 1)

No of Tx detectors

Definition at line 337 of file tdu.h.

#define tdu_MAX_SLOT_RX (tdu_SLOT_MAX_RX + 1)

No of Rx detectors

Definition at line 338 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 396 of file tdu.h.


TDU: TDU (Tone Detection Unit) Package

TDU (Tone Detection Unit) Package

Release 2.4.1.0

Page Contents

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

Description

The Tone Detection Unit (TDU) is able to detect various types of line events encountered in a voice band channel. In the PSTN, tones are generated at different places. Some detectors are needed even before a voice path is established (trunk events), and are actually a prerequisite for voice path establishment (e.g., PTS). Some tone events need to be detected and transported through the packet network with descriptive attributes. These events and attributes are also used for proper tone restoration on the remote side (low bit-rate voice codecs cannot guarantee the reproduction of some tone signals accurately for automatic recognition), or for out-of-band signaling. By defining separate payload formats for tone events, additional bandwidth compression is achieved.

Additional links: Detailed TDU Description

Integration

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

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

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

Additional links: | TDU External API
 | TDU Integration

Default Configuration

The single parameter required to open a TDU instance is the operational frame size (in samples). This value must represent either 5.0 or 5.5 ms. By default all primary and secondary detectors are disabled. All required detectors must be enabled via tduControl() for reporting to occur.

Configurable parameters for each individual (primary and secondary) detector context can be found on their respective pages following the links below.

Additional links: | Primary Detector Details
 | Secondary Detector Details

Performance

Performance improvements have been implemented in the TDU component to support operation in a Voice over Packet (VoP) environment. This includes quick and reliable detection of DTMF events (digit leakage reduction) and improved talk-off performance.

For MIPS and memory information proceed to the links provided below

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

Following is a list of TDU limitations:

  • The call progress tones detector does not verify signal cadence or the list of acceptable frequencies. As such, additional processing by the host is needed. It is up to the host to verify proper cadence and frequencies for the given telephone network and map that to a particular event (E.180 supp. 2).
  • Two tones closer than 50 Hz cannot be discriminated as a double tone event; instead, a wideband, single-tone event is reported.
  • The general tone frequency peak estimation accuracy is ±3 Hz.
  • The TDU component operates on frame sizes limited to 5.0 or 5.5 ms.

Limitations for each individual (primary and secondary) detector can be found on their respective pages following the links below.

Additional links: | Primary Detector Details
 | Secondary Detector Details

Standards Compliance

The TDU complies with many ITU-T and Bellcore\/Telcordia Standards. These include ITU-T G-Series, Q-Series, R-Series, T-Series and V-Series. The complete list is linked below. Standards compliance for each individual (primary and secondary) detector is available as well via their respective pages.

Additional links: | Standard Compliance
 | Primary Detector Details
 | Secondary Detector Details

Dependent Packages

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

  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 1614 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 756 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 758 of file tdu.h.

tduCfgCtlStd_t tduCfgCtl_t::std

Single frequency detector configuration structure

Definition at line 760 of file tdu.h.

tduCptCfgCtl_t tduCfgCtl_t::cpt

Call progress tone detector configuration structure

Definition at line 763 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 766 of file tdu.h.

tduDigitFilterCfgCtl_t tduCfgCtl_t::dfilt

Structure for filtering digit reports upon digit detection

Definition at line 770 of file tdu.h.

tduQueryState_t tduCfgCtl_t::state

Structure used by TDU to report its internal state

Definition at line 773 of file tdu.h.

tduToneFilterCfgCtl_t tduCfgCtl_t::tfilt

Configuration structure to enable/disable tone reports

Definition at line 776 of file tdu.h.

tduMfState_t* tduCfgCtl_t::mfstate

Structure for saving/restoring MF detector configuration parameters

Definition at line 779 of file tdu.h.

tduTxDelayLine_t tduCfgCtl_t::tx_delay_line

Structure used by TDU to return pointer to memory relinquished

Definition at line 782 of file tdu.h.

tduPosition_t tduCfgCtl_t::position

Structure used to used to set position of TDU in system

Definition at line 785 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 788 of file tdu.h.

tbool tduCfgCtl_t::digit_sent

TODO: what is this used for?

Definition at line 791 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 160 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 161 of file tdu.h.

Fract tduCfgCtlStd_s::toneOnSnr

minimum signal to noise ratio (dB Q0.15 converted to dB Q4

Definition at line 163 of file tdu.h.

tuint tduCfgCtlStd_s::toneOnConfirmDuration

minimum duration for tone ON confirmation

Definition at line 165 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 1411 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 1412 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 1350 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 1375 of file tdu.h.

tuint tduContext_s::tduRxSaveSize

Internal use. Must be initialized to 0.

Definition at line 1378 of file tdu.h.

tint tduContext_s::detNum

Internal use. Must be initialized to 0.

Definition at line 1381 of file tdu.h.

tint tduContext_s::detNumSFDF

Internal use. Must be initialized to 0.

Definition at line 1384 of file tdu.h.

tint tduContext_s::detNumSFDT

Internal use. Must be initialized to 0.

Definition at line 1388 of file tdu.h.

linSample* tduContext_s::work_buf

Internal use. Must be initialized to NULL.

Definition at line 1392 of file tdu.h.

linSample* tduContext_s::local_buf

Internal use. Must be initialized to NULL.

Definition at line 1396 of file tdu.h.

LFract* tduContext_s::magnitudes

Internal use. Must be initialized to NULL.

Definition at line 1399 of file tdu.h.

tuint tduContext_s::detInstVec[tdu_MAX_SLOT]

Internal use. Must be initialized to 0.

Definition at line 1402 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 173 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 174 of file tdu.h.

Fract tduCptCfgCtl_t::startFreq

Start frequency of target CPT energy band

Definition at line 176 of file tdu.h.

Fract tduCptCfgCtl_t::endFreq

End frequency of target CPT energy band

Definition at line 177 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 988 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 989 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 990 of file tdu.h.

tint tduCptSmartRep_t::freq2

In case of single tone event, reserved value is 0

Definition at line 994 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 996 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 1032 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 1033 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 1034 of file tdu.h.

tint tduDetContext_t::detSlot

Run-time slot for this detector

Definition at line 1044 of file tdu.h.

tuint tduDetContext_t::slotInstSize

Size in words, necessary to contain all instance information for this specific detector.

Definition at line 1045 of file tdu.h.

tint tduDetContext_t::c_code_on

Control code to switch on the detector

Definition at line 1048 of file tdu.h.

tint tduDetContext_t::c_code_off

Control code to switch off the detector

Definition at line 1049 of file tdu.h.

tint* tduDetContext_t::params

Pointer to an area of paramaters

Definition at line 1050 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 464 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 465 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 501 of file tdu.h.

tuint tduDigitFilterCfgCtl_s::long_digit_hangover

Time to elapse (ms) before long digit event is reported

Definition at line 514 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 1232 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 1233 of file tdu.h.

tduTable_t tduIntFwTable_t::sfdt

Single frequency detector (from Network) call table

Definition at line 1234 of file tdu.h.

tduTable_t tduIntFwTable_t::mf

MF detector call table

Definition at line 1235 of file tdu.h.

tduTable_t tduIntFwTable_t::cpt

CPT detector call table

Definition at line 1236 of file tdu.h.

tduTable_t tduIntFwTable_t::v21

V21 flags detector call table

Definition at line 1237 of file tdu.h.

tduTable_t tduIntFwTable_t::bdtew

Baudot early warning detector call table

Definition at line 1238 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 365 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 366 of file tdu.h.

Fract tduMfCfgCtl_t::freqPowThreshHigh

Maximum power level threshold for each freq (dBm)

Definition at line 368 of file tdu.h.

Fract tduMfCfgCtl_t::twistNegative

Maximum power level difference (dB) between lower and higher group frequencies

Definition at line 370 of file tdu.h.

Fract tduMfCfgCtl_t::twistPositive

Maximum power level difference (dB) between higher and lower group frequencies

Definition at line 373 of file tdu.h.

Fract tduMfCfgCtl_t::breakThresh

Threshold of signal power (dBm) for break detection

Definition at line 376 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 644 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 645 of file tdu.h.

LFract tduMfState_t::freq_pow_thresh_high

Internal field. Used in save/restore process by TDU

Definition at line 647 of file tdu.h.

void* tduMfState_t::params

Internal field. Used in save/restore process by TDU

Definition at line 649 of file tdu.h.

tuint tduMfState_t::bfield1

Internal field. Used in save/restore process by TDU

Definition at line 651 of file tdu.h.

tint tduMfState_t::switched

Internal field. Used in save/restore process by TDU

Definition at line 653 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 1432 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 1433 of file tdu.h.

tduSizeConfig_t tduNewConfig_t::sizeCfg

See tduSizeConfig_t

Definition at line 1434 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 401 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 411 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 429 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 632 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 633 of file tdu.h.

tulong tduQueryState_t::hot_detectors

bitfield indicating which detectors are in in progress

Definition at line 635 of file tdu.h.

tulong tduQueryState_t::active_tone_reports

bitfield indicating which tone detection reports are enabled

Definition at line 637 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 1462 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 1463 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 581 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 584 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 586 of file tdu.h.

tduCfgCtlStd_t tduSfdPeek_t::std

Structure for TDU to return configuration data to the system: tduCfgCtlStd_t

Definition at line 595 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 1421 of file tdu.h.

Data Fields

tint | maxSamplesPerFrame
tuint | lite

Field Documentation

tint tduSizeConfig_t::maxSamplesPerFrame

Input frame length

Definition at line 1422 of file tdu.h.

tuint tduSizeConfig_t::lite

Is TDU lite or full?

Definition at line 1425 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 1226 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 534 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 535 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 538 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 707 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 708 of file tdu.h.

tint tduTxDelayLine_t::length

length of TDU delay line in 16-bit words

Definition at line 709 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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 78 of file tdu.h.

#define tdu_POSITION_TXRX_CHANGED 0x0001

bitfield to change position related to: From TDM Vs From Network

Definition at line 402 of file tdu.h.

#define tdu_POSITION_PRI_ACBC_CHANGED 0x0002

bitfield to change position related to: Before Vs After conferencing

Definition at line 404 of file tdu.h.

#define tdu_POSITION_SEC_ACBC_CHANGED 0x0004

bitfield to change position related to: Before Vs After conferencing

Definition at line 406 of file tdu.h.

#define tdu_POSITION_TYPE 0x0008

Definition at line 408 of file tdu.h.

#define tdu_POSITION_MF_TESTS_CHANGED 0x0030

MF Tests modified

Definition at line 410 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 414 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 417 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 421 of file tdu.h.

#define tdu_POSITION_MF_TESTS_SHIFT 4

Definition at line 425 of file tdu.h.

#define tdu_POSITION_MF_TESTS_STEP_RISE 0x0010

Definition at line 427 of file tdu.h.

#define tdu_POSITION_MF_TESTS_PREDIGIT_SNR 0x0020

Definition at line 428 of file tdu.h.

#define tdu_SLOT_SS7COT 6

Slot number of SS7 COT tone detector

Definition at line 582 of file tdu.h.

#define tdu_SLOT_SS7COR 10

Slot number of SS7 COR tone detector

Definition at line 583 of file tdu.h.

#define tdu_OPERATION_DIR_MASK 0x07

Mask for quickly extracting bit values in operation field

Definition at line 591 of file tdu.h.

#define tdu_OPERATION_ENABLED 0x08

Bit position indicating whether tone is enabled/disabled

Definition at line 593 of file tdu.h.

#define tdu_DET_TABLEID_MASK 0x000f

Definition at line 1039 of file tdu.h.

#define tdu_DET_TXDIR 0x0100

Definition at line 1040 of file tdu.h.

#define tdu_DET_RXDIR 0x0200

Definition at line 1041 of file tdu.h.

#define tdu_DET_DIR_MASK 0x0300

Definition at line 1042 of file tdu.h.

#define tdu_SIZECFG_LITE 1

TDU in lite mode

Definition at line 1423 of file tdu.h.

#define tdu_SIZECFG_FULL 0

TDU in full mode

Definition at line 1424 of file tdu.h.

#define tdu_FALSE_ALERT_CNT_MASK 0x00FF

Definition at line 1467 of file tdu.h.

#define tdu_SET_FALSE_ALERT_CNT | ( | x,
 |  | v | ) | (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 0, 8))

Definition at line 1468 of file tdu.h.

#define tdu_GET_FALSE_ALERT_CNT ( x ) (utlGetBitfield((x)->tduRepStats.FalseAlert, 0, 8))

Definition at line 1469 of file tdu.h.

#define tdu_SET_ON_OFF_FLAG | ( | x,
 |  | v | ) | (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 14, 2))

Definition at line 1470 of file tdu.h.

#define tdu_GET_ON_OFF_FLAG ( x ) (utlGetBitfield((x)->tduRepStats.FalseAlert, 14, 2))

Definition at line 1471 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 1442 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 1453 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
00070 #include <ti/mas/types/types.h>
00071 #include <ti/mas/util/debug.h>
00072 #include <ti/mas/util/ecomem.h>
00073 #include <ti/mas/util/utl.h>
00074
00075 /* CAUTION: don't merge these hard defines from HD because these are
00076    compile time options */
00077 /* TX delay buffer number. */
00078 #define tdu_TX_DELAY_BUF_NUM 3
00079
00081 /* @{ */
00082
00094 /* @{ */
00095 #define  tdu_CTL_MF_STD_ON       0
00096 #define  tdu_CTL_MF_STD_OFF      1
00097 /* @} */
00098
00099 #define  tdu_CTL_THRE_MIN        2
00110 /* @{ */
00111 #define  tdu_CTL_ON_FIRST        2
00113 #define  tdu_CTL_V21_ON          2
00114 #define  tdu_CTL_V25_ON          3
00115 #define  tdu_CTL_RSVD1           4
00117 #define  tdu_CTL_CPT_ON          5
00118 #define  tdu_CTL_V18A_ON         6
00119 #define  tdu_CTL_SS7COT_ON       7
00120 #define  tdu_CTL_SF_ON           8
00121 #define  tdu_CTL_CNG_ON          9
00122 #define  tdu_CTL_SS7COR_ON       10
00123 #define  tdu_CTL_TT1khz_ON       11
00124 #define  tdu_CTL_MF_CIDCAS_ON    12
00125 #define  tdu_CTL_SFDT_CIDCAS_ON  13
00127 #define  tdu_CTL_CIDCAS_ALL_ON   14
00129 #define  tdu_CTL_RSVD2           15
00131 #define  tdu_CTL_CRE_ON          16
00133 #define  tdu_CTL_MF_CRE1_ON      17
00134 #define  tdu_CTL_CRE2_ON         18
00135 #define  tdu_CTL_BELL_ON         19
00136 #define  tdu_CTL_V8BIS_TONES_ON  20
00138 #define  tdu_CTL_V21_TONES_ON    21
00140 #define  tdu_CTL_V23_TONES_ON    22
00142 #define  tdu_CTL_V21_CM_FAX_ON   23
00144 #define  tdu_CTL_V21_V8DATA_ON   24
00146 #define  tdu_CTL_B202_TONES_ON   25
00147 #define  tdu_CTL_VOICE_DISC_ON   29
00148 #define  tdu_CTL_MF_COIN_TONES_ON 30
00149 #define  tdu_CTL_BDTEW_ON        31
00150 #define  tdu_CTL_SIA_ON          32
00151 #define  tdu_CTL_ON_LAST         32
00153 /*  @} */
00154
00160 typedef struct tduCfgCtlStd_s {
00161   Fract           toneOnEnergy;
00163   Fract           toneOnSnr;
00165   tuint           toneOnConfirmDuration;
00167 } tduCfgCtlStd_t;
00168
00169
00173 typedef struct {
00174   tduCfgCtlStd_t  std;
00176   Fract           startFreq;
00177   Fract           endFreq;
00178 } tduCptCfgCtl_t;
00179
00180
00188 /* @{ */
00189 #define  tdu_CTL_OFF_FIRST    33
00191 #define  tdu_CTL_V21_OFF      33
00192 #define  tdu_CTL_V25_OFF      34
00193 #define  tdu_CTL_RSVD3        35
00195 #define  tdu_CTL_CPT_OFF      36
00196 #define  tdu_CTL_V18A_OFF     37
00197 #define  tdu_CTL_SS7COT_OFF   38
00198 #define  tdu_CTL_SF_OFF       39
00199 #define  tdu_CTL_CNG_OFF      40
00200 #define  tdu_CTL_SS7COR_OFF   41
00201 #define  tdu_CTL_TT1khz_OFF   42
00202 #define  tdu_CTL_UMF_OFF      43
00204 #define  tdu_CTL_SFDT_CIDCAS_OFF  44
00206 #define  tdu_CTL_CIDCAS_ALL_OFF   45
00208 #define  tdu_CTL_RSVD4        46
00209 #define  tdu_CTL_CRE_OFF      47
00211 #define  tdu_CTL_MF_CRE1_OFF  48
00213 #define  tdu_CTL_CRE2_OFF     49
00215 #define  tdu_CTL_BELL_OFF     50
00216 #define  tdu_CTL_V8BIS_TONES_OFF  51
00217 #define  tdu_CTL_V21_TONES_OFF    52
00218 #define  tdu_CTL_V23_TONES_OFF    53
00219 #define  tdu_CTL_V21_CM_FAX_OFF   54
00220 #define  tdu_CTL_V21_V8DATA_OFF   55
00222 #define  tdu_CTL_B202_TONES_OFF   56
00223 #define  tdu_CTL_VOICE_DISC_OFF   59
00224 #define  tdu_CTL_COIN_TONES_OFF   60
00225 #define  tdu_CTL_BDTEW_OFF        61
00226 #define  tdu_CTL_SIA_OFF          62
00228 #define  tdu_CTL_OFF_LAST         62
00230 #define  tdu_CTL_THRE_MAX         63
00233 /*  @} */
00234
00237 /******************************************************************************
00238  * DATA DEFINITION: Identification codes for detector context
00239  ******************************************************************************
00240  * DESCRIPTION: These codes are used to identify specific detector, i.e.
00241  *               feature that is supported. Implementation can be different, e.g.
00242  *               for time domain and STFT framework. For instance, there are
00243  *               contexts with same tduContextId_t, like:
00244  *               V.25 implemented in frequency domain and V.25 implemented in
00245  *               time domain, or
00246  *               CNG implemented in frequency domain and CNG implemented in time
00247  *               domain.
00248  *****************************************************************************/
00249 /* Start of tduContextId_t */
00250 #define  tdu_DET_ID_DTMF         0      /* DTMF, served by mfdet */
00251 #define  tdu_DET_ID_R1           1      /* R1, served by mfdet */
00252 #define  tdu_DET_ID_R2FW         2      /* R2FW, served by mfdet */
00253 #define  tdu_DET_ID_R2BW         3      /* R2BW, served by mfdet */
00254 #define  tdu_DET_ID_V21          4      /* V21, served by V21 */
00255 #define  tdu_DET_ID_CPT          5      /* CPT, served by cpt */
00256 #define  tdu_DET_ID_MODEMDISC    6      /* V25, served by sfdf or sfdt */
00257 #define  tdu_DET_ID_V18A         7      /* V18A, served by sfdf */
00258 #define  tdu_DET_ID_SS7COT       8      /* SS7, served by sfdf */
00259 #define  tdu_DET_ID_SF           9      /* SF, served by sfdf */
00260 #define  tdu_DET_ID_CNG          10     /* CNG, served by sfdf or sfdt */
00261 #define  tdu_DET_ID_TT1khz       11     /* TT1khz, served by sfdf */
00262 #define  tdu_DET_ID_SS7COR       12     /* SS7COR, served by sfdf */
00263 #define  tdu_DET_ID_CIDCAS       13     /* CIDCAS, served by mfdet */
00264 #define  tdu_DET_ID_CASL         14     /* CIDCAS low tone, served by sfdt
00265                                          */
00266 #define  tdu_DET_ID_CASH         15     /* CIDCAS high tone, served by
00267                                            sfdt */
00268 #define  tdu_DET_ID_V8BIS_FS     16     /* Dual-tone CRe detector */
00269 #define  tdu_DET_ID_CRE2         17     /* Single-tone CRe detector */
00270 #define  tdu_DET_ID_V25LLMR      18     /* CED operating in LLMR mode */
00271 #define  tdu_DET_ID_COIN_TONES   19     /* Coin machine dual frequency tones */
00272 #define  tdu_DET_ID_SIA          20     /* SIA tones */
00273 #define  tdu_DET_ID_NONE         255
00274 /* End of tduContextId_t */
00275
00276
00285 /* @{ */
00286 #define  tdu_SLOT_MF_RSVD1       0
00287 #define  tdu_SLOT_MF_USER        1
00288 #define  tdu_SLOT_V21            2
00289 #define  tdu_SLOT_CPT            3
00290 #define  tdu_SLOT_V25TX          4
00291 #define  tdu_SLOT_V18A           5
00292 #define  tdu_SLOT_MF_RSVD2       6
00293 #define  tdu_SLOT_SF             7
00294 #define  tdu_SLOT_CNG            8
00295 #define  tdu_SLOT_TT1khz         9
00296 #define  tdu_SLOT_MF_RSVD3       10
00297 #define  tdu_SLOT_BELLTX1        11
00298 #define  tdu_SLOT_BELLTX2        12
00299 #define  tdu_SLOT_V21LOW_MARKS   13
00300 #define  tdu_SLOT_V21UPPER_MARKS 14
00301 #define  tdu_SLOT_V23FW_MARKS    15
00302 #define  tdu_SLOT_V23BW_MARKS    16
00303 #define  tdu_SLOT_V18A_S         17
00304 #define  tdu_SLOT_B202_M         18
00305 #define  tdu_SLOT_B202_S         19
00306 #define  tdu_SLOT_BDTEW          20
00307 #define  tdu_SLOT_V21LOW_SPACES  21
00308 #define  tdu_SLOT_MF_USER1       22
00309 #define  tdu_SLOT_SIA            23
00310 #define  tdu_SLOT_SIA_S          24
00311 #define  tdu_SLOT_MAX_TX         24
00313 #define  tdu_SLOT_V25RX           0
00314 #define  tdu_SLOT_BELLRX1         1
00315 #define  tdu_SLOT_BELLRX2         2
00316 #define  tdu_SLOT_V23FW_MARKS_RX  3
00317 #define  tdu_SLOT_V18A_RX         4
00318 #define  tdu_SLOT_V18A_S_RX       5
00319 #define  tdu_SLOT_V21LOW_MARKS_RX 6
00320 #define  tdu_SLOT_V21LOW_S_RX     7
00321 #define  tdu_SLOT_CASL_RX         8
00322 #define  tdu_SLOT_CASH_RX         9
00323 #define  tdu_SLOT_SFDT_DUMMY1    10
00324 #define  tdu_SLOT_SFDT_DUMMY2    11
00325 #define  tdu_SLOT_SFDT_DUMMY3    12
00327 #define  tdu_SLOT_SS7COT_RX      13
00328 #define  tdu_SLOT_SIA_RX         14
00329 #define  tdu_SLOT_SIA_S_RX       15
00331 #define  tdu_SLOT_MAX_RX         15
00334 #define  tdu_SLOT_NONE          255
00335 #define  tdu_SLOT_MAX    (tdu_SLOT_MAX_TX + tdu_SLOT_MAX_RX + 1)
00336 #define  tdu_MAX_SLOT    (tdu_SLOT_MAX    + 1)
00337 #define  tdu_MAX_SLOT_TX (tdu_SLOT_MAX_TX + 1)
00338 #define  tdu_MAX_SLOT_RX (tdu_SLOT_MAX_RX + 1)
00339 /*  @} */
00340
00352 /* @{ */
00353 #define  tdu_CTL_MF_MIN          73
00355 #define  tdu_CTL_MF_DTMF         73
00356 #define  tdu_CTL_MF_R1           74
00357 #define  tdu_CTL_MF_R2FW         75
00358 #define  tdu_CTL_MF_R2BW         76
00359 #define  tdu_CTL_MF_MAX          76
00365 typedef struct {
00366   Fract           freqPowThreshLow;
00368   Fract           freqPowThreshHigh;
00370   Fract           twistNegative;
00373   Fract           twistPositive;
00376   Fract           breakThresh;
00378 } tduMfCfgCtl_t;
00379 /*  @} */
00395 /* @{ */
00396 #define  tdu_CTL_POSITION        105
00401 typedef struct {
00402 #define tdu_POSITION_TXRX_CHANGED     0x0001
00404 #define tdu_POSITION_PRI_ACBC_CHANGED 0x0002
00406 #define tdu_POSITION_SEC_ACBC_CHANGED 0x0004
00408 #define tdu_POSITION_TYPE             0x0008    /* TDU type, full or lite
00409                                                    is defined by bit 4 */
00410 #define tdu_POSITION_MF_TESTS_CHANGED 0x0030
00411   tuint           valid_bitfield;
00414 #define tdu_POSITION_RX     0x0001
00417 #define tdu_POSITION_PRI_AC 0x0002
00421 #define tdu_POSITION_SEC_AC 0x0004
00425 #define tdu_POSITION_MF_TESTS_SHIFT 4   /* Additional MF tests indicated
00426                                            from bit 4 */
00427 #define tdu_POSITION_MF_TESTS_STEP_RISE    0x0010
00428 #define tdu_POSITION_MF_TESTS_PREDIGIT_SNR 0x0020
00429   tuint           value_bitfield;
00432 } tduPosition_t;
00433 /*  @} */
00443 /* @{ */
00444 #define  tdu_CTL_LLMR_ON         108
00445 #define  tdu_CTL_LLMR_OFF        109
00446 /*  @} */
00447
00458 /* @{ */
00459 #define  tdu_CTL_DIGIT_FILTER    110
00464 typedef struct tduDigitFilterCfgCtl_s {
00465   tuint           filter_bfield;
00501   tuint           long_digit_bfield;
00514   tuint           long_digit_hangover;
00516 } tduDigitFilterCfgCtl_t;
00517 /*  @} */
00528 /* @ {*/
00529 #define  tdu_CTL_MULTIPLE_TONES  111
00534 typedef struct {
00535   tulong          reports_bfield;
00538   tulong          changed_bfield;
00541 } tduToneFilterCfgCtl_t;
00542 /*  @} */
00554 /* @ {*/
00555 #define  tdu_CTL_SUSSPEND        112
00556 #define  tdu_CTL_RELEASE         113
00559 /*  @} */
00560
00573 /* @{ */
00574 #define  tdu_CTL_PEEK_SFD        120
00581 typedef struct {
00582 #define  tdu_SLOT_SS7COT         6
00583 #define  tdu_SLOT_SS7COR         10
00584   tint            slot;
00586   tuint           operation;
00591 #define tdu_OPERATION_DIR_MASK 0x07
00593 #define tdu_OPERATION_ENABLED  0x08
00595   tduCfgCtlStd_t  std;
00597 } tduSfdPeek_t;
00598 /*  @} */
00619 /* @ {*/
00620 #define  tdu_CTL_QUERY_STATE     121
00621 #define  tdu_CTL_MFSTD_SAVE      122
00623 #define  tdu_CTL_MFSTD_RESTORE   123
00626 #define  tdu_SLOT_MF_STD         0
00632 typedef struct {
00633   tulong          detState;
00635   tulong          hot_detectors;
00637   tulong          active_tone_reports;
00639 } tduQueryState_t;
00640
00644 typedef struct {
00645   LFract          freq_pow_thresh_low;
00647   LFract          freq_pow_thresh_high;
00649   void           *params;
00651   tuint           bfield1;
00653   tint            switched;
00655 } tduMfState_t;
00656 /*  @} */
00672 /* @ {*/
00673 #define  tdu_CTL_PR_SEARCH_RST   124
00674 /*  @} */
00675
00696 /* @ {*/
00697 #define  tdu_CTL_STOP            125
00699 #define  tdu_CTL_RESTART         126
00707 typedef struct {
00708   void           *base;
00709   tint            length;
00710 } tduTxDelayLine_t;
00711 /*  @} */
00727 /* @{ */
00728 #define tdu_CTL_GET_LITE        127
00731 /*  @} */
00732
00742 /* @ {*/
00743 #define tdu_CTL_EARLY_ALERT_SUPPRESS_ON  128
00744 #define tdu_CTL_EARLY_ALERT_SUPPRESS_OFF 129
00745 /*  @} */
00746
00748 #define tdu_CTL_MF_RELAY_OFF     130
00750 #define  tdu_CTL_NONE            255
00756 typedef struct {
00757   union {
00758     tduMfCfgCtl_t   mf;
00760     tduCfgCtlStd_t  std;
00763     tduCptCfgCtl_t  cpt;
00766     tduSfdPeek_t    peek;
00770     tduDigitFilterCfgCtl_t dfilt;
00773     tduQueryState_t state;
00776     tduToneFilterCfgCtl_t tfilt;
00779     tduMfState_t   *mfstate;
00782     tduTxDelayLine_t tx_delay_line;
00785     tduPosition_t   position;
00788     tuint           lite;
00791     tbool            digit_sent;
00792   } u;
00793 } tduCfgCtl_t;
00794
00795
00803 /* @{ */
00804 enum {
00805   tdu_NOMEMORY = -1,
00807   tdu_NOERR    =  0,
00809   tdu_ERROR    =  1
00816 };
00817 /*  @} */
00828 /* @{ */
00829 enum {
00830   tdu_EXC_OPEN      = 1,
00832   tdu_EXC_DELETE    = 2,
00834   tdu_EXC_FRAMESIZE = 3,
00836   tdu_EXC_MEMORY    = 4,
00837   tdu_EXC_RECEIVEIN = 5,
00838   tdu_EXC_SENDIN    = 6,
00839   tdu_EXC_MFDET     = 7
00841 };
00842 /*  @} */
00854 /* @{ */
00855 #define  tdu_TID_TONE0           0
00856 #define  tdu_TID_TONE1           1
00857 #define  tdu_TID_TONE2           2
00858 #define  tdu_TID_TONE3           3
00859 #define  tdu_TID_TONE4           4
00860 #define  tdu_TID_TONE5           5
00861 #define  tdu_TID_TONE6           6
00862 #define  tdu_TID_TONE7           7
00863 #define  tdu_TID_TONE8           8
00864 #define  tdu_TID_TONE9           9
00865 #define  tdu_TID_TONE10          10
00866 #define  tdu_TID_TONE11          11
00867 #define  tdu_TID_TONE12          12
00868 #define  tdu_TID_TONE13          13
00869 #define  tdu_TID_TONE14          14
00870 #define  tdu_TID_TONE15          15
00871 #define  tdu_TID_TONE16          16
00872 #define  tdu_TID_NULL            -1     /* No tone detected */
00873
00874 #define  tdu_TID_FIRST           17     /* User for SIU integration
00875                                            translation */
00876
00877 #define  tdu_TID_V21             17     /* Fax V.21 flags */
00878   /* Must be consecutive ! */
00879 #define  tdu_TID_V25             18     /* Single frequency tone 2100 Hz */
00880 #define  tdu_TID_V25_PR          19     /* Single frequency tone 2100 Hz
00881                                            with phase reversal */
00882 #define  tdu_TID_CPT             20     /* Call progress Tone */
00883 #define  tdu_TID_V18A            21     /* LTRS characters of V18A
00884                                            (frequency tone 1400 Hz) */
00885 #define  tdu_TID_SS7COT          22     /* Continuity tone of SS7
00886                                            (frequency tone 2010 Hz) */
00887 #define  tdu_TID_SF              23     /* Single-frequency signalling of
00888                                            SS7 (at 2600 Hz) */
00889
00890
00891
00892 #define  tdu_TID_CNG             24     /* Single-frequency tone at 1100
00893                                            Hz */
00894 #define  tdu_TID_SS7COR          25     /* Continuity tone of SS7
00895                                            (frequency tone 1780 Hz) */
00896 #define  tdu_TID_TT1khz          26     /* Test tone at 1000 or 1004 Hz */
00897 #define  tdu_TID_CIDCAS          27     /* CID CAS - single tone pair
00898                                            event (2130 Hz and 2750 Hz) */
00899 #define  tdu_TID_CIDCAS_RX       28     /* Code 28, indicates CID CAS
00900                                            event on secondary path */
00901   /* Report codes 29-31 are reserved to keep API balanced */
00902
00903   /* V25 from packet side, with and without phase reversals need to be
00904      consecutive */
00905 #define  tdu_TID_V25_RX          32     /* Single frequency tone 2100 Hz,
00906                                            no phase reversals * (network
00907                                            side) */
00908 #define  tdu_TID_V25_RX_PR       33     /* Single frequency tone 2100 Hz,
00909                                            with phase reversals * (network
00910                                            side) */
00911 #define  tdu_TID_BELL            34     /* Single frequency tone detectors
00912                                            at 1270/2225/2250 Hz, TX/RX
00913                                            direction */
00914 #define  tdu_TID_FIRST_EXT       tdu_TID_BELL
00915 #define  tdu_TID_V8BIS_TONES     35     /* First segment dual-tone
00916                                            detectors */
00917 #define  tdu_TID_V21_TONES       36     /* V.21 low/upper channel
00918                                            continuous marks/spaces */
00919 #define  tdu_TID_V23_TONES       37     /* V.23 fw/bw channel continuous
00920                                            marks */
00921
00922 #define  tdu_TID_V21_CM_FAX      38     /* CM Fax sequence detected */
00923 #define  tdu_TID_V21_CI          39     /* V.8 CI sequence detected */
00924 #define  tdu_TID_B202_TONES      40     /* 1200Hz and 2200Hz */
00925 #define  tdu_TID_VOICE_DISC      44
00926 #define tdu_TID_LAST_EXT  tdu_TID_VOICE_DISC
00927
00928 #define  tdu_TID_COIN_TONES      45     /* Coin machine dual frequency tones */
00929
00930 #define  tdu_TID_V21_CM          47     /* Code used internally to report
00931                                            modem relay events */
00932 #define  tdu_TID_ANSAM           48
00933 #define  tdu_TID_ANSAM_PR        49
00934 #define  tdu_TID_V21_LOWER       50
00935 #define  tdu_TID_CRE2            51
00936 #define  tdu_TID_ANSAM_RX        62
00937 #define  tdu_TID_ANSAM_PR_RX     63
00938
00939 #define  tdu_TID_V25_EARLY_REPORT_ALERT  64
00941 #define  tdu_TID_V25_EARLY_REPORT_FALSE  65
00943 #define  tdu_TID_SIA    66
00944 #define  tdu_TID_LAST   66
00946 #define  tdu_TID_BDTEW1400       96
00947 #define  tdu_TID_BDTEW1800       97
00948
00949 #define tdu_TID_MASKED     0x4000
00951 #define tdu_TID_LONG_DIGIT 0x2000
00953 #define tdu_TID_TXDIR      0x0100
00955 #define tdu_TID_RXDIR      0x0200
00957 #define tdu_TID_MASK_ID    0x00ff
00959 #define tdu_TID_TYPE00     (0 << 10)
00960 #define tdu_TID_TYPE01     (1 << 10)
00961 #define tdu_TID_TYPE02     (2 << 10)
00962 #define tdu_TID_TYPE03     (3 << 10)
00963 #define tdu_TID_TYPE_MASK  (3 << 10)
00965 #define tdu_V8_OFFSET   30
00967 #define tdu_TID_PARALLEL_MASK     0x0080
00968 #define tdu_TID_CAS_T       (tdu_TID_CIDCAS_RX | tdu_TID_PARALLEL_MASK)
00974 /* @{ */
00975 #define  tdu_MF_DIGIT_OFF        0
00976 #define  tdu_MF_DIGIT_ON         1
00977 #define  tdu_MF_DIGIT_ALERT_OFF  2
00978 #define  tdu_MF_DIGIT_ALERT_ON   3
00980 #define MF_CONFIRMED_OR_ALERT_ON (tdu_MF_DIGIT_ON & tdu_MF_DIGIT_ALERT_ON)
00981 #define MF_ALERT_ONLY            (tdu_MF_DIGIT_ALERT_OFF & tdu_MF_DIGIT_ALERT_ON)
00982 /*  @} */
00983
00988 typedef struct {
00989   tint            freq1;
00990   tint            tone1bw;
00994   tint            freq2;
00996   tint            tone2bw;
01000 } tduCptSmartRep_t;
01001
01002
01003 /* @} */
01004
01022 /* @{ */
01023
01032 typedef struct {
01033   tint            detId;
01034   tint            tableId_dir;
01039 #define tdu_DET_TABLEID_MASK   0x000f  /* tableID mask */
01040 #define tdu_DET_TXDIR          0x0100  /* Indicate that detector is on Tx side */
01041 #define tdu_DET_RXDIR          0x0200  /* Indicate that detector is on Rx side */
01042 #define tdu_DET_DIR_MASK       0x0300  /* Direction mask */
01043
01044   tint            detSlot;
01045   tuint           slotInstSize;
01048   tint            c_code_on;
01049   tint            c_code_off;
01050   tint           *params;
01051 } tduDetContext_t;
01052
01053 extern const tduDetContext_t *tduDetContexts[];
01056 /* @} */
01057
01079 /* @{ */
01080
01084 /* @{ */
01085 extern const tduDetContext_t tduIncV23BW_MARKS_F;
01086 extern const tduDetContext_t tduIncTT1khz_F;        /* Test tone fquency, 1000 Hz or 1004 Hz */
01087 extern const tduDetContext_t tduIncCNG_F;           /* Fax CNG, 1100 Hz */
01088 extern const tduDetContext_t tduIncV21LOW_MARKS_F;
01089 extern const tduDetContext_t tduIncV21LOW_SPACES_F;
01090 extern const tduDetContext_t tduIncV21UPPER_MARKS_F;
01091 extern const tduDetContext_t tduIncV21LOW_MARKS_T_RX;
01092 extern const tduDetContext_t tduIncV21LOW_SPACES_T_RX;
01093 extern const tduDetContext_t tduIncB202_MARKS_F;
01094 extern const tduDetContext_t tduIncBELLTX2_F;
01095 extern const tduDetContext_t tduIncV23FW_MARKS_F;
01096 extern const tduDetContext_t tduIncV18A_F;          /* V.18A, 1400 Hz */
01097 extern const tduDetContext_t tduIncSS7COR_F;        /* SS7 Continuity on Tone lower channel 1780 Hz */
01098 extern const tduDetContext_t tduIncV18A_S_F;        /* V.18A, 1800 Hz */
01099 extern const tduDetContext_t tduIncV18A_T_RX;       /* V.18A 1400 Hz detection from network */
01100 extern const tduDetContext_t tduIncV18A_S_T_RX;     /* V.18A 1800 Hz detection from network */
01101 extern const tduDetContext_t tduIncSS7COT_F;        /* SS7 Continuity On Tone, 2000 Hz */
01102 extern const tduDetContext_t tduIncV25_F;           /* V.25 CED, 2100 Hz, w/ or w/o pr */
01103 extern const tduDetContext_t tduIncB202_SPACES_F;
01104 extern const tduDetContext_t tduIncBELLTX1_F;
01105 extern const tduDetContext_t tduIncSF_F;            /* Signalling frequency, 2600 Hz */
01106 extern const tduDetContext_t tduIncSIA_F;          /* 1400 Hz */
01107 extern const tduDetContext_t tduIncSIA_S_F;        /* 2300 Hz */
01108
01109 extern const tduDetContext_t tduIncSIA_T_RX;          /* 1400 Hz */
01110 extern const tduDetContext_t tduIncSIA_S_T_RX;        /* 2300 Hz */
01111
01112
01113 /* @} */
01114
01118 /* @{ */
01119
01120 #define tdu_SFDT_DET_NONE_RX          0
01121
01122 #define tdu_SFDT_DET_V23FW_MARKS_RX   1
01124 extern const tduDetContext_t tduIncV23FW_MARKS_T;
01126 #define tdu_SFDT_DET_SS7COT_RX        2
01128 extern const tduDetContext_t tduIncSS7COT_T;
01130 #define tdu_SFDT_DET_V25_RX           3
01132 extern const tduDetContext_t tduIncV25_T_RX;
01133 extern const tduDetContext_t tduIncV25RX_DUMMY_T;
01135 #define tdu_SFDT_DET_2225_2250_2300_RX     4
01136 #define tdu_SFDT_DET_2225_RX          4
01138 extern const tduDetContext_t tduIncBELLRX1_T;
01140 #define tdu_SFDT_DET_2250_RX          5
01142 extern const tduDetContext_t tduIncBELLRX2_T;
01144 #define tdu_SFDT_DET_V18A_RX          6
01145 #define tdu_SFDT_DET_V18A_S_RX        7
01146 #define tdu_SFDT_DET_V21LOW_MARKS_RX  8
01147 #define tdu_SFDT_DET_V21LOW_S_RX      9
01148 #define tdu_SFDT_DET_CIDCAS_RX       10
01149 #define tdu_SFDT_DET_CASL_RX         10
01150 #define tdu_SFDT_DET_CASH_RX         11
01151 #define tdu_SFDT_DET_SIA_RX          6
01152 #define tdu_SFDT_DET_SIA_S_RX        7
01153
01154
01155 extern const tduDetContext_t tduIncV21LOW_MARKS_T;
01156 extern const tduDetContext_t tduIncSFDT_DUMMY1_T;
01157 extern const tduDetContext_t tduIncSFDT_DUMMY2_T;
01158 extern const tduDetContext_t tduIncSFDT_DUMMY3_T;
01159 /* @} */
01160
01161
01165 /* @{ */
01166 extern const tduDetContext_t tduIncDTMF;
01167 extern const tduDetContext_t tduIncR1;
01168 extern const tduDetContext_t tduIncR2FW;
01169 extern const tduDetContext_t tduIncR2BW;
01170 extern const tduDetContext_t tduIncUMF;
01172 extern const tduDetContext_t tduIncV8BIS_FS_F;
01174 extern const tduDetContext_t tduIncV21;
01175 extern const tduDetContext_t tduIncCPT;
01176 extern const tduDetContext_t tduIncCOIN_TONES; /* Coin tones detector context  */
01177 extern const tduDetContext_t tduIncCIDCAS;      /* Dual tone CID CAS
01178                                                    detector (single pair) */
01179 extern const tduDetContext_t tduIncV825_F;      /* V.8/V.25 detection
01180                                                    required by LLMR */
01181 extern const tduDetContext_t tduIncV21CM;       /* V.21CM flags detection */
01182 /* @} */
01183
01184
01188 /* @{ */
01189 extern const tduDetContext_t tduIncCASL_T_RX;   /* CAS low tone detector
01190                                                    on Rx path */
01191 extern const tduDetContext_t tduIncCASH_T_RX;   /* CAS high tone detector
01192                                                    on Rx path */
01193
01194 extern const tduDetContext_t tduIncV25_T_TX;    /* V.25 CED time domain
01195                                                    implementation,
01196                                                    transmit path */
01197 extern const tduDetContext_t tduIncCNG_T;       /* FAX CNG time domain
01198                                                    implementation */
01199 extern const tduDetContext_t tduIncV21UPPER_MARKS_LITE_T; /* V.21 upper channel,
01200                                                              1850/1650 Hz (0/1),
01201                                                              continuous marks */
01202
01203 /* @} */
01204
01205 /* @} */
01206
01220 /* @{ */
01221
01226 typedef struct {
01227   tbool (*Control) (void *tduInst, tint c_code, tduCfgCtl_t * cfg);
01228   void  (*Process) (void *tduInst, linSample * samples, void *alert);
01229 } tduTable_t;
01230
01232 typedef struct {
01233   tduTable_t      sfdf;
01234   tduTable_t      sfdt;
01235   tduTable_t      mf;
01236   tduTable_t      cpt;
01237   tduTable_t      v21;
01238   tduTable_t      bdtew;
01239   void            (*mf_cidcas_ctl) (tduCfgCtl_t * cfg, void *inst);
01240   void            (*sfd_llmr_ANSam_reset) (tint toneType, Fract tone_db_power, void *inst);
01241   void            (*sfd_llmr_ANSam) (tint toneType, Fract tone_db_power, void *inst);
01242                   tbool (*sfd_llmr_ANSam_test) (tint toneType, void *inst);
01243   void            (*mf_v8bis_fs_ctl) (tduCfgCtl_t * cfg, void *inst);
01244   void            (*digit_filter) (void *tduInst, tbool dtmf_mf, tint * toneId, tint * on_off);
01245   void            (*voice_disc) (void *tduInst);
01246   void            (*voice_disc_ctl) (void *tduInst, tint c_code, tduCfgCtl_t * cfg);
01247   void            (*bellTid) (tint * tid, tint freq);
01248   void            (*mf_coin_tones_ctl) (tduCfgCtl_t *cfg, void *inst);
01249 } tduIntFwTable_t;
01250
01251
01253 extern tbool     tduSFDControl (void *tduInst, tint c_code,
01254                                tduCfgCtl_t * cfg);
01255
01257 extern void     tduSFDFProcess (void *tduInst, linSample * samples,
01258                                 void *alert);
01259
01261 extern void     tduSFDTProcess (void *tduInst, linSample * samples,
01262                                 void *alert);
01263
01265 extern tbool     tduMFControl (void *tduInst, tint c_code,
01266                               tduCfgCtl_t * cfg);
01267
01269 extern void     tduMFProcess (void *tduInst, linSample * samples,
01270                               void *alert);
01271
01273 extern tbool     tduV21Control (void *tduInst, tint c_code,
01274                                tduCfgCtl_t * cfg);
01275
01277 extern void     tduV21Process (void *tduInst, linSample * samples,
01278                                void *alert);
01279
01281 extern tbool     tduCPTControl (void *tduInst, tint c_code,
01282                                tduCfgCtl_t * cfg);
01283
01285 extern void     tduCPTProcess (void *tduInst, linSample * samples,
01286                                void *alert);
01287
01289 extern tbool     tduBDTEWControl (void *tduInst, tint c_code,
01290                                  tduCfgCtl_t * cfg);
01291
01293 extern void     tduBDTEWProcess (void *tduInst, linSample * samples,
01294                                  void *alert);
01295
01296
01298 extern void     tdu_mf_cidcas_ctl (tduCfgCtl_t * cfg, void *inst);
01299
01301 extern void     tdu_sfd_llmr_ANSam_reset (tint toneType,
01302                                           Fract tone_db_power, void *inst);
01304 extern void     tdu_sfd_llmr_ANSam (tint toneType, Fract tone_db_power,
01305                                     void *inst);
01307 extern tbool     tdu_sfd_llmr_ANSam_test (tint toneType, void *inst);
01308
01310 extern void     tdu_mf_v8bis_fs_ctl (tduCfgCtl_t * cfg, void *inst);
01311
01313 extern void     tduBellTid (tint * tid, tint freq);
01314
01316 extern void tdu_mf_coin_tones_ctl (tduCfgCtl_t *cfg, void *inst);
01317
01319 extern void     tdu_digit_filter (void *tduInst, tbool dtmf_mf,
01320                                   tint * toneId, tint * on_off);
01321
01323 extern void     tduVoiceDiscCtl (void *tduInst, tint c_code,
01324                                  tduCfgCtl_t * cfg);
01325
01327 extern void     tduVoiceDiscProcess (void *tduInst);
01328
01330 extern tbool     tduDummyControl (void *tduInst, tint c_code,
01331                                  tduCfgCtl_t * cfg);
01333 extern void     tduDummyProcess (void *tduInst, void *samples);
01334
01335 extern const tduIntFwTable_t tduIntFwTable;
01336 /* @} */
01337
01349 /* @{ */
01350 typedef struct tduContext_s {
01351
01353   void            (*tdu_send_out) (tuint ID, tint repCode, tint on_off,
01354                                    tint time, tint power_dBm0,
01355                                    tduCptSmartRep_t * cpt_report);
01356
01358   void            (*baudotReport) (tuint ID, tint repCode,
01359                                    tint delayLineLen, void *delayLine);
01360   tint            (*digit_echo)   (tuint ID, tint repCode, LFract linPower);
01362   void *          (*gmpCreate) (tuint input_ID, tuint mode);
01364   void            (*gmpDelete) (tuint input_ID, void *gmp_ptr);
01366   void            (*gmpWrite)  (tuint input_ID, void *gmp_ptr, void *src_in, tint records_to_copy);
01368   tint            (*gmpRead)   (tuint input_ID, void *gmp_ptr, void *dst_out, tint records_to_copy);
01370   void *          (*gmpAllocGmc) (tuint MID);
01372   tbool           (*gmpFreeGmc) (tuint MID, void *ptr);
01373
01375   dbgInfo_t       debugInfo;
01376
01378   tuint           tduRxSaveSize;        /* Length of buffer in Rx direction */
01379
01381   tint            detNum;       /* Total number of sub-detectors */
01382
01384   tint            detNumSFDF;   /* Number of single frequency detectors -
01385                                    freq domain */
01386
01388   tint            detNumSFDT;   /* Number of single frequency detectors -
01389                                    time domain */
01390
01392   linSample      *work_buf;     /* Common scratch area for all instances -
01393                                    also first scratch buffer */
01394
01396   linSample      *local_buf;    /* Second derived scratch buffer */
01397
01399   LFract         *magnitudes;   /* Third derived scratch buffer */
01400
01402   tuint detInstVec[tdu_MAX_SLOT]; /* Array of indexes for all
01403                                    *  necessary sub-detector instances */
01404 } tduContext_t;
01405 /*  @} */
01411 typedef struct {
01412   tint            frame_size;
01414 } tduConfig_t;
01415
01416
01421 typedef struct {
01422   tint            maxSamplesPerFrame;
01423 #define tdu_SIZECFG_LITE 1
01424 #define tdu_SIZECFG_FULL 0
01425   tuint           lite;
01426 } tduSizeConfig_t;
01427
01432 typedef struct {
01433   tuint           ID;
01434   tduSizeConfig_t sizeCfg;
01435 } tduNewConfig_t;
01436
01442 typedef enum {
01443   tdu_RX_AFTER_CONF,
01444   tdu_RX_BEFORE_CONF,
01445   tdu_RX_ONLY
01446 } tduRxLocation_t;
01447
01453 typedef enum {
01454   tdu_TX_AFTER_CONF,
01455   tdu_TX_BEFORE_CONF,
01456   tdu_TX_ONLY
01457 } tduTxLocation_t;
01458
01462 typedef struct tduRepStats_s {
01463   tuint FalseAlert;
01467 #define tdu_FALSE_ALERT_CNT_MASK      0x00FF
01468 #define tdu_SET_FALSE_ALERT_CNT(x,v) (utlSetBitfield((x)->tduRepStats.FalseAlert, v,  0, 8))
01469 #define tdu_GET_FALSE_ALERT_CNT(x)   (utlGetBitfield((x)->tduRepStats.FalseAlert,     0, 8))
01470 #define tdu_SET_ON_OFF_FLAG(x,v)     (utlSetBitfield((x)->tduRepStats.FalseAlert, v, 14, 2))
01471 #define tdu_GET_ON_OFF_FLAG(x)       (utlGetBitfield((x)->tduRepStats.FalseAlert,    14, 2))
01472 } tduRepStats_t;
01473
01477 /* @{ */
01478
01492 extern tint     tduGetSizes (tint * nbufs, const ecomemBuffer_t ** bufs,
01493                              tduSizeConfig_t * cfg);
01494
01511 extern tint     tduNew (void **tduInst, tint nbufs, ecomemBuffer_t * bufs,
01512                         tduNewConfig_t * cfg);
01513
01526 extern void     tduReceiveIn (void *tduInst, void *samples_in,
01527                               tduRxLocation_t location);
01528
01529
01530
01543 extern tbool     tduSendIn (void *tduInst, void *samples_in,
01544                            tduTxLocation_t location);
01545
01557 extern void     tduOpen (void *tduInst, tduConfig_t * cfg);
01558
01572 extern void     tduControl (void *tduInst, tint ccode, tduCfgCtl_t * cfg);
01573
01582 extern void     tduClose (void *tduInst);
01583
01596 extern void     tduDelete (void **tduInst, tint nbufs, ecomemBuffer_t * bufs);
01597
01609 extern void     tduGetStats (void *tduInst, tbool reset, tduRepStats_t *stats);
01610
01611 /* @brief TDU Call table. It may be used by system to interact with TDU. System
01612  * could populate with above APIs and use. <br>
01613  * TODO: should we take this out of TDU */
01614 typedef struct {
01615   void  (*tduClose)     (void *tduInst);
01616   void  (*tduControl)   (void *tduInst, tint c_code, tduCfgCtl_t * cfg);
01617   void  (*tduDelete)    (void **tduInst, tint nbufs, ecomemBuffer_t * bufs);
01618   tint  (*tduGetSizes)  (tint * nbufs, const ecomemBuffer_t ** bufs, tduSizeConfig_t * cfg);
01619   tint  (*tduNew)       (void **tduInst, tint nbufs, ecomemBuffer_t * bufs, tduNewConfig_t * cfg);
01620   void  (*tduOpen)      (void *tduInst, tduConfig_t * cfg);
01621   tbool (*tduSendIn)    (void *tduInst, void *samples, tduTxLocation_t location);
01622   void  (*tduReceiveIn) (void *tduInst, void *samples, tduRxLocation_t location);
01623 } tduCallTable_t;
01624 /* @} */
01625
01626 /* @} */ /*ingroup TDU */
01627 #endif  /* _TDU_H */
01628
01629 /* 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. 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 V5.2 and may be used for those who haven't yet upgraded to CCS V5.2 (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 V5.2 (Eclipse).

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

Dependent Packages

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


TDU Test: MF Digit Sequence Detection

TDU Test Reference

MF Digit Sequence Detection

Test Purpose

This test qualifies the TDU's ability to identify DTMF digits under various impairments. Each test provides the sequence of DTMF tones from a typical telephonic device row-by-row as identified below:

       +-----+-----+-----+-----+
       |     |     |     |     |
       |  1  |  2  |  3  |  A  |
       |     |     |     |     |
       +-----+-----+-----+-----+
       |     |     |     |     |
       |  4  |  5  |  6  |  B  |
       |     |     |     |     |
       +-----+-----+-----+-----+
       |     |     |     |     |
       |  7  |  8  |  9  |  C  |
       |     |     |     |     |
       +-----+-----+-----+-----+
       |     |     |     |     |
       |  *  |  0  |  #  |  D  |
       |     |     |     |     |
       +-----+-----+-----+-----+

    Sequence:  {"1", "2", "3", "A", "4", "5", "6", "B", "7", "8", "9", "C", ...
                "*", "0", "#", "D"}

Test Parameters

The test allows for variation of the following parameters:

  • PCM file to read for input

The test uses the following constant parameters:

  • TDU V21 detector enabled

Test Procedure

  1. Enables the TDU V.21 TX path detector.
  2. Reads the specified PCM file amd passes the data, frame-by-frame to the TDU API function tduSendIn().
  3. Continues until EOF is reached.

Expected Results

Minimal Output

At the beginning of each test a message is output displaying the PCM file under test.

Detection Output

When a DTMF detection event occurs, information regarding the event is output. For example, digit detection may appear as:

  Digit: "1"     :  Event: ALERT  ON,  Time:   15 ms,  Power: -83 dBm0,  Frame: 1128
  Digit: "1"     :  Event:  ON,  Time:   30 ms,  Power: -11 dBm0,  Frame: 1132
  Digit: "1"     :  Event: OFF,  Time:   20 ms,  Power: -580 dBm0,  Frame: 1141

In the example above, each line represents a digit detection event.

The first line indicates:

  • Event "ALERT ON" occurred. This provides early warning of a potential digit "ON" event.
  • The digit is "1"
  • The lag time for reporting is ~15ms (the potential digit started ~15ms ago.

The second line indicates:

  • Event "ON" occurred. The digit has been detected.
  • The digit is "1"
  • The digit power is ~ -11 dBm0
  • The lag time for reporting is ~30ms (the confirmed digit started ~30ms ago.

The third line indicates:

  • Event "OFF" occurred. The digit has ended.
  • The digit was "1"
  • The lag time for reporting is ~20ms (the digit ended ~20ms ago.

Note:
It is expected that each of the 16 digits are identified as in the example above. Though the lag times may vary, each digit should follow the event progression of "ALERT", "ON" followed by "OFF".


TDU Test: Page Index

TDU Test Related Pages

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


TDU Test: Profiling Procedure

Profiling Procedure

  1. Set a breakpoint the last line of code in tdusim.c (loop;)
  2. Set tduSim.options.profile to 1
  3. Run and let the simulation halt at the breakpoint.

The profiling procedure measures the TDU cycle requirements for three signal scenarios:

  1. Speech
    • TX file: tx_speech.ula
    • RX file: rx_speech.ula
    • 60 second conversation
    • Periods of speech and silence in each direction
    • Periods of doubletalk
  2. Tones
    • TX file: tx_tone.ula
    • RX file: rx_tone.ula
    • 28 second tone files
    • Emulates call setup scenario
    • DTMF in TX direction
    • Dialtone, ringback and CED with PR in TX direction
  3. Silence
    • TX file: tx_silence.ula
    • RX file: rx_silence.ula
    • 12 second files with -68dBm0 noise floor

Note:
Each of the three scenarios above reads individual TX and RX PCM files and passes them to the appropppriate TDU API function. The TX data is passed to tduSendIn() and the RX data is passed to tduReceiveIn().

Profiling Output

The profiling procedure above generates three text files; one for each of the test scenarios:

  1. Speech: speech_profiling.txt
  2. Tones: tone_profiling.txt
  3. Silence: silence_profiling.txt

Each of the text files has two columns, the first for TX (primary) path cycles and the second for RX (secondary) path cycles. All cycle metrics are with respect to the frame size used in simulation.

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 (1)
#define | ti_mas_tge_Version_BUILD (0)
#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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_tge_Version_BUILD (0)

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 (1)
00060
00061 /* BUILD */
00062 #define ti_mas_tge_Version_BUILD (0)
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 102 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 140 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 143 of file tge.h.

#define tge_CONFIG_AMP_MOD 2

Configure the TGE to generate an amplitude modulated sinudoid

Definition at line 146 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 148 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 236 of file tge.h.

#define tge_CTRL_TONE_ON 1

Configure the TGE to start tone generation.

Definition at line 239 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 119 of file tge.h.


TGE: TGE (Tone Generation Engine) Package

TGE (Tone Generation Engine) Package

Release 1.0.1.0

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 162 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 163 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 165 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 173 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 181 of file tge.h.

tint tgeConfig_t::freq

List of frequencies (4 maximum)

Definition at line 183 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 184 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 198 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 202 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 209 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 252 of file tge.h.

Data Fields

tint control_code

Field Documentation

tint tgeControl_t::control_code

Code for TGE control operation

Definition at line 253 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00010  *
00011  *              All rights reserved not granted herein.
00012  *
00013  *                         Limited License.
00014  *
00015  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00016  *  non-exclusive license under copyrights and patents it now or hereafter owns
00017  *  or controls to make, have made, use, import, offer to sell and sell
00018  *  ("Utilize") this software subject to the terms herein.  With respect to the
00019  *  foregoing patent license, such license is granted solely to the extent that
00020  *  any such patent is necessary to Utilize the software alone.  The patent
00021  *  license shall not apply to any combinations which include this software,
00022  *  other than combinations with devices manufactured by or for TI (“TI
00023  *  Devices”).  No hardware patent is licensed hereunder.
00024  *
00025  *  Redistributions must preserve existing copyright notices and reproduce this
00026  *  license (including the above copyright notice and the disclaimer and (if
00027  *  applicable) source code license limitations below) in the documentation
00028  *  and/or other materials provided with the distribution
00029  *
00030  *  Redistribution and use in binary form, without modification, are permitted
00031  *  provided that the following conditions are met:
00032  *
00033  *    *  No reverse engineering, decompilation, or disassembly of this software
00034  *  is permitted with respect to any software provided in binary form.
00035  *
00036  *    *  any redistribution and use are licensed by TI for use only with TI
00037  *  Devices.
00038  *
00039  *    *  Nothing shall obligate TI to provide you with source code for the
00040  *  software licensed and provided to you in object code.
00041  *
00042  *  If software source code is provided to you, modification and redistribution
00043  *  of the source code are permitted provided that the following conditions are
00044  *  met:
00045  *
00046  *    *  any redistribution and use of the source code, including any resulting
00047  *  derivative works, are licensed by TI for use only with TI Devices.
00048  *
00049  *    *  any redistribution and use of any object code compiled from the source
00050  *  code and any resulting derivative works, are licensed by TI for use only
00051  *  with TI Devices.
00052  *
00053  *  Neither the name of Texas Instruments Incorporated nor the names of its
00054  *  suppliers may be used to endorse or promote products derived from this
00055  *  software without specific prior written permission.
00056  *
00057  *  DISCLAIMER.
00058  *
00059  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00060  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00061  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00062  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00063  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00064  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00065  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00066  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00067  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00068  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00069  *  DAMAGE.
00070  *****************************************************************************/
00071 #ifndef _TGE_H
00072 #define _TGE_H
00073
00081 /* System level header files */
00082 #include <ti/mas/types/types.h>            /* DSP types */
00083
00084
00091 /* @{ */
00092
00093
00101 /* @{ */
00102 enum {
00103   tge_NOERR    = 0,
00104   tge_ERROR    = 1,
00105   tge_BADPARAM = 2
00106 };
00107 /*  @} */
00118 /* @{ */
00119 enum {
00120   tge_SAMPLE_RATE_8K  = 0,
00121   tge_SAMPLE_RATE_16K = 1
00122 };
00123 /*  @} */
00139 /* @{ */
00140 #define tge_CONFIG_FREQS        0
00143 #define tge_CONFIG_PHASE_REV    1
00146 #define tge_CONFIG_AMP_MOD      2
00148 #define tge_CONFIG_AMP_MOD_PR   3
00151 /*  @} */
00152
00161 /* @{ */
00162 typedef struct{
00163   tint      sample_rate;
00165   tbool     reset_phase;
00173   tint      config_code;
00178   union {
00179     struct {
00181       tint      num_freq;
00183       tint      freq[4];
00184       linSample amp[4];
00187     } frq;
00188     struct {
00192       tint      freq;
00195       linSample amp;
00198       tint      modulate_freq;
00202       Fract     modulate_pct;
00209       tint      period_ms;
00217     } ampr;
00218   } u;
00219 } tgeConfig_t;
00220 /* @} */
00221
00222
00235 /* @{ */
00236 #define tge_CTRL_TONE_OFF       0
00239 #define tge_CTRL_TONE_ON        1
00241 /*  @} */
00242
00251 /* @{ */
00252 typedef struct{
00253   tint  control_code;
00254 } tgeControl_t;
00255 /* @} */
00256
00257
00262 /* @{ */
00263
00274 tint tgeGetSizes (tint *instsize);
00275
00290 tint tgeInit (void *inst, tgeConfig_t *cfg);
00291
00306 tint tgeControl (void *inst, tgeControl_t *ctl);
00307
00322 tint tgeProcess (void *inst, linSample *frame, tint frame_length);
00323
00324 /* @} */
00325 /* @} */ /* ingroup TGE */
00326
00327 #endif  /* _TGE_H */
00328
00329 /* end of tge.h */
00330


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. 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 V5.2 or above and may be used for those who haven't yet upgraded to CCS V5.2 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 V5.2 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
  • Disclaimer


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 132 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 134 of file tgesim.h.

Referenced by main().

tbool simConfig_t::cache_enable

Definition at line 135 of file tgesim.h.

Referenced by tge_sim_profile_init(), and tge_sim_profile_start().

tgePcm_e simConfig_t::companding

Definition at line 136 of file tgesim.h.

Referenced by tge_sim_process_frames().

tuint simConfig_t::frame_length

Definition at line 137 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 293 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 340 of file tduapi.c.

void tge_sim_new_tdu ( void )

Definition at line 358 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 424 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 463 of file tduapi.c.

References tduSimInst.

Referenced by tge_sim_test_ampr(), and tge_sim_test_tones().

Variable Documentation

void* tduSimInst

Definition at line 77 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 83 of file tduapi.c.

const tduDetContext_t* tduDetContexts[]

Definition at line 106 of file tduapi.c.

const tduIntFwTable_t tduIntFwTable

Definition at line 152 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 193 of file tduapi.c.

Referenced by sysToneDetect().

char tone_strings[tduapi_NUM_TONE][tduapi_STRING_LENGTH]

Definition at line 212 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 265 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 272 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 277 of file tduapi.c.

Referenced by sysToneDetect().

char tdu_null_minor[1][tduapi_STRING_LENGTH]

Initial value:

 {
  "           \0",
}

Definition at line 282 of file tduapi.c.

Referenced by sysToneDetect().

char event_string[tduapi_REPORT_STRING_LENGTH]

Definition at line 286 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 /******************************************************************************
00065  * FILE PURPOSE: Provide TDU accessibility in other unit test.
00066  ******************************************************************************
00067  * FILE NAME:   tduapi.c
00068  *
00069  *****************************************************************************/
00070
00071 /* Associated simulation headers */
00072 #include <ti\mas\tge\test\src\tduapi.h>
00073 #include <ti\mas\tge\test\src\tgesim.h>
00074
00075
00076 /* Global TDU instance */
00077 void *tduSimInst;
00078
00079
00080 /*********************************************************************
00081  * Initialization requirements
00082  *********************************************************************/
00083 tduContext_t tduContext = {
00084   sysToneDetect,
00085   NULL,
00086   NULL,
00087   NULL,
00088   NULL,
00089   NULL,
00090   NULL,
00091   NULL,
00092   NULL,
00093   sysDebugInfo,
00094   /* Following items are initialized in tduNew() */
00095   0, 0, 0, 0,
00096   NULL,
00097   NULL,
00098   NULL,
00099   0, 0, 0, 0,
00100   0, 0, 0, 0,
00101   0, 0, 0, 0,
00102   0, 0, 0, 0
00103 }; /* tduContext */
00104
00105 /* TDU Internal Contexts */
00106 const tduDetContext_t *tduDetContexts[] = {
00107   /* Place all SFDF detectors together in succesion */
00108   &tduIncV23BW_MARKS_F,
00109   &tduIncV21LOW_MARKS_F,
00110   &tduIncTT1khz_F,
00111   &tduIncCNG_F,
00112   &tduIncV21LOW_SPACES_F,
00113   &tduIncB202_MARKS_F,
00114   &tduIncBELLTX2_F,
00115   &tduIncV23FW_MARKS_F,
00116   &tduIncV18A_F,
00117   &tduIncV21UPPER_MARKS_F,
00118   &tduIncSS7COR_F,
00119   &tduIncV18A_S_F,
00120   &tduIncSS7COT_F,
00121   &tduIncV25_F,
00122   &tduIncB202_SPACES_F,
00123   &tduIncBELLTX1_F,
00124   &tduIncSF_F,
00125   &tduIncSIA_F,
00126   &tduIncSIA_S_F,
00127   /* Place all SFDT detectors together in succesion */
00128   &tduIncV23FW_MARKS_T,
00129   &tduIncSS7COT_T,
00130   &tduIncV25_T_RX,
00131   &tduIncBELLRX1_T,
00132   &tduIncBELLRX2_T,
00133   &tduIncSIA_T_RX,
00134   &tduIncSIA_S_T_RX,
00135   &tduIncSFDT_DUMMY1_T,
00136   &tduIncSFDT_DUMMY2_T,
00137   &tduIncSFDT_DUMMY3_T,
00138   /*** place all MF detectors together in succesion */
00139   &tduIncDTMF,
00140   &tduIncR1,
00141   &tduIncR2FW,
00142   &tduIncR2BW,
00143   &tduIncV8BIS_FS_F,
00144   &tduIncCOIN_TONES,
00145   /* ... The rest */
00146   &tduIncV21,
00147   &tduIncCPT,
00148   NULL
00149 };
00150
00151 /* Definition of internal TDU framework and hooks */
00152 const tduIntFwTable_t tduIntFwTable = {
00153   {
00154     tduSFDControl,
00155     tduSFDFProcess
00156   },
00157   {
00158     tduSFDControl,
00159     tduSFDTProcess,
00160   },
00161   {
00162     tduMFControl,
00163     tduMFProcess,
00164   },
00165   {
00166     tduCPTControl,
00167     tduCPTProcess,
00168   },
00169   {
00170     tduV21Control,
00171     tduV21Process,
00172   },
00173   {
00174     tduBDTEWControl,
00175     tduBDTEWProcess,
00176   },
00177   NULL,
00178   tdu_sfd_llmr_ANSam_reset,
00179   tdu_sfd_llmr_ANSam,
00180   tdu_sfd_llmr_ANSam_test,
00181   tdu_mf_v8bis_fs_ctl,
00182   tdu_digit_filter,
00183   tduVoiceDiscProcess,
00184   tduVoiceDiscCtl,
00185   tduBellTid,
00186   tdu_mf_coin_tones_ctl,
00187 };
00188
00189
00190 /***************************************************************************/
00191 /* Result reporting strings (START)                                        */
00192 /***************************************************************************/
00193 char digit_strings[tduapi_NUM_DIGIT][tduapi_STRING_LENGTH] = {
00194   "  Detection:  DTMF Digit \"0\"\0",
00195   "  Detection:  DTMF Digit \"1\"\0",
00196   "  Detection:  DTMF Digit \"2\"\0",
00197   "  Detection:  DTMF Digit \"3\"\0",
00198   "  Detection:  DTMF Digit \"4\"\0",
00199   "  Detection:  DTMF Digit \"5\"\0",
00200   "  Detection:  DTMF Digit \"6\"\0",
00201   "  Detection:  DTMF Digit \"7\"\0",
00202   "  Detection:  DTMF Digit \"8\"\0",
00203   "  Detection:  DTMF Digit \"9\"\0",
00204   "  Detection:  DTMF Digit \"A\"\0",
00205   "  Detection:  DTMF Digit \"B\"\0",
00206   "  Detection:  DTMF Digit \"C\"\0",
00207   "  Detection:  DTMF Digit \"D\"\0",
00208   "  Detection:  DTMF Digit \"*\"\0",
00209   "  Detection:  DTMF Digit \"#\"\0",
00210 };
00211
00212 char tone_strings[tduapi_NUM_TONE][tduapi_STRING_LENGTH] = {
00213   "  Detection:  INVALID \0",
00214   "  Detection:  CED     \0",
00215   "  Detection:  CED PR  \0",
00216   "  Detection:  INVALID \0",
00217   "  Detection:  INVALID \0",
00218   "  Detection:  SS7 COT \0",
00219   "  Detection:  SF      \0",
00220   "  Detection:  CNG     \0",
00221   "  Detection:  SS7 COR \0",
00222   "  Detection:  TT 1KHz \0",
00223   "  Detection:  INVALID \0",
00224   "  Detection:  INVALID \0",
00225   "  Detection:  INVALID \0",
00226   "  Detection:  INVALID \0",
00227   "  Detection:  INVALID \0",
00228   "  Detection:  INVALID \0",
00229   "  Detection:  INVALID \0",
00230   "  Detection:  BELL    \0",
00231   "  Detection:  INVALID \0",
00232   "  Detection:  INVALID \0",
00233   "  Detection:  INVALID \0",
00234   "  Detection:  INVALID \0",
00235   "  Detection:  INVALID \0",
00236   "  Detection:  INVALID \0",
00237   "  Detection:  INVALID \0",
00238   "  Detection:  INVALID \0",
00239   "  Detection:  INVALID \0",
00240   "  Detection:  INVALID \0",
00241   "  Detection:  INVALID \0",
00242   "  Detection:  INVALID \0",
00243   "  Detection:  INVALID \0",
00244   "  Detection:  ANSAM   \0",
00245   "  Detection:  ANSAM PR\0",
00246   "  Detection:  INVALID \0",
00247   "  Detection:  INVALID \0",
00248   "  Detection:  INVALID \0",
00249   "  Detection:  INVALID \0",
00250   "  Detection:  INVALID \0",
00251   "  Detection:  INVALID \0",
00252   "  Detection:  INVALID \0",
00253   "  Detection:  INVALID \0",
00254   "  Detection:  INVALID \0",
00255   "  Detection:  INVALID \0",
00256   "  Detection:  INVALID \0",
00257   "  Detection:  INVALID \0",
00258   "  Detection:  INVALID \0",
00259   "  Detection:  INVALID \0",
00260   "  Detection:  V25 EARLY ALERT\0",
00261   "  Detection:  V25 EARLY FALSE\0",
00262   "  Detection:  INVALID \0",
00263 };
00264
00265 char tdu_event[tduapi_NUM_EVENT][tduapi_STRING_LENGTH] = {
00266   "OFF  \0",
00267   "ON   \0",
00268   "     \0",
00269   "ALERT\0"
00270 };
00271
00272 char tdu_ced_minor[tduapi_NUM_CED_MINOR][tduapi_STRING_LENGTH] = {
00273   " (Confirm) \0",
00274   " (Early)   \0",
00275 };
00276
00277 char tdu_cedpr_minor[tduapi_NUM_CEDPR_MINOR][tduapi_STRING_LENGTH] = {
00278   " (Confirm) \0",
00279   " (V.32 Ext)\0",
00280 };
00281
00282 char tdu_null_minor[1][tduapi_STRING_LENGTH] = {
00283   "           \0",
00284 };
00285
00286 char event_string[tduapi_REPORT_STRING_LENGTH];
00287
00288
00289
00290 /******************************************************************************
00291  * FUNCTION PURPOSE: Receive TDU detected events
00292  ******************************************************************************/
00293 void sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF,
00294                     tduCptSmartRep_t *cpt_report)
00295 {
00296   tint  tone_id;
00297   tint  tone_type;
00298   char  *tdu_minor;
00299
00300   tone_id   =   tid & tdu_TID_MASK_ID;
00301   tone_type = ((tid & tdu_TID_TYPE_MASK) >> 10);
00302
00303   /* Create tone event string */
00304   if (tone_id < tdu_TID_FIRST) {
00305     strcpy (event_string, digit_strings[tone_id]);
00306   }
00307   else {
00308     strcpy (event_string, tone_strings[tone_id-tdu_TID_FIRST]);
00309   }
00310
00311   /* Get minor string pointer (if any) */
00312   switch (tone_id) {
00313     case tdu_TID_V25:
00314     case tdu_TID_V25_RX:
00315       tdu_minor = tdu_ced_minor[tone_type];
00316       break;
00317     case tdu_TID_V25_PR:
00318     case tdu_TID_V25_RX_PR:
00319       tdu_minor = tdu_cedpr_minor[tone_type];
00320       break;
00321     default:
00322       tdu_minor = tdu_null_minor[tone_type];
00323       break;
00324   }
00325   strcat (event_string, tdu_minor);
00326
00327   /* Print results to STDOUT */
00328   if (on) {
00329     fprintf (stdout,  "%s  %s    Power: %3d dBm0\n", event_string,
00330              tdu_event[on], power_MF);
00331   }
00332   else {
00333     fprintf (stdout,  "%s  %s\n", event_string, tdu_event[on]);
00334   }
00335 }
00336
00337 /******************************************************************************
00338  * FUNCTION PURPOSE: Debug & exception functions.
00339  ******************************************************************************/
00340 void sysDebugInfo (void *ID, tuint msgType, tuint msgCode, tuint msgLength,
00341                    tuint *supportingData)
00342 {
00343   /* Do nothing for now */
00344 }
00345
00346
00347 /******************************************************************************
00348  * FUNCTION PURPOSE: Create TDU module.
00349  ******************************************************************************
00350  * DESCRIPTION: Creates a TDU component instance
00351  *
00352  *  void tge_sim_new_tdu
00353  *                      (
00354  *                       void
00355  *                      )
00356  *
00357  *****************************************************************************/
00358 void tge_sim_new_tdu (void)
00359 {
00360   ecomemBuffer_t  *tduBufs;
00361   ecomemBuffer_t  *bufs;
00362   tduSizeConfig_t  sizeCfg;
00363   tduNewConfig_t   tduCfgNew;
00364   tint  nbufs;
00365   tint  ret_code;
00366   tint  i;
00367
00368   /* TDU get sizes initialization */
00369   sizeCfg.maxSamplesPerFrame = tduapi_FRAME_SIZE;
00370   sizeCfg.lite               = FALSE;
00371
00372   /* TDU get sizes */
00373   ret_code = tduGetSizes (&nbufs, (const ecomemBuffer_t **) &bufs, &sizeCfg);
00374   tgeSim_check_rc (tge_SIM_ERR_TDUGETSZ, ret_code, tdu_NOERR);
00375
00376   /* Allocate memory */
00377   tduBufs = (ecomemBuffer_t *) malloc (nbufs * sizeof (ecomemBuffer_t));
00378   tgeSim_check_rc (tge_SIM_ERR_TDUALLOC, (tduBufs == NULL), FALSE);
00379
00380   /* Allocate buffers */
00381   for (i=0; i<nbufs; i++) {
00382     tduBufs[i]           = bufs[i];
00383     tduBufs[i].mclass    = ecomem_CLASS_EXTERNAL;
00384     tduBufs[i].log2align = bufs[i].log2align;
00385     tduBufs[i].volat     = bufs[i].volat;
00386 #if (defined(ti_targets_C64)      || defined(ti_targets_C64_big_endian)       || \
00387      defined(ti_targets_C64P)     || defined(ti_targets_C64P_big_endian)      || \
00388      defined(ti_targets_elf_C64P) || defined(ti_targets_elf_C64P_big_endian)  || \
00389      defined(ti_targets_C66)      || defined(ti_targets_C66_big_endian)       || \
00390      defined(ti_targets_elf_C66)  || defined(ti_targets_elf_C66_big_endian))
00391     tduBufs[i].base      = (bufs[i].size) ? memalign((1 << bufs[i].log2align),bufs[i].size) : NULL;
00392 #else
00393     {
00394       tuint linAlign  = (tuint) 1 << bufs[i].log2align;
00395       tduBufs[i].base = (bufs[i].size) ? malloc (bufs[i].size + linAlign - 1) :
00396                          NULL;
00397       tduBufs[i].base = (void *) ((((tulong) tduBufs[i].base) + linAlign - 1) &
00398                                  (0xFFFFFFFFUL - linAlign + 1));
00399     }
00400 #endif
00401   }
00402
00403   /* TDE new */
00404   tduCfgNew.ID      = tduapi_TDU_MODULE_ID;
00405   tduCfgNew.sizeCfg = sizeCfg;
00406   ret_code = tduNew (&tduSimInst, nbufs, tduBufs, &tduCfgNew);
00407   tgeSim_check_rc (tge_SIM_ERR_TDUNEW, ret_code, tdu_NOERR);
00408 }
00409
00410
00411 /******************************************************************************
00412  * FUNCTION PURPOSE: Open TDU module.
00413  ******************************************************************************
00414  * DESCRIPTION: Opens a TDU component instance
00415  *
00416  *  void tge_sim_open_tdu (
00417  *                         int tdu_mf_type, - tdu_CTL_MF_DTMF (DTMF tones)
00418  *                                            tdu_CTL_MF_R1   (R1 sig)
00419  *                                            tdu_CTL_MF_R2FW (R2 fwd sig)
00420  *                                            tdu_CTL_MF_R2BW (R2 bkwd sig)
00421  *                        )
00422  *
00423  *****************************************************************************/
00424 void tge_sim_open_tdu (tint mf_type)
00425 {
00426   tduConfig_t tduCfg;
00427   tduCfgCtl_t tduCfgCtl;
00428
00429   /* Open TDU instance */
00430   tduCfg.frame_size = tduapi_FRAME_SIZE;
00431   tduOpen (tduSimInst, &tduCfg);
00432
00433   /* Prepare common configuration options */
00434   tduCfgCtl.u.mf.freqPowThreshLow  = tduapi_FREQ_POW_THRESH_LOW;
00435   tduCfgCtl.u.mf.freqPowThreshHigh = tduapi_FREQ_POW_THRESH_HIGH;
00436   tduCfgCtl.u.mf.twistPositive     = tduapi_TWIST_POSITIVE;
00437   tduCfgCtl.u.mf.twistNegative     = tduapi_TWIST_NEGATIVE;
00438   tduCfgCtl.u.mf.breakThresh       = tduapi_BREAK_THRESH;
00439
00440   /* start DTMF detector */
00441   tduControl (tduSimInst, mf_type, &tduCfgCtl);
00442
00443   /* Set the TDU system position */
00444   tduCfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
00445                                         tdu_POSITION_SEC_ACBC_CHANGED |
00446                                         tdu_POSITION_TXRX_CHANGED;
00447   tduCfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
00448                                         tdu_POSITION_SEC_AC;
00449   tduControl (tduSimInst, tdu_CTL_POSITION, &tduCfgCtl);
00450 }
00451
00452
00453 /******************************************************************************
00454  * FUNCTION PURPOSE: Configure TDU module.
00455  ******************************************************************************
00456  * DESCRIPTION: Configures a TDU component for detection
00457  *
00458  *  void tge_sim_config_tdu (
00459  *                           tint control_code  - TDU control code (see tdu.h)
00460  *                          )
00461  *
00462  *****************************************************************************/
00463 void tge_sim_config_tdu (tint control_code)
00464 {
00465   tduCfgCtl_t tduCfgCtl;
00466
00467   /* Explicitly set the position */
00468   memset (&tduCfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
00469   tduCfgCtl.u.position.valid_bitfield = tdu_POSITION_PRI_ACBC_CHANGED |
00470                                         tdu_POSITION_SEC_ACBC_CHANGED |
00471                                         tdu_POSITION_TXRX_CHANGED;
00472   tduCfgCtl.u.position.value_bitfield = tdu_POSITION_PRI_AC           |
00473                                         tdu_POSITION_SEC_AC;
00474   tduControl (tduSimInst, tdu_CTL_POSITION, &tduCfgCtl);
00475
00476   /* Set the detection */
00477   memset (&tduCfgCtl.u.std, 0, sizeof (tduCfgCtlStd_t));
00478   tduControl (tduSimInst, control_code, &tduCfgCtl);
00479 }
00480
00481 /* 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 89 of file tduapi.h.

#define tduapi_STRING_LENGTH 32

Definition at line 90 of file tduapi.h.

#define tduapi_NUM_CED_MINOR 2

Definition at line 91 of file tduapi.h.

#define tduapi_NUM_CEDPR_MINOR 2

Definition at line 92 of file tduapi.h.

#define tduapi_NUM_EVENT 4

Definition at line 93 of file tduapi.h.

#define tduapi_NUM_DIGIT 16

Definition at line 94 of file tduapi.h.

#define tduapi_NUM_TONE (tdu_TID_LAST - tdu_TID_FIRST + 1)

Definition at line 95 of file tduapi.h.

#define tduapi_FREQ_POW_THRESH_LOW (-30)

Definition at line 98 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_FREQ_POW_THRESH_HIGH 1

Definition at line 99 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_TWIST_NEGATIVE 9

Definition at line 100 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_TWIST_POSITIVE 5

Definition at line 101 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_BREAK_THRESH (-32)

Definition at line 102 of file tduapi.h.

Referenced by tge_sim_open_tdu().

#define tduapi_TDU_MODULE_ID 0x000A

Definition at line 105 of file tduapi.h.

Referenced by tge_sim_new_tdu().

#define tduapi_FRAME_SIZE 40

Definition at line 106 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 358 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 424 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 463 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 340 of file tduapi.c.

void sysToneDetect | ( | tuint | ID,
 |  | tint | tid,
 |  | tint | on,
 |  | tint | time,
 |  | tint | power_MF,
 |  | tduCptSmartRep_t * | cpt_report
 | ) |  |

Definition at line 293 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 77 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #ifndef _TDUAPI_H
00065 #define _TDUAPI_H
00066 /******************************************************************************
00067  * FILE PURPOSE: Provide TDU accessibility in other unit test.
00068  ******************************************************************************
00069  * FILE NAME:   tduapi.h
00070  *****************************************************************************/
00071
00072 /* ANSI C headers */
00073 #include <stdlib.h>
00074 #include <stdio.h>
00075 #include <string.h>
00076
00077 /* RTSC headers */
00078 #include <ti/mas/types/types.h>
00079
00080 /* Component headers */
00081 #include <ti/mas/tdu/tdu.h>
00082
00083
00084 /* Global TDU instance */
00085 extern void *tduSimInst;
00086
00087
00088 /* Result reporting definitions */
00089 #define tduapi_REPORT_STRING_LENGTH     128
00090 #define tduapi_STRING_LENGTH             32
00091 #define tduapi_NUM_CED_MINOR              2
00092 #define tduapi_NUM_CEDPR_MINOR            2
00093 #define tduapi_NUM_EVENT                  4
00094 #define tduapi_NUM_DIGIT                 16
00095 #define tduapi_NUM_TONE                 (tdu_TID_LAST - tdu_TID_FIRST + 1)
00096
00097 /* Result reporting definitions */
00098 #define tduapi_FREQ_POW_THRESH_LOW     (-30)
00099 #define tduapi_FREQ_POW_THRESH_HIGH       1
00100 #define tduapi_TWIST_NEGATIVE             9
00101 #define tduapi_TWIST_POSITIVE             5
00102 #define tduapi_BREAK_THRESH            (-32)
00103
00104 /* TDU API definitions */
00105 #define tduapi_TDU_MODULE_ID         0x000A
00106 #define tduapi_FRAME_SIZE                40
00107
00108
00109 /* External function prototypes */
00110 void tge_sim_new_tdu    (void);
00111 void tge_sim_open_tdu   (tint mf_type);
00112 void tge_sim_config_tdu (tint control_code);
00113
00114
00115 /* Internal function prototypes */
00116 void sysDebugInfo  (void *ID, tuint msgType, tuint msgCode, tuint msgLength,
00117                     tuint *supportingData);
00118 void sysToneDetect (tuint ID, tint tid, tint on, tint time, tint power_MF,
00119                     tduCptSmartRep_t *cpt_report);
00120
00121
00122 #endif  /* _TDUAPI_H */
00123
00124 /* 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 92 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 105 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 121 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 144 of file tgeprof.c.

References tge_ProfFptr.

Referenced by main().

void tge_sim_profile_print ( void )

Definition at line 157 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 81 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 82 of file tgeprof.c.

Referenced by tge_sim_profile_init(), and tge_sim_profile_stop().

tlong tge_ProfStartCount = 0L

Definition at line 83 of file tgeprof.c.

Referenced by tge_sim_profile_start(), and tge_sim_profile_stop().

tlong tge_ProfCycleCount = 0L

Definition at line 84 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #include <stdio.h>
00072
00073 #include <ti/mas/sdk/profile.h>
00074 #include <ti/mas/sdk/memArchCfg.h>
00075 #include <ti/mas/tge/test/src/tgesim.h>
00076
00077
00078 /***********************************************************************
00079  * Profiling globals
00080  ***********************************************************************/
00081 FILE *tge_ProfFptr        = (FILE *) NULL;
00082 tlong tge_ProfOverhead    = 0L;
00083 tlong tge_ProfStartCount  = 0L;
00084 tlong tge_ProfCycleCount  = 0L;
00085
00086
00087 /***********************************************************************
00088  * Profiling routines
00089  ***********************************************************************/
00090
00091  /* ============ tge_sim_profile_start () ========== */
00092 void tge_sim_profile_start (void)
00093 {
00094   /* Flush the cache */
00095   if (simCfg->cache_enable) {
00096     memarchcfg_cacheFlush ();
00097   }
00098
00099   /* Clear the total cycles and get the start count */
00100   tge_ProfCycleCount = 0L;
00101   tge_ProfStartCount = profile_getCPUcycleCount ();
00102 }
00103
00104 /* ============ tge_sim_profile_stop () ========== */
00105 void tge_sim_profile_stop (void)
00106 {
00107   /* Get end cycles */
00108   tlong count = profile_getCPUcycleCount();
00109
00110   /* Calculate total cycles (correct for timer wrap) */
00111   count -= tge_ProfStartCount;
00112   if (count < 0) {
00113     count += sdk_PROFILE_MAXCNT;
00114   }
00115
00116   /* Store adjusted total cycles */
00117   tge_ProfCycleCount = count - tge_ProfOverhead;
00118 }
00119
00120 /* ============ tge_sim_profile_init () ========== */
00121 void tge_sim_profile_init (char *filename)
00122 {
00123   /* Initialize SDK profiling and cache */
00124   profile_initCycleProfiling ();
00125   if (simCfg->cache_enable) {
00126     memarchcfg_cacheEnable ();
00127   }
00128
00129   /* Get estimate of profile cycle call overhead */
00130   tge_ProfOverhead = 0L;
00131   tge_sim_profile_start ();
00132   tge_sim_profile_stop  ();
00133   tge_ProfOverhead = tge_ProfCycleCount;
00134
00135   /* Open profiling data file */
00136   tge_ProfFptr = fopen (filename, "w");
00137   if (tge_ProfFptr == (FILE *) NULL) {
00138     fprintf (stderr, "Unable to open: %s\n", filename);
00139   }
00140 } /* tge_sim_profile_init */
00141
00142
00143 /* ============ tge_sim_profile_close () ========== */
00144 void tge_sim_profile_close (char *filename)
00145 {
00146   /* Close SDK profiler */
00147   profile_closeCycleProfiling ();
00148
00149   /* Close profiling data file */
00150   if (tge_ProfFptr != NULL) {
00151     fclose (tge_ProfFptr);
00152   }
00153 } /* tge_sim_profile_close */
00154
00155
00156 /* ============ tge_sim_profile_print () ========== */
00157 void tge_sim_profile_print (void)
00158 {
00159   /* Only report if file is valid */
00160   if (tge_ProfFptr != NULL) {
00161     fprintf (tge_ProfFptr, "%8d\n", (tint) tge_ProfCycleCount);
00162     fflush  (tge_ProfFptr);
00163   }
00164 } /* tge_sim_profile_print */
00165
00166 /* 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 95 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_2TONE_FILE "../../vectors/profile/tone2_profile.txt"

Definition at line 96 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_3TONE_FILE "../../vectors/profile/tone3_profile.txt"

Definition at line 97 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_4TONE_FILE "../../vectors/profile/tone4_profile.txt"

Definition at line 98 of file tgeprof.h.

Referenced by main().

#define tge_SIM_PROF_AMPR_FILE "../../vectors/profile/ampr_profile.txt"

Definition at line 99 of file tgeprof.h.

Referenced by main().

Function Documentation

void tge_sim_profile_start ( void )

Definition at line 92 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 105 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 157 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 121 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 144 of file tgeprof.c.

References tge_ProfFptr.

Referenced by main().

Variable Documentation

FILE* tge_ProfFptr

Definition at line 81 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 82 of file tgeprof.c.

Referenced by tge_sim_profile_init(), and tge_sim_profile_stop().

tlong tge_ProfStartCount

Definition at line 83 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 #ifndef _TGEPROF_H
00072 #define _TGEPROF_H
00073
00074
00075 /***********************************************************************
00076  * Externs
00077  ***********************************************************************/
00078 extern  FILE  *tge_ProfFptr;
00079 extern  tlong  tge_ProfOverhead;
00080 extern  tlong  tge_ProfStartCount;
00081 extern  tlong  tge_ProfStopCount;
00082
00083
00084 /***********************************************************************
00085  * Profiling file names
00086  ***********************************************************************/
00087 /* Handle CCS Project paths */
00088 #ifdef  __CCS_PROJECT_REL_PATH
00089 #define tge_SIM_PROF_1TONE_FILE   "../../../vectors/profile/tone1_profile.txt"
00090 #define tge_SIM_PROF_2TONE_FILE   "../../../vectors/profile/tone2_profile.txt"
00091 #define tge_SIM_PROF_3TONE_FILE   "../../../vectors/profile/tone3_profile.txt"
00092 #define tge_SIM_PROF_4TONE_FILE   "../../../vectors/profile/tone4_profile.txt"
00093 #define tge_SIM_PROF_AMPR_FILE    "../../../vectors/profile/ampr_profile.txt"
00094 #else
00095 #define tge_SIM_PROF_1TONE_FILE   "../../vectors/profile/tone1_profile.txt"
00096 #define tge_SIM_PROF_2TONE_FILE   "../../vectors/profile/tone2_profile.txt"
00097 #define tge_SIM_PROF_3TONE_FILE   "../../vectors/profile/tone3_profile.txt"
00098 #define tge_SIM_PROF_4TONE_FILE   "../../vectors/profile/tone4_profile.txt"
00099 #define tge_SIM_PROF_AMPR_FILE    "../../vectors/profile/ampr_profile.txt"
00100 #endif
00101
00102
00103 /***********************************************************************
00104  * Function prototypes
00105  ***********************************************************************/
00106 void tge_sim_profile_start (void);
00107 void tge_sim_profile_stop  (void);
00108 void tge_sim_profile_print (void);
00109 void tge_sim_profile_init  (char *filename);
00110 void tge_sim_profile_close (char *filename);
00111
00112
00113 #endif /* _TGEPROF_H */
00114
00115 /* 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 122 of file tgesim.c.

Referenced by tgeSim_check_rc().

void main ( )

Definition at line 140 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 278 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 336 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 411 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 453 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 485 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 517 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 554 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 579 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 85 of file tgesim.c.

Referenced by tge_sim_process_frames().

tword compandBuffer[tge_SIM_MAX_FRAME]

Definition at line 86 of file tgesim.c.

Referenced by tge_sim_compand().

tgeSimErr_e tgeSimErrorId

Definition at line 89 of file tgesim.c.

Referenced by tgeSim_check_rc().

tint frameMult

Definition at line 92 of file tgesim.c.

Referenced by tge_sim_initialize(), and tge_sim_process_frames().

FILE* tgeSimFptr

Definition at line 95 of file tgesim.c.

Referenced by tge_sim_compand(), and tge_sim_test().

char tge_sim_fstring[128]

Definition at line 98 of file tgesim.c.

Referenced by tge_sim_test().

void* tgeSimInst

Definition at line 101 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,
  FALSE,
  tge_SIM_PCM_ULAW,
  40,
}

Definition at line 104 of file tgesim.c.

simConfig_t* simCfg = &simConfig

Definition at line 110 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 114 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070
00071 /* TGE component and simulation headers */
00072 #include <ti/mas/tge/tge.h>
00073 #include <ti/mas/tge/Version.h>
00074
00075 /* Simulation headers */
00076 #include <ti/mas/tge/test/src/tgesim.h>
00077 #include <ti/mas/tge/test/src/tduapi.h>
00078 #include <ti/mas/tge/test/src/tgeprof.h>
00079
00080 /* VPE headers */
00081 #include <ti/mas/vpe/pcm.h>
00082
00083
00084 /* Primary IO buffers for simulation */
00085 linSample sampleBuffer[tge_SIM_MAX_FRAME];
00086 tword     compandBuffer[tge_SIM_MAX_FRAME];
00087
00088 /* Global eror code */
00089 tgeSimErr_e tgeSimErrorId;
00090
00091 /* Frame multiple TGE/TDU */
00092 tint frameMult;
00093
00094 /* TGE output file pointer */
00095 FILE *tgeSimFptr;
00096
00097 /* TGE file name concatenation string */
00098 char tge_sim_fstring[128];
00099
00100 /* TGE instance pointer */
00101 void *tgeSimInst;
00102
00103 /* Simulation configuration structure & pointer */
00104 simConfig_t simConfig = {
00105   FALSE,                      /* Don't profile by default */
00106   FALSE,                       /* Enable cache by default */
00107   tge_SIM_PCM_ULAW,           /* Default companding (Ulaw) */
00108   40,                         /* Default frame length (40 samples) */
00109 };
00110 simConfig_t *simCfg = &simConfig;
00111
00112 /* TGE instance heap */
00113 #pragma DATA_ALIGN (tgeHeap, 8);
00114 unsigned char tgeHeap[tge_SIM_HEAP_SIZE];
00115
00116
00117 /*-----------------------------------------------------------------
00118  * Function:  tge_sim_halt
00119  *
00120  * Description: Utility to provide simulation breakpoint.
00121  *-----------------------------------------------------------------*/
00122 void tge_sim_halt (void)
00123 {
00124   /* Wait patiently */
00125   while (1) {
00126     asm ("  NOP");
00127     asm ("  NOP");
00128     asm ("Set_BP_Here:  ");
00129     asm ("  NOP");
00130     asm ("  NOP");
00131   }
00132 }
00133
00134
00135 /*-----------------------------------------------------------------
00136  * Filename:  main
00137  *
00138  * Description: Test TGE tone generation
00139  *-----------------------------------------------------------------*/
00140 void main ()
00141 {
00142   /* Simulation initialization */
00143   tge_sim_initialize ();
00144
00145   /* Progress */
00146   tge_sim_banner_print ("Simulation:  BEGIN\n");
00147
00148   /* TDU instance creation */
00149   tge_sim_new_tdu  ();
00150
00151   /* TDU instance open/config */
00152   tge_sim_open_tdu (tdu_CTL_MF_DTMF);
00153
00154   /* TGE instance creation/init */
00155   tge_sim_create_inst ();
00156
00157   /*************************************************************************/
00158   /* Profiling                                                             */
00159   /*************************************************************************/
00160   if (simCfg->profile_enable) {
00161     tge_sim_banner_print ("Profiling:  BEGIN\n");
00162
00163     /* One frequency tone */
00164     tge_sim_profile_init  (tge_SIM_PROF_1TONE_FILE);
00165     tge_sim_test_tones    (1, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00166                            tdu_CTL_NONE, "tone1_profile.pcm");
00167     tge_sim_profile_close (tge_SIM_PROF_1TONE_FILE);
00168
00169     /* Two frequency tone */
00170     tge_sim_profile_init  (tge_SIM_PROF_2TONE_FILE);
00171     tge_sim_test_tones    (2, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00172                            tdu_CTL_NONE, "tone2_profile.pcm");
00173     tge_sim_profile_close (tge_SIM_PROF_2TONE_FILE);
00174
00175     /* Three frequency tone */
00176     tge_sim_profile_init  (tge_SIM_PROF_3TONE_FILE);
00177     tge_sim_test_tones    (3, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00178                            tdu_CTL_NONE, "tone3_profile.pcm");
00179     tge_sim_profile_close (tge_SIM_PROF_3TONE_FILE);
00180
00181     /* Four frequency tone */
00182     tge_sim_profile_init  (tge_SIM_PROF_4TONE_FILE);
00183     tge_sim_test_tones    (4, 440, 880, 1320, 1760, -9, -12, -15, -18, 1000, 0,
00184                            tdu_CTL_NONE, "tone4_profile.pcm");
00185     tge_sim_profile_close (tge_SIM_PROF_4TONE_FILE);
00186
00187     /* Amplitude modulation and PR */
00188     tge_sim_profile_init  (tge_SIM_PROF_AMPR_FILE);
00189     tge_sim_test_ampr     (2100, -13, 15, 20, 450, 1000, 0, tge_CONFIG_AMP_MOD_PR,
00190                            tdu_CTL_NONE, "ampr_profile.pcm");
00191     tge_sim_profile_close (tge_SIM_PROF_AMPR_FILE);
00192
00193     tge_sim_banner_print ("Profiling:  END\n");
00194   }
00195
00196
00197   /*************************************************************************/
00198   /* Functional testing                                                    */
00199   /*************************************************************************/
00200   else {
00201     /***********************************************************************/
00202     /* TGE TONE Tests                                                      */
00203     /***********************************************************************/
00204     printf ("\n\n");
00205     tge_sim_banner_print ("TGE Tone Testing\n");
00206     tge_sim_test_tones (1, 1100, 0,0,0, -13, 0,0,0, 2000, 250, tdu_CTL_CNG_ON,
00207                         "cng.pcm");
00208     tge_sim_test_tones (1, 2100, 0,0,0, -13, 0,0,0, 2000, 250, tdu_CTL_V25_ON,
00209                         "ced.pcm");
00210     tge_sim_test_tones (1, 2000, 0,0,0, -15, 0,0,0, 1000, 250, tdu_CTL_SS7COT_ON,
00211                         "ss7cot.pcm");
00212     tge_sim_test_tones (1, 2600, 0,0,0, -20, 0,0,0,  400, 250, tdu_CTL_SF_ON,
00213                         "sf.pcm");
00214
00215     /***********************************************************************/
00216     /* TGE DTMF Tests                                                      */
00217     /***********************************************************************/
00218     printf ("\n\n");
00219     tge_sim_banner_print ("TGE DTMF Testing\n");
00220     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00221                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_1.pcm");
00222     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00223                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_2.pcm");
00224     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00225                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_3.pcm");
00226     tge_sim_test_tones (2, tge_SIM_DTMF_LO_1, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00227                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_A.pcm");
00228     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00229                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_4.pcm");
00230     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00231                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_5.pcm");
00232     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00233                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_6.pcm");
00234     tge_sim_test_tones (2, tge_SIM_DTMF_LO_2, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00235                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_B.pcm");
00236     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00237                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_7.pcm");
00238     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00239                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_8.pcm");
00240     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00241                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_9.pcm");
00242     tge_sim_test_tones (2, tge_SIM_DTMF_LO_3, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00243                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_C.pcm");
00244     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_1, 0,0, -8, -6,
00245                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_AST.pcm");
00246     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_2, 0,0, -8, -6,
00247                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_0.pcm");
00248     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_3, 0,0, -8, -6,
00249                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_HASH.pcm");
00250     tge_sim_test_tones (2, tge_SIM_DTMF_LO_4, tge_SIM_DTMF_HI_4, 0,0, -8, -6,
00251                         0,0, 500, 100, tdu_CTL_NONE, "dtmf_digit_D.pcm");
00252
00253
00254     /***********************************************************************/
00255     /* TGE Amplitude Modulation & Phase Reversal Tests                     */
00256     /***********************************************************************/
00257     printf ("\n\n");
00258     tge_sim_banner_print ("TGE AM/PR Testing\n");
00259     tge_sim_test_ampr (2100, -13,  0,  0, 450, 2400, 250, tge_CONFIG_PHASE_REV,
00260                        tdu_CTL_V25_ON, "ced_pr.pcm");
00261     tge_sim_test_ampr (2100, -13, 15, 20,   0, 2400, 250, tge_CONFIG_AMP_MOD,
00262                        tdu_CTL_V25_ON, "ansam.pcm");
00263     tge_sim_test_ampr (2100, -13, 15, 20, 450, 2400, 250, tge_CONFIG_AMP_MOD_PR,
00264                        tdu_CTL_V25_ON, "ansam_pr.pcm");
00265   }
00266
00267   /* Progress */
00268   printf ("\n\n");
00269   tge_sim_banner_print ("Simulation:  END\n");
00270 }
00271
00272
00273 /*-----------------------------------------------------------------
00274  * Function:  tge_sim_test_tones
00275  *
00276  * Description: TGE test of 1-4 frequency tone generation
00277  *-----------------------------------------------------------------*/
00278 void tge_sim_test_tones (tint nfrq, tint f1, tint f2, tint f3, tint f4,
00279                          float p1, float p2, float p3, float p4, tint duration,
00280                          tint silence, tint tdu_code, char *fname)
00281 {
00282   tgeConfig_t cfg;
00283   tint gen_frames;
00284   tint sil_frames;
00285   tint ret_code;
00286
00287   /* TGE Configuration for multi-tone generation */
00288   cfg.sample_rate    = tge_SAMPLE_RATE_8K;
00289   cfg.reset_phase    = TRUE;
00290   cfg.config_code    = tge_CONFIG_FREQS;
00291   cfg.u.frq.num_freq = nfrq;
00292   cfg.u.frq.freq[0]  = f1;
00293   cfg.u.frq.freq[1]  = f2;
00294   cfg.u.frq.freq[2]  = f3;
00295   cfg.u.frq.freq[3]  = f4;
00296   cfg.u.frq.amp[0]   = tge_sim_convert_pwr_to_amp (p1);
00297   cfg.u.frq.amp[1]   = tge_sim_convert_pwr_to_amp (p2);
00298   cfg.u.frq.amp[2]   = tge_sim_convert_pwr_to_amp (p3);
00299   cfg.u.frq.amp[3]   = tge_sim_convert_pwr_to_amp (p4);
00300
00301   /* TGE Init with FREQ configuration */
00302   ret_code = tgeInit (tgeSimInst, &cfg);
00303   tgeSim_check_rc (tge_SIM_ERR_TGEINIT, ret_code, tge_NOERR);
00304
00305   /* Enable required TDU detection */
00306   tge_sim_config_tdu (tdu_code);
00307
00308   /* Determine number of frames to generate OFF/ON/OFF */
00309   gen_frames = tge_sim_convert_ms_to_frames (duration);
00310   sil_frames = tge_sim_convert_ms_to_frames (silence);
00311
00312   /* Provide information regarding the test */
00313   printf ("\nTONE:   %4d Hz   %2.1f dBm0\n", f1, p1);
00314   if (nfrq > 1) {
00315     printf ("        %4d Hz   %2.1f dBm0\n", f2, p2);
00316   }
00317   if (nfrq > 2) {
00318     printf ("        %4d Hz   %2.1f dBm0\n", f3, p3);
00319   }
00320   if (nfrq > 3) {
00321     printf ("        %4d Hz   %2.1f dBm0\n", f4, p4);
00322   }
00323   printf ("---------------------------------------------------------------------\n");
00324
00325   /* Execute test */
00326   tge_sim_test (gen_frames, sil_frames, fname);
00327 }
00328
00329
00330 /*-----------------------------------------------------------------
00331  * Function:  tge_sim_test_ampr
00332  *
00333  * Description: TGE test of amplitude modulation and phase
00334  *              reversal generation
00335  *-----------------------------------------------------------------*/
00336 void tge_sim_test_ampr (tint freq, float power, tint mfreq, tint mpct,
00337                         tint period, tint duration, tint silence,
00338                         tint tge_code, tint tdu_code, char *fname)
00339 {
00340   tgeConfig_t cfg;
00341   tint gen_frames;
00342   tint sil_frames;
00343   tint ret_code;
00344
00345   /* Configuration always provided */
00346   cfg.sample_rate = tge_SAMPLE_RATE_8K;
00347   cfg.reset_phase = TRUE;
00348   cfg.config_code = tge_code;
00349   cfg.u.ampr.freq = freq;
00350   cfg.u.ampr.amp  = tge_sim_convert_pwr_to_amp (power);
00351
00352   /* Provide information regarding the test */
00353   printf ("\nTONE:   %4d Hz   %2.1f dBm0\n", freq, power);
00354
00355   /* Configuration base input */
00356   switch (tge_code) {
00357     /* Phase reversals only */
00358     case tge_CONFIG_PHASE_REV:
00359       cfg.u.ampr.period_ms = period;
00360       printf ("  PR:   %4d ms period\n", period);
00361       break;
00362
00363     /* Phase reversals only */
00364     case tge_CONFIG_AMP_MOD:
00365       cfg.u.ampr.modulate_freq = mfreq;
00366       cfg.u.ampr.modulate_pct  = tge_sim_convert_pct_to_q14 (mpct);
00367       printf (" MOD:   %4d Hz   %3d Percent\n", mfreq, mpct);
00368       break;
00369
00370     /* Phase reversals only */
00371     case tge_CONFIG_AMP_MOD_PR:
00372       cfg.u.ampr.period_ms     = period;
00373       cfg.u.ampr.modulate_freq = mfreq;
00374       cfg.u.ampr.modulate_pct  = tge_sim_convert_pct_to_q14 (mpct);
00375       printf (" MOD:   %4d Hz   %3d Percent\n", mfreq, mpct);
00376       printf ("  PR:   %4d ms\n", period);
00377       break;
00378
00379     default:
00380       break;
00381   }
00382   printf ("---------------------------------------------------------------------\n");
00383
00384   /* TGE Init with phase reversal configuration */
00385   ret_code = tgeInit (tgeSimInst, &cfg);
00386   tgeSim_check_rc (tge_SIM_ERR_TGEINIT, ret_code, tge_NOERR);
00387
00388   /* Enable required TDU detection */
00389   tge_sim_config_tdu (tdu_code);
00390
00391   /* Determine number of frames to generate OFF/ON/OFF */
00392   gen_frames = tge_sim_convert_ms_to_frames (duration);
00393   sil_frames = tge_sim_convert_ms_to_frames (silence);
00394
00395   /* Execute test */
00396   tge_sim_test (gen_frames, sil_frames, fname);
00397 }
00398
00399
00400 /*-----------------------------------------------------------------
00401  * Function:  tge_sim_test
00402  *
00403  * Description: TGE basic test routine.  Generates
00404  *              silence-tone-silence sequence as follows:
00405  *
00406  *              silence:    "sil_frames" frames
00407  *                 tone:    "gen_frames"  frames
00408  *              silence:    "sil_frames" frames
00409  *
00410  *-----------------------------------------------------------------*/
00411 void tge_sim_test (tint gen_frames, tint sil_frames, char *fname)
00412 {
00413   tgeControl_t ctl;
00414   tint ret_code;
00415
00416   /* Open and prepare output file */
00417   strcpy (tge_sim_fstring, tge_SIM_FILE_OUTDIR);
00418   strcat (tge_sim_fstring, fname);
00419   tgeSimFptr = fopen (tge_sim_fstring, "w");
00420   tgeSim_check_rc (tge_SIM_ERR_OUTFILE, (tgeSimFptr == NULL), FALSE);
00421
00422   /* Pre-silence frames */
00423   ctl.control_code = tge_CTRL_TONE_OFF;
00424   ret_code = tgeControl (tgeSimInst, &ctl);
00425   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00426   tge_sim_process_frames (sil_frames);
00427
00428   /* Tone generation frames */
00429   ctl.control_code = tge_CTRL_TONE_ON;
00430   ret_code = tgeControl (tgeSimInst, &ctl);
00431   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00432   tge_sim_process_frames (gen_frames);
00433
00434   /* Post-silence frames */
00435   ctl.control_code = tge_CTRL_TONE_OFF;
00436   ret_code = tgeControl (tgeSimInst, &ctl);
00437   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00438   tge_sim_process_frames (sil_frames);
00439
00440   /* Close output file */
00441   fclose (tgeSimFptr);
00442 }
00443
00444
00445 /*-----------------------------------------------------------------
00446  * Function:  tge_sim_process_frames
00447  *
00448  * Description: Lowest level TGE test routine.  Generates
00449  *              a "num" TGE tone frames, compands (when configured)
00450  *              and passes the frames to the TDU for detection.
00451  *
00452  *-----------------------------------------------------------------*/
00453 void tge_sim_process_frames (tint num_frames)
00454 {
00455   tint ret_code;
00456   tint offset;
00457   tint mult;
00458   tint i;
00459
00460   for (i=0; i<num_frames; i++) {
00461     /* Generate a TGE tone frame of samples */
00462     tge_sim_profile_start ();
00463     ret_code = tgeProcess (tgeSimInst, sampleBuffer, simCfg->frame_length);
00464     tge_sim_profile_stop ();
00465     tge_sim_profile_print ();
00466     tgeSim_check_rc (tge_SIM_ERR_TGEPROC, ret_code, tge_NOERR);
00467
00468     /* Compand the samples as specified */
00469     tge_sim_compand (simCfg->companding, sampleBuffer, simCfg->frame_length);
00470
00471     /* Pass the (companded) frame(s) of samples to the TDU */
00472     for (mult=0, offset=0; mult<frameMult; mult++, offset+=tduapi_FRAME_SIZE) {
00473       ret_code = tduSendIn (tduSimInst, &sampleBuffer[offset], tdu_TX_ONLY);
00474       tgeSim_check_rc (tge_SIM_ERR_TDUSENDIN, ret_code, TRUE);
00475     }
00476   }
00477 }
00478
00479
00480 /*-----------------------------------------------------------------
00481  * Function:  tge_sim_compand
00482  *
00483  * Description: Perform PCM companding in-place on frame of samples
00484  *-----------------------------------------------------------------*/
00485 void tge_sim_compand (tint pcm_format, linSample *buf, tint length)
00486 {
00487   /* Compress based on PCM format and output to file */
00488   switch (pcm_format) {
00489
00490     /* U-law 8-bit PCM  encode/decode */
00491     case tge_SIM_PCM_ULAW:
00492       pcmUlawEncoder (buf, compandBuffer, length);
00493       fwrite ((void *) compandBuffer, 1, length, tgeSimFptr);
00494       pcmUlawDecoder (compandBuffer, buf, length);
00495       break;
00496
00497     /* A-law 8-bit PCM  encode/decode */
00498     case tge_SIM_PCM_ALAW:
00499       pcmAlawEncoder (buf, compandBuffer, length);
00500       fwrite ((void *) compandBuffer, 1, length, tgeSimFptr);
00501       pcmAlawDecoder (compandBuffer, buf, length);
00502       break;
00503
00504     /* Linear 16-bit PCM */
00505     case tge_SIM_PCM_LIN:
00506     default:
00507       break;
00508   }
00509 }
00510
00511
00512 /*-----------------------------------------------------------------
00513  * Function:  tge_sim_create_inst
00514  *
00515  * Description: TGE Channel instantiation.
00516  *-----------------------------------------------------------------*/
00517 void tge_sim_create_inst (void)
00518 {
00519   tgeControl_t ctl;
00520   tint instsize;
00521   tint ret_code;
00522
00523   /* Get TGE instance size */
00524   ret_code = tgeGetSizes (&instsize);
00525   tgeSim_check_rc (tge_SIM_ERR_TGEGETSZ, ret_code, tge_NOERR);
00526
00527   /* "Allocate" TGE instance */
00528   tgeSim_check_rc (tge_SIM_ERR_HEAPSZ, (instsize > tge_SIM_HEAP_SIZE), FALSE);
00529   tgeSimInst = (void *) &tgeHeap[0];
00530
00531   /* Disable TGE instance */
00532   ctl.control_code = tge_CTRL_TONE_OFF;
00533   ret_code = tgeControl (tgeSimInst, &ctl);
00534   tgeSim_check_rc (tge_SIM_ERR_TGECTRL, ret_code, tge_NOERR);
00535
00536   /* Display TGE version information */
00537   printf ("\n-----------------------------------\n");
00538   printf ("TGE Version:  ");
00539   printf ("%d.", ti_mas_tge_Version_MAJOR);
00540   printf ("%d.", ti_mas_tge_Version_MINOR);
00541   printf ("%d.", ti_mas_tge_Version_XVERTICAL);
00542   printf ("%d ", ti_mas_tge_Version_PATCH);
00543   printf ("\n-----------------------------------\n");
00544   printf ("Instance Size:  %d bytes", instsize);
00545   printf ("\n-----------------------------------\n\n");
00546 }
00547
00548
00549 /*-----------------------------------------------------------------
00550  * Function:  tge_sim_initialize
00551  *
00552  * Description: TGE simulation default initialization.
00553  *-----------------------------------------------------------------*/
00554 void tge_sim_initialize (void)
00555 {
00556   tint frame_size;
00557
00558   /* Initialize TGE instance pointer */
00559   tgeSimInst = (void *) NULL;
00560   tduSimInst = (void *) NULL;
00561
00562   /* Check that the TGE and TDU frame sizes are compatible */
00563   frame_size = simCfg->frame_length;
00564   frameMult  = 0;
00565   do {
00566     frame_size -= tduapi_FRAME_SIZE;
00567     frameMult++;
00568   } while (frame_size > 0);
00569
00570   tgeSim_check_rc (tge_SIM_ERR_BADMULT, (frame_size == 0), TRUE);
00571 }
00572
00573
00574 /*-----------------------------------------------------------------
00575  * Function:  tgeSim_check_rc
00576  *
00577  * Description: Check return code for failure.
00578  *-----------------------------------------------------------------*/
00579 void tgeSim_check_rc (tgeSimErr_e id, tuint rc, tuint pass_code)
00580 {
00581   /* Wait forever */
00582   if (rc != pass_code) {
00583     /* Set ID for quick identifcation */
00584     tgeSimErrorId = id;
00585     printf ("\nERROR Bad Return Code: 0x%04x\n\n", (tlong) id);
00586     tge_sim_halt ();
00587   }
00588 }
00589
00590 /* Nothing past this point */
00591


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 86 of file tgesim.h.

#define tge_SIM_MAX_STRING 256

Definition at line 87 of file tgesim.h.

#define tge_SIM_MAX_FREQ 4

Definition at line 88 of file tgesim.h.

#define tge_SIM_HEAP_SIZE 512

Definition at line 89 of file tgesim.h.

Referenced by tge_sim_create_inst().

#define tge_SIM_SAMPLE_PER_MS 8

Definition at line 90 of file tgesim.h.

Referenced by tge_sim_convert_ms_to_frames().

#define tge_SIM_DTMF_LO_1 697

Definition at line 94 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_LO_2 770

Definition at line 95 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_LO_3 852

Definition at line 96 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_LO_4 941

Definition at line 97 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_1 1209

Definition at line 98 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_2 1336

Definition at line 99 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_3 1477

Definition at line 100 of file tgesim.h.

Referenced by main().

#define tge_SIM_DTMF_HI_4 1633

Definition at line 101 of file tgesim.h.

Referenced by main().

#define tge_SIM_FILE_OUTDIR "../../vectors/out/"

Definition at line 145 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 105 of file tgesim.h.

enum tgePcm_e

Enumerator:
tge_SIM_PCM_ALAW
tge_SIM_PCM_ULAW
tge_SIM_PCM_LIN

Definition at line 124 of file tgesim.h.

Function Documentation

void tge_sim_initialize ( void )

Definition at line 554 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 517 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 453 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 485 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 411 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 278 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 336 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 579 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 178 of file tgesim.h.

Referenced by main().

static linSample tge_sim_convert_pwr_to_amp ( float power ) [inline, static]

Definition at line 195 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 210 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 222 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 110 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *
00013  *              All rights reserved not granted herein.
00014  *
00015  *                         Limited License.
00016  *
00017  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00018  *  non-exclusive license under copyrights and patents it now or hereafter owns
00019  *  or controls to make, have made, use, import, offer to sell and sell
00020  *  ("Utilize") this software subject to the terms herein.  With respect to the
00021  *  foregoing patent license, such license is granted solely to the extent that
00022  *  any such patent is necessary to Utilize the software alone.  The patent
00023  *  license shall not apply to any combinations which include this software,
00024  *  other than combinations with devices manufactured by or for TI (“TI
00025  *  Devices”).  No hardware patent is licensed hereunder.
00026  *
00027  *  Redistributions must preserve existing copyright notices and reproduce this
00028  *  license (including the above copyright notice and the disclaimer and (if
00029  *  applicable) source code license limitations below) in the documentation
00030  *  and/or other materials provided with the distribution
00031  *
00032  *  Redistribution and use in binary form, without modification, are permitted
00033  *  provided that the following conditions are met:
00034  *
00035  *    *  No reverse engineering, decompilation, or disassembly of this software
00036  *  is permitted with respect to any software provided in binary form.
00037  *
00038  *    *  any redistribution and use are licensed by TI for use only with TI
00039  *  Devices.
00040  *
00041  *    *  Nothing shall obligate TI to provide you with source code for the
00042  *  software licensed and provided to you in object code.
00043  *
00044  *  If software source code is provided to you, modification and redistribution
00045  *  of the source code are permitted provided that the following conditions are
00046  *  met:
00047  *
00048  *    *  any redistribution and use of the source code, including any resulting
00049  *  derivative works, are licensed by TI for use only with TI Devices.
00050  *
00051  *    *  any redistribution and use of any object code compiled from the source
00052  *  code and any resulting derivative works, are licensed by TI for use only
00053  *  with TI Devices.
00054  *
00055  *  Neither the name of Texas Instruments Incorporated nor the names of its
00056  *  suppliers may be used to endorse or promote products derived from this
00057  *  software without specific prior written permission.
00058  *
00059  *  DISCLAIMER.
00060  *
00061  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00062  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00063  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00064  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00065  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00066  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00067  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00068  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00069  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00070  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00071  *  DAMAGE.
00072  *****************************************************************************/
00073
00074 /* ANSI C headers */
00075 #include <stdlib.h>
00076 #include <stdio.h>
00077 #include <string.h>
00078 #include <math.h>
00079
00080 /* RTSC headers */
00081 #include <ti/mas/types/types.h>
00082 #include <ti/mas/types/const.h>
00083
00084
00085 /* Simulation constraints */
00086 #define tge_SIM_MAX_FRAME        80       /* Maximum frame_size (samples)     */
00087 #define tge_SIM_MAX_STRING      256       /* Maximum string size              */
00088 #define tge_SIM_MAX_FREQ          4       /* Maximum number of freqs          */
00089 #define tge_SIM_HEAP_SIZE       512       /* Pseudo-heap for TGE instance     */
00090 #define tge_SIM_SAMPLE_PER_MS     8       /* Only support 8K at this point    */
00091
00092
00093 /* DTMF digit information */
00094 #define tge_SIM_DTMF_LO_1       697
00095 #define tge_SIM_DTMF_LO_2       770
00096 #define tge_SIM_DTMF_LO_3       852
00097 #define tge_SIM_DTMF_LO_4       941
00098 #define tge_SIM_DTMF_HI_1      1209
00099 #define tge_SIM_DTMF_HI_2      1336
00100 #define tge_SIM_DTMF_HI_3      1477
00101 #define tge_SIM_DTMF_HI_4      1633
00102
00103
00104 /* Error identifier enumerations */
00105 typedef enum {
00106   tge_SIM_ERR_NONE        = 0x0000,       /* TGE NO ERROR                     */
00107   tge_SIM_ERR_INITPROF,                   /* profile_initCycleProfiling()     */
00108   tge_SIM_ERR_SIMCFG,                     /* Error in tge_sim_config_inst     */
00109   tge_SIM_ERR_HEAPSZ,                     /* Heap too small                   */
00110   tge_SIM_ERR_BADMULT,                    /* TGE/TDU frame size mismatch      */
00111   tge_SIM_ERR_OUTFILE,                    /* TGE output file pointer error    */
00112   tge_SIM_ERR_TGEGETSZ    = 0x1000,       /* Error in tgeGetSizes()           */
00113   tge_SIM_ERR_TGEINIT,                    /* Error in tgeInit()               */
00114   tge_SIM_ERR_TGECTRL,                    /* Error in tgeControl()            */
00115   tge_SIM_ERR_TGEPROC,                    /* Error in tgeProcess()            */
00116   tge_SIM_ERR_TDUGETSZ    = 0x2000,       /* Error in tduGetSizes()           */
00117   tge_SIM_ERR_TDUALLOC,                   /* Error in tdu memory alloc        */
00118   tge_SIM_ERR_TDUNEW,                     /* Error in tduNew()                */
00119   tge_SIM_ERR_TDUSENDIN                   /* Error in tduSendIn()             */
00120 } tgeSimErr_e;
00121
00122
00123 /* Simulation PCM format enumeration */
00124 typedef enum {
00125   tge_SIM_PCM_ALAW  = const_COMP_ALAW_8,  /* 8-bit ulaw PCM                   */
00126   tge_SIM_PCM_ULAW  = const_COMP_MULAW_8, /* 8-bit alaw PCM                   */
00127   tge_SIM_PCM_LIN   = const_COMP_LINEAR   /* Linear PCM (Platform-Endian)     */
00128 } tgePcm_e;
00129
00130
00131 /* Simulation configuration structure */
00132 typedef struct {
00133   /* TGE simulation parameters */
00134   tbool    profile_enable;                /* Enable TGE profiling             */
00135   tbool    cache_enable;                  /* Enable cache                     */
00136   tgePcm_e companding;                    /* Compress/expand samples          */
00137   tuint    frame_length;                  /* TGE sample buffer frame length   */
00138 } simConfig_t;
00139
00140
00141 /* Handle CCS Project paths */
00142 #ifdef  __CCS_PROJECT_REL_PATH
00143 #define tge_SIM_FILE_OUTDIR   "../../../vectors/out/"
00144 #else
00145 #define tge_SIM_FILE_OUTDIR   "../../vectors/out/"
00146 #endif
00147
00148
00149 /* Externals */
00150 extern simConfig_t *simCfg;
00151
00152
00153 /* TGE Simulation internal API functions ("tge_sim_") */
00154 void tge_sim_initialize     (void);
00155 void tge_sim_disp_version   (void);
00156 void tge_sim_create_inst    (void);
00157 void tge_sim_process_frames (tint num_frames);
00158 void tge_sim_compand        (tint pcm_format, linSample *buf, tint length);
00159 void tge_sim_test           (tint frames_on, tint frames_off, char *fname);
00160 void tge_sim_test_tones     (tint nfrq, tint f1, tint f2, tint f3, tint f4,
00161                              float p1, float p2, float p3, float p4,
00162                              tint duration, tint silence, tint tdu_code,
00163                              char *fname);
00164 void tge_sim_test_ampr      (tint freq, float power, tint mfreq, tint mpct,
00165                              tint period, tint duration, tint silence,
00166                              tint tge_code, tint tdu_code, char *fname);
00167
00168
00169 /* TGE Simulation external API functions ("tgeSim_") */
00170 void tgeSim_check_rc      (tgeSimErr_e id, tuint rc, tuint pass_code);
00171
00172
00173 /*-----------------------------------------------------------------
00174  * Function:  tge_sim_banner_print
00175  *
00176  * Description: Utility to provide major progress information.
00177  *-----------------------------------------------------------------*/
00178 static inline void tge_sim_banner_print (char *str)
00179 {
00180   printf ("----------------------------------------\n");
00181   printf (str);
00182   printf ("----------------------------------------\n");
00183 }
00184
00185
00186 /*-----------------------------------------------------------------
00187  * Function:  tge_sim_convert_pwr_to_amp
00188  *
00189  * Description: Convert sinusoidal power in dBm0 to linear amplitude
00190  *              following the formula:
00191  *
00192  *                A = 2^15 * 10^((P - 3)/20)
00193  *
00194  *-----------------------------------------------------------------*/
00195 static inline linSample tge_sim_convert_pwr_to_amp (float power)
00196 {
00197   return ((linSample) ((double) 32768 * pow ((double) 10.0,
00198                        (double) ((power - 3.0) / 20.0))));
00199 }
00200
00201
00202 /*-----------------------------------------------------------------
00203  * Function:  tge_sim_convert_pct_to_q14
00204  *
00205  * Description: Convert decimal percentage to Q14 format :
00206  *
00207  *                Pq14 = round ((P / 100) * 2^14)
00208  *
00209  *-----------------------------------------------------------------*/
00210 static inline Fract tge_sim_convert_pct_to_q14 (tint percent)
00211 {
00212   return ((Fract) ((float) percent / 100.0 * pow ((double) 2.0, 14) + 0.5));
00213 }
00214
00215
00216 /*-----------------------------------------------------------------
00217  * Function:  tge_sim_convert_ms_to_frames
00218  *
00219  * Description: Convert duration in ms to # of frames (round up)
00220  *
00221  *-----------------------------------------------------------------*/
00222 static inline tint tge_sim_convert_ms_to_frames (tint ms)
00223 {
00224   return ((tint) ((float) tge_SIM_SAMPLE_PER_MS * ms / simCfg->frame_length + 0.5));
00225 }
00226
00227 #endif /* _TGESIM_H */
00228
00229 /* 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 (1)
#define | ti_mas_vau_Version_BUILD (0)
#define | ti_mas_vau_Version_QUALITY (3)
#define | ti_mas_vau_Version_BTYPE (0)
#define | ti_mas_vau_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_vau_Version_MAJOR
#define | Version_MINOR ti_mas_vau_Version_MINOR
#define | Version_XVERTICAL ti_mas_vau_Version_XVERTICAL
#define | Version_PATCH ti_mas_vau_Version_PATCH
#define | Version_BUILD ti_mas_vau_Version_BUILD
#define | Version_QUALITY ti_mas_vau_Version_QUALITY
#define | Version_BTYPE ti_mas_vau_Version_BTYPE
#define | Version_WIDTH ti_mas_vau_Version_WIDTH

Define Documentation

#define ti_mas_vau_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_vau_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_vau_Version_MAJOR (1)

Definition at line 50 of file Version.h.

#define ti_mas_vau_Version_MINOR (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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_vau_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_vau_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_vau_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_vau_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_vau_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_vau_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_vau_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_vau_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_vau_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_vau_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_vau_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_vau_Version_WIDTH

Definition at line 97 of file Version.h.


VAU: Version.h Source File

  • File List
  • Globals

Version.h

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


VAU: Data Structures

  • Data Structures
  • Data Fields

VAU Data Structures

Here are the data structures with brief descriptions:
vauOpenConfig_t | Open time configuration parameters
vauSizeConfig_t | Size query time configuration parameters
vauStats_s | Statistics reported by VAU
vauXdaisFxns_t | VAU's XDAIS call table definition
vauXdaisInitParams_t | Configuration parameters overloading for algInit API


VAU: Detailed VAU Description

VAU (Voice Activity Detection Unit) Package

Detailed VAU Description

Description

The Voice Activity Detection Unit (VAU) functions to determine the presence of speech in a voice channel. Voice Activity Detection (VAD) exploits silence or non-speech portions of a conversation to reduce the channel bandwidth requirements. The VAD algorithm outputs a binary decision, i.e., speech presence or absence. For the purpose of discontinuous transmission, background noise characteristics are estimated when the speech is not present (see NMU Package). To prevent speech clipping, the VAU inserts a 5 ms algorithmic delay and a hangover period.

There are two VAD algorithms:

  1. Fixed VAD algorithm: This algorithm determines speech presence based on a preconfigured fixed-energy threshold.
  2. Adaptive VAD algorithm: This algorithm automatically adapts the detection threshold based on the signal properties. The configurable adaptive aggressiveness may be used to realize a trade off between bandwidth savings and speech quality.

Fixed VAU

The fixed VAU compares the short-term energy of the input signal with a fixed threshold. If the short-term energy is above the threshold, the VAU declares speech presence; otherwise, it declares speech absence. The default fixed VAU threshold level is -40 dBm0. To avoid speech clipping, there is a 5 msec. algorithm delay and hangover period. The default hangover period is 180 msec.

Adaptive VAU

The purpose of the adaptive VAU algorithm is to adapt its threshold to noise level automatically. Its threshold values are based on the noise level, speech level, signal-to-noise ratio, and the statistics of their variations in the history. To avoid speech clipping, there is a 5 ms algorithm delay and hangover period. The default hangover period is 180 msec


VAU:

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

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

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

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

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

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

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

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

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


VAU: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


VAU: doxygen.h Source File

  • File List
  • Globals

doxygen.h

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


VAU: VAU External API

VAU (Voice Activity Detection Unit) Package

VAU External API

Page Contents

  1. VAU ECO API
  2. VAU ECO Creation Functions
  3. VAU ECO Configuration Functions
  4. VAU ECO Execution Functions
  5. VAU ECO Destruction Functions
  6. VAU ECO Return Codes
  7. VAU XDais API

VAU ECO API

The VAU Embedded Communication Object (ECO) API consists of the following nine routines for VAU instance creation, configuration, destruction and execution.

  1. vauGetSizes()
  2. vauNew()
  3. vauOpen()
  4. vauControl()
  5. vauGetStats()
  6. vauGetConfig()
  7. vauProcess()
  8. vauClose()
  9. vauDelete()

VAU ECO Creation Functions

VAU instance creation is a four step process. First, determine the VAU memory requirements via vauGetSizes below. Second, allocate the VAU memory buffers using any system-prescribed method. Create the VAU instance by passing the allocated buffer information to vauNew. Finally, open the VAU instance for use via the vauOpen API function. This process must be followed in the order given for proper operation. Once an VAU instance is opened, it may be used for voice activity detection.

  1. vauGetSizes()
  2. vauNew()
  3. vauOpen()

VAU ECO Configuration Functions

The VAU component has three external API configuration routines; one to configure the instance - vauControl(), one to to gather operational statistics - vauGetStats and one to query the current active configuration - vauGetConfig. These external API functions require an active VAU instance that has been opened according to the procedure in VAU ECO Creation Functions above.

  1. vauControl()
  2. vauGetStats()
  3. vauGetConfig()

VAU ECO Execution Functions

The VAU execution API consists of a single routine, vauProcess. This API function operates on linear samples in the from-TDM-to-Network direction to make voice activity decisions. This routine must execute for every frame in this direction.

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

  1. vauProcess()

VAU ECO Destruction Functions

VAU instance desctruction is a two step process. First, the VAU must be closed using the vauClose API function. Once the VAU is closed it may be removed via the vauDelete function.

  1. vauClose()
  2. vauDelete()

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

VAU ECO Return Codes

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

  • VAU Error codes

VAU XDais API

The VAU eXpressDsp Algorithm Interoperability Standard (XDAIS) API is available via vauXdaisCallTable. This call table provides the control and process API functions.


VAU: File Index

  • File List
  • Globals

VAU File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
vau.h [code] Contains definitions and external APIs for the Voice Activity Detection Unit


VAU: Data Fields

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

  • cfgOpen : vauXdaisInitParams_t
  • config : vauOpenConfig_t
  • control : vauXdaisFxns_t
  • curr_state : vauStats_s
  • curr_threshold : vauStats_s
  • frame_size : vauOpenConfig_t
  • ialg : vauXdaisFxns_t
  • max_frame_size : vauSizeConfig_t
  • max_sampling_rate_8k_multiple : vauSizeConfig_t
  • param : vauXdaisInitParams_t
  • process : vauXdaisFxns_t
  • sampling_rate_8k_multiple : vauOpenConfig_t


VAU: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • cfgOpen : vauXdaisInitParams_t
  • config : vauOpenConfig_t
  • control : vauXdaisFxns_t
  • curr_state : vauStats_s
  • curr_threshold : vauStats_s
  • frame_size : vauOpenConfig_t
  • ialg : vauXdaisFxns_t
  • max_frame_size : vauSizeConfig_t
  • max_sampling_rate_8k_multiple : vauSizeConfig_t
  • param : vauXdaisInitParams_t
  • process : vauXdaisFxns_t
  • sampling_rate_8k_multiple : vauOpenConfig_t


VAU: Data Fields

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

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

- _ -

  • __extern : Version.h

- t -

  • ti_mas_vau_Version___VERS : Version.h
  • ti_mas_vau_Version__top__ : Version.h
  • ti_mas_vau_Version_BTYPE : Version.h
  • ti_mas_vau_Version_BUILD : Version.h
  • ti_mas_vau_Version_MAJOR : Version.h
  • ti_mas_vau_Version_MINOR : Version.h
  • ti_mas_vau_Version_PATCH : Version.h
  • ti_mas_vau_Version_QUALITY : Version.h
  • ti_mas_vau_Version_WIDTH : Version.h
  • ti_mas_vau_Version_XVERTICAL : Version.h

- v -

  • vau_ERROR : vau.h
  • vau_MAX_SAMP_RATE : vau.h
  • vau_NOERR : vau.h
  • vau_NOMEMORY : vau.h
  • vau_SAMP_RATE_16KHZ : vau.h
  • vau_SAMP_RATE_8KHZ : vau.h
  • vau_STAT_STATE_NOISE : vau.h
  • vau_STAT_STATE_NONE : vau.h
  • vau_STAT_STATE_VOICE : vau.h
  • vauClose() : vau.h
  • vauControl() : vau.h
  • vauDelete() : vau.h
  • vauGetConfig() : vau.h
  • vauGetSizes() : vau.h
  • vauGetStats() : vau.h
  • vauNew() : vau.h
  • vauOpen() : vau.h
  • vauProcess() : vau.h
  • vauStats_t : vau.h
  • vauXdaisCallTable : vau.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


VAU: Data Fields

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

  • __extern : Version.h
  • ti_mas_vau_Version___VERS : Version.h
  • ti_mas_vau_Version__top__ : Version.h
  • ti_mas_vau_Version_BTYPE : Version.h
  • ti_mas_vau_Version_BUILD : Version.h
  • ti_mas_vau_Version_MAJOR : Version.h
  • ti_mas_vau_Version_MINOR : Version.h
  • ti_mas_vau_Version_PATCH : Version.h
  • ti_mas_vau_Version_QUALITY : Version.h
  • ti_mas_vau_Version_WIDTH : Version.h
  • ti_mas_vau_Version_XVERTICAL : Version.h
  • vau_ERROR : vau.h
  • vau_MAX_SAMP_RATE : vau.h
  • vau_NOERR : vau.h
  • vau_NOMEMORY : vau.h
  • vau_SAMP_RATE_16KHZ : vau.h
  • vau_SAMP_RATE_8KHZ : vau.h
  • vau_STAT_STATE_NOISE : vau.h
  • vau_STAT_STATE_NONE : vau.h
  • vau_STAT_STATE_VOICE : vau.h
  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


VAU: Data Fields

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

  • vauClose() : vau.h
  • vauControl() : vau.h
  • vauDelete() : vau.h
  • vauGetConfig() : vau.h
  • vauGetSizes() : vau.h
  • vauGetStats() : vau.h
  • vauNew() : vau.h
  • vauOpen() : vau.h
  • vauProcess() : vau.h


VAU: Data Fields

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

  • vauStats_t : vau.h


VAU: Data Fields

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

  • vauXdaisCallTable : vau.h


VAU: Graph Legend

Graph Legend

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

Consider the following example:

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

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

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

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

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

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

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

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

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

The boxes in the above graph have the following meaning:

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


VAU: Return Error Codes

Return Error Codes
[VAU]

Collaboration diagram for Return Error Codes:

Defines

#define | vau_ERROR 1
#define | vau_NOERR 0
#define | vau_NOMEMORY (-1)

Define Documentation

#define vau_ERROR 1

VAU return code -- Invalid configuration

Definition at line 94 of file vau.h.

#define vau_NOERR 0

VAU return code -- Initiaization of VAU was successful

Definition at line 99 of file vau.h.

#define vau_NOMEMORY (-1)

VAU return code -- Insufficient memory allocated

Definition at line 104 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 118 of file vau.h.

#define vau_SAMP_RATE_16KHZ 2

VAU Sampling Rate selection -- 16 KHz sampling rate

Definition at line 120 of file vau.h.

#define vau_MAX_SAMP_RATE 2

VAU Sampling Rate selection -- set to max sampling rate supported

Definition at line 122 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.1.0

Page Contents

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

Description

The Voice Activity Detection Unit (VAU) functions to determine the presence of speech in a voice channel. Voice Activity Detection (VAD) exploits silence or non-speech portions of a conversation to reduce the channel bandwidth requirements.

Additional links: Detailed VAU Description

Integration

The VAU component can be integrated into a system to perform voice activity detection as described at the link target below. There, we descibe the build process, integration/link process and global structure initialization requirements.

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

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

Additional links: | VAU External API
 | VAU Integration

Default Configuration

The following VAU parameters are configurable at instance creation (vauOpen):

  • Frame size (required)
  • Sampling rate (required)
  • Mode (default - ifvau_TYPE_ADAPTIVE)
  • Threshold offset (default - 0 dB)
  • Voice hangover (default - 180ms)

The following VAU parameters are run-time configurable:

  • Mode (adaptive/fixed/last)
  • Threshold offset
  • Voice hangover
  • Reset to voice state
  • Enable\/disable\/pass-through

See vauControl() for more information.

Performance

Performance measures for the VAU component are provided via the links below.

Additional links: | MIPS Requirements
 | Memory Requirements

Limitations

N/A.

Standards Compliance

N/A

Dependent Packages

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

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.fract (Common fractional arithmetic macros)
  3. ti.mas.util (Common utilities)
  4. ti.mas.swtools (Build tools)
  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 172 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 173 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 174 of file vau.h.

ifvauConfig_t vauOpenConfig_t::config

Configuration as per ifvau external interface

Definition at line 178 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 131 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 132 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 139 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 151 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 162 of file vau.h.

tint vauStats_s::curr_threshold

Current vau threshold in dBm0

Definition at line 163 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 312 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 313 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 304 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 305 of file vau.h.

vauOpenConfig_t vauXdaisInitParams_t::cfgOpen

refer to vauOpenConfig_t definition

Definition at line 306 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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 152 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 156 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 159 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
00075 /* @{ */
00076
00077 #include <ti/mas/types/types.h>
00078 #include <ti/mas/iface/ifvau/ifvau.h>
00079 #include <ti/xdais/dm/isphenc1.h>
00080 #include <ti/xdais/xdas.h>
00081 #include <ti/xdais/ialg.h>
00082 #include <ti/mas/util/debug.h>
00083 #include <ti/mas/util/ecomem.h>
00084
00089 /* @{ */
00094 #define vau_ERROR       1
00095
00099 #define vau_NOERR       0
00100
00104 #define vau_NOMEMORY  (-1)
00105 /* @} */ /* ingroup */
00106
00115 /* @{ */
00116
00118 #define vau_SAMP_RATE_8KHZ   1
00119
00120 #define vau_SAMP_RATE_16KHZ  2
00121
00122 #define vau_MAX_SAMP_RATE    2
00123 /* @} */ /* ingroup */
00124
00131 typedef struct {
00132   tint max_frame_size;
00139   tint max_sampling_rate_8k_multiple;
00145 } vauSizeConfig_t;
00146
00151 typedef struct vauStats_s {
00152 #define vau_STAT_STATE_NONE   0x00
00156 #define vau_STAT_STATE_VOICE  0x01
00159 #define vau_STAT_STATE_NOISE  0x02
00162   tuint     curr_state;
00163   tint      curr_threshold;
00164 } vauStats_t;
00165
00172 typedef struct {
00173   tint      frame_size;
00174   tint      sampling_rate_8k_multiple;
00178   ifvauConfig_t config;
00179 } vauOpenConfig_t;
00180
00187 tint vauGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, vauSizeConfig_t *cfg);
00188 tint vauNew      (void **vauInst, tint nbufs, ecomemBuffer_t *bufs);
00189 tint vauOpen     (void  *vauInst, vauOpenConfig_t *cfg);
00190 void vauClose    (void  *vauInst);
00191 void vauDelete   (void **vauInst);
00192
00206 tint vauControl (void *vauInst, ifvauConfig_t *cfg, ifvauControl_t *ctrl);
00207
00247 tbool vauProcess (void *vauInst, linSample *inSamples, linSample **outSamples,
00248                   ISPHENC1_FrameType *vauFrameType);
00249
00263 tuint vauGetConfig (void *vauInst);
00264
00275 void vauGetStats (void *vauInst, tbool reset, vauStats_t *stats);
00276
00281
00304 typedef struct {
00305   IALG_Params param;
00306   vauOpenConfig_t cfgOpen;
00307 } vauXdaisInitParams_t;
00308
00312 typedef struct {
00313   IALG_Fxns ialg;
00320   tint (*process) (IALG_Handle handle, linSample *sample, linSample **outSamples,
00321                    ISPHENC1_FrameType *vauFrameType);
00327   tint (*control) (IALG_Handle handle, ifvauConfig_t *cfg, ifvauControl_t *ctrl);
00328
00329 } vauXdaisFxns_t;
00330
00334 extern vauXdaisFxns_t vauXdaisCallTable;  /* pointer to VAU v-table */
00335 /* @} */ /* @name XDAIS APIs */
00336 /* @} */ /* ingroup */
00337
00338 #endif /* _VAU_H */
00339
00340 /* 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 105 of file test.c.

Referenced by siu_new_open_config_modules().

#define MAX_FRAME_SIZE 80

10 ms frame

Definition at line 106 of file test.c.

#define nmu_SIM_INPUT_FNAME "../../vectors/inp/in.raw"

Definition at line 117 of file test.c.

Referenced by siu_open().

#define nmu_SIM_OUTPUT_FNAME "../../vectors/out/out.raw"

Definition at line 118 of file test.c.

Referenced by siu_open().

#define nmu_SIM_OUTDEC_FNAME "../../vectors/out/outVauDecisions.txt"

Definition at line 119 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOGCYC_FNAME "../../logs/cycles.txt"

Definition at line 120 of file test.c.

Referenced by siu_open().

#define nmu_SIM_LOG_FNAME "../../logs/log.txt"

Definition at line 121 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 207 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 278 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 294 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 322 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 434 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 511 of file test.c.

References siuInst_s::inFrameFilePtr, and siuInst.

Referenced by main().

tint siu_write_outFrame | ( | linSample * | outFramePtr,
 |  | tint | numSamples
 | ) |  |

Definition at line 533 of file test.c.

References siuInst_s::outFrameFilePtr, and siuInst.

Referenced by main().

void hw_init ( void )

Definition at line 550 of file test.c.

References config.

Referenced by main().

void main ( void )

Definition at line 568 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 149 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 205 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 566 of file test.c.

linSample outFrame[MAX_FRAME_SIZE]

Definition at line 566 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. 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 5.2 or above and may be used for those who haven't yet upgraded to CCS version 5.2 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 5.2 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 74 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 103 of file mem.c.

Referenced by siu_init_heaps().

#define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000

Definition at line 104 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 82 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 92 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 115 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 121 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 131 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 140 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 146 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 151 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 186 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 221 of file mem.c.

Referenced by siu_dealloc_vau_xdais_mem().

Variable Documentation

tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE]

Definition at line 107 of file mem.c.

Referenced by siu_init_heaps().

tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE]

Definition at line 110 of file mem.c.

Referenced by siu_init_heaps().

siuMemHeap_t siuMemHeapVolatile

Definition at line 112 of file mem.c.

Referenced by siu_init_heaps(), and siu_malloc().

siuMemHeap_t siuMemHeapNonVolatile

Definition at line 113 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <stdio.h>
00065 #include <stdlib.h>
00066 #include <string.h>
00067 #include <xdc/std.h>
00068
00069 #include <ti/mas/types/types.h>
00070 #include <ti/mas/util/ecomem.h>
00071 #include <ti/xdais/ialg.h>
00072 #include <ti/mas/vau/test/src/mem.h>
00073
00074 #define align(Addr, Algnmt) (((Addr)+(Algnmt)-1)&(0xFFFFFFFFUL-(Algnmt)+1))
00075
00076 typedef struct {
00077   tword *heapBase;
00078   tulong indx;
00079   tulong size;
00080 } siuMemHeap_t;
00081
00082 void siu_mem_heap_init(siuMemHeap_t *ptr, tword *heapBase, tulong size)
00083 {
00084   ptr->heapBase = heapBase;
00085   ptr->size = size;
00086   ptr->indx = 0;
00087
00088   /* Note : memory is not initialized deliberately to expose
00089             uninitialized memory read problems */
00090 }
00091
00092 tword *siu_mem_heap_alloc (siuMemHeap_t *ptr, tint size)
00093 {
00094   tword *alloc = NULL;
00095
00096   if ((ptr->indx + size) <= ptr->size) {
00097     alloc = &ptr->heapBase[ptr->indx];
00098     ptr->indx += size;
00099   }
00100   return(alloc);
00101 }
00102
00103 #define SIU_MEM_VOLATILE_HEAP_SIZE 5000
00104 #define SIU_MEM_NONVOLATILE_HEAP_SIZE 20000
00105
00106 #pragma DATA_SECTION (siuVolatileMemBufs, ".volatileMemBufs");
00107 tword siuVolatileMemBufs[SIU_MEM_VOLATILE_HEAP_SIZE];
00108
00109 #pragma DATA_SECTION (siuNonVolatileMemBufs, ".nonVolatileMemBufs");
00110 tword siuNonVolatileMemBufs[SIU_MEM_NONVOLATILE_HEAP_SIZE];
00111
00112 siuMemHeap_t siuMemHeapVolatile;
00113 siuMemHeap_t siuMemHeapNonVolatile;
00114
00115 void siu_init_heaps(void)
00116 {
00117   siu_mem_heap_init ( &siuMemHeapVolatile, siuVolatileMemBufs, SIU_MEM_VOLATILE_HEAP_SIZE);
00118   siu_mem_heap_init ( &siuMemHeapNonVolatile, siuNonVolatileMemBufs, SIU_MEM_NONVOLATILE_HEAP_SIZE);
00119 }
00120
00121 tword *siu_malloc (tint size, tbool volat)
00122 {
00123   if (volat == TRUE) /* Scratchpad type */ {
00124     return ( siu_mem_heap_alloc (&siuMemHeapVolatile, size) );
00125   }
00126   else {
00127     return ( siu_mem_heap_alloc (&siuMemHeapNonVolatile, size) );
00128   }
00129 }
00130
00131 static inline void print_header (void)
00132 {
00133   printf("+-----------+-----------+-----------+-------------+\n");
00134   printf("| Buffer ID | Alignment |   Size    | Volatility  |\n");
00135   printf("|           |  (Bytes)  | (Bytes)   |             |\n");
00136   printf("+-----------+-----------+-----------+-------------+\n");
00137 /*printf("| %9d | %9d | %9d | %11s |\n");*/
00138 }
00139
00140 static inline void print_buffer (tint ID, tint linAlign, tint sizeMAUs, tbool isVolat)
00141 {
00142   printf("| %9d | %9d | %9d | %11s |\n", ID, linAlign * (TYP_TWORD_SIZE/8),
00143         sizeMAUs * (TYP_TWORD_SIZE/8), (isVolat == TRUE)? "scratch" : "non-scratch" );
00144 }
00145
00146 static inline void print_footer (void)
00147 {
00148   printf("+-----------+-----------+-----------+-------------+\n");
00149 }
00150
00151 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00152                    ecomemBuffer_t * ecoBufsPtr)
00153 {
00154   tint      i;
00155   void     *allocPtr;
00156   tuint     linAlign, log2align;
00157   tbool     isVolat;
00158
00159   print_header();
00160
00161   for (i = 0; i < nbufs; i++) {
00162     ecoBufsPtr[i] = sizeBufsPtr[i];
00163
00164     isVolat = ecoBufsPtr[i].volat;
00165
00166     log2align = sizeBufsPtr[i].log2align;
00167     linAlign = (tuint) 1 << log2align;
00168
00169     print_buffer (i, linAlign, sizeBufsPtr[i].size, isVolat);
00170
00171     if (sizeBufsPtr[i].size == 0) {
00172       ecoBufsPtr[i].base = NULL;
00173       continue;
00174     }
00175
00176     if ((allocPtr = (void *) siu_malloc((sizeBufsPtr[i].size + linAlign - 1), isVolat)) == NULL) {
00177       printf("Not enough heap, exiting\n");
00178       exit(0);
00179     }
00180     ecoBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00181   }
00182
00183   print_footer();
00184 }
00185
00186 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00187 {
00188   tint      i;
00189   void     *allocPtr;
00190   tint     linAlign;
00191   tint      alignmentAdjustedSize;
00192   tbool    isVolat;
00193
00194   print_header();
00195
00196   for (i = 0; i < nbufs; i++) {
00197
00198     isVolat = (xdaisBufsPtr[i].attrs == IALG_SCRATCH) ? TRUE : FALSE;
00199     linAlign = (tint) xdaisBufsPtr[i].alignment;
00200
00201     print_buffer (i, linAlign, xdaisBufsPtr[i].size, isVolat);
00202
00203     if (xdaisBufsPtr[i].size == 0) {
00204       xdaisBufsPtr[i].base = NULL;
00205       continue;
00206     }
00207
00208     alignmentAdjustedSize = xdaisBufsPtr[i].size + linAlign - 1;
00209     if ((allocPtr = (void *) siu_malloc(alignmentAdjustedSize, isVolat)
00210         ) == NULL) {
00211       printf("Not enough heap, exiting\n");
00212       exit(0);
00213     }
00214     *mallocedSizeCounter += alignmentAdjustedSize;
00215     xdaisBufsPtr[i].base = (void *) align((tulong) allocPtr, linAlign);
00216   }
00217
00218   print_footer();
00219 }
00220
00221 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter)
00222 {
00223   tint i;
00224
00225   for(i = 0; i < nbufs; i++) {
00226     *mallocedSizeCounter -= (xdaisBufsPtr[i].size + xdaisBufsPtr[i].alignment - 1);
00227     if (xdaisBufsPtr[i].base) {
00228
00229     /* Note the free below may not have the right pointers as were in malloc because
00230        the module was fed aligned pointers, it is not possible to reverse and derive
00231        original unaligned pointer, so don't do free */
00232       //free(xdaisBufsPtr[i].base);
00233     }
00234   }
00235 }
00236
00237 /* 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 115 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 151 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 186 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 221 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 /*
00002  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00003  *
00004  *              All rights reserved not granted herein.
00005  *
00006  *                         Limited License.
00007  *
00008  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00009  *  non-exclusive license under copyrights and patents it now or hereafter owns
00010  *  or controls to make, have made, use, import, offer to sell and sell
00011  *  ("Utilize") this software subject to the terms herein.  With respect to the
00012  *  foregoing patent license, such license is granted solely to the extent that
00013  *  any such patent is necessary to Utilize the software alone.  The patent
00014  *  license shall not apply to any combinations which include this software,
00015  *  other than combinations with devices manufactured by or for TI (“TI
00016  *  Devices”).  No hardware patent is licensed hereunder.
00017  *
00018  *  Redistributions must preserve existing copyright notices and reproduce this
00019  *  license (including the above copyright notice and the disclaimer and (if
00020  *  applicable) source code license limitations below) in the documentation
00021  *  and/or other materials provided with the distribution
00022  *
00023  *  Redistribution and use in binary form, without modification, are permitted
00024  *  provided that the following conditions are met:
00025  *
00026  *    *  No reverse engineering, decompilation, or disassembly of this software
00027  *  is permitted with respect to any software provided in binary form.
00028  *
00029  *    *  any redistribution and use are licensed by TI for use only with TI
00030  *  Devices.
00031  *
00032  *    *  Nothing shall obligate TI to provide you with source code for the
00033  *  software licensed and provided to you in object code.
00034  *
00035  *  If software source code is provided to you, modification and redistribution
00036  *  of the source code are permitted provided that the following conditions are
00037  *  met:
00038  *
00039  *    *  any redistribution and use of the source code, including any resulting
00040  *  derivative works, are licensed by TI for use only with TI Devices.
00041  *
00042  *    *  any redistribution and use of any object code compiled from the source
00043  *  code and any resulting derivative works, are licensed by TI for use only
00044  *  with TI Devices.
00045  *
00046  *  Neither the name of Texas Instruments Incorporated nor the names of its
00047  *  suppliers may be used to endorse or promote products derived from this
00048  *  software without specific prior written permission.
00049  *
00050  *  DISCLAIMER.
00051  *
00052  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00053  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00054  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00055  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00056  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00057  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00058  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00059  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00060  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00061  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00062  *  DAMAGE.
00063 */
00064 #include <ti/mas/types/types.h>
00065 #include <ti/mas/util/ecomem.h>
00066 #include <ti/xdais/ialg.h>
00067
00068 void siu_init_heaps(void);
00069 void siu_alloc_eco_mem(tint nbufs, const ecomemBuffer_t * sizeBufsPtr,
00070                    ecomemBuffer_t * ecoBufsPtr);
00071
00072 void siu_alloc_xdais_mem(tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00073 void siu_dealloc_xdais_mem (tint nbufs, IALG_MemRec *xdaisBufsPtr, tulong *mallocedSizeCounter);
00074
00075 /* Nothing past this point */


VAU Test: Module Index

VAU Test Modules

Here is a list of all modules:
  • VAUTEST


VAU Test: Page Index

VAU Test Related Pages

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


VAU Test: config_s Struct Reference

  • Data Structures
  • Data Fields

config_s Struct Reference
[VAUTEST]

Detailed Description

global test configuration structure definition

Definition at line 127 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 128 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 130 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 134 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 136 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 138 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 139 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 174 of file test.c.

Data Fields

tlong | max
tlong | avg

Field Documentation

tlong cycles_s::max

running maximum of cycles

Definition at line 175 of file test.c.

tlong cycles_s::avg

running average of cycles (using exponential averaging)

Definition at line 176 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 181 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 182 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 183 of file test.c.

Referenced by siu_close(), siu_new_open_config_modules(), and siu_process().

tlong siuInst_s::frameCount

Definition at line 184 of file test.c.

Referenced by main(), and siu_process().

ISPHENC1_FrameType siuInst_s::vauFrameTypePrev

Definition at line 185 of file test.c.

Referenced by siu_process().

tbool siuInst_s::vauAlertFlagPrev

Definition at line 186 of file test.c.

Referenced by siu_process().

FILE* siuInst_s::inFrameFilePtr

Definition at line 187 of file test.c.

Referenced by siu_close(), siu_open(), and siu_read_inFrame().

FILE* siuInst_s::outFrameFilePtr

Definition at line 188 of file test.c.

Referenced by siu_close(), siu_open(), and siu_write_outFrame().

FILE* siuInst_s::outVauDecisionFilePtr

Definition at line 189 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 198 of file test.c.

Referenced by siu_open().

cycles_t siuInst_s::cyclesVau

Vau's cycle statistics

Definition at line 199 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 200 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 76 of file mem.c.

Data Fields

tword * | heapBase
tulong | indx
tulong | size

Field Documentation

tword* siuMemHeap_t::heapBase

Definition at line 77 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::indx

Definition at line 78 of file mem.c.

Referenced by siu_mem_heap_alloc(), and siu_mem_heap_init().

tulong siuMemHeap_t::size

Definition at line 79 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.
Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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
00073 /* @{ */
00074
00075 #include <stdio.h>
00076 #include <stdlib.h>
00077 #include <string.h>
00078 #include <xdc/std.h>
00079
00080 #include <ti/mas/types/types.h>
00081 #include <ti/mas/util/utl.h>
00082 #include <ti/mas/util/debug.h>
00083 #include <ti/mas/iface/ifvau/ifvau.h>
00084 #include <ti/mas/vau/vau.h>
00085 #include <ti/mas/vau/Version.h>
00086 #include <ti/xdais/dm/isphenc1.h>
00087 #include <ti/xdais/ialg.h>
00088 #include <ti/mas/vau/test/src/mem.h>
00089
00090 //#define DBG
00091
00092 #ifdef DBG
00093 extern tlong gVauEnergy;
00094 extern tlong gVauThreshold;
00095 #endif
00096
00097 #ifdef USE_CACHE
00098 #include <ti/mas/sdk/memArchCfg.h>
00099 #endif
00100
00101 #ifdef PROFILE_CYCLES
00102 #include <ti/mas/sdk/profile.h>
00103 #endif
00104
00105 #define SIU_MAX_MODULE_NBUFS 100
00106 #define MAX_FRAME_SIZE 80
00109 /* Handle CCS Project paths */
00110 #ifdef  __CCS_PROJECT_REL_PATH
00111 #define nmu_SIM_INPUT_FNAME        "../../../vectors/inp/in.raw"
00112 #define nmu_SIM_OUTPUT_FNAME       "../../../vectors/out/out.raw"
00113 #define nmu_SIM_OUTDEC_FNAME       "../../../vectors/out/outVauDecisions.txt"
00114 #define nmu_SIM_LOGCYC_FNAME       "../../../logs/cycles.txt"
00115 #define nmu_SIM_LOG_FNAME          "../../../logs/log.txt"
00116 #else
00117 #define nmu_SIM_INPUT_FNAME        "../../vectors/inp/in.raw"
00118 #define nmu_SIM_OUTPUT_FNAME       "../../vectors/out/out.raw"
00119 #define nmu_SIM_OUTDEC_FNAME       "../../vectors/out/outVauDecisions.txt"
00120 #define nmu_SIM_LOGCYC_FNAME       "../../logs/cycles.txt"
00121 #define nmu_SIM_LOG_FNAME          "../../logs/log.txt"
00122 #endif
00123
00124
00127 typedef struct config_s {
00128   tbool     xdaisFlag;
00130   tbool     xdaisDefaultCfgFlag;
00134   tint      frameSize;
00136   tint      samp_rate_8k_multiple;
00138   ifvauConfig_t vauConfig;
00139   ifvauControl_t vauControl;
00140 #ifdef USE_CACHE
00141   tint  doCacheFlush;
00142   tint  doCacheEnable;
00143 #endif
00144 } config_t;
00145
00149 config_t  config = {
00150   1,  /* xdaisFlag */
00151   0,  /* don't use default configuration for xdais */
00152   80, /* 10 ms default frame size at 8 KHz */
00153   1,  /* 8 KHz */
00154
00155   /* vauConfig */
00156   {
00157    ifvau_VALID_TYPE | ifvau_VALID_THRESH_OFFSET | ifvau_VALID_HOLD_OVER,
00158    ifvau_TYPE_ADAPTIVE,
00159    0,
00160    180},
00161
00162   /* vauControl */
00163   {
00164    ifvau_VALID_CONTROL,
00165    ifvau_ENABLE
00166   }
00167 #ifdef USE_CACHE
00168  ,1, /* doCacheFlush */
00169   1  /* doCacheEnable */
00170 #endif
00171 };
00172
00174 typedef struct cycles_s {
00175   tlong     max;
00176   tlong     avg;
00177 } cycles_t;
00178
00181 typedef struct siuInst_s {
00182   void     *vauInst;
00183   IALG_Handle vauXdaisInst;
00184   tlong     frameCount;
00185   ISPHENC1_FrameType vauFrameTypePrev;
00186   tbool    vauAlertFlagPrev;
00187   FILE     *inFrameFilePtr;
00188   FILE     *outFrameFilePtr;
00189   FILE     *outVauDecisionFilePtr;
00190
00191 #ifdef PROFILE_CYCLES
00192   FILE   *outCyclesFilePtr;
00193 #endif
00194
00195 #ifdef DBG
00196   FILE     *vauDbgLogFilePtr;
00197 #endif
00198   tlong     cyclesOverhead;
00199   cycles_t  cyclesVau;
00200   tulong   xdaisBufsMallocFreeCounter;
00203 } siuInst_t;
00204
00205 siuInst_t siuInst;
00206
00207 void siu_open(void)
00208 {
00209 #ifdef PROFILE_CYCLES
00210   volatile tlong cycles;
00211 #endif
00212
00213   memset(&siuInst, 0, sizeof(siuInst_t));
00214
00215   siu_init_heaps();
00216
00217   if ((siuInst.inFrameFilePtr = fopen(nmu_SIM_INPUT_FNAME, "rb")) == NULL) {
00218     printf(" Error opening in.raw\n");
00219     exit(0);
00220   }
00221
00222   if ((siuInst.outFrameFilePtr =
00223     fopen(nmu_SIM_OUTPUT_FNAME, "wb")) == NULL) {
00224     printf(" Error opening out.raw\n");
00225     exit(0);
00226   }
00227
00228   if ((siuInst.outVauDecisionFilePtr =
00229     fopen(nmu_SIM_OUTDEC_FNAME, "wt")) == NULL) {
00230     printf(" Error opening out.raw\n");
00231     exit(0);
00232   }
00233
00234 #ifdef PROFILE_CYCLES
00235   if ((siuInst.outCyclesFilePtr =
00236     fopen(nmu_SIM_LOGCYC_FNAME, "wt")) == NULL) {
00237     printf(" Error opening cycles.txt\n");
00238     exit(0);
00239   }
00240 #endif
00241
00242 #ifdef DBG
00243   if ((siuInst.vauDbgLogFilePtr =
00244     fopen(nmu_SIM_LOG_FNAME, "wt")) == NULL) {
00245     printf(" Error opening log.txt\n");
00246     exit(0);
00247   }
00248 #endif
00249
00250   /* measure measurement overhead of cycles */
00251
00252 #ifdef PROFILE_CYCLES
00253   cycles = profile_getCPUcycleCount();
00254 #endif
00255
00256 #ifdef PROFILE_CYCLES
00257   cycles = (profile_getCPUcycleCount() - cycles);
00258   siuInst.cyclesOverhead = cycles;
00259 #endif
00260
00261 }
00262
00263 #ifdef PROFILE_CYCLES
00264 static inline void siu_print_cycles_util(cycles_t * cyclesPtr, char *name,
00265                                          tlong overhead)
00266 {
00267   printf("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00268          (long) cyclesPtr->max - (long) overhead,
00269          (long) cyclesPtr->avg - (long) overhead);
00270 }
00271
00272 void siu_print_cycles(void)
00273 {
00274   siu_print_cycles_util(&siuInst.cyclesVau, "Vau", siuInst.cyclesOverhead);
00275 }
00276 #endif
00277
00278 void siu_dealloc_vau_xdais_mem (IALG_Fxns *ialgFxnsPtr, IALG_Handle xdaisInstPtr,
00279                                 tulong *mallocedSizeCounter)
00280 {
00281   Int nbufs;
00282   IALG_MemRec *xdaisBufsPtr;
00283
00284   nbufs = ialgFxnsPtr->algNumAlloc();
00285   xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00286
00287   nbufs = ialgFxnsPtr->algFree(xdaisInstPtr, xdaisBufsPtr);
00288
00289   siu_dealloc_xdais_mem ((tint) nbufs, xdaisBufsPtr, mallocedSizeCounter);
00290
00291   free(xdaisBufsPtr);
00292 }
00293
00294 void siu_close(void)
00295 {
00296   fclose(siuInst.inFrameFilePtr);
00297   fclose(siuInst.outFrameFilePtr);
00298   fclose(siuInst.outVauDecisionFilePtr);
00299
00300
00301 #ifdef DBG
00302   fclose(siuInst.vauDbgLogFilePtr);
00303 #endif
00304
00305 #ifdef PROFILE_CYCLES
00306   fclose(siuInst.outCyclesFilePtr);
00307   siu_print_cycles();
00308   profile_closeCycleProfiling();
00309 #endif
00310
00311   if (config.xdaisFlag) {
00312     siu_dealloc_vau_xdais_mem (&vauXdaisCallTable.ialg, siuInst.vauXdaisInst,
00313                            &siuInst.xdaisBufsMallocFreeCounter);
00314     if (siuInst.xdaisBufsMallocFreeCounter) {
00315       printf(" Error: mismatched malloc-free\n");
00316     }
00317   }
00318
00319   memset(&siuInst, 0, sizeof(siuInst_t));
00320 }
00321
00322 void siu_new_open_config_modules(config_t * config)
00323 {
00324   tint      nbufs, ret;
00325   const ecomemBuffer_t *sizeBufs;
00326   ecomemBuffer_t ecoBufs[SIU_MAX_MODULE_NBUFS];
00327   const IALG_Params *paramsPtr;
00328   IALG_MemRec *xdaisBufsPtr;
00329
00330   vauSizeConfig_t vauSizeCfg;
00331   vauOpenConfig_t vauOpenCfg;
00332
00333   vauXdaisInitParams_t vauXdaisInitParams;
00334
00335   vauXdaisInitParams.param.size = (Int) sizeof(vauXdaisInitParams_t);
00336
00337   printf("Querying VAU Memory Requirements\n");
00338
00339   vauSizeCfg.max_frame_size = config->frameSize;
00340   vauSizeCfg.max_sampling_rate_8k_multiple = config->samp_rate_8k_multiple;
00341
00342   if (config->xdaisFlag) {
00343     nbufs = (tint) vauXdaisCallTable.ialg.algNumAlloc();
00344     if (nbufs == 0) {
00345       printf(" algNumAlloc error, exiting\n");
00346       exit(0);
00347     }
00348
00349     xdaisBufsPtr = (IALG_MemRec *) malloc(nbufs * sizeof(IALG_MemRec));
00350     if (xdaisBufsPtr == NULL) {
00351       printf("Not enough heap for VAU memory records, exiting\n");
00352       exit(0);
00353     }
00354     if (config->xdaisDefaultCfgFlag) {
00355       paramsPtr = NULL;
00356     }
00357     else {
00358       /* currently no config supported in vau for alloc, but if introduce in
00359          future, refer to that configuration */
00360       paramsPtr = NULL;
00361     }
00362     vauXdaisCallTable.ialg.algAlloc (paramsPtr, NULL, xdaisBufsPtr);
00363   }
00364   else {
00365     if (vauGetSizes(&nbufs, &sizeBufs, &vauSizeCfg) != vau_NOERR) {
00366       printf(" Vau get sizes error, exiting \n");
00367       exit(0);
00368     }
00369   }
00370
00371   printf("Allocating VAU memory..\n");
00372
00373   if (config->xdaisFlag) {
00374     siu_alloc_xdais_mem (nbufs, xdaisBufsPtr, &siuInst.xdaisBufsMallocFreeCounter);
00375     siuInst.vauXdaisInst = (IALG_Handle) xdaisBufsPtr[0].base;
00376   }
00377   else {
00378     siu_alloc_eco_mem(nbufs, sizeBufs, ecoBufs);
00379   }
00380
00381   vauOpenCfg.frame_size = config->frameSize;
00382   vauOpenCfg.sampling_rate_8k_multiple = config->samp_rate_8k_multiple;
00383   vauOpenCfg.config = config->vauConfig;
00384
00385   if (config->xdaisFlag) {
00386     if (config->xdaisDefaultCfgFlag) {
00387       paramsPtr = NULL;
00388     }
00389     else {
00390       vauXdaisInitParams.cfgOpen = vauOpenCfg;
00391       paramsPtr = (IALG_Params *) &vauXdaisInitParams;
00392     }
00393     ret = vauXdaisCallTable.ialg.algInit(siuInst.vauXdaisInst,
00394                                    xdaisBufsPtr, NULL, paramsPtr);
00395
00396     free(xdaisBufsPtr);
00397
00398     if (ret == IALG_EFAIL) {
00399       printf("algInit() failure, exiting\n");
00400       exit(0);
00401     }
00402   }
00403   else {
00404     if (vauNew(&(siuInst.vauInst), nbufs, ecoBufs) != vau_NOERR) {
00405       printf(" Vau New error, exiting \n");
00406       exit(0);
00407     }
00408     vauOpen(siuInst.vauInst, &vauOpenCfg);
00409   }
00410
00411   if (config->xdaisFlag) {
00412     vauXdaisCallTable.control (siuInst.vauXdaisInst, &(config->vauConfig), &(config->vauControl));
00413   }
00414   else {
00415     vauControl(siuInst.vauInst, &(config->vauConfig), &(config->vauControl));
00416   }
00417 }
00418
00419 #ifdef PROFILE_CYCLES
00420 static inline void siu_process_cycles(tlong cycles, cycles_t * cyclesPtr)
00421 {
00422   if (cycles > cyclesPtr->max) {
00423     cyclesPtr->max = cycles;
00424   }
00425
00426   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00427 }
00428 #endif
00429
00430 #ifdef AZ_INFO_AVAILABLE
00431 extern tint glob_Az[];
00432 #endif
00433
00434 void siu_process(linSample * framePtr, linSample ** outFramePtr)
00435 {
00436   linSample *vauOutSamplesPtr = *outFramePtr;
00437   ISPHENC1_FrameType vauFrameType;
00438   tbool     vauAlertFlag = FALSE;
00439
00440 #ifdef PROFILE_CYCLES
00441   volatile tlong cycles;
00442 #endif
00443
00444 #ifdef USE_CACHE
00445   if (config.doCacheFlush) {
00446     memarchcfg_cacheFlush();
00447   }
00448 #endif
00449
00450 #ifdef PROFILE_CYCLES
00451     cycles = profile_getCPUcycleCount();
00452 #endif
00453
00454   if (config.xdaisFlag) {
00455     vauAlertFlag =
00456     vauXdaisCallTable.process(siuInst.vauXdaisInst, framePtr, &vauOutSamplesPtr,
00457                 &vauFrameType);
00458   }
00459   else {
00460     vauAlertFlag =
00461     vauProcess(siuInst.vauInst, framePtr, &vauOutSamplesPtr,
00462               &vauFrameType);
00463   }
00464
00465 #ifdef PROFILE_CYCLES
00466     cycles = (profile_getCPUcycleCount() - cycles);
00467     siu_process_cycles(cycles, &siuInst.cyclesVau);
00468     fprintf(siuInst.outCyclesFilePtr, "%ld\n", (long) cycles);
00469 #endif
00470
00471   /* output when something changes and on first occurrence */
00472   if ( (siuInst.frameCount == 1) || (vauFrameType != siuInst.vauFrameTypePrev) ||
00473        (vauAlertFlag != siuInst.vauAlertFlagPrev)) {
00474
00475     fprintf(siuInst.outVauDecisionFilePtr, "%ld, %d, %d\n", (long) siuInst.frameCount,
00476             vauFrameType, vauAlertFlag);
00477
00478     switch (vauFrameType) {
00479       case ISPHENC1_FTYPE_SPEECH:
00480         printf(" At frame %ld, %s, %s\n", (long) siuInst.frameCount, "SPEECH",
00481                              (vauAlertFlag == TRUE)? "ALERT ON": "ALERT OFF");
00482       break;
00483
00484       case ISPHENC1_FTYPE_NODATA:
00485         if ((siuInst.frameCount > 1) && (siuInst.vauAlertFlagPrev == FALSE)) {
00486           printf(" Noise frame arrived without a previous alert flag on SPEECH, exiting");
00487           exit(0);
00488         }
00489         else {
00490           printf(" At frame %ld, %s\n", (long) siuInst.frameCount, "NOISE");
00491         }
00492       break;
00493
00494       default:
00495         printf(" Invalid Frame Type %d\n detected, exiting", vauFrameType);
00496         exit(0);
00497       break;
00498     }
00499
00500     siuInst.vauFrameTypePrev = vauFrameType;
00501     siuInst.vauAlertFlagPrev = vauAlertFlag;
00502   }
00503
00504 #ifdef DBG
00505   fprintf(siuInst.vauDbgLogFilePtr, "%ld %ld\n", (long) gVauEnergy, (long) gVauThreshold);
00506 #endif
00507
00508   *outFramePtr = vauOutSamplesPtr;
00509 }
00510
00511 tint siu_read_inFrame(linSample * inFramePtr, tint numSamples)
00512 {
00513   int       i;
00514
00515   for (i = 0; i < numSamples; i++) {
00516     int       lsb, msb;
00517
00518     lsb = fgetc(siuInst.inFrameFilePtr);
00519     msb = fgetc(siuInst.inFrameFilePtr);
00520     inFramePtr[i] = (linSample) ((msb << 8) | lsb);
00521   }
00522
00523   if (feof(siuInst.inFrameFilePtr)) {
00524     /* silence the last frame as it could have garbage */
00525     memset(inFramePtr, 0, numSamples * sizeof(linSample));
00526     return (0);
00527   }
00528   else {
00529     return (1);
00530   }
00531 }
00532
00533 tint siu_write_outFrame(linSample * outFramePtr, tint numSamples)
00534 {
00535   int       i;
00536
00537   for (i = 0; i < numSamples; i++) {
00538     fputc(outFramePtr[i] & 0xFF, siuInst.outFrameFilePtr);
00539     fputc(((outFramePtr[i] >> 8) & 0xFF), siuInst.outFrameFilePtr);
00540   }
00541
00542   if (feof(siuInst.outFrameFilePtr)) {
00543     return (1);
00544   }
00545   else {
00546     return (0);
00547   }
00548 }
00549
00550 void hw_init(void)
00551 {
00552 #ifdef PROFILE_CYCLES
00553   if (!profile_initCycleProfiling()) {
00554     printf("Could not acquire profiling resources..Exiting\n");
00555     exit(0);
00556   }
00557 #endif
00558
00559 #ifdef USE_CACHE
00560   if (config.doCacheEnable) {
00561     memarchcfg_cacheEnable();
00562   }
00563 #endif
00564 }
00565
00566 linSample inFrame[MAX_FRAME_SIZE], outFrame[MAX_FRAME_SIZE];
00567
00568 void main(void)
00569 {
00570   linSample *outFramePtr = outFrame;
00571
00572   printf("Version Information of modules tested:\n");
00573   printf("VAU %d.%d.%d.%d\n",
00574           ti_mas_vau_Version_MAJOR, ti_mas_vau_Version_MINOR,
00575           ti_mas_vau_Version_XVERTICAL, ti_mas_vau_Version_PATCH);
00576
00577   if (config.xdaisFlag) {
00578     printf("Using XDAIS APIs\n");
00579   }
00580   else {
00581     printf("Using ECO APIs\n");
00582   }
00583
00584   hw_init();
00585
00586   siu_open();
00587
00588   siu_new_open_config_modules(&config);
00589
00590   printf("Processing Frames..\n");
00591
00592   while (siu_read_inFrame(inFrame, config.frameSize)) {
00593     siuInst.frameCount++;
00594     siu_process(inFrame, &outFramePtr);
00595     if (siu_write_outFrame(outFramePtr, config.frameSize)) {
00596       printf(" Error writing output frame, exiting \n");
00597       exit(0);
00598     }
00599   }
00600
00601   siu_close();
00602 }
00603 /* @} */ /* ingroup */
00604
00605 /* 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 (1)
#define | ti_mas_veu_Version_BUILD (0)
#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 (1)

Definition at line 59 of file Version.h.

#define ti_mas_veu_Version_BUILD (0)

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 (1)
00060
00061 /* BUILD */
00062 #define ti_mas_veu_Version_BUILD (0)
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 148 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 154 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 160 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 166 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 172 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 178 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 184 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 190 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 105 of file veu.h.

#define veu_NOERR 0

VEU return code -- VEU operation/configuration is successful.

Definition at line 111 of file veu.h.

#define veu_ERR_BAD_INST 1

VEU return code -- Instantiation/de-instantiation of VEU is not accomplished.

Definition at line 118 of file veu.h.

#define veu_ERR_BAD_PARAM 2

VEU return code -- Configuration parameters for VEU are invalid.

Definition at line 124 of file veu.h.

#define veu_ERR_BAD_BUILD 3

VEU return code -- Wideband operation is requested in a narrowband build.

Definition at line 130 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 216 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 223 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 227 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 231 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 235 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 239 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 243 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 247 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 251 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 255 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 258 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 265 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 269 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 272 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 276 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 290 of file veu.h.

#define veu_INFRAME_MAXLENGTH 80

Maximum for 5/10msec frames: 10 ms

Definition at line 291 of file veu.h.

#define veu_INFRAME_LENGTHINC 40

Increment for 5/10msec frames: 5ms

Definition at line 292 of file veu.h.

#define veu_INFRAME_MINLENGTH_5P5 44

Minimum for 5.5/11msec frames: 5.5 ms

Definition at line 293 of file veu.h.

#define veu_INFRAME_MAXLENGTH_5P5 88

Maximum for 5.5/11msec frames: 11 ms

Definition at line 294 of file veu.h.

#define veu_INFRAME_LENGTHINC_5P5 44

Increment for 5.5/11msec frames: 5.5ms

Definition at line 295 of file veu.h.


VEU: VEU (Voice Enhancement Unit) Package

VEU (Voice Enhancement Unit) Package

Release 4.4.1.0

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 388 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 389 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 392 of file veu.h.

tint veuConfig_s::anr_level

refer to veuControl_s.anr_level

Definition at line 394 of file veu.h.

tint veuConfig_s::alc_send_level

refer to veuControl_s.alc_level

Definition at line 395 of file veu.h.

tint veuConfig_s::alc_recv_level

refer to veuControl_s.alc_level

Definition at line 396 of file veu.h.

tint veuConfig_s::bulk_delay

refer to veuControl_s.bulk_delay

Definition at line 397 of file veu.h.

Fract veuConfig_s::waepl

refer to veuControl_s.waepl

Definition at line 398 of file veu.h.

Fract veuConfig_s::fgc_send_gain

refer to veuControl_s.fgc_gain

Definition at line 399 of file veu.h.

Fract veuConfig_s::fgc_recv_gain

refer to veuControl_s.fgc_gain

Definition at line 400 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 428 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 430 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 448 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 316 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 319 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 324 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 330 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 337 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 345 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 353 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 359 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 305 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 306 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 308 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 376 of file veu.h.

Data Fields

void * handle

Field Documentation

void* veuNewConfig_s::handle

system handle used by veuContext_s:exception

Definition at line 377 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 368 of file veu.h.

Data Fields

tint max_frame_size

Field Documentation

tint veuSizeConfig_s::max_frame_size

max Frame size

Definition at line 369 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 408 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 410 of file veu.h.

Fract veuStats_s::send_noise_enr

Noise Energy in the SEND Direction.

Definition at line 412 of file veu.h.

Fract veuStats_s::send_avg_enr

Average Energy in the SEND Direction.

Definition at line 414 of file veu.h.

Fract veuStats_s::recv_gain

Gain that is being applied by the VEU to Send signal.

Definition at line 416 of file veu.h.

Fract veuStats_s::recv_noise_enr

Noise Energy in the RECV Direction.

Definition at line 418 of file veu.h.

Fract veuStats_s::recv_avg_enr

Average Energy in the RECV Direction.

Definition at line 420 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) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 /* ========================================================================== */
00076 /* System level header files */
00077 #include <ti/mas/types/types.h>
00078
00079 /* Memory management definitions */
00080 #include <ti/mas/util/ecomem.h>
00081
00082 /* debug */
00083 #include <ti/mas/util/debug.h>
00084
00093 /* @{ */
00094
00099 /* @{ */
00100
00105 #define veu_NOMEMORY  -1
00106
00111 #define veu_NOERR     0
00112
00118 #define veu_ERR_BAD_INST     1
00119
00124 #define veu_ERR_BAD_PARAM     2
00125
00130 #define veu_ERR_BAD_BUILD     3
00131
00132 /* @} */ /* ingroup VeuErrorCodes */
00133
00134
00141 /* @{ */
00142
00148 #define  veu_CTL_MODE            0
00149
00154 #define  veu_CTL_ANR_LEVEL       1
00155
00160 #define  veu_CTL_ALC_SEND_LEVEL  2
00161
00166 #define  veu_CTL_ALC_RECV_LEVEL  3
00167
00172 #define  veu_CTL_WAEPL          4
00173
00178 #define  veu_CTL_BULK_DELAY     5
00179
00184 #define  veu_CTL_FGC_SEND_GAIN  6
00185
00190 #define  veu_CTL_FGC_RECV_GAIN  7
00191
00192 /* @} */ /* ingroup */
00193
00194
00215 /* @{ */
00216 #define veu_CTLM_VEU          0x0001
00223 #define veu_CTLM_ANR_SEND     0x0002
00227 #define veu_CTLM_ANR_RECV     0x0004
00231 #define veu_CTLM_ALC_HLC_SEND 0x0008
00235 #define veu_CTLM_ALC_FGC_SEND 0x0010
00239 #define veu_CTLM_ALC_SEND     0x0020
00243 #define veu_CTLM_ALC_HLC_RECV 0x0040
00247 #define veu_CTLM_ALC_FGC_RECV 0x0080
00251 #define veu_CTLM_ALC_RECV     0x0100
00255 #define veu_CTLM_AEC          0x0200
00258 #define veu_CTLM_ALE          0x0400
00265 #define veu_CTLM_ALC_AGGRESS  0x0800
00269 #define veu_CTLM_TONE         0x1000
00272 #define veu_CTLM_WB_SEND      0x2000
00276 #define veu_CTLM_WB_RECV      0x4000
00280 /* @} */ /* ingroup */
00281
00289 /* @{ */
00290 #define veu_INFRAME_MINLENGTH      40
00291 #define veu_INFRAME_MAXLENGTH      80
00292 #define veu_INFRAME_LENGTHINC      40
00293 #define veu_INFRAME_MINLENGTH_5P5  44
00294 #define veu_INFRAME_MAXLENGTH_5P5  88
00295 #define veu_INFRAME_LENGTHINC_5P5  44
00296 /* @} */ /* ingroup */
00297
00305 typedef struct veuModeControl_s{
00306   tuint bit_masks;
00308   tuint bit_values;
00310 } veuModeControl_t;
00311
00316 typedef struct veuControl_s{
00319   tint  ctl_code;
00320   union {
00324     veuModeControl_t  mode_ctl;
00325
00330     tint  anr_level;
00331
00337     tint  alc_level;
00338
00345     tint  bulk_delay;
00346
00353     tint  waepl;
00354
00359     tint  fgc_gain;
00360
00361   } u;
00362 } veuControl_t;
00363
00368 typedef struct veuSizeConfig_s{
00369   tint  max_frame_size;
00370 } veuSizeConfig_t;
00371
00376 typedef struct veuNewConfig_s{
00377   void *handle;
00378 } veuNewConfig_t;
00379
00388 typedef struct veuConfig_s{
00389   tint  config_bitfield;
00392   tint  frame_size;
00394   tint  anr_level;
00395   tint  alc_send_level;
00396   tint  alc_recv_level;
00397   tint  bulk_delay;
00398   Fract waepl;
00399   Fract fgc_send_gain;
00400   Fract fgc_recv_gain;
00401 } veuConfig_t;
00402
00408 typedef struct veuStats_s{
00410   Fract  send_gain;
00412   Fract  send_noise_enr;
00414   Fract  send_avg_enr;
00416   Fract  recv_gain;
00418   Fract  recv_noise_enr;
00420   Fract  recv_avg_enr;
00421 } veuStats_t;
00422
00423
00428 typedef struct veuContext_s{
00430   dbgInfo_t exception;
00448   tint max_frame_size;
00449 } veuContext_t;
00450
00451 /* VEU context */
00452 extern veuContext_t veuContext;
00453
00458
00468 tint  veuGetSizes (tint *nbufs, ecomemBuffer_t **bufs, veuSizeConfig_t *cfg);
00469
00489 tint  veuNew (void **veuInst, tint nbufs, ecomemBuffer_t *bufs,
00490               veuNewConfig_t *cfg);
00491
00510 tint  veuOpen (void *veuInst, veuConfig_t *cfg);
00511
00529 tint  veuControl        (void *veuInst, veuControl_t *ctl);
00530
00541 tint  veuGetStats  (void *veuInst, veuStats_t *stats, tbool reset);
00542
00560 tint  veuRelocate (void **veuInst, tint nbufs, ecomemBuffer_t *bufs,
00561                    tuint *relocBufBitMaskPtr);
00562
00585 tint  veuSendIn     (void *veuInst, void *vsend_in, void *vrecv_in,
00586                      void *vsend_out, const tint *comp_table_ptr);
00587
00606 tint  veuReceiveIn (void *veuInst, void *speech_samples);
00607
00616 tint  veuClose (void *veuInst);
00617
00631 tint  veuDelete (void **veuInst, tint nbufs, ecomemBuffer_t *bufs);
00632  /* @name ECO APIs */
00634
00635 /* @} */ /* @ingroup VEU */
00636
00637 #endif /* _VEU_H */
00638 /* 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 95 of file veusim.c.

#define FRAME_SIZE 80

Definition at line 121 of file veusim.c.

Referenced by main().

#define MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)

Definition at line 124 of file veusim.c.

Referenced by main(), veusim_new_veu(), and veusim_write_frame().

#define INPUT_TX_LIST_BASE "../../"

Definition at line 132 of file veusim.c.

Referenced by veusim_open_filelist().

#define INPUT_FILE_BASE "../../vectors/inp/"

Definition at line 133 of file veusim.c.

Referenced by veusim_init_testvector().

#define OUTPUT_FILE_BASE "../../vectors/out/"

Definition at line 134 of file veusim.c.

Referenced by veusim_init_testvector().

#define INPUT_TX_LIST_FILE "inp_list_file_8k.txt"

Definition at line 141 of file veusim.c.

Referenced by veusim_open_filelist().

#define VEU_SIM_SAMPLES_PER_SECOND 8000

Definition at line 160 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 174 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 185 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 197 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 213 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 278 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 298 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 326 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 349 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 376 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 437 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 471 of file veusim.c.

References inputVEUFile, and inputVEUsetting.

Referenced by main().

void hw_init ( void )

Definition at line 568 of file veusim.c.

Referenced by main().

void veu_sim_progress ( tint frame_size )

Definition at line 620 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 635 of file veusim.c.

References FRAME_SIZE, hw_init(), inputFile, inputFile_Rx, inputTxlistFile, 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 145 of file veusim.c.

FILE* inputFile

Definition at line 148 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputFile_Rx

Definition at line 149 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* outputFile

Definition at line 150 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* outputFile_Rx

Definition at line 151 of file veusim.c.

Referenced by main(), veusim_init_testvector(), and veusim_release_testvector().

FILE* inputVEUFile

Definition at line 152 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 153 of file veusim.c.

Referenced by main(), veusim_get_file(), and veusim_open_filelist().

FILE * inputRxlistFile

Definition at line 153 of file veusim.c.

FILE * outputTxlistFile

Definition at line 153 of file veusim.c.

FILE* outputRxlistFile

Definition at line 154 of file veusim.c.

FILE * inputVEUlistFile

Definition at line 154 of file veusim.c.

char inputFileName_Tx[100]

Definition at line 155 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char inputFileName_Rx[100]

Definition at line 155 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char outputFileName_Tx[100]

Definition at line 155 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char outputFileName_Rx[100]

Definition at line 156 of file veusim.c.

Referenced by veusim_get_file(), and veusim_init_testvector().

char inputVEUsetting[100]

Definition at line 156 of file veusim.c.

Referenced by veusim_control_veu(), veusim_get_file(), and veusim_init_testvector().

char iofile_path[256]

Definition at line 157 of file veusim.c.

Referenced by veusim_concat_filepath().

tlong sample_cnt

Definition at line 161 of file veusim.c.

Referenced by main(), and veu_sim_progress().

tuint second_cnt

Definition at line 162 of file veusim.c.

Referenced by main(), and veu_sim_progress().

void* veuInst

Definition at line 165 of file veusim.c.

Referenced by main(), veusim_new_veu(), and veusim_open_veu().

veuControl_t veuCtrl

Definition at line 167 of file veusim.c.

Referenced by main().

veuContext_t veuContext

Definition at line 612 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. 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 V5 (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 5.2 (Eclipse).

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

Dependent Packages

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


VEU Test: Module Index

VEU Test Modules

Here is a list of all modules:
  • VEUTEST


VEU Test: Page Index

VEU Test Related Pages

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


VEU Test: veusim.c File Reference

  • File List
  • Globals

veusim.c File Reference

Detailed Description

Main program and supporting routines for the simulation of VEU.

(C) Copyright 2009, Texas Instruments, Inc.

Definition in file veusim.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/const.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/veu/veu.h>
#include <ti/mas/veu/test/src/veusim.h>
#include <ti/mas/veu/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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00006  *
00007  *              All rights reserved not granted herein.
00008  *
00009  *                         Limited License.
00010  *
00011  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00012  *  non-exclusive license under copyrights and patents it now or hereafter owns
00013  *  or controls to make, have made, use, import, offer to sell and sell
00014  *  ("Utilize") this software subject to the terms herein.  With respect to the
00015  *  foregoing patent license, such license is granted solely to the extent that
00016  *  any such patent is necessary to Utilize the software alone.  The patent
00017  *  license shall not apply to any combinations which include this software,
00018  *  other than combinations with devices manufactured by or for TI (“TI
00019  *  Devices”).  No hardware patent is licensed hereunder.
00020  *
00021  *  Redistributions must preserve existing copyright notices and reproduce this
00022  *  license (including the above copyright notice and the disclaimer and (if
00023  *  applicable) source code license limitations below) in the documentation
00024  *  and/or other materials provided with the distribution
00025  *
00026  *  Redistribution and use in binary form, without modification, are permitted
00027  *  provided that the following conditions are met:
00028  *
00029  *    *  No reverse engineering, decompilation, or disassembly of this software
00030  *  is permitted with respect to any software provided in binary form.
00031  *
00032  *    *  any redistribution and use are licensed by TI for use only with TI
00033  *  Devices.
00034  *
00035  *    *  Nothing shall obligate TI to provide you with source code for the
00036  *  software licensed and provided to you in object code.
00037  *
00038  *  If software source code is provided to you, modification and redistribution
00039  *  of the source code are permitted provided that the following conditions are
00040  *  met:
00041  *
00042  *    *  any redistribution and use of the source code, including any resulting
00043  *  derivative works, are licensed by TI for use only with TI Devices.
00044  *
00045  *    *  any redistribution and use of any object code compiled from the source
00046  *  code and any resulting derivative works, are licensed by TI for use only
00047  *  with TI Devices.
00048  *
00049  *  Neither the name of Texas Instruments Incorporated nor the names of its
00050  *  suppliers may be used to endorse or promote products derived from this
00051  *  software without specific prior written permission.
00052  *
00053  *  DISCLAIMER.
00054  *
00055  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00056  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00057  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00058  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00059  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00060  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00061  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00062  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00063  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00064  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00065  *  DAMAGE.
00066 *****************************************************************************/
00077 /* @{ */
00078
00079 #include <stdio.h>
00080 #include <stdlib.h>
00081 #include <string.h>
00082
00083 #include <ti/mas/types/const.h>
00084 #include <ti/mas/types/types.h>
00085 #include <ti/mas/util/ecomem.h>
00086 #include <ti/mas/fract/fract.h>
00087 #include <ti/mas/util/utl.h>
00088
00089 #include <ti/mas/veu/veu.h>
00090 #include <ti/mas/veu/test/src/veusim.h>
00091 #include <ti/mas/veu/test/src/veusimport.h>
00092
00093 #include <ti/mas/veu/Version.h>
00094
00095 #define loop for(;;)
00096
00097 #ifdef USE_CACHE
00098 #include <ti/mas/sdk/memArchCfg.h>
00099 #endif
00100
00101 #ifdef PROFILE_CYCLES
00102 #include <ti/mas/sdk/profile.h>
00103 tlong     cyclesOverhead;
00105 typedef struct cycles_s {
00106   tlong     max;
00107   tlong     avg;
00108 } cycles_t;
00109
00110 cycles_t  cyclesVeuSendIn;
00111 cycles_t  cyclesVeuReceiveIn;
00112 #endif
00113
00114
00115
00116 /* the FRAME_SIZE is always set for the frame size used for narrowband(Fs=8KHz)
00117     signals. For example, the bit_values 80 means 10ms for narrowband input. Once
00118     wideband operation is specified, it will be automatically adjusted to
00119     160-sample (same 10ms in wideband) by either veuOpen() or veuControl();
00120     Please see function veusim_open_veu() in this wrapper as an example.*/
00121 #define FRAME_SIZE              80
00122
00123 /* allocate enough memory for wideband operation */
00124 #define MAX_NUM_SAMPLES_PER_FRAME (veu_INFRAME_MAXLENGTH*2)
00125
00126 /* Handle CCS Project paths */
00127 #ifdef __CCS_PROJECT_REL_PATH
00128 #define INPUT_TX_LIST_BASE    "../../../"
00129 #define INPUT_FILE_BASE       "../../../vectors/inp/"
00130 #define OUTPUT_FILE_BASE      "../../../vectors/out/"
00131 #else
00132 #define INPUT_TX_LIST_BASE    "../../"
00133 #define INPUT_FILE_BASE       "../../vectors/inp/"
00134 #define OUTPUT_FILE_BASE      "../../vectors/out/"
00135 #endif
00136
00137 /* Define name of the file which contains list of files to be processed */
00138 #ifdef veu_WB_COMPILER
00139 #define INPUT_TX_LIST_FILE "inp_list_file_16k.txt"
00140 #else
00141 #define INPUT_TX_LIST_FILE "inp_list_file_8k.txt"
00142 #endif
00143
00144
00145 tword heapBuf[VEUSIM_HEAP_SIZE];
00146
00147 /* Input & output files */
00148 FILE *inputFile;
00149 FILE *inputFile_Rx;
00150 FILE *outputFile;
00151 FILE *outputFile_Rx;
00152 FILE *inputVEUFile;
00153 FILE *inputTxlistFile, *inputRxlistFile, *outputTxlistFile;
00154 FILE *outputRxlistFile, *inputVEUlistFile;
00155 char inputFileName_Tx[100], inputFileName_Rx[100], outputFileName_Tx[100];
00156 char outputFileName_Rx[100], inputVEUsetting[100];
00157 char iofile_path[256];
00158
00159 /* Progress reporting */
00160 #define VEU_SIM_SAMPLES_PER_SECOND  8000
00161 tlong sample_cnt;
00162 tuint second_cnt;
00163
00164 /* veu related parameters */
00165 void *veuInst;
00166
00167 veuControl_t veuCtrl;
00168
00169 /* File reading parameters */
00174 char *veusim_concat_filepath (char *base, char *fname)
00175 {
00176   strcpy (iofile_path, base);
00177   strcat (iofile_path, fname);
00178   return (iofile_path);
00179 }
00180
00185 void veusim_open_filelist ()
00186 {
00187   char *list_fptr;
00188
00189   list_fptr = veusim_concat_filepath (INPUT_TX_LIST_BASE, INPUT_TX_LIST_FILE);
00190   inputTxlistFile = fopen (list_fptr, "r");
00191 }
00192
00197 void veusim_get_file ()
00198 {
00199   fscanf (inputTxlistFile, "%s", inputFileName_Tx);
00200   fscanf (inputTxlistFile, "%s", inputFileName_Rx);
00201   fscanf (inputTxlistFile, "%s", outputFileName_Tx);
00202   fscanf (inputTxlistFile, "%s", outputFileName_Rx);
00203   fscanf (inputTxlistFile, "%s", inputVEUsetting);
00204 }
00205
00213 void veusim_init_testvector ()
00214 {
00215   char *fpath_ptr;
00216
00217   /* open Tx(Sin) input files */
00218   fpath_ptr = veusim_concat_filepath (INPUT_FILE_BASE, inputFileName_Tx);
00219   inputFile = fopen (fpath_ptr, "rb");
00220   if (inputFile != NULL) {
00221     printf ("input file %s is opened!\n", inputFileName_Tx);
00222   }
00223   else {
00224     printf ("File Open Error %s\n",inputFileName_Tx);
00225     exit (1);
00226   }
00227
00228   /* open Rx(Rin) input files */
00229   fpath_ptr = veusim_concat_filepath (INPUT_FILE_BASE, inputFileName_Rx);
00230   inputFile_Rx = fopen (fpath_ptr, "rb");
00231   if (inputFile_Rx != NULL) {
00232     printf ("input file %s is opened!\n", inputFileName_Rx);
00233   }
00234   else {
00235     printf ("File Open Error %s\n",inputFileName_Rx);
00236     exit (1);
00237   }
00238
00239   /* open Tx(Sout) output files */
00240   fpath_ptr = veusim_concat_filepath (OUTPUT_FILE_BASE, outputFileName_Tx);
00241   outputFile = fopen (fpath_ptr,"wb");
00242   if (outputFile!= NULL) {
00243     printf ("output file %s is opened!\n", outputFileName_Tx);
00244   }
00245   else {
00246     printf ("File Open Error %s\n",outputFileName_Tx);
00247     exit (1);
00248   }
00249
00250   /* open Rx(Rout) output files */
00251   fpath_ptr = veusim_concat_filepath (OUTPUT_FILE_BASE, outputFileName_Rx);
00252   outputFile_Rx = fopen (fpath_ptr,"wb");
00253   if (outputFile_Rx!= NULL) {
00254     printf ("output file %s is opened!\n", outputFileName_Rx);
00255   }
00256   else {
00257     printf ("File Open Error %s\n",outputFileName_Rx);
00258     exit (1);
00259   }
00260
00261   /* open veu setting file */
00262   fpath_ptr = veusim_concat_filepath (INPUT_FILE_BASE, inputVEUsetting);
00263   inputVEUFile = fopen (fpath_ptr, "rb");
00264   if (inputVEUFile!= NULL) {
00265     printf ("veu setting file %s is opened!\n", inputVEUsetting);
00266   }
00267   else {
00268     printf ("File Open Error %s\n",inputVEUsetting);
00269     exit (1);
00270   }
00271 } /* veusim_init_testvector */
00272
00273
00278 void veusim_release_testvector ()
00279 {
00280   fclose (inputFile);
00281   fclose (inputFile_Rx);
00282   fclose (outputFile);
00283   fclose (outputFile_Rx);
00284   fclose (inputVEUFile);
00285 } /* veusim_release_testvector */
00286
00287
00298 tint veusim_read_frame (linSample *inBuf, FILE *inFile, tint frmSize)
00299 {
00300   int i;
00301
00302   if (inFile) {
00303     for (i = 0; i < frmSize; i++) {
00304       int lsb, msb;
00305       lsb = fgetc(inFile);
00306       msb = fgetc(inFile);
00307       inBuf[i] = (linSample)((msb << 8) | lsb);
00308     }
00309
00310     if (feof(inFile)) return (0);
00311   }
00312   return (1);
00313 }
00314
00315
00326 tint veusim_write_frame (tint *outBuf, FILE *outFile, tint frmSize)
00327 {
00328   int k;
00329   tword buf[2*MAX_NUM_SAMPLES_PER_FRAME];
00330
00331   if (outFile) {
00332     for (k = 0; k < frmSize; k++) {
00333       buf[2*k+0] = (outBuf[k] >> 0) & 0xff;
00334       buf[2*k+1] = (outBuf[k] >> 8) & 0xff;
00335     }
00336
00337     fwrite (buf, sizeof(tword), 2*frmSize, outFile);
00338   }
00339
00340   return (1);
00341 }
00342
00343
00349 void veusim_get_frame_size(tint *frmSize)
00350 {
00351   /* for frame size setting at sample unit (sampled at 8KHz) */
00352   veu_fileio_read_int (inputVEUFile, "%d\n", frmSize);
00353   if ((*frmSize<veu_INFRAME_MINLENGTH) || (*frmSize>veu_INFRAME_MAXLENGTH)) {
00354     printf ("Frame Size Error: frame size should be between 5 to 30ms");
00355     exit (1);
00356   }
00357
00358   /* for frame size setting at ms unit */
00359   /*
00360   fscanf(inputVEUFile, "%d", frmSize);
00361   if ((*frmSize<5) || (*frmSize>30)) {
00362     printf ("Frame Size Error: frame size should be between 5 to 30ms");
00363     exit (1);
00364   }
00365
00366   *frmSize *= 8; // default sample rate is 8KHz
00367   */
00368 }
00369
00376 void veusim_new_veu ()
00377 {
00378   int i;
00379   tint stat, veuNbufs;
00380
00381   ecomemBuffer_t *bufs;
00382   ecomemBuffer_t *veuBufs;
00383   veuSizeConfig_t veuCfgSize;
00384   veuNewConfig_t  veuCfgNew;
00385
00386   /* VEU get sizes */
00387   veuCfgSize.max_frame_size = MAX_NUM_SAMPLES_PER_FRAME;
00388   stat = veuGetSizes (&veuNbufs, &bufs, &veuCfgSize);
00389   if (stat != veu_NOERR) {
00390     printf ("Error in veuGetSizes !");
00391     exit (1);
00392   }
00393
00394   /* Allocate veu memory buffer descriptors & increment auxiliary heap size */
00395   veuBufs = (ecomemBuffer_t*) malloc (veuNbufs * sizeof(ecomemBuffer_t));
00396
00397   /* Allocate veu memory buffers & increment veu heap size. Data from the (global)
00398      variable veuBufs is copied into the (local) variable veuLocalBufs in order to
00399      correctly set veuLocalBufs' size parameter */
00400
00401   /* assume all buffers are in external memory, no alignment requests */
00402   /* NOTE: This is not true for target platform!!! */
00403   printf ("VEU memory buffers:\n");
00404   printf ("    Buffer    Size(twords)    Alignment    Volatile\n");
00405   for (i = 0; i < veuNbufs; i++) {
00406     veuBufs[i]             = bufs[i];
00407     veuBufs[i].mclass      = ecomem_CLASS_EXTERNAL;
00408     veuBufs[i].log2align   = 0;
00409     veuBufs[i].volat       = FALSE;
00410     veuBufs[i].base        = (bufs[i].size)? malloc(bufs[i].size): NULL ;
00411
00412     printf ("     %3d       %7d         %4d       ",
00413                  i, (int)bufs[i].size, (int)bufs[i].log2align);
00414     if(bufs[i].volat)
00415       printf ("    yes\n");
00416     else
00417       printf ("    no\n");
00418   }
00419
00420   veuCfgNew.handle = NULL;
00421   veuInst = NULL;
00422   stat = veuNew ((void **)&veuInst, veuNbufs, veuBufs, &veuCfgNew);
00423   if (stat != veu_NOERR) {
00424     printf ("Error in veuNew %d !", stat);
00425     exit (1);
00426   }
00427
00428   printf ("veu instance is created successfully\n");
00429 } /* veusim_new_veu */
00430
00437 void veusim_open_veu (tint frame_size)
00438 {
00439   veuConfig_t veuConfig;
00440   tint veu_ret; /* for veu return value */
00441
00442   /* Initialize config params */
00443
00444   veuConfig.frame_size      = frame_size;
00445   veuConfig.config_bitfield = veu_CTLM_VEU;
00446   veuConfig.anr_level       = 12;   /* set ANR max attenuation to 12dB */
00447   veuConfig.alc_send_level  = -15;  /* set ALC target level to -15dBm0 in Send path*/
00448   veuConfig.alc_recv_level  = -15;  /* set ALC target level to -15dBm0 in Recv path*/
00449   veuConfig.bulk_delay      = 162;  /* set bulk delay to 162ms */
00450   veuConfig.waepl           = 36;   /* set WAEPL to 36dB */
00451   veuConfig.fgc_send_gain   = 0;    /* set FGC gain to 0dB in Send path */
00452   veuConfig.fgc_recv_gain   = 0;    /* set FGC gain to 0dB in Recv path */
00453
00454   /* Open VEU Instance */
00455   veu_ret = veuOpen(veuInst, &veuConfig);
00456
00457   /* In veu simulation, */
00458   if (veu_ret == veu_ERR_BAD_INST) {
00459     printf ("Error in open a VEU instance !\n");
00460     exit (1);
00461   }
00462 } /* veusim_open_veu */
00463
00464
00471 void veusim_control_veu (void *veuInst, veuControl_t *ctl, tint *frmSize_send,
00472                          tint *frmSize_recv)
00473 {
00474   tint ctrl_code, u_value, mode_mask, mode_value, num_read;
00475   tint veu_ret; /* for veu return value */
00476
00477   while (!feof(inputVEUFile)) {
00478     num_read = veu_fileio_read_int (inputVEUFile, "%d\n", &ctrl_code);
00479     if (num_read > 0) {
00480       ctl->ctl_code = ctrl_code;
00481       if (ctrl_code == veu_CTL_MODE) {
00482         num_read  = veu_fileio_read_int (inputVEUFile, "%x\n", &mode_mask);
00483         num_read += veu_fileio_read_int (inputVEUFile, "%x\n", &mode_value);
00484         if (num_read > 0) {
00485           ctl->u.mode_ctl.bit_masks = mode_mask;
00486           ctl->u.mode_ctl.bit_values = mode_value;
00487           veu_ret = veuControl(veuInst, ctl);
00488           if (veu_ret == veu_ERR_BAD_INST) {
00489             printf ("Error: The VEU instance is not open!\n");
00490             exit (1);
00491           }
00492           else if (veu_ret == veu_ERR_BAD_PARAM) {
00493             printf ("Warning: Invalid VEU configuration parameters!\n");
00494           }
00495           else if (veu_ret == veu_ERR_BAD_BUILD) {
00496             printf ("Error: Incompatible build! ");
00497             printf ("Can't run wideband operation in narrowband build.\n");
00498             exit (1);
00499           }
00500           /* adjust frame_size in Send and Recv Path, the code is for
00501               simulation only. The codes need to modify is this
00502               function is called during a test-vector is running */
00503           if ((mode_mask&veu_CTLM_WB_SEND) && (mode_value&veu_CTLM_WB_SEND)) {
00504             (*frmSize_send) <<= 1;
00505           }
00506           if ((mode_mask&veu_CTLM_WB_RECV) && (mode_value&veu_CTLM_WB_RECV)) {
00507             (*frmSize_recv) <<= 1;
00508           }
00509         }
00510         else {
00511           printf ("Error in veu setting file: %s", inputVEUsetting);
00512           exit (1);
00513         }
00514       }
00515       else {
00516         num_read = veu_fileio_read_int (inputVEUFile, "%d\n", &u_value);
00517         if (num_read > 0) {
00518           switch (ctl->ctl_code) {
00519             case veu_CTL_ANR_LEVEL:
00520                 ctl->u.anr_level = u_value;
00521                 break;
00522             case veu_CTL_ALC_SEND_LEVEL:
00523                 ctl->u.alc_level = u_value;
00524                 break;
00525             case veu_CTL_ALC_RECV_LEVEL:
00526                 ctl->u.alc_level = u_value;
00527                 break;
00528             case veu_CTL_WAEPL:
00529                 ctl->u.waepl = u_value;
00530                 break;
00531             case veu_CTL_BULK_DELAY:
00532                 ctl->u.bulk_delay = u_value;
00533                 break;
00534             case veu_CTL_FGC_SEND_GAIN:
00535                 ctl->u.fgc_gain = u_value;
00536                 break;
00537             case veu_CTL_FGC_RECV_GAIN:
00538                 ctl->u.fgc_gain = u_value;
00539                 break;
00540             default:
00541                 printf ("Error in veu setting file: %s", inputVEUsetting);
00542                 exit (1);
00543                 break;
00544           }
00545           veu_ret = veuControl(veuInst, ctl);
00546           if (veu_ret == veu_ERR_BAD_INST) {
00547             printf ("Error: The VEU instance is not open!\n");
00548             exit (1);
00549           }
00550           else if (veu_ret == veu_ERR_BAD_PARAM) {
00551             printf ("Warning: Invalid VEU configuration parameters!\n");
00552           }
00553         }
00554         else {
00555           printf ("Error in veu setting file: %s", inputVEUsetting);
00556           exit (1);
00557         }
00558       }
00559     }
00560     else {
00561       printf ("Error in veu setting file: %s", inputVEUsetting);
00562       exit (1);
00563     }
00564   }
00565 } /* veusim_control_veu */
00566
00567
00568 void hw_init(void)
00569 {
00570  #ifdef PROFILE_CYCLES
00571   if (!profile_initCycleProfiling()) {
00572     printf ("Could not acquire profiling resources..Exiting\n");
00573     exit (0);
00574   }
00575   /* Initialize the Stats */
00576   cyclesVeuSendIn.avg    = 0;
00577   cyclesVeuSendIn.max    = 0;
00578   cyclesVeuReceiveIn.avg = 0;
00579   cyclesVeuReceiveIn.max = 0;
00580  #endif
00581
00582  #ifdef USE_CACHE
00583    memarchcfg_cacheEnable ();
00584  #endif
00585 }
00586
00587 #ifdef PROFILE_CYCLES
00588 static inline void siu_print_cycles_util (cycles_t * cyclesPtr, char *name,
00589                                          tlong overhead)
00590 {
00591   printf ("%s MaxCycles = %ld AvgCycles = %ld\n", name,
00592          (long) cyclesPtr->max - (long) overhead,
00593          (long) cyclesPtr->avg - (long) overhead);
00594 }
00595
00596 void siu_print_cycles (void)
00597 {
00598   siu_print_cycles_util (&cyclesVeuSendIn, "VEU Send IN", cyclesOverhead);
00599   siu_print_cycles_util (&cyclesVeuReceiveIn, "VEU Receive In", cyclesOverhead);
00600 }
00601
00602 static inline void siu_process_cycles (tlong cycles, cycles_t * cyclesPtr)
00603 {
00604   if (cycles > cyclesPtr->max) {
00605     cyclesPtr->max = cycles;
00606   }
00607
00608   cyclesPtr->avg = ((cyclesPtr->avg) * 255 + cycles) >> 8;
00609 }
00610 #endif
00611
00612 veuContext_t veuContext;
00613
00614
00615 /*-----------------------------------------------------------------
00616  * Function:  veu_sim_progress
00617  *
00618  * Description: Update sample counters
00619  *-----------------------------------------------------------------*/
00620 void veu_sim_progress (tint frame_size)
00621 {
00622   /* Update sample counter */
00623   sample_cnt += frame_size;
00624   if (sample_cnt >= (second_cnt + 1) * VEU_SIM_SAMPLES_PER_SECOND) {
00625     second_cnt++;
00626     fprintf (stdout, " - Progress: %d seconds\n", second_cnt);
00627   }
00628 }
00629
00630
00635 void main (void)
00636 {
00637   tint read_flag_Tx, read_flag_Rx;
00638   tint inBufRx[MAX_NUM_SAMPLES_PER_FRAME];
00639   tint inBufTx[MAX_NUM_SAMPLES_PER_FRAME];
00640   tint outBufTx[MAX_NUM_SAMPLES_PER_FRAME];
00641   tint frmSize = FRAME_SIZE;
00642   tint frmSize_send, frmSize_recv;
00643   tint frame_counter = 0;
00644   #ifdef PROFILE_CYCLES
00645   volatile tlong cycles;
00646   #endif
00647   veuInst = NULL;
00648
00649   printf ("Version Information of modules tested:\n");
00650   printf ("VEU %d.%d.%d.%d\n",
00651         ti_mas_veu_Version_MAJOR, ti_mas_veu_Version_MINOR,
00652         ti_mas_veu_Version_PATCH, ti_mas_veu_Version_BUILD);
00653
00654   hw_init ();
00655
00656   #ifdef PROFILE_CYCLES
00657   cycles = profile_getCPUcycleCount ();
00658
00659   cycles = (profile_getCPUcycleCount () - cycles);
00660   cyclesOverhead = cycles;
00661   #endif
00662
00663   /* create a new veu instance */
00664   veusim_new_veu ();
00665
00666   veuContext.max_frame_size = 160;
00667
00668   veusim_open_filelist ();
00669
00670   while (!feof(inputTxlistFile)) {
00671     /* get input file list */
00672     veusim_get_file ();
00673
00674     /* open test-vectors and veu setting file */
00675     veusim_init_testvector ();
00676
00677     /* read frame size */
00678     veusim_get_frame_size (&frmSize);
00679
00680     /* set veu instance to be ready */
00681     veusim_open_veu (frmSize);
00682
00683     /* setup parameters for veu instance */
00684     frmSize_send = frmSize;
00685     frmSize_recv = frmSize;
00686     veusim_control_veu (veuInst, &veuCtrl, &frmSize_send, &frmSize_recv);
00687
00688     /* Reset progress reporting */
00689     sample_cnt = 0L;
00690     second_cnt = 0;
00691
00692     /* process the test-vectors */
00693     while (!feof(inputFile)) {
00694       /* write singals from files */
00695       read_flag_Tx = veusim_read_frame (inBufTx, inputFile,    frmSize_send);
00696       read_flag_Rx = veusim_read_frame (inBufRx, inputFile_Rx, frmSize_recv);
00697
00698       if (read_flag_Tx && read_flag_Rx) {
00699         frame_counter++;
00700         #ifdef USE_CACHE
00701         memarchcfg_cacheFlush ();
00702         #endif
00703         #ifdef PROFILE_CYCLES
00704         cycles = profile_getCPUcycleCount ();
00705         #endif
00706         #ifdef USE_CACHE
00707         memarchcfg_cacheFlush ();
00708         #endif
00709         #ifdef PROFILE_CYCLES
00710         cycles = profile_getCPUcycleCount ();
00711         #endif
00712
00713         /* process rin signals */
00714         veuReceiveIn (veuInst, inBufRx);
00715
00716         #ifdef PROFILE_CYCLES
00717         cycles = (profile_getCPUcycleCount () - cycles);
00718         siu_process_cycles (cycles, &cyclesVeuReceiveIn);
00719         #endif
00720
00721         #ifdef USE_CACHE
00722         memarchcfg_cacheFlush ();
00723         #endif
00724
00725         #ifdef PROFILE_CYCLES
00726         cycles = profile_getCPUcycleCount ();
00727         #endif
00728
00729         /* process sin signals */
00730         veuSendIn (veuInst, inBufTx, inBufRx, outBufTx, NULL);
00731
00732         #ifdef PROFILE_CYCLES
00733         cycles = (profile_getCPUcycleCount () - cycles);
00734         siu_process_cycles (cycles, &cyclesVeuSendIn);
00735         #endif
00736
00737         /* write outputs to files */
00738         veusim_write_frame (outBufTx, outputFile, frmSize_send);
00739         veusim_write_frame (inBufRx, outputFile_Rx, frmSize_recv);
00740
00741         /* Sample count and Breakpoint check */
00742         veu_sim_progress (frmSize);
00743       } /* if */
00744     } /* while */
00745
00746     /* close veu instance */
00747     veuClose (veuInst);
00748
00749     /* close test-vectors */
00750     veusim_release_testvector ();
00751     #ifdef PROFILE_CYCLES
00752     siu_print_cycles ();
00753     profile_closeCycleProfiling ();
00754     #endif
00755
00756     #ifdef PROFILE_CYCLES
00757     siu_print_cycles ();
00758     profile_closeCycleProfiling ();
00759     #endif
00760   }
00761
00762   /* Loop */
00763   printf ("\n\nSimulation Complete\n\n");
00764
00765 } /* main */
00766 /* @} */ /* ingroup */
00767 /* 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 74 of file veusim.h.

#define VEUSIM_HEAP_SIZE 2048

Definition at line 75 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *
00012  *              All rights reserved not granted herein.
00013  *
00014  *                         Limited License.
00015  *
00016  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00017  *  non-exclusive license under copyrights and patents it now or hereafter owns
00018  *  or controls to make, have made, use, import, offer to sell and sell
00019  *  ("Utilize") this software subject to the terms herein.  With respect to the
00020  *  foregoing patent license, such license is granted solely to the extent that
00021  *  any such patent is necessary to Utilize the software alone.  The patent
00022  *  license shall not apply to any combinations which include this software,
00023  *  other than combinations with devices manufactured by or for TI (“TI
00024  *  Devices”).  No hardware patent is licensed hereunder.
00025  *
00026  *  Redistributions must preserve existing copyright notices and reproduce this
00027  *  license (including the above copyright notice and the disclaimer and (if
00028  *  applicable) source code license limitations below) in the documentation
00029  *  and/or other materials provided with the distribution
00030  *
00031  *  Redistribution and use in binary form, without modification, are permitted
00032  *  provided that the following conditions are met:
00033  *
00034  *    *  No reverse engineering, decompilation, or disassembly of this software
00035  *  is permitted with respect to any software provided in binary form.
00036  *
00037  *    *  any redistribution and use are licensed by TI for use only with TI
00038  *  Devices.
00039  *
00040  *    *  Nothing shall obligate TI to provide you with source code for the
00041  *  software licensed and provided to you in object code.
00042  *
00043  *  If software source code is provided to you, modification and redistribution
00044  *  of the source code are permitted provided that the following conditions are
00045  *  met:
00046  *
00047  *    *  any redistribution and use of the source code, including any resulting
00048  *  derivative works, are licensed by TI for use only with TI Devices.
00049  *
00050  *    *  any redistribution and use of any object code compiled from the source
00051  *  code and any resulting derivative works, are licensed by TI for use only
00052  *  with TI Devices.
00053  *
00054  *  Neither the name of Texas Instruments Incorporated nor the names of its
00055  *  suppliers may be used to endorse or promote products derived from this
00056  *  software without specific prior written permission.
00057  *
00058  *  DISCLAIMER.
00059  *
00060  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00061  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00062  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00063  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00064  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00065  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00066  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00067  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00068  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00069  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00070  *  DAMAGE.
00071  *****************************************************************************/
00072
00073
00074 #define NUMBER_OF_FRAMES       1       /* # of frames to save */
00075 #define VEUSIM_HEAP_SIZE    2048
00076
00077 /******************************************************************************
00078  * FUNCTION PURPOSE: Initialize test vectors settings
00079  ******************************************************************************
00080  * DESCRIPTION:
00081  *
00082  * CALLING FORMAT:
00083  *   veusim_init_testvector (tint file_id)
00084  *
00085  * RETURN VALUE:
00086  *   None
00087  *
00088  *****************************************************************************/
00089 void veusim_init_testvector ();
00090
00091 /******************************************************************************
00092  * FUNCTION PURPOSE: release test vectors / close file handles
00093  ******************************************************************************
00094  * DESCRIPTION:
00095  *
00096  * CALLING FORMAT:
00097  *   veusim_release_testvector()
00098  *
00099  * RETURN VALUE:
00100  *   None
00101  *
00102  *****************************************************************************/
00103 void veusim_release_testvector ();
00104
00105 /******************************************************************************
00106  * FUNCTION PURPOSE: Read a Tx frame
00107  ******************************************************************************
00108  * DESCRIPTION:
00109  *
00110  * CALLING FORMAT:
00111  *   tint veusim_read_frame (tint *inBuf, FILE *inFile, tint frmSize)
00112  *
00113  * RETURN VALUE:
00114  *   flag:   0 - end of file (error)
00115  *           1 - read successfully
00116  *
00117  *****************************************************************************/
00118 tint veusim_read_frame (tint *inBuf, FILE *inFile, tint frmSize);
00119
00120 /******************************************************************************
00121  * FUNCTION PURPOSE: create a veu instance
00122  ******************************************************************************
00123  * DESCRIPTION:
00124  *
00125  * CALLING FORMAT:
00126  *   void veusim_new_veu ()
00127  *
00128  * RETURN VALUE:
00129  *   None
00130  *
00131  *****************************************************************************/
00132 void veusim_new_veu ();
00133
00134
00135 /******************************************************************************
00136  * FUNCTION PURPOSE: create a veu instance
00137  ******************************************************************************
00138  * DESCRIPTION:
00139  *
00140  * CALLING FORMAT:
00141  *   void veusim_open_veu ()
00142  *
00143  * RETURN VALUE:
00144  *   None
00145  *
00146  *****************************************************************************/
00147 void veusim_open_veu (tint frame_size);
00148
00149 /******************************************************************************
00150  * FUNCTION PURPOSE: create a veu instance
00151  ******************************************************************************
00152  * DESCRIPTION:
00153  *
00154  * CALLING FORMAT:
00155  *   void veusim_open_veu ()
00156  *
00157  * RETURN VALUE:
00158  *   None
00159  *
00160  *****************************************************************************/
00161 void veusim_control_veu ();
00162
00163 /******************************************************************************
00164  * FUNCTION PURPOSE: setup the parameters of the veu instance for different tests
00165  ******************************************************************************
00166  * DESCRIPTION:
00167  *
00168  * CALLING FORMAT:
00169  *   void veusim_setup_veu ()
00170  *
00171  * RETURN VALUE:
00172  *   None
00173  *
00174  *****************************************************************************/
00175 void veusim_param_veu ();
00176
00177
00178
00179
00180
00181 #endif /* _VEUSIM_H */
00182 /* 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 77 of file veusimport.h.

#define _VEUSIMPORT_C64 0

Definition at line 83 of file veusimport.h.

#define _VEUSIMPORT_C64_BIG_ENDIAN 0

Definition at line 89 of file veusimport.h.

#define _VEUSIMPORT_C64P 0

Definition at line 95 of file veusimport.h.

#define _VEUSIMPORT_C64P_BIG_ENDIAN 0

Definition at line 101 of file veusimport.h.

#define _VEUSIMPORT_ELF_C64P 0

Definition at line 107 of file veusimport.h.

#define _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 0

Definition at line 113 of file veusimport.h.

#define _VEUSIMPORT_C66 0

Definition at line 119 of file veusimport.h.

#define _VEUSIMPORT_ELF_C66 0

Definition at line 125 of file veusimport.h.

#define _VEUSIMPORT_C66_BIG_ENDIAN 0

Definition at line 131 of file veusimport.h.

#define _VEUSIMPORT_ELF_C66_BIG_ENDIAN 0

Definition at line 137 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070 #ifndef _VEUSIMPORT_H
00071 #define _VEUSIMPORT_H
00072
00073
00074 #ifdef ti_targets_C55_large
00075 #define _VEUSIMPORT_C55L 1
00076 #else
00077 #define _VEUSIMPORT_C55L 0
00078 #endif
00079
00080 #ifdef ti_targets_C64
00081 #define _VEUSIMPORT_C64 1
00082 #else
00083 #define _VEUSIMPORT_C64 0
00084 #endif
00085
00086 #ifdef ti_targets_C64_big_endian
00087 #define _VEUSIMPORT_C64_BIG_ENDIAN 1
00088 #else
00089 #define _VEUSIMPORT_C64_BIG_ENDIAN 0
00090 #endif
00091
00092 #ifdef ti_targets_C64P
00093 #define _VEUSIMPORT_C64P 1
00094 #else
00095 #define _VEUSIMPORT_C64P 0
00096 #endif
00097
00098 #ifdef ti_targets_C64P_big_endian
00099 #define _VEUSIMPORT_C64P_BIG_ENDIAN 1
00100 #else
00101 #define _VEUSIMPORT_C64P_BIG_ENDIAN 0
00102 #endif
00103
00104 #ifdef ti_targets_elf_C64P
00105 #define _VEUSIMPORT_ELF_C64P 1
00106 #else
00107 #define _VEUSIMPORT_ELF_C64P 0
00108 #endif
00109
00110 #ifdef ti_targets_elf_C64P_big_endian
00111 #define _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 1
00112 #else
00113 #define _VEUSIMPORT_ELF_C64P_BIG_ENDIAN 0
00114 #endif
00115
00116 #ifdef ti_targets_C66
00117 #define _VEUSIMPORT_C66 1
00118 #else
00119 #define _VEUSIMPORT_C66 0
00120 #endif
00121
00122 #ifdef ti_targets_elf_C66
00123 #define _VEUSIMPORT_ELF_C66 1
00124 #else
00125 #define _VEUSIMPORT_ELF_C66 0
00126 #endif
00127
00128 #ifdef ti_targets_C66_big_endian
00129 #define _VEUSIMPORT_C66_BIG_ENDIAN 1
00130 #else
00131 #define _VEUSIMPORT_C66_BIG_ENDIAN 0
00132 #endif
00133
00134 #ifdef ti_targets_elf_C66_big_endian
00135 #define _VEUSIMPORT_ELF_C66_BIG_ENDIAN 1
00136 #else
00137 #define _VEUSIMPORT_ELF_C66_BIG_ENDIAN 0
00138 #endif
00139
00140
00141 #if   (_VEUSIMPORT_C55L)
00142 /* C55x definitions and macros */
00143
00144 static inline tint veu_fileio_read_int (FILE *fp, char *fmt, tint *value)
00145 {
00146   tint num_read;
00147   num_read = fscanf (fp, fmt, value);
00148   return (num_read);
00149 }
00150
00151 #elif (_VEUSIMPORT_C64       || _VEUSIMPORT_C64_BIG_ENDIAN      || \
00152        _VEUSIMPORT_C64P      || _VEUSIMPORT_C64P_BIG_ENDIAN     || \
00153        _VEUSIMPORT_ELF_C64P  || _VEUSIMPORT_ELF_C64P_BIG_ENDIAN || \
00154        _VEUSIMPORT_C66       || _VEUSIMPORT_C66_BIG_ENDIAN      || \
00155        _VEUSIMPORT_ELF_C66   || _VEUSIMPORT_ELF_C66_BIG_ENDIAN)
00156 /* C64x/C64x+/C66x definitions and macros */
00157
00158 static inline tint veu_fileio_read_int (FILE *fp, char *fmt, tint *value)
00159 {
00160   tlong read_value;
00161   tint num_read;
00162   num_read = fscanf (fp, fmt, &read_value);
00163   *value = (tint) read_value;
00164   return (num_read);
00165 }
00166
00167 #else
00168 #error invalid target
00169 #endif
00170
00171 #endif /* _VEUSIMPORT_H */
00172
00173 /* 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 (6)
#define | ti_mas_vpe_Version_XVERTICAL (0)
#define | ti_mas_vpe_Version_PATCH (0)
#define | ti_mas_vpe_Version_BUILD (0)
#define | ti_mas_vpe_Version_QUALITY (3)
#define | ti_mas_vpe_Version_BTYPE (0)
#define | ti_mas_vpe_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_vpe_Version_MAJOR
#define | Version_MINOR ti_mas_vpe_Version_MINOR
#define | Version_XVERTICAL ti_mas_vpe_Version_XVERTICAL
#define | Version_PATCH ti_mas_vpe_Version_PATCH
#define | Version_BUILD ti_mas_vpe_Version_BUILD
#define | Version_QUALITY ti_mas_vpe_Version_QUALITY
#define | Version_BTYPE ti_mas_vpe_Version_BTYPE
#define | Version_WIDTH ti_mas_vpe_Version_WIDTH

Define Documentation

#define ti_mas_vpe_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_vpe_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_vpe_Version_MAJOR (3)

Definition at line 50 of file Version.h.

#define ti_mas_vpe_Version_MINOR (6)

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

Definition at line 62 of file Version.h.

#define ti_mas_vpe_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_vpe_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_vpe_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_vpe_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_vpe_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_vpe_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_vpe_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_vpe_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_vpe_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_vpe_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_vpe_Version_WIDTH

Definition at line 97 of file Version.h.


VPE: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_vpe_Version__include
00023 #define ti_mas_vpe_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_vpe_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_vpe_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_vpe_Version_MAJOR (3)
00051
00052 /* MINOR */
00053 #define ti_mas_vpe_Version_MINOR (6)
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 (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_vpe_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_vpe_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_vpe_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_vpe_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_vpe_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_vpe_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_vpe_Version_MAJOR
00091 #define Version_MINOR      ti_mas_vpe_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_vpe_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_vpe_Version_PATCH
00094 #define Version_BUILD      ti_mas_vpe_Version_BUILD
00095 #define Version_QUALITY    ti_mas_vpe_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_vpe_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_vpe_Version_WIDTH
00098 #endif


VPE: Data Structures

  • Data Structures
  • Data Fields

VPE Data Structures

Here are the data structures with brief descriptions:
asnrCallTable_t | ASNR call table
asnrControl_s | Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl()
asnrNewConfig_s | Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew()
asnrOpenConfig_s | Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen()
asnrSizeConfig_s | Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew()
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: asnr.h File Reference

  • File List
  • Globals

asnr.h File Reference

Detailed Description

Contains external API for the Adaptive Spectral Noise Reduction (ASNR) module.

Definition in file asnr.h.

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

Include dependency graph for asnr.h:

Go to the source code of this file.

Data Structures

struct | asnrSizeConfig_s
Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew(). More...
struct | asnrNewConfig_s
Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew(). More...
struct | asnrOpenConfig_s
Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen(). More...
struct | asnrControl_s
Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl(). More...
struct | asnrCallTable_t
ASNR call table. More...

Defines

#define | asnr_CTL_VALID_ENABLE 0x0001
#define | asnr_CTL_VALID_SAMP_RATE 0x0002
#define | asnr_CTL_VALID_DELAY 0x0004
#define | asnr_CTL_VALID_BAND_BIN1 0x0008
#define | asnr_CTL_VALID_BAND_BIN2 0x0010
#define | asnr_CTL_VALID_BAND1_MAX_ATTEN 0x0020
#define | asnr_CTL_VALID_BAND2_MAX_ATTEN 0x0040
#define | asnr_CTL_VALID_BAND3_MAX_ATTEN 0x0080
#define | asnr_CTL_VALID_SIG_UPD_RATE_MIN 0x0100
#define | asnr_CTL_VALID_SIG_UPD_RATE_MAX 0x0200
#define | asnr_CTL_VALID_NOISE_THRESH 0x0400
#define | asnr_CTL_VALID_NOISE_HANGOVER 0x0800
#define | asnr_DISABLE 0
#define | asnr_ENABLE 1
#define | asnr_DELAY_LOWER_LIMIT 3
#define | asnr_DELAY_UPPER_LIMIT 6
#define | asnr_BAND_BIN_LOWER_LIMIT 1
#define | asnr_BAND_BIN_UPPER_LIMIT_8K 63
#define | asnr_BAND_BIN_UPPER_LIMIT_16K 127
#define | asnr_MAX_ATTEN_LOWER_LIMIT 0
#define | asnr_MAX_ATTEN_UPPER_LIMIT 90
#define | asnr_NOISE_THR_LOWER_LIMIT (-80)
#define | asnr_NOISE_THR_UPPER_LIMIT (-40)

Typedefs

typedef tint | asnrSrate_t
typedef asnrSizeConfig_s | asnrSizeConfig_t
Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew().
typedef asnrNewConfig_s | asnrNewConfig_t
Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew().
typedef asnrOpenConfig_s | asnrOpenConfig_t
Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen().
typedef asnrControl_s | asnrControl_t
Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl().

Enumerations

enum {
asnr_NOERR = 0, asnr_ERR_NOMEMORY = 1, asnr_ERR_NOTOPENED = 2, asnr_ERR_NOTCLOSED = 3,
asnr_ERR_INVALIDPAR = 4, asnr_ERR_INVALIDNBUFS = 5
}
enum | { asnr_SRATE_8K = 0, asnr_SRATE_16K = 1 }

Functions

tint | asnrGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, asnrSizeConfig_t *cfg)
Function asnrGetSizes() obtains the memory requirements of an ASNR instance.
tint | asnrNew (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, asnrNewConfig_t *cfg)
Function asnrNew() creates a new ASNR instance.
Remarks:
Function asnrNew() must be called before asnrOpen()is called.

tint | asnrDelete (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs)
Function asnrDelete() deletes the ASNR instance identified by asnrInst and returns the addresses of those buffers used by this instance.
tint | asnrOpen (void *inst, asnrOpenConfig_t *cfg)
Function asnrOpen() initializes and configures an ASNR instance.
tint | asnrClose (void *asnrInst)
Function asnrClose() closes an ASNR instance.
Remarks:
Function asnrClose() must be called before asnrDelete() is called.

tint | asnrControl (void *asnrInst, asnrControl_t *ctl)
Function asnrControl() enables/disables ASNR or changes one or more parameters.
tint | asnrProcess (void *asnrInst, void *input, void *output)
Function asnrProcess() performs noise reduction processing on one frame of data.

Define Documentation

#define asnr_CTL_VALID_ENABLE 0x0001

Definition at line 196 of file asnr.h.

#define asnr_CTL_VALID_SAMP_RATE 0x0002

Definition at line 197 of file asnr.h.

#define asnr_CTL_VALID_DELAY 0x0004

Definition at line 198 of file asnr.h.

#define asnr_CTL_VALID_BAND_BIN1 0x0008

Definition at line 199 of file asnr.h.

#define asnr_CTL_VALID_BAND_BIN2 0x0010

Definition at line 200 of file asnr.h.

#define asnr_CTL_VALID_BAND1_MAX_ATTEN 0x0020

Definition at line 201 of file asnr.h.

#define asnr_CTL_VALID_BAND2_MAX_ATTEN 0x0040

Definition at line 202 of file asnr.h.

#define asnr_CTL_VALID_BAND3_MAX_ATTEN 0x0080

Definition at line 203 of file asnr.h.

#define asnr_CTL_VALID_SIG_UPD_RATE_MIN 0x0100

Definition at line 204 of file asnr.h.

#define asnr_CTL_VALID_SIG_UPD_RATE_MAX 0x0200

Definition at line 205 of file asnr.h.

#define asnr_CTL_VALID_NOISE_THRESH 0x0400

Definition at line 206 of file asnr.h.

#define asnr_CTL_VALID_NOISE_HANGOVER 0x0800

Definition at line 207 of file asnr.h.

#define asnr_DISABLE 0

Definition at line 210 of file asnr.h.

#define asnr_ENABLE 1

Definition at line 211 of file asnr.h.

#define asnr_DELAY_LOWER_LIMIT 3

Definition at line 224 of file asnr.h.

#define asnr_DELAY_UPPER_LIMIT 6

Definition at line 225 of file asnr.h.

#define asnr_BAND_BIN_LOWER_LIMIT 1

Definition at line 236 of file asnr.h.

#define asnr_BAND_BIN_UPPER_LIMIT_8K 63

Definition at line 237 of file asnr.h.

#define asnr_BAND_BIN_UPPER_LIMIT_16K 127

Definition at line 238 of file asnr.h.

#define asnr_MAX_ATTEN_LOWER_LIMIT 0

Definition at line 258 of file asnr.h.

#define asnr_MAX_ATTEN_UPPER_LIMIT 90

Definition at line 259 of file asnr.h.

#define asnr_NOISE_THR_LOWER_LIMIT (-80)

Definition at line 309 of file asnr.h.

#define asnr_NOISE_THR_UPPER_LIMIT (-40)

Definition at line 310 of file asnr.h.


VPE: asnr.h Source File

  • File List
  • Globals

asnr.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Adaptive Spectral Noise Reduction (ASNR) module
00003  *
00004  ******************************************************************************
00005  * FILE NAME: asnr.h
00006  *
00007  * DESCRIPTION: Implements adaptive noise reduction in frequency domain.
00008  *
00009  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00010  *
00011  *              All rights reserved not granted herein.
00012  *
00013  *                         Limited License.
00014  *
00015  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00016  *  non-exclusive license under copyrights and patents it now or hereafter owns
00017  *  or controls to make, have made, use, import, offer to sell and sell
00018  *  ("Utilize") this software subject to the terms herein.  With respect to the
00019  *  foregoing patent license, such license is granted solely to the extent that
00020  *  any such patent is necessary to Utilize the software alone.  The patent
00021  *  license shall not apply to any combinations which include this software,
00022  *  other than combinations with devices manufactured by or for TI (“TI
00023  *  Devices”).  No hardware patent is licensed hereunder.
00024  *
00025  *  Redistributions must preserve existing copyright notices and reproduce this
00026  *  license (including the above copyright notice and the disclaimer and (if
00027  *  applicable) source code license limitations below) in the documentation
00028  *  and/or other materials provided with the distribution
00029  *
00030  *  Redistribution and use in binary form, without modification, are permitted
00031  *  provided that the following conditions are met:
00032  *
00033  *    *  No reverse engineering, decompilation, or disassembly of this software
00034  *  is permitted with respect to any software provided in binary form.
00035  *
00036  *    *  any redistribution and use are licensed by TI for use only with TI
00037  *  Devices.
00038  *
00039  *    *  Nothing shall obligate TI to provide you with source code for the
00040  *  software licensed and provided to you in object code.
00041  *
00042  *  If software source code is provided to you, modification and redistribution
00043  *  of the source code are permitted provided that the following conditions are
00044  *  met:
00045  *
00046  *    *  any redistribution and use of the source code, including any resulting
00047  *  derivative works, are licensed by TI for use only with TI Devices.
00048  *
00049  *    *  any redistribution and use of any object code compiled from the source
00050  *  code and any resulting derivative works, are licensed by TI for use only
00051  *  with TI Devices.
00052  *
00053  *  Neither the name of Texas Instruments Incorporated nor the names of its
00054  *  suppliers may be used to endorse or promote products derived from this
00055  *  software without specific prior written permission.
00056  *
00057  *  DISCLAIMER.
00058  *
00059  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00060  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00061  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00062  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00063  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00064  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00065  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00066  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00067  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00068  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00069  *  DAMAGE.
00070  *****************************************************************************/
00071 #ifndef _ASNR_H
00072 #define _ASNR_H
00073
00081 /* System include files and utilities' APIs */
00082 #include <ti/mas/types/types.h>               /* DSP types                   */
00083 #include <ti/mas/util/ecomem.h>               /* memory descriptor structure */
00084
00085 /* Define ASNR Module as a master group in Doxygen format and add all ASNR API
00086    definitions to this group. */
00111 enum {
00112   asnr_NOERR              = 0,
00113   asnr_ERR_NOMEMORY       = 1,
00114   asnr_ERR_NOTOPENED      = 2,
00115   asnr_ERR_NOTCLOSED      = 3,
00116   asnr_ERR_INVALIDPAR     = 4,
00117   asnr_ERR_INVALIDNBUFS   = 5
00118 };
00131 enum {
00132   asnr_SRATE_8K  = 0,
00133   asnr_SRATE_16K = 1
00134 };
00135
00136
00137 typedef tint asnrSrate_t;
00149 typedef struct asnrSizeConfig_s {
00150
00151   asnrSrate_t  max_sampling_rate;
00154 } asnrSizeConfig_t;
00155
00163 typedef struct asnrNewConfig_s {
00164   void  *handle;
00168   asnrSizeConfig_t  sizeCfg;
00169 } asnrNewConfig_t;
00170
00171
00179 typedef struct asnrOpenConfig_s {
00180
00181   asnrSrate_t  sampling_rate;
00184 } asnrOpenConfig_t;
00185
00186
00194 typedef struct asnrControl_s {
00195   tuint valid_bitfield;
00196 #define asnr_CTL_VALID_ENABLE           0x0001
00197 #define asnr_CTL_VALID_SAMP_RATE        0x0002
00198 #define asnr_CTL_VALID_DELAY            0x0004
00199 #define asnr_CTL_VALID_BAND_BIN1        0x0008
00200 #define asnr_CTL_VALID_BAND_BIN2        0x0010
00201 #define asnr_CTL_VALID_BAND1_MAX_ATTEN  0x0020
00202 #define asnr_CTL_VALID_BAND2_MAX_ATTEN  0x0040
00203 #define asnr_CTL_VALID_BAND3_MAX_ATTEN  0x0080
00204 #define asnr_CTL_VALID_SIG_UPD_RATE_MIN 0x0100
00205 #define asnr_CTL_VALID_SIG_UPD_RATE_MAX 0x0200
00206 #define asnr_CTL_VALID_NOISE_THRESH     0x0400
00207 #define asnr_CTL_VALID_NOISE_HANGOVER   0x0800
00208
00209   tint enable;
00210 #define asnr_DISABLE 0
00211 #define asnr_ENABLE  1
00212
00213   tint samp_rate;
00215   tint delay;
00224 #define asnr_DELAY_LOWER_LIMIT 3
00225 #define asnr_DELAY_UPPER_LIMIT 6
00226
00227   tint band_bin1;
00236 #define asnr_BAND_BIN_LOWER_LIMIT          1
00237 #define asnr_BAND_BIN_UPPER_LIMIT_8K      63
00238 #define asnr_BAND_BIN_UPPER_LIMIT_16K    127
00239
00240   tint band_bin2;
00251   Fract band1_max_atten;
00258 #define asnr_MAX_ATTEN_LOWER_LIMIT   0
00259 #define asnr_MAX_ATTEN_UPPER_LIMIT  90
00260
00261   Fract band2_max_atten;
00270   Fract band3_max_atten;
00279   Fract sig_upd_rate_max;
00293   Fract sig_upd_rate_min;
00299   tint noise_thresh;
00309 #define asnr_NOISE_THR_LOWER_LIMIT (-80)
00310 #define asnr_NOISE_THR_UPPER_LIMIT (-40)
00311
00312   tint noise_hangover;
00320 } asnrControl_t;
00321
00322
00347 tint asnrGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, asnrSizeConfig_t *cfg);
00348
00382 tint asnrNew(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, asnrNewConfig_t *cfg);
00383
00408 tint asnrDelete(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs);
00409
00437 tint asnrOpen(void *inst, asnrOpenConfig_t *cfg);
00438
00454 tint asnrClose(void *asnrInst);
00455
00474 tint asnrControl(void *asnrInst, asnrControl_t *ctl);
00475
00499 tint asnrProcess(void *asnrInst,void *input,void *output);
00500
00501 /* -------------------------- ASNR Call Table -------------------------------- */
00508 typedef struct {
00509   tint (*asnrGetSizes)   (tint *nbufs, const ecomemBuffer_t **bufs,
00510                         asnrSizeConfig_t *cfg);
00511   tint (*asnrNew)        (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs,
00512                         asnrNewConfig_t *cfg);
00513   tint (*asnrDelete)     (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs);
00514   tint (*asnrOpen)       (void *inst, asnrOpenConfig_t *cfg);
00515   tint (*asnrClose)      (void *asnrInst);
00516   tint (*asnrControl)    (void *asnrInst, asnrControl_t *ctl);
00517   tint (*asnrProcess)    (void *asnrInst,void *input,void *output);
00518 } asnrCallTable_t;
00519
00520 #endif
00521
00522 /* nothing past this point */
00523


VPE: ASNR Configuration

VPE (Voice Processing Elements) Package

ASNR Configuration

ASNR Default Configuration

Refert to asnrControl_s.


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.
  7. Adaptive Spectral Noise Reduction (ASNR): adaptive background noise reduction performed in frequency domain.

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.

Adaptive Spectral Noise Reduction (ASNR)

The ASNR module implements the classical Wiener filter for adaptive noise filtering. The attenuating gain applied to each frequency bin k is given as: G(k) = S(k)/[S(k)+N(k)], where S(k) and N(k) are signal and noise power estimates for bin k, respectively.


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

ASNR Module API

The ASNR module follows the Embedded Communication Object (ECO) API model. The complete API for this module is provided below.

  1. asnrGetSizes()
  2. asnrNew()
  3. asnrDelete()
  4. asnrOpen()
  5. asnrClose()
  6. asnrControl()
  7. asnrProcess()

See ASNR API Function Return Codes for ASNR return codes.


VPE: File Index

  • File List
  • Globals

VPE File List

Here is a list of all files with brief descriptions:
asnr.h [code] | Contains external API for the Adaptive Spectral Noise Reduction (ASNR) module
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
  • a
  • b
  • c
  • d
  • e
  • f
  • h
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v

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

- a -

  • asnrClose : asnrCallTable_t
  • asnrControl : asnrCallTable_t
  • asnrDelete : asnrCallTable_t
  • asnrGetSizes : asnrCallTable_t
  • asnrNew : asnrCallTable_t
  • asnrOpen : asnrCallTable_t
  • asnrProcess : asnrCallTable_t

- b -

  • band1_max_atten : asnrControl_s
  • band2_max_atten : asnrControl_s
  • band3_max_atten : asnrControl_s
  • band_bin1 : asnrControl_s
  • band_bin2 : asnrControl_s

- c -

  • ctl_code : hlcControl_t

- d -

  • delay : asnrControl_s

- e -

  • enable : asnrControl_s

- f -

  • frm_len : hlcConfig_t

- h -

  • handle : asnrNewConfig_s

- m -

  • max_sampling_rate : asnrSizeConfig_s

- n -

  • noise_hangover : asnrControl_s
  • noise_thresh : asnrControl_s

- p -

  • power_tc : hlcConfig_t

- r -

  • ramp_out_period : hlcConfig_t

- s -

  • samp_rate : asnrControl_s
  • sampling_rate : asnrOpenConfig_s
  • sig_upd_rate_max : asnrControl_s
  • sig_upd_rate_min : asnrControl_s
  • sizeCfg : asnrNewConfig_s
  • srate_factor : slmConfig_t , hlcConfig_t

- t -

  • thresh : hlcConfig_t , hlcControl_t

- u -

  • u : hlcControl_t

- v -

  • valid_bf : hlcConfig_t , slmConfig_t
  • valid_bitfield : asnrControl_s


VPE: Data Fields - Variables

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

- a -

  • asnrClose : asnrCallTable_t
  • asnrControl : asnrCallTable_t
  • asnrDelete : asnrCallTable_t
  • asnrGetSizes : asnrCallTable_t
  • asnrNew : asnrCallTable_t
  • asnrOpen : asnrCallTable_t
  • asnrProcess : asnrCallTable_t

- b -

  • band1_max_atten : asnrControl_s
  • band2_max_atten : asnrControl_s
  • band3_max_atten : asnrControl_s
  • band_bin1 : asnrControl_s
  • band_bin2 : asnrControl_s

- c -

  • ctl_code : hlcControl_t

- d -

  • delay : asnrControl_s

- e -

  • enable : asnrControl_s

- f -

  • frm_len : hlcConfig_t

- h -

  • handle : asnrNewConfig_s

- m -

  • max_sampling_rate : asnrSizeConfig_s

- n -

  • noise_hangover : asnrControl_s
  • noise_thresh : asnrControl_s

- p -

  • power_tc : hlcConfig_t

- r -

  • ramp_out_period : hlcConfig_t

- s -

  • samp_rate : asnrControl_s
  • sampling_rate : asnrOpenConfig_s
  • sig_upd_rate_max : asnrControl_s
  • sig_upd_rate_min : asnrControl_s
  • sizeCfg : asnrNewConfig_s
  • srate_factor : slmConfig_t , hlcConfig_t

- t -

  • thresh : hlcConfig_t , hlcControl_t

- u -

  • u : hlcControl_t

- v -

  • valid_bf : hlcConfig_t , slmConfig_t
  • valid_bitfield : asnrControl_s


VPE: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • 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

- a -

  • asnr_BAND_BIN_LOWER_LIMIT : asnr.h
  • asnr_BAND_BIN_UPPER_LIMIT_16K : asnr.h
  • asnr_BAND_BIN_UPPER_LIMIT_8K : asnr.h
  • asnr_CTL_VALID_BAND1_MAX_ATTEN : asnr.h
  • asnr_CTL_VALID_BAND2_MAX_ATTEN : asnr.h
  • asnr_CTL_VALID_BAND3_MAX_ATTEN : asnr.h
  • asnr_CTL_VALID_BAND_BIN1 : asnr.h
  • asnr_CTL_VALID_BAND_BIN2 : asnr.h
  • asnr_CTL_VALID_DELAY : asnr.h
  • asnr_CTL_VALID_ENABLE : asnr.h
  • asnr_CTL_VALID_NOISE_HANGOVER : asnr.h
  • asnr_CTL_VALID_NOISE_THRESH : asnr.h
  • asnr_CTL_VALID_SAMP_RATE : asnr.h
  • asnr_CTL_VALID_SIG_UPD_RATE_MAX : asnr.h
  • asnr_CTL_VALID_SIG_UPD_RATE_MIN : asnr.h
  • asnr_DELAY_LOWER_LIMIT : asnr.h
  • asnr_DELAY_UPPER_LIMIT : asnr.h
  • asnr_DISABLE : asnr.h
  • asnr_ENABLE : asnr.h
  • asnr_ERR_INVALIDNBUFS : asnr.h
  • asnr_ERR_INVALIDPAR : asnr.h
  • asnr_ERR_NOMEMORY : asnr.h
  • asnr_ERR_NOTCLOSED : asnr.h
  • asnr_ERR_NOTOPENED : asnr.h
  • asnr_MAX_ATTEN_LOWER_LIMIT : asnr.h
  • asnr_MAX_ATTEN_UPPER_LIMIT : asnr.h
  • asnr_NOERR : asnr.h
  • asnr_NOISE_THR_LOWER_LIMIT : asnr.h
  • asnr_NOISE_THR_UPPER_LIMIT : asnr.h
  • asnr_SRATE_16K : asnr.h
  • asnr_SRATE_8K : asnr.h
  • asnrClose() : asnr.h
  • asnrControl() : asnr.h
  • asnrControl_t : asnr.h
  • asnrDelete() : asnr.h
  • asnrGetSizes() : asnr.h
  • asnrNew() : asnr.h
  • asnrNewConfig_t : asnr.h
  • asnrOpen() : asnr.h
  • asnrOpenConfig_t : asnr.h
  • asnrProcess() : asnr.h
  • asnrSizeConfig_t : asnr.h
  • asnrSrate_t : asnr.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
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • s
  • t
  • v

- _ -

  • __extern : Version.h

- a -

  • asnr_BAND_BIN_LOWER_LIMIT : asnr.h
  • asnr_BAND_BIN_UPPER_LIMIT_16K : asnr.h
  • asnr_BAND_BIN_UPPER_LIMIT_8K : asnr.h
  • asnr_CTL_VALID_BAND1_MAX_ATTEN : asnr.h
  • asnr_CTL_VALID_BAND2_MAX_ATTEN : asnr.h
  • asnr_CTL_VALID_BAND3_MAX_ATTEN : asnr.h
  • asnr_CTL_VALID_BAND_BIN1 : asnr.h
  • asnr_CTL_VALID_BAND_BIN2 : asnr.h
  • asnr_CTL_VALID_DELAY : asnr.h
  • asnr_CTL_VALID_ENABLE : asnr.h
  • asnr_CTL_VALID_NOISE_HANGOVER : asnr.h
  • asnr_CTL_VALID_NOISE_THRESH : asnr.h
  • asnr_CTL_VALID_SAMP_RATE : asnr.h
  • asnr_CTL_VALID_SIG_UPD_RATE_MAX : asnr.h
  • asnr_CTL_VALID_SIG_UPD_RATE_MIN : asnr.h
  • asnr_DELAY_LOWER_LIMIT : asnr.h
  • asnr_DELAY_UPPER_LIMIT : asnr.h
  • asnr_DISABLE : asnr.h
  • asnr_ENABLE : asnr.h
  • asnr_MAX_ATTEN_LOWER_LIMIT : asnr.h
  • asnr_MAX_ATTEN_UPPER_LIMIT : asnr.h
  • asnr_NOISE_THR_LOWER_LIMIT : asnr.h
  • asnr_NOISE_THR_UPPER_LIMIT : asnr.h

- s -

  • 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

- 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
  • Typedefs
  • Enumerator
  • Defines
  • a
  • h
  • s

- a -

  • asnr_ERR_INVALIDNBUFS : asnr.h
  • asnr_ERR_INVALIDPAR : asnr.h
  • asnr_ERR_NOMEMORY : asnr.h
  • asnr_ERR_NOTCLOSED : asnr.h
  • asnr_ERR_NOTOPENED : asnr.h
  • asnr_NOERR : asnr.h
  • asnr_SRATE_16K : asnr.h
  • asnr_SRATE_8K : asnr.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

- 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
  • Typedefs
  • Enumerator
  • Defines
  • a
  • h
  • p
  • s

- a -

  • asnrClose() : asnr.h
  • asnrControl() : asnr.h
  • asnrDelete() : asnr.h
  • asnrGetSizes() : asnr.h
  • asnrNew() : asnr.h
  • asnrOpen() : asnr.h
  • asnrProcess() : asnr.h

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

  • 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
  • Typedefs
  • Enumerator
  • Defines

  • asnrControl_t : asnr.h
  • asnrNewConfig_t : asnr.h
  • asnrOpenConfig_t : asnr.h
  • asnrSizeConfig_t : asnr.h
  • asnrSrate_t : asnr.h


VPE: Data Fields

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

  • sfc_def_decim_interp_filt : sfc.h


VPE: 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: ASNR Sampling Rates Definitions

ASNR Sampling Rates Definitions
[ASNR Constants (enum's and define's)]

Collaboration diagram for ASNR Sampling Rates Definitions:

Detailed Description

Sampling rates that are supported by ASNR. Used to define sampling_rate of asnrOpenConfig_t, asnrSizeConfig_t, and asnrControl_t.

Typedefs

typedef tint | asnrSrate_t

Enumerations

enum | { asnr_SRATE_8K = 0, asnr_SRATE_16K = 1 }

Typedef Documentation

typedef tint asnrSrate_t

used by asnrOpenConfig_t, asnrSizeConfig_t, and asnrControl_t

Definition at line 137 of file asnr.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
asnr_SRATE_8K | 8kHz
asnr_SRATE_16K | 16kHz

Definition at line 131 of file asnr.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 137 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 147 of file hlc.h.

anonymous enum

Enumerator:
hlc_DISABLED | HLC is disabled
hlc_ENABLED | HLC is enabled

Definition at line 159 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 168 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 206 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 96 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 126 of file slm.h.

anonymous enum

Enumerator:
slm_CFG_BIT_SRATE Bit 0: sampling rate factor

Definition at line 135 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 124 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 132 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 114 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 133 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 140 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 148 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 112 of file svd.h.

anonymous enum

Enumerator:
svd_SRATE_8K | sampling rate is 8kHz
svd_SRATE_16K | sampling rate is 16kHz

Definition at line 123 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: ASNR Constants (enum's and define's)

ASNR Constants (enum's and define's)
[ASNR Module API]

Collaboration diagram for ASNR Constants (enum's and define's):

Modules

ASNR API Function Return Codes
ASNR Sampling Rates Definitions


VPE: ASNR Functions

ASNR Functions
[ASNR Module API]

Collaboration diagram for ASNR Functions:

Functions

tint | asnrGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, asnrSizeConfig_t *cfg)
Function asnrGetSizes() obtains the memory requirements of an ASNR instance.
tint | asnrNew (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, asnrNewConfig_t *cfg)
Function asnrNew() creates a new ASNR instance.
Remarks:
Function asnrNew() must be called before asnrOpen()is called.

tint | asnrDelete (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs)
Function asnrDelete() deletes the ASNR instance identified by asnrInst and returns the addresses of those buffers used by this instance.
tint | asnrOpen (void *inst, asnrOpenConfig_t *cfg)
Function asnrOpen() initializes and configures an ASNR instance.
tint | asnrClose (void *asnrInst)
Function asnrClose() closes an ASNR instance.
Remarks:
Function asnrClose() must be called before asnrDelete() is called.

tint | asnrControl (void *asnrInst, asnrControl_t *ctl)
Function asnrControl() enables/disables ASNR or changes one or more parameters.
tint | asnrProcess (void *asnrInst, void *input, void *output)
Function asnrProcess() performs noise reduction processing on one frame of data.

Function Documentation

tint asnrGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | asnrSizeConfig_t * | cfg
 | ) |  |

Function asnrGetSizes() obtains the memory requirements of an ASNR instance.

Parameters:
[in] | cfg | Pointer to a size configuration structure.
[out] | nbufs | Memory location to store the returned number of buffers required by the instance.
[out] | bufs | Memory location to store the returned address of the vector of memory buffer descriptions required by the instance.
Remarks:
Type ecomemBuffer_t is defined in ecomem.h of util package.
Return values:
ASNR error code.
    error code               description
    asnr_NOERR                 success
    asnr_ERR_INVALIDPAR        max_sampling_rate of asnrSizeConfig_t is neither
                               asnr_SRATE_8K nor asnr_SRATE_16K.

tint asnrNew | ( | void ** | asnrInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | asnrNewConfig_t * | cfg
 | ) |  |

Function asnrNew() creates a new ASNR instance.

Remarks:
Function asnrNew() must be called before asnrOpen()is called.

Parameters:
[in,out] | asnrInst | Memory location that will receive a pointer to the created ASNR instance.
[in] | nbufs | Number of memory buffers allocated by the user.
[in] | bufs | Pointer to memory buffer descriptors defined by the user.
Remarks:
Buffer alignment property of each buffer passed to asnrNew() must be equal to or better than what is returned by asnrGetSizes(), and must be in consistency with the base address of the buffer.
Parameters:
[in] cfg Pointer to new instance configuration structure.
Return values:
ASNR error code.
     error code            description
     asnr_NOERR               success
     asnr_ERR_INVALIDPAR      *asnrInst is not NULL or nbufs is not correct
     asnr_ERR_NOMEMORY        properties of one or more buffers are bad:
                               - size is less than what's requested
                               - size is not zero but base address is NULL,
                               - alignment and base address are not consistent,
                               - volatility does not meet requirement.
Precondition:
The pointer at the location pointed to by asnrInst must be set to NULL before this function is called.
Postcondition:
A pointer to the created instance will be returned to the location pointed to by asnrInst. Instance state will be set to closed.

tint asnrDelete | ( | void ** | asnrInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Function asnrDelete() deletes the ASNR instance identified by asnrInst and returns the addresses of those buffers used by this instance.

Parameters:
[in] | nbufs | Number of buffers used by this instance.
[in,out] | asnrInst | Memory location where the pointer to ASNR instance is stored.
[in,out] | bufs | Pointer to buffer descriptors to store returned addresses of the buffers used by this instance.
Return values:
ASNR error code.
     error code           description
     asnr_NOERR               success
     asnr_ERR_NOTCLOSED       ASNR instance has not been closed.
     asnr_ERR_INVALIDNBUFS    incorrect number of memory buffers
Precondition:
ASNR instance must be closed by asnrClose() before asnrDelete() is called.
Postcondition:
After asnrDelete() is called, ASNR instance pointer stored at asnrInst will be set to NULL, and the addresses of the buffers used by this instance will be returned to the location pointed to by bufs.

tint asnrOpen | ( | void * | inst,
 |  | asnrOpenConfig_t * | cfg
 | ) |  |

Function asnrOpen() initializes and configures an ASNR instance.

Remarks:
This function may be called after asnrNew() to initialize a new ASNR instance. It may also be called to reconfigure an instance that has been closed by asnrClose() but not deleted by asnrDelete().
Parameters:
[in] | cfg | Pointer to ASNR configuration parameter.
[in] | asnrInst | Pointer to ASNR instance.
Return values:
ASNR error code.
     error code              description
     asnr_NOERR              success
     asnr_ERR_INVALIDPAR     sampling rate is larger than max_sampling_rate of
                             asnrSizeConfig_t.
Precondition:
Function asnrNew() must be called before asnrOpen() is called the first time to open a new instance. For subsequent calls to open an existing instance, asnrClose() must be called before asnrOpen() to close the instance.
Postcondition:
After ASNR instance is opened, asnrControl() or asnrProcess() may be called for control or processing.

tint asnrClose ( void * asnrInst )

Function asnrClose() closes an ASNR instance.

Remarks:
Function asnrClose() must be called before asnrDelete() is called.

Parameters:
[in] asnrInst pointer to the instance to be closed
Return values:
ASNR error code.
     error code              description
     asnr_NOERR              success
     asnr_ERR_NOTOPENED      ASNR instance is not in open state

tint asnrControl | ( | void * | asnrInst,
 |  | asnrControl_t * | ctl
 | ) |  |

Function asnrControl() enables/disables ASNR or changes one or more parameters.

Parameters:
[in] | asnrInst | Pointer to ASNR instance.
[in] | ctl | Pointer to ASNR control structure.
Return values:
ASNR error code.
     error code              description
     asnr_NOERR               success
     asnr_ERR_NOTOPENED       ASNR instance has not been opened
     asnr_ERR_INVALIDPAR      Parameters are out of the allowed range.

tint asnrProcess | ( | void * | asnrInst,
 |  | void * | input,
 |  | void * | output
 | ) |  |

Function asnrProcess() performs noise reduction processing on one frame of data.

Parameters:
[in] | asnrInst | Pointer to ASNR instance.
[in] | *input | Input buffer.
[out] | *output | Output buffer.
Remarks:
Input must be one frame of 16-bit linear samples. Frame length MUST be 10msec. Output are also one frame of 16-bit linear samples.

Input and output pointers can be the same (in place processing) or different (out of place processing).

Return values:
ASNR error code.
     error code               description
     asnr_NOERR               success
     asnr_ERR_INVALIDPAR      either input buffer or output buffer is NULL


VPE: ASNR API Function Return Codes

ASNR API Function Return Codes
[ASNR Constants (enum's and define's)]

Collaboration diagram for ASNR API Function Return Codes:

Detailed Description

Error codes returned by ASNR API functions.

Enumerations

enum {
asnr_NOERR = 0, asnr_ERR_NOMEMORY = 1, asnr_ERR_NOTOPENED = 2, asnr_ERR_NOTCLOSED = 3,
asnr_ERR_INVALIDPAR = 4, asnr_ERR_INVALIDNBUFS = 5
}

Enumeration Type Documentation

anonymous enum

Enumerator:
asnr_NOERR | success, no error
asnr_ERR_NOMEMORY | supplied memory are not enough
asnr_ERR_NOTOPENED | asnr instance has not been opened yet
asnr_ERR_NOTCLOSED | asnr instance has not been closed yet
asnr_ERR_INVALIDPAR | configuration parameter is invalid
asnr_ERR_INVALIDNBUFS | incorrect number of memory buffers

Definition at line 111 of file asnr.h.


VPE: ASNR Data Structures

ASNR Data Structures
[ASNR Module API]

Collaboration diagram for ASNR Data Structures:

Data Structures

struct | asnrSizeConfig_s
Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew(). More...
struct | asnrNewConfig_s
Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew(). More...
struct | asnrOpenConfig_s
Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen(). More...
struct | asnrControl_s
Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl(). More...
struct | asnrCallTable_t
ASNR call table. More...

Typedefs

typedef asnrSizeConfig_s | asnrSizeConfig_t
Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew().
typedef asnrNewConfig_s | asnrNewConfig_t
Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew().
typedef asnrOpenConfig_s | asnrOpenConfig_t
Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen().
typedef asnrControl_s | asnrControl_t
Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl().

Typedef Documentation

typedef struct asnrSizeConfig_s asnrSizeConfig_t

Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew().

typedef struct asnrNewConfig_s asnrNewConfig_t

Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew().

typedef struct asnrOpenConfig_s asnrOpenConfig_t

Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen().

typedef struct asnrControl_s asnrControl_t

Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl().


VPE: ASNR Module API

ASNR Module API

Collaboration diagram for ASNR Module API:

Modules

ASNR Functions
ASNR Data Structures
ASNR Constants (enum's and define's)


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 124 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 178 of file sfc.h.

#define sfc_NUM_DEF_COEFS (sfc_DEF_FILT_LEN+1)/2

Definition at line 179 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 114 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 101 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 100 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.

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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070 #ifndef _HLC_H
00071 #define _HLC_H
00072
00079 /* System level header files */
00080 #include <ti/mas/types/types.h>            /* DSP types */
00081
00114 /* @{ */
00115
00123 /* @{ */
00124 enum {
00125  hlc_NOERR    = 0,
00126  hlc_ERROR    = 1,
00127  hlc_BADPARAM = 2
00128 };
00129 /*  @} */
00137 enum {
00138   hlc_SRATE_FACTOR_8K  = 1,
00139   hlc_SRATE_FACTOR_16K = 2
00140 };
00141
00142
00147 enum {
00148   hlc_CFG_BIT_THRESH      = 0,
00149   hlc_CFG_BIT_RAMP_OUT    = 1,
00150   hlc_CFG_BIT_POWER_TC    = 2,
00151   hlc_CFG_BIT_FRM_LEN     = 3,
00152   hlc_CFG_BIT_SRATE_FACT  = 4
00153 };
00154
00159 enum {
00160   hlc_DISABLED = 0,
00161   hlc_ENABLED  = 1
00162 };
00163
00168 enum {
00169   hlc_TC_PWR_4_MS  = 1,
00170   hlc_TC_PWR_8_MS  = 2,
00171   hlc_TC_PWR_16_MS = 3
00172 };
00173
00181 typedef struct{
00182   tuint      valid_bf;
00184   Fract      thresh;
00187   tint       ramp_out_period;
00189   tint       power_tc;
00195   tint       srate_factor;
00199   tint       frm_len;
00200 } hlcConfig_t;
00201
00206 enum {
00207   hlc_CTL_DIS = 0,
00208   hlc_CTL_ENA = 1,
00209   hlc_CTL_THR = 2
00210 };
00211
00212
00219 typedef struct{
00220   tint    ctl_code;
00222   union {
00223     Fract   thresh;
00225   } u;
00226 } hlcControl_t;
00227
00232 /* @{ */
00245 tint hlcGetSizes (tint *instsize);
00246
00262 tint hlcInit(void *inst, hlcConfig_t *hlcCfg_info);
00263
00279 tint hlcControl(void *hlcInst, hlcControl_t *hlc_ctrl);
00280
00293 tint hlcProcess (void *hlcInst, void *samples);
00294
00295 /* @} */
00296 /* @} */ /* ingroup HLC */
00297 #endif
00298
00299 /* end of hlc.h */
00300


VPE: HLC Configuration

VPE (Voice Processing Elements) Package

HLC Configuration

HLC Default Configuration

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

Page Contents

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

Description

The VPE component provides a collection of modules that may function either independently as a group to either enhance voice signals with respect to some metric or provide information about the signals such as signal level, noise level, etc.

VPE supports the following features:

  1. High Level Compensation (HLC): Attenuate the incoming signal to avoid future saturation.
  2. 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.
  7. Adaptive Spectral Noise Reduction (ASNR): adaptive background noise reduction performed in frequency domain.

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
 | ASNR 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

Adaptive Spectral Noise Reduction (ASNR)

  1. The frame size must be 10ms

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 CPU v2.x | 55l | C55_large
C55x Large Memory Model CPU v3.3 | 55l | C55_large
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>
  8. #include <ti/mas/vpe/asnr.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>

Structures Requiring Initialization

N/A


VPE: Memory Requirements

VPE (Voice Processing Elements) Package

Memory Requirements

  • Assumptions
  • C55x 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)
ASNR | 6019 (bytes) | 841 (words) | 2443 (words)

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)
ASNR | 11968(bytes) | 3426 (bytes) | 4886 (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)
ASNR | 11936(bytes) | 3434 (bytes) | 4886 (bytes)


VPE: MIPS Requirements

VPE (Voice Processing Elements) Package

MIPS Requirements

Page Contents

  • Assumptions
  • C55x 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
ASNR | 2.79 | 5.58 | 2.75 | 5.50

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
ASNR | 1.45 | 2.90 | 1.45 | 2.89

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
ASNR | 1.33 | 2.65 | 1.32 | 2.63


VPE: Module Index

VPE Modules

Here is a list of all modules:
  • ASNR Module API
    • ASNR Functions
    • ASNR Data Structures
    • ASNR Constants (enum's and define's)
      • ASNR API Function Return Codes
      • ASNR Sampling Rates Definitions
  • 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.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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
00071 #include <ti/mas/types/types.h>               /* DSP types                   */
00072
00104 void pcmUlawEncoder(linSample *lin_in, tword *ulaw_out, tint frame_len);
00105
00117 void pcmAlawEncoder(linSample *lin_in, tword *alaw_out, tint frame_len);
00118
00119
00152 void pcmUlawDecoder(tword *ulaw_in, linSample *lin_out, tint frame_len);
00153
00170 void pcmAlawDecoder(tword *alaw_in, linSample *lin_out, tint frame_len);
00171
00191 void pcmUlawEncoderP(linSample *lin_in, tuint *ulaw_out, tint frame_len);
00192
00203 void pcmAlawEncoderP(linSample *lin_in, tuint *alaw_out, tint frame_len);
00204
00225 void pcmUlawDecoderP(tuint *ulaw_in, linSample *lin_out, tint frame_len);
00226
00241 void pcmAlawDecoderP(tuint *alaw_in, linSample *lin_out, tint frame_len);
00242
00243 #endif
00244 /* Nothing past this point */


VPE: PCM Configuration

VPE (Voice Processing Elements) Package

PCM Configuration

PCM Default Configuration

PCM module does not have configuration parameters.


VPE: sfc.h File Reference

  • File List
  • Globals

sfc.h File Reference

Detailed Description

Contains external API for the Sample Frequency Converter (SFC) module.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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
00071  #include <ti/mas/types/types.h>               /* DSP types                   */
00072
00079 /* @{ */
00080
00085 /* @{ */
00112 void sfcDecimationBy2(linSample *delay_line, linSample *sig_out,
00113                       const Fract *coeffs, tint filt_len, tint frame_len_in);
00114
00142 void sfcInterpolationBy2(linSample *delay_line, linSample *sig_out,
00143                          const Fract *coeffs, tint filt_len, tint frame_len_in);
00144 /* @} */
00145
00177 /* @{ */
00178 #define sfc_DEF_FILT_LEN 33
00179 #define sfc_NUM_DEF_COEFS (sfc_DEF_FILT_LEN+1)/2
00180 extern const Fract sfc_def_decim_interp_filt[sfc_NUM_DEF_COEFS];
00181 /* @} */
00182
00183 /* @} */ /* ingroup SFC */
00184 #endif
00185 /* Nothing past this point */


VPE: SFC Configuration

VPE (Voice Processing Elements) Package

SFC Configuration

SFC Default Configuration

SFC module does not have configuration parameters.


VPE: slm.h File Reference

  • File List
  • Globals

slm.h File Reference

Detailed Description

Contains external APIs for the slm module.

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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *
00010  *              All rights reserved not granted herein.
00011  *
00012  *                         Limited License.
00013  *
00014  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00015  *  non-exclusive license under copyrights and patents it now or hereafter owns
00016  *  or controls to make, have made, use, import, offer to sell and sell
00017  *  ("Utilize") this software subject to the terms herein.  With respect to the
00018  *  foregoing patent license, such license is granted solely to the extent that
00019  *  any such patent is necessary to Utilize the software alone.  The patent
00020  *  license shall not apply to any combinations which include this software,
00021  *  other than combinations with devices manufactured by or for TI (“TI
00022  *  Devices”).  No hardware patent is licensed hereunder.
00023  *
00024  *  Redistributions must preserve existing copyright notices and reproduce this
00025  *  license (including the above copyright notice and the disclaimer and (if
00026  *  applicable) source code license limitations below) in the documentation
00027  *  and/or other materials provided with the distribution
00028  *
00029  *  Redistribution and use in binary form, without modification, are permitted
00030  *  provided that the following conditions are met:
00031  *
00032  *    *  No reverse engineering, decompilation, or disassembly of this software
00033  *  is permitted with respect to any software provided in binary form.
00034  *
00035  *    *  any redistribution and use are licensed by TI for use only with TI
00036  *  Devices.
00037  *
00038  *    *  Nothing shall obligate TI to provide you with source code for the
00039  *  software licensed and provided to you in object code.
00040  *
00041  *  If software source code is provided to you, modification and redistribution
00042  *  of the source code are permitted provided that the following conditions are
00043  *  met:
00044  *
00045  *    *  any redistribution and use of the source code, including any resulting
00046  *  derivative works, are licensed by TI for use only with TI Devices.
00047  *
00048  *    *  any redistribution and use of any object code compiled from the source
00049  *  code and any resulting derivative works, are licensed by TI for use only
00050  *  with TI Devices.
00051  *
00052  *  Neither the name of Texas Instruments Incorporated nor the names of its
00053  *  suppliers may be used to endorse or promote products derived from this
00054  *  software without specific prior written permission.
00055  *
00056  *  DISCLAIMER.
00057  *
00058  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00059  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00060  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00061  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00062  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00063  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00064  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00065  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00066  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00067  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00068  *  DAMAGE.
00069  *****************************************************************************/
00070 #ifndef _SLM_H
00071 #define _SLM_H
00072
00079 /* System level header files */
00080 #include <ti/mas/types/types.h>            /* DSP types */
00081
00090 /* @{ */
00091
00096 enum {
00097   slm_DISABLE    =    0,
00098   slm_MODE1      =    1,
00099   slm_MODE2      =    2,
00100   slm_MODE3      =    3,
00101   slm_MODE4      =    4,
00102   slm_MODE5      =    5,
00103   slm_NUMOF_MODE = slm_MODE5
00104 };
00105
00113 /* @{ */
00114 enum {
00115   slm_NOERR    = 0,
00116   slm_ERROR    = 1,
00117   slm_BADPARAM = 2
00118 };
00119 /*  @} */
00126 enum {
00127   slm_SRATE_FACTOR_16K = 1,
00128   slm_SRATE_FACTOR_8K  = 2
00129 };
00130
00135 enum {
00136   slm_CFG_BIT_SRATE      = 0
00137 };
00138
00145 /* @{ */
00146 typedef struct{
00147   tuint      valid_bf;
00149   tint       srate_factor;
00152 } slmConfig_t;
00153 /* @} */
00154
00159 /* @{ */
00170 tint slmGetSizes (tint *instsize);
00171
00187 tint slmInit (void *inst, slmConfig_t *cfg);
00188
00204 tint slmControl (void *inst, tint mode);
00205
00220 tint slmProcess (void *inst, void *speechSamples, tint frame_length);
00221
00222 /* @} */
00223 /* @} */ /* ingroup SLM */
00224 #endif
00225
00226 /* end of slm.h */
00227


VPE: SLM Configuration

VPE (Voice Processing Elements) Package

SLM Configuration

SLM Default Configuration

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.

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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *
00012  *              All rights reserved not granted herein.
00013  *
00014  *                         Limited License.
00015  *
00016  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00017  *  non-exclusive license under copyrights and patents it now or hereafter owns
00018  *  or controls to make, have made, use, import, offer to sell and sell
00019  *  ("Utilize") this software subject to the terms herein.  With respect to the
00020  *  foregoing patent license, such license is granted solely to the extent that
00021  *  any such patent is necessary to Utilize the software alone.  The patent
00022  *  license shall not apply to any combinations which include this software,
00023  *  other than combinations with devices manufactured by or for TI (“TI
00024  *  Devices”).  No hardware patent is licensed hereunder.
00025  *
00026  *  Redistributions must preserve existing copyright notices and reproduce this
00027  *  license (including the above copyright notice and the disclaimer and (if
00028  *  applicable) source code license limitations below) in the documentation
00029  *  and/or other materials provided with the distribution
00030  *
00031  *  Redistribution and use in binary form, without modification, are permitted
00032  *  provided that the following conditions are met:
00033  *
00034  *    *  No reverse engineering, decompilation, or disassembly of this software
00035  *  is permitted with respect to any software provided in binary form.
00036  *
00037  *    *  any redistribution and use are licensed by TI for use only with TI
00038  *  Devices.
00039  *
00040  *    *  Nothing shall obligate TI to provide you with source code for the
00041  *  software licensed and provided to you in object code.
00042  *
00043  *  If software source code is provided to you, modification and redistribution
00044  *  of the source code are permitted provided that the following conditions are
00045  *  met:
00046  *
00047  *    *  any redistribution and use of the source code, including any resulting
00048  *  derivative works, are licensed by TI for use only with TI Devices.
00049  *
00050  *    *  any redistribution and use of any object code compiled from the source
00051  *  code and any resulting derivative works, are licensed by TI for use only
00052  *  with TI Devices.
00053  *
00054  *  Neither the name of Texas Instruments Incorporated nor the names of its
00055  *  suppliers may be used to endorse or promote products derived from this
00056  *  software without specific prior written permission.
00057  *
00058  *  DISCLAIMER.
00059  *
00060  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00061  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00062  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00063  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00064  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00065  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00066  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00067  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00068  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00069  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00070  *  DAMAGE.
00071  *****************************************************************************/
00072 #ifndef _SNL_H
00073 #define _SNL_H
00074
00075 #include <ti/mas/types/types.h>              /* DSP types */
00076
00091 /* @{ */
00092
00100 /* @{ */
00101 enum {
00102   snl_NOERR    = 0,
00103   snl_ERR      = 1,
00104   snl_BADPARAM = 2
00105 };
00106 /*  @} */
00114 enum {
00115   snl_SRATE_FACTOR_8K  = 1,
00116   snl_SRATE_FACTOR_16K = 2
00117 };
00118
00124 #define snl_ENV_Q               3
00125
00132 #define snl_INVALID_POW_DB      0x7F
00133
00138 /* @{ */
00149 tint snlGetSizes (tint *instsize);
00150
00168 tint snlInit      (void *inst, tint samp_rate);
00169
00183 tint snlProcess   (void *inst, linSample *samples, tuint nSamps);
00184
00198 tint snlGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh);
00199
00200 /* @} */
00201 /* @} */ /* ingroup SNL */
00202 #endif
00203
00204 /* Nothing past this point */


VPE: SNL Configuration

VPE (Voice Processing Elements) Package

SNL Configuration

SNL Default Configuration

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: asnrCallTable_t Struct Reference

  • Data Structures
  • Data Fields

asnrCallTable_t Struct Reference
[ASNR Data Structures]

#include <asnr.h>

Detailed Description

ASNR call table.

Definition at line 508 of file asnr.h.

Data Fields

tint(* | asnrGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, asnrSizeConfig_t *cfg)
tint(* | asnrNew )(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, asnrNewConfig_t *cfg)
tint(* | asnrDelete )(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | asnrOpen )(void *inst, asnrOpenConfig_t *cfg)
tint(* | asnrClose )(void *asnrInst)
tint(* | asnrControl )(void *asnrInst, asnrControl_t *ctl)
tint(* | asnrProcess )(void *asnrInst, void *input, void *output)

Field Documentation

tint(* asnrCallTable_t::asnrGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, asnrSizeConfig_t *cfg)

tint(* asnrCallTable_t::asnrNew)(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, asnrNewConfig_t *cfg)

tint(* asnrCallTable_t::asnrDelete)(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* asnrCallTable_t::asnrOpen)(void *inst, asnrOpenConfig_t *cfg)

tint(* asnrCallTable_t::asnrClose)(void *asnrInst)

tint(* asnrCallTable_t::asnrControl)(void *asnrInst, asnrControl_t *ctl)

tint(* asnrCallTable_t::asnrProcess)(void *asnrInst, void *input, void *output)

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


VPE: asnrControl_s Struct Reference

  • Data Structures
  • Data Fields

asnrControl_s Struct Reference
[ASNR Data Structures]

#include <asnr.h>

Detailed Description

Configuration structure for asnrControl() This structure contains ASNR parameters that can be configured through asnrControl().

Definition at line 194 of file asnr.h.

Data Fields

tuint | valid_bitfield
tint | enable
tint | samp_rate
tint | delay
tint | band_bin1
tint | band_bin2
Fract | band1_max_atten
Fract | band2_max_atten
Fract | band3_max_atten
Fract | sig_upd_rate_max
Fract | sig_upd_rate_min
tint | noise_thresh
tint | noise_hangover

Field Documentation

tuint asnrControl_s::valid_bitfield

To indicate which parameters to be changed

Definition at line 195 of file asnr.h.

tint asnrControl_s::enable

Enable flag: 0 - disable ASNR, 1 - enable ASNR.

Definition at line 209 of file asnr.h.

tint asnrControl_s::samp_rate

Sampling rate: asnr_SRATE_8K or asnr_SRATE_16K.

Definition at line 213 of file asnr.h.

tint asnrControl_s::delay

Signal delay: This parameter specifies signal delay in msecs, which determines the shape of FFT windowing function. It may be 3, 4, 5, or 6 (ms). ASNR may produce less unwanted noise and speech artifacts with a longer delay. Default is 5.

Remarks:
If this parameter is out of the valid range specified by [asnr_DELAY_LOWER_LIMIT asnr_DELAY_UPPER_LIMIT], asnrControl() will take no action and return an error.

Definition at line 215 of file asnr.h.

tint asnrControl_s::band_bin1

Frequency bands boundary bin 1: This parameter defines the first boundary of frequency bands for which different amount of noise attenuation is applied. The corresponding frequency is (parameter value)*62.5Hz. Default is 10 (625Hz).

Remarks:
If this parameter is out of the valid range specified by [asnr_BAND_BIN_LOWER_LIMIT asnr_BAND_BIN_UPPER_LIMIT_8K] for 8kHz, or [asnr_BAND_BIN_LOWER_LIMIT asnr_BAND_BIN_UPPER_LIMIT_16K] for 16kHz, asnrControl() will take no action and return an error.

Definition at line 227 of file asnr.h.

tint asnrControl_s::band_bin2

Frequency bands boundary bin 2: This parameter defines the second boundary of frequency bands for which different amount of noise attenuation is applied. It must be larger than band_bin1. Default is 32 (2000Hz).

Remarks:
If this parameter is out of the valid range specified by [asnr_BAND_BIN_LOWER_LIMIT asnr_BAND_BIN_UPPER_LIMIT_8K] for 8kHz, or [asnr_BAND_BIN_LOWER_LIMIT asnr_BAND_BIN_UPPER_LIMIT_16K], or if it is smaller than band_bin1, asnrControl() will take no action and return an error.

Definition at line 240 of file asnr.h.

Fract asnrControl_s::band1_max_atten

Maximum attenuation in band 1: This parameter specifies the maximum attenuation (dB) that ASNR may apply for frequency band 1 - [0, band_bin1-1]*62.5 Hz. Default is 9(dB).

Remarks:
If this parameter is out of the valid range specified by [asnr_MAX_ATTEN_LOWER_LIMIT asnr_MAX_ATTEN_UPPER_LIMIT], asnrControl() will take no action and return an error.

Definition at line 251 of file asnr.h.

Fract asnrControl_s::band2_max_atten

Maximum attenuation in band 2: This parameter specifies the maximum attenuation (dB) that ASNR may apply for frequency band 2 - [band_bin1, band_bin2-1]*62.5 Hz. Default is 9(dB).

Remarks:
If this parameter is out of the valid range specified by [asnr_MAX_ATTEN_LOWER_LIMIT asnr_MAX_ATTEN_UPPER_LIMIT], asnrControl() will take no action and return an error.

Definition at line 261 of file asnr.h.

Fract asnrControl_s::band3_max_atten

Maximum attenuation in band 3: This parameter specifies the maximum attenuation (dB) that ASNR may apply for frequency band 3 - [band_bin2*62.5Hz, Nyquist]. Default is 9(dB).

Remarks:
If this parameter is out of the valid range specified by [asnr_MAX_ATTEN_LOWER_LIMIT asnr_MAX_ATTEN_UPPER_LIMIT], asnrControl() will take no action and return an error.

Definition at line 270 of file asnr.h.

Fract asnrControl_s::sig_upd_rate_max

Maximum signal update rate: ASNR adaptive speech signal estimate inverse update rate upper bound. The actual inverse update rate is varied internally by ASNR between the configured maximum (this parameter) and mimimum constraints. A higher inverse update rate reduces frame to frame changes yielding greater temporal smoothing and less time varying ASNR distortion artifacts during speech or noise. A lower inverse update rate yields quicker speech onset "breaking in" to remove ASNR attenuation.

This parameter is in Q.15 format. Default is 31129 (0.95).

Remarks:
If this parameter is smaller than sig_upd_rate_min, asnrControl() will take no action and return an error.

Definition at line 279 of file asnr.h.

Fract asnrControl_s::sig_upd_rate_min

Minimum signal update rate: This is the minimum constraint on the ASNR adaptive speech signal estimate inverse update rate.

This parameter is in Q.15 format. Default is 29818 (0.91).

Definition at line 293 of file asnr.h.

tint asnrControl_s::noise_thresh

Noise threshold: ASNR will not reduce noise below this level, and when noise is already lower than this level, ASNR will not apply any attenuation to the signal. ASNR spectral noise estimate will continue to update even if Tx signal is below this noise threshold.

This parameter is in dBm0. Default is -75dBm0. Valid range is specified by [asnr_NOISE_THR_LOWER_LIMIT, asnr_NOISE_THR_UPPER_LIMIT]. If it is outside of this range, asnrControl() will take no action and return an error.

Definition at line 299 of file asnr.h.

tint asnrControl_s::noise_hangover

Noise hangover: When noise is lower than parameter noise_thresh, ASNR will not apply any attenuation to the signal. After noise goes above noise_thresh, ASNR waits a period of time specified by this parameter before applying attenuation again.

This parameter is in 10 msec units. Default is 150 (1.5 seconds).

Definition at line 312 of file asnr.h.

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


VPE: asnrNewConfig_s Struct Reference

  • Data Structures
  • Data Fields

asnrNewConfig_s Struct Reference
[ASNR Data Structures]

#include <asnr.h>

Collaboration diagram for asnrNewConfig_s:

[legend]

Detailed Description

Configuration structure for asnrNew() This structure is used for creating a new ASNR instance through function asnrNew().

Definition at line 163 of file asnr.h.

Data Fields

void * handle
asnrSizeConfig_t sizeCfg

Field Documentation

void* asnrNewConfig_s::handle

handle can be used by a user to identify the ASNR that communicates to it, e.g. when a debug call out function is called by a certain ASNR instance.

Definition at line 164 of file asnr.h.

asnrSizeConfig_t asnrNewConfig_s::sizeCfg

size configration

Definition at line 168 of file asnr.h.

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


VPE: asnrOpenConfig_s Struct Reference

  • Data Structures
  • Data Fields

asnrOpenConfig_s Struct Reference
[ASNR Data Structures]

#include <asnr.h>

Detailed Description

Configuration structure for asnrOpen() This structure contains ASNR parameters that must be configured through asnrOpen().

Definition at line 179 of file asnr.h.

Data Fields

asnrSrate_t sampling_rate

Field Documentation

asnrSrate_t asnrOpenConfig_s::sampling_rate

Sampling rate of the system: 8kHz: set to asnr_SRATE_8K. 16kHz: set to asnr_SRATE_16K.

Definition at line 181 of file asnr.h.

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


VPE: asnrSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

asnrSizeConfig_s Struct Reference
[ASNR Data Structures]

#include <asnr.h>

Detailed Description

Configuration structure for asnrGetSizes() This structure specifies the maximum sampling rate. It is also part of structure asnrNewConfig_s used by asnrNew().

Definition at line 149 of file asnr.h.

Data Fields

asnrSrate_t max_sampling_rate

Field Documentation

asnrSrate_t asnrSizeConfig_s::max_sampling_rate

Maximum sampling rate of the system: 8kHz: set to asnr_SRATE_8K. 16kHz: set to asnr_SRATE_16K.

Definition at line 151 of file asnr.h.

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


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 181 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 182 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 184 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 187 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 189 of file hlc.h.

tint hlcConfig_t::srate_factor

Sampling rate factor:
hlc_SRATE_FACTOR_8K
hlc_SRATE_FACTOR_16K

Definition at line 195 of file hlc.h.

tint hlcConfig_t::frm_len

Input signal frame length in samples, must be multiple of 5ms

Definition at line 199 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 219 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 220 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 223 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 146 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 147 of file slm.h.

tint slmConfig_t::srate_factor

Sampling rate factor:
slm_SRATE_FACTOR_8K
slm_SRATE_FACTOR_16K

Definition at line 149 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.

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 (SVD) 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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *
00012  *              All rights reserved not granted herein.
00013  *
00014  *                         Limited License.
00015  *
00016  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00017  *  non-exclusive license under copyrights and patents it now or hereafter owns
00018  *  or controls to make, have made, use, import, offer to sell and sell
00019  *  ("Utilize") this software subject to the terms herein.  With respect to the
00020  *  foregoing patent license, such license is granted solely to the extent that
00021  *  any such patent is necessary to Utilize the software alone.  The patent
00022  *  license shall not apply to any combinations which include this software,
00023  *  other than combinations with devices manufactured by or for TI (“TI
00024  *  Devices”).  No hardware patent is licensed hereunder.
00025  *
00026  *  Redistributions must preserve existing copyright notices and reproduce this
00027  *  license (including the above copyright notice and the disclaimer and (if
00028  *  applicable) source code license limitations below) in the documentation
00029  *  and/or other materials provided with the distribution
00030  *
00031  *  Redistribution and use in binary form, without modification, are permitted
00032  *  provided that the following conditions are met:
00033  *
00034  *    *  No reverse engineering, decompilation, or disassembly of this software
00035  *  is permitted with respect to any software provided in binary form.
00036  *
00037  *    *  any redistribution and use are licensed by TI for use only with TI
00038  *  Devices.
00039  *
00040  *    *  Nothing shall obligate TI to provide you with source code for the
00041  *  software licensed and provided to you in object code.
00042  *
00043  *  If software source code is provided to you, modification and redistribution
00044  *  of the source code are permitted provided that the following conditions are
00045  *  met:
00046  *
00047  *    *  any redistribution and use of the source code, including any resulting
00048  *  derivative works, are licensed by TI for use only with TI Devices.
00049  *
00050  *    *  any redistribution and use of any object code compiled from the source
00051  *  code and any resulting derivative works, are licensed by TI for use only
00052  *  with TI Devices.
00053  *
00054  *  Neither the name of Texas Instruments Incorporated nor the names of its
00055  *  suppliers may be used to endorse or promote products derived from this
00056  *  software without specific prior written permission.
00057  *
00058  *  DISCLAIMER.
00059  *
00060  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00061  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00062  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00063  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00064  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00065  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00066  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00067  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00068  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00069  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00070  *  DAMAGE.
00071  *****************************************************************************/
00072 #ifndef _SVD_H
00073 #define _SVD_H
00074
00088 /* @{ */
00089
00090 #include <ti/mas/types/types.h>              /* DSP types            */
00091
00099 /* @{ */
00100 enum{
00101   svd_NOERR    = 0,
00102   svd_ERR      = 1,
00103   svd_BADPARAM = 2
00104 };
00105 /*  @} */
00112 enum{
00113   svd_VOICE_UNDEFINED = -1,
00114   svd_VOICE_INACTIVE  = 0,
00115   svd_VOICE_ACTIVE    = 1
00116 };
00117
00123 enum{
00124   svd_SRATE_8K  = 1,
00125   svd_SRATE_16K = 2
00126 };
00127
00133 #define svd_ENV_Q               3
00134
00140 #define svd_PWR_Q               0
00141
00148 #define svd_INVALID_POW_DB      0x7F
00149
00154 /* @{ */
00164 tint svdGetSizes (tint *instsize);
00165
00182 tint svdInit (void *inst, tint samp_rate);
00183
00197 tint svdProcess (void *inst, linSample *samples, tuint nSamps);
00198
00211 tint svdGetDecision (void *inst, LFract *sig_pow);
00212
00226 tint svdGetLevels (void *inst, Fract *spchdB, Fract *noisedB, UFract *thresh);
00227
00228 /* @} */
00229 /* @} */ /* ingroup SVD */
00230 #endif
00231
00232 /* Nothing past this point */


VPE: SVD Configuration

VPE (Voice Processing Elements) Package

SVD Configuration

SVD Default Configuration

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:
vpeASNRPars_t
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.

There is a text file in folder test/vectors, vpecfg.txt, which has the sampling rate and all ASNR parameters. VPE test code reads this file to configure VPE and especially ASNR. This file can be modified to change the sampling rate and ASNR prameters.

A 16kHz test file in folder test/vectors, sigIn.pcm, will be read by the test code as the input. Output will be generated with pre-given name, sigOut.pcm, in the same folder. The format of these two files is little endian 16-bit PCM. Reference output can be found at test/vectors/refout for C55x and C64x+/C674x/C66x respectively. If the pre-built image is loaded and runs without any change, it should generate an output that is bit-exactly the same as the reference output.

By default, ASNR is set to run and all other modules are turned off. To turn on/off a module, following the procedure below.

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 0 implying data will be read from the input file vpe\test \sigIn.pcm. Currently, only linear 16-bit PCM format (little Endian) is supported. By setting vpeSim->sgn to 1, the internal signal generator will be used to generate the test signal. The signal generator can be configured by setting vpeSim->cfg_sgn to 1 and setting the fields in vpeSim->sgnParam to generate the desired signal.
  5. Follow the procedure below for the specific module being tested
    • HLC Module
    • SLM Module
    • SNL Module
    • SVD Module
    • SFC Module
    • PCM Module
    • ASNR Module

HLC Module

Follow the steps below to set up the simulation:

  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)
  5. Output is in sigOut.pcm.

SLM Module

Follow the steps below 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.
  5. Output is in sigOut.pcm.

SNL Module

Follow the steps below to set up the simulation:

  1. Set vpeSim->snl_on to 1
  2. Run the simulation.
  3. SNL doesn't modify the input signal, but will store the signal and noise level estimates 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 below to set up the simulation:

  1. Set vpeSim->svd_on to 1
  2. Run the simulation.
  3. SVD doesn't modify the input signal, but will store the signal and noise level information 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).

ASNR Module

Follow the steps below to set up the simulation:

  1. Edit configuration file vpecfg.txt to have desired ASNR configuration.
  2. Set vpeSim->nr_on to 1
  3. Run the simulation.
  4. Output is in sigOut.pcm.

PCM Module

Follow the steps below to set up the PCM encoder simulation:

  1. Set vpeSim->ulaw_enc_on or vpeSim->alaw_enc_on to 1
  2. Run the simulation.
  3. A-law or u-law code words are stored in sigOut.pcm.

Follow the steps below to set up the PCM decoder simulation:

  1. Provide a u-law or A-law binary file as sigIn.pcm.
  2. Set vpeSim->ulaw_dec_on or vpeSim->alaw_dec_on to 1
  3. Run the simulation.
  4. 16-bit linear samples are stored in sigOut.pcm (binary little endian).

SFC Module

Follow the steps below to set up the downsampler simulation:

  1. Set vpeSim->decim_on 1
  2. Run the simulation.
  3. 8kHz 16-bit linear samples are stored in sigOut.pcm (binary little endian).

Follow the steps below to set up the upsampler simulation:

  1. Provide a 8kHz 16-bit linear samples input as sigIn.pcm (binary little endian).
  2. Set vpeSim->interp_on 1
  3. Run the simulation.
  4. 16kHz 16-bit linear samples are stored in sigOut.pcm (binary little endian).


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]
nrbufs.c [code]
nrbufst.h [code]
nrsim.c [code]
vpesim.c [code]
vpesim.h [code]
vpesim_setup.c [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
  • asnrParam : vpeSimConfig_t

- b -

  • band1_max_atten : vpeASNRPars_t
  • band2_max_atten : vpeASNRPars_t
  • band3_max_atten : vpeASNRPars_t
  • band_bin1 : vpeASNRPars_t
  • band_bin2 : vpeASNRPars_t
  • baseDir : vpeSimConfig_t

- c -

  • cfg_hlc : vpeSimConfig_t
  • cfg_sgn : vpeSimConfig_t
  • cfg_slm : vpeSimConfig_t
  • config : vpeSimConfig_t

- d -

  • data : vpeSimConfig_t
  • dcoffset : vpeSGNPars_t
  • decim_on : vpeSimConfig_t
  • delay : vpeASNRPars_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
  • noise_hangover : vpeASNRPars_t
  • noise_thresh : vpeASNRPars_t
  • nr_on : vpeSimConfig_t
  • nseed : vpeSGNPars_t
  • ntype : vpeSGNPars_t

- p -

  • pcmin_format : vpeSimConfig_t
  • pcmout_format : vpeSimConfig_t
  • pow_level : vpeSGNPars_t

- s -

  • samp_rate : vpeASNRPars_t
  • sample_bp : vpeSimConfig_t
  • sample_cnt : vpeSimConfig_t
  • sgn : vpeSimConfig_t
  • sgnParam : vpeSimConfig_t
  • sig_upd_rate_max : vpeASNRPars_t
  • sig_upd_rate_min : vpeASNRPars_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
  • asnrParam : vpeSimConfig_t

- b -

  • band1_max_atten : vpeASNRPars_t
  • band2_max_atten : vpeASNRPars_t
  • band3_max_atten : vpeASNRPars_t
  • band_bin1 : vpeASNRPars_t
  • band_bin2 : vpeASNRPars_t
  • baseDir : vpeSimConfig_t

- c -

  • cfg_hlc : vpeSimConfig_t
  • cfg_sgn : vpeSimConfig_t
  • cfg_slm : vpeSimConfig_t
  • config : vpeSimConfig_t

- d -

  • data : vpeSimConfig_t
  • dcoffset : vpeSGNPars_t
  • decim_on : vpeSimConfig_t
  • delay : vpeASNRPars_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
  • noise_hangover : vpeASNRPars_t
  • noise_thresh : vpeASNRPars_t
  • nr_on : vpeSimConfig_t
  • nseed : vpeSGNPars_t
  • ntype : vpeSGNPars_t

- p -

  • pcmin_format : vpeSimConfig_t
  • pcmout_format : vpeSimConfig_t
  • pow_level : vpeSGNPars_t

- s -

  • samp_rate : vpeASNRPars_t
  • sample_bp : vpeSimConfig_t
  • sample_cnt : vpeSimConfig_t
  • sgn : vpeSimConfig_t
  • sgnParam : vpeSimConfig_t
  • sig_upd_rate_max : vpeASNRPars_t
  • sig_upd_rate_min : vpeASNRPars_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 , vpesim_setup.c

- h -

  • hctrlInst : vpesim.c
  • hctrlInst_ptr : vpesim_setup.c , vpesim.c
  • hlcInst_ptr : vpesim_setup.c , vpesim.c

- i -

  • inCnt : vpesim_setup.c
  • inFrame : vpesim_setup.c
  • interpDelayLine : vpesim.c , vpesim_setup.c

- m -

  • main() : vpesim.c

- n -

  • noiseLevdB : vpesim.c
  • nr_buff0 : nrbufs.c , nrbufst.h
  • nr_buff1 : nrbufs.c , nrbufst.h
  • nr_buff2 : nrbufst.h , nrbufs.c
  • nr_buff3 : nrbufst.h , nrbufs.c
  • nr_buff4 : nrbufst.h , nrbufs.c
  • nr_buff5 : nrbufst.h , nrbufs.c
  • nr_buff6 : nrbufst.h , nrbufs.c
  • nr_handle : nrsim.c
  • NR_SIM_BUF0_ALGN : nrbufst.h
  • NR_SIM_BUF1_ALGN : nrbufst.h
  • NR_SIM_BUF2_ALGN : nrbufst.h
  • NR_SIM_BUF3_ALGN : nrbufst.h
  • NR_SIM_BUF4_ALGN : nrbufst.h
  • NR_SIM_BUF5_ALGN : nrbufst.h
  • NR_SIM_BUF6_ALGN : nrbufst.h
  • nrInst_ptr : nrsim.c , vpesim.c
  • Nthresh : vpesim.c

- o -

  • outCnt : vpesim_setup.c
  • outFrame : vpesim_setup.c

- s -

  • sgnInst_ptr : vpesim.c , vpesim_setup.c
  • sigInBuffer : vpesim.c
  • sigOutBuffer : vpesim.c
  • slmInst_ptr : vpesim_setup.c , vpesim.c
  • snlInst_ptr : vpesim.c , vpesim_setup.c
  • snlLevOut : vpesim_setup.c , vpesim.c
  • spchLevdB : vpesim.c
  • svdInst_ptr : vpesim_setup.c , vpesim.c
  • svdOut : vpesim_setup.c , vpesim.c

- v -

  • vpe_banner_print() : vpesim.c
  • vpe_config_nr() : nrsim.c , vpesim.h
  • vpe_deinstantiate_nr() : nrsim.c , vpesim.h
  • vpe_halt() : vpesim.h , vpesim_setup.c
  • vpe_init() : vpesim.h , vpesim_setup.c
  • vpe_instantiate_nr() : nrsim.c , vpesim.h
  • vpe_iprint() : vpesim.h , vpesim_setup.c
  • VPE_NR_NUM_BUFS : nrbufst.h
  • vpe_print() : vpesim.h , vpesim_setup.c
  • vpe_SGN_DEF_DC_OFFSET : vpesim_setup.c
  • vpe_SGN_DEF_F1 : vpesim_setup.c
  • vpe_SGN_DEF_F2 : vpesim_setup.c
  • vpe_SGN_DEF_FSK_DATA_LEN : vpesim_setup.c
  • vpe_SGN_DEF_FSK_DURATION : vpesim_setup.c
  • vpe_SGN_DEF_HOTH_WNG_SEED : vpesim_setup.c
  • vpe_SGN_DEF_NOISE_LEVEL : vpesim_setup.c
  • vpe_SGN_DEF_NOISE_SEED : vpesim_setup.c
  • vpe_SGN_DEF_NOISE_TYPE : vpesim_setup.c
  • vpe_SGN_DEF_POWER_LEVEL : vpesim_setup.c
  • vpe_SGN_DEF_PR_ENABLE : vpesim_setup.c
  • vpe_SGN_DEF_PR_PERIOD : vpesim_setup.c
  • vpe_SGN_DEF_T_AMP1 : vpesim_setup.c
  • vpe_SGN_DEF_T_AMP2 : vpesim_setup.c
  • vpe_SGN_DEF_WF_TYPE : vpesim_setup.c
  • VPE_SIM_DECIM_DELAY_LEN : vpesim.h
  • VPE_SIM_DECIM_FILT_DEL : vpesim.h
  • vpe_SIM_DEF_BASE_DIR : vpesim.h
  • vpe_SIM_DEF_CONFIG_FNAME : vpesim.h
  • vpe_SIM_DEF_SIGIN_FNAME : vpesim.h
  • vpe_SIM_DEF_SIGOUT_FNAME : vpesim.h
  • vpe_SIM_ERR_1 : vpesim.h
  • vpe_SIM_ERR_10 : vpesim.h
  • vpe_SIM_ERR_11 : vpesim.h
  • vpe_SIM_ERR_12 : vpesim.h
  • vpe_SIM_ERR_13 : vpesim.h
  • vpe_SIM_ERR_14 : vpesim.h
  • vpe_SIM_ERR_15 : vpesim.h
  • vpe_SIM_ERR_16 : vpesim.h
  • vpe_SIM_ERR_17 : vpesim.h
  • vpe_SIM_ERR_18 : vpesim.h
  • vpe_SIM_ERR_2 : vpesim.h
  • vpe_SIM_ERR_3 : vpesim.h
  • vpe_SIM_ERR_4 : vpesim.h
  • vpe_SIM_ERR_5 : vpesim.h
  • vpe_SIM_ERR_6 : vpesim.h
  • vpe_SIM_ERR_7 : vpesim.h
  • vpe_SIM_ERR_8 : vpesim.h
  • vpe_SIM_ERR_9 : vpesim.h
  • vpe_sim_fileio_end() : vpesim.h , vpesim_setup.c
  • vpe_sim_fileio_init() : vpesim_setup.c , vpesim.h
  • vpe_SIM_FILEIO_READ : vpesim.h
  • vpe_SIM_FILEIO_WRITE : vpesim.h
  • vpe_sim_flush_cache() : vpesim_setup.c , vpesim.h
  • VPE_SIM_FRAME_SIZE_16000 : vpesim.h
  • VPE_SIM_FRAME_SIZE_8000 : vpesim.h
  • vpe_sim_fread() : vpesim_setup.c , vpesim.h
  • vpe_sim_fsk_data : vpesim_setup.c
  • vpe_sim_fwrite() : vpesim.h , vpesim_setup.c
  • vpe_sim_gen_frame() : vpesim.h , vpesim_setup.c
  • vpe_sim_global_str : vpesim_setup.c
  • vpe_sim_in_file() : vpesim.h , vpesim_setup.c
  • vpe_sim_init() : vpesim.h , vpesim_setup.c
  • vpe_sim_input_mux() : vpesim.h
  • VPE_SIM_INTERP_DELAY_LEN : vpesim.h
  • VPE_SIM_INTERP_FILT_DEL : vpesim.h
  • vpe_SIM_MAX_ECOBUFS : vpesim.h
  • vpe_SIM_MAX_SAMPLES : vpesim.h
  • vpe_SIM_MAX_STRING : vpesim.h
  • vpe_sim_open_sgn() : vpesim.h , vpesim_setup.c
  • vpe_sim_out_file() : vpesim_setup.c
  • vpe_sim_output_mux() : vpesim.h
  • vpe_SIM_PCM_ALAW : vpesim.h
  • vpe_SIM_PCM_LIN : vpesim.h
  • vpe_SIM_PCM_ULAW : vpesim.h
  • vpe_sim_print_str : vpesim_setup.c
  • vpe_sim_read_cfg() : vpesim_setup.c , vpesim.h
  • VPE_SIM_SAMPLE_FREQ_16000 : vpesim.h
  • VPE_SIM_SAMPLE_FREQ_8000 : vpesim.h
  • vpe_sim_set_sgn() : vpesim_setup.c , vpesim.h
  • vpe_sprint() : vpesim.h , vpesim_setup.c
  • vpe_temp_io_buf : vpesim_setup.c
  • vpeIOBufs : vpesim.c
  • vpeSim : vpesim.c , vpesim_setup.c
  • VPESIM_NUM_BYTES_LINSAMP : vpesim_setup.c
  • vpeSimC : vpesim.c
  • vpeSimPcm_e : vpesim.h
  • VPETEST_ARM_GCARMV7A : nrbufst.h
  • VPETEST_C55L : nrbufst.h
  • VPETEST_C55S : nrbufst.h
  • VPETEST_C64P : nrbufst.h
  • VPETEST_C64P_BIG_ENDIAN : nrbufst.h
  • VPETEST_C64P_BIG_ENDIAN_ELF : nrbufst.h
  • VPETEST_C64P_ELF : nrbufst.h
  • VPETEST_C66 : nrbufst.h
  • VPETEST_C66_BIG_ENDIAN : nrbufst.h
  • VPETEST_C66_BIG_ENDIAN_ELF : nrbufst.h
  • VPETEST_C66_ELF : nrbufst.h
  • VPETEST_C674 : nrbufst.h
  • VPETEST_C674_ELF : nrbufst.h


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • n
  • 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

- n -

  • NR_SIM_BUF0_ALGN : nrbufst.h
  • NR_SIM_BUF1_ALGN : nrbufst.h
  • NR_SIM_BUF2_ALGN : nrbufst.h
  • NR_SIM_BUF3_ALGN : nrbufst.h
  • NR_SIM_BUF4_ALGN : nrbufst.h
  • NR_SIM_BUF5_ALGN : nrbufst.h
  • NR_SIM_BUF6_ALGN : nrbufst.h

- v -

  • VPE_NR_NUM_BUFS : nrbufst.h
  • vpe_SGN_DEF_DC_OFFSET : vpesim_setup.c
  • vpe_SGN_DEF_F1 : vpesim_setup.c
  • vpe_SGN_DEF_F2 : vpesim_setup.c
  • vpe_SGN_DEF_FSK_DATA_LEN : vpesim_setup.c
  • vpe_SGN_DEF_FSK_DURATION : vpesim_setup.c
  • vpe_SGN_DEF_HOTH_WNG_SEED : vpesim_setup.c
  • vpe_SGN_DEF_NOISE_LEVEL : vpesim_setup.c
  • vpe_SGN_DEF_NOISE_SEED : vpesim_setup.c
  • vpe_SGN_DEF_NOISE_TYPE : vpesim_setup.c
  • vpe_SGN_DEF_POWER_LEVEL : vpesim_setup.c
  • vpe_SGN_DEF_PR_ENABLE : vpesim_setup.c
  • vpe_SGN_DEF_PR_PERIOD : vpesim_setup.c
  • vpe_SGN_DEF_T_AMP1 : vpesim_setup.c
  • vpe_SGN_DEF_T_AMP2 : vpesim_setup.c
  • vpe_SGN_DEF_WF_TYPE : vpesim_setup.c
  • VPE_SIM_DECIM_DELAY_LEN : vpesim.h
  • VPE_SIM_DECIM_FILT_DEL : vpesim.h
  • vpe_SIM_DEF_BASE_DIR : vpesim.h
  • vpe_SIM_DEF_CONFIG_FNAME : vpesim.h
  • vpe_SIM_DEF_SIGIN_FNAME : vpesim.h
  • vpe_SIM_DEF_SIGOUT_FNAME : vpesim.h
  • vpe_SIM_ERR_1 : vpesim.h
  • vpe_SIM_ERR_10 : vpesim.h
  • vpe_SIM_ERR_11 : vpesim.h
  • vpe_SIM_ERR_12 : vpesim.h
  • vpe_SIM_ERR_13 : vpesim.h
  • vpe_SIM_ERR_14 : vpesim.h
  • vpe_SIM_ERR_15 : vpesim.h
  • vpe_SIM_ERR_16 : vpesim.h
  • vpe_SIM_ERR_17 : vpesim.h
  • vpe_SIM_ERR_18 : vpesim.h
  • vpe_SIM_ERR_2 : vpesim.h
  • vpe_SIM_ERR_3 : vpesim.h
  • vpe_SIM_ERR_4 : vpesim.h
  • vpe_SIM_ERR_5 : vpesim.h
  • vpe_SIM_ERR_6 : vpesim.h
  • vpe_SIM_ERR_7 : vpesim.h
  • vpe_SIM_ERR_8 : vpesim.h
  • vpe_SIM_ERR_9 : vpesim.h
  • vpe_SIM_FILEIO_READ : vpesim.h
  • vpe_SIM_FILEIO_WRITE : vpesim.h
  • VPE_SIM_FRAME_SIZE_16000 : vpesim.h
  • VPE_SIM_FRAME_SIZE_8000 : vpesim.h
  • VPE_SIM_INTERP_DELAY_LEN : vpesim.h
  • VPE_SIM_INTERP_FILT_DEL : vpesim.h
  • vpe_SIM_MAX_ECOBUFS : vpesim.h
  • vpe_SIM_MAX_SAMPLES : vpesim.h
  • vpe_SIM_MAX_STRING : vpesim.h
  • VPE_SIM_SAMPLE_FREQ_16000 : vpesim.h
  • VPE_SIM_SAMPLE_FREQ_8000 : vpesim.h
  • VPESIM_NUM_BYTES_LINSAMP : vpesim_setup.c
  • VPETEST_ARM_GCARMV7A : nrbufst.h
  • VPETEST_C55L : nrbufst.h
  • VPETEST_C55S : nrbufst.h
  • VPETEST_C64P : nrbufst.h
  • VPETEST_C64P_BIG_ENDIAN : nrbufst.h
  • VPETEST_C64P_BIG_ENDIAN_ELF : nrbufst.h
  • VPETEST_C64P_ELF : nrbufst.h
  • VPETEST_C66 : nrbufst.h
  • VPETEST_C66_BIG_ENDIAN : nrbufst.h
  • VPETEST_C66_BIG_ENDIAN_ELF : nrbufst.h
  • VPETEST_C66_ELF : nrbufst.h
  • VPETEST_C674 : nrbufst.h
  • VPETEST_C674_ELF : nrbufst.h


VPE Test: Data Fields

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

  • vpeSimPcm_e : vpesim.h


VPE Test: Data Fields

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

  • vpe_SIM_PCM_ALAW : vpesim.h
  • vpe_SIM_PCM_LIN : vpesim.h
  • vpe_SIM_PCM_ULAW : vpesim.h


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • m
  • v

- m -

  • main() : vpesim.c

- v -

  • vpe_banner_print() : vpesim.c
  • vpe_config_nr() : nrsim.c , vpesim.h
  • vpe_deinstantiate_nr() : vpesim.h , nrsim.c
  • vpe_halt() : vpesim.h , vpesim_setup.c
  • vpe_init() : vpesim.h , vpesim_setup.c
  • vpe_instantiate_nr() : nrsim.c , vpesim.h
  • vpe_iprint() : vpesim.h , vpesim_setup.c
  • vpe_print() : vpesim.h , vpesim_setup.c
  • vpe_sim_fileio_end() : vpesim.h , vpesim_setup.c
  • vpe_sim_fileio_init() : vpesim.h , vpesim_setup.c
  • vpe_sim_flush_cache() : vpesim_setup.c , vpesim.h
  • vpe_sim_fread() : vpesim_setup.c , vpesim.h
  • vpe_sim_fwrite() : vpesim_setup.c , vpesim.h
  • vpe_sim_gen_frame() : vpesim.h , vpesim_setup.c
  • vpe_sim_in_file() : vpesim_setup.c , vpesim.h
  • vpe_sim_init() : vpesim_setup.c , vpesim.h
  • vpe_sim_input_mux() : vpesim.h
  • vpe_sim_open_sgn() : vpesim.h , vpesim_setup.c
  • vpe_sim_out_file() : vpesim_setup.c
  • vpe_sim_output_mux() : vpesim.h
  • vpe_sim_read_cfg() : vpesim_setup.c , vpesim.h
  • vpe_sim_set_sgn() : vpesim.h , vpesim_setup.c
  • vpe_sprint() : vpesim.h , vpesim_setup.c


VPE Test: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • d
  • h
  • i
  • n
  • o
  • s
  • v

- d -

  • decimDelayLine : vpesim.c , vpesim_setup.c

- h -

  • hctrlInst : vpesim.c
  • hctrlInst_ptr : vpesim_setup.c , vpesim.c
  • hlcInst_ptr : vpesim_setup.c , vpesim.c

- i -

  • inCnt : vpesim_setup.c
  • inFrame : vpesim_setup.c
  • interpDelayLine : vpesim.c , vpesim_setup.c

- n -

  • noiseLevdB : vpesim.c
  • nr_buff0 : nrbufs.c , nrbufst.h
  • nr_buff1 : nrbufs.c , nrbufst.h
  • nr_buff2 : nrbufst.h , nrbufs.c
  • nr_buff3 : nrbufs.c , nrbufst.h
  • nr_buff4 : nrbufs.c , nrbufst.h
  • nr_buff5 : nrbufst.h , nrbufs.c
  • nr_buff6 : nrbufst.h , nrbufs.c
  • nr_handle : nrsim.c
  • nrInst_ptr : vpesim.c , nrsim.c
  • Nthresh : vpesim.c

- o -

  • outCnt : vpesim_setup.c
  • outFrame : vpesim_setup.c

- s -

  • sgnInst_ptr : vpesim.c , vpesim_setup.c
  • sigInBuffer : vpesim.c
  • sigOutBuffer : vpesim.c
  • slmInst_ptr : vpesim_setup.c , vpesim.c
  • snlInst_ptr : vpesim.c , vpesim_setup.c
  • snlLevOut : vpesim_setup.c , vpesim.c
  • spchLevdB : vpesim.c
  • svdInst_ptr : vpesim_setup.c , vpesim.c
  • svdOut : vpesim_setup.c , vpesim.c

- v -

  • vpe_sim_fsk_data : vpesim_setup.c
  • vpe_sim_global_str : vpesim_setup.c
  • vpe_sim_print_str : vpesim_setup.c
  • vpe_temp_io_buf : vpesim_setup.c
  • vpeIOBufs : vpesim.c
  • vpeSim : vpesim_setup.c , 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. 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 CCSV5 and may be used for those who haven't yet upgraded to CCSV5 (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 CCSV5 (Eclipse).

  1. Open CCS
  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: nrbufs.c File Reference

  • File List
  • Globals

nrbufs.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/vpe/test/src/nrbufst.h>

Include dependency graph for nrbufs.c:

Go to the source code of this file.

Variables

tword | nr_buff0 [NR_SIM_BUF0_SIZE]
tword | nr_buff1 [NR_SIM_BUF1_SIZE]
tword | nr_buff2 [NR_SIM_BUF2_SIZE]
tword | nr_buff3 [NR_SIM_BUF3_SIZE]
tword | nr_buff4 [NR_SIM_BUF4_SIZE]
tword | nr_buff5 [NR_SIM_BUF5_SIZE]
tword | nr_buff6 [NR_SIM_BUF6_SIZE]

Variable Documentation

tword nr_buff0[NR_SIM_BUF0_SIZE]

Definition at line 86 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff1[NR_SIM_BUF1_SIZE]

Definition at line 89 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff2[NR_SIM_BUF2_SIZE]

Definition at line 92 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff3[NR_SIM_BUF3_SIZE]

Definition at line 95 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff4[NR_SIM_BUF4_SIZE]

Definition at line 98 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff5[NR_SIM_BUF5_SIZE]

Definition at line 101 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff6[NR_SIM_BUF6_SIZE]

Definition at line 104 of file nrbufs.c.

Referenced by vpe_instantiate_nr().


VPE Test: nrbufs.c Source File

  • File List
  • Globals

nrbufs.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------
00002  * Filename:  nrbufs.c
00003  *
00004  * Description: Definition of NR buffers for C55x and C6x.
00005  *
00006  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00007  *
00008  *              All rights reserved not granted herein.
00009  *
00010  *                         Limited License.
00011  *
00012  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00013  *  non-exclusive license under copyrights and patents it now or hereafter owns
00014  *  or controls to make, have made, use, import, offer to sell and sell
00015  *  ("Utilize") this software subject to the terms herein.  With respect to the
00016  *  foregoing patent license, such license is granted solely to the extent that
00017  *  any such patent is necessary to Utilize the software alone.  The patent
00018  *  license shall not apply to any combinations which include this software,
00019  *  other than combinations with devices manufactured by or for TI (“TI
00020  *  Devices”).  No hardware patent is licensed hereunder.
00021  *
00022  *  Redistributions must preserve existing copyright notices and reproduce this
00023  *  license (including the above copyright notice and the disclaimer and (if
00024  *  applicable) source code license limitations below) in the documentation
00025  *  and/or other materials provided with the distribution
00026  *
00027  *  Redistribution and use in binary form, without modification, are permitted
00028  *  provided that the following conditions are met:
00029  *
00030  *    *  No reverse engineering, decompilation, or disassembly of this software
00031  *  is permitted with respect to any software provided in binary form.
00032  *
00033  *    *  any redistribution and use are licensed by TI for use only with TI
00034  *  Devices.
00035  *
00036  *    *  Nothing shall obligate TI to provide you with source code for the
00037  *  software licensed and provided to you in object code.
00038  *
00039  *  If software source code is provided to you, modification and redistribution
00040  *  of the source code are permitted provided that the following conditions are
00041  *  met:
00042  *
00043  *    *  any redistribution and use of the source code, including any resulting
00044  *  derivative works, are licensed by TI for use only with TI Devices.
00045  *
00046  *    *  any redistribution and use of any object code compiled from the source
00047  *  code and any resulting derivative works, are licensed by TI for use only
00048  *  with TI Devices.
00049  *
00050  *  Neither the name of Texas Instruments Incorporated nor the names of its
00051  *  suppliers may be used to endorse or promote products derived from this
00052  *  software without specific prior written permission.
00053  *
00054  *  DISCLAIMER.
00055  *
00056  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00057  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00058  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00059  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00060  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00061  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00062  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00063  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00064  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00065  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00066  *  DAMAGE.
00067  *-----------------------------------------------------------------*/
00068
00069 #include <ti/mas/types/types.h>
00070 #include <ti/mas/vpe/test/src/nrbufst.h>
00071
00072 /* Allocate memory for NR buffers - size and alignment, for ARM */
00073 #if VPETEST_ARM_GCARMV7A
00074 tword nr_buff0[NR_SIM_BUF0_SIZE] __attribute__ ((aligned (NR_SIM_BUF0_ALGN)));
00075 tword nr_buff1[NR_SIM_BUF1_SIZE] __attribute__ ((aligned (NR_SIM_BUF1_ALGN)));
00076 tword nr_buff2[NR_SIM_BUF2_SIZE] __attribute__ ((aligned (NR_SIM_BUF2_ALGN)));
00077 tword nr_buff3[NR_SIM_BUF3_SIZE] __attribute__ ((aligned (NR_SIM_BUF3_ALGN)));
00078 tword nr_buff4[NR_SIM_BUF4_SIZE] __attribute__ ((aligned (NR_SIM_BUF4_ALGN)));
00079 tword nr_buff5[NR_SIM_BUF5_SIZE] __attribute__ ((aligned (NR_SIM_BUF5_ALGN)));
00080 tword nr_buff6[NR_SIM_BUF6_SIZE] __attribute__ ((aligned (NR_SIM_BUF6_ALGN)));
00081
00082 #else
00083
00084 /* Allocate memory for NR buffers - size and alignment, for C55x/C6x */
00085 #pragma DATA_ALIGN  (nr_buff0, NR_SIM_BUF0_ALGN)
00086 tword nr_buff0[NR_SIM_BUF0_SIZE];
00087
00088 #pragma DATA_ALIGN  (nr_buff1, NR_SIM_BUF1_ALGN)
00089 tword nr_buff1[NR_SIM_BUF1_SIZE];
00090
00091 #pragma DATA_ALIGN  (nr_buff2, NR_SIM_BUF2_ALGN)
00092 tword nr_buff2[NR_SIM_BUF2_SIZE];
00093
00094 #pragma DATA_ALIGN  (nr_buff3, NR_SIM_BUF3_ALGN)
00095 tword nr_buff3[NR_SIM_BUF3_SIZE];
00096
00097 #pragma DATA_ALIGN  (nr_buff4, NR_SIM_BUF4_ALGN)
00098 tword nr_buff4[NR_SIM_BUF4_SIZE];
00099
00100 #pragma DATA_ALIGN  (nr_buff5, NR_SIM_BUF5_ALGN)
00101 tword nr_buff5[NR_SIM_BUF5_SIZE];
00102
00103 #pragma DATA_ALIGN  (nr_buff6, NR_SIM_BUF6_ALGN)
00104 tword nr_buff6[NR_SIM_BUF6_SIZE];
00105
00106 #endif
00107
00108


VPE Test: nrbufst.h File Reference

  • File List
  • Globals

nrbufst.h File Reference

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

Go to the source code of this file.

Defines

#define | VPETEST_C55L 0
#define | VPETEST_C55S 0
#define | VPETEST_C64P 0
#define | VPETEST_C64P_ELF 0
#define | VPETEST_C64P_BIG_ENDIAN 0
#define | VPETEST_C64P_BIG_ENDIAN_ELF 0
#define | VPETEST_C66 0
#define | VPETEST_C66_ELF 0
#define | VPETEST_C66_BIG_ENDIAN 0
#define | VPETEST_C66_BIG_ENDIAN_ELF 0
#define | VPETEST_C674 0
#define | VPETEST_C674_ELF 0
#define | VPETEST_ARM_GCARMV7A 0
#define | VPE_NR_NUM_BUFS 7
#define | NR_SIM_BUF0_ALGN (1<<NR_SIM_BUF0_ALGN_LOG2)
#define | NR_SIM_BUF1_ALGN (1<<NR_SIM_BUF1_ALGN_LOG2)
#define | NR_SIM_BUF2_ALGN (1<<NR_SIM_BUF2_ALGN_LOG2)
#define | NR_SIM_BUF3_ALGN (1<<NR_SIM_BUF3_ALGN_LOG2)
#define | NR_SIM_BUF4_ALGN (1<<NR_SIM_BUF4_ALGN_LOG2)
#define | NR_SIM_BUF5_ALGN (1<<NR_SIM_BUF5_ALGN_LOG2)
#define | NR_SIM_BUF6_ALGN (1<<NR_SIM_BUF6_ALGN_LOG2)

Variables

tword | nr_buff0 []
tword | nr_buff1 []
tword | nr_buff2 []
tword | nr_buff3 []
tword | nr_buff4 []
tword | nr_buff5 []
tword | nr_buff6 []

Define Documentation

#define VPETEST_C55L 0

Definition at line 74 of file nrbufst.h.

#define VPETEST_C55S 0

Definition at line 80 of file nrbufst.h.

#define VPETEST_C64P 0

Definition at line 86 of file nrbufst.h.

#define VPETEST_C64P_ELF 0

Definition at line 92 of file nrbufst.h.

#define VPETEST_C64P_BIG_ENDIAN 0

Definition at line 98 of file nrbufst.h.

#define VPETEST_C64P_BIG_ENDIAN_ELF 0

Definition at line 104 of file nrbufst.h.

#define VPETEST_C66 0

Definition at line 110 of file nrbufst.h.

#define VPETEST_C66_ELF 0

Definition at line 116 of file nrbufst.h.

#define VPETEST_C66_BIG_ENDIAN 0

Definition at line 122 of file nrbufst.h.

#define VPETEST_C66_BIG_ENDIAN_ELF 0

Definition at line 128 of file nrbufst.h.

#define VPETEST_C674 0

Definition at line 134 of file nrbufst.h.

#define VPETEST_C674_ELF 0

Definition at line 140 of file nrbufst.h.

#define VPETEST_ARM_GCARMV7A 0

Definition at line 148 of file nrbufst.h.

#define VPE_NR_NUM_BUFS 7

Definition at line 162 of file nrbufst.h.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

#define NR_SIM_BUF0_ALGN (1<<NR_SIM_BUF0_ALGN_LOG2)

Definition at line 164 of file nrbufst.h.

#define NR_SIM_BUF1_ALGN (1<<NR_SIM_BUF1_ALGN_LOG2)

Definition at line 165 of file nrbufst.h.

#define NR_SIM_BUF2_ALGN (1<<NR_SIM_BUF2_ALGN_LOG2)

Definition at line 166 of file nrbufst.h.

#define NR_SIM_BUF3_ALGN (1<<NR_SIM_BUF3_ALGN_LOG2)

Definition at line 167 of file nrbufst.h.

#define NR_SIM_BUF4_ALGN (1<<NR_SIM_BUF4_ALGN_LOG2)

Definition at line 168 of file nrbufst.h.

#define NR_SIM_BUF5_ALGN (1<<NR_SIM_BUF5_ALGN_LOG2)

Definition at line 169 of file nrbufst.h.

#define NR_SIM_BUF6_ALGN (1<<NR_SIM_BUF6_ALGN_LOG2)

Definition at line 170 of file nrbufst.h.

Variable Documentation

tword nr_buff0[]

Definition at line 86 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff1[]

Definition at line 89 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff2[]

Definition at line 92 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff3[]

Definition at line 95 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff4[]

Definition at line 98 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff5[]

Definition at line 101 of file nrbufs.c.

Referenced by vpe_deinstantiate_nr(), and vpe_instantiate_nr().

tword nr_buff6[]

Definition at line 104 of file nrbufs.c.

Referenced by vpe_instantiate_nr().


VPE Test: nrbufst.h Source File

  • File List
  • Globals

nrbufst.h

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------
00002  * Filename:  nrbufs.h
00003  *
00004  * Description: Definitions for NR buffers
00005  *
00006  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00007  *
00008  *              All rights reserved not granted herein.
00009  *
00010  *                         Limited License.
00011  *
00012  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00013  *  non-exclusive license under copyrights and patents it now or hereafter owns
00014  *  or controls to make, have made, use, import, offer to sell and sell
00015  *  ("Utilize") this software subject to the terms herein.  With respect to the
00016  *  foregoing patent license, such license is granted solely to the extent that
00017  *  any such patent is necessary to Utilize the software alone.  The patent
00018  *  license shall not apply to any combinations which include this software,
00019  *  other than combinations with devices manufactured by or for TI (“TI
00020  *  Devices”).  No hardware patent is licensed hereunder.
00021  *
00022  *  Redistributions must preserve existing copyright notices and reproduce this
00023  *  license (including the above copyright notice and the disclaimer and (if
00024  *  applicable) source code license limitations below) in the documentation
00025  *  and/or other materials provided with the distribution
00026  *
00027  *  Redistribution and use in binary form, without modification, are permitted
00028  *  provided that the following conditions are met:
00029  *
00030  *    *  No reverse engineering, decompilation, or disassembly of this software
00031  *  is permitted with respect to any software provided in binary form.
00032  *
00033  *    *  any redistribution and use are licensed by TI for use only with TI
00034  *  Devices.
00035  *
00036  *    *  Nothing shall obligate TI to provide you with source code for the
00037  *  software licensed and provided to you in object code.
00038  *
00039  *  If software source code is provided to you, modification and redistribution
00040  *  of the source code are permitted provided that the following conditions are
00041  *  met:
00042  *
00043  *    *  any redistribution and use of the source code, including any resulting
00044  *  derivative works, are licensed by TI for use only with TI Devices.
00045  *
00046  *    *  any redistribution and use of any object code compiled from the source
00047  *  code and any resulting derivative works, are licensed by TI for use only
00048  *  with TI Devices.
00049  *
00050  *  Neither the name of Texas Instruments Incorporated nor the names of its
00051  *  suppliers may be used to endorse or promote products derived from this
00052  *  software without specific prior written permission.
00053  *
00054  *  DISCLAIMER.
00055  *
00056  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00057  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00058  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00059  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00060  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00061  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00062  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00063  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00064  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00065  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00066  *  DAMAGE.
00067  *-----------------------------------------------------------------*/
00068 #ifndef _NRBUFS_H
00069 #define _NRBUFS_H
00070
00071 #ifdef ti_targets_C55_large
00072 #define VPETEST_C55L 1
00073 #else
00074 #define VPETEST_C55L 0
00075 #endif
00076
00077 #ifdef ti_targets_C55_small
00078 #define VPETEST_C55S 1
00079 #else
00080 #define VPETEST_C55S 0
00081 #endif
00082
00083 #ifdef ti_targets_C64P
00084 #define VPETEST_C64P 1
00085 #else
00086 #define VPETEST_C64P 0
00087 #endif
00088
00089 #ifdef ti_targets_elf_C64P
00090 #define VPETEST_C64P_ELF 1
00091 #else
00092 #define VPETEST_C64P_ELF 0
00093 #endif
00094
00095 #ifdef ti_targets_C64P_big_endian
00096 #define VPETEST_C64P_BIG_ENDIAN 1
00097 #else
00098 #define VPETEST_C64P_BIG_ENDIAN 0
00099 #endif
00100
00101 #ifdef ti_targets_elf_C64P_big_endian
00102 #define VPETEST_C64P_BIG_ENDIAN_ELF 1
00103 #else
00104 #define VPETEST_C64P_BIG_ENDIAN_ELF 0
00105 #endif
00106
00107 #ifdef ti_targets_C66
00108 #define VPETEST_C66 1
00109 #else
00110 #define VPETEST_C66 0
00111 #endif
00112
00113 #ifdef ti_targets_elf_C66
00114 #define VPETEST_C66_ELF 1
00115 #else
00116 #define VPETEST_C66_ELF 0
00117 #endif
00118
00119 #ifdef ti_targets_C66_big_endian
00120 #define VPETEST_C66_BIG_ENDIAN 1
00121 #else
00122 #define VPETEST_C66_BIG_ENDIAN 0
00123 #endif
00124
00125 #ifdef ti_targets_elf_C66_big_endian
00126 #define VPETEST_C66_BIG_ENDIAN_ELF 1
00127 #else
00128 #define VPETEST_C66_BIG_ENDIAN_ELF 0
00129 #endif
00130
00131 #ifdef ti_targets_C674
00132 #define VPETEST_C674 1
00133 #else
00134 #define VPETEST_C674 0
00135 #endif
00136
00137 #ifdef ti_targets_elf_C674
00138 #define VPETEST_C674_ELF 1
00139 #else
00140 #define VPETEST_C674_ELF 0
00141 #endif
00142
00143 /* C674 devices do not support big endian */
00144
00145 #ifdef gnu_targets_arm_GCArmv7A
00146 #define VPETEST_ARM_GCARMV7A 1
00147 #else
00148 #define VPETEST_ARM_GCARMV7A 0
00149 #endif
00150
00151 #if VPETEST_C55L || VPETEST_C55S
00152 #include <ti/mas/vpe/test/src/c55/nrbufst.h>
00153 #elif VPETEST_C64P || VPETEST_C64P_BIG_ENDIAN || VPETEST_C674 || VPETEST_C64P_ELF || VPETEST_C64P_BIG_ENDIAN_ELF || VPETEST_C674_ELF || VPETEST_C66 || VPETEST_C66_BIG_ENDIAN || VPETEST_C66_ELF || VPETEST_C66_BIG_ENDIAN_ELF
00154 #include <ti/mas/vpe/test/src/c64/nrbufst.h>
00155 #elif VPETEST_ARM_GCARMV7A
00156 #include <ti/mas/vpe/test/src/arm/nrbufst.h>
00157 #else
00158 #error invalid target
00159 #endif
00160
00161 /* common to all targets */
00162 #define VPE_NR_NUM_BUFS   7
00163
00164 #define NR_SIM_BUF0_ALGN  (1<<NR_SIM_BUF0_ALGN_LOG2)
00165 #define NR_SIM_BUF1_ALGN  (1<<NR_SIM_BUF1_ALGN_LOG2)
00166 #define NR_SIM_BUF2_ALGN  (1<<NR_SIM_BUF2_ALGN_LOG2)
00167 #define NR_SIM_BUF3_ALGN  (1<<NR_SIM_BUF3_ALGN_LOG2)
00168 #define NR_SIM_BUF4_ALGN  (1<<NR_SIM_BUF4_ALGN_LOG2)
00169 #define NR_SIM_BUF5_ALGN  (1<<NR_SIM_BUF5_ALGN_LOG2)
00170 #define NR_SIM_BUF6_ALGN  (1<<NR_SIM_BUF6_ALGN_LOG2)
00171
00172 extern tword nr_buff0[];
00173 extern tword nr_buff1[];
00174 extern tword nr_buff2[];
00175 extern tword nr_buff3[];
00176 extern tword nr_buff4[];
00177 extern tword nr_buff5[];
00178 extern tword nr_buff6[];
00179
00180 #endif  /* _NRBUFS_H */
00181


VPE Test: nrsim.c File Reference

  • File List
  • Globals

nrsim.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/util/ecomem.h>
#include <ti/mas/vpe/asnr.h>
#include <ti/mas/vpe/test/src/vpesim.h>
#include <ti/mas/vpe/test/src/nrbufst.h>

Include dependency graph for nrsim.c:

Go to the source code of this file.

Functions

void | vpe_instantiate_nr (tint srate)
void | vpe_config_nr (vpeASNRPars_t *asnr_params)
void | vpe_deinstantiate_nr ()

Variables

void * | nr_handle = NULL
void * | nrInst_ptr

Function Documentation

void vpe_instantiate_nr ( tint srate )

Definition at line 94 of file nrsim.c.

References nr_buff0, nr_buff1, nr_buff2, nr_buff3, nr_buff4, nr_buff5, nr_buff6, nr_handle, nrInst_ptr, and VPE_NR_NUM_BUFS.

Referenced by vpe_init().

void vpe_config_nr ( vpeASNRPars_t * asnr_params )

Definition at line 203 of file nrsim.c.

References vpeASNRPars_t::band1_max_atten, vpeASNRPars_t::band2_max_atten, vpeASNRPars_t::band3_max_atten, vpeASNRPars_t::band_bin1, vpeASNRPars_t::band_bin2, vpeASNRPars_t::delay, vpeASNRPars_t::noise_hangover, vpeASNRPars_t::noise_thresh, nrInst_ptr, vpeASNRPars_t::samp_rate, vpeASNRPars_t::sig_upd_rate_max, and vpeASNRPars_t::sig_upd_rate_min.

Referenced by vpe_init().

void vpe_deinstantiate_nr ( )

Definition at line 246 of file nrsim.c.

References nr_buff0, nr_buff1, nr_buff2, nr_buff3, nr_buff4, nr_buff5, nrInst_ptr, and VPE_NR_NUM_BUFS.

Variable Documentation

void* nr_handle = NULL

Definition at line 86 of file nrsim.c.

Referenced by vpe_instantiate_nr().

void* nrInst_ptr

Definition at line 137 of file vpesim.c.

Referenced by main(), vpe_config_nr(), vpe_deinstantiate_nr(), and vpe_instantiate_nr().


VPE Test: nrsim.c Source File

  • File List
  • Globals

nrsim.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------
00002  * Filename:  nrsim.c
00003  *
00004  * Description: Example and testing code of the NR API functions.
00005  *
00006  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00007  *
00008  *              All rights reserved not granted herein.
00009  *
00010  *                         Limited License.
00011  *
00012  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00013  *  non-exclusive license under copyrights and patents it now or hereafter owns
00014  *  or controls to make, have made, use, import, offer to sell and sell
00015  *  ("Utilize") this software subject to the terms herein.  With respect to the
00016  *  foregoing patent license, such license is granted solely to the extent that
00017  *  any such patent is necessary to Utilize the software alone.  The patent
00018  *  license shall not apply to any combinations which include this software,
00019  *  other than combinations with devices manufactured by or for TI (“TI
00020  *  Devices”).  No hardware patent is licensed hereunder.
00021  *
00022  *  Redistributions must preserve existing copyright notices and reproduce this
00023  *  license (including the above copyright notice and the disclaimer and (if
00024  *  applicable) source code license limitations below) in the documentation
00025  *  and/or other materials provided with the distribution
00026  *
00027  *  Redistribution and use in binary form, without modification, are permitted
00028  *  provided that the following conditions are met:
00029  *
00030  *    *  No reverse engineering, decompilation, or disassembly of this software
00031  *  is permitted with respect to any software provided in binary form.
00032  *
00033  *    *  any redistribution and use are licensed by TI for use only with TI
00034  *  Devices.
00035  *
00036  *    *  Nothing shall obligate TI to provide you with source code for the
00037  *  software licensed and provided to you in object code.
00038  *
00039  *  If software source code is provided to you, modification and redistribution
00040  *  of the source code are permitted provided that the following conditions are
00041  *  met:
00042  *
00043  *    *  any redistribution and use of the source code, including any resulting
00044  *  derivative works, are licensed by TI for use only with TI Devices.
00045  *
00046  *    *  any redistribution and use of any object code compiled from the source
00047  *  code and any resulting derivative works, are licensed by TI for use only
00048  *  with TI Devices.
00049  *
00050  *  Neither the name of Texas Instruments Incorporated nor the names of its
00051  *  suppliers may be used to endorse or promote products derived from this
00052  *  software without specific prior written permission.
00053  *
00054  *  DISCLAIMER.
00055  *
00056  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00057  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00058  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00059  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00060  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00061  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00062  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00063  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00064  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00065  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00066  *  DAMAGE.
00067  *-----------------------------------------------------------------*/
00068
00069 /* ANSI C headers */
00070 #include <stdlib.h>
00071 #include <stdio.h>
00072 #include <string.h>
00073
00074 /* system headers */
00075 #include <ti/mas/types/types.h>
00076 #include <ti/mas/fract/fract.h>
00077 #include <ti/mas/util/ecomem.h>
00078
00079 /* NR header */
00080 #include <ti/mas/vpe/asnr.h>
00081
00082 /* unit test includes */
00083 #include <ti/mas/vpe/test/src/vpesim.h>
00084 #include <ti/mas/vpe/test/src/nrbufst.h>
00085
00086 void *nr_handle = NULL;
00087 extern void *nrInst_ptr;
00088
00089 /*-----------------------------------------------------------------
00090  * Function:  vpe_instantiate_nr
00091  *
00092  * Description: Instantiate ASNR module
00093  *-----------------------------------------------------------------*/
00094 void vpe_instantiate_nr(tint srate)
00095 {
00096   const ecomemBuffer_t *bufs_req_by_nr;
00097   ecomemBuffer_t        bufs_alloc_for_nr[VPE_NR_NUM_BUFS];
00098   asnrSizeConfig_t        nr_size_cfg;
00099   asnrNewConfig_t         nr_new_cfg;
00100   asnrOpenConfig_t        nr_open_cfg;
00101   tint                  num_bufs_req_by_nr, status;
00102   int i;
00103
00104   /* Get NR memory buffer requirements */
00105   nr_size_cfg.max_sampling_rate=srate;
00106   status = asnrGetSizes(&num_bufs_req_by_nr, &bufs_req_by_nr, &nr_size_cfg);
00107   if(status != asnr_NOERR) {
00108     printf("Error returned by asnrGetSizes() = %d\n",status);
00109     exit(0);
00110   }
00111
00112   if(num_bufs_req_by_nr != VPE_NR_NUM_BUFS) {
00113     printf("NR needs %d buffers, but %d buffers are allocated!\n",
00114             num_bufs_req_by_nr, VPE_NR_NUM_BUFS);
00115     exit(0);
00116   }
00117
00118   printf("Buffers requested by NR:\n");
00119   printf("    Buffer    Size(twords)    Alignment    Volatile\n");
00120   for(i=0; i<num_bufs_req_by_nr; i++) {
00121     printf("     %3d       %7d         %4d       ",
00122                  i, (int)bufs_req_by_nr[i].size, (int)bufs_req_by_nr[i].log2align);
00123     if(bufs_req_by_nr[i].volat)
00124       printf("    yes\n");
00125     else
00126       printf("    no \n");
00127   }
00128
00129   /* Statically allocate buffers for NR */
00130   for (i=0; i<num_bufs_req_by_nr; i++) {
00131     bufs_alloc_for_nr[i].mclass = ecomem_CLASS_INTERNAL;
00132     bufs_alloc_for_nr[i].volat  = FALSE;         /* initialized to permanent */
00133   }
00134   bufs_alloc_for_nr[0].base      = &nr_buff0[0];
00135   bufs_alloc_for_nr[0].size      = NR_SIM_BUF0_SIZE;
00136   bufs_alloc_for_nr[0].log2align = NR_SIM_BUF0_ALGN_LOG2;
00137
00138   bufs_alloc_for_nr[1].base      = &nr_buff1[0];
00139   bufs_alloc_for_nr[1].size      = NR_SIM_BUF1_SIZE;
00140   bufs_alloc_for_nr[1].log2align = NR_SIM_BUF1_ALGN_LOG2;
00141   bufs_alloc_for_nr[1].volat     = TRUE;
00142
00143   bufs_alloc_for_nr[2].base      = &nr_buff2[0];
00144   bufs_alloc_for_nr[2].size      = NR_SIM_BUF2_SIZE;
00145   bufs_alloc_for_nr[2].log2align = NR_SIM_BUF2_ALGN_LOG2;
00146   bufs_alloc_for_nr[2].volat     = TRUE;
00147
00148   bufs_alloc_for_nr[3].base      = &nr_buff3[0];
00149   bufs_alloc_for_nr[3].size      = NR_SIM_BUF3_SIZE;
00150   bufs_alloc_for_nr[3].log2align = NR_SIM_BUF3_ALGN_LOG2;
00151   bufs_alloc_for_nr[3].volat     = TRUE;
00152
00153   bufs_alloc_for_nr[4].base      = &nr_buff4[0];
00154   bufs_alloc_for_nr[4].size      = NR_SIM_BUF4_SIZE;
00155   bufs_alloc_for_nr[4].log2align = NR_SIM_BUF4_ALGN_LOG2;
00156
00157   bufs_alloc_for_nr[5].base      = &nr_buff5[0];
00158   bufs_alloc_for_nr[5].size      = NR_SIM_BUF5_SIZE;
00159   bufs_alloc_for_nr[5].log2align = NR_SIM_BUF5_ALGN_LOG2;
00160
00161   bufs_alloc_for_nr[6].base      = &nr_buff6[0];
00162   bufs_alloc_for_nr[6].size      = NR_SIM_BUF6_SIZE;
00163   bufs_alloc_for_nr[6].log2align = NR_SIM_BUF6_ALGN_LOG2;
00164
00165   /* Create NR instance */
00166   nr_new_cfg.handle  = &nr_handle;
00167   nr_new_cfg.sizeCfg = nr_size_cfg;
00168   status = asnrNew(&nrInst_ptr, num_bufs_req_by_nr, bufs_alloc_for_nr, &nr_new_cfg);
00169   if (status != asnr_NOERR) {
00170     printf("Error returned by asnrNew() = %d\n",status);
00171     exit(0);
00172   }
00173
00174   printf("Buffers allocated for NR:\n");
00175   printf("    Buffer    Size(twords)    Alignment    Volatile   address\n");
00176   for(i=0; i<num_bufs_req_by_nr; i++) {
00177     printf("     %3d       %7d         %4d       ",
00178                  i, (int)bufs_alloc_for_nr[i].size, (int)bufs_alloc_for_nr[i].log2align);
00179     if(bufs_alloc_for_nr[i].volat)
00180       printf("    yes   ");
00181     else
00182       printf("    no    ");
00183
00184     printf("    0x%x\n", bufs_alloc_for_nr[i].base);
00185   }
00186
00187   /* Open newly created NR instance */
00188   nr_open_cfg.sampling_rate = srate;
00189   status = asnrOpen(nrInst_ptr, &nr_open_cfg);
00190   if (status != asnr_NOERR) {
00191     printf("Error returned by asnrOpen() = %d!\n", status);
00192     exit(0);
00193   }
00194
00195 }  /* vpe_instantiate_nr */
00196
00197
00198 /*-----------------------------------------------------------------
00199  * Function:  vpe_config_nr
00200  *
00201  * Description: Configure ASNR instance
00202  *-----------------------------------------------------------------*/
00203 void vpe_config_nr(vpeASNRPars_t *asnr_params)
00204 {
00205   asnrControl_t nr_control_cfg;
00206   tint status;
00207
00208   /* Configure NR parameters */
00209   nr_control_cfg.valid_bitfield =   asnr_CTL_VALID_ENABLE
00210                                   | asnr_CTL_VALID_SAMP_RATE
00211                                   | asnr_CTL_VALID_DELAY
00212                                   | asnr_CTL_VALID_BAND_BIN1
00213                                   | asnr_CTL_VALID_BAND_BIN2
00214                                   | asnr_CTL_VALID_BAND1_MAX_ATTEN
00215                                   | asnr_CTL_VALID_BAND2_MAX_ATTEN
00216                                   | asnr_CTL_VALID_BAND3_MAX_ATTEN
00217                                   | asnr_CTL_VALID_SIG_UPD_RATE_MIN
00218                                   | asnr_CTL_VALID_SIG_UPD_RATE_MAX
00219                                   | asnr_CTL_VALID_NOISE_THRESH
00220                                   | asnr_CTL_VALID_NOISE_HANGOVER;
00221   nr_control_cfg.enable          = 1;
00222   nr_control_cfg.samp_rate       = asnr_params->samp_rate;
00223   nr_control_cfg.delay           = asnr_params->delay;
00224   nr_control_cfg.band_bin1       = asnr_params->band_bin1;
00225   nr_control_cfg.band_bin2       = asnr_params->band_bin2;
00226   nr_control_cfg.band1_max_atten = asnr_params->band1_max_atten;
00227   nr_control_cfg.band2_max_atten = asnr_params->band2_max_atten;
00228   nr_control_cfg.band3_max_atten = asnr_params->band3_max_atten;
00229   nr_control_cfg.sig_upd_rate_max= asnr_params->sig_upd_rate_max;
00230   nr_control_cfg.sig_upd_rate_min= asnr_params->sig_upd_rate_min;
00231   nr_control_cfg.noise_thresh    = asnr_params->noise_thresh;
00232   nr_control_cfg.noise_hangover  = asnr_params->noise_hangover;
00233
00234   status = asnrControl(nrInst_ptr, &nr_control_cfg);
00235   if (status != asnr_NOERR) {
00236     printf("Error returned by asnrControl = %d!\n", status);
00237     exit(0);
00238   }
00239 } /* vpe_config_nr */
00240
00241 /*-----------------------------------------------------------------
00242  * Function:  vpe_deinstantiate_nr
00243  *
00244  * Description: Deinstantiate ASNR module
00245  *-----------------------------------------------------------------*/
00246 void vpe_deinstantiate_nr()
00247 {
00248   ecomemBuffer_t bufs_returned_by_nr[VPE_NR_NUM_BUFS];
00249   tint           status, error;
00250
00251   status = asnrClose(nrInst_ptr);
00252   if(status != asnr_NOERR) {
00253     printf("Error returned by asnrClose() = %d!\n", status);
00254     exit(0);
00255   }
00256
00257   status = asnrDelete(&nrInst_ptr, VPE_NR_NUM_BUFS, bufs_returned_by_nr);
00258   if(status != asnr_NOERR) {
00259     printf("Error returned by asnrDelete() = %d!\n", status);
00260     exit(0);
00261   }
00262
00263   error =    (bufs_returned_by_nr[0].base != nr_buff0)
00264            | (bufs_returned_by_nr[1].base != nr_buff1)
00265            | (bufs_returned_by_nr[2].base != nr_buff2)
00266            | (bufs_returned_by_nr[3].base != nr_buff3)
00267            | (bufs_returned_by_nr[4].base != nr_buff4)
00268            | (bufs_returned_by_nr[5].base != nr_buff5);
00269   if(error) {
00270     printf("Buffers returned by asnrDelete() are wrong!\n");
00271     exit(0);
00272   }
00273 } /* vpe_deinstantiate_nr */
00274
00275 /* Nothing past this point */


VPE Test: Page Index

VPE Test Related Pages

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


VPE Test: vpeASNRPars_t Struct Reference

  • Data Structures
  • Data Fields

vpeASNRPars_t Struct Reference

#include <vpesim.h>

Detailed Description

Definition at line 231 of file vpesim.h.

Data Fields

tint | samp_rate
tint | delay
tint | band_bin1
tint | band_bin2
tint | band1_max_atten
tint | band2_max_atten
tint | band3_max_atten
tint | sig_upd_rate_max
tint | sig_upd_rate_min
tint | noise_thresh
tint | noise_hangover

Field Documentation

tint vpeASNRPars_t::samp_rate

Definition at line 232 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::delay

Definition at line 233 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::band_bin1

Definition at line 234 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::band_bin2

Definition at line 235 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::band1_max_atten

Definition at line 236 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::band2_max_atten

Definition at line 237 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::band3_max_atten

Definition at line 238 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::sig_upd_rate_max

Definition at line 239 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::sig_upd_rate_min

Definition at line 240 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::noise_thresh

Definition at line 241 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

tint vpeASNRPars_t::noise_hangover

Definition at line 242 of file vpesim.h.

Referenced by vpe_config_nr(), and vpe_sim_read_cfg().

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


VPE Test: vpeSGNPars_t Struct Reference

  • Data Structures
  • Data Fields

vpeSGNPars_t Struct Reference

#include <vpesim.h>

Detailed Description

Definition at line 215 of file vpesim.h.

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 216 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::dcoffset

Definition at line 217 of file vpesim.h.

Referenced by vpe_init().

tint vpeSGNPars_t::wftype

Definition at line 218 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::f1

Definition at line 219 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::f2

Definition at line 220 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::amp1

Definition at line 221 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

linSample vpeSGNPars_t::amp2

Definition at line 222 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tint vpeSGNPars_t::nlevel

Definition at line 223 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tulong vpeSGNPars_t::nseed

Definition at line 224 of file vpesim.h.

Referenced by vpe_init().

tint vpeSGNPars_t::ntype

Definition at line 225 of file vpesim.h.

Referenced by vpe_init().

tint vpeSGNPars_t::pow_level

Definition at line 226 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_set_sgn().

tulong vpeSGNPars_t::hoth_seed

Definition at line 227 of file vpesim.h.

Referenced by vpe_init().

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


VPE Test: vpeSimConfig_t Struct Reference

  • Data Structures
  • Data Fields

vpeSimConfig_t Struct Reference

#include <vpesim.h>

Collaboration diagram for vpeSimConfig_t:

[legend]

Detailed Description

Definition at line 246 of file vpesim.h.

Data Fields

tbool | exec
tbool | hlc_on
tbool | slm_on
tbool | snl_on
tbool | svd_on
tbool | nr_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
vpeASNRPars_t asnrParam
vpeSGNPars_t sgnParam
vpeSimFileIo_t sigIn
vpeSimFileIo_t sigOut
vpeSimFileIo_t config
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 247 of file vpesim.h.

Referenced by main(), vpe_init(), vpe_print(), and vpe_sim_init().

tbool vpeSimConfig_t::hlc_on

Definition at line 248 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::slm_on

Definition at line 249 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::snl_on

Definition at line 250 of file vpesim.h.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::svd_on

Definition at line 251 of file vpesim.h.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::nr_on

Definition at line 252 of file vpesim.h.

Referenced by main(), vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::decim_on

Definition at line 253 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::interp_on

Definition at line 254 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_init().

tbool vpeSimConfig_t::ulaw_enc_on

Definition at line 255 of file vpesim.h.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::ulaw_dec_on

Definition at line 256 of file vpesim.h.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::alaw_enc_on

Definition at line 257 of file vpesim.h.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::alaw_dec_on

Definition at line 258 of file vpesim.h.

Referenced by main(), and vpe_sim_init().

tlong vpeSimConfig_t::sample_cnt

Definition at line 259 of file vpesim.h.

Referenced by vpe_sim_init().

tulong vpeSimConfig_t::sample_bp

Definition at line 260 of file vpesim.h.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::sgn

Definition at line 261 of file vpesim.h.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_sgn

Definition at line 262 of file vpesim.h.

Referenced by main(), and vpe_sim_init().

tbool vpeSimConfig_t::cfg_hlc

Definition at line 263 of file vpesim.h.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::cfg_slm

Definition at line 264 of file vpesim.h.

Referenced by vpe_sim_init().

tint vpeSimConfig_t::slm_mod

Definition at line 265 of file vpesim.h.

Referenced by vpe_sim_init().

tint vpeSimConfig_t::Fs

Definition at line 266 of file vpesim.h.

Referenced by main(), vpe_init(), vpe_sim_open_sgn(), and vpe_sim_read_cfg().

hlcControl_t vpeSimConfig_t::hlc_ctrl

Definition at line 267 of file vpesim.h.

vpeASNRPars_t vpeSimConfig_t::asnrParam

Definition at line 268 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_read_cfg().

vpeSGNPars_t vpeSimConfig_t::sgnParam

Definition at line 269 of file vpesim.h.

Referenced by main(), and vpe_init().

vpeSimFileIo_t vpeSimConfig_t::sigIn

Definition at line 270 of file vpesim.h.

Referenced by main(), and vpe_sim_init().

vpeSimFileIo_t vpeSimConfig_t::sigOut

Definition at line 271 of file vpesim.h.

Referenced by main(), and vpe_sim_init().

vpeSimFileIo_t vpeSimConfig_t::config

Definition at line 272 of file vpesim.h.

Referenced by vpe_sim_init(), and vpe_sim_read_cfg().

vpeSimPcm_e vpeSimConfig_t::pcmin_format

Definition at line 273 of file vpesim.h.

Referenced by vpe_sim_init().

vpeSimPcm_e vpeSimConfig_t::pcmout_format

Definition at line 274 of file vpesim.h.

Referenced by vpe_sim_init().

tbool vpeSimConfig_t::data

Definition at line 275 of file vpesim.h.

Referenced by main().

tuint vpeSimConfig_t::error_id

Definition at line 276 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_init().

tuint vpeSimConfig_t::frame_size_in

Definition at line 277 of file vpesim.h.

Referenced by main(), and vpe_init().

tuint vpeSimConfig_t::frame_size_out

Definition at line 278 of file vpesim.h.

Referenced by main(), and vpe_init().

char vpeSimConfig_t::baseDir[vpe_SIM_MAX_STRING]

Definition at line 279 of file vpesim.h.

Referenced by vpe_sim_fileio_end(), vpe_sim_fileio_init(), vpe_sim_init(), and vpe_sim_read_cfg().

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


VPE Test: vpeSimFileIo_t Struct Reference

  • Data Structures
  • Data Fields

vpeSimFileIo_t Struct Reference

#include <vpesim.h>

Detailed Description

Definition at line 207 of file vpesim.h.

Data Fields

tbool | fio
tbool | eof
FILE * | fptr
char | fname [vpe_SIM_MAX_STRING]

Field Documentation

tbool vpeSimFileIo_t::fio

Definition at line 208 of file vpesim.h.

Referenced by vpe_init(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_init().

tbool vpeSimFileIo_t::eof

Definition at line 209 of file vpesim.h.

Referenced by vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_fread().

FILE* vpeSimFileIo_t::fptr

Definition at line 210 of file vpesim.h.

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 211 of file vpesim.h.

Referenced by vpe_init(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), vpe_sim_init(), and vpe_sim_read_cfg().

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


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 dependency graph for vpesim.c:

Go to the source code of this file.

Functions

static void | vpe_banner_print (char *str)
void | main (void)

Variables

linSample | vpeIOBufs [vpe_SIM_MAX_SAMPLES]
vpeSimConfig_t vpeSimC
vpeSimConfig_t * vpeSim = &vpeSimC
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]
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 * | nrInst_ptr = NULL
void * | sgnInst_ptr = NULL

Function Documentation

static void vpe_banner_print ( char * str ) [inline, static]

Definition at line 105 of file vpesim.c.

References vpe_print().

Referenced by main().

Here is the call graph for this function:

void main ( void )

Definition at line 147 of file vpesim.c.

References vpeSimConfig_t::alaw_dec_on, vpeSimConfig_t::cfg_sgn, vpeSimConfig_t::data, vpeSimConfig_t::exec, vpeSimConfig_t::frame_size_in, vpeSimConfig_t::frame_size_out, vpeSimConfig_t::Fs, vpeSimConfig_t::nr_on, nrInst_ptr, 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_fileio_init(), vpe_SIM_FILEIO_READ, vpe_SIM_FILEIO_WRITE, vpe_sim_flush_cache(), vpe_sim_fread(), vpe_sim_gen_frame(), vpe_sim_init(), vpe_sim_read_cfg(), vpe_sim_set_sgn(), vpeIOBufs, and vpeSim.

Here is the call graph for this function:

Variable Documentation

linSample vpeIOBufs[vpe_SIM_MAX_SAMPLES]

Definition at line 87 of file vpesim.c.

Referenced by main().

vpeSimConfig_t vpeSimC

Definition at line 88 of file vpesim.c.

vpeSimConfig_t* vpeSim = &vpeSimC

Definition at line 89 of file vpesim.c.

Referenced by main(), vpe_init(), vpe_print(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), vpe_sim_init(), vpe_sim_open_sgn(), and vpe_sim_read_cfg().

linSample sigInBuffer[2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]

Definition at line 92 of file vpesim.c.

Referenced by main().

linSample sigOutBuffer[2 *vpe_SIM_MAX_SAMPLES *sizeof(linSample)/sizeof(tword)]

Definition at line 93 of file vpesim.c.

Referenced by main().

linSample decimDelayLine[VPE_SIM_DECIM_DELAY_LEN]

Definition at line 96 of file vpesim.c.

Referenced by vpe_init().

linSample interpDelayLine[VPE_SIM_INTERP_DELAY_LEN]

Definition at line 97 of file vpesim.c.

Referenced by vpe_init().

void* slmInst_ptr = NULL

Definition at line 116 of file vpesim.c.

Referenced by vpe_init().

void* hlcInst_ptr = NULL

Definition at line 119 of file vpesim.c.

Referenced by vpe_init().

hlcControl_t hctrlInst

Definition at line 120 of file vpesim.c.

hlcControl_t * hctrlInst_ptr = &hctrlInst

Definition at line 120 of file vpesim.c.

Referenced by vpe_init().

void* snlInst_ptr = NULL

Definition at line 123 of file vpesim.c.

Referenced by vpe_init().

Fract spchLevdB = frct_MAX

Definition at line 125 of file vpesim.c.

Fract noiseLevdB = frct_MAX

Definition at line 125 of file vpesim.c.

UFract Nthresh = frct_MAX

Definition at line 126 of file vpesim.c.

vpeSimFileIo_t snlLevOut

Definition at line 128 of file vpesim.c.

Referenced by main(), and vpe_init().

void* svdInst_ptr = NULL

Definition at line 131 of file vpesim.c.

Referenced by vpe_init().

vpeSimFileIo_t svdOut

Definition at line 134 of file vpesim.c.

Referenced by main(), and vpe_init().

void* nrInst_ptr = NULL

Definition at line 137 of file vpesim.c.

Referenced by main(), vpe_config_nr(), vpe_deinstantiate_nr(), and vpe_instantiate_nr().

void* sgnInst_ptr = NULL

Definition at line 140 of file vpesim.c.

Referenced by main(), and vpe_init().


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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00007  *
00008  *              All rights reserved not granted herein.
00009  *
00010  *                         Limited License.
00011  *
00012  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00013  *  non-exclusive license under copyrights and patents it now or hereafter owns
00014  *  or controls to make, have made, use, import, offer to sell and sell
00015  *  ("Utilize") this software subject to the terms herein.  With respect to the
00016  *  foregoing patent license, such license is granted solely to the extent that
00017  *  any such patent is necessary to Utilize the software alone.  The patent
00018  *  license shall not apply to any combinations which include this software,
00019  *  other than combinations with devices manufactured by or for TI (“TI
00020  *  Devices”).  No hardware patent is licensed hereunder.
00021  *
00022  *  Redistributions must preserve existing copyright notices and reproduce this
00023  *  license (including the above copyright notice and the disclaimer and (if
00024  *  applicable) source code license limitations below) in the documentation
00025  *  and/or other materials provided with the distribution
00026  *
00027  *  Redistribution and use in binary form, without modification, are permitted
00028  *  provided that the following conditions are met:
00029  *
00030  *    *  No reverse engineering, decompilation, or disassembly of this software
00031  *  is permitted with respect to any software provided in binary form.
00032  *
00033  *    *  any redistribution and use are licensed by TI for use only with TI
00034  *  Devices.
00035  *
00036  *    *  Nothing shall obligate TI to provide you with source code for the
00037  *  software licensed and provided to you in object code.
00038  *
00039  *  If software source code is provided to you, modification and redistribution
00040  *  of the source code are permitted provided that the following conditions are
00041  *  met:
00042  *
00043  *    *  any redistribution and use of the source code, including any resulting
00044  *  derivative works, are licensed by TI for use only with TI Devices.
00045  *
00046  *    *  any redistribution and use of any object code compiled from the source
00047  *  code and any resulting derivative works, are licensed by TI for use only
00048  *  with TI Devices.
00049  *
00050  *  Neither the name of Texas Instruments Incorporated nor the names of its
00051  *  suppliers may be used to endorse or promote products derived from this
00052  *  software without specific prior written permission.
00053  *
00054  *  DISCLAIMER.
00055  *
00056  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00057  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00058  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00059  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00060  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00061  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00062  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00063  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00064  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00065  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00066  *  DAMAGE.
00067  *-----------------------------------------------------------------*/
00068
00069 /* ANSI C headers */
00070 #include <stdlib.h>
00071 #include <stdio.h>
00072 #include <string.h>
00073
00074 /* RTSC headers */
00075 #include <ti/mas/types/types.h>
00076 #include <ti/mas/fract/fract.h>
00077 #include <ti/mas/types/const.h>
00078 #include <ti/mas/util/ecomem.h>
00079
00080 /* for signal generator */
00081 #include <ti/mas/sdk/sgn.h>
00082
00083 /* unit test includes */
00084 #include <ti/mas/vpe/test/src/vpesim.h>
00085
00086 /* Global simulation data */
00087 linSample vpeIOBufs[vpe_SIM_MAX_SAMPLES];
00088 vpeSimConfig_t  vpeSimC;
00089 vpeSimConfig_t *vpeSim = &vpeSimC;
00090
00091 /* Global PCM data buffers */
00092 linSample sigInBuffer [2*vpe_SIM_MAX_SAMPLES * sizeof(linSample)/sizeof(tword)];
00093 linSample sigOutBuffer[2*vpe_SIM_MAX_SAMPLES * sizeof(linSample)/sizeof(tword)];
00094
00095 /* Delay line and input buffer for source rate converter */
00096 linSample decimDelayLine[VPE_SIM_DECIM_DELAY_LEN];
00097 linSample interpDelayLine[VPE_SIM_INTERP_DELAY_LEN];
00098
00099
00100 /*-----------------------------------------------------------------
00101  * Function:  vpe_banner_print
00102  *
00103  * Description: Utility to provide major progress information.
00104  *-----------------------------------------------------------------*/
00105 static inline void vpe_banner_print (char *str)
00106 {
00107   vpe_print ("\n");
00108   vpe_print ("------------------------------\n");
00109   vpe_print (str);
00110   vpe_print ("------------------------------\n");
00111   vpe_print ("\n");
00112 }
00113
00114
00115 /* slm instance */
00116 void *slmInst_ptr = NULL;
00117
00118 /* hlc instance */
00119 void *hlcInst_ptr = NULL;
00120 hlcControl_t hctrlInst, *hctrlInst_ptr = &hctrlInst;
00121
00122 /* snl instance */
00123 void *snlInst_ptr = NULL;
00124 /* snl results */
00125 Fract spchLevdB = frct_MAX, noiseLevdB = frct_MAX;
00126 UFract Nthresh = frct_MAX;
00127 /* snl result out file I/O structure */
00128 vpeSimFileIo_t snlLevOut;
00129
00130 /* svd instance */
00131 void *svdInst_ptr = NULL;
00132
00133 /* svd result out file I/O structure */
00134 vpeSimFileIo_t svdOut;
00135
00136 /* nr instance */
00137 void *nrInst_ptr  = NULL;
00138
00139 /* sgn instance */
00140 void *sgnInst_ptr = NULL;
00141
00142 /*-----------------------------------------------------------------
00143  * Filename:  main
00144  *
00145  * Description: Test the vpe API functions.
00146  *-----------------------------------------------------------------*/
00147 void main (void)
00148 {
00149   linSample *buf_Inptr = (linSample *)sigInBuffer;
00150   linSample *buf_Outptr = (linSample *)sigOutBuffer;
00151   LFract svd_sig_pow;
00152
00153   tulong sample_total;
00154   tbool sigIn_data;
00155   tuint second_count;
00156   tuint sample_count, num_tuint_in, num_tuint_out;
00157   tint  i, retVal, vad_flag;
00158
00159   /* Initialize for simulation */
00160   vpe_sim_init();
00161
00162   /* read VPE simulation configuration */
00163   vpe_sim_read_cfg();
00164
00165   /* Opportunity to uniquely configure simulation */
00166   vpe_halt (&vpeSim->exec);
00167
00168   /* Progress (verbose only) */
00169   vpe_banner_print ("Simulation:  BEGIN\n");
00170
00171   vpe_init();
00172
00173   /* Main (file) simulation loop */
00174   while (vpeSim->exec) {
00175     /* Simulation pass initialization */
00176     vpeSim->data = TRUE;
00177     if (!vpeSim->sgn){
00178       /* Load I/O files */
00179       vpe_sim_fileio_init (&vpeSim->sigIn,  vpe_SIM_FILEIO_READ);
00180       vpe_sim_fileio_init (&vpeSim->sigOut, vpe_SIM_FILEIO_WRITE);
00181     }
00182     if(vpeSim->snl_on){
00183       /* Load I/O files */
00184       vpe_sim_fileio_init (&snlLevOut, vpe_SIM_FILEIO_WRITE);
00185     }
00186     if(vpeSim->svd_on){
00187       /* Load I/O files */
00188       vpe_sim_fileio_init (&svdOut, vpe_SIM_FILEIO_WRITE);
00189     }
00190
00191     /* Single test/example simulation loop */
00192     second_count = 0;
00193     sample_count = 0;
00194     while (vpeSim->data) {
00195
00196       vpe_sim_flush_cache();
00197
00198       /* if use sgn */
00199       if (vpeSim->sgn){
00200         /* configure sgn */
00201         if (vpeSim->cfg_sgn) {
00202           vpeSim->cfg_sgn = FALSE;
00203           vpe_sim_set_sgn (sgnInst_ptr, &vpeSim->sgnParam, vpeSim->Fs);
00204         }
00205         vpe_sim_gen_frame (sgnInst_ptr, vpeSim->frame_size_in, buf_Inptr);
00206       }
00207       else{
00208         /* Read input data from file */
00209         num_tuint_in = vpeSim->frame_size_in;
00210         if(vpeSim->ulaw_dec_on || vpeSim->alaw_dec_on) {
00211           num_tuint_in /= 2; /* mu-law or A-law input is byte */
00212         }
00213         sigIn_data = vpe_sim_fread (vpeIOBufs, num_tuint_in, &vpeSim->sigIn);
00214         vpeSim->data = sigIn_data;
00215
00216         /* change little endian to big endian */
00217         if(vpeSim->ulaw_dec_on || vpeSim->alaw_dec_on) {
00218           for (i=0; i<num_tuint_in; i++) {
00219             vpeIOBufs[i] = ((vpeIOBufs[i]>>8)&0x0ff) | ((vpeIOBufs[i]&0x0ff)<<8);
00220           }
00221         }
00222       }
00223
00224       if (vpeSim->ulaw_dec_on) {
00225         pcmUlawDecoderP((tuint *)vpeIOBufs, buf_Inptr, vpeSim->frame_size_out);
00226       }
00227       else if (vpeSim->alaw_dec_on) {
00228         pcmAlawDecoderP((tuint *)vpeIOBufs, buf_Inptr, vpeSim->frame_size_out);
00229       }
00230       else {
00231         for (i=0;i<vpeSim->frame_size_in;i++){
00232           buf_Inptr[i] = vpeIOBufs[i];
00233         }
00234       }
00235
00236       /* Run NR if enabled */
00237       if(vpeSim->nr_on) {
00238         retVal = asnrProcess(nrInst_ptr, buf_Inptr, buf_Inptr);
00239         if (retVal != asnr_NOERR) {
00240           printf("Error returned by asnrProcessn() = %d!\n", retVal);
00241           exit(0);
00242         }
00243       }
00244
00245       /* Run hlc if enabled */
00246       if (vpeSim->hlc_on){
00247         if (vpeSim->cfg_hlc) {
00248           vpeSim->cfg_hlc = FALSE;
00249           retVal = hlcControl(hlcInst_ptr, &vpeSim->hlc_ctrl);
00250           if (retVal != hlc_NOERR){
00251             vpeSim->error_id = vpe_SIM_ERR_5;
00252             vpeSim->exec = FALSE;
00253             vpe_halt (&vpeSim->exec);
00254           }
00255         }
00256         retVal = hlcProcess(hlcInst_ptr, buf_Inptr);
00257         if (retVal != hlc_NOERR){
00258           vpeSim->error_id = vpe_SIM_ERR_1;
00259           vpeSim->exec = FALSE;
00260           vpe_halt (&vpeSim->exec);
00261         }
00262       }
00263
00264       if(vpeSim->decim_on) {
00265         /* form the input buffer - holding delay line and input data */
00266         for (i=0;i<vpeSim->frame_size_in;i++){
00267           decimDelayLine[VPE_SIM_DECIM_FILT_DEL+i] = buf_Inptr[i];
00268         }
00269
00270         /* decimate by 2 */
00271         sfcDecimationBy2(decimDelayLine, buf_Inptr, NULL,
00272                          sfc_DEF_FILT_LEN, vpeSim->frame_size_in);
00273
00274         /* shift samples in the delay line */
00275         for (i=0;i<VPE_SIM_DECIM_FILT_DEL;i++){
00276           decimDelayLine[i] = decimDelayLine[vpeSim->frame_size_in+i];
00277         }
00278       }
00279
00280       if(vpeSim->interp_on) {
00281         /* form the input buffer - holding delay line and input data */
00282         for (i=0;i<vpeSim->frame_size_in;i++){
00283           interpDelayLine[VPE_SIM_INTERP_FILT_DEL+i] = buf_Inptr[i];
00284         }
00285
00286         /* interpolate by 2 */
00287         sfcInterpolationBy2(interpDelayLine, buf_Inptr, NULL,
00288                             sfc_DEF_FILT_LEN, vpeSim->frame_size_in);
00289
00290         /* shift samples in the delay line */
00291         for (i=0;i<VPE_SIM_INTERP_FILT_DEL;i++){
00292           interpDelayLine[i] = interpDelayLine[vpeSim->frame_size_in+i];
00293         }
00294       }
00295
00296       /* Run snl if enabled */
00297       if (vpeSim->snl_on ){
00298         /* calculate snl */
00299         retVal = snlProcess (snlInst_ptr, buf_Inptr, vpeSim->frame_size_out);
00300         retVal = snlGetLevels (snlInst_ptr, &spchLevdB, &noiseLevdB, &Nthresh);
00301
00302         /* write SNL results to a file */
00303         vpe_sim_fwrite (&spchLevdB, 1, &snlLevOut);
00304         vpe_sim_fwrite (&noiseLevdB, 1, &snlLevOut);
00305         vpe_sim_fwrite ((Fract *)&Nthresh, 1, &snlLevOut);
00306       }
00307
00308       /* Run svd if enabled */
00309       if (vpeSim->svd_on ){
00310         /* run svd and get decisions */
00311         retVal = svdProcess (svdInst_ptr, buf_Inptr, vpeSim->frame_size_out);
00312         vad_flag = svdGetDecision (svdInst_ptr, &svd_sig_pow);
00313         retVal = svdGetLevels (svdInst_ptr, &spchLevdB, &noiseLevdB, &Nthresh);
00314
00315         /* write SVD results to a file */
00316         vpe_sim_fwrite (&vad_flag, 1, &svdOut);
00317         vpe_sim_fwrite (&spchLevdB, 1, &svdOut);
00318         vpe_sim_fwrite (&noiseLevdB, 1, &svdOut);
00319         vpe_sim_fwrite ((linSample *)&Nthresh, 1, &svdOut);
00320         vpe_sim_fwrite ((linSample *)&svd_sig_pow, 2, &svdOut);
00321       }
00322
00323       /* copy to output buffer */
00324       for (i=0;i<vpeSim->frame_size_out;i++){
00325         buf_Outptr[i] = buf_Inptr[i];
00326       }
00327
00328       /* Run slm if enabled */
00329       if(vpeSim->slm_on){
00330         if(vpeSim->cfg_slm){
00331           vpeSim->cfg_slm = FALSE;
00332           retVal = slmControl(slmInst_ptr, vpeSim->slm_mod);
00333           if (retVal != slm_NOERR){
00334             vpeSim->error_id = vpe_SIM_ERR_8;
00335             vpeSim->exec = FALSE;
00336             vpe_halt (&vpeSim->exec);
00337           }
00338         }
00339         retVal = slmProcess (slmInst_ptr, buf_Outptr, vpeSim->frame_size_out);
00340         if (retVal != slm_NOERR){
00341           vpeSim->error_id = vpe_SIM_ERR_2;
00342           vpeSim->exec = FALSE;
00343           vpe_halt (&vpeSim->exec);
00344         }
00345       }
00346
00347       if (vpeSim->ulaw_enc_on) {
00348         pcmUlawEncoderP(buf_Outptr, (tuint *)vpeIOBufs, vpeSim->frame_size_out);
00349       }
00350       else if (vpeSim->alaw_enc_on) {
00351         pcmAlawEncoderP(buf_Outptr, (tuint *)vpeIOBufs, vpeSim->frame_size_out);
00352       }
00353
00354       /* copy to intermediate storage buffer */
00355       for (i=0;i<vpeSim->frame_size_out;i++){
00356         vpeIOBufs[i] = buf_Outptr[i];
00357       }
00358
00359       /* copy to storage buffer if not using sgn */
00360       if (!vpeSim->sgn){
00361         num_tuint_out = vpeSim->frame_size_out;
00362         if(vpeSim->ulaw_enc_on || vpeSim->alaw_enc_on) {
00363           num_tuint_out /= 2;
00364
00365           /* change big endian to little endian */
00366             for (i=0; i<num_tuint_out; i++) {
00367             buf_Outptr[i] = ((vpeIOBufs[i]>>8)&0x0ff) | ((vpeIOBufs[i]&0x0ff)<<8);
00368           }
00369         }
00370         /* copy to a output buffer */
00371         for (i=0;i<num_tuint_out;i++){
00372           vpeIOBufs[i] = buf_Outptr[i];
00373         }
00374         /* write to a file */
00375         vpe_sim_fwrite (buf_Outptr, num_tuint_out, &vpeSim->sigOut);
00376       }// end of if (vpeSim->sgn)
00377
00378       /* Update sample count and notify time progress */
00379       sample_count += vpeSim->frame_size_in;
00380       if (sample_count >= vpeSim->Fs) {
00381         sample_count -= vpeSim->Fs;
00382         second_count++;
00383         printf (" - Progress: %d seconds\n", second_count);
00384       }
00385
00386       /* Check for simulation halt */
00387       sample_total = (tulong) second_count * vpeSim->Fs + sample_count;
00388       if ((vpeSim->sample_bp != 0)            &&
00389           (sample_total >= vpeSim->sample_bp) &&
00390           (sample_total  - vpeSim->sample_bp) < vpeSim->frame_size_in) {
00391         vpe_iprint (" - Halting after %d samples\n", sample_total);
00392         vpeSim->exec = FALSE;
00393         vpe_halt (&vpeSim->exec);
00394       }
00395       vpeSim->sample_cnt = sample_total;
00396     } /* vpeSim->data */
00397
00398     vpeSim->exec = FALSE;
00399     if (!vpeSim->sgn) {
00400       /* Close input files if using file I/O */
00401       vpe_sim_fileio_end (&vpeSim->sigIn);
00402       /* Check for output file close */
00403       vpe_sim_fileio_end (&vpeSim->sigOut);
00404     }
00405     if(vpeSim->snl_on) {
00406       /* Check for output file close */
00407       vpe_sim_fileio_end (&snlLevOut);
00408     }
00409
00410     if(vpeSim->svd_on) {
00411       /* Check for output file close */
00412       vpe_sim_fileio_end (&svdOut);
00413     }
00414
00415     /* Progress (verbose only) */
00416     vpe_banner_print ("Simulation:  END\n");
00417     /* End of current simulation test/example */
00418
00419   } /* vpeSim->exec */
00420
00421   if(vpeSim->nr_on) {
00422     vpe_deinstantiate_nr();
00423   }
00424
00425   /* End of simulation */
00426   printf("Simulation done.\n");
00427 } /* main */
00428
00429 /* Nothing past this point */


VPE Test: vpesim.h File Reference

  • File List
  • Globals

vpesim.h File Reference

#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/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 <ti/mas/vpe/asnr.h>

Include dependency graph for vpesim.h:

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

Go to the source code of this file.

Data Structures

struct | vpeSimFileIo_t
struct | vpeSGNPars_t
struct | vpeASNRPars_t
struct | vpeSimConfig_t

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 | vpe_SIM_ERR_1 ( 1)
#define | vpe_SIM_ERR_2 ( 2)
#define | vpe_SIM_ERR_3 ( 4)
#define | vpe_SIM_ERR_4 ( 5)
#define | vpe_SIM_ERR_5 ( 6)
#define | vpe_SIM_ERR_6 ( 7)
#define | vpe_SIM_ERR_7 ( 8)
#define | vpe_SIM_ERR_8 ( 9)
#define | vpe_SIM_ERR_9 (10)
#define | vpe_SIM_ERR_10 (11)
#define | vpe_SIM_ERR_11 (12)
#define | vpe_SIM_ERR_12 (13)
#define | vpe_SIM_ERR_13 (14)
#define | vpe_SIM_ERR_14 (15)
#define | vpe_SIM_ERR_15 (16)
#define | vpe_SIM_ERR_16 (17)
#define | vpe_SIM_ERR_17 (18)
#define | vpe_SIM_ERR_18 (19)
#define | vpe_SIM_MAX_SAMPLES 320
#define | vpe_SIM_MAX_ECOBUFS 12
#define | vpe_SIM_MAX_STRING 256
#define | vpe_SIM_FILEIO_READ ( 0)
#define | vpe_SIM_FILEIO_WRITE ( 1)
#define | VPE_SIM_SAMPLE_FREQ_16000 16000
#define | VPE_SIM_SAMPLE_FREQ_8000 8000
#define | VPE_SIM_FRAME_SIZE_16000 160
#define | VPE_SIM_FRAME_SIZE_8000 80
#define | vpe_SIM_DEF_BASE_DIR "../../vectors/"
#define | vpe_SIM_DEF_SIGIN_FNAME "sigIn.pcm"
#define | vpe_SIM_DEF_SIGOUT_FNAME "sigOut.pcm"
#define | vpe_SIM_DEF_CONFIG_FNAME "vpecfg.txt"
#define | VPE_SIM_DECIM_FILT_DEL (sfc_DEF_FILT_LEN-1)
#define | VPE_SIM_DECIM_DELAY_LEN (VPE_SIM_DECIM_FILT_DEL + VPE_SIM_FRAME_SIZE_16000)
#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_FRAME_SIZE_16000)

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 | 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)
void | vpe_instantiate_nr (tint srate)
void | vpe_config_nr (vpeASNRPars_t *asnr_params)
void | vpe_deinstantiate_nr ()
void | vpe_halt (tbool *exec)
void | vpe_sim_flush_cache ()
void | vpe_sim_read_cfg ()

Define Documentation

#define _VPESIM_C54 0

Definition at line 95 of file vpesim.h.

#define _VPESIM_C55 0

Definition at line 101 of file vpesim.h.

#define _VPESIM_C55L 0

Definition at line 107 of file vpesim.h.

#define _VPESIM_C64 0

Definition at line 113 of file vpesim.h.

#define _VPESIM_C64_BIG_ENDIAN 0

Definition at line 119 of file vpesim.h.

#define _VPESIM_C64P 0

Definition at line 125 of file vpesim.h.

#define _VPESIM_C64P_BIG_ENDIAN 0

Definition at line 131 of file vpesim.h.

#define _VPESIM_C66 0

Definition at line 137 of file vpesim.h.

#define _VPESIM_C66_BIG_ENDIAN 0

Definition at line 143 of file vpesim.h.

#define vpe_SIM_ERR_1 ( 1)

Definition at line 147 of file vpesim.h.

#define vpe_SIM_ERR_2 ( 2)

Definition at line 148 of file vpesim.h.

#define vpe_SIM_ERR_3 ( 4)

Definition at line 149 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_4 ( 5)

Definition at line 150 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_5 ( 6)

Definition at line 151 of file vpesim.h.

#define vpe_SIM_ERR_6 ( 7)

Definition at line 152 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_7 ( 8)

Definition at line 153 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_8 ( 9)

Definition at line 154 of file vpesim.h.

#define vpe_SIM_ERR_9 (10)

Definition at line 155 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_10 (11)

Definition at line 156 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_11 (12)

Definition at line 157 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_12 (13)

Definition at line 158 of file vpesim.h.

#define vpe_SIM_ERR_13 (14)

Definition at line 159 of file vpesim.h.

#define vpe_SIM_ERR_14 (15)

Definition at line 160 of file vpesim.h.

#define vpe_SIM_ERR_15 (16)

Definition at line 161 of file vpesim.h.

#define vpe_SIM_ERR_16 (17)

Definition at line 162 of file vpesim.h.

#define vpe_SIM_ERR_17 (18)

Definition at line 163 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_ERR_18 (19)

Definition at line 164 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_MAX_SAMPLES 320

Definition at line 167 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_MAX_ECOBUFS 12

Definition at line 168 of file vpesim.h.

#define vpe_SIM_MAX_STRING 256

Definition at line 169 of file vpesim.h.

#define vpe_SIM_FILEIO_READ ( 0)

Definition at line 172 of file vpesim.h.

Referenced by main(), and vpe_sim_fileio_init().

#define vpe_SIM_FILEIO_WRITE ( 1)

Definition at line 173 of file vpesim.h.

Referenced by main(), and vpe_sim_fileio_init().

#define VPE_SIM_SAMPLE_FREQ_16000 16000

Definition at line 175 of file vpesim.h.

Referenced by vpe_init(), and vpe_sim_read_cfg().

#define VPE_SIM_SAMPLE_FREQ_8000 8000

Definition at line 176 of file vpesim.h.

Referenced by vpe_init().

#define VPE_SIM_FRAME_SIZE_16000 160

Definition at line 177 of file vpesim.h.

Referenced by vpe_init().

#define VPE_SIM_FRAME_SIZE_8000 80

Definition at line 178 of file vpesim.h.

Referenced by vpe_init().

#define vpe_SIM_DEF_BASE_DIR "../../vectors/"

Definition at line 187 of file vpesim.h.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_SIGIN_FNAME "sigIn.pcm"

Definition at line 191 of file vpesim.h.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_SIGOUT_FNAME "sigOut.pcm"

Definition at line 192 of file vpesim.h.

Referenced by vpe_sim_init().

#define vpe_SIM_DEF_CONFIG_FNAME "vpecfg.txt"

Definition at line 193 of file vpesim.h.

Referenced by vpe_sim_init().

#define VPE_SIM_DECIM_FILT_DEL (sfc_DEF_FILT_LEN-1)

Definition at line 195 of file vpesim.h.

Referenced by vpe_init().

#define VPE_SIM_DECIM_DELAY_LEN (VPE_SIM_DECIM_FILT_DEL + VPE_SIM_FRAME_SIZE_16000)

Definition at line 196 of file vpesim.h.

#define VPE_SIM_INTERP_FILT_DEL ((sfc_DEF_FILT_LEN-1)/2)

Definition at line 197 of file vpesim.h.

Referenced by vpe_init().

#define VPE_SIM_INTERP_DELAY_LEN (VPE_SIM_INTERP_FILT_DEL + VPE_SIM_FRAME_SIZE_16000)

Definition at line 198 of file vpesim.h.

Enumeration Type Documentation

enum vpeSimPcm_e

Enumerator:
vpe_SIM_PCM_ALAW
vpe_SIM_PCM_ULAW
vpe_SIM_PCM_LIN

Definition at line 201 of file vpesim.h.

Function Documentation

void vpe_sim_fileio_init | ( | vpeSimFileIo_t * | fioptr,
 |  | tuint | code
 | ) |  |

Definition at line 199 of file vpesim_setup.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 242 of file vpesim_setup.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 ( )

Definition at line 327 of file vpesim_setup.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::config, vpeSimConfig_t::decim_on, vpeSimConfig_t::error_id, vpeSimConfig_t::exec, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpeSimConfig_t::hlc_on, vpeSimConfig_t::interp_on, vpeSimConfig_t::nr_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_CONFIG_FNAME, vpe_SIM_DEF_SIGIN_FNAME, vpe_SIM_DEF_SIGOUT_FNAME, vpe_SIM_PCM_LIN, and vpeSim.

Referenced by main().

void vpe_init ( void )

Definition at line 425 of file vpesim_setup.c.

References vpeSGNPars_t::amp1, vpeSGNPars_t::amp2, vpeSimConfig_t::asnrParam, 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_in, 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, vpeSimConfig_t::nr_on, 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_config_nr(), vpe_halt(), vpe_instantiate_nr(), 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_FRAME_SIZE_16000, VPE_SIM_FRAME_SIZE_8000, VPE_SIM_INTERP_FILT_DEL, vpe_SIM_MAX_SAMPLES, vpe_sim_open_sgn(), VPE_SIM_SAMPLE_FREQ_16000, 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 272 of file vpesim_setup.c.

References vpeSimFileIo_t::eof, vpeSimFileIo_t::fptr, vpe_temp_io_buf, and VPESIM_NUM_BYTES_LINSAMP.

Referenced by main().

void vpe_sim_fwrite | ( | linSample * | buf,
 |  | tint | buf_size,
 |  | vpeSimFileIo_t * | fioptr
 | ) |  |

Definition at line 304 of file vpesim_setup.c.

References vpeSimFileIo_t::fptr, vpe_temp_io_buf, 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 163 of file vpesim_setup.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 176 of file vpesim_setup.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 188 of file vpesim_setup.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 637 of file vpesim_setup.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 669 of file vpesim_setup.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 726 of file vpesim_setup.c.

Referenced by main().

sgnFileIo_t * vpe_sim_in_file ( sgnFileIo_t * dsc )

Definition at line 737 of file vpesim_setup.c.

References inCnt, and inFrame.

Referenced by vpe_sim_open_sgn().

void vpe_instantiate_nr ( tint srate )

Definition at line 94 of file nrsim.c.

References nr_buff0, nr_buff1, nr_buff2, nr_buff3, nr_buff4, nr_buff5, nr_buff6, nr_handle, nrInst_ptr, and VPE_NR_NUM_BUFS.

Referenced by vpe_init().

void vpe_config_nr ( vpeASNRPars_t * asnr_params )

Definition at line 203 of file nrsim.c.

References vpeASNRPars_t::band1_max_atten, vpeASNRPars_t::band2_max_atten, vpeASNRPars_t::band3_max_atten, vpeASNRPars_t::band_bin1, vpeASNRPars_t::band_bin2, vpeASNRPars_t::delay, vpeASNRPars_t::noise_hangover, vpeASNRPars_t::noise_thresh, nrInst_ptr, vpeASNRPars_t::samp_rate, vpeASNRPars_t::sig_upd_rate_max, and vpeASNRPars_t::sig_upd_rate_min.

Referenced by vpe_init().

void vpe_deinstantiate_nr ( )

Definition at line 246 of file nrsim.c.

References nr_buff0, nr_buff1, nr_buff2, nr_buff3, nr_buff4, nr_buff5, nrInst_ptr, and VPE_NR_NUM_BUFS.

void vpe_halt ( tbool * exec )

Definition at line 124 of file vpesim_setup.c.

Referenced by main(), and vpe_init().

void vpe_sim_flush_cache ( )

Definition at line 758 of file vpesim_setup.c.

Referenced by main().

void vpe_sim_read_cfg ( )

Definition at line 370 of file vpesim_setup.c.

References vpeSimConfig_t::asnrParam, vpeASNRPars_t::band1_max_atten, vpeASNRPars_t::band2_max_atten, vpeASNRPars_t::band3_max_atten, vpeASNRPars_t::band_bin1, vpeASNRPars_t::band_bin2, vpeSimConfig_t::baseDir, vpeSimConfig_t::config, vpeASNRPars_t::delay, vpeSimFileIo_t::fname, vpeSimConfig_t::Fs, vpeASNRPars_t::noise_hangover, vpeASNRPars_t::noise_thresh, vpeASNRPars_t::samp_rate, vpeASNRPars_t::sig_upd_rate_max, vpeASNRPars_t::sig_upd_rate_min, vpe_sim_global_str, VPE_SIM_SAMPLE_FREQ_16000, and vpeSim.

Referenced by main().


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  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00010  *
00011  *              All rights reserved not granted herein.
00012  *
00013  *                         Limited License.
00014  *
00015  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00016  *  non-exclusive license under copyrights and patents it now or hereafter owns
00017  *  or controls to make, have made, use, import, offer to sell and sell
00018  *  ("Utilize") this software subject to the terms herein.  With respect to the
00019  *  foregoing patent license, such license is granted solely to the extent that
00020  *  any such patent is necessary to Utilize the software alone.  The patent
00021  *  license shall not apply to any combinations which include this software,
00022  *  other than combinations with devices manufactured by or for TI (“TI
00023  *  Devices”).  No hardware patent is licensed hereunder.
00024  *
00025  *  Redistributions must preserve existing copyright notices and reproduce this
00026  *  license (including the above copyright notice and the disclaimer and (if
00027  *  applicable) source code license limitations below) in the documentation
00028  *  and/or other materials provided with the distribution
00029  *
00030  *  Redistribution and use in binary form, without modification, are permitted
00031  *  provided that the following conditions are met:
00032  *
00033  *    *  No reverse engineering, decompilation, or disassembly of this software
00034  *  is permitted with respect to any software provided in binary form.
00035  *
00036  *    *  any redistribution and use are licensed by TI for use only with TI
00037  *  Devices.
00038  *
00039  *    *  Nothing shall obligate TI to provide you with source code for the
00040  *  software licensed and provided to you in object code.
00041  *
00042  *  If software source code is provided to you, modification and redistribution
00043  *  of the source code are permitted provided that the following conditions are
00044  *  met:
00045  *
00046  *    *  any redistribution and use of the source code, including any resulting
00047  *  derivative works, are licensed by TI for use only with TI Devices.
00048  *
00049  *    *  any redistribution and use of any object code compiled from the source
00050  *  code and any resulting derivative works, are licensed by TI for use only
00051  *  with TI Devices.
00052  *
00053  *  Neither the name of Texas Instruments Incorporated nor the names of its
00054  *  suppliers may be used to endorse or promote products derived from this
00055  *  software without specific prior written permission.
00056  *
00057  *  DISCLAIMER.
00058  *
00059  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00060  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00061  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00062  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00063  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00064  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00065  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00066  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00067  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00068  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00069  *  DAMAGE.
00070  *****************************************************************************/
00071 #ifndef _VPESIM_H
00072 #define _VPESIM_H
00073
00074 /* RTSC headers */
00075 #include <ti/mas/types/types.h>
00076 #include <ti/mas/fract/fract.h>
00077 #include <ti/mas/types/const.h>
00078 #include <ti/mas/util/ecomem.h>
00079
00080 /* for signal generator */
00081 #include <ti/mas/sdk/sgn.h>
00082
00083 /* VPE component and simulation headers */
00084 #include <ti/mas/vpe/hlc.h>
00085 #include <ti/mas/vpe/slm.h>
00086 #include <ti/mas/vpe/snl.h>
00087 #include <ti/mas/vpe/svd.h>
00088 #include <ti/mas/vpe/sfc.h>
00089 #include <ti/mas/vpe/pcm.h>
00090 #include <ti/mas/vpe/asnr.h>
00091
00092 #ifdef ti_targets_C54
00093 #define _VPESIM_C54 1
00094 #else
00095 #define _VPESIM_C54 0
00096 #endif
00097
00098 #ifdef ti_targets_C55
00099 #define _VPESIM_C55 1
00100 #else
00101 #define _VPESIM_C55 0
00102 #endif
00103
00104 #ifdef ti_targets_C55_large
00105 #define _VPESIM_C55L 1
00106 #else
00107 #define _VPESIM_C55L 0
00108 #endif
00109
00110 #ifdef ti_targets_C64
00111 #define _VPESIM_C64 1
00112 #else
00113 #define _VPESIM_C64 0
00114 #endif
00115
00116 #ifdef ti_targets_C64_big_endian
00117 #define _VPESIM_C64_BIG_ENDIAN 1
00118 #else
00119 #define _VPESIM_C64_BIG_ENDIAN 0
00120 #endif
00121
00122 #ifdef ti_targets_C64P
00123 #define _VPESIM_C64P 1
00124 #else
00125 #define _VPESIM_C64P 0
00126 #endif
00127
00128 #ifdef ti_targets_C64P_big_endian
00129 #define _VPESIM_C64P_BIG_ENDIAN 1
00130 #else
00131 #define _VPESIM_C64P_BIG_ENDIAN 0
00132 #endif
00133
00134 #ifdef ti_targets_C66
00135 #define _VPESIM_C66 1
00136 #else
00137 #define _VPESIM_C66 0
00138 #endif
00139
00140 #ifdef ti_targets_C66_big_endian
00141 #define _VPESIM_C66_BIG_ENDIAN 1
00142 #else
00143 #define _VPESIM_C66_BIG_ENDIAN 0
00144 #endif
00145
00146 /* Simulation error identifiers */
00147 #define vpe_SIM_ERR_1       ( 1)    //
00148 #define vpe_SIM_ERR_2       ( 2)    //
00149 #define vpe_SIM_ERR_3       ( 4)    //
00150 #define vpe_SIM_ERR_4       ( 5)    //
00151 #define vpe_SIM_ERR_5       ( 6)    //
00152 #define vpe_SIM_ERR_6       ( 7)    //
00153 #define vpe_SIM_ERR_7       ( 8)    //
00154 #define vpe_SIM_ERR_8       ( 9)    //
00155 #define vpe_SIM_ERR_9       (10)    //
00156 #define vpe_SIM_ERR_10      (11)    //
00157 #define vpe_SIM_ERR_11      (12)    //
00158 #define vpe_SIM_ERR_12      (13)    //
00159 #define vpe_SIM_ERR_13      (14)    //
00160 #define vpe_SIM_ERR_14      (15)    //
00161 #define vpe_SIM_ERR_15      (16)    //
00162 #define vpe_SIM_ERR_16      (17)    //
00163 #define vpe_SIM_ERR_17      (18)    //
00164 #define vpe_SIM_ERR_18      (19)    //
00165
00166 /* Simulation constraints */
00167 #define vpe_SIM_MAX_SAMPLES          320    // Maximum frame_size
00168 #define vpe_SIM_MAX_ECOBUFS          12     // Maximum module buffers
00169 #define vpe_SIM_MAX_STRING          256     // Maximum string size
00170
00171 /* Simulation file open actions */
00172 #define vpe_SIM_FILEIO_READ         ( 0)    // Open file for read (binary)
00173 #define vpe_SIM_FILEIO_WRITE        ( 1)    // Open file for write (binary)
00174
00175 #define VPE_SIM_SAMPLE_FREQ_16000 16000    // Sampling frequency
00176 #define VPE_SIM_SAMPLE_FREQ_8000  8000     // Sampling frequency
00177 #define VPE_SIM_FRAME_SIZE_16000   160     /* 160 samples for a 10 msec frame */
00178 #define VPE_SIM_FRAME_SIZE_8000     80     /*  80 samples for a 10 msec frame */
00179
00180 /* Handle CCS Project paths */
00181 #ifdef  __CCS_PROJECT_REL_PATH
00182 #define vpe_SIM_DEF_BASE_DIR       "../../../vectors/"
00183 #else
00184 #ifdef AUTOMATE_PATH
00185 #define vpe_SIM_DEF_BASE_DIR       "./"
00186 #else
00187 #define vpe_SIM_DEF_BASE_DIR       "../../vectors/"
00188 #endif
00189 #endif
00190
00191 #define vpe_SIM_DEF_SIGIN_FNAME         "sigIn.pcm"
00192 #define vpe_SIM_DEF_SIGOUT_FNAME        "sigOut.pcm"
00193 #define vpe_SIM_DEF_CONFIG_FNAME        "vpecfg.txt"
00194
00195 #define VPE_SIM_DECIM_FILT_DEL  (sfc_DEF_FILT_LEN-1)
00196 #define VPE_SIM_DECIM_DELAY_LEN (VPE_SIM_DECIM_FILT_DEL + VPE_SIM_FRAME_SIZE_16000)
00197 #define VPE_SIM_INTERP_FILT_DEL ((sfc_DEF_FILT_LEN-1)/2)
00198 #define VPE_SIM_INTERP_DELAY_LEN (VPE_SIM_INTERP_FILT_DEL + VPE_SIM_FRAME_SIZE_16000)
00199
00200 /* Simulation PCM format enumeration */
00201 typedef enum {
00202   vpe_SIM_PCM_ALAW = const_COMP_ALAW_8,  // 8-bit ulaw PCM
00203   vpe_SIM_PCM_ULAW = const_COMP_MULAW_8, // 8-bit alaw PCM
00204   vpe_SIM_PCM_LIN  = const_COMP_LINEAR   // Linear PCM
00205 } vpeSimPcm_e;
00206
00207 typedef struct {
00208   tbool fio;                            // TRUE: Get/put samples from/to file
00209   tbool eof;                            // TRUE: End of file reached
00210   FILE  *fptr;                          // File pointer for read/write
00211   char  fname[vpe_SIM_MAX_STRING];      // File name to open/close
00212 } vpeSimFileIo_t;
00213
00214 /* Signal Generator Parameters */
00215 typedef struct {
00216   tbool     state;                  /* TRUE: generator is on.                 */
00217   linSample dcoffset;               /* dc offset (Q0 format)                  */
00218   tint      wftype;                 /* one of sgn_WFT_'s                      */
00219   tint      f1;                     /* the first frequency in Hz              */
00220   tint      f2;                     /* the second frequency in Hz             */
00221   linSample amp1;                   /* amplitude of the first component (Q0)  */
00222   linSample amp2;                   /* amplitude of the second component (Q0) */
00223   tint      nlevel;                 /* idle noise level in dBm0               */
00224   tulong    nseed;                  /* idle noise seed                        */
00225   tint      ntype;                  /* noise type SGN_NT_xxx                  */
00226   tint      pow_level;              /* Hoth or CSS power level in dBm0        */
00227   tulong    hoth_seed;              /* Hoth noise seed                        */
00228 } vpeSGNPars_t;
00229
00230 /* ASNR parameters */
00231 typedef struct {
00232   tint samp_rate;
00233   tint delay;
00234   tint band_bin1;
00235   tint band_bin2;
00236   tint band1_max_atten;
00237   tint band2_max_atten;
00238   tint band3_max_atten;
00239   tint sig_upd_rate_max;
00240   tint sig_upd_rate_min;
00241   tint noise_thresh;
00242   tint noise_hangover;
00243 } vpeASNRPars_t;
00244
00245 /* Simulation configuration structure */
00246 typedef struct {
00247   tbool  exec;                        /* TRUE: Provide verbose progress info        */
00248   tbool  hlc_on;                      /* Hlc enable bit                             */
00249   tbool  slm_on;                      /* Slim enable bit                            */
00250   tbool  snl_on;                      /* SNL enable bit                             */
00251   tbool  svd_on;                      /* SVD enable bit                             */
00252   tbool  nr_on;                       /* NR enable bit                              */
00253   tbool  decim_on;
00254   tbool  interp_on;
00255   tbool  ulaw_enc_on;
00256   tbool  ulaw_dec_on;
00257   tbool  alaw_enc_on;
00258   tbool  alaw_dec_on;
00259   tlong  sample_cnt;                  /* Sample count                               */
00260   tulong sample_bp;                   /* Break (halt) after this sample is reached  */
00261   tbool  sgn;                         /* whether to use sgn, TRUE: use sgn          */
00262   tbool  cfg_sgn;                     /* TRUE: configure SGN                        */
00263   tbool  cfg_hlc;                     /* TRUE: configure HLC                        */
00264   tbool  cfg_slm;                     /* TRUE: configure SLM                        */
00265   tint   slm_mod;                     /* SLM mode, 0: disable, 1~5: enable          */
00266   tint   Fs;                          /* Sampling rate in Hz                        */
00267   hlcControl_t   hlc_ctrl;            /* HLC control structure                      */
00268   vpeASNRPars_t  asnrParam;           /* ASNR parameters                            */
00269   vpeSGNPars_t   sgnParam;            /* Parameters used to configure sgn           */
00270   vpeSimFileIo_t sigIn;               /* Signal in file I/O structure               */
00271   vpeSimFileIo_t sigOut;              /* Signal out file I/O structure              */
00272   vpeSimFileIo_t config;              /* VPE simulation configuration I/O           */
00273   vpeSimPcm_e    pcmin_format;        /* Input PCM format                           */
00274   vpeSimPcm_e    pcmout_format;       /* Output PCM format                          */
00275   tbool  data;                        /* Flag indicating more samples for simulation*/
00276   tuint  error_id;                    /* Error identifier                           */
00277   tuint  frame_size_in;               /* Simulation frame size, input               */
00278   tuint  frame_size_out;              /* Simulation frame size, output              */
00279   char   baseDir[vpe_SIM_MAX_STRING]; /* Base directory for file I/O                */
00280 } vpeSimConfig_t;
00281
00282
00283 extern void  vpe_sim_fileio_init   (vpeSimFileIo_t *fioptr, tuint code);
00284 extern void  vpe_sim_fileio_end    (vpeSimFileIo_t *fioptr);
00285 extern void  vpe_sim_init          ();
00286 extern void  vpe_init              (void);
00287 extern tbool vpe_sim_fread         (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr);
00288 extern void  vpe_sim_fwrite        (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr);
00289 extern void  vpe_sim_input_mux     (void);
00290 extern void  vpe_sim_output_mux    (void);
00291 extern void  vpe_print             (char *str);
00292 extern void  vpe_iprint            (char *str, tlong ivar);
00293 extern void  vpe_sprint            (char *str, char *svar);
00294 extern void  vpe_sim_open_sgn      (void *inst);
00295 extern void  vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs);
00296 extern void  vpe_sim_gen_frame     (void *inst, tint frame_size, linSample *frame);
00297 extern sgnFileIo_t *vpe_sim_in_file(sgnFileIo_t *dsc);
00298 extern sgnFileIo_t *vpe_sim_in_file(sgnFileIo_t *dsc);
00299 extern void  vpe_instantiate_nr(tint srate);
00300 extern void  vpe_config_nr(vpeASNRPars_t *asnr_params);
00301 extern void  vpe_deinstantiate_nr();
00302 extern void  vpe_halt (tbool *exec);
00303 extern void  vpe_sim_flush_cache();
00304 extern void  vpe_sim_read_cfg();
00305
00306 #endif /* _VPESIM_H */
00307
00308 /* Nothing past this point */


VPE Test: vpesim_setup.c File Reference

  • File List
  • Globals

vpesim_setup.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 dependency graph for vpesim_setup.c:

Go to the source code of this file.

Defines

#define | vpe_SGN_DEF_DC_OFFSET 0
#define | vpe_SGN_DEF_WF_TYPE 1
#define | vpe_SGN_DEF_F1 1000
#define | vpe_SGN_DEF_F2 400
#define | vpe_SGN_DEF_T_AMP1 0x1400
#define | vpe_SGN_DEF_T_AMP2 0x3700
#define | vpe_SGN_DEF_PR_PERIOD 1000
#define | vpe_SGN_DEF_PR_ENABLE FALSE
#define | vpe_SGN_DEF_NOISE_LEVEL (-100)
#define | vpe_SGN_DEF_NOISE_SEED 40
#define | vpe_SGN_DEF_NOISE_TYPE sgn_NT_GAUSS
#define | vpe_SGN_DEF_FSK_DURATION 90
#define | vpe_SGN_DEF_FSK_DATA_LEN 1
#define | vpe_SGN_DEF_POWER_LEVEL (-10)
#define | vpe_SGN_DEF_HOTH_WNG_SEED 20
#define | VPESIM_NUM_BYTES_LINSAMP 2

Functions

void | vpe_halt (tbool *exec)
void | vpe_print (char *str)
void | vpe_iprint (char *str, tlong ivar)
void | vpe_sprint (char *str, char *svar)
void | vpe_sim_fileio_init (vpeSimFileIo_t *fioptr, tuint code)
void | vpe_sim_fileio_end (vpeSimFileIo_t *fioptr)
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_init ()
void | vpe_sim_read_cfg ()
void | vpe_init (void)
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)
sgnFileIo_t * | vpe_sim_out_file (sgnFileIo_t *dsc)
void | vpe_sim_flush_cache ()

Variables

char | vpe_sim_global_str [vpe_SIM_MAX_STRING]
char | vpe_sim_print_str [vpe_SIM_MAX_STRING]
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}
vpeSimConfig_t * vpeSim
void * | slmInst_ptr
void * | hlcInst_ptr
hlcControl_t * | hctrlInst_ptr
void * | snlInst_ptr
vpeSimFileIo_t snlLevOut
void * | svdInst_ptr
vpeSimFileIo_t svdOut
void * | sgnInst_ptr
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_SGN_DEF_DC_OFFSET 0

Definition at line 91 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_WF_TYPE 1

Definition at line 92 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_F1 1000

Definition at line 93 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_F2 400

Definition at line 94 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_T_AMP1 0x1400

Definition at line 95 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_T_AMP2 0x3700

Definition at line 96 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_PR_PERIOD 1000

Definition at line 97 of file vpesim_setup.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_PR_ENABLE FALSE

Definition at line 98 of file vpesim_setup.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_LEVEL (-100)

Definition at line 99 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_SEED 40

Definition at line 100 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_NOISE_TYPE sgn_NT_GAUSS

Definition at line 101 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_FSK_DURATION 90

Definition at line 102 of file vpesim_setup.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_FSK_DATA_LEN 1

Definition at line 103 of file vpesim_setup.c.

Referenced by vpe_sim_open_sgn().

#define vpe_SGN_DEF_POWER_LEVEL (-10)

Definition at line 104 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define vpe_SGN_DEF_HOTH_WNG_SEED 20

Definition at line 105 of file vpesim_setup.c.

Referenced by vpe_init(), and vpe_sim_open_sgn().

#define VPESIM_NUM_BYTES_LINSAMP 2

Definition at line 269 of file vpesim_setup.c.

Referenced by vpe_sim_fread(), and vpe_sim_fwrite().

Function Documentation

void vpe_halt ( tbool * exec )

Definition at line 124 of file vpesim_setup.c.

Referenced by main(), and vpe_init().

void vpe_print ( char * str )

Definition at line 163 of file vpesim_setup.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 176 of file vpesim_setup.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 188 of file vpesim_setup.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_fileio_init | ( | vpeSimFileIo_t * | fioptr,
 |  | tuint | code
 | ) |  |

Definition at line 199 of file vpesim_setup.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 242 of file vpesim_setup.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:

tbool vpe_sim_fread | ( | linSample * | buf,
 |  | tint | buf_size,
 |  | vpeSimFileIo_t * | fioptr
 | ) |  |

Definition at line 272 of file vpesim_setup.c.

References vpeSimFileIo_t::eof, vpeSimFileIo_t::fptr, vpe_temp_io_buf, and VPESIM_NUM_BYTES_LINSAMP.

Referenced by main().

void vpe_sim_fwrite | ( | linSample * | buf,
 |  | tint | buf_size,
 |  | vpeSimFileIo_t * | fioptr
 | ) |  |

Definition at line 304 of file vpesim_setup.c.

References vpeSimFileIo_t::fptr, vpe_temp_io_buf, and VPESIM_NUM_BYTES_LINSAMP.

void vpe_sim_init ( )

Definition at line 327 of file vpesim_setup.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::config, vpeSimConfig_t::decim_on, vpeSimConfig_t::error_id, vpeSimConfig_t::exec, vpeSimFileIo_t::fio, vpeSimFileIo_t::fname, vpeSimFileIo_t::fptr, vpeSimConfig_t::hlc_on, vpeSimConfig_t::interp_on, vpeSimConfig_t::nr_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_CONFIG_FNAME, vpe_SIM_DEF_SIGIN_FNAME, vpe_SIM_DEF_SIGOUT_FNAME, vpe_SIM_PCM_LIN, and vpeSim.

Referenced by main().

void vpe_sim_read_cfg ( )

Definition at line 370 of file vpesim_setup.c.

References vpeSimConfig_t::asnrParam, vpeASNRPars_t::band1_max_atten, vpeASNRPars_t::band2_max_atten, vpeASNRPars_t::band3_max_atten, vpeASNRPars_t::band_bin1, vpeASNRPars_t::band_bin2, vpeSimConfig_t::baseDir, vpeSimConfig_t::config, vpeASNRPars_t::delay, vpeSimFileIo_t::fname, vpeSimConfig_t::Fs, vpeASNRPars_t::noise_hangover, vpeASNRPars_t::noise_thresh, vpeASNRPars_t::samp_rate, vpeASNRPars_t::sig_upd_rate_max, vpeASNRPars_t::sig_upd_rate_min, vpe_sim_global_str, VPE_SIM_SAMPLE_FREQ_16000, and vpeSim.

Referenced by main().

void vpe_init ( void )

Definition at line 425 of file vpesim_setup.c.

References vpeSGNPars_t::amp1, vpeSGNPars_t::amp2, vpeSimConfig_t::asnrParam, 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_in, 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, vpeSimConfig_t::nr_on, 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_config_nr(), vpe_halt(), vpe_instantiate_nr(), 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_FRAME_SIZE_16000, VPE_SIM_FRAME_SIZE_8000, VPE_SIM_INTERP_FILT_DEL, vpe_SIM_MAX_SAMPLES, vpe_sim_open_sgn(), VPE_SIM_SAMPLE_FREQ_16000, VPE_SIM_SAMPLE_FREQ_8000, vpeSim, and vpeSGNPars_t::wftype.

Referenced by main().

Here is the call graph for this function:

void vpe_sim_open_sgn ( void * inst )

Definition at line 637 of file vpesim_setup.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 669 of file vpesim_setup.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 726 of file vpesim_setup.c.

Referenced by main().

sgnFileIo_t* vpe_sim_in_file ( sgnFileIo_t * dsc )

Definition at line 737 of file vpesim_setup.c.

References inCnt, and inFrame.

Referenced by vpe_sim_open_sgn().

sgnFileIo_t* vpe_sim_out_file ( sgnFileIo_t * dsc )

Definition at line 747 of file vpesim_setup.c.

References outCnt, and outFrame.

void vpe_sim_flush_cache ( )

Definition at line 758 of file vpesim_setup.c.

Referenced by main().

Variable Documentation

char vpe_sim_global_str[vpe_SIM_MAX_STRING]

Definition at line 108 of file vpesim_setup.c.

Referenced by vpe_sim_fileio_end(), vpe_sim_fileio_init(), and vpe_sim_read_cfg().

char vpe_sim_print_str[vpe_SIM_MAX_STRING]

Definition at line 109 of file vpesim_setup.c.

Referenced by vpe_iprint(), and vpe_sprint().

linSample decimDelayLine[VPE_SIM_DECIM_DELAY_LEN]

Definition at line 96 of file vpesim.c.

Referenced by vpe_init().

linSample interpDelayLine[VPE_SIM_INTERP_DELAY_LEN]

Definition at line 97 of file vpesim.c.

Referenced by vpe_init().

tint vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e}

Definition at line 115 of file vpesim_setup.c.

Referenced by vpe_sim_open_sgn().

vpeSimConfig_t* vpeSim

Definition at line 89 of file vpesim.c.

Referenced by main(), vpe_init(), vpe_print(), vpe_sim_fileio_end(), vpe_sim_fileio_init(), vpe_sim_init(), vpe_sim_open_sgn(), and vpe_sim_read_cfg().

void* slmInst_ptr

Definition at line 116 of file vpesim.c.

Referenced by vpe_init().

void* hlcInst_ptr

Definition at line 119 of file vpesim.c.

Referenced by vpe_init().

hlcControl_t* hctrlInst_ptr

Definition at line 120 of file vpesim.c.

Referenced by vpe_init().

void* snlInst_ptr

Definition at line 123 of file vpesim.c.

Referenced by vpe_init().

vpeSimFileIo_t snlLevOut

Definition at line 128 of file vpesim.c.

Referenced by main(), and vpe_init().

void* svdInst_ptr

Definition at line 131 of file vpesim.c.

Referenced by vpe_init().

vpeSimFileIo_t svdOut

Definition at line 134 of file vpesim.c.

Referenced by main(), and vpe_init().

void* sgnInst_ptr

Definition at line 140 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 270 of file vpesim_setup.c.

Referenced by vpe_sim_fread(), and vpe_sim_fwrite().

linSample* inFrame

Definition at line 734 of file vpesim_setup.c.

Referenced by vpe_sim_in_file().

linSample * outFrame

Definition at line 734 of file vpesim_setup.c.

Referenced by vpe_sim_out_file().

tint inCnt

Definition at line 735 of file vpesim_setup.c.

Referenced by vpe_sim_in_file().

tint outCnt

Definition at line 735 of file vpesim_setup.c.

Referenced by vpe_sim_out_file().


VPE Test: vpesim_setup.c Source File

  • File List
  • Globals

vpesim_setup.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------
00002  * Filename:  vpesim.c
00003  *
00004  * Description: Test the vpe API functions.
00005  *
00006  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00007  *
00008  *              All rights reserved not granted herein.
00009  *
00010  *                         Limited License.
00011  *
00012  *  Texas Instruments Incorporated grants a world-wide, royalty-free,
00013  *  non-exclusive license under copyrights and patents it now or hereafter owns
00014  *  or controls to make, have made, use, import, offer to sell and sell
00015  *  ("Utilize") this software subject to the terms herein.  With respect to the
00016  *  foregoing patent license, such license is granted solely to the extent that
00017  *  any such patent is necessary to Utilize the software alone.  The patent
00018  *  license shall not apply to any combinations which include this software,
00019  *  other than combinations with devices manufactured by or for TI (“TI
00020  *  Devices”).  No hardware patent is licensed hereunder.
00021  *
00022  *  Redistributions must preserve existing copyright notices and reproduce this
00023  *  license (including the above copyright notice and the disclaimer and (if
00024  *  applicable) source code license limitations below) in the documentation
00025  *  and/or other materials provided with the distribution
00026  *
00027  *  Redistribution and use in binary form, without modification, are permitted
00028  *  provided that the following conditions are met:
00029  *
00030  *    *  No reverse engineering, decompilation, or disassembly of this software
00031  *  is permitted with respect to any software provided in binary form.
00032  *
00033  *    *  any redistribution and use are licensed by TI for use only with TI
00034  *  Devices.
00035  *
00036  *    *  Nothing shall obligate TI to provide you with source code for the
00037  *  software licensed and provided to you in object code.
00038  *
00039  *  If software source code is provided to you, modification and redistribution
00040  *  of the source code are permitted provided that the following conditions are
00041  *  met:
00042  *
00043  *    *  any redistribution and use of the source code, including any resulting
00044  *  derivative works, are licensed by TI for use only with TI Devices.
00045  *
00046  *    *  any redistribution and use of any object code compiled from the source
00047  *  code and any resulting derivative works, are licensed by TI for use only
00048  *  with TI Devices.
00049  *
00050  *  Neither the name of Texas Instruments Incorporated nor the names of its
00051  *  suppliers may be used to endorse or promote products derived from this
00052  *  software without specific prior written permission.
00053  *
00054  *  DISCLAIMER.
00055  *
00056  *  THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
00057  *  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00058  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00059  *  DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY
00060  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00061  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00062  *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00063  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00064  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00065  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00066  *  DAMAGE.
00067  *-----------------------------------------------------------------*/
00068
00069 /* ANSI C headers */
00070 #include <stdlib.h>
00071 #include <stdio.h>
00072 #include <string.h>
00073
00074 /* RTSC headers */
00075 #include <ti/mas/types/types.h>
00076 #include <ti/mas/fract/fract.h>
00077 #include <ti/mas/types/const.h>
00078 #include <ti/mas/util/ecomem.h>
00079
00080 /* for signal generator */
00081 #include <ti/mas/sdk/sgn.h>
00082
00083 /* unit test includes */
00084 #include <ti/mas/vpe/test/src/vpesim.h>
00085
00086 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN |_VPESIM_C66||_VPESIM_C66_BIG_ENDIAN
00087 #include <ti/mas/sdk/memArchCfg.h>
00088 #endif
00089
00090 /* sgn defaults */
00091 #define  vpe_SGN_DEF_DC_OFFSET        0
00092 #define  vpe_SGN_DEF_WF_TYPE          1
00093 #define  vpe_SGN_DEF_F1               1000
00094 #define  vpe_SGN_DEF_F2               400
00095 #define  vpe_SGN_DEF_T_AMP1           0x1400
00096 #define  vpe_SGN_DEF_T_AMP2           0x3700
00097 #define  vpe_SGN_DEF_PR_PERIOD        1000
00098 #define  vpe_SGN_DEF_PR_ENABLE        FALSE
00099 #define  vpe_SGN_DEF_NOISE_LEVEL      (-100)
00100 #define  vpe_SGN_DEF_NOISE_SEED       40
00101 #define  vpe_SGN_DEF_NOISE_TYPE       sgn_NT_GAUSS
00102 #define  vpe_SGN_DEF_FSK_DURATION     90
00103 #define  vpe_SGN_DEF_FSK_DATA_LEN     1
00104 #define  vpe_SGN_DEF_POWER_LEVEL      (-10)
00105 #define  vpe_SGN_DEF_HOTH_WNG_SEED    20
00106
00107 /* Global simulation data */
00108 char vpe_sim_global_str[vpe_SIM_MAX_STRING];
00109 char vpe_sim_print_str[vpe_SIM_MAX_STRING];
00110
00111 /* Delay line and input buffer for source rate converter */
00112 extern linSample decimDelayLine[VPE_SIM_DECIM_DELAY_LEN];
00113 extern linSample interpDelayLine[VPE_SIM_INTERP_DELAY_LEN];
00114
00115 tint vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN] = {0x7e7e};
00116
00117 extern vpeSimConfig_t *vpeSim;
00118
00119 /*-----------------------------------------------------------------
00120  * Function:  vpe_halt
00121  *
00122  * Description: Utility to provide simulation breakpoint.
00123  *-----------------------------------------------------------------*/
00124 void vpe_halt (tbool *exec)
00125 {
00126   /* Wait for further actions - exit when user sets "halt" to FALSE */
00127   while (!(*exec)) {
00128     asm ("  NOP");
00129     asm ("Set_BP_Here:  ");
00130     asm ("  NOP");
00131     asm ("  NOP");
00132   }
00133 }
00134
00135 /* slm instance */
00136 extern void *slmInst_ptr;
00137
00138 /* hlc instance */
00139 extern void *hlcInst_ptr;
00140 extern hlcControl_t *hctrlInst_ptr;
00141
00142 /* snl instance */
00143 extern void *snlInst_ptr;
00144
00145 /* snl result out file I/O structure */
00146 extern vpeSimFileIo_t snlLevOut;
00147
00148 /* svd instance */
00149 extern void *svdInst_ptr;
00150
00151 /* svd result out file I/O structure */
00152 extern vpeSimFileIo_t svdOut;
00153
00154 /* sgn instance */
00155 extern void *sgnInst_ptr;
00156
00157
00158 /*-----------------------------------------------------------------
00159  * Function:  vpe_print
00160  *
00161  * Description: Utility to provide static progress information.
00162  *-----------------------------------------------------------------*/
00163 void vpe_print (char *str)
00164 {
00165   if (vpeSim->exec) {
00166     printf (str);
00167   }
00168 }
00169
00170
00171 /*-----------------------------------------------------------------
00172  * Function:  vpe_iprint
00173  *
00174  * Description: Utility to provide integer progress information.
00175  *-----------------------------------------------------------------*/
00176 void vpe_iprint (char *str, tlong ivar)
00177 {
00178   sprintf   (vpe_sim_print_str, str, ivar);
00179   vpe_print (vpe_sim_print_str);
00180 }
00181
00182
00183 /*-----------------------------------------------------------------
00184  * Function:  vpe_sprint
00185  *
00186  * Description: Utility to provide string progress information.
00187  *-----------------------------------------------------------------*/
00188 void vpe_sprint (char *str, char *svar)
00189 {
00190   sprintf   (vpe_sim_print_str, str, svar);
00191   vpe_print (vpe_sim_print_str);
00192 }
00193
00194 /*-----------------------------------------------------------------
00195  * Function:  vpe_sim_fileio_init
00196  *
00197  * Description: Initialize simulation for file I/O
00198  *-----------------------------------------------------------------*/
00199 void vpe_sim_fileio_init (vpeSimFileIo_t *fioptr, tuint code)
00200 {
00201   if (fioptr->fio) {
00202     /* Create file path string */
00203     strcpy (vpe_sim_global_str, vpeSim->baseDir);
00204     strcat (vpe_sim_global_str, fioptr->fname);
00205
00206     /* Ensure that file pointer is NULL (closed) */
00207     if (fioptr->fptr != NULL) {
00208       vpe_sprint (" - File already open: %s\n", vpe_sim_global_str);
00209       return;
00210     }
00211
00212     /* Open file (read/write binary) and assign file pointer */
00213     if (code == vpe_SIM_FILEIO_READ) {
00214       fioptr->fptr = fopen (vpe_sim_global_str, "rb");
00215     }
00216     else if (code == vpe_SIM_FILEIO_WRITE) {
00217       fioptr->fptr = fopen (vpe_sim_global_str, "wb");
00218     }
00219     else {
00220       vpe_iprint ("Error: unrecognized file action %d \n", code);
00221       return;
00222     }
00223
00224     /* Ensure open success */
00225     if (fioptr->fptr == NULL) {
00226       vpe_sprint ("Unable to open file: %s\n", vpe_sim_global_str);
00227       fioptr->fio = FALSE;
00228     }
00229     else {
00230       vpe_sprint (" - Opened file: %s\n", vpe_sim_global_str);
00231       fioptr->eof = FALSE;
00232     }
00233   }
00234 }
00235
00236
00237 /*-----------------------------------------------------------------
00238  * Function:  vpe_sim_fileio_end
00239  *
00240  * Description: Clear simulation after file I/O
00241  *-----------------------------------------------------------------*/
00242 void vpe_sim_fileio_end (vpeSimFileIo_t *fioptr)
00243 {
00244   if (fioptr->fio) {
00245     /* Close file pointer */
00246     if (fioptr->fptr == NULL) {
00247       vpe_print ("Warning: premature file close\n");
00248     }
00249     else {
00250       if (fioptr->eof) {
00251         fclose (fioptr->fptr);
00252         fioptr->fptr = (FILE *) NULL;
00253         /* Print progress */
00254         strcpy (vpe_sim_global_str, vpeSim->baseDir);
00255         strcat (vpe_sim_global_str, fioptr->fname);
00256         vpe_sprint (" - Closed file: %s\n", vpe_sim_global_str);
00257       }
00258     }
00259   }
00260 }
00261
00262
00263
00264 /*-----------------------------------------------------------------
00265  * Function:  vpe_sim_fread
00266  *
00267  * Description: Perform file input
00268  *-----------------------------------------------------------------*/
00269 #define VPESIM_NUM_BYTES_LINSAMP 2
00270 tword vpe_temp_io_buf[vpe_SIM_MAX_SAMPLES*VPESIM_NUM_BYTES_LINSAMP];
00271
00272 tbool vpe_sim_fread (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
00273 {
00274   tuint num_read;
00275   tint  i, j;
00276
00277   if(fioptr->fptr == NULL){
00278     return FALSE;
00279   }
00280
00281   /* read the file*/
00282   num_read = fread(vpe_temp_io_buf, VPESIM_NUM_BYTES_LINSAMP, buf_size, fioptr->fptr);
00283
00284   /* check for endo of file */
00285   if (num_read != (buf_size)) {
00286       fioptr->eof = TRUE;
00287       return FALSE;
00288   }
00289
00290   /* pack bytes into words */
00291   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00292   {
00293     buf[i]  = vpe_temp_io_buf[j] | (vpe_temp_io_buf[j+1] << 8);
00294   }
00295
00296   return TRUE;
00297 }
00298
00299 /*-----------------------------------------------------------------
00300  * Function:  vpe_sim_fwrite
00301  *
00302  * Description: Perform file output
00303  *-----------------------------------------------------------------*/
00304 void vpe_sim_fwrite (linSample *buf, tint buf_size, vpeSimFileIo_t *fioptr)
00305 {
00306   tuint i, j;
00307
00308   if(fioptr->fptr == NULL){
00309     return;
00310   }
00311
00312   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00313   {
00314     vpe_temp_io_buf[j]   = (buf[i]     ) & 0x00ff;
00315     vpe_temp_io_buf[j+1] = (buf[i] >> 8) & 0x00ff;
00316   }
00317
00318   fwrite(vpe_temp_io_buf, VPESIM_NUM_BYTES_LINSAMP, buf_size, fioptr->fptr);
00319
00320 }
00321
00322 /*-----------------------------------------------------------------
00323  * Function:  vpe_sim_init
00324  *
00325  * Description: vpe simulation initialization.
00326  *-----------------------------------------------------------------*/
00327 void vpe_sim_init ()
00328 {
00329   vpeSim->exec          = TRUE;
00330   vpeSim->hlc_on        = FALSE;
00331   vpeSim->slm_on        = FALSE;
00332   vpeSim->snl_on        = FALSE;
00333   vpeSim->svd_on        = FALSE;
00334   vpeSim->nr_on         = TRUE;
00335   vpeSim->decim_on      = FALSE;
00336   vpeSim->interp_on     = FALSE;
00337   vpeSim->ulaw_enc_on   = FALSE;
00338   vpeSim->ulaw_dec_on   = FALSE;
00339   vpeSim->alaw_enc_on   = FALSE;
00340   vpeSim->alaw_dec_on   = FALSE;
00341   vpeSim->sgn           = FALSE;
00342   vpeSim->cfg_sgn       = FALSE;
00343   vpeSim->cfg_hlc       = FALSE;
00344   vpeSim->cfg_slm       = TRUE;
00345   vpeSim->slm_mod       = slm_MODE5;
00346
00347   vpeSim->sample_cnt    = 0;
00348   vpeSim->error_id      = 0;
00349   vpeSim->sample_bp     = 0L;
00350   vpeSim->pcmin_format  = vpe_SIM_PCM_LIN;
00351   vpeSim->pcmout_format = vpe_SIM_PCM_LIN;
00352
00353   /* Simulation file I/O initialization */
00354   vpeSim->sigIn.fio   = TRUE;
00355   vpeSim->sigOut.fio  = TRUE;
00356   vpeSim->sigIn.fptr  = (FILE *) NULL;
00357   vpeSim->sigOut.fptr  = (FILE *) NULL;
00358   strcpy (vpeSim->baseDir     , vpe_SIM_DEF_BASE_DIR);
00359   strcpy (vpeSim->sigIn.fname , vpe_SIM_DEF_SIGIN_FNAME);
00360   strcpy (vpeSim->sigOut.fname, vpe_SIM_DEF_SIGOUT_FNAME);
00361   strcpy (vpeSim->config.fname, vpe_SIM_DEF_CONFIG_FNAME);
00362 } /* vpe_sim_init */
00363
00364
00365 /*-----------------------------------------------------------------
00366  * Function:  vpe_sim_read_cfg
00367  *
00368  * Description: Read vpe simulation configuration.
00369  *-----------------------------------------------------------------*/
00370 void vpe_sim_read_cfg()
00371 {
00372   FILE *test_cfg;
00373   int samp_freq, asnr_delay, asnr_band_bin1, asnr_band_bin2, asnr_noise_thresh;
00374   int asnr_sig_upd_rate_max, asnr_sig_upd_rate_min, asnr_noise_hangover;
00375   int asnr_band1_max_atten, asnr_band2_max_atten, asnr_band3_max_atten;
00376
00377   /* Create file path string */
00378   strcpy (vpe_sim_global_str, vpeSim->baseDir);
00379   strcat (vpe_sim_global_str, vpeSim->config.fname);
00380
00381   /* Open file (read/write binary) and assign file pointer */
00382   test_cfg = fopen (vpe_sim_global_str, "r");
00383   if(test_cfg == NULL) {
00384     printf("VPE configuration file does NOT exist!\n");
00385     exit(0);
00386   }
00387
00388   fscanf(test_cfg, "%d\n", &samp_freq);
00389   fscanf(test_cfg, "%d\n", &asnr_delay);
00390   fscanf(test_cfg, "%d\n", &asnr_band_bin1);
00391   fscanf(test_cfg, "%d\n", &asnr_band_bin2);
00392   fscanf(test_cfg, "%d\n", &asnr_band1_max_atten);
00393   fscanf(test_cfg, "%d\n", &asnr_band2_max_atten);
00394   fscanf(test_cfg, "%d\n", &asnr_band3_max_atten);
00395   fscanf(test_cfg, "%d\n", &asnr_sig_upd_rate_max);
00396   fscanf(test_cfg, "%d\n", &asnr_sig_upd_rate_min);
00397   fscanf(test_cfg, "%d\n", &asnr_noise_thresh);
00398   fscanf(test_cfg, "%d\n", &asnr_noise_hangover);
00399
00400   vpeSim->Fs = (tint)samp_freq;
00401   if(samp_freq == VPE_SIM_SAMPLE_FREQ_16000) {
00402     vpeSim->asnrParam.samp_rate = asnr_SRATE_16K;
00403   }
00404   else {
00405     vpeSim->asnrParam.samp_rate = asnr_SRATE_8K;
00406   }
00407   vpeSim->asnrParam.delay           = (tint)asnr_delay;
00408   vpeSim->asnrParam.band_bin1       = (tint)asnr_band_bin1;
00409   vpeSim->asnrParam.band_bin2       = (tint)asnr_band_bin2;
00410   vpeSim->asnrParam.band1_max_atten = (tint)asnr_band1_max_atten;
00411   vpeSim->asnrParam.band2_max_atten = (tint)asnr_band2_max_atten;
00412   vpeSim->asnrParam.band3_max_atten = (tint)asnr_band3_max_atten;
00413   vpeSim->asnrParam.sig_upd_rate_max= (tint)asnr_sig_upd_rate_max;
00414   vpeSim->asnrParam.sig_upd_rate_min= (tint)asnr_sig_upd_rate_min;
00415   vpeSim->asnrParam.noise_thresh    = (tint)asnr_noise_thresh;
00416   vpeSim->asnrParam.noise_hangover  = (tint)asnr_noise_hangover;
00417
00418 } /* vpe_sim_read_cfg */
00419
00420 /*-----------------------------------------------------------------
00421  * Function:  vpe_init
00422  *
00423  * Description: Create and initialize VPE modules.
00424  *-----------------------------------------------------------------*/
00425 void vpe_init (void)
00426 {
00427   hlcConfig_t hlc_cfg_info;
00428   slmConfig_t slm_cfg_info;
00429   tint hlcSize, slmSize, snlSize, svdSize, sgnSize;
00430   tint srate_factor, frame_size;
00431
00432   tint retVal;
00433
00434   if(vpeSim->Fs == VPE_SIM_SAMPLE_FREQ_16000) {  /* Fs is read from cfg file */
00435     frame_size = VPE_SIM_FRAME_SIZE_16000;
00436   }
00437   else {
00438     frame_size = VPE_SIM_FRAME_SIZE_8000;
00439   }
00440
00441   /* Simulation structure initialization */
00442   vpeSim->frame_size_in = frame_size;
00443   vpeSim->frame_size_out= frame_size;
00444   if(vpeSim->decim_on) {
00445     vpeSim->frame_size_out = frame_size/2;
00446     memset(decimDelayLine, 0, sizeof(linSample)*VPE_SIM_DECIM_FILT_DEL);
00447   }
00448   if(vpeSim->interp_on) {
00449     vpeSim->frame_size_out = frame_size * 2;
00450     memset(interpDelayLine, 0, sizeof(linSample)*VPE_SIM_INTERP_FILT_DEL);
00451   }
00452
00453   if (vpeSim->hlc_on){
00454     /* allocate memory for HLC */
00455     retVal = hlcGetSizes(&hlcSize);
00456     if (retVal != hlc_NOERR){
00457       vpeSim->error_id = vpe_SIM_ERR_3;
00458       vpeSim->exec = FALSE;
00459       vpe_halt (&vpeSim->exec);
00460     }
00461
00462     hlcInst_ptr = malloc (hlcSize);
00463     /* init hlc */
00464     hlc_cfg_info.valid_bf = 0x00;
00465
00466     /* configure sampling rate */
00467     hlc_cfg_info.valid_bf |= 0x10;
00468
00469     if (vpeSim->Fs == VPE_SIM_SAMPLE_FREQ_8000) {
00470       hlc_cfg_info.srate_factor = hlc_SRATE_FACTOR_8K;  /* 8kHz sampling rate */
00471     }
00472     else {
00473       hlc_cfg_info.srate_factor = hlc_SRATE_FACTOR_16K; /* 16kHz sampling rate */
00474     }
00475
00476     /* configure frm_len */
00477     if (vpeSim->frame_size_out <= vpe_SIM_MAX_SAMPLES){
00478       hlc_cfg_info.valid_bf |= 0x08; /* configure frame length */
00479       hlc_cfg_info.frm_len = vpeSim->frame_size_out;
00480     }
00481     else{
00482       vpeSim->error_id = vpe_SIM_ERR_4;
00483       vpeSim->exec = FALSE;
00484       vpe_halt (&vpeSim->exec);
00485     }
00486
00487     retVal = hlcInit(hlcInst_ptr, &hlc_cfg_info);
00488     if (retVal != hlc_NOERR){
00489       vpeSim->error_id = vpe_SIM_ERR_4;
00490       vpeSim->exec = FALSE;
00491       vpe_halt (&vpeSim->exec);
00492     }
00493     /* Enable HLC */
00494     hctrlInst_ptr->ctl_code = hlc_CTL_ENA;
00495     retVal = hlcControl(hlcInst_ptr, hctrlInst_ptr);
00496     if (retVal != hlc_NOERR){
00497       vpeSim->error_id = vpe_SIM_ERR_6;
00498       vpeSim->exec = FALSE;
00499       vpe_halt (&vpeSim->exec);
00500     }
00501   } /* if testing HLC */
00502
00503   /* testing SLM */
00504   if (vpeSim->slm_on){
00505     /* allocate memory for SLM */
00506     retVal = slmGetSizes(&slmSize);
00507     if (retVal != slm_NOERR){
00508       vpeSim->error_id = vpe_SIM_ERR_9;
00509       vpeSim->exec = FALSE;
00510       vpe_halt (&vpeSim->exec);
00511     }
00512     slmInst_ptr = malloc (slmSize);
00513
00514     /* init SLM, SLM is disabled */
00515     slm_cfg_info.valid_bf  = 0x00;
00516     /* configure sampling rate */
00517     slm_cfg_info.valid_bf |= 0x01;
00518     if (vpeSim->Fs == VPE_SIM_SAMPLE_FREQ_8000) {
00519       slm_cfg_info.srate_factor = slm_SRATE_FACTOR_8K;
00520     }
00521     else {
00522       slm_cfg_info.srate_factor = slm_SRATE_FACTOR_16K;
00523     }
00524
00525     retVal = slmInit (slmInst_ptr, &slm_cfg_info);
00526     if (retVal != slm_NOERR){
00527       vpeSim->error_id = vpe_SIM_ERR_7;
00528       vpeSim->exec = FALSE;
00529       vpe_halt (&vpeSim->exec);
00530     }
00531   } /* if testing SLM */
00532
00533   /* testing SNL*/
00534   if (vpeSim->snl_on){
00535     retVal = snlGetSizes(&snlSize);
00536     if (retVal != snl_NOERR){
00537       vpeSim->error_id = vpe_SIM_ERR_10;
00538       vpeSim->exec = FALSE;
00539       vpe_halt (&vpeSim->exec);
00540     }
00541     snlInst_ptr = malloc (snlSize);
00542     /* initialize SNL */
00543     if (vpeSim->Fs == VPE_SIM_SAMPLE_FREQ_8000) {
00544       srate_factor = snl_SRATE_FACTOR_8K;
00545     }
00546     else {
00547       srate_factor = snl_SRATE_FACTOR_16K;
00548     }
00549
00550     retVal = snlInit (snlInst_ptr, srate_factor);
00551     if (retVal != snl_NOERR){
00552       vpeSim->error_id = vpe_SIM_ERR_11;
00553       vpeSim->exec = FALSE;
00554       vpe_halt (&vpeSim->exec);
00555     }
00556     strcpy (snlLevOut.fname, "snlLevOut.pcm");
00557     snlLevOut.fio   = TRUE;
00558     snlLevOut.fptr  = (FILE *) NULL;
00559   } /* end of testing SNL */
00560
00561   /* testing SVD*/
00562   if (vpeSim->svd_on){
00563     retVal = svdGetSizes(&svdSize);
00564     if (retVal != svd_NOERR){
00565       vpeSim->error_id = vpe_SIM_ERR_17;
00566       vpeSim->exec = FALSE;
00567       vpe_halt (&vpeSim->exec);
00568     }
00569     svdInst_ptr = malloc (svdSize);
00570     /* initialize SVD */
00571     if (vpeSim->Fs == VPE_SIM_SAMPLE_FREQ_8000) {
00572       srate_factor = svd_SRATE_8K;
00573     }
00574     else {
00575       srate_factor = svd_SRATE_16K;
00576     }
00577
00578     retVal = svdInit (svdInst_ptr, srate_factor);
00579     if (retVal != svd_NOERR){
00580       vpeSim->error_id = vpe_SIM_ERR_18;
00581       vpeSim->exec = FALSE;
00582       vpe_halt (&vpeSim->exec);
00583     }
00584
00585     strcpy (svdOut.fname, "svdOut.pcm");
00586     svdOut.fio   = TRUE;
00587     svdOut.fptr  = (FILE *) NULL;
00588   } /* end of testing SVD */
00589
00590   if(vpeSim->nr_on) {
00591     if (vpeSim->Fs == VPE_SIM_SAMPLE_FREQ_8000) {
00592       srate_factor = asnr_SRATE_8K;
00593     }
00594     else {
00595       srate_factor = asnr_SRATE_16K;
00596     }
00597
00598     vpe_instantiate_nr(srate_factor);
00599
00600   vpe_config_nr(&vpeSim->asnrParam);
00601   }
00602
00603   /* init sgn */
00604   vpeSim->sgnParam.state     = 1;
00605   vpeSim->sgnParam.dcoffset  = vpe_SGN_DEF_DC_OFFSET;
00606   vpeSim->sgnParam.wftype    = vpe_SGN_DEF_WF_TYPE;
00607   vpeSim->sgnParam.f1        = vpe_SGN_DEF_F1;
00608   vpeSim->sgnParam.f2        = vpe_SGN_DEF_F2;
00609   vpeSim->sgnParam.amp1      = vpe_SGN_DEF_T_AMP1;
00610   vpeSim->sgnParam.amp2      = vpe_SGN_DEF_T_AMP2;
00611   vpeSim->sgnParam.nlevel    = vpe_SGN_DEF_NOISE_LEVEL;
00612   vpeSim->sgnParam.nseed     = vpe_SGN_DEF_NOISE_SEED;
00613   vpeSim->sgnParam.ntype     = vpe_SGN_DEF_NOISE_TYPE;
00614   vpeSim->sgnParam.pow_level = vpe_SGN_DEF_POWER_LEVEL;
00615   vpeSim->sgnParam.hoth_seed = vpe_SGN_DEF_HOTH_WNG_SEED;
00616
00617   retVal = sgnGetSizes (&sgnSize);
00618   sgnInst_ptr = malloc (sgnSize);
00619   vpe_sim_open_sgn (sgnInst_ptr);
00620
00621   /* Init cache, L1D, L1P as cache, L2 32kB cache */
00622
00623 #if _VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00624   cacheConfig.L2sizeCfg = L2_SIZE_32KB;
00625 #endif
00626 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN
00627   memarchcfg_cacheEnable();
00628 #endif
00629 } /* vpe_init */
00630
00631 /*-----------------------------------------------------------------
00632  * Function:  vpe_sim_open_sgn
00633  *
00634  * Description: vpe simulation open signal generator
00635  *-----------------------------------------------------------------*/
00636
00637 void vpe_sim_open_sgn (void *inst)
00638 {
00639   sgnConfig_t cfg;
00640
00641   cfg.dc_offset     = vpe_SGN_DEF_DC_OFFSET;
00642   cfg.wf_type       = vpe_SGN_DEF_WF_TYPE;
00643   cfg.f1            = vpe_SGN_DEF_F1;
00644   cfg.f2            = vpe_SGN_DEF_F2;
00645   cfg.Fs            = vpeSim->Fs;
00646   cfg.t_amp1        = vpe_SGN_DEF_T_AMP1;
00647   cfg.t_amp2        = vpe_SGN_DEF_T_AMP2;
00648   cfg.pr_period     = vpe_SGN_DEF_PR_PERIOD;     /* # of samples between phase reversals */
00649   cfg.pr_enable     = vpe_SGN_DEF_PR_ENABLE;     /* disable phase reversal */
00650   cfg.noise_level   = vpe_SGN_DEF_NOISE_LEVEL;
00651   cfg.noise_seed    = vpe_SGN_DEF_NOISE_SEED;
00652   cfg.noise_type    = vpe_SGN_DEF_NOISE_TYPE;
00653   cfg.fsk_duration  = vpe_SGN_DEF_FSK_DURATION;  /* 90/300 = 300ms */
00654   cfg.fsk_dataptr   = &vpe_sim_fsk_data[vpe_SGN_DEF_FSK_DATA_LEN];
00655   cfg.fsk_numword   = vpe_SGN_DEF_FSK_DATA_LEN;
00656   cfg.power_level   = vpe_SGN_DEF_POWER_LEVEL;
00657   cfg.hoth_wng_seed = vpe_SGN_DEF_HOTH_WNG_SEED;
00658   cfg.file_io_fcn   = vpe_sim_in_file;
00659
00660   sgnInit (inst, &cfg);
00661 } /* vpe_sim_open_sgn */
00662
00663 /*-----------------------------------------------------------------
00664  * Function:  vpe_sim_open_sgn
00665  *
00666  * Description: vpe simulation open signal generator
00667  *-----------------------------------------------------------------*/
00668
00669 void vpe_sim_set_sgn (void *inst, vpeSGNPars_t *sgn, tint Fs)
00670 {
00671   sgnControl_t  ctl;
00672
00673   if (sgn->state) {
00674     ctl.Fs        = Fs;
00675     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00676       ctl.code          = sgn_CTL_CSS_POW;
00677       ctl.u.power_level = sgn->pow_level;
00678     }
00679     else if (sgn->wftype == sgn_WFT_HOTH) {
00680       ctl.code          = sgn_CTL_HOTH_POW;
00681       ctl.u.power_level = sgn->pow_level;
00682     }
00683     else {
00684       ctl.code      = sgn_CTL_TONE;
00685       ctl.u.t.f1    = sgn->f1;
00686       ctl.u.t.f2    = sgn->f2;
00687       ctl.u.t.amp1  = sgn->amp1;
00688       ctl.u.t.amp2  = sgn->amp2;
00689     }
00690     sgnControl (inst, &ctl);
00691
00692     ctl.code           = sgn_CTL_NOISE;
00693     ctl.u.noise_level  = sgn->nlevel;
00694   }
00695   else {
00696     if (sgn->wftype == sgn_WFT_CSS || sgn->wftype == sgn_WFT_CSS_DTK) {
00697       ctl.code          = sgn_CTL_CSS_POW;
00698       ctl.u.power_level = -80;
00699     }
00700     else if (sgn->wftype == sgn_WFT_HOTH) {
00701       ctl.code          = sgn_CTL_HOTH_POW;
00702       ctl.u.power_level = -80;
00703     }
00704     else {
00705       ctl.code     = sgn_CTL_TONE;
00706       ctl.u.t.f1   = sgn->f1;
00707       ctl.u.t.f2   = sgn->f2;
00708       ctl.u.t.amp1 = 0;
00709       ctl.u.t.amp2 = 0;
00710     }
00711     sgnControl (inst, &ctl);
00712
00713     ctl.code           = sgn_CTL_NOISE;
00714     ctl.u.noise_level  = -80;
00715   }
00716   sgnControl (inst, &ctl);
00717 } /* set_sgn */
00718
00719
00720 /******************************************************************************
00721  * FUNCTION PURPOSE: Generate a signal frame
00722  ******************************************************************************
00723  * DESCRIPTION: Generate a frame
00724  *
00725  *****************************************************************************/
00726 void vpe_sim_gen_frame (void *inst, tint frame_size, linSample *frame)
00727 {
00728   /* Generate one frame of samples */
00729   sgnGenerateFrame (inst, frame_size, frame);
00730
00731 } /* vpe_sim_gen_frame */
00732
00733 /* used to set probe point for the Tx/Rx input signal(s) */
00734 linSample *inFrame, *outFrame;
00735 tint      inCnt, outCnt;
00736
00737 sgnFileIo_t *vpe_sim_in_file (sgnFileIo_t *dsc)
00738 {
00739   inFrame = dsc->frame;
00740   inCnt   = dsc->cnt;
00741   asm (" nop");
00742   asm (" nop");
00743   asm (" nop");
00744   return (dsc);
00745 } /* vpe_sim_in_file */
00746
00747 sgnFileIo_t *vpe_sim_out_file (sgnFileIo_t *dsc)
00748 {
00749   outFrame = dsc->frame;
00750   outCnt   = dsc->cnt;
00751   asm (" nop");
00752   asm (" nop");
00753   asm (" nop");
00754   return (dsc);
00755 } /* vpe_sim_out_file */
00756
00757
00758 void vpe_sim_flush_cache() {
00759 #if _VPESIM_C64||_VPESIM_C64_BIG_ENDIAN||_VPESIM_C64P||_VPESIM_C64P_BIG_ENDIAN |_VPESIM_C66||_VPESIM_C66_BIG_ENDIAN
00760   /* flush cache */
00761   memarchcfg_cacheFlush();
00762 #endif
00763 }
00764
00765 /* Nothing past this point */